@endevops/peppol-schema 0.1.3 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -5
- package/dist/constants.d.ts +131 -0
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +114 -1
- package/dist/constants.js.map +1 -1
- package/dist/{index-BBzPjq7o.d.ts → index-CILtZytZ.d.ts} +1710 -669
- package/dist/index-CILtZytZ.d.ts.map +1 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1234 -187
- package/dist/index.js.map +1 -1
- package/dist/invoice-response-code-not-needs-schema-DNrfKYLh.js +36 -0
- package/dist/invoice-response-code-not-needs-schema-DNrfKYLh.js.map +1 -0
- package/dist/invoice-response-codes.d.ts +28 -0
- package/dist/invoice-response-codes.d.ts.map +1 -1
- package/dist/invoice-response-codes.js +11 -1
- package/dist/invoice-response-codes.js.map +1 -1
- package/dist/{is-valid-abn-160i38PG.js → is-valid-abn-D7eSygBG.js} +115 -2
- package/dist/is-valid-abn-D7eSygBG.js.map +1 -0
- package/dist/{is-valid-mod97-0208-CzMOXMO-.js → is-valid-mod97-0208-CjR324eG.js} +11 -1
- package/dist/is-valid-mod97-0208-CjR324eG.js.map +1 -0
- package/dist/message-level-response-profile-id-B9c0A7S_.js +27 -0
- package/dist/message-level-response-profile-id-B9c0A7S_.js.map +1 -0
- package/dist/{nodable-parser-CyDZtLCK.js → nodable-parser-CupS2H55.js} +31 -1
- package/dist/nodable-parser-CupS2H55.js.map +1 -0
- package/dist/schematron.d.ts +57 -1
- package/dist/schematron.d.ts.map +1 -1
- package/dist/schematron.js +453 -2
- package/dist/schematron.js.map +1 -1
- package/dist/validations.d.ts +132 -0
- package/dist/validations.d.ts.map +1 -1
- package/dist/validations.js +11 -2
- package/dist/validations.js.map +1 -1
- package/dist/values.d.ts +67 -2
- package/dist/values.d.ts.map +1 -1
- package/dist/xml.d.ts +30 -0
- package/dist/xml.d.ts.map +1 -1
- package/dist/xml.js +10 -1
- package/dist/xml.js.map +1 -1
- package/package.json +1 -1
- package/src/constants/credit-note-doctype-id.ts +9 -0
- package/src/constants/credit-note-process-id.ts +9 -0
- package/src/constants/document-scheme.ts +9 -0
- package/src/constants/invoice-doctype-id.ts +9 -0
- package/src/constants/invoice-process-id.ts +10 -0
- package/src/constants/invoice-response-doctype-id.ts +10 -0
- package/src/constants/invoice-response-process-id.ts +9 -0
- package/src/constants/invoice-response-profile-id.ts +9 -0
- package/src/constants/message-level-response-doctype-id.ts +10 -0
- package/src/constants/message-level-response-process-id.ts +9 -0
- package/src/constants/message-level-response-profile-id.ts +9 -0
- package/src/constants/participant-scheme.ts +10 -0
- package/src/constants/process-scheme.ts +9 -0
- package/src/constants/transport-profile.ts +10 -0
- package/src/invoice-response-codes/invoice-response-code-needs-schema.ts +9 -0
- package/src/invoice-response-codes/invoice-response-code-not-needs-schema.ts +9 -0
- package/src/invoice-response-codes/invoice-response-codes-order.ts +10 -0
- package/src/peppol-validations/add-piva.ts +12 -0
- package/src/peppol-validations/check-cf.ts +11 -0
- package/src/peppol-validations/check-cf16.ts +12 -0
- package/src/peppol-validations/check-piva-se-it.ts +11 -0
- package/src/peppol-validations/check-piva.ts +11 -0
- package/src/peppol-validations/check-se-orgnr.ts +9 -0
- package/src/peppol-validations/greek-tin-verification.ts +9 -0
- package/src/peppol-validations/is-valid-abn.ts +9 -0
- package/src/peppol-validations/is-valid-gln.ts +10 -0
- package/src/peppol-validations/is-valid-iban.ts +10 -0
- package/src/peppol-validations/is-valid-mod11.ts +9 -0
- package/src/peppol-validations/is-valid-mod97-0208.ts +10 -0
- package/src/peppol-validations/luhn-check.ts +9 -0
- package/src/schemas/fields/default-customization-id.ts +9 -0
- package/src/schemas/fields/default-profile-id.ts +9 -0
- package/src/schemas/fields/peppol-additional-document-reference-schema.ts +41 -2
- package/src/schemas/fields/peppol-address-schema.ts +25 -2
- package/src/schemas/fields/peppol-allowance-charge-schema.ts +65 -9
- package/src/schemas/fields/peppol-amount-schema.ts +15 -2
- package/src/schemas/fields/peppol-base-line-schema.ts +12 -2
- package/src/schemas/fields/peppol-billing-reference-schema.ts +13 -0
- package/src/schemas/fields/peppol-binary-object-schema.ts +12 -4
- package/src/schemas/fields/peppol-contact-schema.ts +11 -0
- package/src/schemas/fields/peppol-credit-note-line-schema.ts +7 -2
- package/src/schemas/fields/peppol-delivery-schema.ts +44 -2
- package/src/schemas/fields/peppol-identifier-schema.ts +8 -0
- package/src/schemas/fields/peppol-invoice-line-period-schema.ts +11 -0
- package/src/schemas/fields/peppol-invoice-line-schema.ts +9 -2
- package/src/schemas/fields/peppol-invoice-period-schema.ts +2 -2
- package/src/schemas/fields/peppol-item-classification-schema.ts +2 -2
- package/src/schemas/fields/peppol-line-allowance-charge-schema.ts +57 -9
- package/src/schemas/fields/peppol-line-item-schema.ts +69 -4
- package/src/schemas/fields/peppol-line-price-allowance-charge-schema.ts +20 -0
- package/src/schemas/fields/peppol-line-price-schema.ts +2 -0
- package/src/schemas/fields/peppol-order-reference-schema.ts +2 -0
- package/src/schemas/fields/peppol-party-base-schema.ts +36 -4
- package/src/schemas/fields/peppol-party-legal-entity-schema.ts +13 -0
- package/src/schemas/fields/peppol-party-tax-scheme-schema.ts +5 -0
- package/src/schemas/fields/peppol-payee-party-schema.ts +2 -2
- package/src/schemas/fields/peppol-payment-means-schema.ts +62 -2
- package/src/schemas/fields/peppol-payment-terms-schema.ts +2 -0
- package/src/schemas/fields/peppol-quantity-schema.ts +4 -2
- package/src/schemas/fields/peppol-reference-schema.ts +20 -1
- package/src/schemas/fields/peppol-tax-category-schema.ts +12 -2
- package/src/schemas/fields/peppol-tax-representative-schema.ts +5 -0
- package/src/schemas/fields/peppol-tax-subtotal-category-schema.ts +3 -0
- package/src/schemas/fields/peppol-tax-subtotal-schema.ts +2 -0
- package/src/schemas/fields/peppol-tax-totals-base-schema.ts +5 -0
- package/src/schemas/peppol-billing-base-schema.ts +47 -7
- package/src/schemas/peppol-credit-note-schema.ts +2 -2
- package/src/schemas/peppol-document-response-document-reference-schema.ts +15 -2
- package/src/schemas/peppol-document-response-document-schema.ts +8 -3
- package/src/schemas/peppol-document-response-line-response-content-schema.ts +22 -2
- package/src/schemas/peppol-document-response-line-response-schema.ts +26 -0
- package/src/schemas/peppol-document-schema.ts +74 -9
- package/src/schemas/peppol-invoice-response-document-actual-response-schema.ts +58 -5
- package/src/schemas/peppol-invoice-response-document-actual-response-status-schema.ts +25 -2
- package/src/schemas/peppol-invoice-response-schema.ts +57 -4
- package/src/schemas/peppol-invoice-response-status-reason-code-schema.ts +37 -10
- package/src/schemas/peppol-invoice-schema.ts +30 -2
- package/src/schemas/peppol-message-level-response-document-response-schema.ts +10 -0
- package/src/schemas/peppol-message-level-response-party-schema.ts +10 -0
- package/src/schemas/peppol-message-level-response-schema.ts +18 -0
- package/src/schemas/utils/format-quantity-with-unit.ts +19 -0
- package/src/schemas/utils/get-credit-note-type-code-description.ts +12 -0
- package/src/schemas/utils/get-invoice-type-code-description.ts +12 -0
- package/src/schemas/utils/is-valid-credit-note-type-code.ts +13 -0
- package/src/schemas/utils/is-valid-invoice-type-code.ts +13 -0
- package/src/schemas/utils/is-valid-process.ts +13 -0
- package/src/schemas/utils/peppol-base-64-schema.ts +14 -4
- package/src/schemas/utils/peppol-vat-regex-schema.ts +38 -30
- package/src/schemas/utils/peppol-xsd-time-schema.ts +12 -2
- package/src/schemas/utils/quantity-unit-code-to-intl-unit.ts +34 -0
- package/src/schemas/values/additional-document-reference-code-schema.ts +9 -15
- package/src/schemas/values/allowance-charge-reason-code-schema.ts +12 -14
- package/src/schemas/values/application-response-type-code-schema.ts +10 -14
- package/src/schemas/values/charge-reason-code-schema.ts +12 -14
- package/src/schemas/values/credit-note-type-code-schema.ts +8 -14
- package/src/schemas/values/currency-code-schema.ts +13 -16
- package/src/schemas/values/document-type-schemes-schema.ts +9 -5
- package/src/schemas/values/document-type-values-schema.ts +5 -6
- package/src/schemas/values/duty-tax-fee-category-schema.ts +15 -13
- package/src/schemas/values/electronic-codes-schema.ts +10 -12
- package/src/schemas/values/icd-codes-schema.ts +8 -12
- package/src/schemas/values/invoice-status-code-schema.ts +10 -12
- package/src/schemas/values/invoice-type-code-schema.ts +10 -12
- package/src/schemas/values/item-classification-codes-schema.ts +10 -12
- package/src/schemas/values/mime-codes-schema.ts +12 -14
- package/src/schemas/values/op-status-action-schema.ts +10 -12
- package/src/schemas/values/op-status-reason-schema.ts +10 -12
- package/src/schemas/values/participant-identifier-code-schema.ts +10 -13
- package/src/schemas/values/payment-means-code-schema.ts +10 -12
- package/src/schemas/values/peppol-country-code-schema.ts +10 -9
- package/src/schemas/values/peppol-document-type-code-schema.ts +10 -12
- package/src/schemas/values/peppol-document-type-schema.ts +12 -21
- package/src/schemas/values/peppol-process-schema.ts +19 -15
- package/src/schemas/values/process-from-document-type-schema.ts +3 -3
- package/src/schemas/values/quantity-unit-codes-schema.ts +10 -12
- package/src/schemas/values/vat-date-code-schema.ts +12 -5
- package/src/schemas/values/vatex-code-schema.ts +8 -12
- package/src/schematron/errors.ts +14 -0
- package/src/schematron/helpers.ts +451 -0
- package/src/schematron/run-all-rules.ts +10 -0
- package/src/schematron/schematron.ts +25 -0
- package/src/xml/builder-options.ts +9 -0
- package/src/xml/common-xml-options.ts +9 -0
- package/src/xml/nodable-parser.ts +12 -0
- package/src/xml/parser-options.ts +9 -0
- package/dist/index-BBzPjq7o.d.ts.map +0 -1
- package/dist/invoice-response-code-not-needs-schema-p_RKKNLc.js +0 -18
- package/dist/invoice-response-code-not-needs-schema-p_RKKNLc.js.map +0 -1
- package/dist/is-valid-abn-160i38PG.js.map +0 -1
- package/dist/is-valid-mod97-0208-CzMOXMO-.js.map +0 -1
- package/dist/message-level-response-profile-id-DBpOW91B.js +0 -9
- package/dist/message-level-response-profile-id-DBpOW91B.js.map +0 -1
- package/dist/nodable-parser-CyDZtLCK.js.map +0 -1
- package/dist/vat-dates.generated-CxFvt7m3.d.ts +0 -68
- package/dist/vat-dates.generated-CxFvt7m3.d.ts.map +0 -1
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["PeppolTaxSchemeId","PeppolPartyName","PeppolPartyLegalEntity","PeppolPartyIdentification","decodeTaxCategory","decodeTaxCategory","decodePartyLegalEntity","decodePartyLegalEntity","decodePartyName","decodeTaxCategory","decodePartyLegalEntity","decodeDocumentReference","decodeDocumentResponse","encodePartyLegalEntity","encodePartyName","encodePartyLegalEntity","encodePartyLegalEntity"],"sources":["../src/schemas/fields/default-customization-id.ts","../src/schemas/fields/default-profile-id.ts","../src/schemas/utils/peppol-base-64-schema.ts","../src/schemas/values/mime-codes-schema.ts","../src/schemas/fields/peppol-binary-object-schema.ts","../src/schemas/fields/peppol-identifier-schema.ts","../src/schemas/values/additional-document-reference-code-schema.ts","../src/schemas/fields/peppol-additional-document-reference-schema.ts","../src/schemas/values/currency-code-schema.ts","../src/schemas/fields/peppol-amount-schema.ts","../src/schemas/fields/peppol-line-price-allowance-charge-schema.ts","../src/schemas/values/allowance-charge-reason-code-schema.ts","../src/schemas/values/charge-reason-code-schema.ts","../src/schemas/fields/peppol-line-allowance-charge-schema.ts","../src/schemas/values/duty-tax-fee-category-schema.ts","../src/schemas/fields/peppol-tax-category-schema.ts","../src/schemas/fields/peppol-allowance-charge-schema.ts","../src/schemas/fields/peppol-billing-reference-schema.ts","../src/schemas/values/icd-codes-schema.ts","../src/schemas/values/peppol-country-code-schema.ts","../src/schemas/fields/peppol-address-schema.ts","../src/schemas/fields/peppol-delivery-schema.ts","../src/schemas/fields/peppol-invoice-line-period-schema.ts","../src/schemas/values/vat-date-code-schema.ts","../src/schemas/fields/peppol-invoice-period-schema.ts","../src/schemas/fields/peppol-legal-monetary-total-schema.ts","../src/schemas/fields/peppol-order-reference-schema.ts","../src/schemas/fields/peppol-contact-schema.ts","../src/schemas/fields/peppol-party-legal-entity-schema.ts","../src/schemas/fields/peppol-party-tax-scheme-schema.ts","../src/schemas/values/electronic-codes-schema.ts","../src/schemas/fields/peppol-party-base-schema.ts","../src/schemas/fields/peppol-payee-party-schema.ts","../src/schemas/values/payment-means-code-schema.ts","../src/schemas/fields/peppol-payment-means-schema.ts","../src/schemas/fields/peppol-payment-terms-schema.ts","../src/schemas/fields/peppol-tax-representative-schema.ts","../src/schemas/fields/peppol-tax-subtotal-category-schema.ts","../src/schemas/fields/peppol-tax-subtotal-schema.ts","../src/schemas/fields/peppol-tax-totals-base-schema.ts","../src/schemas/peppol-billing-base-schema.ts","../src/schemas/values/item-classification-codes-schema.ts","../src/schemas/fields/peppol-item-classification-schema.ts","../src/schemas/fields/peppol-line-item-schema.ts","../src/schemas/values/quantity-unit-codes-schema.ts","../src/schemas/fields/peppol-quantity-schema.ts","../src/schemas/fields/peppol-line-price-schema.ts","../src/schemas/fields/peppol-base-line-schema.ts","../src/schemas/fields/peppol-invoice-line-schema.ts","../src/schemas/values/invoice-type-code-schema.ts","../src/schemas/peppol-invoice-schema.ts","../src/schemas/fields/peppol-credit-note-line-schema.ts","../src/schemas/values/credit-note-type-code-schema.ts","../src/schemas/peppol-credit-note-schema.ts","../src/schemas/peppol-message-level-response-party-schema.ts","../src/schemas/values/peppol-document-type-code-schema.ts","../src/schemas/peppol-document-response-document-reference-schema.ts","../src/schemas/values/application-response-type-code-schema.ts","../src/schemas/peppol-document-response-document-schema.ts","../src/schemas/peppol-document-response-line-response-content-schema.ts","../src/schemas/peppol-document-response-line-response-schema.ts","../src/schemas/peppol-message-level-response-document-response-schema.ts","../src/schemas/utils/format-xsd-time.ts","../src/schemas/utils/peppol-xsd-time-schema.ts","../src/schemas/peppol-message-level-response-schema.ts","../src/schemas/values/op-status-action-schema.ts","../src/schemas/values/op-status-reason-schema.ts","../src/schemas/peppol-invoice-response-status-reason-code-schema.ts","../src/schemas/peppol-invoice-response-document-actual-response-status-schema.ts","../src/schemas/peppol-invoice-response-document-actual-response-schema.ts","../src/schemas/peppol-invoice-response-schema.ts","../src/helpers/get-prop.ts","../src/helpers/str-or-und.ts","../src/decoders/fields/decode-identifier.ts","../src/helpers/get-array.ts","../src/decoders/fields/decode-additional-document-references.ts","../src/decoders/fields/decode-amount.ts","../src/helpers/bool.ts","../src/helpers/num-or-und.ts","../src/decoders/fields/decode-base-allowance-charge.ts","../src/decoders/fields/decode-node-list.ts","../src/decoders/fields/decode-simple-identifier.ts","../src/decoders/fields/decode-tax-category.ts","../src/decoders/fields/decode-allowance-charges.ts","../src/decoders/fields/decode-billing-references.ts","../src/decoders/fields/decode-address.ts","../src/decoders/fields/decode-delivery.ts","../src/decoders/fields/decode-invoice-period.ts","../src/decoders/fields/decode-legal-monetary-total.ts","../src/decoders/fields/decode-order-reference.ts","../src/decoders/fields/decode-contact.ts","../src/decoders/fields/decode-electronic-address.ts","../src/decoders/fields/decode-party-tax-scheme.ts","../src/decoders/fields/decode-parties-tax-scheme.ts","../src/decoders/fields/decode-party-legal-entity.ts","../src/decoders/fields/decode-party.ts","../src/decoders/fields/decode-payee-party.ts","../src/decoders/fields/decode-payment-means.ts","../src/decoders/fields/decode-payment-terms.ts","../src/decoders/fields/decode-tax-representative-party.ts","../src/decoders/fields/decode-tax-totals.ts","../src/decoders/decode-billing.ts","../src/decoders/fields/decode-invoice-line-period.ts","../src/decoders/fields/decode-line-allowance-charges.ts","../src/decoders/fields/decode-price-allowance-charge.ts","../src/decoders/fields/decode-quantity.ts","../src/decoders/fields/decode-line-price.ts","../src/decoders/fields/decode-line-shared.ts","../src/decoders/fields/decode-credit-note-lines.ts","../src/decoders/decode-credit-note.ts","../src/decoders/fields/decode-application-response.ts","../src/decoders/fields/decode-invoice-message-document-party.ts","../src/decoders/fields/decode-invoice-message-party.ts","../src/decoders/decode-invoice-response.ts","../src/decoders/fields/decode-invoice-lines.ts","../src/decoders/decode-invoice.ts","../src/decoders/fields/decode-message-level-party.ts","../src/decoders/decode-message-level-response.ts","../src/decoders/fields/encode-identifier.ts","../src/decoders/fields/encode-additional-document-references.ts","../src/decoders/fields/encode-amount.ts","../src/decoders/fields/encode-simple-identifier.ts","../src/decoders/fields/encode-tax-category.ts","../src/decoders/fields/encode-allowance-charges.ts","../src/decoders/fields/encode-billing-references.ts","../src/decoders/fields/encode-invoice-line-period.ts","../src/decoders/fields/encode-line-allowance-charges.ts","../src/decoders/fields/encode-price-allowance-charges.ts","../src/decoders/fields/encode-quantity.ts","../src/decoders/fields/encode-line-price.ts","../src/decoders/fields/encode-line-shared.ts","../src/decoders/fields/encode-credit-note-lines.ts","../src/decoders/fields/encode-address.ts","../src/decoders/fields/encode-delivery.ts","../src/decoders/fields/encode-invoice-period.ts","../src/decoders/fields/encode-legal-monetary-total.ts","../src/decoders/fields/encode-order-reference.ts","../src/decoders/fields/encode-contact.ts","../src/decoders/fields/encode-party-tax-scheme.ts","../src/decoders/fields/encode-parties-tax-scheme.ts","../src/decoders/fields/encode-party-legal-entity.ts","../src/decoders/fields/encode-party.ts","../src/decoders/fields/encode-payee-party.ts","../src/decoders/fields/encode-payment-means.ts","../src/decoders/fields/encode-payment-terms.ts","../src/decoders/fields/encode-tax-representative-party.ts","../src/decoders/fields/encode-tax-totals.ts","../src/decoders/encode-credit-note.ts","../src/decoders/fields/encode-message-party.ts","../src/decoders/encode-invoice-response.ts","../src/decoders/fields/encode-invoice-lines.ts","../src/decoders/encode-invoice.ts","../src/decoders/encode-message-level-response.ts","../src/schemas/peppol-document-schema.ts","../src/schemas/fields/peppol-reference-schema.ts","../src/schemas/utils/quantity-unit-code-to-intl-unit.ts","../src/schemas/utils/format-quantity-with-unit.ts","../src/schemas/utils/get-credit-note-type-code-description.ts","../src/schemas/utils/get-invoice-type-code-description.ts","../src/schemas/utils/is-valid-credit-note-type-code.ts","../src/schemas/utils/is-valid-invoice-type-code.ts","../src/schemas/utils/is-valid-process.ts","../src/schemas/utils/peppol-vat-regex-schema.ts","../src/schemas/values/peppol-document-type-schema.ts","../src/schemas/values/document-type-schemes-schema.ts","../src/schemas/values/document-type-values-schema.ts","../src/schemas/values/invoice-status-code-schema.ts","../src/schemas/values/participant-identifier-code-schema.ts","../src/schemas/values/peppol-process-schema.ts","../src/schemas/values/process-from-document-type-schema.ts","../src/schemas/values/vatex-code-schema.ts"],"sourcesContent":["export const DEFAULT_CUSTOMIZATION_ID = 'urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0' as const;\n","export const DEFAULT_PROFILE_ID = 'urn:fdc:peppol.eu:2017:poacc:billing:01:1.0' as const;\n","import { Schema } from 'effect';\n\n// RFC 4648 §4 — Base 64 Encoding\n//\n// Alphabet: A-Z a-z 0-9 + / (pad: =)\n// Encoding quanta: 4 characters represent 3 bytes.\n// Padding rules (only at the very end):\n// • 0 pad chars → last quantum is xxxx (input length % 3 === 0)\n// • 1 pad char → last quantum is xxx= (input length % 3 === 2)\n// • 2 pad chars → last quantum is xx== (input length % 3 === 1)\n//\n// §3.1: CRLF / LF line endings are treated as non-alphabet characters\n// and stripped before validation (as in PEM / MIME / XML).\n// §3.3: Implementations MUST reject data with non-alphabet characters\n// (other than the allowed line endings stripped above).\n//\n// The regex below encodes all three quantum variants in a single pass:\n// ([A-Za-z0-9+/]{4})* — zero or more full quanta (no padding)\n// followed by one of:\n// [A-Za-z0-9+/]{2}== — 2-pad quantum (1 remaining input byte)\n// [A-Za-z0-9+/]{3}= — 1-pad quantum (2 remaining input bytes)\n// (empty) — no trailing partial quantum\nconst BASE64_RE = /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/;\n\n/**\n * @description RFC 4648 base64 string (PEM / MIME / XML line endings tolerated). Effect port of `base64Schema` (`z.string().check(z.refine(...))`): strips CRLF /\n * LF line endings before testing the quantum regex.\n */\nexport const peppolBase64Schema = Schema.String.check(Schema.makeFilter((val: string) => BASE64_RE.test(val.replace(/\\r?\\n/g, '')))).annotate({\n message: 'Invalid base64',\n});\n\nexport type Base64 = typeof peppolBase64Schema.Type;\n","import { Schema } from 'effect';\n\nimport { mimeCodesKeys } from '#/values/mime-codes.generated';\n\n/**\n * @description A MIME media type code (e.g. `application/pdf`) as used for attached documents.\n *\n * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/MimeCode/\n */\nexport type PeppolMimeCode = typeof mimeCodesSchema.Type;\n\n/**\n * @description Validates a MIME media type against the PEPPOL MIME code list.\n *\n * @param error - The custom error message to use when validation fails.\n *\n * @returns An Effect schema that accepts only valid MIME types.\n *\n * @validations\n * - PEPPOL-EN16931-CL001: Attachment (MIME) type MUST come from the allowed list.\n *\n * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/MimeCode/\n */\nexport const mimeCodesSchema = Schema.Literals(mimeCodesKeys)\n .pipe(Schema.brand('PeppolMimeCode'))\n .annotate({ documentation: 'PEPPOL-EN16931-CL001: Mime code must be according to subset of IANA code list.' });\n","import { Schema } from 'effect';\n\nimport { opaque } from '#/schemas/utils/opaque.ts';\nimport { peppolBase64Schema } from '#/schemas/utils/peppol-base-64-schema.ts';\nimport { mimeCodesSchema } from '#/schemas/values/mime-codes-schema.ts';\n\n// RFC 4648 §5 — Base64url Encoding: URL/file-safe alphabet (A-Z a-z 0-9 - _), optional `=` padding.\n// Effect port of `z.base64url()`: keeps the value as a plain string and only validates the shape.\nconst base64UrlSchema = Schema.String.check(Schema.isPattern(/^[A-Za-z0-9\\-_]+={0,2}$/)).annotate({ message: 'Invalid base64url' });\n\n/**\n * @summary Binary object for attachments\n *\n * @name cbc:EmbeddedDocumentBinaryObject (+ @mimeCode, @filename)\n */\nexport class PeppolBinaryObject extends opaque<PeppolBinaryObject>()(\n Schema.Struct({\n /**\n * @description An attached document embedded as binary object (Base64) or sent together with the invoice.\n *\n * @example\n * aHR0cHM6Ly90ZXN0LXZlZmEuZGlmaS5uby9wZXBwb2xiaXMvcG9hY2MvYmlsbGluZy8zLjAvYmlzLw==\n *\n * @summary Attached document\n *\n * @name `#text` (Base64 content)\n */\n content: Schema.Union([peppolBase64Schema, base64UrlSchema]),\n /**\n * @description The mime code of the attached document.\n *\n * @example\n * text / csv;\n *\n * @summary Attached document Mime code\n *\n * @name `@mimeCode`\n */\n mimeCode: mimeCodesSchema,\n /**\n * @description The file name of the attached document.\n *\n * @example\n * Hours - spent.csv;\n *\n * @summary Attached document Filename\n *\n * @name `@filename`\n */\n filename: Schema.String,\n })\n) {}\n","import { Schema } from 'effect';\n\nimport { opaque } from '#/schemas/utils/opaque.ts';\n\n/**\n * @summary Identifier with optional scheme\n *\n * @name `cbc:ID (+ optional @schemeID)`\n */\nexport class PeppolIdentifier extends opaque<PeppolIdentifier>()(\n Schema.Struct({\n /**\n * @name cbc:ID\n */\n id: Schema.String,\n /**\n * @name `@schemeID`\n */\n schemeId: Schema.optional(Schema.String),\n })\n) {}\n","import { Schema } from 'effect';\n\nimport { additionalDocumentReferenceCodesKeys } from '#/values/additional-document-reference-codes.generated';\n\n/**\n * @description Additional document reference.\n *\n * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/UNCL1153/\n * @see {@link additionalDocumentReferenceCodesKeys}\n */\nexport type PeppolAdditionalDocumentReferenceCode = typeof additionalDocumentReferenceCodeSchema.Type;\n\n/**\n * @description Validates an additional document reference code against the PEPPOL subset of UNCL 1153 (reference qualifiers).\n *\n * @param error - The custom error message to use when validation fails. Defaults to the generic message.\n *\n * @returns An Effect schema that accepts only valid additional document reference codes.\n *\n * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/UNCL1153/\n * @see {@link additionalDocumentReferenceCodesKeys}\n */\nexport const additionalDocumentReferenceCodeSchema = Schema.Literals(additionalDocumentReferenceCodesKeys).pipe(\n Schema.brand('PeppolAdditionalDocumentReferenceCode')\n);\n","import { Schema } from 'effect';\n\nimport { PeppolBinaryObject } from '#/schemas/fields/peppol-binary-object-schema.ts';\nimport { PeppolIdentifier } from '#/schemas/fields/peppol-identifier-schema.ts';\nimport { opaque } from '#/schemas/utils/opaque.ts';\nimport { additionalDocumentReferenceCodeSchema } from '#/schemas/values/additional-document-reference-code-schema.ts';\n\nexport class PeppolAttachmentExternalReference extends opaque<PeppolAttachmentExternalReference>()(\n Schema.Struct({\n /**\n * @description The URL (Uniform Resource Locator) that identifies where the external document is located. A means of locating the resource, including its\n * primary access mechanism, e.g. http:// or ftp://.\n *\n * @example\n * `http://www.example.com/index.html`;\n *\n * @summary External document location\n *\n * @name `cbc:URI`\n */\n uri: Schema.String,\n })\n) {}\n\nexport class PeppolAttachment extends opaque<PeppolAttachment>()(\n Schema.Struct({\n /**\n * @description An attached document embedded as binary object (Base64) or sent together with the invoice.\n *\n * @example\n * ```base64\n * aHR0cHM6Ly90ZXN0LXZlZmEuZGlmaS5uby9wZXBwb2xiaXMvcG9hY2MvYmlsbGluZy8zLjAvYmlzLw==\n * ```;\n *\n * @summary Attached document\n *\n * @name `cbc:EmbeddedDocumentBinaryObject`\n */\n embeddedDocumentBinaryObject: Schema.optional(PeppolBinaryObject),\n /**\n * @summary EXTERNAL REFERENCE\n *\n * @name `cac:ExternalReference`\n */\n externalReference: Schema.optional(PeppolAttachmentExternalReference),\n })\n) {}\n\nexport class PeppolId extends opaque<PeppolId>()(\n Schema.Struct({\n /**\n * @description An identifier for an object on which the invoice is based (with DocumentTypeCode=130), given by the Seller, the identifier for the supporting\n * document or the project reference identifier (DocumentTypeCode=50).\n *\n * @summary Invoiced object identifier, Supporting document reference or project reference\n *\n * @name `#text`\n */\n id: Schema.String,\n /**\n * @description The identification scheme identifier of the Invoiced object identifier.\n *\n * @summary Scheme identifier\n *\n * @name `@schemeID`\n */\n schemeId: Schema.optional(additionalDocumentReferenceCodeSchema),\n })\n) {}\n\n/**\n * @description A group of business terms providing information about additional supporting documents substantiating the claims made in the Invoice. The additional\n * supporting documents can be used for both referencing a document number which is expected to be known by the receiver, an external document\n * (referenced by a URL) or as an embedded document, Base64 encoded (such as a time report).\n *\n * @summary ADDITIONAL SUPPORTING DOCUMENTS\n *\n * @name `cac:AdditionalDocumentReference`\n */\nexport class PeppolAdditionalDocumentReference extends opaque<PeppolAdditionalDocumentReference>()(\n PeppolIdentifier.pipe(\n Schema.fieldsAssign({\n /**\n * @description An identifier for an object on which the invoice is based (with DocumentTypeCode=130), given by the Seller, the identifier for the supporting\n * document or the project reference identifier (DocumentTypeCode=50).\n *\n * @summary Invoiced object identifier, Supporting document reference or project reference\n *\n * @name `cbc:ID`\n */\n id: PeppolId,\n /**\n * @remarks\n * Code \"130\" MUST be used to indicate an invoice object reference and code \"50\" for project reference. Element is not used for other\n * additional documents.\n *\n * @default 130\n *\n * @summary Document type code\n *\n * @name `cbc:DocumentTypeCode`\n */\n documentTypeCode: Schema.optional(Schema.String),\n /**\n * @description A description of the supporting document, such as timesheet, usage report, etc.\n *\n * @example\n * Time list\n *\n * @summary Supporting document description\n *\n * @name `cbc:DocumentDescription`\n */\n documentDescription: Schema.optional(Schema.String),\n /**\n * @summary Attachment\n *\n * @name `cac:Attachment`\n */\n attachment: Schema.optional(PeppolAttachment),\n })\n )\n) {}\n","/**\n * @description Currency codes as defined by ISO 4217.\n *\n * @see https://www.iso.org/iso-4217-currency-codes.html\n * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/ISO4217/\n */\n\nimport { Schema } from 'effect';\n\nimport { currencyCodesKeys } from '#/values/currency-code.generated';\n\n/**\n * @description An ISO 4217 currency code as defined by the PEPPOL subset.\n *\n * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/ISO4217/\n */\nexport type PeppolCurrencyCode = Schema.Schema.Type<typeof currencyCodeSchema>;\n/**\n * @description An ISO 4217 currency code as defined by the PEPPOL subset.\n *\n * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/ISO4217/\n */\nexport type PeppolCurrencyCodeEncoded = Schema.Codec.Encoded<typeof currencyCodeSchema>;\n\n/**\n * @description Validates an ISO 4217 currency code against the PEPPOL codelist.\n *\n * @param error - The custom error message to use when validation fails.\n *\n * @returns An Effect schema that accepts only valid currency codes.\n *\n * @validations\n * - PEPPOL-EN16931-CL007: Currency codes MUST be valid ISO 4217 codes.\n *\n * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/ISO4217/\n */\nexport const currencyCodeSchema = Schema.Literals(currencyCodesKeys).pipe(Schema.brand('PeppolCurrencyCode'));\n","import { Schema } from 'effect';\n\nimport { opaque } from '#/schemas/utils/opaque.ts';\nimport { currencyCodeSchema } from '#/schemas/values/currency-code-schema.ts';\n\n/**\n * @summary Monetary amount with mandatory currency\n *\n * @name cbc:* (+ @currencyID)\n */\nexport class PeppolAmount extends opaque<PeppolAmount>()(\n Schema.Struct({\n /**\n * @name \\@currencyID\n */\n currencyId: currencyCodeSchema,\n /**\n * @name #text (value)\n */\n value: Schema.Finite,\n })\n) {}\nexport interface PeppolAmountEncoded extends Schema.Codec.Encoded<typeof PeppolAmount> {}\n","import { Schema } from 'effect';\n\nimport { PeppolAmount } from '#/schemas/fields/peppol-amount-schema.ts';\nimport { opaque } from '#/schemas/utils/opaque.ts';\n\nclass PriceAllowanceCharge extends opaque<PriceAllowanceCharge>()(\n Schema.Struct({\n /**\n * @example\n * 200;\n *\n * @name cbc:Amount (+ @currencyID)\n */\n amount: PeppolAmount,\n /**\n * @example\n * 1000;\n *\n * @name cbc:BaseAmount (+ @currencyID)\n */\n baseAmount: Schema.optional(PeppolAmount),\n /**\n * @name cbc:ChargeIndicator\n *\n * @value false\n */\n chargeIndicator: Schema.Boolean,\n })\n) {}\n\nexport class PeppolLinePriceAllowanceCharge extends opaque<PeppolLinePriceAllowanceCharge>()(\n PriceAllowanceCharge.pipe(\n Schema.fieldsAssign({\n chargeIndicator: Schema.Literal(false).annotate({\n message: \"PEPPOL-EN16931-R044: Charge on price level is NOT allowed. Only value 'false' allowed.\",\n }),\n })\n )\n) {}\n\nexport { PriceAllowanceCharge };\n","import { Schema } from 'effect';\n\nimport { allowanceChargeReasonCodesKeys } from '#/values/allowance-charge-reason-codes.generated';\n\n/**\n * @description An allowance or charge reason code as defined by the PEPPOL subset of UNCL 5189.\n *\n * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/UNCL5189/\n */\nexport type PeppolAllowanceChargeReasonCode = typeof allowanceChargeReasonCodeSchema.Type;\n\n/**\n * @description Validates an allowance or charge reason code against the PEPPOL subset of UNCL 5189 (D.16B).\n *\n * @param error - The custom error message to use when validation fails.\n *\n * @returns An Effect schema that accepts only valid allowance/charge reason codes.\n *\n * @validations\n * - PEPPOL-EN16931-CL002: Document allowance reason code MUST be according to the subset of UNCL 5189 D.16B.\n *\n * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/UNCL5189/\n */\nexport const allowanceChargeReasonCodeSchema = Schema.Literals(allowanceChargeReasonCodesKeys)\n .pipe(Schema.brand('PeppolAllowanceChargeReasonCode'))\n .annotate({ documentation: 'PEPPOL-EN16931-CL002: Reason code MUST be according to subset of UNCL 5189 D.16B.' });\n","import { Schema } from 'effect';\n\nimport { chargeReasonCodesKeys } from '#/values/charge-reason-codes.generated';\n\n/**\n * @description A charge reason code as defined by the PEPPOL subset of UNCL 7161.\n *\n * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/UNCL7161/\n */\nexport type PeppolChargeReasonCode = typeof chargeReasonCodeSchema.Type;\n\n/**\n * @description Validates a charge reason code against the PEPPOL subset of UNCL 7161 (D.16B).\n *\n * @param error - The custom error message to use when validation fails.\n *\n * @returns An Effect schema that accepts only valid charge reason codes.\n *\n * @validations\n * - PEPPOL-EN16931-CL003: Charge reason code MUST be according to UNCL 7161 D.16B.\n *\n * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/UNCL7161/\n */\nexport const chargeReasonCodeSchema = Schema.Literals(chargeReasonCodesKeys)\n .pipe(Schema.brand('PeppolChargeReasonCode'))\n .annotate({ documentation: 'PEPPOL-EN16931-CL003: Reason code MUST be according to UNCL 7161 D.16B.' });\n","import { Schema } from 'effect';\n\nimport { PriceAllowanceCharge } from '#/schemas/fields/peppol-line-price-allowance-charge-schema.ts';\nimport { opaque } from '#/schemas/utils/opaque.ts';\nimport { allowanceChargeReasonCodeSchema } from '#/schemas/values/allowance-charge-reason-code-schema.ts';\nimport { chargeReasonCodeSchema } from '#/schemas/values/charge-reason-code-schema.ts';\n\nexport class BaseLineAllowanceCharge extends opaque<BaseLineAllowanceCharge>()(\n Schema.Struct({\n ...PriceAllowanceCharge.fields /**\n * @example\n * Discount;\n *\n * @name cbc:AllowanceChargeReason\n */,\n allowanceChargeReason: Schema.optional(Schema.String),\n /**\n * @example\n * 20;\n *\n * @name cbc:MultiplierFactorNumeric\n */\n multiplierFactorNumeric: Schema.optional(Schema.Finite),\n })\n) {}\n\nexport class PeppolLineAllowance extends opaque<PeppolLineAllowance>()(\n Schema.Struct({\n ...BaseLineAllowanceCharge.fields,\n /**\n * @name cbc:AllowanceChargeReasonCode\n */\n allowanceChargeReasonCode: Schema.optional(allowanceChargeReasonCodeSchema),\n /**\n * @name cbc:ChargeIndicator\n *\n * @value `false`\n */\n chargeIndicator: Schema.Literal(false).annotate({\n message: \"PEPPOL-EN16931-R043: Allowance/charge ChargeIndicator value MUST equal 'true' or 'false'\",\n }),\n })\n) {}\n\nexport class PeppolLineCharge extends opaque<PeppolLineCharge>()(\n Schema.Struct({\n ...BaseLineAllowanceCharge.fields,\n /**\n * @name cbc:AllowanceChargeReasonCode\n */\n allowanceChargeReasonCode: Schema.optional(chargeReasonCodeSchema),\n /**\n * @name cbc:ChargeIndicator\n *\n * @value `true`\n */\n chargeIndicator: Schema.Literal(true).annotate({\n message: \"PEPPOL-EN16931-R043: Allowance/charge ChargeIndicator value MUST equal 'true' or 'false'\",\n }),\n })\n) {}\n\nexport const peppolLineAllowanceChargeSchema = Schema.Union([PeppolLineAllowance, PeppolLineCharge]).annotate({\n message: 'unable to decode line allowance charge',\n});\n\nexport type PeppolLineAllowanceCharge = typeof peppolLineAllowanceChargeSchema.Type;\nexport type PeppolLineAllowanceChargeEncoded = typeof peppolLineAllowanceChargeSchema.Encoded;\n","import { Schema } from 'effect';\n\nimport { dutyTaxFeeCategoriesKeys } from '#/values/duty-tax-fee-categories.generated';\n\n/**\n * @description A duty, tax or fee category code as defined by the PEPPOL subset of UNCL 5305 (VAT category code).\n *\n * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/UNCL5305/\n */\nexport type PeppolDutyTaxFeeCategoryCode = typeof peppolDutyTaxFeeCategorySchema.Type;\nexport type PeppolDutyTaxFeeCategoryCodeEncoded = typeof peppolDutyTaxFeeCategorySchema.Encoded;\n\n/**\n * @description Validates a duty, tax or fee category code against the PEPPOL subset of UNCL 5305 (VAT category code).\n *\n * @param error - The custom error message to use when validation fails.\n *\n * @returns An Effect schema that accepts only valid duty/tax/fee category codes.\n *\n * @validations\n * - BR-CL-17 / BR-CL-18: VAT category code MUST be a valid UNCL 5305 code.\n *\n * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/UNCL5305/\n */\nexport const peppolDutyTaxFeeCategorySchema = Schema.Literals(dutyTaxFeeCategoriesKeys).pipe(Schema.brand('PeppolDutyTaxFeeCategoryCode'));\n","import { Effect, Schema } from 'effect';\n\nimport { opaque } from '#/schemas/utils/opaque.ts';\nimport { peppolDutyTaxFeeCategorySchema } from '#/schemas/values/duty-tax-fee-category-schema.ts';\n\nexport class PeppolTaxSchemeId extends opaque<PeppolTaxSchemeId>()(\n Schema.Struct({\n /**\n * @name `cbc:ID`\n */\n id: Schema.String.pipe(Schema.withDecodingDefaultType(Effect.succeed('VAT'))),\n })\n) {}\n\n/**\n * @description A group of business terms providing information about the VAT applicable for the goods and services invoiced on the Invoice line.\n *\n * @summary LINE VAT INFORMATION\n *\n * @name `cac:TaxCategory`\n */\nexport class PeppolTaxCategory extends opaque<PeppolTaxCategory>()(\n Schema.Struct({\n /**\n * @description The VAT category code for the invoiced item.\n *\n * @summary Invoiced item VAT category code\n *\n * @name `cbc:ID`\n */\n id: peppolDutyTaxFeeCategorySchema,\n /**\n * @description The VAT rate, represented as percentage that applies to the invoiced item.\n *\n * @summary Invoiced item VAT rate\n *\n * @name `cbc:Percent`\n */\n percent: Schema.optional(Schema.Finite),\n /**\n * @default VAT\n *\n * @name `cac:TaxScheme`\n */\n taxSchemeId: PeppolTaxSchemeId,\n })\n) {}\n","import { Effect, Schema } from 'effect';\n\nimport { BaseLineAllowanceCharge } from '#/schemas/fields/peppol-line-allowance-charge-schema.ts';\nimport { PeppolTaxCategory } from '#/schemas/fields/peppol-tax-category-schema.ts';\nimport { opaque } from '#/schemas/utils/opaque.ts';\nimport { allowanceChargeReasonCodeSchema } from '#/schemas/values/allowance-charge-reason-code-schema.ts';\nimport { chargeReasonCodeSchema } from '#/schemas/values/charge-reason-code-schema.ts';\nimport { peppolDutyTaxFeeCategorySchema } from '#/schemas/values/duty-tax-fee-category-schema.ts';\n\nexport class PeppolTaxCategoryTaxSchemeId extends opaque<PeppolTaxCategoryTaxSchemeId>()(\n Schema.Struct({\n /**\n * @description Mandatory element. Use \"VAT\"\n *\n * @name `cbc:ID`\n */\n id: Schema.String.pipe(Schema.withDecodingDefaultType(Effect.succeed('VAT'))),\n })\n) {}\n\nexport class BaseAllowanceCharge extends opaque<BaseAllowanceCharge>()(\n Schema.Struct({\n ...BaseLineAllowanceCharge.fields,\n /**\n * @summary TAX CATEGORY\n *\n * @name cac:TaxCategory\n */\n taxCategory: Schema.optional(\n PeppolTaxCategory.pipe(\n Schema.fieldsAssign({\n /**\n * @description A coded identification of what VAT category applies to the document level allowance or charge.\n *\n * @summary Document level allowance or charge VAT category code\n *\n * @name `cbc:ID`\n */\n id: peppolDutyTaxFeeCategorySchema,\n /**\n * @description The VAT rate, represented as percentage that applies to the document level allowance or charge.\n *\n * @summary Document level allowance or charge VAT rate\n *\n * @name `cbc:Percent`\n */\n percent: Schema.optional(Schema.Finite),\n /**\n * @default VAT\n *\n * @name `cac:TaxScheme`\n */\n taxSchemeId: PeppolTaxCategoryTaxSchemeId,\n })\n )\n ),\n })\n) {}\n\nexport class PeppolAllowance extends opaque<PeppolAllowance>()(\n Schema.Struct({\n ...BaseAllowanceCharge.fields,\n /**\n * @name cbc:AllowanceChargeReasonCode\n */\n allowanceChargeReasonCode: Schema.optional(allowanceChargeReasonCodeSchema),\n /**\n * @name cbc:ChargeIndicator\n *\n * @value `false`\n */\n chargeIndicator: Schema.Literal(false).annotate({\n message: \"PEPPOL-EN16931-R043: Allowance/charge ChargeIndicator value MUST equal 'true' or 'false'\",\n }),\n })\n) {}\n\nexport class PeppolCharge extends opaque<PeppolCharge>()(\n Schema.Struct({\n ...BaseAllowanceCharge.fields,\n /**\n * @name cbc:AllowanceChargeReasonCode\n */\n allowanceChargeReasonCode: Schema.optional(chargeReasonCodeSchema),\n /**\n * @name cbc:ChargeIndicator\n *\n * @value `true`\n */\n chargeIndicator: Schema.Literal(true).annotate({\n message: \"PEPPOL-EN16931-R043: Allowance/charge ChargeIndicator value MUST equal 'true' or 'false'\",\n }),\n })\n) {}\n\n/**\n * @summary Allowance/Charge\n *\n * @name cac:AllowanceCharge\n */\nexport const peppolAllowanceChargeSchema = Schema.Union([PeppolAllowance, PeppolCharge]).annotate({ message: 'unable to decode allowance charge' });\n\nexport type PeppolAllowanceCharge = Schema.Schema.Type<typeof peppolAllowanceChargeSchema>;\nexport type PeppolAllowanceChargeEncoded = Schema.Codec.Encoded<typeof peppolAllowanceChargeSchema>;\n","import { Schema } from 'effect';\n\nimport { PeppolIsoDateString } from '#/schemas/peppol-iso-date-string.ts';\nimport { opaque } from '#/schemas/utils/opaque.ts';\n\nexport class PeppolInvoiceDocumentReference extends opaque<PeppolInvoiceDocumentReference>()(\n Schema.Struct({\n /**\n * @description The identification of an Invoice that was previously sent by the seller.\n *\n * @example\n * `inv123`;\n *\n * @summary Preceding invoice number\n *\n * @name `cbc:ID`\n */\n id: Schema.String,\n /**\n * @description The date when the preceding invoice was issued. Shall be provided in case the preceding invoice identifier is not unique.\n *\n * @example\n * `2017-09-15`;\n *\n * @summary Preceding invoice issue date\n *\n * @format `YYYY-MM-DD`\n *\n * @name `cbc:IssueDate`\n */\n issueDate: Schema.optional(PeppolIsoDateString),\n })\n) {}\n\n/**\n * @summary PRECEDING INVOICE REFERENCE (0..n)\n *\n * @name cac:BillingReference\n */\nexport class PeppolBillingReference extends opaque<PeppolBillingReference>()(\n Schema.Struct({\n /**\n * @example\n * inv123;\n *\n * @summary INVOICE DOCUMENT REFERENCE\n *\n * @name `cac:InvoiceDocumentReference`\n */\n invoiceDocumentReference: PeppolInvoiceDocumentReference,\n })\n) {}\n","import { Schema } from 'effect';\n\nimport { icdCodesKeys } from '#/values/icd-codes.generated';\n\n/**\n * @description An ISO 6523 ICD (International Code Designator) code identifying an identifier scheme.\n *\n * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/ICD/\n */\nexport type PeppolIcdCode = typeof icdCodesSchema.Type;\n\n/**\n * @description Validates an ISO 6523 ICD code against the PEPPOL codelist.\n *\n * @param error - The custom error message to use when validation fails. Defaults to `'Invalid ICD code provided'`.\n *\n * @returns An Effect schema that accepts only valid ICD codes.\n *\n * @validations\n * - BR-CL-10 / BR-CL-11 / BR-CL-21: Identifier scheme MUST be a valid ISO 6523 ICD code.\n *\n * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/ICD/\n */\nexport const icdCodesSchema = Schema.Literals(icdCodesKeys).pipe(Schema.brand('PeppolIcdCode'));\n","/**\n * @description ISO 3166-1 alpha-2 country codes with additional entries These codes identify countries and territories worldwide.\n *\n * @module effect/values/country-code\n *\n * @see https://www.iso.org/iso-3166-country-codes.html\n * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/ISO3166/\n */\n\nimport { Schema } from 'effect';\n\nimport { countryCodesKeys } from '#/values/country-code.generated';\n\n/**\n * @description An ISO 3166-1 alpha-2 country code as defined by the PEPPOL subset.\n *\n * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/ISO3166/\n */\nexport type PeppolCountryCode = typeof peppolCountryCodeSchema.Type;\n\n/**\n * @description Validates a two character ISO 3166-1 alpha-2 country code against the PEPPOL codelist. All codes in the codelist are exactly 2 characters, so the\n * literals union implies the length check.\n *\n * @validations\n * - BR-CL-14 / BR-CL-15: Country code MUST be a valid ISO 3166-1 alpha-2 code.\n *\n * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/ISO3166/\n */\nexport const peppolCountryCodeSchema = Schema.Literals(countryCodesKeys).pipe(Schema.brand('PeppolCountryCode'));\n","import { Schema } from 'effect';\n\nimport { opaque } from '#/schemas/utils/opaque.ts';\nimport { peppolCountryCodeSchema } from '#/schemas/values/peppol-country-code-schema.ts';\n\nexport class PeppolAddressLine extends opaque<PeppolAddressLine>()(\n Schema.Struct({\n /**\n * @description An additional address line in an address that can be used to give further details supplementing the main line.\n *\n * @summary Address line 3\n *\n * @name `cbc:Line`\n */\n line: Schema.String,\n })\n) {}\n\nexport class PeppolCountryCode extends opaque<PeppolCountryCode>()(\n Schema.Struct({\n /**\n * @description A code that identifies the country.\n *\n * @example\n * GB;\n *\n * @summary Country code\n *\n * @name `cbc:IdentificationCode`\n */\n identificationCode: peppolCountryCodeSchema,\n })\n) {}\n\n/**\n * @summary Postal address\n *\n * @name `cac:PostalAddress`\n */\nexport class PeppolAddress extends opaque<PeppolAddress>()(\n Schema.Struct({\n /**\n * @description The main address line in an address.\n *\n * @example\n * Main Street 1\n *\n * @summary Address line 1\n *\n * @name `cbc:StreetName`\n */\n streetName: Schema.optional(Schema.String),\n /**\n * @description An additional address line in an address that can be used to give further details supplementing the main line.\n *\n * @example\n * Po Box 351\n *\n * @summary Address line 2\n *\n * @name `cbc:AdditionalStreetName`\n */\n additionalStreetName: Schema.optional(Schema.String),\n /**\n * @description The common name of the city, town or village, where the address is located.\n *\n * @example\n * London;\n *\n * @summary Seller city\n *\n * @name `cbc:CityName`\n */\n cityName: Schema.optional(Schema.String),\n /**\n * @description The identifier for an addressable group of properties according to the relevant postal service.\n *\n * @example\n * W1G 8LZ\n *\n * @summary post code\n *\n * @name `cbc:PostalZone`\n */\n postalZone: Schema.optional(Schema.String),\n /**\n * @description The subdivision of a country.\n *\n * @example\n * Region A\n *\n * @summary Seller country subdivision\n *\n * @name `cbc:CountrySubentity`\n */\n countrySubentity: Schema.optional(Schema.String),\n /**\n * @example\n * GB;\n *\n * @name `cac:Country`\n */\n countryCode: PeppolCountryCode,\n /**\n * @example\n * Building 23\n *\n * @name `cac:AddressLine`\n */\n addressLine: Schema.optional(PeppolAddressLine),\n })\n) {}\n","import { Schema } from 'effect';\n\nimport { PeppolIsoDateString } from '#/schemas/peppol-iso-date-string.ts';\nimport { opaque } from '#/schemas/utils/opaque.ts';\nimport { icdCodesSchema } from '#/schemas/values/icd-codes-schema.ts';\n\nimport { PeppolAddress } from './peppol-address-schema.ts';\nimport { PeppolIdentifier } from './peppol-identifier-schema.ts';\n\nexport class PeppolDeliveryPartyPartyName extends opaque<PeppolDeliveryPartyPartyName>()(\n Schema.Struct({\n /**\n * @description The name of the party to which the goods and services are delivered.\n *\n * @summary Deliver to party name\n *\n * @name `cbc:Name`\n */\n name: Schema.String,\n })\n) {}\n\nexport class PeppolDeliveryParty extends opaque<PeppolDeliveryParty>()(\n Schema.Struct({\n /**\n * @summary PARTY NAME\n *\n * @name `cac:PartyName`\n */\n partyName: PeppolDeliveryPartyPartyName,\n })\n) {}\n\nexport class PeppolDeliveryLocation extends opaque<PeppolDeliveryLocation>()(\n Schema.Struct({\n /**\n * @description An identifier for the location at which the goods and services are delivered.\n *\n * @example\n * `83745498753497`;\n *\n * @summary Deliver to location identifier\n *\n * @name `cbc:ID`\n */\n id: Schema.optional(\n PeppolIdentifier.pipe(\n Schema.fieldsAssign({\n /**\n * @description An identifier for the location at which the goods and services are delivered.\n *\n * @example\n * `83745498753497`;\n *\n * @summary Deliver to location identifier\n *\n * @name `#text`\n */\n id: Schema.String,\n /**\n * @description The identification scheme identifier of the Deliver to location identifier.\n *\n * @summary Deliver to location identifier identification scheme identifier\n *\n * @name `@schemeID`\n */\n schemeId: Schema.optional(icdCodesSchema),\n })\n )\n ),\n /**\n * @description A groupd of business terms providing infomation about the address to which goods and services invoiced were or are delivered.\n *\n * @summary Deliver to address\n *\n * @name `cac:Address`\n */\n address: Schema.optional(PeppolAddress),\n })\n) {}\n\nexport class PeppolDelivery extends opaque<PeppolDelivery>()(\n Schema.Struct({\n /**\n * @description Th edate on which the supply of goods or services was made or completed.\n *\n * @example\n * 2017 - 12 - 01;\n *\n * @summary Actual delivery date\n *\n * @format `YYYY-MM-DD`\n *\n * @name cbc:ActualDeliveryDate\n */\n actualDeliveryDate: Schema.optional(PeppolIsoDateString),\n /**\n * @name `cac:DeliveryLocation`\n */\n deliveryLocation: Schema.optional(PeppolDeliveryLocation),\n\n /**\n * @summary Delivery party\n *\n * @name `cac:DeliveryParty`\n */\n deliveryParty: Schema.optional(PeppolDeliveryParty),\n })\n) {}\n","import { Schema } from 'effect';\n\nimport { PeppolIsoDateString } from '#/schemas/peppol-iso-date-string.ts';\nimport { opaque } from '#/schemas/utils/opaque.ts';\n\nexport class PeppolInvoiceLinePeriod extends opaque<PeppolInvoiceLinePeriod>()(\n Schema.Struct({\n /**\n * @description The date when the Invoice period for this Invoice line ends. Format =\"YYYY-MM-DD\"\n *\n * @example\n * `2017-10-31`;\n *\n * @summary Invoice line period end date\n *\n * @format \"YYYY-MM-DD\"\n *\n * @name `cbc:EndDate`\n */\n endDate: Schema.optional(PeppolIsoDateString),\n /**\n * @description The date when the Invoice period for this Invoice line starts.\n *\n * @example\n * `2017-10-01`;\n *\n * @summary Invoice line period start date\n *\n * @format \"YYYY-MM-DD\"\n *\n * @name `cbc:StartDate`\n */\n startDate: Schema.optional(PeppolIsoDateString),\n })\n) {}\n","import { Schema } from 'effect';\n\nimport type { VatDateCodesKeys } from '#/values/vat-dates.generated';\n\nimport { vatDateCodesKeys } from '#/values/vat-dates.generated';\n\nexport type PeppolVatDateCode = VatDateCodesKeys;\n\n/**\n * @validations\n * - PEPPOL-EN16931-CL006: Invoice period description code must be according to UNCL 2005 D.16B.\n */\nexport const vatDateCodeSchema = Schema.Literals(vatDateCodesKeys);\n","import { Schema } from 'effect';\n\nimport { PeppolInvoiceLinePeriod } from '#/schemas/fields/peppol-invoice-line-period-schema.ts';\nimport { opaque } from '#/schemas/utils/opaque.ts';\nimport { vatDateCodeSchema } from '#/schemas/values/vat-date-code-schema.ts';\n\n/**\n * @description A group of business terms providing information on the invoice period. Also called delivery period. If the group is used, the invoiceing period\n * start date and/or end date must be used.\n *\n * @summary DELIVERY OR INVOICE PERIOD\n *\n * @name `cac:InvoicePeriod`\n */\nexport class PeppolInvoicePeriod extends opaque<PeppolInvoicePeriod>()(\n PeppolInvoiceLinePeriod.pipe(\n Schema.fieldsAssign({\n /**\n * @description The code of the date when the VAT becomes acccountable for the Seller and the Buyer.\n *\n * @example\n * `35`;\n *\n * @summary Value added tax point date code\n *\n * @name `cbc:DescriptionCode`\n */\n descriptionCode: Schema.optional(vatDateCodeSchema),\n })\n )\n) {}\n","import { Schema } from 'effect';\n\nimport { PeppolAmount } from '#/schemas/fields/peppol-amount-schema.ts';\nimport { opaque } from '#/schemas/utils/opaque.ts';\n\n/**\n * @description A group of business terms providing the monetary totals for the Invoice.\n *\n * @summary Document totals\n *\n * @name cac:LegalMonetaryTotal\n */\nexport class PeppolLegalMonetaryTotal extends opaque<PeppolLegalMonetaryTotal>()(\n Schema.Struct({\n /**\n * @description Sum of all allowances on document level in the Invoice.\n *\n * @remarks\n * Must be rounded to maxium 2 decimals.\n *\n * @example\n * 200.0;\n *\n * @summary Sum of allowances on document level\n *\n * @name `cbc:AllowanceTotalAmount (+ @currencyID)`\n */\n allowanceTotalAmount: Schema.optional(PeppolAmount),\n /**\n * @description Sum of all charges on document level in the Invoice.\n *\n * @remarks\n * Must be rounded to maximum 2 decimals.\n *\n * @example\n * 0.0;\n *\n * @summary Sum of charges on document level\n *\n * @name `cbc:ChargeTotalAmount (+ @currencyID)`\n */\n chargeTotalAmount: Schema.optional(PeppolAmount),\n /**\n * @description Sum of all Invoice line net amounts in the Invoice.\n *\n * @remarks\n * Must be rounded to maximum 2 decimals.\n *\n * @example\n * 3800.0;\n *\n * @summary Sum of Invoice line amount\n *\n * @name `cbc:LineExtensionAmount (+ @currencyID)`\n */\n lineExtensionAmount: PeppolAmount,\n /**\n * @description The amount due for payment on the Invoice, after accounting for all allowances, charges, prepayments, and rounding adjustments.\n *\n * @remarks\n * Must be rounded to maximum 2 decimals.\n *\n * @example\n * 4500.0;\n *\n * @summary Amount due for payment\n *\n * @name `cbc:PayableAmount (+ @currencyID)`\n */\n payableAmount: PeppolAmount,\n /**\n * @description The rounding amount applied to the Invoice total.\n *\n * @remarks\n * Must be rounded to maximum 2 decimals.\n *\n * @example\n * 0.0;\n *\n * @summary Rounding amount\n *\n * @name `cbc:PayableRoundingAmount (+ @currencyID)`\n */\n payableRoundingAmount: Schema.optional(PeppolAmount),\n /**\n * @description The sum of amounts which have been paid in advances.\n *\n * @remarks\n * Must be rounded to maximum 2 decimals.\n *\n * @example\n * 0.0;\n *\n * @summary Paid amount\n *\n * @name `cbc:PrepaidAmount (+ @currencyID)`\n */\n prepaidAmount: Schema.optional(PeppolAmount),\n /**\n * @description The total amount of the Invoice without VAT.\n *\n * @remarks\n * Must be rounded to maximum 2 decimals.\n *\n * @example\n * 3600.0;\n *\n * @summary Invoice total amount without VAT\n *\n * @name `cbc:TaxExclusiveAmount (+ @currencyID)`\n */\n taxExclusiveAmount: PeppolAmount,\n /**\n * @description The total amount of the Invoice with VAT.\n *\n * @example\n * 4500.0;\n *\n * @summary Invoice total amount with VAT\n *\n * @remark Must be rounded to maximum 2 decimals.\n *\n * @name `cbc:TaxInclusiveAmount (+ @currencyID)`\n */\n taxInclusiveAmount: PeppolAmount,\n })\n) {}\n","import { Schema } from 'effect';\n\nimport { opaque } from '#/schemas/utils/opaque.ts';\n\n/**\n * @summary ORDER AND SALES ORDER REFERENCE\n *\n * @name cac:OrderReference\n */\nexport class PeppolOrderReference extends opaque<PeppolOrderReference>()(\n Schema.Struct({\n /**\n * @description An identifier of a referenced purchase order, issued by the Buyer. An identifier of a referenced purchase order, issued by the Buyer. An\n * invoice must have buyer reference (BT-10) or purchase order reference. In cases where sales order reference is provided, but there's no\n * purchase order reference, then use value \"NA\" as this element is mandatory in UBL.\n *\n * @example\n * `98776`;\n *\n * @summary Purchase order reference\n *\n * @name `cbc:ID`\n */\n id: Schema.String,\n /**\n * @description An identifier of a referenced Sales order, issued by the Seller. In cases where sales order reference is provided, but there's no purchase\n * order reference, then set cac:OrderReference/cbc:ID to value \"NA\" as this element is mandatory in UBL.\n *\n * @example\n * `112233`;\n *\n * @summary Sales order reference\n *\n * @name `cbc:SalesOrderID`\n */\n salesOrderId: Schema.optional(Schema.String),\n })\n) {}\n","import { Schema } from 'effect';\n\nimport { opaque } from '#/schemas/utils/opaque.ts';\n\nexport class PeppolContact extends opaque<PeppolContact>()(\n Schema.Struct({\n /**\n * @name cbc:ElectronicMail\n */\n electronicMail: Schema.optional(Schema.String),\n /**\n * @name cbc:Name\n */\n name: Schema.optional(Schema.String),\n /**\n * @name cbc:Telephone\n */\n telephone: Schema.optional(Schema.String),\n })\n) {}\n","import { Schema } from 'effect';\n\nimport { PeppolIdentifier } from '#/schemas/fields/peppol-identifier-schema.ts';\nimport { opaque } from '#/schemas/utils/opaque.ts';\n\nexport class PeppolPartyLegalEntity extends opaque<PeppolPartyLegalEntity>()(\n Schema.Struct({\n /**\n * @example\n * 987654321;\n *\n * @name cbc:CompanyID (+ @schemeID)\n */\n companyId: Schema.optional(PeppolIdentifier),\n /**\n * @example\n * Share capital\n *\n * @name cbc:CompanyLegalForm\n */\n companyLegalForm: Schema.optional(Schema.String),\n /**\n * @example\n * Full Formal Seller Name LTD.\n *\n * @name cbc:RegistrationName\n */\n registrationName: Schema.String,\n })\n) {}\n\nexport type PeppolPartyLegalEntitySchema = PeppolPartyLegalEntity;\n","import { Effect, Schema } from 'effect';\n\nimport { opaque } from '#/schemas/utils/opaque.ts';\n\nclass PeppolTaxSchemeId extends opaque<PeppolTaxSchemeId>()(\n Schema.Struct({\n /**\n * @description Mandatory element. For Seller VAT identifier (BT-31), use value “VAT”, for the seller tax registration identifier (BT-32), use != \"VAT\"\n *\n * @name cbc:ID\n */\n id: Schema.String.pipe(Schema.withDecodingDefaultType(Effect.succeed('VAT'))),\n })\n) {}\n\n/**\n * @name cac:PartyTaxScheme (0..2)\n */\nexport class PeppolPartyTaxScheme extends opaque<PeppolPartyTaxScheme>()(\n Schema.Struct({\n /**\n * @description The Seller's VAT identifier (also known as Seller VAT identification number) or the local identification (defined by the Seller’s address) of\n * the Seller for tax purposes or a reference that enables the Seller to state his registered tax status. In order for the buyer to automatically\n * identify a supplier, the Seller identifier (BT-29), the Seller legal registration identifier (BT-30) and/or the Seller VAT identifier (BT-31)\n * shall be present.\n *\n * @summary Seller VAT identifier, Seller tax registration identifier\n *\n * @name `cbc:CompanyID`\n */\n companyId: Schema.String,\n /**\n * @description Mandatory element. For Seller VAT identifier (BT-31), use value “VAT”, for the seller tax registration identifier (BT-32), use != \"VAT\"\n *\n * @name `cac:TaxScheme`\n */\n taxSchemeId: PeppolTaxSchemeId,\n })\n) {}\n\nexport type PeppolPartyTaxSchema = PeppolPartyTaxScheme;\n","/**\n * @module effect/values/eas-codes\n * Electronic Address Scheme (EAS) codes as used in PEPPOL networks\n * These codes identify the scheme used for electronic addresses of parties\n *\n * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/eas/\n */\nimport { Schema } from 'effect';\n\nimport { electronicAddressCodesKeys } from '#/values/eas-codes.generated';\n\n/**\n * @description An electronic address scheme (EAS) code, identifying the scheme of an electronic address (e.g. `0088` for GLN).\n *\n * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/eas/\n */\nexport type PeppolElectronicAddressCode = typeof electronicCodesSchema.Type;\n\n/**\n * @description Validates an electronic address scheme (EAS) code against the PEPPOL Electronic Address Identifier Scheme codelist.\n *\n * @param error - The custom error message to use when validation fails.\n *\n * @returns An Effect schema that accepts only valid electronic address scheme codes.\n *\n * @validations\n * - PEPPOL-EN16931-CL008: Electronic address identifier scheme MUST be from the codelist \"Electronic Address Identifier Scheme\".\n *\n * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/eas/\n */\nexport const electronicCodesSchema = Schema.Literals(electronicAddressCodesKeys).pipe(Schema.brand('PeppolElectronicAddressCode'));\n","import { Schema } from 'effect';\n\nimport { PeppolAddress } from '#/schemas/fields/peppol-address-schema.ts';\nimport { PeppolContact } from '#/schemas/fields/peppol-contact-schema.ts';\nimport { PeppolIdentifier } from '#/schemas/fields/peppol-identifier-schema.ts';\nimport { PeppolPartyLegalEntity } from '#/schemas/fields/peppol-party-legal-entity-schema.ts';\nimport { PeppolPartyTaxScheme } from '#/schemas/fields/peppol-party-tax-scheme-schema.ts';\nimport { opaque } from '#/schemas/utils/opaque.ts';\nimport { electronicCodesSchema } from '#/schemas/values/electronic-codes-schema.ts';\nimport { icdCodesSchema } from '#/schemas/values/icd-codes-schema.ts';\n\nexport class PeppolPartyName extends opaque<PeppolPartyName>()(\n Schema.Struct({\n /**\n * @description A name by which the Buyer/Seller is known, other than Buyer/Seller name (also known as Business name).\n *\n * @example\n * `Trading Name`;\n *\n * @summary Buyer/Seller trading name\n */\n name: Schema.String,\n })\n) {}\n\nexport class PeppolPartyIdentification extends opaque<PeppolPartyIdentification>()(\n Schema.Struct({\n /**\n * @description An identifier of the Buyer/seller.\n *\n * @summary Buyer/seller identifier\n *\n * @name `cbc:ID`\n */\n id: PeppolIdentifier.pipe(\n Schema.fieldsAssign({\n /**\n * @description Identifies the Seller/buyer's electronic address to which the application level response to the invoice may be delivered.\n *\n * @example\n * 7300010000001;\n *\n * @summary Seller/Buyer electronic address\n *\n * @name `#text`\n */\n id: Schema.String,\n /**\n * @description The identification scheme identifier of the Seller/Buyer electronic address.\n *\n * @summary Seller/Buyer electronic address identification scheme identifier\n *\n * @name `@schemeID`\n */\n schemeId: Schema.optional(icdCodesSchema),\n })\n ),\n })\n) {}\n\nexport class PeppolPartyEndpointId extends opaque<PeppolPartyEndpointId>()(\n PeppolIdentifier.pipe(\n Schema.fieldsAssign({\n /**\n * @description Identifies the Seller/buyer's electronic address to which the application level response to the invoice may be delivered.\n *\n * @example\n * 7300010000001;\n *\n * @summary Seller/Buyer electronic address\n *\n * @name `#text`\n */\n id: Schema.String,\n /**\n * @description The identification scheme identifier of the Seller/Buyer electronic address.\n *\n * @summary Seller/Buyer electronic address identification scheme identifier\n *\n * @name `@schemeID`\n */\n schemeId: electronicCodesSchema,\n })\n )\n) {}\n\n/**\n * @summary Party common substructure\n *\n * @name cac:Party\n */\nexport class PeppolPartySchema extends opaque<PeppolPartySchema>()(\n Schema.Struct({\n /**\n * @description Identifies the Seller/buyer's electronic address to which the application level response to the invoice may be delivered.\n *\n * @example\n * 7300010000001;\n *\n * @summary Seller/Buyer electronic address\n *\n * @name `cbc:EndpointID`\n */\n endpointId: PeppolPartyEndpointId,\n /**\n * @example\n * 5060012349998;\n *\n * @summary PARTY IDENTIFICATION\n *\n * @name `cac:PartyIdentification`\n */\n partyIdentification: Schema.optional(PeppolPartyIdentification),\n /**\n * @example\n * Seller Business Name AS\n *\n * @summary PARTY NAME\n *\n * @name cac:PartyName\n */\n partyName: Schema.optional(PeppolPartyName),\n /**\n * @name cac:PostalAddress\n */\n postalAddress: PeppolAddress,\n /**\n * @remarks\n * Max 1 for a buyer, max 2 for a seller.\n *\n * @name cac:PartyTaxScheme\n *\n * @cardinality (0..2)\n */\n partyTaxSchemes: Schema.optional(Schema.Array(PeppolPartyTaxScheme).check(Schema.isMaxLength(2))),\n /**\n * @name cac:PartyLegalEntity\n */\n partyLegalEntity: PeppolPartyLegalEntity,\n /**\n * @name cac:Contact\n */\n contact: Schema.optional(PeppolContact),\n })\n) {}\n","import { Schema } from 'effect';\n\nimport { PeppolIdentifier } from '#/schemas/fields/peppol-identifier-schema.ts';\nimport { opaque } from '#/schemas/utils/opaque.ts';\nimport { icdCodesSchema } from '#/schemas/values/icd-codes-schema.ts';\n\nclass PeppolPartyName extends opaque<PeppolPartyName>()(Schema.Struct({ name: Schema.String })) {}\n\nclass PeppolPartyLegalEntity extends opaque<PeppolPartyLegalEntity>()(\n Schema.Struct({\n /**\n * @description An identifier issued by an official registrar that identifies the payee as a legal entity or person.\n *\n * @example\n * `FR932874294`;\n *\n * @summary Payee legal registration identifier\n *\n * @name `cbc:CompanyID`\n */\n companyId: Schema.optional(\n PeppolIdentifier.pipe(\n Schema.fieldsAssign({\n /**\n * @description An identifier issued by an official registrar that identifies the payee as a legal entity or person.\n *\n * @example\n * `FR932874294`;\n *\n * @summary Payee legal registration identifier\n *\n * @name `#text`\n */\n id: Schema.String,\n /**\n * @description The identification scheme identifier of the Payee legal registration identifier.\n *\n * @summary Payee legal registration identifier identification scheme identifier\n *\n * @name `@schemeID`\n */\n schemeId: Schema.optional(icdCodesSchema),\n })\n )\n ),\n })\n) {}\n\nclass PeppolPartyIdentification extends opaque<PeppolPartyIdentification>()(\n Schema.Struct({\n /**\n * @description This element is used for both the identification of the Payee, or the unique banking reference identifier of Payee (assigned by the Payee\n * bank.) For payee identification use ICD code list, for SEPA bank assigned creditor reference, use SEPA.\n *\n * @summary Payee identifier or bank assigned crditor identifier\n *\n * @name `cbc:ID`\n */\n id: Schema.optional(\n PeppolIdentifier.pipe(\n Schema.fieldsAssign({\n /**\n * @description This element is used for both the identification of the Payee, or the unique banking reference identifier of Payee (assigned by the Payee\n * bank.) For payee identification use ICD code list, for SEPA bank assigned creditor reference, use SEPA.\n *\n * @summary Payee identifier or bank assigned crditor identifier\n *\n * @name `#text`\n */\n id: Schema.String,\n /**\n * @description The identification scheme identifier of the payee identifier. For bank assigned creditor identifier (BT-90), value MUST be \"SEPA\"\n *\n * @summary Payee or bank assigned creditor identifier identification scheme identifier\n *\n * @name `@schemeID`\n */\n schemeId: Schema.optional(Schema.String),\n })\n )\n ),\n })\n) {}\n\n/**\n * @description A group of business terms providing information about the Payee, i.e. the role that received the payment. Shall be used wwhen the payee is\n * different from the seller.\n *\n * @summary PAYEE\n *\n * @name cac:PayeeParty\n */\nexport class PeppolPayeeParty extends opaque<PeppolPayeeParty>()(\n Schema.Struct({\n /**\n * @summary PARTY IDENTIFICATION\n *\n * @name `cac:PartyIdentification`\n */\n partyIdentification: Schema.optional(PeppolPartyIdentification),\n /**\n * @summary PARTY LEGAL ENTITY\n *\n * @name `cac:PartyLegalEntity`\n */\n partyLegalEntity: Schema.optional(PeppolPartyLegalEntity),\n /**\n * @description The name of the payee.\n *\n * @example\n * `Payee Name Ltd`;\n *\n * @summary Payee name\n *\n * @name `cac:PartyName`\n */\n partyName: PeppolPartyName,\n })\n) {}\n","/**\n * @module effect/values/payment-means-codes-schema\n *\n * Payment means codes as defined by UN/CEFACT UNCL4461.\n *\n * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/UNCL4461/\n */\n\nimport { Schema } from 'effect';\n\nimport { paymentMeansCodesKeys } from '#/values/payment-means-codes.generated';\n\n/**\n * @description A payment means code as defined by the PEPPOL subset of UNCL 4461.\n *\n * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/UNCL4461/\n */\nexport type PeppolPaymentMeansCode = typeof paymentMeansCodeSchema.Type;\n\n/**\n * @description Validates a payment means code against the PEPPOL subset of UNCL 4461.\n *\n * @param error - The custom error message to use when validation fails.\n *\n * @returns An Effect schema that accepts only valid payment means codes.\n *\n * @validations\n * - BR-CL-16: Payment means code MUST be a valid UNCL 4461 code.\n *\n * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/UNCL4461/\n */\nexport const paymentMeansCodeSchema = Schema.Literals(paymentMeansCodesKeys).pipe(Schema.brand('PeppolPaymentMeansCode'));\n","import { Schema } from 'effect';\n\nimport { PeppolIsoDateString } from '#/schemas/peppol-iso-date-string.ts';\nimport { opaque } from '#/schemas/utils/opaque.ts';\nimport { paymentMeansCodeSchema } from '#/schemas/values/payment-means-code-schema.ts';\n\nexport class PeppolPaymentMandatePayerFinancialAccountId extends opaque<PeppolPaymentMandatePayerFinancialAccountId>()(\n Schema.Struct({\n /**\n * @description The account to be debited by the direct debit.\n *\n * @example\n * `12345676543`;\n *\n * @summary Debited account identifier\n *\n * @name `cbc:ID`\n */\n id: Schema.String,\n })\n) {}\n\nexport class PeppolPaymentMandate extends opaque<PeppolPaymentMandate>()(\n Schema.Struct({\n /**\n * @description Unique identifier assigned by the Payee for referencing the direct debit mandate. Used in order to pre-notify the Buyer of a SEPA direct debit.\n *\n * @summary Mandate reference identifier\n *\n * @name cbc:ID\n */\n id: Schema.optional(Schema.String),\n /**\n * @description The account to be debited by the direct debit.\n *\n * @example\n * `12345676543`;\n *\n * @summary Debited account identifier\n *\n * @name `cac:PayerFinancialAccount`\n */\n payerFinancialAccountId: Schema.optional(PeppolPaymentMandatePayerFinancialAccountId),\n })\n) {}\n\nexport class PeppolPayeeFinancialAccountFinancialInstitutionBranch extends opaque<PeppolPayeeFinancialAccountFinancialInstitutionBranch>()(\n Schema.Struct({\n /**\n * @description An identifier for the payment service provider where a payment account is located. Such as a BIC or a national clearing code where required. No\n * identification scheme Identifier to be used.\n *\n * @example\n * `9998`;\n *\n * @summary Payment service provider identifier\n *\n * @name `cac:FinancialInstitutionBranch`\n */\n id: Schema.String,\n })\n) {}\n\nexport class PeppolPayeeFinancialAccount extends opaque<PeppolPayeeFinancialAccount>()(\n Schema.Struct({\n /**\n * @description An identifier for the payment service provider where a payment account is located. Such as a BIC or a national clearing code where required. No\n * identification scheme Identifier to be used.\n *\n * @example\n * `9998`;\n *\n * @summary Payment service provider identifier\n *\n * @name `cac:FinancialInstitutionBranch`\n */\n financialInstitutionBranch: Schema.optional(PeppolPayeeFinancialAccountFinancialInstitutionBranch),\n /**\n * @description A unique identifier of the financial payment account, at a payment service provider, to which payment should be made. Such as IBAN or BBAN.\n *\n * @summary Payment account identifier\n *\n * @name cbc:ID\n */\n id: Schema.String,\n /**\n * @description The name of the payment account, at a payment service provider, to which payment should be made.\n *\n * @summary Payment account name\n *\n * @name cbc:Name\n */\n name: Schema.optional(Schema.String),\n })\n) {}\n\nexport class PeppolCardAccount extends opaque<PeppolCardAccount>()(\n Schema.Struct({\n /**\n * @description The name of the payment card holder.\n *\n * @summary Payment card holder name\n *\n * @name cbc:HolderName\n */\n holderName: Schema.optional(Schema.String),\n /**\n * @summary Syntax required element not related to a business term.\n *\n * @name cbc:NetworkID\n */\n networkId: Schema.String,\n /**\n * @description The Primary Account Number (PAN) of the card used for payment. In accordance with card payments security standards, an invoice should never\n * include a full card primary account number.\n *\n * @example\n * `1234`;\n *\n * @summary Payment card primary account number\n *\n * @name cbc:PrimaryAccountNumberID\n */\n primaryAccountNumberId: Schema.String,\n })\n) {}\n\nexport class PeppolPaymentMeansCode extends opaque<PeppolPaymentMeansCode>()(\n Schema.Struct({\n /**\n * @description The means, expressed as code, for how a payment is expected to be or has been settled.\n *\n * @example\n * 30;\n *\n * @summary Payment means type code\n *\n * @name `#text`\n */\n code: paymentMeansCodeSchema,\n /**\n * @description The means, expressed as text, for how a payment is expected to be or has been settled.\n *\n * @example\n * Credit transfer\n *\n * @summary Payment means text\n *\n * @name `@name`\n */\n name: Schema.optional(Schema.String),\n })\n) {}\n\n/**\n * @description A group of business terms providing information about the payment.\n *\n * @summary Payment means (credit transfer/direct debit/card)\n *\n * @name cac:PaymentMeans\n */\nexport class PeppolPaymentMeans extends opaque<PeppolPaymentMeans>()(\n Schema.Struct({\n /**\n * @description The means, expressed as code, for how a payment is expected to be or has been settled.\n *\n * @example\n * 30;\n *\n * @summary Payment means type code\n *\n * @name `cbc:PaymentMeansCode`\n */\n paymentMeansCode: PeppolPaymentMeansCode,\n /**\n * @description The date when the payment is due.Format \"YYYY-MM-DD\". In case the Amount due for payment (BT-115) is positive, either the Payment due date\n * (BT-9) or the Payment terms (BT-20) shall be present.\n *\n * @remarks\n * This should only be used with a credit note.\n *\n * @summary Payment due date\n *\n * @name `cbc:PaymentDueDate`\n */\n paymentDueDate: Schema.optional(PeppolIsoDateString),\n /**\n * @description A textual value used to establish a link between the payment and the Invoice, issued by the Seller. Used for creditor's critical reconciliation\n * information. This information element helps the Seller to assign an incoming payment to the relevant payment process.\n *\n * @example\n * `432948234234234`;\n *\n * @summary Remittance information\n *\n * @name cbc:PaymentID\n */\n paymentId: Schema.optional(Schema.String),\n /**\n * @description A group of business terms providing information about card used for payment contemporaneous with invoice issuance.\n *\n * @summary PAYMENT CARD INFORMATION\n *\n * @name cac:CardAccount\n */\n cardAccount: Schema.optional(PeppolCardAccount),\n /**\n * @description A group of business terms to specify credit transfer payments.\n *\n * @summary CREDIT TRANSFER\n *\n * @name cac:PayeeFinancialAccount\n */\n payeeFinancialAccount: Schema.optional(PeppolPayeeFinancialAccount),\n /**\n * @description A group of business terms to specify a direct debit.\n *\n * @summary DIRECT DEBIT\n *\n * @name cac:PaymentMandate\n */\n paymentMandate: Schema.optional(PeppolPaymentMandate),\n })\n) {}\n","import { Schema } from 'effect';\n\nimport { opaque } from '#/schemas/utils/opaque.ts';\n\n/**\n * @summary PAYMENT TERMS\n *\n * @name cac:PaymentTerms\n */\nexport class PeppolPaymentTerms extends opaque<PeppolPaymentTerms>()(\n Schema.Struct({\n /**\n * @description A textual description of the payment terms that apply to the amount due for payment (Including description of possible penalties). In case the\n * Amount due for payment (BT-115) is positive, either the Payment due date (BT-9) or the Payment terms (BT-20) shall be present.\n *\n * @example\n * Net within 30 days\n *\n * @summary Payment terms\n *\n * @name cbc:Note\n */\n note: Schema.String,\n })\n) {}\n","import { Schema } from 'effect';\n\nimport { PeppolAddress } from '#/schemas/fields/peppol-address-schema.ts';\nimport { PeppolPartyTaxScheme } from '#/schemas/fields/peppol-party-tax-scheme-schema.ts';\nimport { opaque } from '#/schemas/utils/opaque.ts';\n\n/**\n * @summary SELLER TAX REPRESENTATIVE PARTY\n *\n * @name cac:TaxRepresentativeParty\n */\nexport class PeppolTaxRepresentative extends opaque<PeppolTaxRepresentative>()(\n Schema.Struct({\n /**\n * @name cac:PartyName/cbc:Name\n */\n name: Schema.String,\n /**\n * @name cac:PostalAddress\n */\n postalAddress: PeppolAddress,\n partyTaxScheme: PeppolPartyTaxScheme,\n })\n) {}\n\nexport type PeppolTaxRepresentativeParty = PeppolTaxRepresentative;\n","import { Schema } from 'effect';\n\nimport { PeppolTaxCategory } from '#/schemas/fields/peppol-tax-category-schema.ts';\nimport { opaque } from '#/schemas/utils/opaque.ts';\n\n/**\n * @description This one is specific for TaxSubtotal since it includes more fields.\n *\n * @summary Tax Category for Tax Subtotal\n *\n * @name cac:TaxCategory\n */\nexport class PeppolTaxSubTotalCategory extends opaque<PeppolTaxSubTotalCategory>()(\n Schema.Struct({\n ...PeppolTaxCategory.fields,\n /**\n * @description The reason for the tax exemption.\n *\n * @name cbc:TaxExemptionReason\n */\n taxExemptionReason: Schema.optional(Schema.String),\n /**\n * @description The code for the reason of the tax exemption.\n *\n * @name cbc:TaxExemptionReasonCode\n */\n taxExemptionReasonCode: Schema.optional(Schema.String),\n })\n) {}\n\nexport interface PeppolTaxSubTotalCategoryEncoded extends Schema.Codec.Encoded<typeof PeppolTaxSubTotalCategory> {}\n","import { Schema } from 'effect';\n\nimport { PeppolAmount } from '#/schemas/fields/peppol-amount-schema.ts';\nimport { PeppolTaxSubTotalCategory } from '#/schemas/fields/peppol-tax-subtotal-category-schema.ts';\nimport { opaque } from '#/schemas/utils/opaque.ts';\n\n/**\n * @summary VAT breakdown (TaxSubtotal)\n *\n * @name cac:TaxSubtotal\n */\nexport class PeppolTaxSubTotal extends opaque<PeppolTaxSubTotal>()(\n Schema.Struct({\n /**\n * @description The amount of tax for the tax subtotal.\n *\n * @name `cbc:TaxAmount (+ @currencyID)`\n */\n taxAmount: PeppolAmount,\n /**\n * @description The tax category associated with this tax subtotal.\n *\n * @name cac:TaxCategory\n */\n taxCategory: PeppolTaxSubTotalCategory,\n /**\n * @description The taxable amount for the tax subtotal.\n *\n * @name `cbc:TaxableAmount (+ @currencyID)`\n */\n taxableAmount: PeppolAmount,\n })\n) {}\n","import { Schema } from 'effect';\n\nimport { PeppolAmount } from '#/schemas/fields/peppol-amount-schema.ts';\nimport { PeppolTaxSubTotal } from '#/schemas/fields/peppol-tax-subtotal-schema.ts';\nimport { opaque } from '#/schemas/utils/opaque.ts';\n\n/**\n * @summary TAX TOTAL\n *\n * @name cac:TaxTotal (1..2)\n */\nexport class PeppolTaxTotalsBase extends opaque<PeppolTaxTotalsBase>()(\n Schema.Struct({\n /**\n * @example\n * 200;\n *\n * @name cbc:TaxAmount (+ @currencyID)\n */\n taxAmount: PeppolAmount,\n /**\n * @name cac:TaxSubtotal (0..n)\n */\n taxSubtotals: Schema.optional(Schema.Array(PeppolTaxSubTotal)),\n })\n) {}\n\nexport type PeppolTaxTotal = PeppolTaxTotalsBase;\n","import { Effect, Schema } from 'effect';\n\nimport { DEFAULT_CUSTOMIZATION_ID } from '#/schemas/fields/default-customization-id.ts';\nimport { DEFAULT_PROFILE_ID } from '#/schemas/fields/default-profile-id.ts';\nimport { PeppolAdditionalDocumentReference } from '#/schemas/fields/peppol-additional-document-reference-schema.ts';\nimport { peppolAllowanceChargeSchema } from '#/schemas/fields/peppol-allowance-charge-schema.ts';\nimport { PeppolBillingReference } from '#/schemas/fields/peppol-billing-reference-schema.ts';\nimport { PeppolDelivery } from '#/schemas/fields/peppol-delivery-schema.ts';\nimport { PeppolInvoicePeriod } from '#/schemas/fields/peppol-invoice-period-schema.ts';\nimport { PeppolLegalMonetaryTotal } from '#/schemas/fields/peppol-legal-monetary-total-schema.ts';\nimport { PeppolOrderReference } from '#/schemas/fields/peppol-order-reference-schema.ts';\nimport { PeppolPartySchema } from '#/schemas/fields/peppol-party-base-schema.ts';\nimport { PeppolPayeeParty } from '#/schemas/fields/peppol-payee-party-schema.ts';\nimport { PeppolPaymentMeans } from '#/schemas/fields/peppol-payment-means-schema.ts';\nimport { PeppolPaymentTerms } from '#/schemas/fields/peppol-payment-terms-schema.ts';\nimport { PeppolTaxRepresentative } from '#/schemas/fields/peppol-tax-representative-schema.ts';\nimport { PeppolTaxTotalsBase } from '#/schemas/fields/peppol-tax-totals-base-schema.ts';\nimport { PeppolIsoDateString } from '#/schemas/peppol-iso-date-string.ts';\nimport { opaque } from '#/schemas/utils/opaque.ts';\nimport { currencyCodeSchema } from '#/schemas/values/currency-code-schema.ts';\n\nexport class PeppolContractDocumentReference extends opaque<PeppolContractDocumentReference>()(\n Schema.Struct({\n /**\n * @description An identifier of a referenced contract.\n *\n * @example\n * `123Contractref`;\n *\n * @summary Contract reference\n *\n * @name `cbc:ID`\n */\n id: Schema.String,\n })\n) {}\n\nexport class PeppolOriginatorDocumentReference extends opaque<PeppolOriginatorDocumentReference>()(\n Schema.Struct({\n /**\n * @description The identification of the call for tender or lot the invoice relates to.\n *\n * @example\n * `PPID-123`;\n *\n * @summary Tender or lot reference\n *\n * @name `cbc:ID`\n */\n id: Schema.String,\n })\n) {}\n\nexport class PeppolReceiptDocumentReference extends opaque<PeppolReceiptDocumentReference>()(\n Schema.Struct({\n /**\n * @description An identifier of a referenced receiving advice.\n *\n * @example\n * `rec98`;\n *\n * @summary Receiving advice reference\n *\n * @name `cbc:ID`\n */\n id: Schema.String,\n })\n) {}\n\nexport class PeppolDespatchDocumentReference extends opaque<PeppolDespatchDocumentReference>()(\n Schema.Struct({\n /**\n * @description An identifier of a referenced despatch advice.\n *\n * @example\n * `desp98`;\n *\n * @summary Despatch advice reference\n *\n * @name `cbc:ID`\n */\n id: Schema.String,\n })\n) {}\n\n/**\n * @description Base schema for a billing document.\n *\n * @see {@link creditNoteSchema} - the credit note schema\n * @see {@link invoiceSchema} - the invoice schema\n */\nexport class PeppolBillingBase extends opaque<PeppolBillingBase>()(\n Schema.Struct({\n /**\n * @description An identification of the specification containing the total set of rules regarding semantic content, cardinalities, and business rules to which\n * the data contained in the intance document conforms.\n *\n * @default `urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0`\n *\n * @summary Specification identifier\n *\n * @cardinality 1..1\n *\n * @name `cbc:CustomizationID`\n */\n customizationId: Schema.String.pipe(Schema.withDecodingDefaultType(Effect.succeed(DEFAULT_CUSTOMIZATION_ID))).check(\n Schema.isStartsWith('urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0', {\n message:\n \"PEPPOL-EN16931-R004: Specification identifier MUST have the value 'urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0'.\",\n })\n ),\n /**\n * @description Identifies the business process context in which the transaction appears, to enable the Buyer to process the Invoice in an appropriate way.\n *\n * @default `urn:fdc:peppol.eu:2017:poacc:billing:01:1.0`\n *\n * @summary Business process type\n *\n * @name `cbc:ProfileID`\n */\n profileId: Schema.String.pipe(Schema.withDecodingDefaultType(Effect.succeed(DEFAULT_PROFILE_ID))).check(\n Schema.isPattern(/^urn:fdc:peppol.eu:2017:poacc:billing:(\\d{2}):1\\.0$/, {\n message:\n \"PEPPOL-EN16931-R007: Business process MUST be in the format 'urn:fdc:peppol.eu:2017:poacc:billing:NN:1.0' where NN indicates the process number.\",\n })\n ),\n /**\n * @description A using identification of the Invoice. The sequential number required in Article 226(2) of the directive 2006/112/EC [2], to uniquely identify\n * the Invoice within the business context, time-frame, operating systems and records of the Seller. No identification scheme is to be used.\n *\n * @example\n * 33445566;\n *\n * @summary Invoice number\n *\n * @name `cbc:ID`\n */\n id: Schema.String,\n /**\n * @description The date when the invoice was issued.\n *\n * @example\n * `2017-11-01`;\n *\n * @summary Invoice issue date\n *\n * @format `YYYY-MM-DD`\n *\n * @name `cbc:IssueDate`\n */\n issueDate: PeppolIsoDateString,\n /**\n * @description Invoice note A textual note that gives unstructured information that is relevant to the Credit Note as a whole.\n *\n * @example\n * Please note our new phone number 33 44 55 66\n *\n * @name `cbc:Note`\n */\n note: Schema.optional(Schema.String),\n /**\n * @description The date when the VAT becomes accountable for the Seller and for the Buyer in so far as that date can be determined and differs from the date\n * of issue of the invoice, according to the VAT directive.This element is required if the Value added tax point date is different from the\n * Invoice issue date.\n *\n * @example\n * 2017 - 11 - 01;\n *\n * @summary Value added tax point date\n *\n * @name `cbc:TaxPointDate`\n */\n taxPointDate: Schema.optional(PeppolIsoDateString),\n /**\n * @description The currency in which all Invoice amounts are given, except for the Total VAT amount in accounting currency. Only one currency shall be used in\n * the Invoice, except for the VAT accounting currency code (BT-6) and the invoice total VAT amount in accounting currency (BT-111).\n *\n * @example\n * EUR;\n *\n * @summary Invoice currency code\n *\n * @name `cbc:DocumentCurrencyCode`\n */\n documentCurrencyCode: currencyCodeSchema,\n /**\n * @description The currency used for VAT accounting and reporting purposes as accepted or required in the country of the Seller. Shall be used in combination\n * with the Invoice total VAT amount in accounting currency (BT-111), when the VAT accounting currency code differs from the Invoice currency\n * code.\n *\n * @example\n * SEK;\n *\n * @summary VAT accounting currency code\n *\n * @name `cbc:TaxCurrencyCode`\n */\n taxCurrencyCode: Schema.optional(currencyCodeSchema),\n /**\n * @description A textual value that specifies where to book the relevant data into the Buyer's financial accounts.\n *\n * @example\n * `4217:2323:2323`;\n *\n * @summary Buyer accounting reference\n *\n * @name `cbc:AccountingCost`\n */\n accountingCost: Schema.optional(Schema.String),\n /**\n * @description An identifier assigned by the Buyer used for internal routing purposes. An invoice must have buyer reference or purchase order reference\n * (BT-13).\n *\n * @example\n * `abs1234`;\n *\n * @summary Buyer reference\n *\n * @name `cbc:BuyerReference`\n */\n buyerReference: Schema.optional(Schema.String),\n /**\n * @description A group of business terms providing information on the invoice period. Also called delivery period. If the group is used, the invoiceing period\n * start date and/or end date must be used.\n *\n * @summary DELIVERY OR INVOICE PERIOD\n *\n * @name `cac:InvoicePeriod`\n */\n invoicePeriod: Schema.optional(PeppolInvoicePeriod),\n /**\n * @summary ORDER AND SALES ORDER REFERENCE\n *\n * @name `cac:OrderReference`\n */\n orderReference: Schema.optional(PeppolOrderReference),\n /**\n * @summary PRECEDING INVOICE REFERENCE (0..n)\n *\n * @name `cac:BillingReference`\n */\n billingReferences: Schema.optional(Schema.Array(PeppolBillingReference)),\n /**\n * @summary DESPATCH ADVICE REFERENCE\n *\n * @name `cac:DespatchDocumentReference`\n */\n despatchDocumentReference: Schema.optional(PeppolDespatchDocumentReference),\n /**\n * @summary RECEIPT ADVICE REFERENCE\n *\n * @name `cac:ReceiptDocumentReference`\n */\n receiptDocumentReference: Schema.optional(PeppolReceiptDocumentReference),\n /**\n * @summary TENDER OR LOT REFERENCE\n *\n * @name `cac:OriginatorDocumentReference`\n */\n originatorDocumentReference: Schema.optional(PeppolOriginatorDocumentReference),\n\n /**\n * @summary CONTRACT REFERENCE\n *\n * @name `cac:ContractDocumentReference`\n */\n contractDocumentReference: Schema.optional(PeppolContractDocumentReference),\n\n /**\n * @description A group of business terms providing information about additional supporting documents substantiating the claims made in the Invoice. The\n * additional supporting documents can be used for both referencing a document number which is expected to be known by the receiver, an external\n * document (referenced by a URL) or as an embedded document, Base64 encoded (such as a time report).\n *\n * @summary ADDITIONAL SUPPORTING DOCUMENTS\n *\n * @name `cac:AdditionalDocumentReference`\n */\n additionalDocumentReferences: Schema.optional(Schema.Array(PeppolAdditionalDocumentReference)),\n\n /**\n * @description A group of business terms providing information about the seller.\n *\n * @summary SELLER\n *\n * @name `cac:AccountingSupplierParty`\n */\n accountingSupplierParty: PeppolPartySchema,\n\n /**\n * @description A group of business terms providing information about the Buyer.\n *\n * @summary BUYER\n *\n * @name `cac:AccountingCustomerParty`\n */\n accountingCustomerParty: PeppolPartySchema,\n\n /**\n * @description A group of business terms providing information about the Payee, i.e. the role that received the payment. Shall be used wwhen the payee is\n * different from the seller.\n *\n * @summary PAYEE\n *\n * @name cac:PayeeParty\n */\n payeeParty: Schema.optional(PeppolPayeeParty),\n\n /**\n * @description SELLER TAX REPRESENTATIVE PARTY.\n *\n * @name cac:TaxRepresentativeParty\n */\n taxRepresentativeParty: Schema.optional(PeppolTaxRepresentative),\n\n /**\n * @description DELIVERY INFORMATION.\n *\n * @name cac:Delivery\n */\n delivery: Schema.optional(PeppolDelivery),\n\n /**\n * @summary PAYMENT INSTRUCTIONS\n * @summary A group of business terms providing information about the payment.\n *\n * @name cac:PaymentMeans\n */\n paymentMeans: Schema.optional(Schema.Array(PeppolPaymentMeans)),\n\n /**\n * @example\n * Net within 30 days\n *\n * @summary PAYMENT TERMS\n *\n * @name cac:PaymentTerms\n */\n paymentTerms: Schema.optional(PeppolPaymentTerms),\n\n /**\n * @description A group of business terms providing information about allowances applicable to the Invoice as a whole. A group of business terms providing\n * information about charges and taxes other than VAT, applicable to the Invoice as a whole.\n *\n * @summary DOCUMENT LEVEL ALLOWANCES AND CHARGES\n *\n * @name cac:AllowanceCharge\n */\n allowanceCharges: Schema.optional(Schema.Array(peppolAllowanceChargeSchema)),\n\n /**\n * @description When tax currency code is provided, two instances of the tax total must be present, but only one with tax subtotal.\n *\n * @summary TAX TOTAL\n *\n * @name cac:TaxTotal\n */\n taxTotals: Schema.Array(PeppolTaxTotalsBase).check(Schema.isMinLength(1), Schema.isMaxLength(2)),\n\n /**\n * @summary DOCUMENT TOTALS\n *\n * @name cac:LegalMonetaryTotal\n */\n legalMonetaryTotal: PeppolLegalMonetaryTotal,\n })\n) {}\n","import { Schema } from 'effect';\n\nimport { itemClassificationCodesKeys } from '#/values/item-classification-code.generated';\n\n/**\n * @description An item classification code as defined by the PEPPOL subset of UNCL 7143.\n *\n * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/UNCL7143/\n */\nexport type PeppolItemClassificationCode = typeof itemClassificationCodesSchema.Type;\n\n/**\n * @description Validates an item classification code against the PEPPOL subset of UNCL 7143.\n *\n * @param error - The custom error message to use when validation fails.\n *\n * @returns An Effect schema that accepts only valid item classification codes.\n *\n * @validations\n * - BR-CL-13: Item classification scheme MUST be a valid UNTDID 7143 code.\n *\n * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/UNCL7143/\n */\nexport const itemClassificationCodesSchema = Schema.Literals(itemClassificationCodesKeys).pipe(Schema.brand('PeppolItemClassificationCode'));\n","import { Schema } from 'effect';\n\nimport { opaque } from '#/schemas/utils/opaque.ts';\nimport { itemClassificationCodesSchema } from '#/schemas/values/item-classification-codes-schema.ts';\n\n/**\n * @description A code for classifying the item by its type or nature.\n *\n * @example\n * `9873242`;\n *\n * @summary Item classification identifier\n *\n * @name `cbc:ItemClassificationCode`\n */\nexport class PeppolItemClassification extends opaque<PeppolItemClassification>()(\n Schema.Struct({\n /**\n * @description A code for classifying the item by its type or nature.\n *\n * @summary Item classification identifier\n *\n * @name `#text`\n */\n id: Schema.String,\n /**\n * @description The identification scheme identifier of the item classification identifier.\n *\n * @summary Item classification identifier identification scheme identifier\n *\n * @name `@listID`\n */\n listId: itemClassificationCodesSchema,\n /**\n * @description The identification scheme version identifier of the Item classification identifier.\n *\n * @remarks\n * Only used with danish.\n *\n * @summary Item classification identifier version identification scheme identifier\n *\n * @name `@listVersionID`\n */\n listVersionId: Schema.optional(Schema.String),\n })\n) {}\n","import { Schema } from 'effect';\n\nimport { PeppolIdentifier } from '#/schemas/fields/peppol-identifier-schema.ts';\nimport { PeppolItemClassification } from '#/schemas/fields/peppol-item-classification-schema.ts';\nimport { PeppolTaxCategory } from '#/schemas/fields/peppol-tax-category-schema.ts';\nimport { opaque } from '#/schemas/utils/opaque.ts';\nimport { icdCodesSchema } from '#/schemas/values/icd-codes-schema.ts';\nimport { peppolCountryCodeSchema } from '#/schemas/values/peppol-country-code-schema.ts';\n\nexport class PeppolAdditionalItemProperties extends opaque<PeppolAdditionalItemProperties>()(\n Schema.Struct({\n /**\n * @description The name of the attribute or property of the item.\n *\n * @summary Item attribute name\n *\n * @name cbc:Name\n */\n name: Schema.String,\n /**\n * @description The value of the attribute or property of the item.\n *\n * @summary Item attribute value\n *\n * @name cbc:Value\n */\n value: Schema.String,\n })\n) {}\n\nexport class PeppolCommodityClassifications extends opaque<PeppolCommodityClassifications>()(\n Schema.Struct({\n /**\n * @description A code for classifying the item by its type or nature.\n *\n * @example\n * `9873242`;\n *\n * @summary Item classification identifier\n *\n * @name `cbc:ItemClassificationCode`\n */\n itemClassification: PeppolItemClassification,\n })\n) {}\n\nexport class PeppolOriginCountryCode extends opaque<PeppolOriginCountryCode>()(\n Schema.Struct({\n /**\n * @description The code identifying the country from which the item originates.\n *\n * @summary Item country of origin\n *\n * @name `cbc:IdentificationCode`\n */\n identificationCode: peppolCountryCodeSchema,\n })\n) {}\n\nexport class PeppolStandardItemIdentification extends opaque<PeppolStandardItemIdentification>()(\n Schema.Struct({\n /**\n * @description An item identifier based on a registered scheme.\n *\n * @summary Item standard identifier\n *\n * @name `cbc:ID`\n */\n id: PeppolIdentifier.pipe(\n Schema.fieldsAssign({\n /**\n * @description An item identifier based on a registered scheme.\n *\n * @summary Item standard identifier\n *\n * @name `#text`\n */\n id: Schema.String,\n /**\n * @description The identification scheme identifier of the Item standard identifier.\n *\n * @summary Item standard identifier identification scheme identifier\n *\n * @name `@schemeID`\n */\n schemeId: icdCodesSchema,\n })\n ),\n })\n) {}\n\nexport class PeppolSellersItemIdentification extends opaque<PeppolSellersItemIdentification>()(\n Schema.Struct({\n /**\n * @description An identifier, assigned by the Seller, for the item.\n *\n * @example\n * `987323`;\n *\n * @summary Item Seller's identifier\n *\n * @name `cbc:ID`\n */\n id: Schema.String,\n })\n) {}\n\nexport class PeppolBuyersItemIdentification extends opaque<PeppolBuyersItemIdentification>()(\n Schema.Struct({\n /**\n * @description An identifier, assigned by the Buyer, for the item.\n *\n * @example\n * `12345`;\n *\n * @summary Item Buyer's identifier\n *\n * @name `cbc:ID`\n */\n id: Schema.String,\n })\n) {}\n\n/**\n * @summary Item details on invoice/credit-note line\n *\n * @name cac:Item\n */\nexport class PeppolLineItem extends opaque<PeppolLineItem>()(\n Schema.Struct({\n /**\n * @description A description for an item. The item description allows for descibing the item and its features in more detail than the item name.\n *\n * @summary Item description\n *\n * @name cbc:Description\n */\n description: Schema.optional(Schema.String),\n /**\n * @description A name for an item.\n *\n * @summary Item name\n *\n * @name cbc:Name\n */\n name: Schema.String,\n /**\n * @summary BUYERS ITEM IDENTIFICATION\n *\n * @name cac:BuyersItemIdentification\n */\n buyersItemIdentification: Schema.optional(PeppolBuyersItemIdentification),\n /**\n * @summary Sellers item identification\n *\n * @name cac:SellersItemIdentification\n */\n sellersItemIdentification: Schema.optional(PeppolSellersItemIdentification),\n /**\n * @summary Standard item identification\n *\n * @name cac:StandardItemIdentification\n */\n standardItemIdentification: Schema.optional(PeppolStandardItemIdentification),\n /**\n * @summary ORIGIN COUNTRY\n *\n * @name `cac:OriginCountry`\n */\n originCountryCode: Schema.optional(PeppolOriginCountryCode),\n /**\n * @summary COMMODITY CLASSIFICATION\n *\n * @name cac:CommodityClassification (0..n)\n */\n commodityClassifications: Schema.optional(Schema.Array(PeppolCommodityClassifications)),\n /**\n * @description A group of business terms providing information about the VAT applicable for the goods and services invoiced on the Invoice line.\n *\n * @summary LINE VAT INFORMATION\n *\n * @name cac:ClassifiedTaxCategory\n */\n classifiedTaxCategory: PeppolTaxCategory,\n /**\n * @description A group of business terms providing information about properties of the goods and services invoiced.\n *\n * @summary ITEM ATTRIBUTES\n *\n * @name cac:AdditionalItemProperty\n */\n additionalItemProperties: Schema.optional(Schema.Array(PeppolAdditionalItemProperties)),\n })\n) {}\n\nexport type PeppolItem = PeppolLineItem;\n","import { Schema } from 'effect';\n\nimport { quantityUnitCodesKeys } from '#/values/quantity-unit-codes.generated';\n\n/**\n * @description A unit of measure code as defined by the PEPPOL subset of UN/ECE Recommendation 20.\n *\n * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/UNECERec20/\n */\nexport type PeppolQuantityUnitCode = typeof quantityUnitCodesSchema.Type;\n\n/**\n * @description Validates a unit of measure code against the PEPPOL subset of UN/ECE Recommendation 20.\n *\n * @param error - The custom error message to use when validation fails.\n *\n * @returns An Effect schema that accepts only valid quantity unit codes.\n *\n * @validations\n * - BR-CL-23: Unit of measure code MUST be a valid UN/ECE Rec 20 code.\n *\n * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/UNECERec20/\n */\nexport const quantityUnitCodesSchema = Schema.Literals(quantityUnitCodesKeys).pipe(Schema.brand('PeppolQuantityUnitCode'));\n","import { Schema } from 'effect';\n\nimport { opaque } from '#/schemas/utils/opaque.ts';\nimport { quantityUnitCodesSchema } from '#/schemas/values/quantity-unit-codes-schema.ts';\n\n/**\n * @summary Quantity with optional unit code\n *\n * @name `cbc:* (+ @unitCode)`\n */\nexport class PeppolQuantity extends opaque<PeppolQuantity>()(\n Schema.Struct({\n /**\n * @name `@unitCode`\n */\n unitCode: Schema.optional(quantityUnitCodesSchema),\n /**\n * @name `#text (value)`\n */\n value: Schema.Finite,\n })\n) {}\n","import { Schema } from 'effect';\n\nimport { PeppolAmount } from '#/schemas/fields/peppol-amount-schema.ts';\nimport { PeppolLinePriceAllowanceCharge } from '#/schemas/fields/peppol-line-price-allowance-charge-schema.ts';\nimport { PeppolQuantity } from '#/schemas/fields/peppol-quantity-schema.ts';\nimport { opaque } from '#/schemas/utils/opaque.ts';\n\n/**\n * @summary Price details on invoice line\n *\n * @name cac:Price\n */\nexport class PeppolLinePrice extends opaque<PeppolLinePrice>()(\n Schema.Struct({\n /**\n * @name cac:AllowanceCharge\n *\n * @cardinality 0..1\n */\n allowanceCharge: Schema.optional(PeppolLinePriceAllowanceCharge),\n /**\n * @name cbc:BaseQuantity (+ @unitCode)\n *\n * @cardinality 0..1\n */\n baseQuantity: Schema.optional(PeppolQuantity),\n /**\n * @name cbc:PriceAmount (+ @currencyID)\n */\n priceAmount: PeppolAmount,\n })\n) {}\n","import { Effect, Schema } from 'effect';\n\nimport { PeppolAmount } from '#/schemas/fields/peppol-amount-schema.ts';\nimport { PeppolIdentifier } from '#/schemas/fields/peppol-identifier-schema.ts';\nimport { PeppolInvoiceLinePeriod } from '#/schemas/fields/peppol-invoice-line-period-schema.ts';\nimport { peppolLineAllowanceChargeSchema } from '#/schemas/fields/peppol-line-allowance-charge-schema.ts';\nimport { PeppolLineItem } from '#/schemas/fields/peppol-line-item-schema.ts';\nimport { PeppolLinePrice } from '#/schemas/fields/peppol-line-price-schema.ts';\nimport { opaque } from '#/schemas/utils/opaque.ts';\n\nexport class PeppolOrderLineReference extends opaque<PeppolOrderLineReference>()(Schema.Struct({ lineId: Schema.String })) {}\n\n/**\n * @description Base of the invoice line and credit note line schemas.\n */\nexport class PeppolBaseLine extends opaque<PeppolBaseLine>()(\n Schema.Struct({\n /**\n * @description A textual value that specifies where to book the relevant data into the Buyer's financial accounts.\n *\n * @example\n * `1287:65464`;\n *\n * @summary Invoice line Buyer accounting reference\n *\n * @name cbc:AccountingCost\n *\n * @cardinality 0..1\n */\n accountingCost: Schema.optional(Schema.String),\n /**\n * @description A group of business terms providing information about allowances or charges applicable to the individual Invoice line.\n *\n * @summary Invoice line allowances or charges\n *\n * @name cac:AllowanceCharge\n *\n * @cardinality 0..n\n */\n allowanceCharges: Schema.optional(Schema.Array(peppolLineAllowanceChargeSchema)),\n /**\n * @summary Line object identifier\n *\n * @name cac:DocumentReference\n *\n * @cardinality 0..1\n */\n documentReference: Schema.optional(\n Schema.Array(\n PeppolIdentifier.pipe(\n Schema.fieldsAssign({\n /**\n * @default 130\n *\n * @name cbc:DocumentTypeCode\n */\n documentTypeCode: Schema.String.pipe(Schema.withDecodingDefaultType(Effect.succeed('130'))),\n })\n )\n )\n ),\n /**\n * @description A unique identifier for the individual line within the Invoice.\n *\n * @example\n * 12;\n *\n * @summary Invoice line identifier\n *\n * @name cbc:ID\n *\n * @cardinality 1..1\n */\n id: Schema.String,\n /**\n * @description A group of business terms providing information about the period relevant for the Invoice line.\n *\n * @summary Invoice line period\n *\n * @name cac:InvoicePeriod\n *\n * @cardinality 0..1\n */\n invoicePeriod: Schema.optional(PeppolInvoiceLinePeriod),\n /**\n * @description A group of business terms providing information about the goods and services invoiced.\n *\n * @summary Item information\n *\n * @name cac:Item\n *\n * @cardinality 1..1\n */\n item: PeppolLineItem,\n /**\n * @description The total amount of the Invoice line. The amount is “net” without VAT, i.e. inclusive of line level allowances and charges as well as other\n * relevant taxes. Must be rounded to maximum 2 decimals.\n *\n * @example\n * { value: 2145.0, currencyId: \"EUR\" }\n *\n * @summary Invoice line net amount\n *\n * @name cbc:LineExtensionAmount (+ @currencyID)\n *\n * @cardinality 1..1\n */\n lineExtensionAmount: PeppolAmount,\n /**\n * @description A textual note that gives unstructured information that is relevant to the Invoice line.\n *\n * @example\n * New article number 12345\n *\n * @summary Invoice line note\n *\n * @name cbc:Note\n *\n * @cardinality 0..1\n */\n note: Schema.optional(Schema.String),\n /**\n * @summary Order line reference\n *\n * @name cac:OrderLineReference\n *\n * @cardinality 0..1\n */\n orderLineReference: Schema.optional(PeppolOrderLineReference),\n /**\n * @description A group of business terms providing information about the price applied for the goods and services invoices on the Invoice line.\n *\n * @summary Price Details\n *\n * @name cac:Price\n *\n * @cardinality 1..1\n */\n price: PeppolLinePrice,\n })\n) {}\n","import { Schema } from 'effect';\n\nimport { PeppolBaseLine } from '#/schemas/fields/peppol-base-line-schema.ts';\nimport { PeppolQuantity } from '#/schemas/fields/peppol-quantity-schema.ts';\nimport { opaque } from '#/schemas/utils/opaque.ts';\nimport { quantityUnitCodesSchema } from '#/schemas/values/quantity-unit-codes-schema.ts';\n\n/**\n * @summary Invoice line\n *\n * @name cac:InvoiceLine\n */\nexport class PeppolInvoiceLine extends opaque<PeppolInvoiceLine>()(\n Schema.Struct({\n ...PeppolBaseLine.fields,\n /**\n * @description The quantity of items (goods or services) that is charged in the Invoice line.\n *\n * @example\n * { value: 100, unitCode: \"C62\" }\n *\n * @summary Invoiced quantity\n *\n * @name cbc:InvoicedQuantity (+ @unitCode)\n */\n invoicedQuantity: PeppolQuantity.pipe(\n Schema.fieldsAssign({\n /**\n * @description The unit of measure that applies to the invoiced quantity. Codes for unit of packaging from UNECE Recommendation No. 21 can be used in\n * accordance with the descriptions in the \"Intro\" section of UN/ECE Recommendation 20, Revision 11 (2015): The 2 character alphanumeric code\n * values in UNECE Recommendation 21 shall be used. To avoid duplication with existing code values in UNECE Recommendation No. 20, each code\n * value from UNECE Recommendation 21 shall be prefixed with an “X”, resulting in a 3 alphanumeric code when used as a unit of measure.\n *\n * @example\n * `C62`;\n *\n * @summary Invoiced quantity unit of measure\n *\n * @see {@link quantityUnitCodes}\n */\n unitCode: quantityUnitCodesSchema,\n })\n ),\n })\n) {}\nexport interface PeppolInvoiceLineEncoded extends Schema.Codec.Encoded<typeof PeppolInvoiceLine> {}\n","import { Schema } from 'effect';\n\nimport { invoiceTypeCodesKeys } from '#/values/invoice-type-codes.generated';\n\n/**\n * @description An invoice type code as defined by the PEPPOL subset of UNCL 1001 (invoice).\n *\n * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/UNCL1001-inv/\n */\nexport type PeppolInvoiceTypeCode = typeof invoiceTypeCodeSchema.Type;\n\n/**\n * @description Validates an invoice type code against the PEPPOL subset of UNCL 1001 (invoice).\n *\n * @param error - The custom error message to use when validation fails.\n *\n * @returns An Effect schema that accepts only valid invoice type codes.\n *\n * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/UNCL1001-inv/\n */\nexport const invoiceTypeCodeSchema = Schema.Literals(invoiceTypeCodesKeys).pipe(Schema.brand('PeppolInvoiceTypeCode'));\n","import { Schema } from 'effect';\n\nimport { PeppolInvoiceLine } from '#/schemas/fields/peppol-invoice-line-schema.ts';\nimport { PeppolBillingBase } from '#/schemas/peppol-billing-base-schema.ts';\nimport { PeppolIsoDateString } from '#/schemas/peppol-iso-date-string.ts';\nimport { opaque } from '#/schemas/utils/opaque.ts';\nimport { invoiceTypeCodeSchema } from '#/schemas/values/invoice-type-code-schema.ts';\n\nexport class PeppolProjectReference extends opaque<PeppolProjectReference>()(Schema.Struct({ id: Schema.String })) {}\n\nexport class PeppolInvoice extends opaque<PeppolInvoice>()(\n Schema.Struct({\n ...PeppolBillingBase.fields,\n /**\n * @example\n * `2017-11-01`;\n *\n * @summary Payment due date\n *\n * @name cbc:DueDate\n */\n dueDate: Schema.optional(PeppolIsoDateString),\n /**\n * @summary INVOICE LINE\n *\n * @name cac:InvoiceLine\n */\n invoiceLines: Schema.Array(PeppolInvoiceLine).check(Schema.isMinLength(1)),\n /**\n * @example\n * `380`;\n *\n * @summary Invoice type code\n *\n * @name cbc:InvoiceTypeCode\n */\n invoiceTypeCode: invoiceTypeCodeSchema,\n /**\n * @summary PROJECT REFERENCE\n *\n * @name cac:ProjectReference\n */\n projectReference: Schema.optional(PeppolProjectReference),\n })\n) {}\n","import { Schema } from 'effect';\n\nimport { PeppolBaseLine } from '#/schemas/fields/peppol-base-line-schema.ts';\nimport { PeppolQuantity } from '#/schemas/fields/peppol-quantity-schema.ts';\nimport { opaque } from '#/schemas/utils/opaque.ts';\nimport { quantityUnitCodesSchema } from '#/schemas/values/quantity-unit-codes-schema.ts';\n\n/**\n * @description Credit note line is identical to Invoice line except the quantity element name.\n */\nexport class PeppolCreditNoteLine extends opaque<PeppolCreditNoteLine>()(\n PeppolBaseLine.pipe(\n Schema.fieldsAssign({\n /**\n * @description Invoiced/Credited quantity.\n *\n * @example\n * { value: 40, unitCode: \"C62\" }\n *\n * @name cbc:CreditedQuantity (+ @unitCode)\n */\n creditedQuantity: PeppolQuantity.pipe(\n Schema.fieldsAssign({\n /**\n * @description The unit of measure that applies to the invoiced quantity. Codes for unit of packaging from UNECE Recommendation No. 21 can be used in\n * accordance with the descriptions in the \"Intro\" section of UN/ECE Recommendation 20, Revision 11 (2015): The 2 character alphanumeric\n * code values in UNECE Recommendation 21 shall be used. To avoid duplication with existing code values in UNECE Recommendation No. 20, each\n * code value from UNECE Recommendation 21 shall be prefixed with an “X”, resulting in a 3 alphanumeric code when used as a unit of\n * measure.\n *\n * @example\n * `C62`;\n *\n * @summary Invoiced quantity unit of measure\n *\n * @see {@link quantityUnitCodes}\n */\n unitCode: quantityUnitCodesSchema,\n })\n ),\n })\n )\n) {}\nexport interface PeppolCreditNoteLineEncoded extends Schema.Codec.Encoded<typeof PeppolCreditNoteLine> {}\n","import { Schema } from 'effect';\n\nimport type { CreditNoteTypeCodesKeys } from '#/values/credit-notes-type-codes.generated';\n\nimport { creditNoteTypeCodesKeys } from '#/values/credit-notes-type-codes.generated';\n\n/**\n * @description A credit note type code as defined by the PEPPOL subset of UNCL 1001 (credit note).\n *\n * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/UNCL1001-cn/\n */\nexport type PeppolCreditNoteTypeCode = CreditNoteTypeCodesKeys;\n\n/**\n * @description Validates a credit note type code against the PEPPOL subset of UNCL 1001 (credit note).\n *\n * @param error - The custom error message to use when validation fails.\n *\n * @returns An Effect schema that accepts only valid credit note type codes.\n *\n * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/UNCL1001-cn/\n */\nexport const creditNoteTypeCodeSchema = Schema.Literals(creditNoteTypeCodesKeys);\n","import { Schema } from 'effect';\n\nimport { PeppolCreditNoteLine } from '#/schemas/fields/peppol-credit-note-line-schema.ts';\nimport { PeppolBillingBase } from '#/schemas/peppol-billing-base-schema.ts';\nimport { opaque } from '#/schemas/utils/opaque.ts';\nimport { creditNoteTypeCodeSchema } from '#/schemas/values/credit-note-type-code-schema.ts';\n\n/**\n * @description Main UBL Credit Note schema (camelCase properties) Effect port of `creditNoteSchema` (`z.extend(billingBaseSchema, ...)` →\n * `PeppolBillingBase.pipe(Schema.fieldsAssign(...))`).\n */\nexport class PeppolCreditNote extends opaque<PeppolCreditNote>()(\n Schema.Struct({\n ...PeppolBillingBase.fields,\n /**\n * @description CREDIT NOTE LINE.\n *\n * @name cac:CreditNoteLine (1..n)\n */\n creditNoteLines: Schema.Array(PeppolCreditNoteLine).check(Schema.isMinLength(1)),\n /**\n * @description Invoice type code A code specifying the functional type of the Credit Note.\n *\n * @example\n * 381;\n *\n * @name cbc:CreditNoteTypeCode\n */\n creditNoteTypeCode: creditNoteTypeCodeSchema,\n })\n) {}\n","import { Schema } from 'effect';\n\nimport { PeppolIdentifier } from '#/schemas/fields/peppol-identifier-schema.ts';\nimport { opaque } from '#/schemas/utils/opaque.ts';\n\nexport class PeppolMessageLevelResponseParty extends opaque<PeppolMessageLevelResponseParty>()(\n Schema.Struct({\n /**\n * @description Identifies the sender party's electronic address.\n *\n * @example\n * 7300010000001;\n *\n * @summary Sender/Receiver party's electronic address\n *\n * @name `cbc:EndpointID (+ @schemeID)`\n */\n endpointId: Schema.optional(PeppolIdentifier),\n })\n) {}\n","import { Schema } from 'effect';\n\nimport { documentTypeCodesKeys } from '#/values/document-type-codes.generated';\n\n/**\n * @description A document type code as defined by the PEPPOL subset of UNCL 1001 (document/message name code).\n *\n * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/UNCL1001/\n */\nexport type PeppolDocumentTypeCode = typeof peppolDocumentTypeCodeSchema.Type;\n\n/**\n * @description Validates a document type code against the PEPPOL subset of UNCL 1001.\n *\n * @param error - The custom error message to use when validation fails.\n *\n * @returns An Effect schema that accepts only valid document type codes.\n *\n * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/UNCL1001/\n */\nexport const peppolDocumentTypeCodeSchema = Schema.Literals(documentTypeCodesKeys).pipe(Schema.brand('PeppolDocumentTypeCode'));\n","import { Schema } from 'effect';\n\nimport { opaque } from '#/schemas/utils/opaque.ts';\nimport { peppolDocumentTypeCodeSchema } from '#/schemas/values/peppol-document-type-code-schema.ts';\n\nexport class PeppolDocumentResponseDocumentReference extends opaque<PeppolDocumentResponseDocumentReference>()(\n Schema.Struct({\n /**\n * @description Identifies the document on which the message level response is based.\n *\n * @example\n * `EnvelopeID-12345`;\n *\n * @summary Document identifier\n *\n * @name `cbc:ID`\n */\n id: Schema.String,\n /**\n * @description The type of the document being referred to, expressed as a code.\n *\n * @summary Document type code\n *\n * @name `cbc:DocumentTypeCode`\n */\n documentTypeCode: Schema.optional(peppolDocumentTypeCodeSchema),\n /**\n * @description The version of the document that has been identifier with the document identifier.\n *\n * @example\n * `2`;\n *\n * @summary Document version identifier\n *\n * @name `cbc:VersionID`\n */\n versionId: Schema.optional(Schema.String),\n })\n) {}\n\nexport type PeppolMessageLevelDocumentResponseDocumentReference = PeppolDocumentResponseDocumentReference;\n","import { Schema } from 'effect';\n\nimport type { ApplicationResponseTypeCodesKeys } from '#/values/application-response-type-codes.generated';\n\nimport { applicationResponseTypeCodesKeys } from '#/values/application-response-type-codes.generated';\n\n/**\n * @description An application response type code as defined by the PEPPOL subset of UNCL 4343.\n *\n * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/UNCL4343/\n */\nexport type PeppolApplicationResponseTypeCode = ApplicationResponseTypeCodesKeys;\n\n/**\n * @description Validates an application response type code against the PEPPOL subset of UNCL 4343.\n *\n * @param error - The custom error message to use when validation fails.\n *\n * @returns An Effect schema that accepts only valid application response type codes.\n *\n * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/UNCL4343/\n */\nexport const applicationResponseTypeCodeSchema = Schema.Literals(applicationResponseTypeCodesKeys);\n","import { Schema } from 'effect';\n\nimport { opaque } from '#/schemas/utils/opaque.ts';\nimport { applicationResponseTypeCodeSchema } from '#/schemas/values/application-response-type-code-schema.ts';\n\n/**\n * @summary Response information\n *\n * @name `cac:Response`\n *\n * @cardinality (1..1)\n *\n * @see {@link messageLevelResponseDocumentResponseSchema}\n */\nexport class PeppolDocumentResponseDocument extends opaque<PeppolDocumentResponseDocument>()(\n Schema.Struct({\n /**\n * @description An indicator stating whether the referenced message was cleared through validation and advanced to the next step in the process. A negative\n * response states that the document was not processed because of identified issues.\n *\n * @example\n * `RE`;\n *\n * @summary Message response code\n *\n * @name `cbc:ResponseCode`\n */\n responseCode: applicationResponseTypeCodeSchema,\n /**\n * @description Used to meake any comments or instructions relevant to the response. The use of this element requires manual assessment by the receiver.\n *\n * @summary Response textual notes\n */\n description: Schema.optional(Schema.String),\n })\n) {}\n\nexport type PeppolMessageLevelResponseDocumentResponseDocument = PeppolDocumentResponseDocument;\n","import { Schema } from 'effect';\n\nimport { opaque } from '#/schemas/utils/opaque.ts';\nimport { applicationResponseTypeCodeSchema } from '#/schemas/values/application-response-type-code-schema.ts';\n\nexport class PeppolStatus extends opaque<PeppolStatus>()(\n Schema.Struct({\n /**\n * @description A codified version of the issue description that describes the nature of the issue. e.g. Syntax violation, business rule violation, ...\n *\n * @summary Issue type coded\n *\n * @name `cbc:StatusReasonCode`\n */\n statusReasonCode: Schema.Literals(['BV', 'BW', 'SV']),\n })\n) {}\n\nexport class PeppolDocumentResponseLineResponseContent extends opaque<PeppolDocumentResponseLineResponseContent>()(\n Schema.Struct({\n /**\n * @description An indicator stating whether the referenced message was cleared through validation and advanced to the next step in the process. A negative\n * response states that the document was not processed because of identified issues.\n *\n * @example\n * `RE`;\n *\n * @summary Line response code\n *\n * @name `cbc:ResponseCode`\n */\n responseCode: applicationResponseTypeCodeSchema,\n /**\n * @description The description of the issued identifier in the transaction document.\n *\n * @example\n * `Validation gives error [CL-T77-R0002]- Tax categories MUST be coded using UN/ECE 5305 code list`;\n *\n * @summary Issue description\n *\n * @name `cbc:Description`\n */\n description: Schema.String,\n /**\n * @name `cac:Status`\n */\n status: PeppolStatus,\n })\n) {}\n","import { Schema } from 'effect';\n\nimport { PeppolDocumentResponseLineResponseContent } from '#/schemas/peppol-document-response-line-response-content-schema.ts';\nimport { opaque } from '#/schemas/utils/opaque.ts';\n\nexport class PeppolLineReference extends opaque<PeppolLineReference>()(\n Schema.Struct({\n /**\n * @description Identifies the section of the document to which the reported issue applied. The LineID element mustbe used to indicate where in the business\n * document the error occurred by using XPath to reference the element causing the error. To cater for scenarios where it is not possible to\n * provide XPath, a dummy value must be applied. The dummay value must consist of the characters NA. This is due to that the LineID element is\n * mendatory in the ApplicationResponse message in UBL 2.1 on which the MLR message is based.\n *\n * @example\n * `/Catalogue/cac:CatalogueLine[3]/cac:Item[1]/cac:ClassifiedTaxCategory[1]/cbc:ID[1]`;\n *\n * @summary Section identifier\n */\n lineId: Schema.String,\n })\n) {}\n\nexport class PeppolDocumentResponseLineResponse extends opaque<PeppolDocumentResponseLineResponse>()(\n Schema.Struct({\n /**\n * @description Identifies the line in the business document to which the reported issue applies.\n *\n * @summary Line reference\n *\n * @name `cac:LineReference`\n */\n lineReference: PeppolLineReference,\n /**\n * @summary Line response information\n */\n response: PeppolDocumentResponseLineResponseContent,\n })\n) {}\n\nexport type PeppolMessageLevelDocumentResponseLineResponse = PeppolDocumentResponseLineResponse;\n","import { Schema } from 'effect';\n\nimport { PeppolDocumentResponseDocumentReference } from '#/schemas/peppol-document-response-document-reference-schema.ts';\nimport { PeppolDocumentResponseDocument } from '#/schemas/peppol-document-response-document-schema.ts';\nimport { PeppolDocumentResponseLineResponse } from '#/schemas/peppol-document-response-line-response-schema.ts';\nimport { opaque } from '#/schemas/utils/opaque.ts';\n\nexport class PeppolMessageLevelResponseDocumentResponse extends opaque<PeppolMessageLevelResponseDocumentResponse>()(\n Schema.Struct({\n /**\n * @summary Response information\n *\n * @name `cac:Response`\n *\n * @cardinality (1..1)\n */\n response: PeppolDocumentResponseDocument,\n /**\n * @description The document reference is used to provide a reference to the envelope of the business document on which the message level response is based.\n * The message level response message may only cover exactly one business document. The element\n * `cac:DocumentResponse/cac:DocumentReference/cbc:ID` **MUST** contain the instance identifier of the envelope of the original business\n * document.\n *\n * @summary Document reference\n */\n documentReference: PeppolDocumentResponseDocumentReference,\n /**\n * @description A response to a particular line in the document. If the document response is negative (code='RE'), the line response element is used to specify\n * the errors in the business document.\n *\n * @summary Line response information\n */\n lineResponse: Schema.Array(PeppolDocumentResponseLineResponse),\n })\n) {}\n","import { DateTime } from 'effect';\n\n/**\n * @description Pads a number with leading zeros, preserving a leading `-` for negative values. Extracted from date-fns\n * `pkgs/core/src/_lib/addLeadingZeros/index.ts`.\n *\n * @param value - The number to pad.\n * @param targetLength - The total length the output should have.\n *\n * @returns The zero-padded string.\n */\nconst addLeadingZeros = (value: number, targetLength: number): string => {\n const sign = value < 0 ? '-' : '';\n return sign + Math.abs(value).toString().padStart(targetLength, '0');\n};\n\n/**\n * @description The `HH`, `mm` and `ss` tokens extracted from the date-fns `lightFormatters` (`pkgs/core/src/_lib/format/lightFormatters/index.ts`). The date-fns\n * implementation reads the local components of a `Date`; this port reads the UTC components because the caller hands it a `Date` whose UTC fields\n * already hold the wall-clock time of the target time zone.\n *\n * @param date - A `Date` whose UTC fields hold the wall-clock time to format.\n *\n * @returns The zero-padded `HH` component.\n */\nconst formatHours = (date: Date): string => addLeadingZeros(date.getUTCHours(), 2);\n\n/**\n * @description See {@link formatHours}. Formats the `mm` token.\n *\n * @param date - A `Date` whose UTC fields hold the wall-clock time to format.\n *\n * @returns The zero-padded `mm` component.\n */\nconst formatMinutes = (date: Date): string => addLeadingZeros(date.getUTCMinutes(), 2);\n\n/**\n * @description See {@link formatHours}. Formats the `ss` token. Fractional seconds are dropped because XSD `time` values produced by this library carry second\n * precision.\n *\n * @param date - A `Date` whose UTC fields hold the wall-clock time to format.\n *\n * @returns The zero-padded `ss` component.\n */\nconst formatSeconds = (date: Date): string => addLeadingZeros(date.getUTCSeconds(), 2);\n\n/**\n * @description Formats a UTC offset as the ISO-8601 `XXX` token (`+HH:MM` / `-HH:MM`). The digit handling is extracted from date-fns `formatTimezone`\n * (`pkgs/core/src/_lib/format/formatters/index.ts`) with two deliberate differences:\n *\n * 1. The offset is expressed in the standard direction (positive means east of UTC) instead of JavaScript's inverted `Date#getTimezoneOffset` sign.\n * 2. A zero offset returns an empty string. date-fns renders it as `Z`; XSD `time` wants the time zone to be optional, so UTC produces no offset at all.\n *\n * @param offsetInMinutes - The offset east of UTC in minutes (for example `+05:30` is `330`).\n *\n * @returns The formatted offset, or an empty string for UTC.\n */\nexport const formatTimeZoneOffset = (offsetInMinutes: number): string => {\n if (offsetInMinutes === 0) return '';\n const sign = offsetInMinutes > 0 ? '+' : '-';\n const absoluteOffset = Math.abs(offsetInMinutes);\n const hours = addLeadingZeros(Math.trunc(absoluteOffset / 60), 2);\n const minutes = addLeadingZeros(absoluteOffset % 60, 2);\n return `${sign}${hours}:${minutes}`;\n};\n\n/**\n * @description Formats a `DateTime` as an XSD `time` lexical value: `HH:mm:ss` followed by an optional `±HH:MM` offset. The offset is omitted for UTC, so a UTC\n * value encodes as bare `HH:mm:ss` while a zoned value encodes as `HH:mm:ss±HH:MM`. Fractional seconds are intentionally dropped to match the second\n * precision the schema round-trips.\n *\n * @param date - The `DateTime` to format. It is rendered in its own time zone, not normalised to UTC.\n *\n * @returns The XSD `time` string.\n */\nexport const formatXsdTime = (date: DateTime.DateTime): string => {\n const wallClock = DateTime.toDate(date);\n const offsetInMinutes = (wallClock.getTime() - DateTime.toEpochMillis(date)) / (60 * 1000);\n return `${formatHours(wallClock)}:${formatMinutes(wallClock)}:${formatSeconds(wallClock)}${formatTimeZoneOffset(offsetInMinutes)}`;\n};\n","import { Clock, Option, DateTime, Effect, Predicate, Schema, SchemaGetter, SchemaIssue } from 'effect';\n\nimport { formatXsdTime } from '#/schemas/utils/format-xsd-time.ts';\nimport { opaque } from '#/schemas/utils/opaque.ts';\n\nconst timeRegex =\n /^(?<hours>[01]\\d|2[0-3]):(?<minutes>[0-5]\\d):(?<seconds>[0-5]\\d)(?<nanoseconds>\\.\\d{1,9})?(?<tz>(?:Z|-0[1-9]|-1\\d|-2[0-3]|-00:?(?:0[1-9]|[1-5]\\d)|\\+[01]\\d|\\+2[0-3])?(?:|:?[0-5]\\d))$/;\nconst timeZoneRegex = /^(?:(?<utc>Z)|[-+](?<hours>0[1-9]|1\\d|2[0-3]|00):?(?<minutes>[0-5]\\d))$/;\nconst numberFromString = (value: string | undefined): number => {\n if (value === undefined) {\n return 0;\n }\n const parsed = Number(value);\n return Number.isFinite(parsed) ? parsed : 0;\n};\n\n/**\n * @description Parse a timezone offset from a string. The string must be in the format `(+|-)HH:MM` where `HH` and `MM` are two digits.\n *\n * @param tz - The timzeone offset string.\n *\n * @returns\n *\n * @internal\n */\nexport const parseZoneOffsetFromString = (tz: `+${number}:${number}` | `-${number}:${number}` | (string & {})) => {\n const tzRegexResult = timeZoneRegex.exec(tz);\n if (Predicate.isNullish(tzRegexResult)) {\n return undefined;\n }\n const [_tzParsed, _isUtc, tzHours, tzMinutes] = tzRegexResult;\n const offset = DateTime.zoneMakeOffset((numberFromString(tzHours) * 60 + numberFromString(tzMinutes)) * 60 * 1000);\n return offset;\n};\n\n/**\n * @description XSD `time` lexical value (`HH:MM:SS` with optional fractional seconds and timezone). Effect port of `xsdTime` (`z.string().check(z.regex(...))`):\n * keeps the value as a plain string and only validates the shape.\n */\nexport class PeppolXsdTime extends opaque<PeppolXsdTime>()(\n Schema.String.check(\n Schema.isPattern(\n /^(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d{1,9})?(?:Z|-0[1-9]|-1\\d|-2[0-3]|-00:?(?:0[1-9]|[1-5]\\d)|\\+[01]\\d|\\+2[0-3])?(?:|:?[0-5]\\d)$/\n ).annotate({ message: 'Invalid ISO time' })\n )\n .pipe(\n Schema.decodeTo(Schema.DateTimeUtc, {\n decode: SchemaGetter.transformEffect((input, options) =>\n Clock.currentTimeMillis.pipe(\n Effect.map(millis => DateTime.make(millis)),\n Effect.flatMap(option => Effect.fromOption(option)),\n Effect.map(date =>\n DateTime.withDate(date, date => {\n const regexResult = timeRegex.exec(input);\n if (Predicate.isNullish(regexResult)) return Option.none();\n const [_time, hours, minutes, seconds, nanoseconds, tz] = regexResult;\n\n date.setUTCHours(numberFromString(hours), numberFromString(minutes), numberFromString(seconds), numberFromString(nanoseconds));\n if (Predicate.isUndefined(tz) || tz === 'Z') {\n return DateTime.make(date.getTime());\n }\n const offset = parseZoneOffsetFromString(tz);\n if (Predicate.isNullish(offset)) {\n return DateTime.make(date.getTime());\n }\n\n return DateTime.makeZoned(date.getTime(), { adjustForTimeZone: false, timeZone: offset }).pipe(\n Option.map(date => DateTime.toUtc(date))\n );\n })\n ),\n Effect.flatMap(option => Effect.fromOption(option)),\n Effect.catchTag('NoSuchElementError', () => Effect.fail(new SchemaIssue.InvalidValue({ message: 'Invalid date input' }, input, options)))\n )\n ),\n encode: SchemaGetter.transform(self => formatXsdTime(self)),\n })\n )\n .annotate({ message: 'Invalid ISO time' })\n) {}\n","import { Schema } from 'effect';\n\nimport { MESSAGE_LEVEL_RESPONSE_PROFILE_ID } from '#/constants/message-level-response-profile-id.ts';\nimport { PeppolIsoDateString } from '#/schemas/peppol-iso-date-string.ts';\nimport { PeppolMessageLevelResponseDocumentResponse } from '#/schemas/peppol-message-level-response-document-response-schema.ts';\nimport { PeppolMessageLevelResponseParty } from '#/schemas/peppol-message-level-response-party-schema.ts';\nimport { opaque } from '#/schemas/utils/opaque.ts';\nimport { PeppolXsdTime } from '#/schemas/utils/peppol-xsd-time-schema.ts';\n\nexport class PeppolMessageLevelResponse extends opaque<PeppolMessageLevelResponse>()(\n Schema.Struct({\n /**\n * @description Identifies the specification of content and rules that apply to the transaction.\n *\n * @default `urn:fdc:peppol.eu:poacc:trns:mlr:3`\n *\n * @summary Specification identification\n *\n * @name `cbc:CustomizationID`\n *\n * @cardinality 1..1\n */\n customizationId: Schema.String,\n /**\n * @description Identifies the BII profile or business process context in which the transaction appears.\n *\n * @remarks\n * Fixed value to `urn:fdc:peppol.eu:poacc:bis:mlr:3`\n *\n * @default `urn:fdc:peppol.eu:poacc:bis:mlr:3`\n *\n * @summary Business process type identifier\n *\n * @name `cbc:ProfileID`\n */\n profileId: Schema.Literal(MESSAGE_LEVEL_RESPONSE_PROFILE_ID),\n /**\n * @description A transaction instance must contain an identifier. The identifier enables positive referencing the transaction instance for various puropses\n * including referencing between transactions that are part of the same process.\n *\n * @example\n * 23;\n *\n * @summary Response identifier\n *\n * @name cbc:ID\n */\n id: Schema.String,\n /**\n * @description The date on which the transaction instance was issued.\n *\n * @example\n * 2017 - 11 - 01;\n *\n * @summary Response issue date\n *\n * @format `YYYY-MM-DD`\n *\n * @name cbc:IssueDate\n */\n issueDate: PeppolIsoDateString,\n /**\n * @description The time at which the transaction instance was issued.\n *\n * @example\n * 12:01:34\n *\n * @summary Response issue time\n *\n * @format `hh:mm:ss`\n *\n * @name cbc:IssueDate\n */\n issueTime: Schema.optional(PeppolXsdTime),\n /**\n * @description The party sending an electronic message level response message back to the sending party of the business document.\n *\n * @summary Sender information\n */\n senderParty: PeppolMessageLevelResponseParty,\n /**\n * @description The party, an electronic message level response was addressed to, and who is supposed to process the message level response. This is the same\n * party as the sender of the business document.\n *\n * @summary Receiver information\n */\n receiverParty: PeppolMessageLevelResponseParty,\n /**\n * @description The document response is used to indicate the result of business document validation. The element\n * `cac:DocumentResponse/cac:Response/cbc:ResponseCode` MUST contain the overall result code.\n *\n * @summary Document response\n *\n * @name `cac:DocumentResponse`\n */\n documentResponse: PeppolMessageLevelResponseDocumentResponse,\n })\n) {}\n","import { Schema } from 'effect';\n\nimport { opStatusActionKeys } from '#/values/op-status-action.generated';\n\n/**\n * @description An OpenPeppol operation status action code (e.g. the outcome of a message response).\n *\n * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/OPStatusAction/\n */\nexport type PeppolOpStatusAction = typeof opStatusActionSchema.Type;\n\n/**\n * @description Validates an OpenPeppol operation status action code against the OPStatusAction codelist.\n *\n * @param error - The custom error message to use when validation fails.\n *\n * @returns An Effect schema that accepts only valid operation status action codes.\n *\n * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/OPStatusAction/\n */\nexport const opStatusActionSchema = Schema.Literals(opStatusActionKeys).pipe(Schema.brand('PeppolOpStatusAction'));\n","import { Schema } from 'effect';\n\nimport { opStatusReasonKeys } from '#/values/op-status-reason.generated';\n\n/**\n * @description An OpenPeppol operation status reason code (e.g. the reason for a message response outcome).\n *\n * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/OPStatusReason/\n */\nexport type PeppolOpStatusReason = typeof opStatusReasonSchema.Type;\n\n/**\n * @description Validates an OpenPeppol operation status reason code against the OPStatusReason codelist.\n *\n * @param error - The custom error message to use when validation fails.\n *\n * @returns An Effect schema that accepts only valid operation status reason codes.\n *\n * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/OPStatusReason/\n */\nexport const opStatusReasonSchema = Schema.Literals(opStatusReasonKeys).pipe(Schema.brand('PeppolOpStatusReason'));\n","import { Schema } from 'effect';\n\nimport { opaque } from '#/schemas/utils/opaque.ts';\nimport { opStatusActionSchema } from '#/schemas/values/op-status-action-schema.ts';\nimport { opStatusReasonSchema } from '#/schemas/values/op-status-reason-schema.ts';\n\nexport class PeppolInvoiceResponseStatusReasonCodeReason extends opaque<PeppolInvoiceResponseStatusReasonCodeReason>()(\n Schema.Struct({\n value: opStatusReasonSchema,\n /**\n * @description List identifier for clarification.\n *\n * @summary List identifier\n *\n * @name `@listId`\n */\n listId: Schema.Literal('OPStatusReason'),\n })\n) {}\n\nexport class PeppolInvoiceResponseStatusReasonCodeAction extends opaque<PeppolInvoiceResponseStatusReasonCodeAction>()(\n Schema.Struct({\n value: opStatusActionSchema,\n /**\n * @description List identifier for clarification.\n *\n * @summary List identifier\n *\n * @name `@listId`\n */\n listId: Schema.Literal('OPStatusAction'),\n })\n) {}\n\nexport const peppolInvoiceResponseStatusReasonCodeSchema = Schema.Union([\n PeppolInvoiceResponseStatusReasonCodeAction,\n PeppolInvoiceResponseStatusReasonCodeReason,\n]);\n\nexport type PeppolInvoiceResponseStatusReasonCode = typeof peppolInvoiceResponseStatusReasonCodeSchema.Type;\n","import { Schema } from 'effect';\n\nimport { peppolInvoiceResponseStatusReasonCodeSchema } from '#/schemas/peppol-invoice-response-status-reason-code-schema.ts';\nimport { opaque } from '#/schemas/utils/opaque.ts';\n\nexport class PeppolInvoiceResponseCondition extends opaque<PeppolInvoiceResponseCondition>()(\n Schema.Struct({\n /**\n * @description A code defining the type of the detail.\n *\n * @example\n * `BT-75`;\n *\n * @summary Detail type code\n *\n * @name `cbc:AttributeId`\n */\n attributeId: Schema.String,\n /**\n * @description The value of the detail.\n *\n * @example\n * `EU123456789`;\n *\n * @summary Detail value\n *\n * @name `cbc:Description`\n */\n description: Schema.optional(Schema.String),\n })\n) {}\n\nexport class PeppolInvoiceResponseDocumentActualResponseStatus extends opaque<PeppolInvoiceResponseDocumentActualResponseStatus>()(\n Schema.Struct({\n /**\n * @description A code defining a clarification given for the invoice status.\n *\n * @summary Clarification code\n *\n * @name `cbc:StatusReasonCode`\n */\n statusReasonCode: Schema.optional(peppolInvoiceResponseStatusReasonCodeSchema),\n /**\n * @description The description of the clarification given for the invoice status.\n *\n * @example\n * `TAX reference not found`;\n *\n * @summary Clarification description\n *\n * @name `cbc:StatusReason\n */\n statusReason: Schema.optional(Schema.String),\n /**\n * @summary Condition\n *\n * @name `cac:Condition`\n */\n condition: Schema.optional(Schema.Array(PeppolInvoiceResponseCondition)),\n })\n) {}\n\nexport type InvoiceResponseDocumentActualResponseStatus = PeppolInvoiceResponseDocumentActualResponseStatus;\n","import { Schema } from 'effect';\n\nimport { invoiceResponseCodeNeedsSchema } from '#/invoice-response-codes/invoice-response-code-needs-schema.ts';\nimport { invoiceResponseCodeNotNeedsSchema } from '#/invoice-response-codes/invoice-response-code-not-needs-schema.ts';\nimport { PeppolInvoiceResponseDocumentActualResponseStatus } from '#/schemas/peppol-invoice-response-document-actual-response-status-schema.ts';\nimport { PeppolIsoDateString } from '#/schemas/peppol-iso-date-string.ts';\nimport { opaque } from '#/schemas/utils/opaque.ts';\n\nexport const withStatusCodes = Schema.Literals(invoiceResponseCodeNeedsSchema);\nexport const withoutStatusCodes = Schema.Literals(invoiceResponseCodeNotNeedsSchema);\n\nexport class PeppolInvoiceResponseDocumentActualResponseWithoutStatus extends opaque<PeppolInvoiceResponseDocumentActualResponseWithoutStatus>()(\n Schema.Struct({\n /**\n * @summary A code stating the status of the invoice in the process.\n *\n * @name `cbc:ResponseCode`\n */\n responseCode: withoutStatusCodes,\n /**\n * @description The date when the status became effective.\n *\n * @example\n * `2018-08-02`;\n *\n * @summary Status date\n *\n * @name `cbc:EffectiveDate`\n */\n effectiveDate: Schema.optional(PeppolIsoDateString),\n /**\n * @description Clarification is mendatory when the status is UQ-`under query`,RE-`rejected` and `CA`-Conditionally accepted. Clarification may be given as a\n * code, a description or both. If both are used, they must indicate the same clarification.\n *\n * @summary Clarification information\n *\n * @name `cac:Status`\n */\n status: Schema.optional(Schema.Array(PeppolInvoiceResponseDocumentActualResponseStatus)),\n })\n) {}\n\nexport class PeppolInvoiceResponseDocumentActualResponseWithStatus extends opaque<PeppolInvoiceResponseDocumentActualResponseWithStatus>()(\n Schema.Struct({\n /**\n * @remarks\n * This is a rejection code that needs clarification in {@link status}\n *\n * @summary A code stating the status of the invoice in the process.\n *\n * @name `cbc:ResponseCode`\n */\n responseCode: withStatusCodes,\n /**\n * @description The date when the status became effective.\n *\n * @example\n * `2018-08-02`;\n *\n * @summary Status date\n *\n * @name `cbc:EffectiveDate`\n */\n effectiveDate: Schema.optional(PeppolIsoDateString),\n /**\n * @description Clarification is mendatory when the status is UQ-`under query`,RE-`rejected` and `CA`-Conditionally accepted. Clarification may be given as a\n * code, a description or both. If both are used, they must indicate the same clarification.\n *\n * @summary Clarification information\n *\n * @name `cac:Status`\n */\n status: Schema.Array(PeppolInvoiceResponseDocumentActualResponseStatus).check(Schema.isMinLength(1)),\n })\n) {}\n\nexport const peppolInvoiceResponseDocumentActualResponseSchema = Schema.Union([\n PeppolInvoiceResponseDocumentActualResponseWithStatus,\n PeppolInvoiceResponseDocumentActualResponseWithoutStatus,\n]);\n\nexport type InvoiceResponseDocumentActualResponse = typeof peppolInvoiceResponseDocumentActualResponseSchema.Type;\n","import { Schema, Struct } from 'effect';\n\nimport { INVOICE_RESPONSE_PROFILE_ID } from '#/constants/invoice-response-profile-id.ts';\nimport { PeppolContact } from '#/schemas/fields/peppol-contact-schema.ts';\nimport { PeppolIdentifier } from '#/schemas/fields/peppol-identifier-schema.ts';\nimport { PeppolPartyLegalEntity } from '#/schemas/fields/peppol-party-legal-entity-schema.ts';\nimport { peppolInvoiceResponseDocumentActualResponseSchema } from '#/schemas/peppol-invoice-response-document-actual-response-schema.ts';\nimport { PeppolIsoDateString } from '#/schemas/peppol-iso-date-string.ts';\nimport { PeppolMessageLevelResponseParty } from '#/schemas/peppol-message-level-response-party-schema.ts';\nimport { PeppolMessageLevelResponse } from '#/schemas/peppol-message-level-response-schema.ts';\nimport { opaque } from '#/schemas/utils/opaque.ts';\nimport { peppolDocumentTypeCodeSchema } from '#/schemas/values/peppol-document-type-code-schema.ts';\n\nexport class PeppolInvoiceResponseDocumentResponsePartyName extends opaque<PeppolInvoiceResponseDocumentResponsePartyName>()(\n Schema.Struct({\n /**\n * @description - The party that issued the reference invoice\n * - The party who the referenced invoice is issued.\n *\n * @summary Seller/Buyer party name\n *\n * @name `cbc:Name`\n */\n name: Schema.String,\n })\n) {}\n\nexport class PeppolInvoiceResponseParty extends opaque<PeppolInvoiceResponseParty>()(\n PeppolMessageLevelResponseParty.pipe(\n Schema.fieldsAssign({\n /**\n * @summary Party partyIdentification\n */\n partyIdentification: Schema.optional(PeppolIdentifier),\n partyLegalEntity: PeppolPartyLegalEntity.mapFields(Struct.pick(['registrationName'])),\n })\n )\n) {}\n\nexport class PeppolInvoiceResponseSenderParty extends opaque<PeppolInvoiceResponseSenderParty>()(\n PeppolInvoiceResponseParty.pipe(\n Schema.fieldsAssign({\n /**\n * @summary Contact information\n *\n * @name `cac:Contact`\n */\n contact: Schema.optional(PeppolContact),\n })\n )\n) {}\n\n/**\n * @description Party schema used under `cac:DocumentReference/(cac:IssuerParty|cac:RecipientParty)`\n */\nexport class PeppolInvoiceResponseDocumentResponseParty extends opaque<PeppolInvoiceResponseDocumentResponseParty>()(\n Schema.Struct({\n /**\n * @summary Party partyIdentification\n */\n partyIdentification: Schema.optional(PeppolIdentifier),\n /**\n * @example\n * Seller Business Name AS\n *\n * @name cac:PartyName\n */\n partyName: PeppolInvoiceResponseDocumentResponsePartyName,\n })\n) {}\n\nexport type PeppolInvoiceDocumentResponseParty = PeppolInvoiceResponseDocumentResponseParty;\n\nexport class PeppolInvoiceResponseDocumentReference extends opaque<PeppolInvoiceResponseDocumentReference>()(\n Schema.Struct({\n /**\n * @description An identifier for the invoice that the status applies to. The invoice identifier must be of the main invoice number that appears in the invoice\n * itself.\n *\n * @example\n * `inv-99876`;\n *\n * @summary Invoice identifier\n *\n * @name `cbc:ID`\n */\n id: Schema.String,\n /**\n * @description The date on which the referenced invoice was issued.\n *\n * @example\n * `2018-08-01`;\n *\n * @summary Invoice issue date\n *\n * @name `cbc:IssueDate`\n */\n issueDate: Schema.optional(PeppolIsoDateString),\n /**\n * @example\n * `380`;\n *\n * @summary Identifier type code\n */\n documentTypeCode: peppolDocumentTypeCodeSchema,\n })\n) {}\n\nexport class PeppolInvoiceResponseDocumentResponse extends opaque<PeppolInvoiceResponseDocumentResponse>()(\n Schema.Struct({\n /**\n * @summary Response information\n *\n * @name `cac:Response`\n *\n * @cardinality (1..1)\n */\n response: peppolInvoiceResponseDocumentActualResponseSchema,\n /**\n * @summary Document reference\n *\n * @name `cac:DocumentReference`\n */\n documentReference: PeppolInvoiceResponseDocumentReference,\n /**\n * @summary Seller party information\n *\n * @name `cac:IssuerParty`\n */\n issuerParty: Schema.optional(PeppolInvoiceResponseDocumentResponseParty),\n /**\n * @summary Buyer party information\n *\n * @name `cac:RecipientParty`\n */\n recipientParty: Schema.optional(PeppolInvoiceResponseDocumentResponseParty),\n })\n) {}\n\n/**\n * @description The invoice response is a descendant of the message level response with more fields. Effect port of `invoiceResponseSchema`\n * (`z.extend(messageLevelResponse, ...)` → `messageLevelResponse.pipe(Schema.fieldsAssign(...))`), overriding `profileId` with\n * `Schema.Literal(INVOICE_RESPONSE_PROFILE_ID)` plus sender/receiver/documentResponse.\n */\nexport class PeppolInvoiceResponse extends opaque<PeppolInvoiceResponse>()(\n Schema.Struct({\n ...PeppolMessageLevelResponse.fields,\n profileId: Schema.Literal(INVOICE_RESPONSE_PROFILE_ID),\n /**\n * @description The party sending an electronic message level response message back to the sending party of the business document.\n *\n * @summary Sender information\n */\n senderParty: PeppolInvoiceResponseSenderParty,\n /**\n * @description The party, an electronic message level response was addressed to, and who is supposed to process the message level response. This is the same\n * party as the sender of the business document.\n *\n * @summary Receiver information\n */\n receiverParty: PeppolInvoiceResponseParty,\n /**\n * @description General comments or instructions that are revelant to the response as a whole.\n *\n * @example\n * `Please refere to previous email exchange regarding this invoice.`;\n *\n * @summary Invoice response note\n */\n note: Schema.optional(Schema.String),\n /**\n * @summary Document response\n */\n documentResponse: PeppolInvoiceResponseDocumentResponse,\n })\n) {}\n","import { Effect, Predicate } from 'effect';\n\n// oxlint-disable-next-line typescript/no-explicit-any\nexport type XmlNode = any;\n\nexport const getProp = Effect.fn(function* (node: XmlNode, ...path: Array<string>): Effect.fn.Return<XmlNode> {\n if (!Predicate.isTruthy(node)) {\n return undefined;\n }\n if (path.length === 0) {\n return node;\n }\n let currentNode = node;\n for (const key of path) {\n const newNode = currentNode[key];\n if (Predicate.isNotNullish(newNode)) {\n currentNode = newNode;\n continue;\n }\n if (key.includes(':')) {\n const [, localKey] = key.split(':') as [string, string, ...Array<string>];\n currentNode = currentNode[localKey];\n if (Predicate.isNullish(currentNode)) {\n return undefined;\n }\n } else {\n return undefined;\n }\n }\n return currentNode;\n});\n","import { Effect, Predicate } from 'effect';\n\nimport type { XmlNode } from '#/helpers/get-prop.ts';\n\nimport { getProp } from '#/helpers/get-prop.ts';\n\nexport const strOrUnd = Effect.fn('str-or-und')(function* <const T extends string = string>(\n node: XmlNode,\n ...path: Array<string>\n): Effect.fn.Return<T | undefined> {\n const val = yield* getProp(node, ...path);\n if (Predicate.isNullish(val)) return undefined;\n if (!Predicate.isObject(val)) return (val as { toString(): T }).toString();\n const raw = val as XmlNode;\n if (Predicate.isUndefined(raw['#text'])) return undefined;\n return raw['#text'].toString();\n});\n","import { Effect, Predicate } from 'effect';\n\nimport type { XmlNode } from '#/helpers/get-prop.ts';\nimport type { PeppolIdentifier } from '#/schemas/fields/peppol-identifier-schema.ts';\nimport type { RecursivePartial } from '#/types.ts';\n\nimport { getProp } from '#/helpers/get-prop.ts';\nimport { strOrUnd } from '#/helpers/str-or-und.ts';\n\nexport interface Identifier<T extends PeppolIdentifier['schemeId'] = string> extends PeppolIdentifier {\n schemeId?: T;\n}\n\nexport const decodeIdentifier = Effect.fn(function* <const T extends PeppolIdentifier['schemeId'] = string>(\n node: XmlNode | undefined,\n ...path: Array<string>\n): Effect.fn.Return<RecursivePartial<Identifier<T>> | undefined> {\n const val = yield* getProp(node, ...path);\n if (!Predicate.isTruthy(val) && val !== 0) return undefined;\n const id = yield* strOrUnd(val);\n if ((Predicate.isString(val) || Predicate.isNumber(val)) && Predicate.isTruthy(id)) {\n return { id };\n }\n if (!Predicate.isTruthy(id)) return undefined;\n return {\n id,\n // @ts-expect-error I don't want to bother with the typecheck\n schemeId: yield* strOrUnd(val, '@schemeID'),\n };\n});\n","import { Effect, Predicate } from 'effect';\n\nimport type { XmlNode } from '#/helpers/get-prop.ts';\n\nimport { getProp } from '#/helpers/get-prop.ts';\n\nexport const getArray = Effect.fn(function* (node: XmlNode, ...path: Array<string>): Effect.fn.Return<Array<XmlNode>> {\n if (!Predicate.isTruthy(node)) return [];\n let currentNode = node;\n for (const key of path) {\n if (!Predicate.isTruthy(currentNode)) {\n return [];\n }\n if (Array.isArray(currentNode)) {\n const flattened = yield* Effect.forEach(\n currentNode,\n Effect.fn(function* (n: XmlNode) {\n return (yield* getProp(n, key)) || [];\n })\n );\n currentNode = flattened.flat();\n } else {\n currentNode = yield* getProp(currentNode, key);\n }\n }\n if (!Predicate.isTruthy(currentNode)) {\n return [];\n }\n return Array.isArray(currentNode) ? currentNode : [currentNode];\n});\n","import { Effect, Predicate } from 'effect';\n\nimport type { XmlNode } from '#/helpers/get-prop.ts';\nimport type { PeppolAdditionalDocumentReference } from '#/schemas/fields/peppol-additional-document-reference-schema.ts';\nimport type { RecursivePartial } from '#/types.ts';\n\nimport { decodeIdentifier } from '#/decoders/fields/decode-identifier.ts';\nimport { getArray } from '#/helpers/get-array.ts';\nimport { getProp } from '#/helpers/get-prop.ts';\nimport { strOrUnd } from '#/helpers/str-or-und.ts';\n\nexport const decodeAdditionalDocumentReferences = Effect.fn(function* (\n doc: XmlNode\n): Effect.fn.Return<Array<RecursivePartial<PeppolAdditionalDocumentReference>> | undefined> {\n const arr = yield* getArray(doc, 'cac:AdditionalDocumentReference');\n if (arr.length === 0) {\n return undefined;\n }\n\n return yield* Effect.forEach(\n arr,\n Effect.fn(function* (additionalDocumentReference: XmlNode) {\n const attachment = yield* getProp(additionalDocumentReference, 'cac:Attachment');\n const embeddedDocumentBinaryObject = yield* getProp(attachment, 'cbc:EmbeddedDocumentBinaryObject');\n const externalReference = yield* getProp(attachment, 'cac:ExternalReference');\n return {\n attachment: Predicate.isNotNullish(attachment)\n ? {\n embeddedDocumentBinaryObject: Predicate.isNotNullish(embeddedDocumentBinaryObject)\n ? {\n content: yield* strOrUnd(embeddedDocumentBinaryObject),\n filename: yield* strOrUnd(embeddedDocumentBinaryObject, '@filename'),\n mimeCode: yield* strOrUnd(embeddedDocumentBinaryObject, '@mimeCode'),\n }\n : undefined,\n externalReference: Predicate.isNotNullish(externalReference) ? { uri: yield* strOrUnd(externalReference, 'cbc:URI') } : undefined,\n }\n : undefined,\n documentDescription: yield* strOrUnd(additionalDocumentReference, 'cbc:DocumentDescription'),\n documentTypeCode: yield* strOrUnd(additionalDocumentReference, 'cbc:DocumentTypeCode'),\n id: yield* decodeIdentifier(additionalDocumentReference, 'cbc:ID'),\n };\n })\n );\n});\n","import { Effect, Predicate } from 'effect';\n\nimport type { XmlNode } from '#/helpers/get-prop.ts';\nimport type { PeppolAmount } from '#/schemas/fields/peppol-amount-schema.ts';\nimport type { PeppolCurrencyCode } from '#/schemas/values/currency-code-schema.ts';\nimport type { RecursivePartial } from '#/types.ts';\n\nimport { getProp } from '#/helpers/get-prop.ts';\n\nexport const decodeAmount = Effect.fn(function* (\n amount: XmlNode | undefined,\n ...path: Array<string>\n): Effect.fn.Return<RecursivePartial<PeppolAmount> | undefined> {\n const val = yield* getProp(amount, ...path);\n if (!Predicate.isTruthy(val) && val !== 0) return undefined;\n if (Predicate.isObject(val)) {\n const raw = val as XmlNode;\n return { currencyId: String(raw['@currencyID']) as PeppolCurrencyCode, value: parseFloat(String(raw['#text'] ?? raw)) };\n }\n return { currencyId: '' as PeppolCurrencyCode, value: parseFloat(String(val)) };\n});\n","import { Effect, Predicate, SchemaIssue } from 'effect';\n\nimport type { XmlNode } from '#/helpers/get-prop.ts';\n\nimport { getProp } from '#/helpers/get-prop.ts';\n\nexport const bool = Effect.fn(function* <const T extends boolean = boolean>(node: XmlNode, ...path: Array<string>) {\n const val = yield* getProp(node, ...path).pipe(\n Effect.filterOrFail(\n val => Predicate.isNotNullish(val),\n () => new SchemaIssue.MissingKey({ message: `Unable to find ${path.join('->')} into ${node}` })\n )\n );\n if (Predicate.isBoolean(val)) return val as T;\n if (Predicate.isObject(val) && Predicate.hasProperty(val, '#text') && Predicate.isNotUndefined(val['#text'])) return val['#text'] as T;\n return yield* Effect.fail(new SchemaIssue.MissingKey({ message: `Unable to find ${path.join('->')} into ${node}` }));\n});\n","import { Effect, Predicate } from 'effect';\n\nimport type { XmlNode } from '#/helpers/get-prop.ts';\n\nimport { strOrUnd } from '#/helpers/str-or-und.ts';\n\nexport const numOrUnd = Effect.fn(function* (node: XmlNode, ...path: Array<string>): Effect.fn.Return<number | undefined> {\n const val = yield* strOrUnd(node, ...path);\n\n return Predicate.isNotUndefined(val) ? parseFloat(val) : undefined;\n});\n","import { Effect } from 'effect';\n\nimport type { XmlNode } from '#/helpers/get-prop.ts';\n\nimport { decodeAmount } from '#/decoders/fields/decode-amount.ts';\nimport { bool } from '#/helpers/bool.ts';\nimport { numOrUnd } from '#/helpers/num-or-und.ts';\nimport { strOrUnd } from '#/helpers/str-or-und.ts';\n\nexport const decodeBaseAllowanceCharge = Effect.fn(function* (allowanceCharge: XmlNode) {\n return {\n allowanceChargeReason: yield* strOrUnd(allowanceCharge, 'cbc:AllowanceChargeReason'),\n allowanceChargeReasonCode: yield* strOrUnd(allowanceCharge, 'cbc:AllowanceChargeReasonCode'),\n amount: yield* decodeAmount(allowanceCharge, 'cbc:Amount'),\n baseAmount: yield* decodeAmount(allowanceCharge, 'cbc:BaseAmount'),\n chargeIndicator: yield* bool(allowanceCharge, 'cbc:ChargeIndicator'),\n multiplierFactorNumeric: yield* numOrUnd(allowanceCharge, 'cbc:MultiplierFactorNumeric'),\n };\n});\n","import { Effect } from 'effect';\n\nimport type { XmlNode } from '#/helpers/get-prop.ts';\n\nimport { getArray } from '#/helpers/get-array.ts';\n\nexport const decodeNodeList = Effect.fn(function* <A, E, R>(\n node: XmlNode,\n decodeItem: (item: XmlNode) => Effect.Effect<A, E, R>,\n ...path: Array<string>\n): Effect.fn.Return<Array<A> | undefined, E, R> {\n const arr = yield* getArray(node, ...path);\n if (arr.length === 0) return undefined;\n return yield* Effect.forEach(arr, decodeItem);\n});\n","import { Effect, Predicate } from 'effect';\n\nimport type { XmlNode } from '#/helpers/get-prop.ts';\nimport type { RecursivePartial } from '#/types.ts';\n\nimport { getProp } from '#/helpers/get-prop.ts';\nimport { strOrUnd } from '#/helpers/str-or-und.ts';\n\nexport const decodeSimpleIdentifer = Effect.fn('decode-simple-identifier')(function* (\n doc: XmlNode,\n ...path: Array<string>\n): Effect.fn.Return<RecursivePartial<{ id: string }> | undefined> {\n const node = yield* getProp(doc, ...path);\n if (Predicate.isNullish(node)) return undefined;\n\n return { id: yield* strOrUnd(node, 'cbc:ID') };\n});\n","import { Effect, Predicate } from 'effect';\n\nimport type { XmlNode } from '#/helpers/get-prop.ts';\nimport type { PeppolAllowanceCharge } from '#/schemas/fields/peppol-allowance-charge-schema.ts';\nimport type { RecursivePartial } from '#/types.ts';\n\nimport { decodeSimpleIdentifer } from '#/decoders/fields/decode-simple-identifier.ts';\nimport { getProp } from '#/helpers/get-prop.ts';\nimport { numOrUnd } from '#/helpers/num-or-und.ts';\nimport { strOrUnd } from '#/helpers/str-or-und.ts';\n\nexport const decodeTaxCategory = Effect.fn(function* (\n doc: XmlNode,\n ...path: Array<string>\n): Effect.fn.Return<RecursivePartial<PeppolAllowanceCharge['taxCategory']> | undefined> {\n const taxCategory = yield* getProp(doc, ...path);\n if (Predicate.isNullish(taxCategory)) {\n return undefined;\n }\n\n return {\n id: yield* strOrUnd(taxCategory, 'cbc:ID'),\n percent: yield* numOrUnd(taxCategory, 'cbc:Percent'),\n taxSchemeId: yield* decodeSimpleIdentifer(taxCategory, 'cac:TaxScheme'),\n };\n});\n","import { Effect } from 'effect';\n\nimport type { XmlNode } from '#/helpers/get-prop.ts';\nimport type { PeppolAllowanceCharge } from '#/schemas/fields/peppol-allowance-charge-schema.ts';\nimport type { RecursivePartial } from '#/types.ts';\n\nimport { decodeBaseAllowanceCharge } from '#/decoders/fields/decode-base-allowance-charge.ts';\nimport { decodeNodeList } from '#/decoders/fields/decode-node-list.ts';\nimport { decodeTaxCategory } from '#/decoders/fields/decode-tax-category.ts';\n\nexport const decodeAllowanceCharges = Effect.fn(function* (allowanceCharges: XmlNode, ...path: Array<string>) {\n return yield* decodeNodeList(\n allowanceCharges,\n Effect.fn(function* (allowanceCharge: XmlNode) {\n return {\n ...(yield* decodeBaseAllowanceCharge(allowanceCharge)),\n taxCategory: yield* decodeTaxCategory(allowanceCharge, 'cac:TaxCategory'),\n } as RecursivePartial<PeppolAllowanceCharge>;\n }),\n ...path\n );\n});\n","import { Effect } from 'effect';\n\nimport type { XmlNode } from '#/helpers/get-prop.ts';\nimport type { PeppolBillingReference } from '#/schemas/fields/peppol-billing-reference-schema.ts';\nimport type { RecursivePartial } from '#/types.ts';\n\nimport { getArray } from '#/helpers/get-array.ts';\nimport { strOrUnd } from '#/helpers/str-or-und.ts';\n\nexport const decodeBillingReferences = Effect.fn(function* (\n doc: XmlNode,\n ...path: Array<string>\n): Effect.fn.Return<Array<RecursivePartial<PeppolBillingReference>> | undefined> {\n const arr = yield* getArray(doc, ...path);\n if (arr.length === 0) return undefined;\n\n return yield* Effect.forEach(\n arr,\n Effect.fn(function* (billingReference: XmlNode) {\n return {\n invoiceDocumentReference: {\n id: yield* strOrUnd(billingReference, 'cac:InvoiceDocumentReference', 'cbc:ID'),\n issueDate: yield* strOrUnd(billingReference, 'cac:InvoiceDocumentReference', 'cbc:IssueDate'),\n },\n };\n })\n );\n});\n","import { Effect, Predicate } from 'effect';\n\nimport type { XmlNode } from '#/helpers/get-prop.ts';\nimport type { PeppolAddress } from '#/schemas/fields/peppol-address-schema.ts';\nimport type { RecursivePartial } from '#/types.ts';\n\nimport { getProp } from '#/helpers/get-prop.ts';\nimport { strOrUnd } from '#/helpers/str-or-und.ts';\n\nexport const decodeAddress = Effect.fn(function* (\n address: XmlNode | undefined,\n ...path: Array<string>\n): Effect.fn.Return<RecursivePartial<PeppolAddress> | undefined> {\n const val = yield* getProp(address, ...path);\n if (Predicate.isNullish(val)) return undefined;\n return {\n additionalStreetName: yield* strOrUnd(val, 'cbc:AdditionalStreetName'),\n addressLine: yield* decodeAddressLine(val, 'cac:AddressLine'),\n cityName: yield* strOrUnd(val, 'cbc:CityName'),\n countryCode: yield* decodeCountryCode(val, 'cac:Country'),\n countrySubentity: yield* strOrUnd(val, 'cbc:CountrySubentity'),\n postalZone: yield* strOrUnd(val, 'cbc:PostalZone'),\n streetName: yield* strOrUnd(val, 'cbc:StreetName'),\n };\n});\n\nconst decodeAddressLine = Effect.fn(function* (\n address: XmlNode,\n ...path: Array<string>\n): Effect.fn.Return<RecursivePartial<PeppolAddress['addressLine']> | undefined> {\n const val = yield* getProp(address, ...path);\n if (Predicate.isNullish(val)) return undefined;\n return { line: yield* strOrUnd(val, 'cbc:Line') };\n});\n\nconst decodeCountryCode = Effect.fn(function* (\n node: XmlNode,\n ...path: Array<string>\n): Effect.fn.Return<RecursivePartial<PeppolAddress['countryCode']> | undefined> {\n const country = yield* getProp(node, ...path);\n if (Predicate.isNullish(country)) return undefined;\n return { identificationCode: yield* strOrUnd(country, 'cbc:IdentificationCode') };\n});\n","import { Effect, Predicate } from 'effect';\n\nimport type { XmlNode } from '#/helpers/get-prop.ts';\nimport type { PeppolDelivery } from '#/schemas/fields/peppol-delivery-schema.ts';\nimport type { RecursivePartial } from '#/types.ts';\n\nimport { decodeAddress } from '#/decoders/fields/decode-address.ts';\nimport { decodeIdentifier } from '#/decoders/fields/decode-identifier.ts';\nimport { getProp } from '#/helpers/get-prop.ts';\nimport { strOrUnd } from '#/helpers/str-or-und.ts';\n\nexport const decodeDelivery = Effect.fn(function* (\n node: XmlNode,\n ...path: Array<string>\n): Effect.fn.Return<RecursivePartial<PeppolDelivery> | undefined> {\n const val = yield* getProp(node, ...path);\n if (Predicate.isNullish(val)) return undefined;\n\n return {\n actualDeliveryDate: yield* strOrUnd(val, 'cbc:ActualDeliveryDate'),\n deliveryLocation: yield* decodeDeliveryLocation(val, 'cac:DeliveryLocation'),\n deliveryParty: yield* decodeDeliveryParty(val, 'cac:DeliveryParty'),\n };\n});\n\nconst decodeDeliveryLocation = Effect.fn(function* (\n node: XmlNode,\n ...path: Array<string>\n): Effect.fn.Return<RecursivePartial<PeppolDelivery['deliveryLocation']> | undefined> {\n const val = yield* getProp(node, ...path);\n if (Predicate.isNullish(val)) return undefined;\n\n return { address: yield* decodeAddress(val, 'cac:Address'), id: yield* decodeIdentifier(val, 'cbc:ID') };\n});\n\nconst decodeDeliveryParty = Effect.fn(function* (\n node: XmlNode,\n ...path: Array<string>\n): Effect.fn.Return<RecursivePartial<PeppolDelivery['deliveryParty']> | undefined> {\n const val = yield* getProp(node, ...path);\n if (Predicate.isNullish(val)) return undefined;\n const name = yield* strOrUnd(val, 'cac:PartyName', 'cbc:Name');\n if (!Predicate.isTruthy(name)) return undefined;\n\n return { partyName: { name } };\n});\n","import { Effect, Predicate } from 'effect';\n\nimport type { XmlNode } from '#/helpers/get-prop.ts';\n\nimport { getProp } from '#/helpers/get-prop.ts';\nimport { strOrUnd } from '#/helpers/str-or-und.ts';\n\nexport const decodeInvoicePeriod = Effect.fn(function* (doc: XmlNode, ...path: Array<string>) {\n const invoicePeriod = yield* getProp(doc, ...path);\n if (Predicate.isNullish(invoicePeriod)) return undefined;\n return {\n descriptionCode: yield* strOrUnd(invoicePeriod, 'cbc:DescriptionCode'),\n endDate: yield* strOrUnd(invoicePeriod, 'cbc:EndDate'),\n startDate: yield* strOrUnd(invoicePeriod, 'cbc:StartDate'),\n };\n});\n","import { Effect, Predicate } from 'effect';\n\nimport type { XmlNode } from '#/helpers/get-prop.ts';\nimport type { PeppolLegalMonetaryTotal } from '#/schemas/fields/peppol-legal-monetary-total-schema.ts';\nimport type { RecursivePartial } from '#/types.ts';\n\nimport { decodeAmount } from '#/decoders/fields/decode-amount.ts';\nimport { getProp } from '#/helpers/get-prop.ts';\n\nexport const decodeLegalMonetaryTotal = Effect.fn(function* (\n node: XmlNode | undefined,\n ...path: Array<string>\n): Effect.fn.Return<RecursivePartial<PeppolLegalMonetaryTotal> | undefined> {\n const val = yield* getProp(node, ...path);\n if (Predicate.isNullish(val)) return undefined;\n\n return {\n allowanceTotalAmount: yield* decodeAmount(val, 'cbc:AllowanceTotalAmount'),\n chargeTotalAmount: yield* decodeAmount(val, 'cbc:ChargeTotalAmount'),\n lineExtensionAmount: yield* decodeAmount(val, 'cbc:LineExtensionAmount'),\n payableAmount: yield* decodeAmount(val, 'cbc:PayableAmount'),\n payableRoundingAmount: yield* decodeAmount(val, 'cbc:PayableRoundingAmount'),\n prepaidAmount: yield* decodeAmount(val, 'cbc:PrepaidAmount'),\n taxExclusiveAmount: yield* decodeAmount(val, 'cbc:TaxExclusiveAmount'),\n taxInclusiveAmount: yield* decodeAmount(val, 'cbc:TaxInclusiveAmount'),\n };\n});\n","import { Effect, Predicate } from 'effect';\n\nimport type { XmlNode } from '#/helpers/get-prop.ts';\nimport type { PeppolOrderReference } from '#/schemas/fields/peppol-order-reference-schema.ts';\nimport type { RecursivePartial } from '#/types.ts';\n\nimport { getProp } from '#/helpers/get-prop.ts';\nimport { strOrUnd } from '#/helpers/str-or-und.ts';\n\nexport const decodeOrderReference = Effect.fn(function* (\n node: XmlNode,\n ...path: Array<string>\n): Effect.fn.Return<RecursivePartial<PeppolOrderReference> | undefined> {\n const val = yield* getProp(node, ...path);\n if (Predicate.isNullish(val)) return undefined;\n\n return { id: yield* strOrUnd(val, 'cbc:ID'), salesOrderId: yield* strOrUnd(val, 'cbc:SalesOrderID') };\n});\n","import { Effect, Predicate } from 'effect';\n\nimport type { XmlNode } from '#/helpers/get-prop.ts';\nimport type { PeppolContact } from '#/schemas/fields/peppol-contact-schema.ts';\nimport type { RecursivePartial } from '#/types.ts';\n\nimport { getProp } from '#/helpers/get-prop.ts';\nimport { strOrUnd } from '#/helpers/str-or-und.ts';\n\nexport const decodeContact = Effect.fn(function* (\n node: XmlNode,\n ...path: Array<string>\n): Effect.fn.Return<RecursivePartial<PeppolContact> | undefined> {\n const contactNode = yield* getProp(node, ...path);\n if (Predicate.isNullish(contactNode)) return undefined;\n\n return {\n electronicMail: yield* strOrUnd(contactNode, 'cbc:ElectronicMail'),\n name: yield* strOrUnd(contactNode, 'cbc:Name'),\n telephone: yield* strOrUnd(contactNode, 'cbc:Telephone'),\n };\n});\n","import { Effect, Predicate } from 'effect';\n\nimport type { XmlNode } from '#/helpers/get-prop.ts';\nimport type { PeppolIdentifier } from '#/schemas/fields/peppol-identifier-schema.ts';\n\nimport { decodeIdentifier } from '#/decoders/fields/decode-identifier.ts';\n\nexport const decodeElectronicAddress = Effect.fn(function* <const T extends PeppolIdentifier['schemeId'] = string>(\n node: XmlNode | undefined,\n ...path: Array<string>\n) {\n const value = yield* decodeIdentifier<T>(node, ...path);\n if (Predicate.isTruthy(value?.schemeId)) {\n // @ts-expect-error I don't want to bother with the typecheck\n value.schemeId = (value.schemeId as string).padStart(4, '0') as T;\n }\n return value;\n});\n","import { Effect, Predicate } from 'effect';\n\nimport type { XmlNode } from '#/helpers/get-prop.ts';\nimport type { PeppolPartyTaxSchema } from '#/schemas/fields/peppol-party-tax-scheme-schema.ts';\nimport type { RecursivePartial } from '#/types.ts';\n\nimport { decodeSimpleIdentifer } from '#/decoders/fields/decode-simple-identifier.ts';\nimport { getProp } from '#/helpers/get-prop.ts';\nimport { strOrUnd } from '#/helpers/str-or-und.ts';\n\nexport const decodePartyTaxScheme = Effect.fn(function* (\n doc: XmlNode,\n ...path: Array<string>\n): Effect.fn.Return<RecursivePartial<PeppolPartyTaxSchema> | undefined> {\n const node = yield* getProp(doc, ...path);\n if (Predicate.isNullish(node)) return undefined;\n\n return { companyId: yield* strOrUnd(node, 'cbc:CompanyID'), taxSchemeId: yield* decodeSimpleIdentifer(node, 'cac:TaxScheme') };\n});\n","import { Effect, Predicate } from 'effect';\n\nimport type { XmlNode } from '#/helpers/get-prop.ts';\nimport type { PeppolPartyTaxSchema } from '#/schemas/fields/peppol-party-tax-scheme-schema.ts';\nimport type { RecursivePartial } from '#/types.ts';\n\nimport { decodePartyTaxScheme } from '#/decoders/fields/decode-party-tax-scheme.ts';\nimport { getArray } from '#/helpers/get-array.ts';\n\nexport const decodePartiesTaxScheme = Effect.fn(function* (\n doc: XmlNode,\n ...path: Array<string>\n): Effect.fn.Return<RecursivePartial<Array<PeppolPartyTaxSchema>> | undefined> {\n const node = yield* getArray(doc, ...path);\n if (node.length === 0) return undefined;\n\n const values = yield* Effect.forEach(\n node,\n Effect.fn(function* (n: XmlNode) {\n return yield* decodePartyTaxScheme(n);\n })\n );\n return values.filter(Predicate.isNotNullish);\n});\n","import { Effect, Predicate } from 'effect';\n\nimport type { XmlNode } from '#/helpers/get-prop.ts';\nimport type { PeppolPartyLegalEntitySchema } from '#/schemas/fields/peppol-party-legal-entity-schema.ts';\nimport type { RecursivePartial } from '#/types.ts';\n\nimport { decodeIdentifier } from '#/decoders/fields/decode-identifier.ts';\nimport { getProp } from '#/helpers/get-prop.ts';\nimport { strOrUnd } from '#/helpers/str-or-und.ts';\n\nexport const decodePartyLegalEntity = Effect.fn(function* (\n node: XmlNode,\n ...path: Array<string>\n): Effect.fn.Return<RecursivePartial<PeppolPartyLegalEntitySchema> | undefined> {\n const partyLegalEntityNode = yield* getProp(node, ...path);\n if (Predicate.isNullish(partyLegalEntityNode)) return undefined;\n\n return {\n companyId: yield* decodeIdentifier(partyLegalEntityNode, 'cbc:CompanyID'),\n companyLegalForm: yield* strOrUnd(partyLegalEntityNode, 'cbc:CompanyLegalForm'),\n registrationName: yield* strOrUnd(partyLegalEntityNode, 'cbc:RegistrationName'),\n };\n});\n","import { Effect, Predicate } from 'effect';\n\nimport type { XmlNode } from '#/helpers/get-prop.ts';\n\nimport { decodeAddress } from '#/decoders/fields/decode-address.ts';\nimport { decodeContact } from '#/decoders/fields/decode-contact.ts';\nimport { decodeElectronicAddress } from '#/decoders/fields/decode-electronic-address.ts';\nimport { decodeIdentifier } from '#/decoders/fields/decode-identifier.ts';\nimport { decodePartiesTaxScheme } from '#/decoders/fields/decode-parties-tax-scheme.ts';\nimport { decodePartyLegalEntity } from '#/decoders/fields/decode-party-legal-entity.ts';\nimport { getProp } from '#/helpers/get-prop.ts';\nimport { strOrUnd } from '#/helpers/str-or-und.ts';\n\nexport const decodeParty = Effect.fn(function* (party: XmlNode | undefined, ...path: Array<string>) {\n const val = yield* getProp(party, ...path);\n if (Predicate.isNullish(val)) return undefined;\n\n return {\n contact: yield* decodeContact(val, 'cac:Contact'),\n endpointId: yield* decodeElectronicAddress(val, 'cbc:EndpointID'),\n partyIdentification: yield* decodeAdditionalIdentifiers(val, 'cac:PartyIdentification'),\n partyLegalEntity: yield* decodePartyLegalEntity(val, 'cac:PartyLegalEntity'),\n partyName: yield* decodePartyName(val, 'cac:PartyName'),\n partyTaxSchemes: yield* decodePartiesTaxScheme(val, 'cac:PartyTaxScheme'),\n postalAddress: yield* decodeAddress(val, 'cac:PostalAddress'),\n };\n});\n\nconst decodePartyName = Effect.fn(function* (node: XmlNode, ...path: Array<string>) {\n const partyNameNode = yield* getProp(node, ...path);\n if (Predicate.isNullish(partyNameNode)) return undefined;\n return { name: yield* strOrUnd(partyNameNode, 'cbc:Name') };\n});\n\nconst decodeAdditionalIdentifiers = Effect.fn(function* (node: XmlNode, ...path: Array<string>) {\n const val = yield* getProp(node, ...path);\n if (Predicate.isNullish(val)) return undefined;\n return { id: yield* decodeIdentifier(val, 'cbc:ID') };\n});\n","import { Effect, Predicate } from 'effect';\n\nimport type { XmlNode } from '#/helpers/get-prop.ts';\nimport type { PeppolPayeeParty } from '#/schemas/fields/peppol-payee-party-schema.ts';\nimport type { RecursivePartial } from '#/types.ts';\n\nimport { decodeIdentifier } from '#/decoders/fields/decode-identifier.ts';\nimport { getProp } from '#/helpers/get-prop.ts';\nimport { strOrUnd } from '#/helpers/str-or-und.ts';\n\nexport const decodePayeeParty = Effect.fn(function* (\n payee: XmlNode | undefined,\n ...path: Array<string>\n): Effect.fn.Return<RecursivePartial<PeppolPayeeParty> | undefined> {\n const node = yield* getProp(payee, ...path);\n if (Predicate.isNullish(node)) return undefined;\n return {\n partyIdentification: yield* decodePartyIdentification(node, 'cac:PartyIdentification'),\n partyLegalEntity: yield* decodePartyLegalEntity(node, 'cac:PartyLegalEntity'),\n partyName: yield* decodePartyName(node, 'cac:PartyName'),\n };\n});\n\nconst decodePartyLegalEntity = Effect.fn(function* (\n party: XmlNode | undefined,\n ...path: Array<string>\n): Effect.fn.Return<RecursivePartial<PeppolPayeeParty['partyLegalEntity']> | undefined> {\n const node = yield* getProp(party, ...path);\n if (Predicate.isNullish(node)) return undefined;\n return { companyId: yield* decodeIdentifier(node, 'cbc:CompanyID') };\n});\n\nconst decodePartyName = Effect.fn(function* (\n party: XmlNode | undefined,\n ...path: Array<string>\n): Effect.fn.Return<RecursivePartial<PeppolPayeeParty['partyName']> | undefined> {\n const node = yield* getProp(party, ...path);\n if (Predicate.isNullish(node)) return undefined;\n return { name: yield* strOrUnd(node, 'cbc:Name') };\n});\n\nconst decodePartyIdentification = Effect.fn(function* (\n party: XmlNode | undefined,\n ...path: Array<string>\n): Effect.fn.Return<RecursivePartial<PeppolPayeeParty['partyIdentification']> | undefined> {\n const node = yield* getProp(party, ...path);\n if (Predicate.isNullish(node)) return undefined;\n return { id: yield* decodeIdentifier(node, 'cbc:ID') };\n});\n","import { Effect, Predicate } from 'effect';\n\nimport type { XmlNode } from '#/helpers/get-prop.ts';\nimport type { PeppolIdentifier } from '#/schemas/fields/peppol-identifier-schema.ts';\nimport type { PeppolPaymentMeans } from '#/schemas/fields/peppol-payment-means-schema.ts';\nimport type { RecursivePartial } from '#/types.ts';\n\nimport { decodeSimpleIdentifer } from '#/decoders/fields/decode-simple-identifier.ts';\nimport { getArray } from '#/helpers/get-array.ts';\nimport { getProp } from '#/helpers/get-prop.ts';\nimport { strOrUnd } from '#/helpers/str-or-und.ts';\n\nexport const decodePaymentMeans = Effect.fn(function* (\n doc: XmlNode,\n ...path: Array<string>\n): Effect.fn.Return<Array<RecursivePartial<PeppolPaymentMeans>> | undefined> {\n const arr = yield* getArray(doc, ...path);\n if (arr.length === 0) return undefined;\n\n return yield* Effect.forEach(\n arr,\n Effect.fn(function* (paymentMeans: XmlNode) {\n const cardAccount = yield* getProp(paymentMeans, 'cac:CardAccount');\n\n return {\n cardAccount: Predicate.isNotNullish(cardAccount)\n ? {\n holderName: yield* strOrUnd(cardAccount, 'cbc:HolderName'),\n networkId: yield* strOrUnd(cardAccount, 'cbc:NetworkID'),\n primaryAccountNumberId: yield* strOrUnd(cardAccount, 'cbc:PrimaryAccountNumberID'),\n }\n : undefined,\n payeeFinancialAccount: yield* decodePayeeFinancialAccount(paymentMeans, 'cac:PayeeFinancialAccount'),\n paymentDueDate: yield* strOrUnd(paymentMeans, 'cbc:PaymentDueDate'),\n paymentId: yield* strOrUnd(paymentMeans, 'cbc:PaymentID'),\n paymentMandate: yield* decodePaymentMendates(paymentMeans, 'cac:PaymentMandate'),\n paymentMeansCode: yield* decodePaymentMeansCodes(paymentMeans, 'cbc:PaymentMeansCode'),\n };\n })\n );\n});\n\nconst decodePayeeFinancialAccount = Effect.fn(function* (\n doc: XmlNode,\n ...path: Array<string>\n): Effect.fn.Return<RecursivePartial<PeppolPaymentMeans['payeeFinancialAccount']> | undefined> {\n const node = yield* getProp(doc, ...path);\n if (Predicate.isNullish(node)) return undefined;\n\n let financialInstitutionBranch: RecursivePartial<PeppolIdentifier> | undefined = yield* decodeSimpleIdentifer(\n node,\n 'cac:FinancialInstitutionBranch'\n );\n // NOTE: this 2 way comparision is necessary to ensure that `id` is null with a returned value which means that it is not direct child\n if (Predicate.isNotUndefined(financialInstitutionBranch) && !Predicate.isTruthy(financialInstitutionBranch?.id)) {\n financialInstitutionBranch = yield* decodeSimpleIdentifer(node, 'cac:FinancialInstitutionBranch', 'ns0:FinancialInstitution');\n }\n return { financialInstitutionBranch, id: yield* strOrUnd(node, 'cbc:ID'), name: yield* strOrUnd(node, 'cbc:Name') };\n});\n\nconst decodePaymentMendates = Effect.fn(function* (\n doc: XmlNode,\n ...path: Array<string>\n): Effect.fn.Return<RecursivePartial<PeppolPaymentMeans['paymentMandate']> | undefined> {\n const node = yield* getProp(doc, ...path);\n if (Predicate.isNullish(node)) return undefined;\n\n return { id: yield* strOrUnd(node, 'cbc:ID'), payerFinancialAccountId: yield* decodeSimpleIdentifer(node, 'cac:PayerFinancialAccount') };\n});\n\nconst decodePaymentMeansCodes = Effect.fn(function* (\n doc: XmlNode,\n ...path: Array<string>\n): Effect.fn.Return<RecursivePartial<PeppolPaymentMeans['paymentMeansCode']> | undefined> {\n const node = yield* getProp(doc, ...path);\n if (Predicate.isNullish(node)) return undefined;\n return { code: yield* strOrUnd(node), name: yield* strOrUnd(node, '@name') };\n});\n","import { Effect, Predicate } from 'effect';\n\nimport type { XmlNode } from '#/helpers/get-prop.ts';\nimport type { PeppolPaymentTerms } from '#/schemas/fields/peppol-payment-terms-schema.ts';\nimport type { RecursivePartial } from '#/types.ts';\n\nimport { getProp } from '#/helpers/get-prop.ts';\nimport { strOrUnd } from '#/helpers/str-or-und.ts';\n\nexport const decodePaymentTerms = Effect.fn(function* (\n doc: XmlNode,\n ...path: Array<string>\n): Effect.fn.Return<RecursivePartial<PeppolPaymentTerms> | undefined> {\n const terms = yield* getProp(doc, ...path);\n if (Predicate.isNullish(terms)) return undefined;\n const note = yield* getProp(terms, 'cbc:Note');\n return Predicate.isNotNullish(note) ? { note: yield* strOrUnd(note) } : undefined;\n});\n","import { Effect, Predicate } from 'effect';\n\nimport type { XmlNode } from '#/helpers/get-prop.ts';\nimport type { PeppolTaxRepresentativeParty } from '#/schemas/fields/peppol-tax-representative-schema.ts';\nimport type { RecursivePartial } from '#/types.ts';\n\nimport { decodeAddress } from '#/decoders/fields/decode-address.ts';\nimport { decodePartyTaxScheme } from '#/decoders/fields/decode-party-tax-scheme.ts';\nimport { getProp } from '#/helpers/get-prop.ts';\nimport { strOrUnd } from '#/helpers/str-or-und.ts';\n\nexport const decodeTaxRepresentativeParty = Effect.fn(function* (\n doc: XmlNode,\n ...path: Array<string>\n): Effect.fn.Return<RecursivePartial<PeppolTaxRepresentativeParty> | undefined> {\n const taxRepresentative = yield* getProp(doc, ...path);\n if (Predicate.isNullish(taxRepresentative)) return undefined;\n\n return {\n name: yield* strOrUnd(taxRepresentative, 'cac:PartyName', 'cbc:Name'),\n partyTaxScheme: yield* decodePartyTaxScheme(taxRepresentative, 'cac:PartyTaxScheme'),\n postalAddress: yield* decodeAddress(taxRepresentative, 'cac:PostalAddress'),\n };\n});\n","import { Effect, Predicate } from 'effect';\n\nimport type { XmlNode } from '#/helpers/get-prop.ts';\nimport type { PeppolTaxSubTotal } from '#/schemas/fields/peppol-tax-subtotal-schema.ts';\nimport type { PeppolTaxTotal } from '#/schemas/fields/peppol-tax-totals-base-schema.ts';\nimport type { RecursivePartial } from '#/types.ts';\n\nimport { decodeAmount } from '#/decoders/fields/decode-amount.ts';\nimport { decodeSimpleIdentifer } from '#/decoders/fields/decode-simple-identifier.ts';\nimport { getArray } from '#/helpers/get-array.ts';\nimport { getProp } from '#/helpers/get-prop.ts';\nimport { numOrUnd } from '#/helpers/num-or-und.ts';\nimport { strOrUnd } from '#/helpers/str-or-und.ts';\n\nexport const decodeTaxTotals = Effect.fn(function* (\n doc: XmlNode,\n ...path: Array<string>\n): Effect.fn.Return<Array<RecursivePartial<PeppolTaxTotal>> | undefined> {\n const arr = yield* getArray(doc, ...path);\n if (arr.length === 0) return undefined;\n\n return yield* Effect.forEach(\n arr,\n Effect.fn(function* (n: XmlNode) {\n return { taxAmount: yield* decodeAmount(n, 'cbc:TaxAmount'), taxSubtotals: yield* decodeTaxSubTotal(n, 'cac:TaxSubtotal') };\n })\n );\n});\n\nconst decodeTaxSubTotal = Effect.fn(function* (\n doc: XmlNode,\n ...path: Array<string>\n): Effect.fn.Return<Array<RecursivePartial<PeppolTaxSubTotal>> | undefined> {\n const arr = yield* getArray(doc, ...path);\n if (arr.length === 0) return undefined;\n return yield* Effect.forEach(\n arr,\n Effect.fn(function* (node: XmlNode) {\n return {\n taxAmount: yield* decodeAmount(node, 'cbc:TaxAmount'),\n taxCategory: yield* decodeTaxCategory(node, 'cac:TaxCategory'),\n taxableAmount: yield* decodeAmount(node, 'cbc:TaxableAmount'),\n };\n })\n );\n});\n\nconst decodeTaxCategory = Effect.fn(function* (\n doc: XmlNode,\n ...path: Array<string>\n): Effect.fn.Return<RecursivePartial<PeppolTaxSubTotal['taxCategory']> | undefined> {\n const node = yield* getProp(doc, ...path);\n if (Predicate.isNullish(node)) {\n return undefined;\n }\n\n return {\n id: yield* strOrUnd(node, 'cbc:ID'),\n percent: yield* numOrUnd(node, 'cbc:Percent'),\n taxExemptionReason: yield* strOrUnd(node, 'cbc:TaxExemptionReason'),\n taxExemptionReasonCode: yield* strOrUnd(node, 'cbc:TaxExemptionReasonCode'),\n taxSchemeId: yield* decodeSimpleIdentifer(node, 'cac:TaxScheme'),\n };\n});\n","import { Effect } from 'effect';\n\nimport type { XmlNode } from '#/helpers/get-prop.ts';\n\nimport { decodeAdditionalDocumentReferences } from '#/decoders/fields/decode-additional-document-references.ts';\nimport { decodeAllowanceCharges } from '#/decoders/fields/decode-allowance-charges.ts';\nimport { decodeBillingReferences } from '#/decoders/fields/decode-billing-references.ts';\nimport { decodeDelivery } from '#/decoders/fields/decode-delivery.ts';\nimport { decodeInvoicePeriod } from '#/decoders/fields/decode-invoice-period.ts';\nimport { decodeLegalMonetaryTotal } from '#/decoders/fields/decode-legal-monetary-total.ts';\nimport { decodeOrderReference } from '#/decoders/fields/decode-order-reference.ts';\nimport { decodeParty } from '#/decoders/fields/decode-party.ts';\nimport { decodePayeeParty } from '#/decoders/fields/decode-payee-party.ts';\nimport { decodePaymentMeans } from '#/decoders/fields/decode-payment-means.ts';\nimport { decodePaymentTerms } from '#/decoders/fields/decode-payment-terms.ts';\nimport { decodeSimpleIdentifer } from '#/decoders/fields/decode-simple-identifier.ts';\nimport { decodeTaxRepresentativeParty } from '#/decoders/fields/decode-tax-representative-party.ts';\nimport { decodeTaxTotals } from '#/decoders/fields/decode-tax-totals.ts';\nimport { strOrUnd } from '#/helpers/str-or-und.ts';\n\nexport const decodeBilling = Effect.fn('decode-billing')(function* (doc: XmlNode) {\n return {\n accountingCost: yield* strOrUnd(doc, 'cbc:AccountingCost'),\n accountingCustomerParty: yield* decodeParty(doc, 'cac:AccountingCustomerParty', 'cac:Party'),\n accountingSupplierParty: yield* decodeParty(doc, 'cac:AccountingSupplierParty', 'cac:Party'),\n additionalDocumentReferences: yield* decodeAdditionalDocumentReferences(doc),\n allowanceCharges: yield* decodeAllowanceCharges(doc, 'cac:AllowanceCharge'),\n billingReferences: yield* decodeBillingReferences(doc, 'cac:BillingReference'),\n buyerReference: yield* strOrUnd(doc, 'cbc:BuyerReference'),\n contractDocumentReference: yield* decodeSimpleIdentifer(doc, 'cac:ContractDocumentReference'),\n customizationId: yield* strOrUnd(doc, 'cbc:CustomizationID'),\n delivery: yield* decodeDelivery(doc, 'cac:Delivery'),\n despatchDocumentReference: yield* decodeSimpleIdentifer(doc, 'cac:DespatchDocumentReference'),\n documentCurrencyCode: yield* strOrUnd(doc, 'cbc:DocumentCurrencyCode'),\n id: yield* strOrUnd(doc, 'cbc:ID'),\n invoicePeriod: yield* decodeInvoicePeriod(doc, 'cac:InvoicePeriod'),\n issueDate: yield* strOrUnd(doc, 'cbc:IssueDate'),\n legalMonetaryTotal: yield* decodeLegalMonetaryTotal(doc, 'cac:LegalMonetaryTotal'),\n note: yield* strOrUnd(doc, 'cbc:Note'),\n orderReference: yield* decodeOrderReference(doc, 'cac:OrderReference'),\n originatorDocumentReference: yield* decodeSimpleIdentifer(doc, 'cac:OriginatorDocumentReference'),\n payeeParty: yield* decodePayeeParty(doc, 'cac:PayeeParty'),\n paymentMeans: yield* decodePaymentMeans(doc, 'cac:PaymentMeans'),\n paymentTerms: yield* decodePaymentTerms(doc, 'cac:PaymentTerms'),\n profileId: yield* strOrUnd(doc, 'cbc:ProfileID'),\n receiptDocumentReference: yield* decodeSimpleIdentifer(doc, 'cac:ReceiptDocumentReference'),\n taxCurrencyCode: yield* strOrUnd(doc, 'cbc:TaxCurrencyCode'),\n taxPointDate: yield* strOrUnd(doc, 'cbc:TaxPointDate'),\n taxRepresentativeParty: yield* decodeTaxRepresentativeParty(doc, 'cac:TaxRepresentativeParty'),\n taxTotals: yield* decodeTaxTotals(doc, 'cac:TaxTotal'),\n };\n});\n","import { Effect, Predicate } from 'effect';\n\nimport type { XmlNode } from '#/helpers/get-prop.ts';\nimport type { PeppolInvoiceLinePeriod } from '#/schemas/fields/peppol-invoice-line-period-schema.ts';\nimport type { RecursivePartial } from '#/types.ts';\n\nimport { getProp } from '#/helpers/get-prop.ts';\nimport { strOrUnd } from '#/helpers/str-or-und.ts';\n\nexport const decodeInvoiceLinePeriod = Effect.fn(function* (\n doc: XmlNode,\n ...path: Array<string>\n): Effect.fn.Return<RecursivePartial<PeppolInvoiceLinePeriod> | undefined> {\n const invoicePeriod = yield* getProp(doc, ...path);\n return Predicate.isNotNullish(invoicePeriod)\n ? { endDate: yield* strOrUnd(invoicePeriod, 'cbc:EndDate'), startDate: yield* strOrUnd(invoicePeriod, 'cbc:StartDate') }\n : undefined;\n});\n","import { Effect } from 'effect';\n\nimport type { XmlNode } from '#/helpers/get-prop.ts';\nimport type { PeppolLineAllowanceCharge } from '#/schemas/fields/peppol-line-allowance-charge-schema.ts';\nimport type { RecursivePartial } from '#/types.ts';\n\nimport { decodeBaseAllowanceCharge } from '#/decoders/fields/decode-base-allowance-charge.ts';\nimport { decodeNodeList } from '#/decoders/fields/decode-node-list.ts';\n\nexport const decodeLineAllowanceCharges = Effect.fn(function* (allowanceCharges: XmlNode, ...path: Array<string>) {\n return yield* decodeNodeList(\n allowanceCharges,\n Effect.fn(function* (allowanceCharge: XmlNode) {\n return { ...(yield* decodeBaseAllowanceCharge(allowanceCharge)) } as RecursivePartial<PeppolLineAllowanceCharge>;\n }),\n ...path\n );\n});\n","import { Effect, Predicate } from 'effect';\n\nimport type { XmlNode } from '#/helpers/get-prop.ts';\n\nimport { decodeAmount } from '#/decoders/fields/decode-amount.ts';\nimport { bool } from '#/helpers/bool.ts';\nimport { getProp } from '#/helpers/get-prop.ts';\n\nexport const decodePriceAllowanceCharge = Effect.fn(function* (allowanceCharges: XmlNode, ...path: Array<string>) {\n const allowanceCharge = yield* getProp(allowanceCharges, ...path);\n if (Predicate.isNullish(allowanceCharge)) {\n return undefined;\n }\n return {\n amount: yield* decodeAmount(allowanceCharge, 'cbc:Amount'),\n baseAmount: yield* decodeAmount(allowanceCharge, 'cbc:BaseAmount'),\n chargeIndicator: yield* bool<false>(allowanceCharge, 'cbc:ChargeIndicator'),\n };\n});\n","import { Effect, Predicate } from 'effect';\n\nimport type { XmlNode } from '#/helpers/get-prop.ts';\n\nimport { getProp } from '#/helpers/get-prop.ts';\nimport { numOrUnd } from '#/helpers/num-or-und.ts';\n\nexport const decodeQuantity = Effect.fn(function* (quantity: XmlNode | undefined, ...path: Array<string>) {\n const val = yield* getProp(quantity, ...path);\n if (!Predicate.isTruthy(val) && val !== 0) return undefined;\n if (Predicate.isObject(val)) {\n return { unitCode: yield* getProp(val, '@unitCode'), value: yield* numOrUnd(val) };\n }\n return { value: yield* numOrUnd(val) };\n});\n","import { Effect, Predicate } from 'effect';\n\nimport type { XmlNode } from '#/helpers/get-prop.ts';\n\nimport { decodeAmount } from '#/decoders/fields/decode-amount.ts';\nimport { decodePriceAllowanceCharge } from '#/decoders/fields/decode-price-allowance-charge.ts';\nimport { decodeQuantity } from '#/decoders/fields/decode-quantity.ts';\nimport { getProp } from '#/helpers/get-prop.ts';\n\nexport const decodeLinePrice = Effect.fn(function* (price: XmlNode, ...path: Array<string>) {\n const node = yield* getProp(price, ...path);\n if (Predicate.isNullish(node)) return undefined;\n\n return {\n allowanceCharge: yield* decodePriceAllowanceCharge(node, 'cac:AllowanceCharge'),\n baseQuantity: yield* decodeQuantity(node, 'cbc:BaseQuantity'),\n priceAmount: yield* decodeAmount(node, 'cbc:PriceAmount'),\n };\n});\n","import { Effect, Predicate } from 'effect';\n\nimport type { XmlNode } from '#/helpers/get-prop.ts';\nimport type { PeppolDocumentLine } from '#/schemas/peppol-document-schema.ts';\nimport type { RecursivePartial } from '#/types.ts';\n\nimport { decodeAmount } from '#/decoders/fields/decode-amount.ts';\nimport { decodeIdentifier } from '#/decoders/fields/decode-identifier.ts';\nimport { decodeInvoiceLinePeriod } from '#/decoders/fields/decode-invoice-line-period.ts';\nimport { decodeLineAllowanceCharges } from '#/decoders/fields/decode-line-allowance-charges.ts';\nimport { decodeLinePrice } from '#/decoders/fields/decode-line-price.ts';\nimport { decodeSimpleIdentifer } from '#/decoders/fields/decode-simple-identifier.ts';\nimport { decodeTaxCategory } from '#/decoders/fields/decode-tax-category.ts';\nimport { getArray } from '#/helpers/get-array.ts';\nimport { getProp } from '#/helpers/get-prop.ts';\nimport { strOrUnd } from '#/helpers/str-or-und.ts';\n\ntype PeppolDocumentLineItem = PeppolDocumentLine['item'];\n\nexport const decodeLineShared = Effect.fn(function* (lineShared: XmlNode) {\n const item = yield* getProp(lineShared, 'cac:Item');\n const orderLineReference = yield* getProp(lineShared, 'cac:OrderLineReference');\n\n return {\n accountingCost: yield* strOrUnd(lineShared, 'cbc:AccountingCost'),\n allowanceCharges: yield* decodeLineAllowanceCharges(lineShared, 'cac:AllowanceCharge'),\n documentReference: yield* Effect.forEach(\n yield* getArray(lineShared, 'cac:DocumentReference'),\n Effect.fn(function* (documentReference: XmlNode) {\n return {\n documentTypeCode: yield* strOrUnd(documentReference, 'cbc:DocumentTypeCode'),\n id: yield* strOrUnd(documentReference, 'cbc:ID'),\n schemeId: yield* strOrUnd(documentReference, 'cbc:ID', '@schemeID'),\n };\n })\n ),\n id: yield* strOrUnd(lineShared, 'cbc:ID'),\n invoicePeriod: yield* decodeInvoiceLinePeriod(lineShared, 'cac:InvoicePeriod'),\n item: {\n additionalItemProperties: yield* Effect.forEach(\n yield* getArray(item, 'cac:AdditionalItemProperty'),\n Effect.fn(function* (n: XmlNode) {\n return { name: yield* strOrUnd(n, 'cbc:Name'), value: yield* strOrUnd(n, 'cbc:Value') };\n })\n ),\n buyersItemIdentification: yield* decodeSimpleIdentifer(item, 'cac:BuyersItemIdentification'),\n classifiedTaxCategory: yield* decodeTaxCategory(item, 'cac:ClassifiedTaxCategory'),\n commodityClassifications: yield* Effect.forEach(\n yield* getArray(item, 'cac:CommodityClassification'),\n Effect.fn(function* (commodityClassification: XmlNode) {\n return {\n itemClassification: {\n id: yield* strOrUnd(commodityClassification, 'cbc:ItemClassificationCode'),\n listId: yield* strOrUnd(commodityClassification, 'cbc:ItemClassificationCode', '@listID'),\n listVersionId: yield* strOrUnd(commodityClassification, 'cbc:ItemClassificationCode', '@listVersionID'),\n },\n };\n })\n ),\n description: yield* strOrUnd(item, 'cbc:Description'),\n name: yield* strOrUnd(item, 'cbc:Name'),\n originCountryCode: yield* decodeOriginCountryCode(item, 'cac:OriginCountry'),\n sellersItemIdentification: yield* decodeSimpleIdentifer(item, 'cac:SellersItemIdentification'),\n standardItemIdentification: yield* decodeStandardItem(item, 'cac:StandardItemIdentification'),\n },\n lineExtensionAmount: yield* decodeAmount(lineShared, 'cbc:LineExtensionAmount'),\n note: yield* strOrUnd(lineShared, 'cbc:Note'),\n orderLineReference: Predicate.isNotNullish(orderLineReference) ? { lineId: yield* strOrUnd(orderLineReference, 'cbc:LineID') } : undefined,\n price: yield* decodeLinePrice(lineShared, 'cac:Price'),\n };\n});\n\nconst decodeStandardItem = Effect.fn(function* (\n node: XmlNode,\n ...path: Array<string>\n): Effect.fn.Return<RecursivePartial<PeppolDocumentLineItem['standardItemIdentification']>> {\n const val = yield* getProp(node, ...path);\n if (Predicate.isNullish(val)) return undefined;\n return { id: yield* decodeIdentifier(val, 'cbc:ID') };\n});\n\nconst decodeOriginCountryCode = Effect.fn(function* (\n node: XmlNode,\n ...path: Array<string>\n): Effect.fn.Return<RecursivePartial<PeppolDocumentLineItem['originCountryCode']>> {\n const country = yield* getProp(node, ...path);\n if (Predicate.isNullish(country)) return undefined;\n return { identificationCode: yield* strOrUnd(country, 'cbc:IdentificationCode') };\n});\n","import { Effect } from 'effect';\n\nimport type { XmlNode } from '#/helpers/get-prop.ts';\n\nimport { decodeLineShared } from '#/decoders/fields/decode-line-shared.ts';\nimport { decodeNodeList } from '#/decoders/fields/decode-node-list.ts';\nimport { decodeQuantity } from '#/decoders/fields/decode-quantity.ts';\n\nexport const decodeCreditNoteLines = Effect.fn(function* (doc: XmlNode, ...path: Array<string>) {\n return yield* decodeNodeList(\n doc,\n Effect.fn(function* (lineNode: XmlNode) {\n const shared = yield* decodeLineShared(lineNode);\n return { ...shared, creditedQuantity: (yield* decodeQuantity(lineNode, 'cbc:CreditedQuantity'))! };\n }),\n ...path\n ).pipe(Effect.map(items => items ?? []));\n});\n","import { Effect } from 'effect';\n\nimport type { XmlNode } from '#/helpers/get-prop.ts';\n\nimport { decodeBilling } from '#/decoders/decode-billing.ts';\nimport { decodeCreditNoteLines } from '#/decoders/fields/decode-credit-note-lines.ts';\nimport { getProp } from '#/helpers/get-prop.ts';\nimport { strOrUnd } from '#/helpers/str-or-und.ts';\n\nexport const decodeCreditNote = Effect.fn('decode-credit-note')(function* (value: XmlNode) {\n const root = value || {};\n const doc: XmlNode = (yield* getProp(root, 'ubl:CreditNote')) ?? root; // accept either the whole JSON or just the CreditNote node\n\n return {\n ...(yield* decodeBilling(doc)),\n creditNoteLines: yield* decodeCreditNoteLines(doc, 'cac:CreditNoteLine'),\n creditNoteTypeCode: yield* strOrUnd(doc, 'cbc:CreditNoteTypeCode'),\n };\n});\n","import { Effect } from 'effect';\n\nimport type { XmlNode } from '#/helpers/get-prop.ts';\n\nimport { getProp } from '#/helpers/get-prop.ts';\nimport { strOrUnd } from '#/helpers/str-or-und.ts';\n\nexport const decodeApplicationResponseBase = Effect.fn(function* (value: XmlNode) {\n const root = value || {};\n const doc: XmlNode = yield* getProp(root, 'ubl:ApplicationResponse');\n\n return {\n base: {\n customizationId: yield* strOrUnd(doc, 'cbc:CustomizationID'),\n id: yield* strOrUnd(doc, 'cbc:ID'),\n issueDate: yield* strOrUnd(doc, 'cbc:IssueDate'),\n issueTime: yield* strOrUnd(doc, 'cbc:IssueTime'),\n },\n doc,\n };\n});\n","import { Effect, Predicate } from 'effect';\n\nimport type { XmlNode } from '#/helpers/get-prop.ts';\nimport type { PeppolInvoiceDocumentResponseParty } from '#/schemas/peppol-invoice-response-schema.ts';\nimport type { RecursivePartial } from '#/types.ts';\n\nimport { decodeIdentifier } from '#/decoders/fields/decode-identifier.ts';\nimport { getProp } from '#/helpers/get-prop.ts';\nimport { strOrUnd } from '#/helpers/str-or-und.ts';\n\nexport const decodeInvoiceMessageDocumentParty = Effect.fn(function* (\n party: XmlNode,\n ...path: Array<string>\n): Effect.fn.Return<RecursivePartial<PeppolInvoiceDocumentResponseParty> | undefined> {\n const val = yield* getProp(party, ...path);\n if (Predicate.isNullish(val)) return undefined;\n const partyName = yield* getProp(val, 'cac:PartyName');\n return {\n partyIdentification: yield* decodeIdentifier(val, 'cac:PartyIdentification', 'cbc:ID'),\n partyName: Predicate.isNotNullish(partyName) ? { name: yield* strOrUnd(partyName, 'cbc:Name') } : undefined,\n };\n});\n","import { Effect, Predicate } from 'effect';\n\nimport type { XmlNode } from '#/helpers/get-prop.ts';\n\nimport { decodeContact } from '#/decoders/fields/decode-contact.ts';\nimport { decodeElectronicAddress } from '#/decoders/fields/decode-electronic-address.ts';\nimport { decodeIdentifier } from '#/decoders/fields/decode-identifier.ts';\nimport { decodePartyLegalEntity } from '#/decoders/fields/decode-party-legal-entity.ts';\nimport { getProp } from '#/helpers/get-prop.ts';\n\nexport const decodeInvoiceMessageParty = Effect.fn(function* (party: XmlNode, ...path: Array<string>) {\n const val = yield* getProp(party, ...path);\n if (Predicate.isNullish(val)) return undefined;\n return {\n contact: yield* decodeContact(val, 'cac:Contact'),\n endpointId: yield* decodeElectronicAddress(val, 'cbc:EndpointID'),\n partyIdentification: yield* decodeIdentifier(val, 'cac:PartyIdentification', 'cbc:ID'),\n partyLegalEntity: yield* decodePartyLegalEntity(val, 'cac:PartyLegalEntity'),\n };\n});\n","import { Effect, Predicate } from 'effect';\n\nimport type { XmlNode } from '#/helpers/get-prop.ts';\n\nimport { decodeApplicationResponseBase } from '#/decoders/fields/decode-application-response.ts';\nimport { decodeInvoiceMessageDocumentParty } from '#/decoders/fields/decode-invoice-message-document-party.ts';\nimport { decodeInvoiceMessageParty } from '#/decoders/fields/decode-invoice-message-party.ts';\nimport { getArray } from '#/helpers/get-array.ts';\nimport { getProp } from '#/helpers/get-prop.ts';\nimport { strOrUnd } from '#/helpers/str-or-und.ts';\n\nconst decodeStatusReasonCode = Effect.fn(function* (doc: XmlNode, ...path: Array<string>) {\n const val = yield* getProp(doc, ...path);\n if (!Predicate.isTruthy(val) && val !== 0) return undefined;\n const value = yield* strOrUnd(val);\n if (Predicate.isString(val) || Predicate.isNumber(val)) {\n return { value };\n }\n if (!Predicate.isTruthy(value)) return undefined;\n return { listId: yield* strOrUnd(val, '@listID'), value };\n});\n\nconst decodeCondition = Effect.fn(function* (doc: XmlNode, ...path: Array<string>) {\n const val = yield* getArray(doc, ...path);\n /* istanbul ignore next -- getArray never returns a falsy value */\n if (Predicate.isNullish(val)) return undefined;\n return yield* Effect.forEach(\n val,\n Effect.fn(function* (item: XmlNode) {\n return { attributeId: yield* strOrUnd(item, 'cbc:AttributeID'), description: yield* strOrUnd(item, 'cbc:Description') };\n })\n );\n});\n\nconst decodeDocumentResponseStatus = Effect.fn(function* (doc: XmlNode, ...path: Array<string>) {\n const val = yield* getArray(doc, ...path);\n /* istanbul ignore next -- getArray never returns a falsy value */\n if (Predicate.isNullish(val)) return undefined;\n return yield* Effect.forEach(\n val,\n Effect.fn(function* (item: XmlNode) {\n return {\n condition: yield* decodeCondition(item, 'cac:Condition'),\n statusReason: yield* strOrUnd(item, 'cbc:StatusReason'),\n statusReasonCode: yield* decodeStatusReasonCode(item, 'cbc:StatusReasonCode'),\n };\n })\n );\n});\n\nconst decodeDocumentActualResponse = Effect.fn(function* (doc: XmlNode, ...path: Array<string>) {\n const val = yield* getProp(doc, ...path);\n if (Predicate.isNullish(val)) return undefined;\n return {\n effectiveDate: yield* strOrUnd(val, 'cbc:EffectiveDate'),\n responseCode: yield* strOrUnd(val, 'cbc:ResponseCode'),\n status: yield* decodeDocumentResponseStatus(val, 'cac:Status'),\n };\n});\n\nconst decodeDocumentReference = Effect.fn(function* (doc: XmlNode, ...path: Array<string>) {\n const val = yield* getProp(doc, ...path);\n if (Predicate.isNullish(val)) return undefined;\n return {\n documentTypeCode: yield* strOrUnd(val, 'cbc:DocumentTypeCode'),\n id: yield* strOrUnd(val, 'cbc:ID'),\n issueDate: yield* strOrUnd(val, 'cbc:IssueDate'),\n };\n});\n\nconst decodeDocumentResponse = Effect.fn(function* (doc: XmlNode, ...path: Array<string>) {\n const val = yield* getProp(doc, ...path);\n if (Predicate.isNullish(val)) return undefined;\n\n return {\n documentReference: yield* decodeDocumentReference(val, 'cac:DocumentReference'),\n issuerParty: yield* decodeInvoiceMessageDocumentParty(val, 'cac:IssuerParty'),\n recipientParty: yield* decodeInvoiceMessageDocumentParty(val, 'cac:RecipientParty'),\n response: yield* decodeDocumentActualResponse(val, 'cac:Response'),\n };\n});\n\nexport const decodeInvoiceResponse = Effect.fn(function* (value: XmlNode) {\n const { base, doc } = yield* decodeApplicationResponseBase(value);\n\n return {\n ...base,\n documentResponse: yield* decodeDocumentResponse(doc, 'cac:DocumentResponse'),\n note: yield* strOrUnd(doc, 'cbc:Note'),\n profileId: yield* strOrUnd<'urn:fdc:peppol.eu:poacc:bis:invoice_response:3'>(doc, 'cbc:ProfileID'),\n receiverParty: yield* decodeInvoiceMessageParty(doc, 'cac:ReceiverParty'),\n senderParty: yield* decodeInvoiceMessageParty(doc, 'cac:SenderParty'),\n };\n});\n","import { Effect } from 'effect';\n\nimport type { XmlNode } from '#/helpers/get-prop.ts';\n\nimport { decodeLineShared } from '#/decoders/fields/decode-line-shared.ts';\nimport { decodeNodeList } from '#/decoders/fields/decode-node-list.ts';\nimport { decodeQuantity } from '#/decoders/fields/decode-quantity.ts';\n\nexport const decodeInvoiceLines = Effect.fn('decode-invoice-lines')(function* (doc: XmlNode, ...path: Array<string>) {\n return yield* decodeNodeList(\n doc,\n Effect.fn(function* (lineNode: XmlNode) {\n const shared = yield* decodeLineShared(lineNode);\n return { ...shared, invoicedQuantity: yield* decodeQuantity(lineNode, 'cbc:InvoicedQuantity') };\n }),\n ...path\n );\n});\n","import { Effect } from 'effect';\n\nimport type { XmlNode } from '#/helpers/get-prop.ts';\n\nimport { decodeBilling } from '#/decoders/decode-billing.ts';\nimport { decodeInvoiceLines } from '#/decoders/fields/decode-invoice-lines.ts';\nimport { decodeSimpleIdentifer } from '#/decoders/fields/decode-simple-identifier.ts';\nimport { getProp } from '#/helpers/get-prop.ts';\nimport { strOrUnd } from '#/helpers/str-or-und.ts';\n\nexport const decodeInvoice = Effect.fn('decode-invoice')(function* (value: XmlNode) {\n const root = value || {};\n const doc: XmlNode = (yield* getProp(root, 'ubl:Invoice')) ?? root;\n\n return {\n ...(yield* decodeBilling(doc)),\n dueDate: yield* strOrUnd(doc, 'cbc:DueDate'),\n invoiceLines: yield* decodeInvoiceLines(doc, 'cac:InvoiceLine'),\n invoiceTypeCode: yield* strOrUnd(doc, 'cbc:InvoiceTypeCode'),\n projectReference: yield* decodeSimpleIdentifer(doc, 'cac:ProjectReference'),\n };\n});\n","import { Effect, Predicate } from 'effect';\n\nimport type { XmlNode } from '#/helpers/get-prop.ts';\nimport type { PeppolMessageLevelResponseParty } from '#/schemas/peppol-message-level-response-party-schema.ts';\nimport type { RecursivePartial } from '#/types.ts';\n\nimport { decodeElectronicAddress } from '#/decoders/fields/decode-electronic-address.ts';\nimport { getProp } from '#/helpers/get-prop.ts';\n\nexport const decodeMessageLevelParty = Effect.fn(function* (\n party: XmlNode,\n ...path: Array<string>\n): Effect.fn.Return<RecursivePartial<PeppolMessageLevelResponseParty> | undefined> {\n const val = yield* getProp(party, ...path);\n if (Predicate.isNullish(val)) return undefined;\n return { endpointId: yield* decodeElectronicAddress(val, 'cbc:EndpointID') };\n});\n","import { Effect, Predicate } from 'effect';\n\nimport type { XmlNode } from '#/helpers/get-prop.ts';\n\nimport { decodeApplicationResponseBase } from '#/decoders/fields/decode-application-response.ts';\nimport { decodeMessageLevelParty } from '#/decoders/fields/decode-message-level-party.ts';\nimport { getArray } from '#/helpers/get-array.ts';\nimport { getProp } from '#/helpers/get-prop.ts';\nimport { strOrUnd } from '#/helpers/str-or-und.ts';\n\nconst decodeLineResponseContent = Effect.fn(function* (doc: XmlNode, ...path: Array<string>) {\n const val = yield* getProp(doc, ...path);\n if (Predicate.isNullish(val)) return undefined;\n return {\n description: yield* strOrUnd(val, 'cbc:Description'),\n responseCode: yield* strOrUnd(val, 'cbc:ResponseCode'),\n status: { statusReasonCode: yield* strOrUnd<'BV' | 'BW' | 'SV'>(val, 'cac:Status', 'cbc:StatusReasonCode') },\n };\n});\n\nconst decodeLineResponse = Effect.fn(function* (doc: XmlNode, ...path: Array<string>) {\n const val = yield* getArray(doc, ...path);\n /* istanbul ignore next -- getArray never returns a falsy value */\n if (Predicate.isNullish(val)) return undefined;\n\n return yield* Effect.forEach(\n val,\n Effect.fn(function* (line: XmlNode) {\n return {\n lineReference: { lineId: yield* strOrUnd(line, 'cac:LineReference', 'cbc:LineID') },\n response: yield* decodeLineResponseContent(line, 'cac:Response'),\n };\n })\n );\n});\n\nconst decodeResponse = Effect.fn(function* (doc: XmlNode, ...path: Array<string>) {\n const val = yield* getProp(doc, ...path);\n if (Predicate.isNullish(val)) return undefined;\n return { description: yield* strOrUnd(val, 'cbc:Description'), responseCode: yield* strOrUnd(val, 'cbc:ResponseCode') };\n});\n\nconst decodeDocumentReference = Effect.fn(function* (doc: XmlNode, ...path: Array<string>) {\n const val = yield* getProp(doc, ...path);\n if (Predicate.isNullish(val)) return undefined;\n return {\n documentTypeCode: yield* strOrUnd(val, 'cbc:DocumentTypeCode'),\n id: yield* strOrUnd(val, 'cbc:ID'),\n versionId: yield* strOrUnd(val, 'cbc:VersionID'),\n };\n});\n\nconst decodeDocumentResponse = Effect.fn(function* (doc: XmlNode, ...path: Array<string>) {\n const val = yield* getProp(doc, ...path);\n if (Predicate.isNullish(val)) return undefined;\n\n return {\n documentReference: yield* decodeDocumentReference(val, 'cac:DocumentReference'),\n lineResponse: yield* decodeLineResponse(val, 'cac:LineResponse'),\n response: yield* decodeResponse(val, 'cac:Response'),\n };\n});\n\nexport const decodeMessageLevelResponse = Effect.fn(function* (value: XmlNode) {\n const { base, doc } = yield* decodeApplicationResponseBase(value);\n return {\n ...base,\n documentResponse: yield* decodeDocumentResponse(doc, 'cac:DocumentResponse'),\n profileId: yield* strOrUnd<'urn:fdc:peppol.eu:poacc:bis:mlr:3'>(doc, 'cbc:ProfileID'),\n receiverParty: yield* decodeMessageLevelParty(doc, 'cac:ReceiverParty'),\n senderParty: yield* decodeMessageLevelParty(doc, 'cac:SenderParty'),\n };\n});\n","import { Effect, Predicate } from 'effect';\n\nimport type { PeppolIdentifier } from '#/schemas/fields/peppol-identifier-schema.ts';\n\nexport const encodeIdentifier = Effect.fn(function* (id?: PeppolIdentifier) {\n if (Predicate.isNullish(id)) return undefined;\n if (Predicate.isNullish(id.schemeId) || id.schemeId === '') return id.id;\n return { '#text': id.id, '@schemeID': id.schemeId };\n});\n","import { Effect, Predicate } from 'effect';\n\nimport type { PeppolAdditionalDocumentReference } from '#/schemas/fields/peppol-additional-document-reference-schema.ts';\n\nimport { encodeIdentifier } from '#/decoders/fields/encode-identifier.ts';\n\nexport const encodeAdditionalDocumentReferences = Effect.fn(function* (refs: ReadonlyArray<PeppolAdditionalDocumentReference> | undefined) {\n if (Predicate.isNullish(refs)) return undefined;\n\n return yield* Effect.forEach(\n refs,\n Effect.fn(function* (ref: PeppolAdditionalDocumentReference) {\n return {\n 'cbc:ID': yield* encodeIdentifier(ref.id),\n 'cbc:DocumentTypeCode': ref.documentTypeCode,\n 'cbc:DocumentDescription': ref.documentDescription,\n 'cac:Attachment': yield* encodeAttachment(ref.attachment),\n };\n })\n );\n});\n\nconst encodeAttachment = Effect.fn(function* (attachment: PeppolAdditionalDocumentReference['attachment'] | undefined) {\n if (Predicate.isNullish(attachment)) return undefined;\n return {\n 'cac:ExternalReference': Predicate.isNotNullish(attachment.externalReference) ? { 'cbc:URI': attachment.externalReference.uri } : undefined,\n 'cbc:EmbeddedDocumentBinaryObject': Predicate.isNotNullish(attachment.embeddedDocumentBinaryObject)\n ? {\n '#text': attachment.embeddedDocumentBinaryObject.content,\n '@filename': attachment.embeddedDocumentBinaryObject.filename,\n '@mimeCode': attachment.embeddedDocumentBinaryObject.mimeCode,\n }\n : undefined,\n };\n});\n","import { Effect, Predicate } from 'effect';\n\nimport type { PeppolAmount } from '#/schemas/fields/peppol-amount-schema.ts';\n\nexport const encodeAmount = Effect.fn(function* (amount?: PeppolAmount) {\n if (Predicate.isNullish(amount)) return undefined;\n return { '#text': amount.value, '@currencyID': amount.currencyId };\n});\n","import { Effect, Predicate } from 'effect';\n\ntype Exact<TExpected, TActual extends TExpected> = keyof TExpected extends keyof TActual\n ? keyof TActual extends keyof TExpected\n ? TActual\n : never\n : never;\n\nexport const encodeSimpleIdentifier = Effect.fn(function* <const T extends { id: string } = { id: string }>(\n identifier: Exact<{ id: string }, T> | undefined\n) {\n if (Predicate.isNullish(identifier)) return undefined;\n\n return { 'cbc:ID': identifier.id };\n});\n","import { Effect, Predicate } from 'effect';\n\nimport type { PeppolAllowanceCharge } from '#/schemas/fields/peppol-allowance-charge-schema.ts';\n\nimport { encodeSimpleIdentifier } from '#/decoders/fields/encode-simple-identifier.ts';\n\nexport const encodeTaxCategory = Effect.fn(function* (taxCategory: PeppolAllowanceCharge['taxCategory']) {\n if (Predicate.isNullish(taxCategory)) {\n return undefined;\n }\n return { 'cbc:ID': taxCategory.id, 'cbc:Percent': taxCategory.percent, 'cac:TaxScheme': yield* encodeSimpleIdentifier(taxCategory.taxSchemeId) };\n});\n","import { Effect, Predicate } from 'effect';\n\nimport type { PeppolAllowanceCharge } from '#/schemas/fields/peppol-allowance-charge-schema.ts';\n\nimport { encodeAmount } from '#/decoders/fields/encode-amount.ts';\nimport { encodeTaxCategory } from '#/decoders/fields/encode-tax-category.ts';\n\nexport const encodeAllowanceCharges = Effect.fn(function* (allowanceCharges: ReadonlyArray<PeppolAllowanceCharge> | undefined) {\n if (Predicate.isNullish(allowanceCharges)) return undefined;\n\n return yield* Effect.forEach(\n allowanceCharges,\n Effect.fn(function* (allowanceCharge: PeppolAllowanceCharge) {\n return {\n 'cbc:ChargeIndicator': allowanceCharge.chargeIndicator,\n 'cbc:AllowanceChargeReasonCode': allowanceCharge.allowanceChargeReasonCode,\n 'cbc:AllowanceChargeReason': allowanceCharge.allowanceChargeReason,\n 'cbc:MultiplierFactorNumeric': allowanceCharge.multiplierFactorNumeric,\n 'cbc:Amount': yield* encodeAmount(allowanceCharge.amount),\n 'cbc:BaseAmount': yield* encodeAmount(allowanceCharge.baseAmount),\n 'cac:TaxCategory': yield* encodeTaxCategory(allowanceCharge.taxCategory),\n };\n })\n );\n});\n","import { Effect } from 'effect';\n\nimport type { PeppolBillingReference } from '#/schemas/fields/peppol-billing-reference-schema.ts';\n\nexport const encodeBillingReferences = Effect.fn(function* (billingReferences: ReadonlyArray<PeppolBillingReference> | undefined) {\n return billingReferences?.map(billingReference => ({\n 'cac:InvoiceDocumentReference': {\n 'cbc:ID': billingReference.invoiceDocumentReference.id,\n 'cbc:IssueDate': billingReference.invoiceDocumentReference.issueDate,\n },\n }));\n});\n","import { Effect, Predicate } from 'effect';\n\nimport type { PeppolInvoiceLinePeriod } from '#/schemas/fields/peppol-invoice-line-period-schema.ts';\n\nexport const encodeInvoiceLinePeriod = Effect.fn(function* (invoicePeriod: PeppolInvoiceLinePeriod | undefined) {\n return Predicate.isNotNullish(invoicePeriod) ? { 'cbc:StartDate': invoicePeriod.startDate, 'cbc:EndDate': invoicePeriod.endDate } : undefined;\n});\n","import { Effect, Predicate } from 'effect';\n\nimport type { PeppolLineAllowanceCharge } from '#/schemas/fields/peppol-line-allowance-charge-schema.ts';\n\nimport { encodeAmount } from '#/decoders/fields/encode-amount.ts';\n\nexport const encodeLineAllowanceCharges = Effect.fn(function* (allowanceCharges: ReadonlyArray<PeppolLineAllowanceCharge> | undefined) {\n if (Predicate.isNullish(allowanceCharges)) return undefined;\n\n return yield* Effect.forEach(\n allowanceCharges,\n Effect.fn(function* (allowanceCharge: PeppolLineAllowanceCharge) {\n return {\n 'cbc:ChargeIndicator': allowanceCharge.chargeIndicator,\n 'cbc:AllowanceChargeReasonCode': allowanceCharge.allowanceChargeReasonCode,\n 'cbc:AllowanceChargeReason': allowanceCharge.allowanceChargeReason,\n 'cbc:MultiplierFactorNumeric': allowanceCharge.multiplierFactorNumeric,\n 'cbc:Amount': yield* encodeAmount(allowanceCharge.amount),\n 'cbc:BaseAmount': yield* encodeAmount(allowanceCharge.baseAmount),\n };\n })\n );\n});\n","import { Effect, Predicate } from 'effect';\n\nimport type { PeppolLinePriceAllowanceCharge } from '#/schemas/fields/peppol-line-price-allowance-charge-schema.ts';\n\nimport { encodeAmount } from '#/decoders/fields/encode-amount.ts';\n\nexport const encodePriceAllowanceCharges = Effect.fn(function* (allowanceCharge: PeppolLinePriceAllowanceCharge | undefined) {\n if (Predicate.isNullish(allowanceCharge)) {\n return undefined;\n }\n\n return {\n 'cbc:ChargeIndicator': allowanceCharge.chargeIndicator,\n 'cbc:Amount': yield* encodeAmount(allowanceCharge.amount),\n 'cbc:BaseAmount': yield* encodeAmount(allowanceCharge.baseAmount),\n };\n});\n","import { Effect, Predicate } from 'effect';\n\nimport type { PeppolQuantity } from '#/schemas/fields/peppol-quantity-schema.ts';\n\nexport const encodeQuantity = Effect.fn(function* (quantity?: PeppolQuantity) {\n if (Predicate.isNullish(quantity)) return undefined;\n return { '#text': quantity.value, '@unitCode': quantity.unitCode };\n});\n","import { Effect, Predicate } from 'effect';\n\nimport type { PeppolLinePrice } from '#/schemas/fields/peppol-line-price-schema.ts';\n\nimport { encodeAmount } from '#/decoders/fields/encode-amount.ts';\nimport { encodePriceAllowanceCharges } from '#/decoders/fields/encode-price-allowance-charges.ts';\nimport { encodeQuantity } from '#/decoders/fields/encode-quantity.ts';\n\nexport const encodeLinePrice = Effect.fn(function* (price: PeppolLinePrice | undefined) {\n if (Predicate.isNullish(price)) {\n return undefined;\n }\n return {\n 'cbc:PriceAmount': yield* encodeAmount(price.priceAmount),\n 'cbc:BaseQuantity': yield* encodeQuantity(price.baseQuantity),\n 'cac:AllowanceCharge': yield* encodePriceAllowanceCharges(price.allowanceCharge),\n };\n});\n","import { Effect, Predicate } from 'effect';\n\nimport type { PeppolDocumentLine } from '#/schemas/peppol-document-schema.ts';\n\nimport { encodeAmount } from '#/decoders/fields/encode-amount.ts';\nimport { encodeIdentifier } from '#/decoders/fields/encode-identifier.ts';\nimport { encodeInvoiceLinePeriod } from '#/decoders/fields/encode-invoice-line-period.ts';\nimport { encodeLineAllowanceCharges } from '#/decoders/fields/encode-line-allowance-charges.ts';\nimport { encodeLinePrice } from '#/decoders/fields/encode-line-price.ts';\nimport { encodeQuantity } from '#/decoders/fields/encode-quantity.ts';\nimport { encodeSimpleIdentifier } from '#/decoders/fields/encode-simple-identifier.ts';\nimport { encodeTaxCategory } from '#/decoders/fields/encode-tax-category.ts';\n\nexport const encodeLineShared = Effect.fn(function* (lineShared: PeppolDocumentLine) {\n return {\n 'cbc:ID': lineShared.id,\n 'cbc:Note': lineShared.note,\n 'cbc:InvoicedQuantity': 'invoicedQuantity' in lineShared ? yield* encodeQuantity(lineShared.invoicedQuantity) : undefined,\n 'cbc:CreditedQuantity': 'creditedQuantity' in lineShared ? yield* encodeQuantity(lineShared.creditedQuantity) : undefined,\n 'cbc:LineExtensionAmount': yield* encodeAmount(lineShared.lineExtensionAmount),\n 'cbc:AccountingCost': lineShared.accountingCost,\n 'cac:InvoicePeriod': yield* encodeInvoiceLinePeriod(lineShared.invoicePeriod),\n 'cac:OrderLineReference': lineShared.orderLineReference ? { 'cbc:LineID': lineShared.orderLineReference.lineId } : undefined,\n 'cac:DocumentReference': Predicate.isNullish(lineShared.documentReference)\n ? undefined\n : yield* Effect.forEach(\n lineShared.documentReference,\n Effect.fn(function* (documentReference) {\n return { 'cbc:DocumentTypeCode': documentReference.documentTypeCode, 'cbc:ID': yield* encodeIdentifier(documentReference) };\n })\n ),\n 'cac:AllowanceCharge': yield* encodeLineAllowanceCharges(lineShared.allowanceCharges),\n 'cac:Item': {\n 'cbc:Description': lineShared.item.description,\n 'cbc:Name': lineShared.item.name,\n 'cac:BuyersItemIdentification': yield* encodeSimpleIdentifier(lineShared.item.buyersItemIdentification),\n 'cac:SellersItemIdentification': yield* encodeSimpleIdentifier(lineShared.item.sellersItemIdentification),\n 'cac:StandardItemIdentification': lineShared.item.standardItemIdentification\n ? { 'cbc:ID': yield* encodeIdentifier(lineShared.item.standardItemIdentification.id) }\n : undefined,\n 'cac:OriginCountry': lineShared.item.originCountryCode\n ? { 'cbc:IdentificationCode': lineShared.item.originCountryCode.identificationCode }\n : undefined,\n 'cac:CommodityClassification': lineShared.item.commodityClassifications?.map(c => ({\n 'cbc:ItemClassificationCode': {\n '#text': c.itemClassification.id,\n '@listID': c.itemClassification.listId,\n '@listVersionID': c.itemClassification.listVersionId,\n },\n })),\n 'cac:ClassifiedTaxCategory': yield* encodeTaxCategory(lineShared.item.classifiedTaxCategory),\n 'cac:AdditionalItemProperty': lineShared.item.additionalItemProperties?.map(p => ({ 'cbc:Name': p.name, 'cbc:Value': p.value })),\n },\n 'cac:Price': yield* encodeLinePrice(lineShared.price),\n };\n});\n","import { Effect } from 'effect';\n\nimport type { PeppolCreditNoteLine } from '#/schemas/fields/peppol-credit-note-line-schema.ts';\n\nimport { encodeLineShared } from '#/decoders/fields/encode-line-shared.ts';\n\nexport const encodeCreditNoteLines = Effect.fn(function* (creditNoteLines: ReadonlyArray<PeppolCreditNoteLine>) {\n if (creditNoteLines.length === 0) return undefined;\n\n return yield* Effect.forEach(creditNoteLines, encodeLineShared);\n});\n","import { Effect, Predicate } from 'effect';\n\nimport type { XmlNode } from '#/helpers/get-prop.ts';\nimport type { PeppolAddress } from '#/schemas/fields/peppol-address-schema.ts';\n\nexport const encodeAddress = Effect.fn(function* (address?: PeppolAddress): Effect.fn.Return<XmlNode> {\n if (Predicate.isNullish(address)) return undefined;\n return {\n 'cbc:StreetName': address.streetName,\n 'cbc:AdditionalStreetName': address.additionalStreetName,\n 'cbc:CityName': address.cityName,\n 'cbc:PostalZone': address.postalZone,\n 'cbc:CountrySubentity': address.countrySubentity,\n 'cac:AddressLine': address.addressLine?.line ? { 'cbc:Line': address.addressLine.line } : undefined,\n 'cac:Country': { 'cbc:IdentificationCode': address.countryCode.identificationCode },\n };\n});\n","import { Effect, Predicate } from 'effect';\n\nimport type { PeppolDelivery } from '#/schemas/fields/peppol-delivery-schema.ts';\n\nimport { encodeAddress } from '#/decoders/fields/encode-address.ts';\nimport { encodeIdentifier } from '#/decoders/fields/encode-identifier.ts';\n\nexport const encodeDelivery = Effect.fn(function* (delivery: PeppolDelivery | undefined) {\n if (Predicate.isNullish(delivery)) return undefined;\n\n return {\n 'cbc:ActualDeliveryDate': delivery.actualDeliveryDate,\n 'cac:DeliveryLocation': yield* encodeDeliveryLocation(delivery.deliveryLocation),\n 'cac:DeliveryParty': Predicate.isTruthy(delivery.deliveryParty?.partyName.name)\n ? { 'cac:PartyName': { 'cbc:Name': delivery.deliveryParty?.partyName.name } }\n : undefined,\n };\n});\n\nconst encodeDeliveryLocation = Effect.fn(function* (location: PeppolDelivery['deliveryLocation']) {\n if (Predicate.isNullish(location)) return undefined;\n return { 'cbc:ID': yield* encodeIdentifier(location.id), 'cac:Address': yield* encodeAddress(location.address) };\n});\n","import { Effect, Predicate } from 'effect';\n\nimport type { PeppolInvoicePeriod } from '#/schemas/fields/peppol-invoice-period-schema.ts';\n\nexport const encodeInvoicePeriod = Effect.fn(function* (invoicePeriod: PeppolInvoicePeriod | undefined) {\n return Predicate.isNotNullish(invoicePeriod)\n ? { 'cbc:StartDate': invoicePeriod.startDate, 'cbc:EndDate': invoicePeriod.endDate, 'cbc:DescriptionCode': invoicePeriod.descriptionCode }\n : undefined;\n});\n","import { Effect } from 'effect';\n\nimport type { PeppolLegalMonetaryTotal } from '#/schemas/fields/peppol-legal-monetary-total-schema.ts';\n\nimport { encodeAmount } from '#/decoders/fields/encode-amount.ts';\n\nexport const encodeLegalMonetaryTotal = Effect.fn(function* (legalMonetaryTotal: PeppolLegalMonetaryTotal) {\n return {\n 'cbc:LineExtensionAmount': yield* encodeAmount(legalMonetaryTotal.lineExtensionAmount),\n 'cbc:TaxExclusiveAmount': yield* encodeAmount(legalMonetaryTotal.taxExclusiveAmount),\n 'cbc:TaxInclusiveAmount': yield* encodeAmount(legalMonetaryTotal.taxInclusiveAmount),\n 'cbc:AllowanceTotalAmount': yield* encodeAmount(legalMonetaryTotal.allowanceTotalAmount),\n 'cbc:ChargeTotalAmount': yield* encodeAmount(legalMonetaryTotal.chargeTotalAmount),\n 'cbc:PrepaidAmount': yield* encodeAmount(legalMonetaryTotal.prepaidAmount),\n 'cbc:PayableRoundingAmount': yield* encodeAmount(legalMonetaryTotal.payableRoundingAmount),\n 'cbc:PayableAmount': yield* encodeAmount(legalMonetaryTotal.payableAmount),\n };\n});\n","import { Effect, Predicate } from 'effect';\n\nimport type { PeppolOrderReference } from '#/schemas/fields/peppol-order-reference-schema.ts';\n\nexport const encodeOrderReference = Effect.fn(function* (orderReference: PeppolOrderReference | undefined) {\n if (Predicate.isNullish(orderReference)) return undefined;\n\n return { 'cbc:ID': orderReference.id, 'cbc:SalesOrderID': orderReference.salesOrderId };\n});\n","import { Effect, Predicate } from 'effect';\n\nimport type { PeppolContact } from '#/schemas/fields/peppol-contact-schema.ts';\n\nexport const encodeContact = Effect.fn(function* (contact: PeppolContact | undefined) {\n if (Predicate.isNullish(contact)) return undefined;\n\n return { 'cbc:Name': contact.name, 'cbc:Telephone': contact.telephone, 'cbc:ElectronicMail': contact.electronicMail };\n});\n","import { Effect, Predicate } from 'effect';\n\nimport type { XmlNode } from '#/helpers/get-prop.ts';\nimport type { PeppolPartyTaxSchema } from '#/schemas/fields/peppol-party-tax-scheme-schema.ts';\n\nimport { encodeSimpleIdentifier } from '#/decoders/fields/encode-simple-identifier.ts';\n\nexport const encodePartyTaxScheme = Effect.fn(function* (partyTaxScheme: PeppolPartyTaxSchema | undefined): Effect.fn.Return<XmlNode> {\n if (Predicate.isNullish(partyTaxScheme)) return undefined;\n\n return { 'cbc:CompanyID': partyTaxScheme.companyId, 'cac:TaxScheme': yield* encodeSimpleIdentifier(partyTaxScheme.taxSchemeId) };\n});\n","import { Effect, Predicate } from 'effect';\n\nimport type { XmlNode } from '#/helpers/get-prop.ts';\nimport type { PeppolPartyTaxSchema } from '#/schemas/fields/peppol-party-tax-scheme-schema.ts';\n\nimport { encodePartyTaxScheme } from '#/decoders/fields/encode-party-tax-scheme.ts';\n\nexport const encodePartiesTaxScheme = Effect.fn(function* (partiesTaxScheme: Array<PeppolPartyTaxSchema> | undefined): Effect.fn.Return<XmlNode> {\n if (Predicate.isNullish(partiesTaxScheme) || partiesTaxScheme.length === 0) return undefined;\n\n return yield* Effect.forEach(\n partiesTaxScheme,\n Effect.fn(function* (partyTaxScheme: PeppolPartyTaxSchema) {\n return yield* encodePartyTaxScheme(partyTaxScheme);\n })\n );\n});\n","import { Effect } from 'effect';\n\nimport { encodeIdentifier } from '#/decoders/fields/encode-identifier.ts';\n\nexport const encodePartyLegalEntity = Effect.fn(function* (legalEntity: {\n registrationName?: string;\n companyId?: Parameters<typeof encodeIdentifier>[0];\n companyLegalForm?: string | undefined;\n}) {\n return {\n 'cbc:RegistrationName': legalEntity.registrationName,\n 'cbc:CompanyID': yield* encodeIdentifier(legalEntity.companyId),\n 'cbc:CompanyLegalForm': legalEntity.companyLegalForm,\n };\n});\n","import { Effect, Predicate } from 'effect';\n\nimport type { PeppolPartySchema } from '#/schemas/fields/peppol-party-base-schema.ts';\n\nimport { encodeAddress } from '#/decoders/fields/encode-address.ts';\nimport { encodeContact } from '#/decoders/fields/encode-contact.ts';\nimport { encodeIdentifier } from '#/decoders/fields/encode-identifier.ts';\nimport { encodePartiesTaxScheme } from '#/decoders/fields/encode-parties-tax-scheme.ts';\nimport { encodePartyLegalEntity } from '#/decoders/fields/encode-party-legal-entity.ts';\n\nexport const encodeParty = Effect.fn(function* (party?: PeppolPartySchema) {\n if (Predicate.isNullish(party)) return undefined;\n\n return {\n 'cac:Party': {\n 'cbc:EndpointID': yield* encodeIdentifier(party.endpointId),\n 'cac:PartyIdentification': yield* encodeAdditionalIdentifiers(party.partyIdentification),\n 'cac:PartyName': yield* encodePartyName(party.partyName),\n 'cac:PostalAddress': yield* encodeAddress(party.postalAddress),\n 'cac:PartyTaxScheme': yield* encodePartiesTaxScheme(party.partyTaxSchemes),\n 'cac:PartyLegalEntity': yield* encodePartyLegalEntity(party.partyLegalEntity),\n 'cac:Contact': yield* encodeContact(party.contact),\n },\n };\n});\n\nconst encodePartyName = Effect.fn(function* (partyName?: PeppolPartySchema['partyName']) {\n if (Predicate.isNullish(partyName)) return undefined;\n return { 'cbc:Name': partyName.name };\n});\n\nconst encodeAdditionalIdentifiers = Effect.fn(function* (identifiers: PeppolPartySchema['partyIdentification']) {\n if (Predicate.isNullish(identifiers)) return undefined;\n return { 'cbc:ID': yield* encodeIdentifier(identifiers?.id) };\n});\n","import { Effect, Predicate } from 'effect';\n\nimport type { PeppolPayeeParty } from '#/schemas/fields/peppol-payee-party-schema.ts';\n\nimport { encodeIdentifier } from '#/decoders/fields/encode-identifier.ts';\n\nexport const encodePayeeParty = Effect.fn(function* (payeeParty: PeppolPayeeParty | undefined) {\n if (Predicate.isNullish(payeeParty)) return undefined;\n return {\n 'cac:PartyIdentification': yield* encodePartyIdentification(payeeParty.partyIdentification),\n 'cac:PartyName': yield* encodePartyName(payeeParty.partyName),\n 'cac:PartyLegalEntity': yield* encodePartyLegalEntity(payeeParty.partyLegalEntity),\n };\n});\n\nconst encodePartyName = Effect.fn(function* (partyName: PeppolPayeeParty['partyName']) {\n return { 'cbc:Name': partyName.name };\n});\n\nconst encodePartyLegalEntity = Effect.fn(function* (partyLegalEntity: PeppolPayeeParty['partyLegalEntity']) {\n if (Predicate.isNullish(partyLegalEntity)) return undefined;\n return { 'cbc:CompanyId': Predicate.isTruthy(partyLegalEntity?.companyId) ? yield* encodeIdentifier(partyLegalEntity?.companyId) : undefined };\n});\n\nconst encodePartyIdentification = Effect.fn(function* (partyIdentification: PeppolPayeeParty['partyIdentification']) {\n if (Predicate.isNullish(partyIdentification)) return undefined;\n return { 'cbc:ID': Predicate.isTruthy(partyIdentification.id) ? yield* encodeIdentifier(partyIdentification.id) : undefined };\n});\n","import { Effect, Predicate } from 'effect';\n\nimport type { PeppolPaymentMeans } from '#/schemas/fields/peppol-payment-means-schema.ts';\n\nimport { encodeSimpleIdentifier } from '#/decoders/fields/encode-simple-identifier.ts';\n\nexport const encodePaymentMeans = Effect.fn(function* (pms: ReadonlyArray<PeppolPaymentMeans> | undefined) {\n if (Predicate.isNullish(pms)) return undefined;\n\n return yield* Effect.forEach(\n pms,\n Effect.fn(function* (pm: PeppolPaymentMeans) {\n return {\n 'cbc:PaymentMeansCode': yield* encodePaymentMeansCode(pm.paymentMeansCode),\n 'cbc:PaymentID': pm.paymentId,\n 'cbc:PaymentDueDate': pm.paymentDueDate,\n 'cac:CardAccount': Predicate.isNotNullish(pm.cardAccount)\n ? {\n 'cbc:PrimaryAccountNumberID': pm.cardAccount.primaryAccountNumberId,\n 'cbc:NetworkID': pm.cardAccount.networkId,\n 'cbc:HolderName': pm.cardAccount.holderName,\n }\n : undefined,\n 'cac:PayeeFinancialAccount': yield* encodePayeeFinancialAccount(pm.payeeFinancialAccount),\n 'cac:PaymentMandate': yield* encodePaymentMendate(pm.paymentMandate),\n };\n })\n );\n});\n\nconst encodePaymentMeansCode = Effect.fn(function* (code: PeppolPaymentMeans['paymentMeansCode'] | undefined) {\n if (Predicate.isNullish(code)) return undefined;\n return { '#text': code.code, '@name': code.name };\n});\n\nconst encodePaymentMendate = Effect.fn(function* (mendate: PeppolPaymentMeans['paymentMandate'] | undefined) {\n if (Predicate.isNullish(mendate)) return undefined;\n return { 'cbc:Id': mendate.id, 'cac:PayerFinancialAccount': yield* encodeSimpleIdentifier(mendate.payerFinancialAccountId) };\n});\n\nconst encodePayeeFinancialAccount = Effect.fn(function* (account: PeppolPaymentMeans['payeeFinancialAccount'] | undefined) {\n if (Predicate.isNullish(account)) return undefined;\n return {\n 'cbc:ID': account.id,\n 'cbc:Name': account.name,\n 'cac:FinancialInstitutionBranch': yield* encodeSimpleIdentifier(account.financialInstitutionBranch),\n };\n});\n","import { Effect, Predicate } from 'effect';\n\nimport type { PeppolPaymentTerms } from '#/schemas/fields/peppol-payment-terms-schema.ts';\n\nexport const encodePaymentTerms = Effect.fn(function* (paymentTerms: PeppolPaymentTerms | undefined) {\n if (Predicate.isNullish(paymentTerms)) return undefined;\n\n return { 'cbc:Note': paymentTerms.note };\n});\n","import { Effect, Predicate } from 'effect';\n\nimport type { XmlNode } from '#/helpers/get-prop.ts';\nimport type { PeppolTaxRepresentativeParty } from '#/schemas/fields/peppol-tax-representative-schema.ts';\n\nimport { encodeAddress } from '#/decoders/fields/encode-address.ts';\nimport { encodePartyTaxScheme } from '#/decoders/fields/encode-party-tax-scheme.ts';\n\nexport const encodeTaxRepresentativeParty = Effect.fn(function* (\n taxRepresentativeParty: PeppolTaxRepresentativeParty | undefined\n): Effect.fn.Return<XmlNode> {\n if (Predicate.isNullish(taxRepresentativeParty)) {\n return undefined;\n }\n return {\n 'cac:PartyName': { 'cbc:Name': taxRepresentativeParty.name },\n 'cac:PostalAddress': yield* encodeAddress(taxRepresentativeParty.postalAddress),\n 'cac:PartyTaxScheme': yield* encodePartyTaxScheme(taxRepresentativeParty.partyTaxScheme),\n };\n});\n","import { Effect, Predicate } from 'effect';\n\nimport type { PeppolTaxSubTotal } from '#/schemas/fields/peppol-tax-subtotal-schema.ts';\nimport type { PeppolTaxTotal } from '#/schemas/fields/peppol-tax-totals-base-schema.ts';\n\nimport { encodeAmount } from '#/decoders/fields/encode-amount.ts';\nimport { encodeSimpleIdentifier } from '#/decoders/fields/encode-simple-identifier.ts';\n\nexport const encodeTaxTotals = Effect.fn(function* (taxTotals: ReadonlyArray<PeppolTaxTotal>) {\n return yield* Effect.forEach(\n taxTotals,\n Effect.fn(function* (taxTotal: PeppolTaxTotal) {\n return { 'cbc:TaxAmount': yield* encodeAmount(taxTotal.taxAmount), 'cac:TaxSubtotal': yield* encodeTaxSubtotals(taxTotal.taxSubtotals) };\n })\n );\n});\n\nconst encodeTaxSubtotals = Effect.fn(function* (taxSubtotals: ReadonlyArray<PeppolTaxSubTotal> | undefined) {\n if (Predicate.isNullish(taxSubtotals)) return undefined;\n\n return yield* Effect.forEach(\n taxSubtotals,\n Effect.fn(function* (taxSubTotal: PeppolTaxSubTotal) {\n return {\n 'cbc:TaxableAmount': yield* encodeAmount(taxSubTotal.taxableAmount),\n 'cbc:TaxAmount': yield* encodeAmount(taxSubTotal.taxAmount),\n 'cac:TaxCategory': {\n 'cbc:ID': taxSubTotal.taxCategory.id,\n 'cbc:Percent': taxSubTotal.taxCategory.percent,\n 'cbc:TaxExemptionReasonCode': taxSubTotal.taxCategory.taxExemptionReasonCode,\n 'cbc:TaxExemptionReason': taxSubTotal.taxCategory.taxExemptionReason,\n 'cac:TaxScheme': yield* encodeSimpleIdentifier(taxSubTotal.taxCategory.taxSchemeId),\n },\n };\n })\n );\n});\n","import { Effect } from 'effect';\n\nimport type { PeppolCreditNote } from '#/schemas/peppol-credit-note-schema.ts';\n\nimport { encodeAdditionalDocumentReferences } from '#/decoders/fields/encode-additional-document-references.ts';\nimport { encodeAllowanceCharges } from '#/decoders/fields/encode-allowance-charges.ts';\nimport { encodeBillingReferences } from '#/decoders/fields/encode-billing-references.ts';\nimport { encodeCreditNoteLines } from '#/decoders/fields/encode-credit-note-lines.ts';\nimport { encodeDelivery } from '#/decoders/fields/encode-delivery.ts';\nimport { encodeInvoicePeriod } from '#/decoders/fields/encode-invoice-period.ts';\nimport { encodeLegalMonetaryTotal } from '#/decoders/fields/encode-legal-monetary-total.ts';\nimport { encodeOrderReference } from '#/decoders/fields/encode-order-reference.ts';\nimport { encodeParty } from '#/decoders/fields/encode-party.ts';\nimport { encodePayeeParty } from '#/decoders/fields/encode-payee-party.ts';\nimport { encodePaymentMeans } from '#/decoders/fields/encode-payment-means.ts';\nimport { encodePaymentTerms } from '#/decoders/fields/encode-payment-terms.ts';\nimport { encodeSimpleIdentifier } from '#/decoders/fields/encode-simple-identifier.ts';\nimport { encodeTaxRepresentativeParty } from '#/decoders/fields/encode-tax-representative-party.ts';\nimport { encodeTaxTotals } from '#/decoders/fields/encode-tax-totals.ts';\n\nexport const encodeCreditNote = Effect.fn(function* (creditNote: PeppolCreditNote) {\n return {\n '?xml': { '@version': '1.0', '@encoding': 'UTF-8' },\n CreditNote: {\n '@xmlns:xsi': 'http://www.w3.org/2001/XMLSchema-instance',\n '@xsi:schemaLocation':\n import.meta.env['MODE'] === 'test'\n ? 'urn:oasis:names:specification:ubl:schema:xsd:CreditNote-2 https://docs.oasis-open.org/ubl/os-UBL-2.4/xsd/maindoc/UBL-CreditNote-2.4.xsd urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2 https://docs.oasis-open.org/ubl/os-UBL-2.4/xsd/common/UBL-CommonAggregateComponents-2.4.xsd urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2 https://docs.oasis-open.org/ubl/os-UBL-2.4/xsd/common/UBL-CommonBasicComponents-2.4.xsd'\n : undefined,\n '@xmlns:cac': 'urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2',\n '@xmlns:cbc': 'urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2',\n '@xmlns': 'urn:oasis:names:specification:ubl:schema:xsd:CreditNote-2',\n 'cbc:CustomizationID': creditNote.customizationId,\n 'cbc:ProfileID': creditNote.profileId,\n 'cbc:ID': creditNote.id,\n 'cbc:IssueDate': creditNote.issueDate,\n 'cbc:CreditNoteTypeCode': creditNote.creditNoteTypeCode,\n 'cbc:Note': creditNote.note,\n 'cbc:TaxPointDate': creditNote.taxPointDate,\n 'cbc:DocumentCurrencyCode': creditNote.documentCurrencyCode,\n 'cbc:TaxCurrencyCode': creditNote.taxCurrencyCode,\n 'cbc:AccountingCost': creditNote.accountingCost,\n 'cbc:BuyerReference': creditNote.buyerReference,\n 'cac:InvoicePeriod': yield* encodeInvoicePeriod(creditNote.invoicePeriod),\n 'cac:OrderReference': yield* encodeOrderReference(creditNote.orderReference),\n 'cac:BillingReference': yield* encodeBillingReferences(creditNote.billingReferences),\n 'cac:DespatchDocumentReference': yield* encodeSimpleIdentifier(creditNote.despatchDocumentReference),\n 'cac:ReceiptDocumentReference': yield* encodeSimpleIdentifier(creditNote.receiptDocumentReference),\n 'cac:OriginatorDocumentReference': yield* encodeSimpleIdentifier(creditNote.originatorDocumentReference),\n 'cac:ContractDocumentReference': yield* encodeSimpleIdentifier(creditNote.contractDocumentReference),\n 'cac:AdditionalDocumentReference': yield* encodeAdditionalDocumentReferences(creditNote.additionalDocumentReferences),\n 'cac:AccountingSupplierParty': yield* encodeParty(creditNote.accountingSupplierParty),\n 'cac:AccountingCustomerParty': yield* encodeParty(creditNote.accountingCustomerParty),\n 'cac:PayeeParty': yield* encodePayeeParty(creditNote.payeeParty),\n 'cac:TaxRepresentativeParty': yield* encodeTaxRepresentativeParty(creditNote.taxRepresentativeParty),\n 'cac:Delivery': yield* encodeDelivery(creditNote.delivery),\n 'cac:PaymentMeans': yield* encodePaymentMeans(creditNote.paymentMeans),\n 'cac:PaymentTerms': yield* encodePaymentTerms(creditNote.paymentTerms),\n 'cac:AllowanceCharge': yield* encodeAllowanceCharges(creditNote.allowanceCharges),\n 'cac:TaxTotal': yield* encodeTaxTotals(creditNote.taxTotals),\n 'cac:LegalMonetaryTotal': yield* encodeLegalMonetaryTotal(creditNote.legalMonetaryTotal),\n 'cac:CreditNoteLine': yield* encodeCreditNoteLines(creditNote.creditNoteLines),\n },\n };\n});\n","import { Effect, Predicate } from 'effect';\n\nimport type { PeppolContact } from '#/schemas/fields/peppol-contact-schema.ts';\nimport type { PeppolIdentifier } from '#/schemas/fields/peppol-identifier-schema.ts';\nimport type { PeppolInvoiceDocumentResponseParty, PeppolInvoiceResponseParty } from '#/schemas/peppol-invoice-response-schema.ts';\nimport type { PeppolMessageLevelResponseParty } from '#/schemas/peppol-message-level-response-party-schema.ts';\n\nimport { encodeContact } from '#/decoders/fields/encode-contact.ts';\nimport { encodeIdentifier } from '#/decoders/fields/encode-identifier.ts';\nimport { encodePartyLegalEntity } from '#/decoders/fields/encode-party-legal-entity.ts';\n\ntype ResponseParty = PeppolMessageLevelResponseParty | PeppolInvoiceResponseParty | PeppolInvoiceDocumentResponseParty;\n\n/**\n * @description The response party union exposes different fields per variant; reading the optional ones through a shared view keeps the encoder branch-free.\n */\ninterface ResponsePartyFields {\n endpointId?: PeppolIdentifier | undefined;\n partyIdentification?: PeppolIdentifier | undefined;\n partyName?: { name: string } | undefined;\n partyLegalEntity?:\n | { registrationName?: string | undefined; companyId?: PeppolIdentifier | undefined; companyLegalForm?: string | undefined }\n | undefined;\n contact?: PeppolContact | undefined;\n}\n\nexport const encodeMessageParty = Effect.fn(function* (party?: ResponseParty) {\n if (Predicate.isNullish(party)) return undefined;\n const fields = party as ResponsePartyFields;\n return {\n 'cbc:EndpointID': yield* encodeIdentifier(fields.endpointId),\n 'cac:PartyIdentification': fields.partyIdentification ? { 'cbc:ID': yield* encodeIdentifier(fields.partyIdentification) } : undefined,\n 'cac:PartyName': fields.partyName ? { 'cbc:Name': fields.partyName.name } : undefined,\n 'cac:PartyLegalEntity': fields.partyLegalEntity ? yield* encodePartyLegalEntity(fields.partyLegalEntity) : undefined,\n 'cac:Contact': yield* encodeContact(fields.contact),\n };\n});\n","import { Effect, Predicate } from 'effect';\n\nimport type {\n PeppolInvoiceResponse,\n PeppolInvoiceResponseDocumentReference,\n PeppolInvoiceResponseDocumentResponse,\n} from '#/schemas/peppol-invoice-response-schema.ts';\n\nimport { encodeMessageParty } from '#/decoders/fields/encode-message-party.ts';\n\nexport const encodeInvoiceResponse = Effect.fn(function* (invoiceResponse: PeppolInvoiceResponse) {\n return {\n '?xml': { '@version': '1.0', '@encoding': 'UTF-8' },\n ApplicationResponse: {\n '@xmlns:xsi': 'http://www.w3.org/2001/XMLSchema-instance',\n '@xsi:schemaLocation':\n import.meta.env['MODE'] === 'test'\n ? 'urn:oasis:names:specification:ubl:schema:xsd:ApplicationResponse-2 https://docs.oasis-open.org/ubl/os-UBL-2.4/xsd/maindoc/UBL-ApplicationResponse-2.4.xsd urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2 https://docs.oasis-open.org/ubl/os-UBL-2.4/xsd/common/UBL-CommonAggregateComponents-2.4.xsd urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2 https://docs.oasis-open.org/ubl/os-UBL-2.4/xsd/common/UBL-CommonBasicComponents-2.4.xsd'\n : undefined,\n '@xmlns:cac': 'urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2',\n '@xmlns:cbc': 'urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2',\n '@xmlns': 'urn:oasis:names:specification:ubl:schema:xsd:ApplicationResponse-2',\n 'cbc:CustomizationID': invoiceResponse.customizationId,\n 'cbc:ProfileID': invoiceResponse.profileId,\n 'cbc:ID': invoiceResponse.id,\n 'cbc:IssueDate': invoiceResponse.issueDate,\n 'cbc:IssueTime': invoiceResponse.issueTime,\n 'cbc:Note': invoiceResponse.note,\n 'cac:SenderParty': yield* encodeMessageParty(invoiceResponse.senderParty),\n 'cac:ReceiverParty': yield* encodeMessageParty(invoiceResponse.receiverParty),\n 'cac:DocumentResponse': yield* encodeDocumentResponse(invoiceResponse.documentResponse),\n },\n };\n});\n\nconst encodeDocumentResponse = Effect.fn(function* (documentResponse: PeppolInvoiceResponseDocumentResponse) {\n if (Predicate.isNullish(documentResponse)) {\n return undefined;\n }\n return {\n 'cac:Response': {\n 'cbc:ResponseCode': documentResponse.response.responseCode,\n 'cbc:EffectiveDate': documentResponse.response.effectiveDate,\n 'cac:Status': documentResponse.response.status?.map(status => ({\n 'cbc:StatusReasonCode': Predicate.isNotNullish(status.statusReasonCode)\n ? { '#text': status.statusReasonCode.value, '@listID': status.statusReasonCode.listId }\n : undefined,\n 'cbc:StatusReason': status.statusReason,\n 'cac:Condition': status.condition?.map(condition => ({ 'cbc:AttributeID': condition.attributeId, 'cbc:Description': condition.description })),\n })),\n },\n 'cac:DocumentReference': yield* encodeDocumentReference(documentResponse.documentReference),\n 'cac:IssuerParty': yield* encodeMessageParty(documentResponse.issuerParty),\n 'cac:RecipientParty': yield* encodeMessageParty(documentResponse.recipientParty),\n };\n});\n\nconst encodeDocumentReference = Effect.fn(function* (documentReference: PeppolInvoiceResponseDocumentReference) {\n if (Predicate.isNullish(documentReference)) return undefined;\n return { 'cbc:ID': documentReference.id, 'cbc:IssueDate': documentReference.issueDate, 'cbc:DocumentTypeCode': documentReference.documentTypeCode };\n});\n","import { Effect } from 'effect';\n\nimport type { PeppolInvoiceLine } from '#/schemas/fields/peppol-invoice-line-schema.ts';\n\nimport { encodeLineShared } from '#/decoders/fields/encode-line-shared.ts';\n\nexport const encodeInvoiceLines = Effect.fn(function* (invoiceLines: ReadonlyArray<PeppolInvoiceLine>) {\n if (invoiceLines.length === 0) return undefined;\n\n return yield* Effect.forEach(invoiceLines, encodeLineShared);\n});\n","import { Effect } from 'effect';\n\nimport type { PeppolInvoice } from '#/schemas/peppol-invoice-schema.ts';\n\nimport { encodeAdditionalDocumentReferences } from '#/decoders/fields/encode-additional-document-references.ts';\nimport { encodeAllowanceCharges } from '#/decoders/fields/encode-allowance-charges.ts';\nimport { encodeBillingReferences } from '#/decoders/fields/encode-billing-references.ts';\nimport { encodeDelivery } from '#/decoders/fields/encode-delivery.ts';\nimport { encodeInvoiceLines } from '#/decoders/fields/encode-invoice-lines.ts';\nimport { encodeInvoicePeriod } from '#/decoders/fields/encode-invoice-period.ts';\nimport { encodeLegalMonetaryTotal } from '#/decoders/fields/encode-legal-monetary-total.ts';\nimport { encodeOrderReference } from '#/decoders/fields/encode-order-reference.ts';\nimport { encodeParty } from '#/decoders/fields/encode-party.ts';\nimport { encodePayeeParty } from '#/decoders/fields/encode-payee-party.ts';\nimport { encodePaymentMeans } from '#/decoders/fields/encode-payment-means.ts';\nimport { encodePaymentTerms } from '#/decoders/fields/encode-payment-terms.ts';\nimport { encodeSimpleIdentifier } from '#/decoders/fields/encode-simple-identifier.ts';\nimport { encodeTaxRepresentativeParty } from '#/decoders/fields/encode-tax-representative-party.ts';\nimport { encodeTaxTotals } from '#/decoders/fields/encode-tax-totals.ts';\n\nexport const encodeInvoice = Effect.fn(function* (invoice: PeppolInvoice) {\n return {\n '?xml': { '@version': '1.0', '@encoding': 'UTF-8' },\n Invoice: {\n '@xmlns:xsi': 'http://www.w3.org/2001/XMLSchema-instance',\n '@xmlns:cac': 'urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2',\n '@xmlns:cbc': 'urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2',\n '@xmlns': 'urn:oasis:names:specification:ubl:schema:xsd:Invoice-2',\n 'cbc:CustomizationID': invoice.customizationId,\n 'cbc:ProfileID': invoice.profileId,\n 'cbc:ID': invoice.id,\n 'cbc:IssueDate': invoice.issueDate,\n 'cbc:DueDate': invoice.dueDate,\n 'cbc:InvoiceTypeCode': invoice.invoiceTypeCode,\n 'cbc:Note': invoice.note,\n 'cbc:TaxPointDate': invoice.taxPointDate,\n 'cbc:DocumentCurrencyCode': invoice.documentCurrencyCode,\n 'cbc:TaxCurrencyCode': invoice.taxCurrencyCode,\n 'cbc:AccountingCost': invoice.accountingCost,\n 'cbc:BuyerReference': invoice.buyerReference,\n 'cac:InvoicePeriod': yield* encodeInvoicePeriod(invoice.invoicePeriod),\n 'cac:OrderReference': yield* encodeOrderReference(invoice.orderReference),\n 'cac:BillingReference': yield* encodeBillingReferences(invoice.billingReferences),\n 'cac:DespatchDocumentReference': yield* encodeSimpleIdentifier(invoice.despatchDocumentReference),\n 'cac:ReceiptDocumentReference': yield* encodeSimpleIdentifier(invoice.receiptDocumentReference),\n 'cac:OriginatorDocumentReference': yield* encodeSimpleIdentifier(invoice.originatorDocumentReference),\n 'cac:ContractDocumentReference': yield* encodeSimpleIdentifier(invoice.contractDocumentReference),\n 'cac:AdditionalDocumentReference': yield* encodeAdditionalDocumentReferences(invoice.additionalDocumentReferences),\n 'cac:ProjectReference': yield* encodeSimpleIdentifier(invoice.projectReference),\n 'cac:AccountingSupplierParty': yield* encodeParty(invoice.accountingSupplierParty),\n 'cac:AccountingCustomerParty': yield* encodeParty(invoice.accountingCustomerParty),\n 'cac:PayeeParty': yield* encodePayeeParty(invoice.payeeParty),\n 'cac:TaxRepresentativeParty': yield* encodeTaxRepresentativeParty(invoice.taxRepresentativeParty),\n 'cac:Delivery': yield* encodeDelivery(invoice.delivery),\n 'cac:PaymentMeans': yield* encodePaymentMeans(invoice.paymentMeans),\n 'cac:PaymentTerms': yield* encodePaymentTerms(invoice.paymentTerms),\n 'cac:AllowanceCharge': yield* encodeAllowanceCharges(invoice.allowanceCharges),\n 'cac:TaxTotal': yield* encodeTaxTotals(invoice.taxTotals),\n 'cac:LegalMonetaryTotal': yield* encodeLegalMonetaryTotal(invoice.legalMonetaryTotal),\n 'cac:InvoiceLine': yield* encodeInvoiceLines(invoice.invoiceLines),\n },\n };\n});\n","import { Effect } from 'effect';\n\nimport type { PeppolMessageLevelResponseDocumentResponse } from '#/schemas/peppol-message-level-response-document-response-schema.ts';\nimport type { PeppolMessageLevelResponse } from '#/schemas/peppol-message-level-response-schema.ts';\n\nimport { encodeMessageParty } from '#/decoders/fields/encode-message-party.ts';\n\nexport const encodeMessageLevelResponse = Effect.fn(function* (messageResponse: PeppolMessageLevelResponse) {\n return {\n '?xml': { '@version': '1.0', '@encoding': 'UTF-8' },\n ApplicationResponse: {\n '@xmlns:xsi': 'http://www.w3.org/2001/XMLSchema-instance',\n '@xsi:schemaLocation':\n import.meta.env['MODE'] === 'test'\n ? 'urn:oasis:names:specification:ubl:schema:xsd:ApplicationResponse-2 https://docs.oasis-open.org/ubl/os-UBL-2.4/xsd/maindoc/UBL-ApplicationResponse-2.4.xsd urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2 https://docs.oasis-open.org/ubl/os-UBL-2.4/xsd/common/UBL-CommonAggregateComponents-2.4.xsd urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2 https://docs.oasis-open.org/ubl/os-UBL-2.4/xsd/common/UBL-CommonBasicComponents-2.4.xsd'\n : undefined,\n '@xmlns:cac': 'urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2',\n '@xmlns:cbc': 'urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2',\n '@xmlns': 'urn:oasis:names:specification:ubl:schema:xsd:ApplicationResponse-2',\n 'cbc:CustomizationID': messageResponse.customizationId,\n 'cbc:ProfileID': messageResponse.profileId,\n 'cbc:ID': messageResponse.id,\n 'cbc:IssueDate': messageResponse.issueDate,\n 'cbc:IssueTime': messageResponse.issueTime,\n 'cac:SenderParty': yield* encodeMessageParty(messageResponse.senderParty),\n 'cac:ReceiverParty': yield* encodeMessageParty(messageResponse.receiverParty),\n 'cac:DocumentResponse': yield* encodeMessageLevelDocumentResponse(messageResponse.documentResponse),\n },\n };\n});\n\nconst encodeMessageLevelDocumentResponse = Effect.fn(function* (documentResponse: PeppolMessageLevelResponseDocumentResponse) {\n return {\n 'cac:Response': { 'cbc:ResponseCode': documentResponse.response.responseCode, 'cbc:Description': documentResponse.response.description },\n 'cac:DocumentReference': {\n 'cbc:ID': documentResponse.documentReference.id,\n 'cbc:DocumentTypeCode': documentResponse.documentReference.documentTypeCode,\n 'cbc:VersionID': documentResponse.documentReference.versionId,\n },\n 'cac:LineResponse': documentResponse.lineResponse.map(line => ({\n 'cac:LineReference': { 'cbc:LineID': line.lineReference.lineId },\n 'cac:Response': {\n 'cbc:ResponseCode': line.response.responseCode,\n 'cbc:Description': line.response.description,\n 'cac:Status': { 'cbc:StatusReasonCode': line.response.status.statusReasonCode },\n },\n })),\n };\n});\n","import type { SchemaAST } from 'effect';\n\nimport { Effect, Predicate, Schema, SchemaGetter, SchemaIssue } from 'effect';\nimport XMLBuilder from 'fast-xml-builder';\n\nimport type { XmlNode } from '#/helpers/get-prop.ts';\nimport type { PeppolCreditNoteLine } from '#/schemas/fields/peppol-credit-note-line-schema.ts';\nimport type { PeppolInvoiceLine } from '#/schemas/fields/peppol-invoice-line-schema.ts';\n\nimport { INVOICE_RESPONSE_PROFILE_ID } from '#/constants/invoice-response-profile-id.ts';\nimport { MESSAGE_LEVEL_RESPONSE_PROFILE_ID } from '#/constants/message-level-response-profile-id.ts';\nimport { decodeCreditNote } from '#/decoders/decode-credit-note.ts';\nimport { decodeInvoiceResponse } from '#/decoders/decode-invoice-response.ts';\nimport { decodeInvoice } from '#/decoders/decode-invoice.ts';\nimport { decodeMessageLevelResponse } from '#/decoders/decode-message-level-response.ts';\nimport { encodeCreditNote } from '#/decoders/encode-credit-note.ts';\nimport { encodeInvoiceResponse } from '#/decoders/encode-invoice-response.ts';\nimport { encodeInvoice } from '#/decoders/encode-invoice.ts';\nimport { encodeMessageLevelResponse } from '#/decoders/encode-message-level-response.ts';\nimport { strOrUnd } from '#/helpers/str-or-und.ts';\nimport { PeppolCreditNote } from '#/schemas/peppol-credit-note-schema.ts';\nimport { PeppolInvoiceResponse } from '#/schemas/peppol-invoice-response-schema.ts';\nimport { PeppolInvoice } from '#/schemas/peppol-invoice-schema.ts';\nimport { PeppolMessageLevelResponse } from '#/schemas/peppol-message-level-response-schema.ts';\nimport { builderOptions } from '#/xml/builder-options.ts';\nimport { parseXmlNodable } from '#/xml/nodable-parser.ts';\n\n/**\n * @description Object representation of a PEPPOL document, before the member schemas normalise it (dates stay strings, enums stay loose). This is the shape\n * produced by the legacy `#/decoders/*` functions and consumed by their `#/decoders/encode-*` counterparts.\n */\nconst peppolDocumentObjectSchema = Schema.Union([PeppolInvoice, PeppolCreditNote, PeppolMessageLevelResponse, PeppolInvoiceResponse], {\n mode: 'oneOf',\n});\n\ntype PeppolDocumentObject = typeof peppolDocumentObjectSchema.Encoded;\n\nconst parseXml = (value: string): XmlNode => parseXmlNodable(value);\n\nexport const isPeppolInvoice = Schema.is(PeppolInvoice);\nexport const isPeppolCreditNote = Schema.is(PeppolCreditNote);\nexport const isPeppolMessageLevelResponse = Schema.is(PeppolMessageLevelResponse);\nexport const isPeppolInvoiceResponse = Schema.is(PeppolInvoiceResponse);\n\n/**\n * @description XML string -> loose document object. Dispatches on the root element; `ApplicationResponse` is further split by its `cbc:ProfileID`.\n */\nconst decodeDocumentXml = Effect.fn('decode-peppol-document-xml')(function* (value: string, options: SchemaAST.ParseOptions) {\n const parsed = parseXml(value);\n\n if (Predicate.isNotNullish(parsed.Invoice)) {\n return yield* decodeInvoice(parsed);\n }\n if (Predicate.isNotNullish(parsed.CreditNote)) {\n return yield* decodeCreditNote(parsed);\n }\n if (Predicate.isNotNullish(parsed.ApplicationResponse)) {\n const profileId = yield* strOrUnd(parsed.ApplicationResponse, 'cbc:ProfileID');\n if (profileId === MESSAGE_LEVEL_RESPONSE_PROFILE_ID) {\n return yield* decodeMessageLevelResponse(parsed);\n }\n if (profileId === INVOICE_RESPONSE_PROFILE_ID) {\n return yield* decodeInvoiceResponse(parsed);\n }\n }\n\n const rootNodes = Object.keys(parsed);\n return yield* Effect.fail(new SchemaIssue.InvalidValue({ message: `Unsupported document type: ${rootNodes.join(',')}` }, value, options));\n});\n\n/**\n * @description Loose document object -> XML string. Mirrors {@link decodeDocumentXml} by dispatching on the decoded discriminant.\n */\nconst encodeDocumentXml = Effect.fn('encode-peppol-document-xml')(function* (value: PeppolDocumentObject, options: SchemaAST.ParseOptions) {\n let content: unknown;\n\n if (isPeppolInvoice(value) || Predicate.hasProperty(value, 'invoiceLines')) {\n content = yield* encodeInvoice(value as never);\n } else if (isPeppolCreditNote(value) || Predicate.hasProperty(value, 'creditNoteLines')) {\n content = yield* encodeCreditNote(value as never);\n } else if (isPeppolMessageLevelResponse(value) || value.profileId === MESSAGE_LEVEL_RESPONSE_PROFILE_ID) {\n content = yield* encodeMessageLevelResponse(value as never);\n } else if (isPeppolInvoiceResponse(value) || value.profileId === INVOICE_RESPONSE_PROFILE_ID) {\n content = yield* encodeInvoiceResponse(value as never);\n } else {\n const rootNodes = Object.keys(value);\n return yield* Effect.fail(\n new SchemaIssue.InvalidValue({ message: `Unsupported document type: ${value.profileId}\\n${rootNodes.join(',')}` }, value, options)\n );\n }\n\n return new XMLBuilder(builderOptions).build(content) as string;\n});\n\n/**\n * @description Union of every supported PEPPOL business document. Members discriminate cleanly: invoice vs credit note via `invoiceLines`/`creditNoteLines`,\n * message-level vs invoice response via the `profileId` literal.\n */\nexport const peppolDocumentSchema = peppolDocumentObjectSchema.pipe(\n Schema.encodeTo(Schema.String, {\n encode: SchemaGetter.transformEffect((value, options) => encodeDocumentXml(value, options)),\n decode: SchemaGetter.transformEffect((value, options) => decodeDocumentXml(value, options)),\n })\n);\n\nexport type PeppolDocumentEncoded = Schema.Codec.Encoded<typeof peppolDocumentSchema>;\nexport type PeppolDocumentDecoded = Schema.Schema.Type<typeof peppolDocumentSchema>;\n\n/**\n * @description This defines the types of documents that are sent/received through the peppol network.\n */\nexport type PeppolDocument = PeppolInvoice | PeppolCreditNote;\n/**\n * @description This defines the types of message that are sent/received through the peppol network.\n */\nexport type PeppolMessage = PeppolMessageLevelResponse | PeppolInvoiceResponse;\nexport type PeppolAllDocuments = PeppolDocument | PeppolMessage;\nexport type PeppolDocumentLine = PeppolInvoiceLine | PeppolCreditNoteLine;\n","import { Schema } from 'effect';\n\nimport { opaque } from '#/schemas/utils/opaque.ts';\n\nexport class PeppolReferenceId extends opaque<PeppolReferenceId>()(Schema.Struct({ id: Schema.String })) {}\n\nexport const peppolReferenceSchema = Schema.Union([PeppolReferenceId, Schema.Undefined]);\n\nexport type PeppolReferenceSchema = typeof peppolReferenceSchema.Type;\n","import type { PeppolQuantityUnitCode } from '#/schemas/values/quantity-unit-codes-schema.ts';\n\nexport type BaseIntlUnit =\n | 'acre'\n | 'bit'\n | 'byte'\n | 'celsius'\n | 'centimeter'\n | 'degree'\n | 'fahrenheit'\n | 'fluid-ounce'\n | 'foot'\n | 'gallon'\n | 'gigabit'\n | 'gigabyte'\n | 'gram'\n | 'hectare'\n | 'inch'\n | 'kilobit'\n | 'kilobyte'\n | 'kilogram'\n | 'kilometer'\n | 'liter'\n | 'megabit'\n | 'megabyte'\n | 'meter'\n | 'mile'\n | 'mile-scandinavian'\n | 'milliliter'\n | 'millimeter'\n | 'ounce'\n | 'percent'\n | 'petabyte'\n | 'pound'\n | 'stone'\n | 'terabit'\n | 'terabyte'\n | 'yard';\nexport type TimeIntlUnit = 'nanosecond' | 'microsecond' | 'millisecond' | 'second' | 'minute' | 'hour' | 'day' | 'week' | 'month' | 'year';\n\nexport type IntlUnit = BaseIntlUnit | TimeIntlUnit | `${BaseIntlUnit}-per-${TimeIntlUnit}`;\n\nexport const quantityToIntlUnitMap = {\n CMT: 'centimeter',\n MTR: 'meter',\n MMT: 'millimeter',\n KMT: 'kilometer',\n INH: 'inch',\n FOT: 'foot',\n YRD: 'yard',\n SMI: 'mile',\n F49: 'mile-scandinavian',\n ACR: 'acre',\n H18: 'hectare',\n LTR: 'liter',\n MLT: 'milliliter',\n GLI: 'gallon',\n GLL: 'gallon',\n OZA: 'fluid-ounce',\n GRM: 'gram',\n KGM: 'kilogram',\n LBR: 'pound',\n ONZ: 'ounce',\n STI: 'stone',\n STN: 'stone',\n SEC: 'second',\n MIN: 'minute',\n HUR: 'hour',\n DAY: 'day',\n WEE: 'week',\n MON: 'month',\n ANN: 'year',\n B98: 'microsecond',\n C26: 'millisecond',\n C47: 'nanosecond',\n CEL: 'celsius',\n FAH: 'fahrenheit',\n A99: 'bit',\n AD: 'byte',\n '2P': 'kilobyte',\n '4L': 'megabyte',\n E34: 'gigabyte',\n E35: 'terabyte',\n E36: 'petabyte',\n B68: 'gigabit',\n B80: 'gigabit',\n C21: 'kilobit',\n B10: 'bit',\n DD: 'degree',\n P1: 'percent',\n KMH: 'kilometer-per-hour',\n MTS: 'meter-per-second',\n HM: 'mile-per-hour',\n KNT: 'kilometer-per-hour',\n '2X': 'meter-per-minute',\n '40': 'milliliter-per-second',\n '41': 'milliliter-per-minute',\n '4G': 'milliliter',\n '4H': 'micrometer' as IntlUnit,\n A44: 'liter',\n A45: 'meter',\n A11: 'meter',\n A12: 'kilometer',\n B57: 'kilometer',\n '4U': 'pound-per-hour',\n '4M': 'gram-per-hour' as IntlUnit,\n} satisfies Partial<Record<string, IntlUnit>>;\n\nexport function quantityUnitCodeToIntlUnit(code: PeppolQuantityUnitCode | (string & {})): IntlUnit | undefined {\n return (quantityToIntlUnitMap as Record<string, IntlUnit>)[code];\n}\n","import { quantityToIntlUnitMap } from '#/schemas/utils/quantity-unit-code-to-intl-unit.ts';\nimport { quantityUnitCodes } from '#/values/quantity-unit-codes.generated';\n\nexport function formatQuantityWithUnit(\n value: number,\n code: string,\n locale: string = 'en-US',\n unitDisplay: 'short' | 'narrow' | 'long' = 'short'\n): string {\n const intlUnit = quantityToIntlUnitMap[code as keyof typeof quantityToIntlUnitMap];\n\n if (intlUnit) {\n try {\n return new Intl.NumberFormat(locale, { style: 'unit', unit: intlUnit, unitDisplay }).format(value);\n } catch {}\n }\n\n const formattedNumber = new Intl.NumberFormat(locale).format(value);\n const unitName = (quantityUnitCodes as Record<string, string>)[code];\n return `${formattedNumber} ${unitName}`;\n}\n","import type { PeppolCreditNoteTypeCode } from '#/schemas/values/credit-note-type-code-schema.ts';\n\nimport { creditNoteTypeCodes } from '#/values/credit-notes-type-codes.generated';\n\nexport function getCreditNoteTypeCodeDescription(code: PeppolCreditNoteTypeCode): string {\n return (creditNoteTypeCodes as Record<string, string>)[code] as string;\n}\n","import type { PeppolInvoiceTypeCode } from '#/schemas/values/invoice-type-code-schema.ts';\n\nimport { invoiceTypeCodes } from '#/values/invoice-type-codes.generated';\n\nexport function getInvoiceTypeCodeDescription(code: PeppolInvoiceTypeCode): string {\n return (invoiceTypeCodes as Record<string, string>)[code] as string;\n}\n","import type { PeppolCreditNoteTypeCode } from '#/schemas/values/credit-note-type-code-schema.ts';\n\nimport { creditNoteTypeCodes } from '#/values/credit-notes-type-codes.generated';\n\nexport function isValidCreditNoteTypeCode(code: string): code is PeppolCreditNoteTypeCode {\n return code in creditNoteTypeCodes;\n}\n","import type { PeppolInvoiceTypeCode } from '#/schemas/values/invoice-type-code-schema.ts';\n\nimport { invoiceTypeCodes } from '#/values/invoice-type-codes.generated';\n\nexport function isValidInvoiceTypeCode(code: string): code is PeppolInvoiceTypeCode {\n return code in invoiceTypeCodes;\n}\n","import type { PeppolProcesses } from '#/schemas/values/peppol-process-schema.ts';\n\nimport { processesList } from '#/values/processes.generated';\n\nexport function isValidProcess(code: string): code is PeppolProcesses {\n return processesList.includes(code);\n}\n","import { Schema } from 'effect';\n\nimport { isValidMod97_0208 } from '#/peppol-validations/is-valid-mod97-0208.ts';\n\n/**\n * @description Belgian VAT number (`BE` + 10 digits with mod 97-0208 check digits). Effect port of the `BE` member of `vatRegexSchema`: prefix, exact length,\n * pattern, and mod 97 check-digit validation share the original `'Invalid belgian vat number'` message.\n */\nconst belgianVat = Schema.String.check(\n Schema.isStartsWith('BE'),\n Schema.isLengthBetween(12, 12),\n Schema.isPattern(/^BE[01]\\d{9}$/),\n Schema.makeFilter((value: string) => isValidMod97_0208(value.substring(2)).success)\n).annotate({ message: 'Invalid belgian vat number' });\n\n/**\n * @description EU VAT identification number (one member per member-state prefix/pattern). Effect port of `vatRegexSchema` (`z.union([...])` of\n * `z.string().check(...)` members): each member keeps its original prefix + pattern checks as `Schema.String.check` filters.\n */\nexport const peppolVatRegexSchema = Schema.Union([\n belgianVat,\n Schema.String.check(Schema.isStartsWith('AT'), Schema.isPattern(/^ATU\\d{8}$/)),\n Schema.String.check(Schema.isStartsWith('BG'), Schema.isPattern(/^BG\\d{9,10}$/)),\n Schema.String.check(Schema.isStartsWith('CY'), Schema.isPattern(/^CY\\d{8}L$/)),\n Schema.String.check(Schema.isStartsWith('CZ'), Schema.isPattern(/^CZ\\d{8,10}$/)),\n Schema.String.check(Schema.isStartsWith('DE'), Schema.isPattern(/^DE\\d{9}$/)),\n Schema.String.check(Schema.isStartsWith('DK'), Schema.isPattern(/^DK\\d{8}$/)),\n Schema.String.check(Schema.isStartsWith('EE'), Schema.isPattern(/^EE\\d{9}$/)),\n Schema.String.check(Schema.isStartsWith('EL'), Schema.isPattern(/^EL\\d{9}$/)),\n Schema.String.check(Schema.isStartsWith('GR'), Schema.isPattern(/^GR\\d{9}$/)),\n Schema.String.check(Schema.isStartsWith('ES'), Schema.isPattern(/^ES[0-9A-Z]\\d{7}[0-9A-Z]$/)),\n Schema.String.check(Schema.isStartsWith('FI'), Schema.isPattern(/^FI\\d{8}$/)),\n Schema.String.check(Schema.isStartsWith('FR'), Schema.isPattern(/^FR[0-9A-Z]{2}\\d{9}$/)),\n Schema.String.check(Schema.isStartsWith('GB'), Schema.isPattern(/^GB(\\d{9}(\\d{3})?|[A-Z]{2}\\d{3})$/)),\n Schema.String.check(Schema.isStartsWith('HU'), Schema.isPattern(/^HU\\d{8}$/)),\n Schema.String.check(Schema.isStartsWith('IE'), Schema.isPattern(/^IE\\dS\\d{5}L$/)),\n Schema.String.check(Schema.isStartsWith('IT'), Schema.isPattern(/^IT\\d{11}$/)),\n Schema.String.check(Schema.isStartsWith('LT'), Schema.isPattern(/^LT(\\d{9}|\\d{12})$/)),\n Schema.String.check(Schema.isStartsWith('LU'), Schema.isPattern(/^LU\\d{8}$/)),\n Schema.String.check(Schema.isStartsWith('LV'), Schema.isPattern(/^LV\\d{11}$/)),\n Schema.String.check(Schema.isStartsWith('MT'), Schema.isPattern(/^MT\\d{8}$/)),\n Schema.String.check(Schema.isStartsWith('NL'), Schema.isPattern(/^NL\\d{9}B\\d{2}$/)),\n Schema.String.check(Schema.isStartsWith('PL'), Schema.isPattern(/^PL\\d{10}$/)),\n Schema.String.check(Schema.isStartsWith('PT'), Schema.isPattern(/^PT\\d{9}$/)),\n Schema.String.check(Schema.isStartsWith('RO'), Schema.isPattern(/^RO\\d{2,10}$/)),\n Schema.String.check(Schema.isStartsWith('SE'), Schema.isPattern(/^SE\\d{12}$/)),\n Schema.String.check(Schema.isStartsWith('SI'), Schema.isPattern(/^SI\\d{8}$/)),\n Schema.String.check(Schema.isStartsWith('SK'), Schema.isPattern(/^SK\\d{10}$/)),\n]);\n","import { Predicate, Schema } from 'effect';\n\nimport type { DocumentTypesTableKeys } from '#/values/document-type.generated';\n\nimport { documentTypesTable, documentTypesTableKeys } from '#/values/document-type.generated';\n\n/**\n * @description One of the PEPPOL document type schemes (e.g. `busdox-docid-qns`, `peppol-doctype-wildcard`).\n *\n * @see {@link documentTypesTable}\n */\nexport type PeppolDocumentType = typeof peppolDocumentTypeSchema.Type;\n\n/**\n * @description Validates a full PEPPOL document type identifier (`<scheme>::<value>`) against the known document type table. The scheme prefix must be a known key\n * and the full identifier must exist in the document type table (checked via a filter).\n *\n * @param error - The custom error message to use when validation fails. Defaults to `'invalid peppol document type'`.\n *\n * @returns An Effect schema that matches a valid `scheme::value` document type identifier.\n *\n * @see {@link documentTypesTable}\n */\nexport const peppolDocumentTypeSchema = Schema.TemplateLiteral([Schema.Literals(documentTypesTableKeys), Schema.Literal('::'), Schema.String]).check(\n Schema.makeFilter((val: string) => {\n const [prefix, ...suffix] = val.split('::');\n if (Predicate.isNullish(prefix) || !documentTypesTableKeys.includes(prefix as never)) return false;\n const info = documentTypesTable[prefix as DocumentTypesTableKeys];\n return Predicate.isNotNullish(info) && info.some(v => v === suffix.join('::'));\n })\n);\n","import { Schema } from 'effect';\n\nimport { documentTypesScheme } from '#/values/document-type.generated';\n\n/**\n * @description Validates a PEPPOL document type scheme (e.g. `busdox-docid-qns`, `peppol-doctype-wildcard`).\n *\n * @param error - The error message to use when validation fails. Defaults to `'invalid Peppol document type scheme'`.\n *\n * @returns An Effect schema that accepts only valid document type schemes.\n *\n * @see {@link documentTypesScheme}\n */\nexport const documentTypeSchemesSchema = Schema.Literals(documentTypesScheme as [string, ...Array<string>]);\n","import { Record, Schema } from 'effect';\n\nimport { documentTypesTable } from '#/values/document-type.generated';\n\nconst values = Record.values(documentTypesTable).flat();\n\n/**\n * @description Validates the value part of a PEPPOL document type identifier (the portion after the scheme prefix) against the known document type table.\n *\n * @param error - The error message to use when validation fails. Defaults to `'invalid Peppol document type value'`.\n *\n * @returns An Effect schema that accepts only valid document type values.\n *\n * @see {@link documentTypesTable}\n */\nexport const documentTypeValuesSchema = Schema.String.check(Schema.makeFilter((val: string) => values.includes(val as never)));\n","import { Schema } from 'effect';\n\nimport { invoiceStatusCodesKeys } from '#/values/invoice-status-codes.generated';\n\n/**\n * @description An invoice status code as defined by the PEPPOL subset of UNCL 4343 (T111).\n *\n * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/UNCL4343-T111/\n */\nexport type PeppolInvoiceStatusCodes = typeof invoiceStatusCodeSchema.Type;\n\n/**\n * @description Validates an invoice status code against the PEPPOL subset of UNCL 4343 (T111).\n *\n * @param error - The custom error message to use when validation fails.\n *\n * @returns An Effect schema that accepts only valid invoice status codes.\n *\n * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/UNCL4343-T111/\n */\nexport const invoiceStatusCodeSchema = Schema.Literals(invoiceStatusCodesKeys).pipe(Schema.brand('PeppolInvoiceStatusCodes'));\n","import { Schema } from 'effect';\n\nimport { participantIdentifierSchemesKeys } from '#/values/participant-identifier-schemes.generated';\n\n/**\n * @description A PEPPOL participant identifier scheme, identifying the scheme of a participant identifier (e.g. EAS codes).\n *\n * @see https://docs.peppol.eu/poacc/billing/3.0/\n */\nexport type PeppolParticipantIdentifierCode = typeof participantIdentifierCodeSchema.Type;\n\n/**\n * @description Validates a PEPPOL participant identifier scheme against the participant identifier schemes list.\n *\n * @param error - The custom error message to use when validation fails.\n *\n * @returns An Effect schema that accepts only valid participant identifier schemes.\n */\nexport const participantIdentifierCodeSchema = Schema.Literals(participantIdentifierSchemesKeys).pipe(\n Schema.brand('PeppolParticipantIdentifierCode')\n);\n","import { Schema } from 'effect';\n\nimport type { ProcessesKeys } from '#/values/processes.generated';\n\nimport { processes, processesKeys } from '#/values/processes.generated';\n\n/**\n * @description A PEPPOL business process identifier key as defined by the processes codelist.\n *\n * @see {@link processes}\n */\nexport type PeppolProcesses = typeof peppolProcessSchema.Encoded;\n\n/**\n * @description Validates a full PEPPOL business process identifier (`<scheme>::<value>`) against the known processes.\n *\n * @param error - The custom error message to use when validation fails. Defaults to `'invalid peppol process identifier'`.\n *\n * @returns An Effect schema that matches a valid `scheme::value` process identifier.\n *\n * @see {@link processes}\n */\nexport const peppolProcessSchema = Schema.TemplateLiteral([Schema.Literals(processesKeys), Schema.Literal('::'), Schema.String]).check(\n Schema.makeFilter((val: string) => {\n const [prefix, suffix] = val.split('::');\n if (prefix === undefined || suffix === undefined) return false;\n const info = processes[prefix as ProcessesKeys];\n return info !== undefined && info.some(v => v === suffix);\n })\n);\n","import { Schema } from 'effect';\n\nimport type { PeppolDocumentType } from '#/schemas/values/peppol-document-type-schema.ts';\n\nimport { peppolProcessSchema } from '#/schemas/values/peppol-process-schema.ts';\nimport { documentTypesProcessIds } from '#/values/document-type.generated';\n\n/**\n * @description Validates a business process identifier (`<scheme>::<value>`) against the processes allowed for a given document type.\n *\n * @param documentType - The PEPPOL document type scheme whose allowed processes should be used.\n * @param error - The custom error message to use when validation fails. Defaults to `'invalid process type for document type'`.\n *\n * @returns An Effect schema that matches only processes allowed for the given document type.\n *\n * @see {@link peppolProcessSchema}\n * @see {@link documentTypesProcessIds}\n */\nexport function processFromDocumentTypeSchema(documentType: PeppolDocumentType, error = 'invalid process type for document type') {\n const allowed = documentTypesProcessIds[documentType as keyof typeof documentTypesProcessIds];\n if (allowed === undefined) {\n return peppolProcessSchema;\n }\n const values = allowed.map(p => `${p.scheme}::${p.value}`);\n return Schema.String.check(Schema.makeFilter((val: string) => values.includes(val as never))).annotate({ message: error });\n}\n","import { Schema } from 'effect';\n\nimport { vatexCodesKeys } from '#/values/vatex-codes.generated';\n\n/**\n * @description A VAT exemption reason code as defined by the CEF VATEX codelist.\n *\n * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/vatex/\n */\nexport type PeppolVatexCode = typeof vatexCodeSchema.Type;\n\n/**\n * @description Validates a VAT exemption reason code against the CEF VATEX codelist.\n *\n * @param error - The custom error message to use when validation fails.\n *\n * @returns An Effect schema that accepts only valid VAT exemption reason codes.\n *\n * @validations\n * - BR-CL-22: VAT exemption reason code MUST be a valid CEF VATEX code.\n *\n * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/vatex/\n */\nexport const vatexCodeSchema = Schema.Literals(vatexCodesKeys).pipe(Schema.brand('PeppolVatexCode'));\n"],"mappings":";;;;;;;;;;AAAA,MAAa,2BAA2B;;;ACAxC,MAAa,qBAAqB;;;ACsBlC,MAAM,YAAY;;;;;AAMlB,MAAa,qBAAqB,OAAO,OAAO,MAAM,OAAO,YAAY,QAAgB,UAAU,KA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Entity","decodePartyLegalEntity","decodePartyName","decodeTaxCategory","decodePartyLegalEntity","decodeDocumentReference","decodeDocumentResponse","encodePartyLegalEntity","encodePartyName","encodePartyLegalEntity","encodePartyLegalEntity"],"sources":["../src/schemas/fields/default-customization-id.ts","../src/schemas/fields/default-profile-id.ts","../src/schemas/utils/peppol-base-64-schema.ts","../src/schemas/values/mime-codes-schema.ts","../src/schemas/fields/peppol-binary-object-schema.ts","../src/schemas/fields/peppol-identifier-schema.ts","../src/schemas/values/additional-document-reference-code-schema.ts","../src/schemas/fields/peppol-additional-document-reference-schema.ts","../src/schemas/values/currency-code-schema.ts","../src/schemas/fields/peppol-amount-schema.ts","../src/schemas/fields/peppol-line-price-allowance-charge-schema.ts","../src/schemas/values/allowance-charge-reason-code-schema.ts","../src/schemas/values/charge-reason-code-schema.ts","../src/schemas/fields/peppol-line-allowance-charge-schema.ts","../src/schemas/values/duty-tax-fee-category-schema.ts","../src/schemas/fields/peppol-tax-category-schema.ts","../src/schemas/fields/peppol-allowance-charge-schema.ts","../src/schemas/fields/peppol-billing-reference-schema.ts","../src/schemas/values/icd-codes-schema.ts","../src/schemas/values/peppol-country-code-schema.ts","../src/schemas/fields/peppol-address-schema.ts","../src/schemas/fields/peppol-delivery-schema.ts","../src/schemas/fields/peppol-invoice-line-period-schema.ts","../src/schemas/values/vat-date-code-schema.ts","../src/schemas/fields/peppol-invoice-period-schema.ts","../src/schemas/fields/peppol-legal-monetary-total-schema.ts","../src/schemas/fields/peppol-order-reference-schema.ts","../src/schemas/fields/peppol-contact-schema.ts","../src/schemas/fields/peppol-party-legal-entity-schema.ts","../src/schemas/fields/peppol-party-tax-scheme-schema.ts","../src/schemas/values/electronic-codes-schema.ts","../src/schemas/fields/peppol-party-base-schema.ts","../src/schemas/fields/peppol-payee-party-schema.ts","../src/schemas/values/payment-means-code-schema.ts","../src/schemas/fields/peppol-payment-means-schema.ts","../src/schemas/fields/peppol-payment-terms-schema.ts","../src/schemas/fields/peppol-tax-representative-schema.ts","../src/schemas/fields/peppol-tax-subtotal-category-schema.ts","../src/schemas/fields/peppol-tax-subtotal-schema.ts","../src/schemas/fields/peppol-tax-totals-base-schema.ts","../src/schemas/peppol-billing-base-schema.ts","../src/schemas/values/item-classification-codes-schema.ts","../src/schemas/fields/peppol-item-classification-schema.ts","../src/schemas/fields/peppol-line-item-schema.ts","../src/schemas/values/quantity-unit-codes-schema.ts","../src/schemas/fields/peppol-quantity-schema.ts","../src/schemas/fields/peppol-line-price-schema.ts","../src/schemas/fields/peppol-base-line-schema.ts","../src/schemas/fields/peppol-invoice-line-schema.ts","../src/schemas/values/invoice-type-code-schema.ts","../src/schemas/peppol-invoice-schema.ts","../src/schemas/fields/peppol-credit-note-line-schema.ts","../src/schemas/values/credit-note-type-code-schema.ts","../src/schemas/peppol-credit-note-schema.ts","../src/schemas/peppol-message-level-response-party-schema.ts","../src/schemas/values/peppol-document-type-code-schema.ts","../src/schemas/peppol-document-response-document-reference-schema.ts","../src/schemas/values/application-response-type-code-schema.ts","../src/schemas/peppol-document-response-document-schema.ts","../src/schemas/peppol-document-response-line-response-content-schema.ts","../src/schemas/peppol-document-response-line-response-schema.ts","../src/schemas/peppol-message-level-response-document-response-schema.ts","../src/schemas/utils/format-xsd-time.ts","../src/schemas/utils/peppol-xsd-time-schema.ts","../src/schemas/peppol-message-level-response-schema.ts","../src/schemas/values/op-status-action-schema.ts","../src/schemas/values/op-status-reason-schema.ts","../src/schemas/peppol-invoice-response-status-reason-code-schema.ts","../src/schemas/peppol-invoice-response-document-actual-response-status-schema.ts","../src/schemas/peppol-invoice-response-document-actual-response-schema.ts","../src/schemas/peppol-invoice-response-schema.ts","../src/helpers/get-prop.ts","../src/helpers/str-or-und.ts","../src/decoders/fields/decode-identifier.ts","../src/helpers/get-array.ts","../src/decoders/fields/decode-additional-document-references.ts","../src/decoders/fields/decode-amount.ts","../src/helpers/bool.ts","../src/helpers/num-or-und.ts","../src/decoders/fields/decode-base-allowance-charge.ts","../src/decoders/fields/decode-node-list.ts","../src/decoders/fields/decode-simple-identifier.ts","../src/decoders/fields/decode-tax-category.ts","../src/decoders/fields/decode-allowance-charges.ts","../src/decoders/fields/decode-billing-references.ts","../src/decoders/fields/decode-address.ts","../src/decoders/fields/decode-delivery.ts","../src/decoders/fields/decode-invoice-period.ts","../src/decoders/fields/decode-legal-monetary-total.ts","../src/decoders/fields/decode-order-reference.ts","../src/decoders/fields/decode-contact.ts","../src/decoders/fields/decode-electronic-address.ts","../src/decoders/fields/decode-party-tax-scheme.ts","../src/decoders/fields/decode-parties-tax-scheme.ts","../src/decoders/fields/decode-party-legal-entity.ts","../src/decoders/fields/decode-party.ts","../src/decoders/fields/decode-payee-party.ts","../src/decoders/fields/decode-payment-means.ts","../src/decoders/fields/decode-payment-terms.ts","../src/decoders/fields/decode-tax-representative-party.ts","../src/decoders/fields/decode-tax-totals.ts","../src/decoders/decode-billing.ts","../src/decoders/fields/decode-invoice-line-period.ts","../src/decoders/fields/decode-line-allowance-charges.ts","../src/decoders/fields/decode-price-allowance-charge.ts","../src/decoders/fields/decode-quantity.ts","../src/decoders/fields/decode-line-price.ts","../src/decoders/fields/decode-line-shared.ts","../src/decoders/fields/decode-credit-note-lines.ts","../src/decoders/decode-credit-note.ts","../src/decoders/fields/decode-application-response.ts","../src/decoders/fields/decode-invoice-message-document-party.ts","../src/decoders/fields/decode-invoice-message-party.ts","../src/decoders/decode-invoice-response.ts","../src/decoders/fields/decode-invoice-lines.ts","../src/decoders/decode-invoice.ts","../src/decoders/fields/decode-message-level-party.ts","../src/decoders/decode-message-level-response.ts","../src/decoders/fields/encode-identifier.ts","../src/decoders/fields/encode-additional-document-references.ts","../src/decoders/fields/encode-amount.ts","../src/decoders/fields/encode-simple-identifier.ts","../src/decoders/fields/encode-tax-category.ts","../src/decoders/fields/encode-allowance-charges.ts","../src/decoders/fields/encode-billing-references.ts","../src/decoders/fields/encode-invoice-line-period.ts","../src/decoders/fields/encode-line-allowance-charges.ts","../src/decoders/fields/encode-price-allowance-charges.ts","../src/decoders/fields/encode-quantity.ts","../src/decoders/fields/encode-line-price.ts","../src/decoders/fields/encode-line-shared.ts","../src/decoders/fields/encode-credit-note-lines.ts","../src/decoders/fields/encode-address.ts","../src/decoders/fields/encode-delivery.ts","../src/decoders/fields/encode-invoice-period.ts","../src/decoders/fields/encode-legal-monetary-total.ts","../src/decoders/fields/encode-order-reference.ts","../src/decoders/fields/encode-contact.ts","../src/decoders/fields/encode-party-tax-scheme.ts","../src/decoders/fields/encode-parties-tax-scheme.ts","../src/decoders/fields/encode-party-legal-entity.ts","../src/decoders/fields/encode-party.ts","../src/decoders/fields/encode-payee-party.ts","../src/decoders/fields/encode-payment-means.ts","../src/decoders/fields/encode-payment-terms.ts","../src/decoders/fields/encode-tax-representative-party.ts","../src/decoders/fields/encode-tax-totals.ts","../src/decoders/encode-credit-note.ts","../src/decoders/fields/encode-message-party.ts","../src/decoders/encode-invoice-response.ts","../src/decoders/fields/encode-invoice-lines.ts","../src/decoders/encode-invoice.ts","../src/decoders/encode-message-level-response.ts","../src/schemas/peppol-document-schema.ts","../src/schemas/fields/peppol-reference-schema.ts","../src/schemas/utils/quantity-unit-code-to-intl-unit.ts","../src/schemas/utils/format-quantity-with-unit.ts","../src/schemas/utils/get-credit-note-type-code-description.ts","../src/schemas/utils/get-invoice-type-code-description.ts","../src/schemas/utils/is-valid-credit-note-type-code.ts","../src/schemas/utils/is-valid-invoice-type-code.ts","../src/schemas/utils/is-valid-process.ts","../src/schemas/utils/peppol-vat-regex-schema.ts","../src/schemas/values/peppol-document-type-schema.ts","../src/schemas/values/document-type-schemes-schema.ts","../src/schemas/values/document-type-values-schema.ts","../src/schemas/values/invoice-status-code-schema.ts","../src/schemas/values/participant-identifier-code-schema.ts","../src/schemas/values/peppol-process-schema.ts","../src/schemas/values/process-from-document-type-schema.ts","../src/schemas/values/vatex-code-schema.ts"],"sourcesContent":["/**\n * @description The default PEPPOL BIS Billing 3.0 customization identifier, which identifies the EN 16931 compliant billing rule set. Used as the decoding default\n * for the `customizationId` field of {@link PeppolBillingBase}.\n *\n * @example\n * ```ts\n * DEFAULT_CUSTOMIZATION_ID; // 'urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0'\n * ```;\n */\nexport const DEFAULT_CUSTOMIZATION_ID = 'urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0' as const;\n","/**\n * @description The default PEPPOL BIS Billing 3.0 profile identifier, which identifies the billing process the document follows. Used as the decoding default for\n * the `profileId` field of {@link PeppolBillingBase}.\n *\n * @example\n * ```ts\n * DEFAULT_PROFILE_ID; // 'urn:fdc:peppol.eu:2017:poacc:billing:01:1.0'\n * ```;\n */\nexport const DEFAULT_PROFILE_ID = 'urn:fdc:peppol.eu:2017:poacc:billing:01:1.0' as const;\n","import { Schema } from 'effect';\n\nimport { opaque } from '#/schemas/utils/opaque.ts';\n\n// RFC 4648 §4 — Base 64 Encoding\n//\n// Alphabet: A-Z a-z 0-9 + / (pad: =)\n// Encoding quanta: 4 characters represent 3 bytes.\n// Padding rules (only at the very end):\n// • 0 pad chars → last quantum is xxxx (input length % 3 === 0)\n// • 1 pad char → last quantum is xxx= (input length % 3 === 2)\n// • 2 pad chars → last quantum is xx== (input length % 3 === 1)\n//\n// §3.1: CRLF / LF line endings are treated as non-alphabet characters\n// and stripped before validation (as in PEM / MIME / XML).\n// §3.3: Implementations MUST reject data with non-alphabet characters\n// (other than the allowed line endings stripped above).\n//\n// The regex below encodes all three quantum variants in a single pass:\n// ([A-Za-z0-9+/]{4})* — zero or more full quanta (no padding)\n// followed by one of:\n// [A-Za-z0-9+/]{2}== — 2-pad quantum (1 remaining input byte)\n// [A-Za-z0-9+/]{3}= — 1-pad quantum (2 remaining input bytes)\n// (empty) — no trailing partial quantum\nconst BASE64_RE = /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/;\n\n/**\n * @description RFC 4648 base64 string (PEM / MIME / XML line endings tolerated). Effect port of `base64Schema` (`z.string().check(z.refine(...))`): strips CRLF /\n * LF line endings before testing the quantum regex.\n *\n * @example\n * ```ts\n * const value = 'SGVsbG8=';\n * ```;\n */\nexport class PeppolBase64 extends opaque<PeppolBase64>()(\n Schema.String.check(Schema.makeFilter((val: string) => BASE64_RE.test(val.replace(/\\r?\\n/g, '')))).annotate({ message: 'Invalid base64' })\n) {}\n\n/**\n * @description Alias of {@link PeppolBase64} for callers that prefer the shorter name.\n */\nexport type Base64 = PeppolBase64;\n","import { Schema } from 'effect';\n\nimport { opaque } from '#/schemas/utils/opaque.ts';\nimport { mimeCodesKeys } from '#/values/mime-codes.generated';\n\n/**\n * @description A MIME media type from the PEPPOL MIME code list.\n *\n * @example\n * ```ts\n * 'text/csv';\n * ```;\n *\n * @validations\n * - PEPPOL-EN16931-CL001: Attachment (MIME) type MUST come from the allowed list.\n *\n * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/MimeCode/\n * @see {@link mimeCodesKeys}\n */\nexport class PeppolMimeCode extends opaque<PeppolMimeCode>()(\n Schema.Literals(mimeCodesKeys)\n .pipe(Schema.brand('PeppolMimeCode'))\n .annotate({ documentation: 'PEPPOL-EN16931-CL001: Mime code must be according to subset of IANA code list.' })\n) {}\n","import { Schema } from 'effect';\n\nimport { opaque } from '#/schemas/utils/opaque.ts';\nimport { PeppolBase64 } from '#/schemas/utils/peppol-base-64-schema.ts';\nimport { PeppolMimeCode } from '#/schemas/values/mime-codes-schema.ts';\n\n// RFC 4648 §5 — Base64url Encoding: URL/file-safe alphabet (A-Z a-z 0-9 - _), optional `=` padding.\n// Effect port of `z.base64url()`: keeps the value as a plain string and only validates the shape.\nconst base64UrlSchema = Schema.String.check(Schema.isPattern(/^[A-Za-z0-9\\-_]+={0,2}$/)).annotate({ message: 'Invalid base64url' });\n\n/**\n * @description An attached document embedded in the Invoice as a Base64 encoded binary object, together with its MIME type and file name. Wraps the\n * `cbc:EmbeddedDocumentBinaryObject` element.\n *\n * @example\n * ```ts\n * { content: 'aHR0cHM6Ly90ZXN0LXZlZmEuZGlmaS5uby9wZXBwb2xiaXM=', mimeCode: 'text/csv', filename: 'Hours - spent.csv' }\n * ```;\n *\n * @summary Binary object for attachments\n *\n * @name cbc:EmbeddedDocumentBinaryObject (+ @mimeCode, @filename)\n */\nexport class PeppolBinaryObject extends opaque<PeppolBinaryObject>()(\n Schema.Struct({\n /**\n * @description An attached document embedded as binary object (Base64) or sent together with the invoice.\n *\n * @example\n * aHR0cHM6Ly90ZXN0LXZlZmEuZGlmaS5uby9wZXBwb2xiaXMvcG9hY2MvYmlsbGluZy8zLjAvYmlzLw==\n *\n * @summary Attached document\n *\n * @name `#text` (Base64 content)\n */\n content: Schema.Union([PeppolBase64, base64UrlSchema]),\n /**\n * @description The mime code of the attached document.\n *\n * @example\n * text / csv;\n *\n * @summary Attached document Mime code\n *\n * @name `@mimeCode`\n */\n mimeCode: PeppolMimeCode,\n /**\n * @description The file name of the attached document.\n *\n * @example\n * Hours - spent.csv;\n *\n * @summary Attached document Filename\n *\n * @name `@filename`\n */\n filename: Schema.String,\n })\n) {}\n","import { Schema } from 'effect';\n\nimport { opaque } from '#/schemas/utils/opaque.ts';\n\n/**\n * @description A generic identifier paired with an optional identification scheme identifier. Wraps a `cbc:ID` element and its optional `@schemeID` attribute, and\n * is reused across document references.\n *\n * @example\n * ```ts\n * { id: '99887766', schemeId: '0088' }\n * ```;\n *\n * @summary Identifier with optional scheme\n *\n * @name `cbc:ID (+ optional @schemeID)`\n */\nexport class PeppolIdentifier extends opaque<PeppolIdentifier>()(\n Schema.Struct({\n /**\n * @name cbc:ID\n */\n id: Schema.String,\n /**\n * @name `@schemeID`\n */\n schemeId: Schema.optional(Schema.String),\n })\n) {}\n","import { Schema } from 'effect';\n\nimport { opaque } from '#/schemas/utils/opaque.ts';\nimport { additionalDocumentReferenceCodesKeys } from '#/values/additional-document-reference-codes.generated';\n\n/**\n * @description An additional document reference code from the PEPPOL subset of UNCL 1153 (invoiced object identifier scheme).\n *\n * @example\n * ```ts\n * 'AAA';\n * ```;\n *\n * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/UNCL1153/\n * @see {@link additionalDocumentReferenceCodesKeys}\n */\nexport class PeppolAdditionalDocumentReferenceCode extends opaque<PeppolAdditionalDocumentReferenceCode>()(\n Schema.Literals(additionalDocumentReferenceCodesKeys).pipe(Schema.brand('PeppolAdditionalDocumentReferenceCode'))\n) {}\n","import { Schema } from 'effect';\n\nimport { PeppolBinaryObject } from '#/schemas/fields/peppol-binary-object-schema.ts';\nimport { PeppolIdentifier } from '#/schemas/fields/peppol-identifier-schema.ts';\nimport { opaque } from '#/schemas/utils/opaque.ts';\nimport { PeppolAdditionalDocumentReferenceCode } from '#/schemas/values/additional-document-reference-code-schema.ts';\n\n/**\n * @description A reference to a supporting document that is stored outside the Invoice, identified by a URI. Wraps the `cac:ExternalReference` element of an\n * attachment group.\n *\n * @example\n * ```ts\n * { uri: 'http://www.example.com/index.html' }\n * ```;\n *\n * @see {@link PeppolAttachment}\n */\nexport class PeppolAttachmentExternalReference extends opaque<PeppolAttachmentExternalReference>()(\n Schema.Struct({\n /**\n * @description The URL (Uniform Resource Locator) that identifies where the external document is located. A means of locating the resource, including its\n * primary access mechanism, e.g. http:// or ftp://.\n *\n * @example\n * `http://www.example.com/index.html`;\n *\n * @summary External document location\n *\n * @name `cbc:URI`\n */\n uri: Schema.String,\n })\n) {}\n\n/**\n * @description The attachment of a supporting document to the Invoice, either embedded as a Base64 binary object or referenced by URI. Wraps the `cac:Attachment`\n * element of an additional supporting document.\n *\n * @example\n * ```ts\n * {\n * embeddedDocumentBinaryObject: {\n * content: 'aHR0cHM6Ly90ZXN0LXZlZmEuZGlmaS5uby9wZXBwb2xiaXM=',\n * mimeCode: 'text/csv',\n * filename: 'Hours - spent.csv'\n * }\n * }\n * ```;\n *\n * @see {@link PeppolAdditionalDocumentReference}\n */\nexport class PeppolAttachment extends opaque<PeppolAttachment>()(\n Schema.Struct({\n /**\n * @description An attached document embedded as binary object (Base64) or sent together with the invoice.\n *\n * @example\n * ```base64\n * aHR0cHM6Ly90ZXN0LXZlZmEuZGlmaS5uby9wZXBwb2xiaXMvcG9hY2MvYmlsbGluZy8zLjAvYmlzLw==\n * ```;\n *\n * @summary Attached document\n *\n * @name `cbc:EmbeddedDocumentBinaryObject`\n */\n embeddedDocumentBinaryObject: Schema.optional(PeppolBinaryObject),\n /**\n * @summary EXTERNAL REFERENCE\n *\n * @name `cac:ExternalReference`\n */\n externalReference: Schema.optional(PeppolAttachmentExternalReference),\n })\n) {}\n\n/**\n * @description The identifier of an additional supporting document, an invoiced object reference or a project reference, together with an optional identification\n * scheme identifier.\n *\n * @example\n * ```ts\n * { id: '9873242' }\n * ```;\n *\n * @see {@link PeppolAdditionalDocumentReference}\n */\nexport class PeppolId extends opaque<PeppolId>()(\n Schema.Struct({\n /**\n * @description An identifier for an object on which the invoice is based (with DocumentTypeCode=130), given by the Seller, the identifier for the supporting\n * document or the project reference identifier (DocumentTypeCode=50).\n *\n * @summary Invoiced object identifier, Supporting document reference or project reference\n *\n * @name `#text`\n */\n id: Schema.String,\n /**\n * @description The identification scheme identifier of the Invoiced object identifier.\n *\n * @summary Scheme identifier\n *\n * @name `@schemeID`\n */\n schemeId: Schema.optional(PeppolAdditionalDocumentReferenceCode),\n })\n) {}\n\n/**\n * @description A group of business terms providing information about additional supporting documents substantiating the claims made in the Invoice. The additional\n * supporting documents can be used for both referencing a document number which is expected to be known by the receiver, an external document\n * (referenced by a URL) or as an embedded document, Base64 encoded (such as a time report).\n *\n * @summary ADDITIONAL SUPPORTING DOCUMENTS\n *\n * @name `cac:AdditionalDocumentReference`\n */\nexport class PeppolAdditionalDocumentReference extends opaque<PeppolAdditionalDocumentReference>()(\n PeppolIdentifier.pipe(\n Schema.fieldsAssign({\n /**\n * @description An identifier for an object on which the invoice is based (with DocumentTypeCode=130), given by the Seller, the identifier for the supporting\n * document or the project reference identifier (DocumentTypeCode=50).\n *\n * @summary Invoiced object identifier, Supporting document reference or project reference\n *\n * @name `cbc:ID`\n */\n id: PeppolId,\n /**\n * @remarks\n * Code \"130\" MUST be used to indicate an invoice object reference and code \"50\" for project reference. Element is not used for other\n * additional documents.\n *\n * @default 130\n *\n * @summary Document type code\n *\n * @name `cbc:DocumentTypeCode`\n */\n documentTypeCode: Schema.optional(Schema.String),\n /**\n * @description A description of the supporting document, such as timesheet, usage report, etc.\n *\n * @example\n * Time list\n *\n * @summary Supporting document description\n *\n * @name `cbc:DocumentDescription`\n */\n documentDescription: Schema.optional(Schema.String),\n /**\n * @summary Attachment\n *\n * @name `cac:Attachment`\n */\n attachment: Schema.optional(PeppolAttachment),\n })\n )\n) {}\n","/**\n * @description Currency codes as defined by ISO 4217.\n *\n * @see https://www.iso.org/iso-4217-currency-codes.html\n * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/ISO4217/\n */\n\nimport { Schema } from 'effect';\n\nimport { opaque } from '#/schemas/utils/opaque.ts';\nimport { currencyCodesKeys } from '#/values/currency-code.generated';\n\n/**\n * @description An ISO 4217 currency code from the PEPPOL codelist.\n *\n * @example\n * ```ts\n * 'AED';\n * ```;\n *\n * @validations\n * - PEPPOL-EN16931-CL007: Currency codes MUST be valid ISO 4217 codes.\n *\n * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/ISO4217/\n * @see {@link currencyCodesKeys}\n */\nexport class PeppolCurrencyCode extends opaque<PeppolCurrencyCode>()(Schema.Literals(currencyCodesKeys).pipe(Schema.brand('PeppolCurrencyCode'))) {}\n\n/**\n * @description An ISO 4217 currency code as defined by the PEPPOL subset.\n *\n * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/ISO4217/\n */\nexport type PeppolCurrencyCodeEncoded = Schema.Codec.Encoded<typeof PeppolCurrencyCode>;\n","import { Schema } from 'effect';\n\nimport { opaque } from '#/schemas/utils/opaque.ts';\nimport { PeppolCurrencyCode } from '#/schemas/values/currency-code-schema.ts';\n\n/**\n * @description A monetary amount paired with the currency it is expressed in. Wraps a `cbc:*` amount element whose `@currencyID` attribute names the currency and\n * whose text is the value.\n *\n * @example\n * ```ts\n * { currencyId: 'EUR', value: 4500.0 }\n * ```;\n *\n * @summary Monetary amount with mandatory currency\n *\n * @name cbc:* (+ @currencyID)\n */\nexport class PeppolAmount extends opaque<PeppolAmount>()(\n Schema.Struct({\n /**\n * @name \\@currencyID\n */\n currencyId: PeppolCurrencyCode,\n /**\n * @name #text (value)\n */\n value: Schema.Finite,\n })\n) {}\n/**\n * @description Encoded form of {@link PeppolAmount} produced by the Effect Schema codec. Fields mirror the decoded shape.\n *\n * @see {@link PeppolAmount}\n */\nexport interface PeppolAmountEncoded extends Schema.Codec.Encoded<typeof PeppolAmount> {}\n","import { Schema } from 'effect';\n\nimport { PeppolAmount } from '#/schemas/fields/peppol-amount-schema.ts';\nimport { opaque } from '#/schemas/utils/opaque.ts';\n\n/**\n * @description A price level allowance or charge applied to the item price, expressed as an amount and a charge indicator.\n *\n * @example\n * ```ts\n * { amount: { value: 200, currencyId: 'EUR' }, chargeIndicator: false }\n * ```;\n *\n * @see {@link PeppolLinePriceAllowanceCharge}\n */\nclass PriceAllowanceCharge extends opaque<PriceAllowanceCharge>()(\n Schema.Struct({\n /**\n * @example\n * 200;\n *\n * @name cbc:Amount (+ @currencyID)\n */\n amount: PeppolAmount,\n /**\n * @example\n * 1000;\n *\n * @name cbc:BaseAmount (+ @currencyID)\n */\n baseAmount: Schema.optional(PeppolAmount),\n /**\n * @name cbc:ChargeIndicator\n *\n * @value false\n */\n chargeIndicator: Schema.Boolean,\n })\n) {}\n\n/**\n * @description A price level allowance on the item price. Only allowances are allowed at price level, so the charge indicator is fixed to false.\n *\n * @example\n * ```ts\n * { amount: { value: 200, currencyId: 'EUR' }, chargeIndicator: false }\n * ```;\n *\n * @see {@link PeppolLinePrice}\n */\nexport class PeppolLinePriceAllowanceCharge extends opaque<PeppolLinePriceAllowanceCharge>()(\n PriceAllowanceCharge.pipe(\n Schema.fieldsAssign({\n chargeIndicator: Schema.Literal(false).annotate({\n message: \"PEPPOL-EN16931-R044: Charge on price level is NOT allowed. Only value 'false' allowed.\",\n }),\n })\n )\n) {}\n\nexport { PriceAllowanceCharge };\n","import { Schema } from 'effect';\n\nimport { opaque } from '#/schemas/utils/opaque.ts';\nimport { allowanceChargeReasonCodesKeys } from '#/values/allowance-charge-reason-codes.generated';\n\n/**\n * @description An allowance or charge reason code from the PEPPOL subset of UNCL 5189 (D.16B).\n *\n * @example\n * ```ts\n * '41';\n * ```;\n *\n * @validations\n * - PEPPOL-EN16931-CL002: Document allowance reason code MUST be according to the subset of UNCL 5189 D.16B.\n *\n * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/UNCL5189/\n * @see {@link allowanceChargeReasonCodesKeys}\n */\nexport class PeppolAllowanceChargeReasonCode extends opaque<PeppolAllowanceChargeReasonCode>()(\n Schema.Literals(allowanceChargeReasonCodesKeys)\n .pipe(Schema.brand('PeppolAllowanceChargeReasonCode'))\n .annotate({ documentation: 'PEPPOL-EN16931-CL002: Reason code MUST be according to subset of UNCL 5189 D.16B.' })\n) {}\n","import { Schema } from 'effect';\n\nimport { opaque } from '#/schemas/utils/opaque.ts';\nimport { chargeReasonCodesKeys } from '#/values/charge-reason-codes.generated';\n\n/**\n * @description A charge reason code from the PEPPOL subset of UNCL 7161 (D.16B).\n *\n * @example\n * ```ts\n * 'AA';\n * ```;\n *\n * @validations\n * - PEPPOL-EN16931-CL003: Charge reason code MUST be according to UNCL 7161 D.16B.\n *\n * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/UNCL7161/\n * @see {@link chargeReasonCodesKeys}\n */\nexport class PeppolChargeReasonCode extends opaque<PeppolChargeReasonCode>()(\n Schema.Literals(chargeReasonCodesKeys)\n .pipe(Schema.brand('PeppolChargeReasonCode'))\n .annotate({ documentation: 'PEPPOL-EN16931-CL003: Reason code MUST be according to UNCL 7161 D.16B.' })\n) {}\n","import { Schema } from 'effect';\n\nimport { PriceAllowanceCharge } from '#/schemas/fields/peppol-line-price-allowance-charge-schema.ts';\nimport { opaque } from '#/schemas/utils/opaque.ts';\nimport { PeppolAllowanceChargeReasonCode } from '#/schemas/values/allowance-charge-reason-code-schema.ts';\nimport { PeppolChargeReasonCode } from '#/schemas/values/charge-reason-code-schema.ts';\n\n/**\n * @description Shared fields for an allowance or charge applied to an Invoice line. Extends the price level allowance and charge fields with the reason text and\n * the multiplier factor used to calculate the amount.\n *\n * @example\n * ```ts\n * { amount: { value: 200, currencyId: 'EUR' }, chargeIndicator: false, allowanceChargeReason: 'Discount' }\n * ```;\n *\n * @see {@link PeppolLineAllowanceCharge}\n */\nexport class BaseLineAllowanceCharge extends opaque<BaseLineAllowanceCharge>()(\n Schema.Struct({\n ...PriceAllowanceCharge.fields /**\n * @example\n * Discount;\n *\n * @name cbc:AllowanceChargeReason\n */,\n allowanceChargeReason: Schema.optional(Schema.String),\n /**\n * @example\n * 20;\n *\n * @name cbc:MultiplierFactorNumeric\n */\n multiplierFactorNumeric: Schema.optional(Schema.Finite),\n })\n) {}\n\n/**\n * @description An allowance applied to an Invoice line, marked by a `cbc:ChargeIndicator` of `false`. Adds an allowance reason code to the shared line allowance\n * and charge fields.\n *\n * @example\n * ```ts\n * { amount: { value: 200, currencyId: 'EUR' }, chargeIndicator: false, allowanceChargeReasonCode: '95' }\n * ```;\n *\n * @see {@link PeppolLineAllowanceCharge}\n */\nexport class PeppolLineAllowance extends opaque<PeppolLineAllowance>()(\n Schema.Struct({\n ...BaseLineAllowanceCharge.fields,\n /**\n * @name cbc:AllowanceChargeReasonCode\n */\n allowanceChargeReasonCode: Schema.optional(PeppolAllowanceChargeReasonCode),\n /**\n * @name cbc:ChargeIndicator\n *\n * @value `false`\n */\n chargeIndicator: Schema.Literal(false).annotate({\n message: \"PEPPOL-EN16931-R043: Allowance/charge ChargeIndicator value MUST equal 'true' or 'false'\",\n }),\n })\n) {}\n\n/**\n * @description A charge applied to an Invoice line, marked by a `cbc:ChargeIndicator` of `true`. Adds a charge reason code to the shared line allowance and charge\n * fields.\n *\n * @example\n * ```ts\n * { amount: { value: 25, currencyId: 'EUR' }, chargeIndicator: true, allowanceChargeReasonCode: 'AA' }\n * ```;\n *\n * @see {@link PeppolLineAllowanceCharge}\n */\nexport class PeppolLineCharge extends opaque<PeppolLineCharge>()(\n Schema.Struct({\n ...BaseLineAllowanceCharge.fields,\n /**\n * @name cbc:AllowanceChargeReasonCode\n */\n allowanceChargeReasonCode: Schema.optional(PeppolChargeReasonCode),\n /**\n * @name cbc:ChargeIndicator\n *\n * @value `true`\n */\n chargeIndicator: Schema.Literal(true).annotate({\n message: \"PEPPOL-EN16931-R043: Allowance/charge ChargeIndicator value MUST equal 'true' or 'false'\",\n }),\n })\n) {}\n\n/**\n * @description An allowance or charge applied to an Invoice line, selected by the `cbc:ChargeIndicator` value: `false` selects an allowance, `true` selects a\n * charge.\n *\n * @example\n * ```ts\n * { amount: { value: 25, currencyId: 'EUR' }, chargeIndicator: true, allowanceChargeReasonCode: 'AA', allowanceChargeReason: 'Advertising' }\n * ```;\n *\n * @see {@link PeppolLineAllowance}\n */\nexport class PeppolLineAllowanceCharge extends opaque<PeppolLineAllowanceCharge>()(\n Schema.Union([PeppolLineAllowance, PeppolLineCharge]).annotate({ message: 'unable to decode line allowance charge' })\n) {}\n\n/**\n * @description Encoded form of {@link PeppolLineAllowanceCharge} produced by the Effect Schema codec.\n *\n * @see {@link PeppolLineAllowanceCharge}\n */\nexport type PeppolLineAllowanceChargeEncoded = Schema.Codec.Encoded<typeof PeppolLineAllowanceCharge>;\n","import { Schema } from 'effect';\n\nimport { opaque } from '#/schemas/utils/opaque.ts';\nimport { dutyTaxFeeCategoriesKeys } from '#/values/duty-tax-fee-categories.generated';\n\n/**\n * @description A duty, tax or fee category code from the PEPPOL subset of UNCL 5305 (VAT category code).\n *\n * @example\n * ```ts\n * 'AE';\n * ```;\n *\n * @validations\n * - BR-CL-17 / BR-CL-18: VAT category code MUST be a valid UNCL 5305 code.\n *\n * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/UNCL5305/\n * @see {@link dutyTaxFeeCategoriesKeys}\n */\nexport class PeppolDutyTaxFeeCategoryCode extends opaque<PeppolDutyTaxFeeCategoryCode>()(\n Schema.Literals(dutyTaxFeeCategoriesKeys).pipe(Schema.brand('PeppolDutyTaxFeeCategoryCode'))\n) {}\n\n/**\n * @description The encoded form of {@link PeppolDutyTaxFeeCategoryCode}, a string literal union.\n */\nexport type PeppolDutyTaxFeeCategoryCodeEncoded = Schema.Codec.Encoded<typeof PeppolDutyTaxFeeCategoryCode>;\n","import { Effect, Schema } from 'effect';\n\nimport { opaque } from '#/schemas/utils/opaque.ts';\nimport { PeppolDutyTaxFeeCategoryCode } from '#/schemas/values/duty-tax-fee-category-schema.ts';\n\n/**\n * @description The tax scheme identifier for a tax category, defaulting to `VAT` when the element is absent.\n *\n * @example\n * ```ts\n * { id: 'VAT' }\n * ```;\n *\n * @see {@link PeppolTaxCategory}\n */\nexport class PeppolTaxSchemeId extends opaque<PeppolTaxSchemeId>()(\n Schema.Struct({\n /**\n * @name `cbc:ID`\n */\n id: Schema.String.pipe(Schema.withDecodingDefaultType(Effect.succeed('VAT'))),\n })\n) {}\n\n/**\n * @description A group of business terms providing information about the VAT applicable for the goods and services invoiced on the Invoice line.\n *\n * @summary LINE VAT INFORMATION\n *\n * @name `cac:TaxCategory`\n */\nexport class PeppolTaxCategory extends opaque<PeppolTaxCategory>()(\n Schema.Struct({\n /**\n * @description The VAT category code for the invoiced item.\n *\n * @summary Invoiced item VAT category code\n *\n * @name `cbc:ID`\n */\n id: PeppolDutyTaxFeeCategoryCode,\n /**\n * @description The VAT rate, represented as percentage that applies to the invoiced item.\n *\n * @summary Invoiced item VAT rate\n *\n * @name `cbc:Percent`\n */\n percent: Schema.optional(Schema.Finite),\n /**\n * @default VAT\n *\n * @name `cac:TaxScheme`\n */\n taxSchemeId: PeppolTaxSchemeId,\n })\n) {}\n","import { Effect, Schema } from 'effect';\n\nimport { BaseLineAllowanceCharge } from '#/schemas/fields/peppol-line-allowance-charge-schema.ts';\nimport { PeppolTaxCategory } from '#/schemas/fields/peppol-tax-category-schema.ts';\nimport { opaque } from '#/schemas/utils/opaque.ts';\nimport { PeppolAllowanceChargeReasonCode } from '#/schemas/values/allowance-charge-reason-code-schema.ts';\nimport { PeppolChargeReasonCode } from '#/schemas/values/charge-reason-code-schema.ts';\nimport { PeppolDutyTaxFeeCategoryCode } from '#/schemas/values/duty-tax-fee-category-schema.ts';\n\n/**\n * @description The identifier of the tax scheme that applies to a document level allowance or charge. Defaults to `VAT` when the value is absent.\n *\n * @example\n * ```ts\n * { id: 'VAT' }\n * ```;\n *\n * @see {@link PeppolTaxCategory}\n */\nexport class PeppolTaxCategoryTaxSchemeId extends opaque<PeppolTaxCategoryTaxSchemeId>()(\n Schema.Struct({\n /**\n * @description Mandatory element. Use \"VAT\"\n *\n * @name `cbc:ID`\n */\n id: Schema.String.pipe(Schema.withDecodingDefaultType(Effect.succeed('VAT'))),\n })\n) {}\n\n/**\n * @description Shared fields for a document level allowance or charge. Combines the common line allowance and charge fields with the tax category that applies to\n * the document level amount.\n *\n * @example\n * ```ts\n * {\n * amount: { value: 25, currencyId: 'EUR' },\n * chargeIndicator: true,\n * allowanceChargeReason: 'Insurance',\n * taxCategory: { id: 'S', percent: 25, taxSchemeId: { id: 'VAT' } }\n * }\n * ```;\n *\n * @see {@link PeppolAllowanceCharge}\n */\nexport class BaseAllowanceCharge extends opaque<BaseAllowanceCharge>()(\n Schema.Struct({\n ...BaseLineAllowanceCharge.fields,\n /**\n * @summary TAX CATEGORY\n *\n * @name cac:TaxCategory\n */\n taxCategory: Schema.optional(\n PeppolTaxCategory.pipe(\n Schema.fieldsAssign({\n /**\n * @description A coded identification of what VAT category applies to the document level allowance or charge.\n *\n * @summary Document level allowance or charge VAT category code\n *\n * @name `cbc:ID`\n */\n id: PeppolDutyTaxFeeCategoryCode,\n /**\n * @description The VAT rate, represented as percentage that applies to the document level allowance or charge.\n *\n * @summary Document level allowance or charge VAT rate\n *\n * @name `cbc:Percent`\n */\n percent: Schema.optional(Schema.Finite),\n /**\n * @default VAT\n *\n * @name `cac:TaxScheme`\n */\n taxSchemeId: PeppolTaxCategoryTaxSchemeId,\n })\n )\n ),\n })\n) {}\n\n/**\n * @description A document level allowance, marked by a `cbc:ChargeIndicator` of `false`. Adds an allowance reason code to the shared document level allowance and\n * charge fields.\n *\n * @example\n * ```ts\n * { amount: { value: 200, currencyId: 'EUR' }, chargeIndicator: false, allowanceChargeReasonCode: '95' }\n * ```;\n *\n * @see {@link PeppolAllowanceCharge}\n */\nexport class PeppolAllowance extends opaque<PeppolAllowance>()(\n Schema.Struct({\n ...BaseAllowanceCharge.fields,\n /**\n * @name cbc:AllowanceChargeReasonCode\n */\n allowanceChargeReasonCode: Schema.optional(PeppolAllowanceChargeReasonCode),\n /**\n * @name cbc:ChargeIndicator\n *\n * @value `false`\n */\n chargeIndicator: Schema.Literal(false).annotate({\n message: \"PEPPOL-EN16931-R043: Allowance/charge ChargeIndicator value MUST equal 'true' or 'false'\",\n }),\n })\n) {}\n\n/**\n * @description A document level charge, marked by a `cbc:ChargeIndicator` of `true`. Adds a charge reason code to the shared document level allowance and charge\n * fields.\n *\n * @example\n * ```ts\n * { amount: { value: 25, currencyId: 'EUR' }, chargeIndicator: true, allowanceChargeReasonCode: 'AA' }\n * ```;\n *\n * @see {@link PeppolAllowanceCharge}\n */\nexport class PeppolCharge extends opaque<PeppolCharge>()(\n Schema.Struct({\n ...BaseAllowanceCharge.fields,\n /**\n * @name cbc:AllowanceChargeReasonCode\n */\n allowanceChargeReasonCode: Schema.optional(PeppolChargeReasonCode),\n /**\n * @name cbc:ChargeIndicator\n *\n * @value `true`\n */\n chargeIndicator: Schema.Literal(true).annotate({\n message: \"PEPPOL-EN16931-R043: Allowance/charge ChargeIndicator value MUST equal 'true' or 'false'\",\n }),\n })\n) {}\n\n/**\n * @description A document level allowance or charge, selected by the `cbc:ChargeIndicator` value: `false` selects an allowance, `true` selects a charge.\n *\n * @summary Allowance/Charge\n *\n * @name cac:AllowanceCharge\n */\nexport class PeppolAllowanceCharge extends opaque<PeppolAllowanceCharge>()(\n Schema.Union([PeppolAllowance, PeppolCharge]).annotate({ message: 'unable to decode allowance charge' })\n) {}\n\n/**\n * @description Encoded form of {@link PeppolAllowanceCharge} produced by the Effect Schema codec.\n *\n * @see {@link PeppolAllowanceCharge}\n */\nexport type PeppolAllowanceChargeEncoded = Schema.Codec.Encoded<typeof PeppolAllowanceCharge>;\n","import { Schema } from 'effect';\n\nimport { PeppolIsoDateString } from '#/schemas/peppol-iso-date-string.ts';\nimport { opaque } from '#/schemas/utils/opaque.ts';\n\n/**\n * @description A reference to an Invoice that was previously sent by the Seller, carrying the preceding invoice number and, when the number is not unique, its\n * issue date. Wraps the `cac:InvoiceDocumentReference` element.\n *\n * @example\n * ```ts\n * { id: 'inv123', issueDate: '2017-09-15' }\n * ```;\n *\n * @see {@link PeppolBillingReference}\n */\nexport class PeppolInvoiceDocumentReference extends opaque<PeppolInvoiceDocumentReference>()(\n Schema.Struct({\n /**\n * @description The identification of an Invoice that was previously sent by the seller.\n *\n * @example\n * `inv123`;\n *\n * @summary Preceding invoice number\n *\n * @name `cbc:ID`\n */\n id: Schema.String,\n /**\n * @description The date when the preceding invoice was issued. Shall be provided in case the preceding invoice identifier is not unique.\n *\n * @example\n * `2017-09-15`;\n *\n * @summary Preceding invoice issue date\n *\n * @format `YYYY-MM-DD`\n *\n * @name `cbc:IssueDate`\n */\n issueDate: Schema.optional(PeppolIsoDateString),\n })\n) {}\n\n/**\n * @description A reference to a preceding Invoice, used when the Invoice corrects or replaces an earlier one. Wraps the `cac:BillingReference` element.\n *\n * @summary PRECEDING INVOICE REFERENCE (0..n)\n *\n * @name cac:BillingReference\n */\nexport class PeppolBillingReference extends opaque<PeppolBillingReference>()(\n Schema.Struct({\n /**\n * @example\n * inv123;\n *\n * @summary INVOICE DOCUMENT REFERENCE\n *\n * @name `cac:InvoiceDocumentReference`\n */\n invoiceDocumentReference: PeppolInvoiceDocumentReference,\n })\n) {}\n","import { Schema } from 'effect';\n\nimport { opaque } from '#/schemas/utils/opaque.ts';\nimport { icdCodesKeys } from '#/values/icd-codes.generated';\n\n/**\n * @description An ISO 6523 ICD code from the PEPPOL codelist.\n *\n * @example\n * ```ts\n * '0002';\n * ```;\n *\n * @validations\n * - BR-CL-10 / BR-CL-11 / BR-CL-21: Identifier scheme MUST be a valid ISO 6523 ICD code.\n *\n * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/ICD/\n * @see {@link icdCodesKeys}\n */\nexport class PeppolIcdCode extends opaque<PeppolIcdCode>()(Schema.Literals(icdCodesKeys).pipe(Schema.brand('PeppolIcdCode'))) {}\n","/**\n * @description ISO 3166-1 alpha-2 country codes with additional entries These codes identify countries and territories worldwide.\n *\n * @module effect/values/country-code\n *\n * @see https://www.iso.org/iso-3166-country-codes.html\n * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/ISO3166/\n */\n\nimport { Schema } from 'effect';\n\nimport { opaque } from '#/schemas/utils/opaque.ts';\nimport { countryCodesKeys } from '#/values/country-code.generated';\n\n/**\n * @description A two character ISO 3166-1 alpha-2 country code from the PEPPOL codelist. The literal union enforces the length.\n *\n * @example\n * ```ts\n * 'AD';\n * ```;\n *\n * @validations\n * - BR-CL-14 / BR-CL-15: Country code MUST be a valid ISO 3166-1 alpha-2 code.\n *\n * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/ISO3166/\n * @see {@link countryCodesKeys}\n */\nexport class PeppolCountryCodeValue extends opaque<PeppolCountryCodeValue>()(\n Schema.Literals(countryCodesKeys).pipe(Schema.brand('PeppolCountryCodeValue'))\n) {}\n","import { Schema } from 'effect';\n\nimport { opaque } from '#/schemas/utils/opaque.ts';\nimport { PeppolCountryCodeValue } from '#/schemas/values/peppol-country-code-schema.ts';\n\n/**\n * @description An additional address line that supplements the main address line. Wraps the `cac:AddressLine` element, whose `cbc:Line` value carries the text.\n *\n * @example\n * ```ts\n * { line: 'Building 23' }\n * ```;\n *\n * @see {@link PeppolAddress}\n */\nexport class PeppolAddressLine extends opaque<PeppolAddressLine>()(\n Schema.Struct({\n /**\n * @description An additional address line in an address that can be used to give further details supplementing the main line.\n *\n * @summary Address line 3\n *\n * @name `cbc:Line`\n */\n line: Schema.String,\n })\n) {}\n\n/**\n * @description The country of an address, expressed as a two-letter ISO 3166-1 alpha-2 code. Wraps the `cac:Country` element and its `cbc:IdentificationCode`.\n *\n * @example\n * ```ts\n * { identificationCode: 'GB' }\n * ```;\n *\n * @see {@link PeppolAddress}\n */\nexport class PeppolCountryCode extends opaque<PeppolCountryCode>()(\n Schema.Struct({\n /**\n * @description A code that identifies the country.\n *\n * @example\n * GB;\n *\n * @summary Country code\n *\n * @name `cbc:IdentificationCode`\n */\n identificationCode: PeppolCountryCodeValue,\n })\n) {}\n\n/**\n * @description The postal address of a party, used for the seller, buyer, payee and delivery locations. Carries the street lines, city, postal zone, country\n * subdivision, country code and optional additional address lines.\n *\n * @summary Postal address\n *\n * @name `cac:PostalAddress`\n */\nexport class PeppolAddress extends opaque<PeppolAddress>()(\n Schema.Struct({\n /**\n * @description The main address line in an address.\n *\n * @example\n * Main Street 1\n *\n * @summary Address line 1\n *\n * @name `cbc:StreetName`\n */\n streetName: Schema.optional(Schema.String),\n /**\n * @description An additional address line in an address that can be used to give further details supplementing the main line.\n *\n * @example\n * Po Box 351\n *\n * @summary Address line 2\n *\n * @name `cbc:AdditionalStreetName`\n */\n additionalStreetName: Schema.optional(Schema.String),\n /**\n * @description The common name of the city, town or village, where the address is located.\n *\n * @example\n * London;\n *\n * @summary Seller city\n *\n * @name `cbc:CityName`\n */\n cityName: Schema.optional(Schema.String),\n /**\n * @description The identifier for an addressable group of properties according to the relevant postal service.\n *\n * @example\n * W1G 8LZ\n *\n * @summary post code\n *\n * @name `cbc:PostalZone`\n */\n postalZone: Schema.optional(Schema.String),\n /**\n * @description The subdivision of a country.\n *\n * @example\n * Region A\n *\n * @summary Seller country subdivision\n *\n * @name `cbc:CountrySubentity`\n */\n countrySubentity: Schema.optional(Schema.String),\n /**\n * @example\n * GB;\n *\n * @name `cac:Country`\n */\n countryCode: PeppolCountryCode,\n /**\n * @example\n * Building 23\n *\n * @name `cac:AddressLine`\n */\n addressLine: Schema.optional(PeppolAddressLine),\n })\n) {}\n","import { Schema } from 'effect';\n\nimport { PeppolIsoDateString } from '#/schemas/peppol-iso-date-string.ts';\nimport { opaque } from '#/schemas/utils/opaque.ts';\nimport { PeppolIcdCode } from '#/schemas/values/icd-codes-schema.ts';\n\nimport { PeppolAddress } from './peppol-address-schema.ts';\nimport { PeppolIdentifier } from './peppol-identifier-schema.ts';\n\n/**\n * @description The name of the party to which the goods and services are delivered. Wraps the `cac:PartyName` element of the delivery party.\n *\n * @example\n * ```ts\n * { name: 'Delivery party Name' }\n * ```;\n *\n * @see {@link PeppolDeliveryParty}\n */\nexport class PeppolDeliveryPartyPartyName extends opaque<PeppolDeliveryPartyPartyName>()(\n Schema.Struct({\n /**\n * @description The name of the party to which the goods and services are delivered.\n *\n * @summary Deliver to party name\n *\n * @name `cbc:Name`\n */\n name: Schema.String,\n })\n) {}\n\n/**\n * @description The party to which the goods and services are delivered, when it differs from the Buyer. Wraps the `cac:DeliveryParty` element.\n *\n * @example\n * ```ts\n * { partyName: { name: 'Delivery party Name' } }\n * ```;\n *\n * @see {@link PeppolDelivery}\n */\nexport class PeppolDeliveryParty extends opaque<PeppolDeliveryParty>()(\n Schema.Struct({\n /**\n * @summary PARTY NAME\n *\n * @name `cac:PartyName`\n */\n partyName: PeppolDeliveryPartyPartyName,\n })\n) {}\n\n/**\n * @description The location at which the goods and services are delivered, identified by an identifier and an optional address. Wraps the `cac:DeliveryLocation`\n * element.\n *\n * @example\n * ```ts\n * { id: { id: '9483759475923478', schemeId: '0088' }, address: { cityName: 'Stockholm', countryCode: { identificationCode: 'SE' } } }\n * ```;\n *\n * @see {@link PeppolDelivery}\n */\nexport class PeppolDeliveryLocation extends opaque<PeppolDeliveryLocation>()(\n Schema.Struct({\n /**\n * @description An identifier for the location at which the goods and services are delivered.\n *\n * @example\n * `83745498753497`;\n *\n * @summary Deliver to location identifier\n *\n * @name `cbc:ID`\n */\n id: Schema.optional(\n PeppolIdentifier.pipe(\n Schema.fieldsAssign({\n /**\n * @description An identifier for the location at which the goods and services are delivered.\n *\n * @example\n * `83745498753497`;\n *\n * @summary Deliver to location identifier\n *\n * @name `#text`\n */\n id: Schema.String,\n /**\n * @description The identification scheme identifier of the Deliver to location identifier.\n *\n * @summary Deliver to location identifier identification scheme identifier\n *\n * @name `@schemeID`\n */\n schemeId: Schema.optional(PeppolIcdCode),\n })\n )\n ),\n /**\n * @description A groupd of business terms providing infomation about the address to which goods and services invoiced were or are delivered.\n *\n * @summary Deliver to address\n *\n * @name `cac:Address`\n */\n address: Schema.optional(PeppolAddress),\n })\n) {}\n\n/**\n * @description Information about the delivery of the goods and services, such as the actual delivery date, the delivery location and the delivery party. Wraps the\n * `cac:Delivery` element.\n *\n * @example\n * ```ts\n * { actualDeliveryDate: '2017-11-01', deliveryLocation: { id: { id: '9483759475923478' } } }\n * ```;\n *\n * @see {@link PeppolDeliveryLocation}\n */\nexport class PeppolDelivery extends opaque<PeppolDelivery>()(\n Schema.Struct({\n /**\n * @description Th edate on which the supply of goods or services was made or completed.\n *\n * @example\n * 2017 - 12 - 01;\n *\n * @summary Actual delivery date\n *\n * @format `YYYY-MM-DD`\n *\n * @name cbc:ActualDeliveryDate\n */\n actualDeliveryDate: Schema.optional(PeppolIsoDateString),\n /**\n * @name `cac:DeliveryLocation`\n */\n deliveryLocation: Schema.optional(PeppolDeliveryLocation),\n\n /**\n * @summary Delivery party\n *\n * @name `cac:DeliveryParty`\n */\n deliveryParty: Schema.optional(PeppolDeliveryParty),\n })\n) {}\n","import { Schema } from 'effect';\n\nimport { PeppolIsoDateString } from '#/schemas/peppol-iso-date-string.ts';\nimport { opaque } from '#/schemas/utils/opaque.ts';\n\n/**\n * @description The period relevant for an Invoice line, given by an optional start date and end date. Wraps the `cac:InvoicePeriod` element as used on a line; the\n * document level period extends this shape in {@link PeppolInvoicePeriod}.\n *\n * @example\n * ```ts\n * { startDate: '2017-10-01', endDate: '2017-10-31' }\n * ```;\n *\n * @see {@link PeppolInvoicePeriod}\n */\nexport class PeppolInvoiceLinePeriod extends opaque<PeppolInvoiceLinePeriod>()(\n Schema.Struct({\n /**\n * @description The date when the Invoice period for this Invoice line ends. Format =\"YYYY-MM-DD\"\n *\n * @example\n * `2017-10-31`;\n *\n * @summary Invoice line period end date\n *\n * @format \"YYYY-MM-DD\"\n *\n * @name `cbc:EndDate`\n */\n endDate: Schema.optional(PeppolIsoDateString),\n /**\n * @description The date when the Invoice period for this Invoice line starts.\n *\n * @example\n * `2017-10-01`;\n *\n * @summary Invoice line period start date\n *\n * @format \"YYYY-MM-DD\"\n *\n * @name `cbc:StartDate`\n */\n startDate: Schema.optional(PeppolIsoDateString),\n })\n) {}\n","import { Schema } from 'effect';\n\nimport { opaque } from '#/schemas/utils/opaque.ts';\nimport { vatDateCodesKeys } from '#/values/vat-dates.generated';\n\n/**\n * @description A VAT date code from the PEPPOL subset of UNCL 2005 (invoice period description code).\n *\n * @example\n * ```ts\n * '3';\n * ```;\n *\n * @validations\n * - PEPPOL-EN16931-CL006: Invoice period description code must be according to UNCL 2005 D.16B.\n *\n * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/UNCL2005/\n * @see {@link vatDateCodesKeys}\n */\nexport class PeppolVatDateCode extends opaque<PeppolVatDateCode>()(Schema.Literals(vatDateCodesKeys)) {}\n","import { Schema } from 'effect';\n\nimport { PeppolInvoiceLinePeriod } from '#/schemas/fields/peppol-invoice-line-period-schema.ts';\nimport { opaque } from '#/schemas/utils/opaque.ts';\nimport { PeppolVatDateCode } from '#/schemas/values/vat-date-code-schema.ts';\n\n/**\n * @description A group of business terms providing information on the invoice period. Also called delivery period. If the group is used, the invoiceing period\n * start date and/or end date must be used.\n *\n * @summary DELIVERY OR INVOICE PERIOD\n *\n * @name `cac:InvoicePeriod`\n */\nexport class PeppolInvoicePeriod extends opaque<PeppolInvoicePeriod>()(\n PeppolInvoiceLinePeriod.pipe(\n Schema.fieldsAssign({\n /**\n * @description The code of the date when the VAT becomes acccountable for the Seller and the Buyer.\n *\n * @example\n * `35`;\n *\n * @summary Value added tax point date code\n *\n * @name `cbc:DescriptionCode`\n */\n descriptionCode: Schema.optional(PeppolVatDateCode),\n })\n )\n) {}\n","import { Schema } from 'effect';\n\nimport { PeppolAmount } from '#/schemas/fields/peppol-amount-schema.ts';\nimport { opaque } from '#/schemas/utils/opaque.ts';\n\n/**\n * @description A group of business terms providing the monetary totals for the Invoice.\n *\n * @summary Document totals\n *\n * @name cac:LegalMonetaryTotal\n */\nexport class PeppolLegalMonetaryTotal extends opaque<PeppolLegalMonetaryTotal>()(\n Schema.Struct({\n /**\n * @description Sum of all allowances on document level in the Invoice.\n *\n * @remarks\n * Must be rounded to maxium 2 decimals.\n *\n * @example\n * 200.0;\n *\n * @summary Sum of allowances on document level\n *\n * @name `cbc:AllowanceTotalAmount (+ @currencyID)`\n */\n allowanceTotalAmount: Schema.optional(PeppolAmount),\n /**\n * @description Sum of all charges on document level in the Invoice.\n *\n * @remarks\n * Must be rounded to maximum 2 decimals.\n *\n * @example\n * 0.0;\n *\n * @summary Sum of charges on document level\n *\n * @name `cbc:ChargeTotalAmount (+ @currencyID)`\n */\n chargeTotalAmount: Schema.optional(PeppolAmount),\n /**\n * @description Sum of all Invoice line net amounts in the Invoice.\n *\n * @remarks\n * Must be rounded to maximum 2 decimals.\n *\n * @example\n * 3800.0;\n *\n * @summary Sum of Invoice line amount\n *\n * @name `cbc:LineExtensionAmount (+ @currencyID)`\n */\n lineExtensionAmount: PeppolAmount,\n /**\n * @description The amount due for payment on the Invoice, after accounting for all allowances, charges, prepayments, and rounding adjustments.\n *\n * @remarks\n * Must be rounded to maximum 2 decimals.\n *\n * @example\n * 4500.0;\n *\n * @summary Amount due for payment\n *\n * @name `cbc:PayableAmount (+ @currencyID)`\n */\n payableAmount: PeppolAmount,\n /**\n * @description The rounding amount applied to the Invoice total.\n *\n * @remarks\n * Must be rounded to maximum 2 decimals.\n *\n * @example\n * 0.0;\n *\n * @summary Rounding amount\n *\n * @name `cbc:PayableRoundingAmount (+ @currencyID)`\n */\n payableRoundingAmount: Schema.optional(PeppolAmount),\n /**\n * @description The sum of amounts which have been paid in advances.\n *\n * @remarks\n * Must be rounded to maximum 2 decimals.\n *\n * @example\n * 0.0;\n *\n * @summary Paid amount\n *\n * @name `cbc:PrepaidAmount (+ @currencyID)`\n */\n prepaidAmount: Schema.optional(PeppolAmount),\n /**\n * @description The total amount of the Invoice without VAT.\n *\n * @remarks\n * Must be rounded to maximum 2 decimals.\n *\n * @example\n * 3600.0;\n *\n * @summary Invoice total amount without VAT\n *\n * @name `cbc:TaxExclusiveAmount (+ @currencyID)`\n */\n taxExclusiveAmount: PeppolAmount,\n /**\n * @description The total amount of the Invoice with VAT.\n *\n * @example\n * 4500.0;\n *\n * @summary Invoice total amount with VAT\n *\n * @remark Must be rounded to maximum 2 decimals.\n *\n * @name `cbc:TaxInclusiveAmount (+ @currencyID)`\n */\n taxInclusiveAmount: PeppolAmount,\n })\n) {}\n","import { Schema } from 'effect';\n\nimport { opaque } from '#/schemas/utils/opaque.ts';\n\n/**\n * @description A reference to the purchase order or sales order that the invoice relates to.\n *\n * @summary ORDER AND SALES ORDER REFERENCE\n *\n * @name cac:OrderReference\n */\nexport class PeppolOrderReference extends opaque<PeppolOrderReference>()(\n Schema.Struct({\n /**\n * @description An identifier of a referenced purchase order, issued by the Buyer. An identifier of a referenced purchase order, issued by the Buyer. An\n * invoice must have buyer reference (BT-10) or purchase order reference. In cases where sales order reference is provided, but there's no\n * purchase order reference, then use value \"NA\" as this element is mandatory in UBL.\n *\n * @example\n * `98776`;\n *\n * @summary Purchase order reference\n *\n * @name `cbc:ID`\n */\n id: Schema.String,\n /**\n * @description An identifier of a referenced Sales order, issued by the Seller. In cases where sales order reference is provided, but there's no purchase\n * order reference, then set cac:OrderReference/cbc:ID to value \"NA\" as this element is mandatory in UBL.\n *\n * @example\n * `112233`;\n *\n * @summary Sales order reference\n *\n * @name `cbc:SalesOrderID`\n */\n salesOrderId: Schema.optional(Schema.String),\n })\n) {}\n","import { Schema } from 'effect';\n\nimport { opaque } from '#/schemas/utils/opaque.ts';\n\n/**\n * @description A contact point for a party, such as the person responsible for receiving the Invoice. Wraps the `cac:Contact` element with an optional name,\n * telephone number and electronic mail address.\n *\n * @example\n * ```ts\n * { name: 'Lisa Johnson', telephone: '23434234', electronicMail: 'lj@buyer.se' }\n * ```;\n *\n * @see {@link PeppolPartySchema}\n */\nexport class PeppolContact extends opaque<PeppolContact>()(\n Schema.Struct({\n /**\n * @name cbc:ElectronicMail\n */\n electronicMail: Schema.optional(Schema.String),\n /**\n * @name cbc:Name\n */\n name: Schema.optional(Schema.String),\n /**\n * @name cbc:Telephone\n */\n telephone: Schema.optional(Schema.String),\n })\n) {}\n","import { Schema } from 'effect';\n\nimport { PeppolIdentifier } from '#/schemas/fields/peppol-identifier-schema.ts';\nimport { opaque } from '#/schemas/utils/opaque.ts';\n\n/**\n * @description The legal entity details of a party, including the registered name and optional company identifiers.\n *\n * @example\n * ```ts\n * { registrationName: 'SupplierOfficialName Ltd', companyId: { id: 'GB983294' } }\n * ```;\n *\n * @see {@link PeppolPartySchema}\n */\nexport class PeppolPartyLegalEntity extends opaque<PeppolPartyLegalEntity>()(\n Schema.Struct({\n /**\n * @example\n * 987654321;\n *\n * @name cbc:CompanyID (+ @schemeID)\n */\n companyId: Schema.optional(PeppolIdentifier),\n /**\n * @example\n * Share capital\n *\n * @name cbc:CompanyLegalForm\n */\n companyLegalForm: Schema.optional(Schema.String),\n /**\n * @example\n * Full Formal Seller Name LTD.\n *\n * @name cbc:RegistrationName\n */\n registrationName: Schema.String,\n })\n) {}\n\n/**\n * @description Alias for {@link PeppolPartyLegalEntity}.\n */\nexport type PeppolPartyLegalEntitySchema = PeppolPartyLegalEntity;\n","import { Effect, Schema } from 'effect';\n\nimport { opaque } from '#/schemas/utils/opaque.ts';\n\nclass PeppolTaxSchemeId extends opaque<PeppolTaxSchemeId>()(\n Schema.Struct({\n /**\n * @description Mandatory element. For Seller VAT identifier (BT-31), use value “VAT”, for the seller tax registration identifier (BT-32), use != \"VAT\"\n *\n * @name cbc:ID\n */\n id: Schema.String.pipe(Schema.withDecodingDefaultType(Effect.succeed('VAT'))),\n })\n) {}\n\n/**\n * @description The Seller tax registration details, combining a tax identifier such as a VAT number with the tax scheme.\n *\n * @name cac:PartyTaxScheme (0..2)\n */\nexport class PeppolPartyTaxScheme extends opaque<PeppolPartyTaxScheme>()(\n Schema.Struct({\n /**\n * @description The Seller's VAT identifier (also known as Seller VAT identification number) or the local identification (defined by the Seller’s address) of\n * the Seller for tax purposes or a reference that enables the Seller to state his registered tax status. In order for the buyer to automatically\n * identify a supplier, the Seller identifier (BT-29), the Seller legal registration identifier (BT-30) and/or the Seller VAT identifier (BT-31)\n * shall be present.\n *\n * @summary Seller VAT identifier, Seller tax registration identifier\n *\n * @name `cbc:CompanyID`\n */\n companyId: Schema.String,\n /**\n * @description Mandatory element. For Seller VAT identifier (BT-31), use value “VAT”, for the seller tax registration identifier (BT-32), use != \"VAT\"\n *\n * @name `cac:TaxScheme`\n */\n taxSchemeId: PeppolTaxSchemeId,\n })\n) {}\n\n/**\n * @description Alias for {@link PeppolPartyTaxScheme}.\n */\nexport type PeppolPartyTaxSchema = PeppolPartyTaxScheme;\n","/**\n * @module effect/values/eas-codes\n * Electronic Address Scheme (EAS) codes as used in PEPPOL networks\n * These codes identify the scheme used for electronic addresses of parties\n *\n * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/eas/\n */\nimport { Schema } from 'effect';\n\nimport { opaque } from '#/schemas/utils/opaque.ts';\nimport { electronicAddressCodesKeys } from '#/values/eas-codes.generated';\n\n/**\n * @description An electronic address scheme (EAS) code from the PEPPOL Electronic Address Identifier Scheme codelist.\n *\n * @example\n * ```ts\n * '0002';\n * ```;\n *\n * @validations\n * - PEPPOL-EN16931-CL008: Electronic address identifier scheme MUST be from the codelist \"Electronic Address Identifier Scheme\".\n *\n * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/eas/\n * @see {@link electronicAddressCodesKeys}\n */\nexport class PeppolElectronicAddressCode extends opaque<PeppolElectronicAddressCode>()(\n Schema.Literals(electronicAddressCodesKeys).pipe(Schema.brand('PeppolElectronicAddressCode'))\n) {}\n","import { Schema } from 'effect';\n\nimport { PeppolAddress } from '#/schemas/fields/peppol-address-schema.ts';\nimport { PeppolContact } from '#/schemas/fields/peppol-contact-schema.ts';\nimport { PeppolIdentifier } from '#/schemas/fields/peppol-identifier-schema.ts';\nimport { PeppolPartyLegalEntity } from '#/schemas/fields/peppol-party-legal-entity-schema.ts';\nimport { PeppolPartyTaxScheme } from '#/schemas/fields/peppol-party-tax-scheme-schema.ts';\nimport { opaque } from '#/schemas/utils/opaque.ts';\nimport { PeppolElectronicAddressCode } from '#/schemas/values/electronic-codes-schema.ts';\nimport { PeppolIcdCode } from '#/schemas/values/icd-codes-schema.ts';\n\n/**\n * @description A name by which the Buyer or Seller is known, other than its registered name.\n *\n * @example\n * ```ts\n * { name: 'SupplierTradingName Ltd.' }\n * ```;\n *\n * @see {@link PeppolPartySchema}\n */\nexport class PeppolPartyName extends opaque<PeppolPartyName>()(\n Schema.Struct({\n /**\n * @description A name by which the Buyer/Seller is known, other than Buyer/Seller name (also known as Business name).\n *\n * @example\n * `Trading Name`;\n *\n * @summary Buyer/Seller trading name\n */\n name: Schema.String,\n })\n) {}\n\n/**\n * @description An identifier of the Buyer or Seller, with an optional identification scheme.\n *\n * @example\n * ```ts\n * { id: { id: '99887766', schemeId: '0088' } }\n * ```;\n *\n * @see {@link PeppolPartySchema}\n */\nexport class PeppolPartyIdentification extends opaque<PeppolPartyIdentification>()(\n Schema.Struct({\n /**\n * @description An identifier of the Buyer/seller.\n *\n * @summary Buyer/seller identifier\n *\n * @name `cbc:ID`\n */\n id: PeppolIdentifier.pipe(\n Schema.fieldsAssign({\n /**\n * @description Identifies the Seller/buyer's electronic address to which the application level response to the invoice may be delivered.\n *\n * @example\n * 7300010000001;\n *\n * @summary Seller/Buyer electronic address\n *\n * @name `#text`\n */\n id: Schema.String,\n /**\n * @description The identification scheme identifier of the Seller/Buyer electronic address.\n *\n * @summary Seller/Buyer electronic address identification scheme identifier\n *\n * @name `@schemeID`\n */\n schemeId: Schema.optional(PeppolIcdCode),\n })\n ),\n })\n) {}\n\n/**\n * @description The Buyer or Seller electronic address to which the application level response to the invoice may be delivered.\n *\n * @example\n * ```ts\n * { id: '9482348239847239874', schemeId: '0088' }\n * ```;\n *\n * @see {@link PeppolPartySchema}\n */\nexport class PeppolPartyEndpointId extends opaque<PeppolPartyEndpointId>()(\n PeppolIdentifier.pipe(\n Schema.fieldsAssign({\n /**\n * @description Identifies the Seller/buyer's electronic address to which the application level response to the invoice may be delivered.\n *\n * @example\n * 7300010000001;\n *\n * @summary Seller/Buyer electronic address\n *\n * @name `#text`\n */\n id: Schema.String,\n /**\n * @description The identification scheme identifier of the Seller/Buyer electronic address.\n *\n * @summary Seller/Buyer electronic address identification scheme identifier\n *\n * @name `@schemeID`\n */\n schemeId: PeppolElectronicAddressCode,\n })\n )\n) {}\n\n/**\n * @description The common party substructure shared by the supplier, customer, and other party roles.\n *\n * @summary Party common substructure\n *\n * @name cac:Party\n */\nexport class PeppolPartySchema extends opaque<PeppolPartySchema>()(\n Schema.Struct({\n /**\n * @description Identifies the Seller/buyer's electronic address to which the application level response to the invoice may be delivered.\n *\n * @example\n * 7300010000001;\n *\n * @summary Seller/Buyer electronic address\n *\n * @name `cbc:EndpointID`\n */\n endpointId: PeppolPartyEndpointId,\n /**\n * @example\n * 5060012349998;\n *\n * @summary PARTY IDENTIFICATION\n *\n * @name `cac:PartyIdentification`\n */\n partyIdentification: Schema.optional(PeppolPartyIdentification),\n /**\n * @example\n * Seller Business Name AS\n *\n * @summary PARTY NAME\n *\n * @name cac:PartyName\n */\n partyName: Schema.optional(PeppolPartyName),\n /**\n * @name cac:PostalAddress\n */\n postalAddress: PeppolAddress,\n /**\n * @remarks\n * Max 1 for a buyer, max 2 for a seller.\n *\n * @name cac:PartyTaxScheme\n *\n * @cardinality (0..2)\n */\n partyTaxSchemes: Schema.optional(Schema.Array(PeppolPartyTaxScheme).check(Schema.isMaxLength(2))),\n /**\n * @name cac:PartyLegalEntity\n */\n partyLegalEntity: PeppolPartyLegalEntity,\n /**\n * @name cac:Contact\n */\n contact: Schema.optional(PeppolContact),\n })\n) {}\n","import { Schema } from 'effect';\n\nimport { PeppolIdentifier } from '#/schemas/fields/peppol-identifier-schema.ts';\nimport { opaque } from '#/schemas/utils/opaque.ts';\nimport { PeppolIcdCode } from '#/schemas/values/icd-codes-schema.ts';\n\nclass PeppolPartyName extends opaque<PeppolPartyName>()(Schema.Struct({ name: Schema.String })) {}\n\nclass PeppolPartyLegalEntity extends opaque<PeppolPartyLegalEntity>()(\n Schema.Struct({\n /**\n * @description An identifier issued by an official registrar that identifies the payee as a legal entity or person.\n *\n * @example\n * `FR932874294`;\n *\n * @summary Payee legal registration identifier\n *\n * @name `cbc:CompanyID`\n */\n companyId: Schema.optional(\n PeppolIdentifier.pipe(\n Schema.fieldsAssign({\n /**\n * @description An identifier issued by an official registrar that identifies the payee as a legal entity or person.\n *\n * @example\n * `FR932874294`;\n *\n * @summary Payee legal registration identifier\n *\n * @name `#text`\n */\n id: Schema.String,\n /**\n * @description The identification scheme identifier of the Payee legal registration identifier.\n *\n * @summary Payee legal registration identifier identification scheme identifier\n *\n * @name `@schemeID`\n */\n schemeId: Schema.optional(PeppolIcdCode),\n })\n )\n ),\n })\n) {}\n\nclass PeppolPartyIdentification extends opaque<PeppolPartyIdentification>()(\n Schema.Struct({\n /**\n * @description This element is used for both the identification of the Payee, or the unique banking reference identifier of Payee (assigned by the Payee\n * bank.) For payee identification use ICD code list, for SEPA bank assigned creditor reference, use SEPA.\n *\n * @summary Payee identifier or bank assigned crditor identifier\n *\n * @name `cbc:ID`\n */\n id: Schema.optional(\n PeppolIdentifier.pipe(\n Schema.fieldsAssign({\n /**\n * @description This element is used for both the identification of the Payee, or the unique banking reference identifier of Payee (assigned by the Payee\n * bank.) For payee identification use ICD code list, for SEPA bank assigned creditor reference, use SEPA.\n *\n * @summary Payee identifier or bank assigned crditor identifier\n *\n * @name `#text`\n */\n id: Schema.String,\n /**\n * @description The identification scheme identifier of the payee identifier. For bank assigned creditor identifier (BT-90), value MUST be \"SEPA\"\n *\n * @summary Payee or bank assigned creditor identifier identification scheme identifier\n *\n * @name `@schemeID`\n */\n schemeId: Schema.optional(Schema.String),\n })\n )\n ),\n })\n) {}\n\n/**\n * @description A group of business terms providing information about the Payee, i.e. the role that received the payment. Shall be used wwhen the payee is\n * different from the seller.\n *\n * @summary PAYEE\n *\n * @name cac:PayeeParty\n */\nexport class PeppolPayeeParty extends opaque<PeppolPayeeParty>()(\n Schema.Struct({\n /**\n * @summary PARTY IDENTIFICATION\n *\n * @name `cac:PartyIdentification`\n */\n partyIdentification: Schema.optional(PeppolPartyIdentification),\n /**\n * @summary PARTY LEGAL ENTITY\n *\n * @name `cac:PartyLegalEntity`\n */\n partyLegalEntity: Schema.optional(PeppolPartyLegalEntity),\n /**\n * @description The name of the payee.\n *\n * @example\n * `Payee Name Ltd`;\n *\n * @summary Payee name\n *\n * @name `cac:PartyName`\n */\n partyName: PeppolPartyName,\n })\n) {}\n","/**\n * @module effect/values/payment-means-codes-schema\n *\n * Payment means codes as defined by UN/CEFACT UNCL4461.\n *\n * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/UNCL4461/\n */\n\nimport { Schema } from 'effect';\n\nimport { opaque } from '#/schemas/utils/opaque.ts';\nimport { paymentMeansCodesKeys } from '#/values/payment-means-codes.generated';\n\n/**\n * @description A payment means code from the PEPPOL subset of UNCL 4461.\n *\n * @example\n * ```ts\n * '1';\n * ```;\n *\n * @validations\n * - BR-CL-16: Payment means code MUST be a valid UNCL 4461 code.\n *\n * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/UNCL4461/\n * @see {@link paymentMeansCodesKeys}\n */\nexport class PeppolPaymentMeansCodeValue extends opaque<PeppolPaymentMeansCodeValue>()(\n Schema.Literals(paymentMeansCodesKeys).pipe(Schema.brand('PeppolPaymentMeansCodeValue'))\n) {}\n","import { Schema } from 'effect';\n\nimport { PeppolIsoDateString } from '#/schemas/peppol-iso-date-string.ts';\nimport { opaque } from '#/schemas/utils/opaque.ts';\nimport { PeppolPaymentMeansCodeValue } from '#/schemas/values/payment-means-code-schema.ts';\n\n/**\n * @description The account to be debited by a direct debit.\n *\n * @example\n * ```ts\n * { id: '12345676543' }\n * ```;\n *\n * @see {@link PeppolPaymentMandate}\n */\nexport class PeppolPaymentMandatePayerFinancialAccountId extends opaque<PeppolPaymentMandatePayerFinancialAccountId>()(\n Schema.Struct({\n /**\n * @description The account to be debited by the direct debit.\n *\n * @example\n * `12345676543`;\n *\n * @summary Debited account identifier\n *\n * @name `cbc:ID`\n */\n id: Schema.String,\n })\n) {}\n\n/**\n * @description A group of business terms to specify a direct debit, including the mandate reference and the debited account.\n *\n * @example\n * ```ts\n * { id: 'MandateReference', payerFinancialAccountId: { id: '12345676543' } }\n * ```;\n *\n * @see {@link PeppolPaymentMeans}\n */\nexport class PeppolPaymentMandate extends opaque<PeppolPaymentMandate>()(\n Schema.Struct({\n /**\n * @description Unique identifier assigned by the Payee for referencing the direct debit mandate. Used in order to pre-notify the Buyer of a SEPA direct debit.\n *\n * @summary Mandate reference identifier\n *\n * @name cbc:ID\n */\n id: Schema.optional(Schema.String),\n /**\n * @description The account to be debited by the direct debit.\n *\n * @example\n * `12345676543`;\n *\n * @summary Debited account identifier\n *\n * @name `cac:PayerFinancialAccount`\n */\n payerFinancialAccountId: Schema.optional(PeppolPaymentMandatePayerFinancialAccountId),\n })\n) {}\n\n/**\n * @description The payment service provider where the payee payment account is held, such as a BIC or national clearing code.\n *\n * @example\n * ```ts\n * { id: 'BIC324098' }\n * ```;\n *\n * @see {@link PeppolPayeeFinancialAccount}\n */\nexport class PeppolPayeeFinancialAccountFinancialInstitutionBranch extends opaque<PeppolPayeeFinancialAccountFinancialInstitutionBranch>()(\n Schema.Struct({\n /**\n * @description An identifier for the payment service provider where a payment account is located. Such as a BIC or a national clearing code where required. No\n * identification scheme Identifier to be used.\n *\n * @example\n * `9998`;\n *\n * @summary Payment service provider identifier\n *\n * @name `cac:FinancialInstitutionBranch`\n */\n id: Schema.String,\n })\n) {}\n\n/**\n * @description The payment account to which payment should be made, such as an IBAN or BBAN, including the financial institution branch.\n *\n * @example\n * ```ts\n * { id: 'IBAN32423940', name: 'AccountName' }\n * ```;\n *\n * @see {@link PeppolPaymentMeans}\n */\nexport class PeppolPayeeFinancialAccount extends opaque<PeppolPayeeFinancialAccount>()(\n Schema.Struct({\n /**\n * @description An identifier for the payment service provider where a payment account is located. Such as a BIC or a national clearing code where required. No\n * identification scheme Identifier to be used.\n *\n * @example\n * `9998`;\n *\n * @summary Payment service provider identifier\n *\n * @name `cac:FinancialInstitutionBranch`\n */\n financialInstitutionBranch: Schema.optional(PeppolPayeeFinancialAccountFinancialInstitutionBranch),\n /**\n * @description A unique identifier of the financial payment account, at a payment service provider, to which payment should be made. Such as IBAN or BBAN.\n *\n * @summary Payment account identifier\n *\n * @name cbc:ID\n */\n id: Schema.String,\n /**\n * @description The name of the payment account, at a payment service provider, to which payment should be made.\n *\n * @summary Payment account name\n *\n * @name cbc:Name\n */\n name: Schema.optional(Schema.String),\n })\n) {}\n\n/**\n * @description The card used for payment, including the card holder name and the primary account number.\n *\n * @example\n * ```ts\n * { networkId: 'VISA', primaryAccountNumberId: '1234' }\n * ```;\n *\n * @see {@link PeppolPaymentMeans}\n */\nexport class PeppolCardAccount extends opaque<PeppolCardAccount>()(\n Schema.Struct({\n /**\n * @description The name of the payment card holder.\n *\n * @summary Payment card holder name\n *\n * @name cbc:HolderName\n */\n holderName: Schema.optional(Schema.String),\n /**\n * @summary Syntax required element not related to a business term.\n *\n * @name cbc:NetworkID\n */\n networkId: Schema.String,\n /**\n * @description The Primary Account Number (PAN) of the card used for payment. In accordance with card payments security standards, an invoice should never\n * include a full card primary account number.\n *\n * @example\n * `1234`;\n *\n * @summary Payment card primary account number\n *\n * @name cbc:PrimaryAccountNumberID\n */\n primaryAccountNumberId: Schema.String,\n })\n) {}\n\n/**\n * @description The means by which a payment is expected to be or has been settled, expressed as a UNCL 4461 code and optional text.\n *\n * @example\n * ```ts\n * { code: '30', name: 'Credit transfer' }\n * ```;\n *\n * @see {@link PeppolPaymentMeans}\n */\nexport class PeppolPaymentMeansCode extends opaque<PeppolPaymentMeansCode>()(\n Schema.Struct({\n /**\n * @description The means, expressed as code, for how a payment is expected to be or has been settled.\n *\n * @example\n * 30;\n *\n * @summary Payment means type code\n *\n * @name `#text`\n */\n code: PeppolPaymentMeansCodeValue,\n /**\n * @description The means, expressed as text, for how a payment is expected to be or has been settled.\n *\n * @example\n * Credit transfer\n *\n * @summary Payment means text\n *\n * @name `@name`\n */\n name: Schema.optional(Schema.String),\n })\n) {}\n\n/**\n * @description A group of business terms providing information about the payment.\n *\n * @summary Payment means (credit transfer/direct debit/card)\n *\n * @name cac:PaymentMeans\n */\nexport class PeppolPaymentMeans extends opaque<PeppolPaymentMeans>()(\n Schema.Struct({\n /**\n * @description The means, expressed as code, for how a payment is expected to be or has been settled.\n *\n * @example\n * 30;\n *\n * @summary Payment means type code\n *\n * @name `cbc:PaymentMeansCode`\n */\n paymentMeansCode: PeppolPaymentMeansCode,\n /**\n * @description The date when the payment is due.Format \"YYYY-MM-DD\". In case the Amount due for payment (BT-115) is positive, either the Payment due date\n * (BT-9) or the Payment terms (BT-20) shall be present.\n *\n * @remarks\n * This should only be used with a credit note.\n *\n * @summary Payment due date\n *\n * @name `cbc:PaymentDueDate`\n */\n paymentDueDate: Schema.optional(PeppolIsoDateString),\n /**\n * @description A textual value used to establish a link between the payment and the Invoice, issued by the Seller. Used for creditor's critical reconciliation\n * information. This information element helps the Seller to assign an incoming payment to the relevant payment process.\n *\n * @example\n * `432948234234234`;\n *\n * @summary Remittance information\n *\n * @name cbc:PaymentID\n */\n paymentId: Schema.optional(Schema.String),\n /**\n * @description A group of business terms providing information about card used for payment contemporaneous with invoice issuance.\n *\n * @summary PAYMENT CARD INFORMATION\n *\n * @name cac:CardAccount\n */\n cardAccount: Schema.optional(PeppolCardAccount),\n /**\n * @description A group of business terms to specify credit transfer payments.\n *\n * @summary CREDIT TRANSFER\n *\n * @name cac:PayeeFinancialAccount\n */\n payeeFinancialAccount: Schema.optional(PeppolPayeeFinancialAccount),\n /**\n * @description A group of business terms to specify a direct debit.\n *\n * @summary DIRECT DEBIT\n *\n * @name cac:PaymentMandate\n */\n paymentMandate: Schema.optional(PeppolPaymentMandate),\n })\n) {}\n","import { Schema } from 'effect';\n\nimport { opaque } from '#/schemas/utils/opaque.ts';\n\n/**\n * @description A textual description of the payment terms that apply to the amount due for payment.\n *\n * @summary PAYMENT TERMS\n *\n * @name cac:PaymentTerms\n */\nexport class PeppolPaymentTerms extends opaque<PeppolPaymentTerms>()(\n Schema.Struct({\n /**\n * @description A textual description of the payment terms that apply to the amount due for payment (Including description of possible penalties). In case the\n * Amount due for payment (BT-115) is positive, either the Payment due date (BT-9) or the Payment terms (BT-20) shall be present.\n *\n * @example\n * Net within 30 days\n *\n * @summary Payment terms\n *\n * @name cbc:Note\n */\n note: Schema.String,\n })\n) {}\n","import { Schema } from 'effect';\n\nimport { PeppolAddress } from '#/schemas/fields/peppol-address-schema.ts';\nimport { PeppolPartyTaxScheme } from '#/schemas/fields/peppol-party-tax-scheme-schema.ts';\nimport { opaque } from '#/schemas/utils/opaque.ts';\n\n/**\n * @description The party acting as the Seller tax representative, including its name, postal address, and tax scheme.\n *\n * @summary SELLER TAX REPRESENTATIVE PARTY\n *\n * @name cac:TaxRepresentativeParty\n */\nexport class PeppolTaxRepresentative extends opaque<PeppolTaxRepresentative>()(\n Schema.Struct({\n /**\n * @name cac:PartyName/cbc:Name\n */\n name: Schema.String,\n /**\n * @name cac:PostalAddress\n */\n postalAddress: PeppolAddress,\n partyTaxScheme: PeppolPartyTaxScheme,\n })\n) {}\n\n/**\n * @description Alias for {@link PeppolTaxRepresentative}.\n */\nexport type PeppolTaxRepresentativeParty = PeppolTaxRepresentative;\n","import { Schema } from 'effect';\n\nimport { PeppolTaxCategory } from '#/schemas/fields/peppol-tax-category-schema.ts';\nimport { opaque } from '#/schemas/utils/opaque.ts';\n\n/**\n * @description This one is specific for TaxSubtotal since it includes more fields.\n *\n * @summary Tax Category for Tax Subtotal\n *\n * @name cac:TaxCategory\n */\nexport class PeppolTaxSubTotalCategory extends opaque<PeppolTaxSubTotalCategory>()(\n Schema.Struct({\n ...PeppolTaxCategory.fields,\n /**\n * @description The reason for the tax exemption.\n *\n * @name cbc:TaxExemptionReason\n */\n taxExemptionReason: Schema.optional(Schema.String),\n /**\n * @description The code for the reason of the tax exemption.\n *\n * @name cbc:TaxExemptionReasonCode\n */\n taxExemptionReasonCode: Schema.optional(Schema.String),\n })\n) {}\n\n/**\n * @description The encoded form of {@link PeppolTaxSubTotalCategory}, accepted by the decoder before branded code values are applied.\n */\nexport interface PeppolTaxSubTotalCategoryEncoded extends Schema.Codec.Encoded<typeof PeppolTaxSubTotalCategory> {}\n","import { Schema } from 'effect';\n\nimport { PeppolAmount } from '#/schemas/fields/peppol-amount-schema.ts';\nimport { PeppolTaxSubTotalCategory } from '#/schemas/fields/peppol-tax-subtotal-category-schema.ts';\nimport { opaque } from '#/schemas/utils/opaque.ts';\n\n/**\n * @description A VAT breakdown line for a single tax category, giving the taxable amount and the tax amount.\n *\n * @summary VAT breakdown (TaxSubtotal)\n *\n * @name cac:TaxSubtotal\n */\nexport class PeppolTaxSubTotal extends opaque<PeppolTaxSubTotal>()(\n Schema.Struct({\n /**\n * @description The amount of tax for the tax subtotal.\n *\n * @name `cbc:TaxAmount (+ @currencyID)`\n */\n taxAmount: PeppolAmount,\n /**\n * @description The tax category associated with this tax subtotal.\n *\n * @name cac:TaxCategory\n */\n taxCategory: PeppolTaxSubTotalCategory,\n /**\n * @description The taxable amount for the tax subtotal.\n *\n * @name `cbc:TaxableAmount (+ @currencyID)`\n */\n taxableAmount: PeppolAmount,\n })\n) {}\n","import { Schema } from 'effect';\n\nimport { PeppolAmount } from '#/schemas/fields/peppol-amount-schema.ts';\nimport { PeppolTaxSubTotal } from '#/schemas/fields/peppol-tax-subtotal-schema.ts';\nimport { opaque } from '#/schemas/utils/opaque.ts';\n\n/**\n * @description The total tax amount for the document, with an optional breakdown into tax subtotals.\n *\n * @summary TAX TOTAL\n *\n * @name cac:TaxTotal (1..2)\n */\nexport class PeppolTaxTotalsBase extends opaque<PeppolTaxTotalsBase>()(\n Schema.Struct({\n /**\n * @example\n * 200;\n *\n * @name cbc:TaxAmount (+ @currencyID)\n */\n taxAmount: PeppolAmount,\n /**\n * @name cac:TaxSubtotal (0..n)\n */\n taxSubtotals: Schema.optional(Schema.Array(PeppolTaxSubTotal)),\n })\n) {}\n\n/**\n * @description Alias for {@link PeppolTaxTotalsBase}.\n */\nexport type PeppolTaxTotal = PeppolTaxTotalsBase;\n","import { Effect, Schema } from 'effect';\n\nimport { DEFAULT_CUSTOMIZATION_ID } from '#/schemas/fields/default-customization-id.ts';\nimport { DEFAULT_PROFILE_ID } from '#/schemas/fields/default-profile-id.ts';\nimport { PeppolAdditionalDocumentReference } from '#/schemas/fields/peppol-additional-document-reference-schema.ts';\nimport { PeppolAllowanceCharge } from '#/schemas/fields/peppol-allowance-charge-schema.ts';\nimport { PeppolBillingReference } from '#/schemas/fields/peppol-billing-reference-schema.ts';\nimport { PeppolDelivery } from '#/schemas/fields/peppol-delivery-schema.ts';\nimport { PeppolInvoicePeriod } from '#/schemas/fields/peppol-invoice-period-schema.ts';\nimport { PeppolLegalMonetaryTotal } from '#/schemas/fields/peppol-legal-monetary-total-schema.ts';\nimport { PeppolOrderReference } from '#/schemas/fields/peppol-order-reference-schema.ts';\nimport { PeppolPartySchema } from '#/schemas/fields/peppol-party-base-schema.ts';\nimport { PeppolPayeeParty } from '#/schemas/fields/peppol-payee-party-schema.ts';\nimport { PeppolPaymentMeans } from '#/schemas/fields/peppol-payment-means-schema.ts';\nimport { PeppolPaymentTerms } from '#/schemas/fields/peppol-payment-terms-schema.ts';\nimport { PeppolTaxRepresentative } from '#/schemas/fields/peppol-tax-representative-schema.ts';\nimport { PeppolTaxTotalsBase } from '#/schemas/fields/peppol-tax-totals-base-schema.ts';\nimport { PeppolIsoDateString } from '#/schemas/peppol-iso-date-string.ts';\nimport { opaque } from '#/schemas/utils/opaque.ts';\nimport { PeppolCurrencyCode } from '#/schemas/values/currency-code-schema.ts';\n\n/**\n * @description Wraps the `cac:ContractDocumentReference` element: an identifier of a contract that the billing document references.\n *\n * @example\n * ```ts\n * { id: '123Contractref' }\n * ```;\n *\n * @see {@link PeppolBillingBase}\n */\nexport class PeppolContractDocumentReference extends opaque<PeppolContractDocumentReference>()(\n Schema.Struct({\n /**\n * @description An identifier of a referenced contract.\n *\n * @example\n * `123Contractref`;\n *\n * @summary Contract reference\n *\n * @name `cbc:ID`\n */\n id: Schema.String,\n })\n) {}\n\n/**\n * @description Wraps the `cac:OriginatorDocumentReference` element: the identification of the call for tender or lot the invoice relates to.\n *\n * @example\n * ```ts\n * { id: 'PPID-123' }\n * ```;\n *\n * @see {@link PeppolBillingBase}\n */\nexport class PeppolOriginatorDocumentReference extends opaque<PeppolOriginatorDocumentReference>()(\n Schema.Struct({\n /**\n * @description The identification of the call for tender or lot the invoice relates to.\n *\n * @example\n * `PPID-123`;\n *\n * @summary Tender or lot reference\n *\n * @name `cbc:ID`\n */\n id: Schema.String,\n })\n) {}\n\n/**\n * @description Wraps the `cac:ReceiptDocumentReference` element: an identifier of a referenced receiving advice.\n *\n * @example\n * ```ts\n * { id: 'rec98' }\n * ```;\n *\n * @see {@link PeppolBillingBase}\n */\nexport class PeppolReceiptDocumentReference extends opaque<PeppolReceiptDocumentReference>()(\n Schema.Struct({\n /**\n * @description An identifier of a referenced receiving advice.\n *\n * @example\n * `rec98`;\n *\n * @summary Receiving advice reference\n *\n * @name `cbc:ID`\n */\n id: Schema.String,\n })\n) {}\n\n/**\n * @description Wraps the `cac:DespatchDocumentReference` element: an identifier of a referenced despatch advice.\n *\n * @example\n * ```ts\n * { id: 'desp98' }\n * ```;\n *\n * @see {@link PeppolBillingBase}\n */\nexport class PeppolDespatchDocumentReference extends opaque<PeppolDespatchDocumentReference>()(\n Schema.Struct({\n /**\n * @description An identifier of a referenced despatch advice.\n *\n * @example\n * `desp98`;\n *\n * @summary Despatch advice reference\n *\n * @name `cbc:ID`\n */\n id: Schema.String,\n })\n) {}\n\n/**\n * @description Base schema for a billing document.\n *\n * @see {@link PeppolCreditNote} - the credit note schema\n * @see {@link PeppolInvoice} - the invoice schema\n */\nexport class PeppolBillingBase extends opaque<PeppolBillingBase>()(\n Schema.Struct({\n /**\n * @description An identification of the specification containing the total set of rules regarding semantic content, cardinalities, and business rules to which\n * the data contained in the intance document conforms.\n *\n * @default `urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0`\n *\n * @summary Specification identifier\n *\n * @cardinality 1..1\n *\n * @name `cbc:CustomizationID`\n */\n customizationId: Schema.String.pipe(Schema.withDecodingDefaultType(Effect.succeed(DEFAULT_CUSTOMIZATION_ID))).check(\n Schema.isStartsWith('urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0', {\n message:\n \"PEPPOL-EN16931-R004: Specification identifier MUST have the value 'urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0'.\",\n })\n ),\n /**\n * @description Identifies the business process context in which the transaction appears, to enable the Buyer to process the Invoice in an appropriate way.\n *\n * @default `urn:fdc:peppol.eu:2017:poacc:billing:01:1.0`\n *\n * @summary Business process type\n *\n * @name `cbc:ProfileID`\n */\n profileId: Schema.String.pipe(Schema.withDecodingDefaultType(Effect.succeed(DEFAULT_PROFILE_ID))).check(\n Schema.isPattern(/^urn:fdc:peppol.eu:2017:poacc:billing:(\\d{2}):1\\.0$/, {\n message:\n \"PEPPOL-EN16931-R007: Business process MUST be in the format 'urn:fdc:peppol.eu:2017:poacc:billing:NN:1.0' where NN indicates the process number.\",\n })\n ),\n /**\n * @description A using identification of the Invoice. The sequential number required in Article 226(2) of the directive 2006/112/EC [2], to uniquely identify\n * the Invoice within the business context, time-frame, operating systems and records of the Seller. No identification scheme is to be used.\n *\n * @example\n * 33445566;\n *\n * @summary Invoice number\n *\n * @name `cbc:ID`\n */\n id: Schema.String,\n /**\n * @description The date when the invoice was issued.\n *\n * @example\n * `2017-11-01`;\n *\n * @summary Invoice issue date\n *\n * @format `YYYY-MM-DD`\n *\n * @name `cbc:IssueDate`\n */\n issueDate: PeppolIsoDateString,\n /**\n * @description Invoice note A textual note that gives unstructured information that is relevant to the Credit Note as a whole.\n *\n * @example\n * Please note our new phone number 33 44 55 66\n *\n * @name `cbc:Note`\n */\n note: Schema.optional(Schema.String),\n /**\n * @description The date when the VAT becomes accountable for the Seller and for the Buyer in so far as that date can be determined and differs from the date\n * of issue of the invoice, according to the VAT directive.This element is required if the Value added tax point date is different from the\n * Invoice issue date.\n *\n * @example\n * 2017 - 11 - 01;\n *\n * @summary Value added tax point date\n *\n * @name `cbc:TaxPointDate`\n */\n taxPointDate: Schema.optional(PeppolIsoDateString),\n /**\n * @description The currency in which all Invoice amounts are given, except for the Total VAT amount in accounting currency. Only one currency shall be used in\n * the Invoice, except for the VAT accounting currency code (BT-6) and the invoice total VAT amount in accounting currency (BT-111).\n *\n * @example\n * EUR;\n *\n * @summary Invoice currency code\n *\n * @name `cbc:DocumentCurrencyCode`\n */\n documentCurrencyCode: PeppolCurrencyCode,\n /**\n * @description The currency used for VAT accounting and reporting purposes as accepted or required in the country of the Seller. Shall be used in combination\n * with the Invoice total VAT amount in accounting currency (BT-111), when the VAT accounting currency code differs from the Invoice currency\n * code.\n *\n * @example\n * SEK;\n *\n * @summary VAT accounting currency code\n *\n * @name `cbc:TaxCurrencyCode`\n */\n taxCurrencyCode: Schema.optional(PeppolCurrencyCode),\n /**\n * @description A textual value that specifies where to book the relevant data into the Buyer's financial accounts.\n *\n * @example\n * `4217:2323:2323`;\n *\n * @summary Buyer accounting reference\n *\n * @name `cbc:AccountingCost`\n */\n accountingCost: Schema.optional(Schema.String),\n /**\n * @description An identifier assigned by the Buyer used for internal routing purposes. An invoice must have buyer reference or purchase order reference\n * (BT-13).\n *\n * @example\n * `abs1234`;\n *\n * @summary Buyer reference\n *\n * @name `cbc:BuyerReference`\n */\n buyerReference: Schema.optional(Schema.String),\n /**\n * @description A group of business terms providing information on the invoice period. Also called delivery period. If the group is used, the invoiceing period\n * start date and/or end date must be used.\n *\n * @summary DELIVERY OR INVOICE PERIOD\n *\n * @name `cac:InvoicePeriod`\n */\n invoicePeriod: Schema.optional(PeppolInvoicePeriod),\n /**\n * @summary ORDER AND SALES ORDER REFERENCE\n *\n * @name `cac:OrderReference`\n */\n orderReference: Schema.optional(PeppolOrderReference),\n /**\n * @summary PRECEDING INVOICE REFERENCE (0..n)\n *\n * @name `cac:BillingReference`\n */\n billingReferences: Schema.optional(Schema.Array(PeppolBillingReference)),\n /**\n * @summary DESPATCH ADVICE REFERENCE\n *\n * @name `cac:DespatchDocumentReference`\n */\n despatchDocumentReference: Schema.optional(PeppolDespatchDocumentReference),\n /**\n * @summary RECEIPT ADVICE REFERENCE\n *\n * @name `cac:ReceiptDocumentReference`\n */\n receiptDocumentReference: Schema.optional(PeppolReceiptDocumentReference),\n /**\n * @summary TENDER OR LOT REFERENCE\n *\n * @name `cac:OriginatorDocumentReference`\n */\n originatorDocumentReference: Schema.optional(PeppolOriginatorDocumentReference),\n\n /**\n * @summary CONTRACT REFERENCE\n *\n * @name `cac:ContractDocumentReference`\n */\n contractDocumentReference: Schema.optional(PeppolContractDocumentReference),\n\n /**\n * @description A group of business terms providing information about additional supporting documents substantiating the claims made in the Invoice. The\n * additional supporting documents can be used for both referencing a document number which is expected to be known by the receiver, an external\n * document (referenced by a URL) or as an embedded document, Base64 encoded (such as a time report).\n *\n * @summary ADDITIONAL SUPPORTING DOCUMENTS\n *\n * @name `cac:AdditionalDocumentReference`\n */\n additionalDocumentReferences: Schema.optional(Schema.Array(PeppolAdditionalDocumentReference)),\n\n /**\n * @description A group of business terms providing information about the seller.\n *\n * @summary SELLER\n *\n * @name `cac:AccountingSupplierParty`\n */\n accountingSupplierParty: PeppolPartySchema,\n\n /**\n * @description A group of business terms providing information about the Buyer.\n *\n * @summary BUYER\n *\n * @name `cac:AccountingCustomerParty`\n */\n accountingCustomerParty: PeppolPartySchema,\n\n /**\n * @description A group of business terms providing information about the Payee, i.e. the role that received the payment. Shall be used wwhen the payee is\n * different from the seller.\n *\n * @summary PAYEE\n *\n * @name cac:PayeeParty\n */\n payeeParty: Schema.optional(PeppolPayeeParty),\n\n /**\n * @description SELLER TAX REPRESENTATIVE PARTY.\n *\n * @name cac:TaxRepresentativeParty\n */\n taxRepresentativeParty: Schema.optional(PeppolTaxRepresentative),\n\n /**\n * @description DELIVERY INFORMATION.\n *\n * @name cac:Delivery\n */\n delivery: Schema.optional(PeppolDelivery),\n\n /**\n * @summary PAYMENT INSTRUCTIONS\n * @summary A group of business terms providing information about the payment.\n *\n * @name cac:PaymentMeans\n */\n paymentMeans: Schema.optional(Schema.Array(PeppolPaymentMeans)),\n\n /**\n * @example\n * Net within 30 days\n *\n * @summary PAYMENT TERMS\n *\n * @name cac:PaymentTerms\n */\n paymentTerms: Schema.optional(PeppolPaymentTerms),\n\n /**\n * @description A group of business terms providing information about allowances applicable to the Invoice as a whole. A group of business terms providing\n * information about charges and taxes other than VAT, applicable to the Invoice as a whole.\n *\n * @summary DOCUMENT LEVEL ALLOWANCES AND CHARGES\n *\n * @name cac:AllowanceCharge\n */\n allowanceCharges: Schema.optional(Schema.Array(PeppolAllowanceCharge)),\n\n /**\n * @description When tax currency code is provided, two instances of the tax total must be present, but only one with tax subtotal.\n *\n * @summary TAX TOTAL\n *\n * @name cac:TaxTotal\n */\n taxTotals: Schema.Array(PeppolTaxTotalsBase).check(Schema.isMinLength(1), Schema.isMaxLength(2)),\n\n /**\n * @summary DOCUMENT TOTALS\n *\n * @name cac:LegalMonetaryTotal\n */\n legalMonetaryTotal: PeppolLegalMonetaryTotal,\n })\n) {}\n","import { Schema } from 'effect';\n\nimport { opaque } from '#/schemas/utils/opaque.ts';\nimport { itemClassificationCodesKeys } from '#/values/item-classification-code.generated';\n\n/**\n * @description An item classification code from the PEPPOL subset of UNCL 7143.\n *\n * @example\n * ```ts\n * 'AA';\n * ```;\n *\n * @validations\n * - BR-CL-13: Item classification scheme MUST be a valid UNTDID 7143 code.\n *\n * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/UNCL7143/\n * @see {@link itemClassificationCodesKeys}\n */\nexport class PeppolItemClassificationCode extends opaque<PeppolItemClassificationCode>()(\n Schema.Literals(itemClassificationCodesKeys).pipe(Schema.brand('PeppolItemClassificationCode'))\n) {}\n","import { Schema } from 'effect';\n\nimport { opaque } from '#/schemas/utils/opaque.ts';\nimport { PeppolItemClassificationCode } from '#/schemas/values/item-classification-codes-schema.ts';\n\n/**\n * @description A code for classifying the item by its type or nature.\n *\n * @example\n * `9873242`;\n *\n * @summary Item classification identifier\n *\n * @name `cbc:ItemClassificationCode`\n */\nexport class PeppolItemClassification extends opaque<PeppolItemClassification>()(\n Schema.Struct({\n /**\n * @description A code for classifying the item by its type or nature.\n *\n * @summary Item classification identifier\n *\n * @name `#text`\n */\n id: Schema.String,\n /**\n * @description The identification scheme identifier of the item classification identifier.\n *\n * @summary Item classification identifier identification scheme identifier\n *\n * @name `@listID`\n */\n listId: PeppolItemClassificationCode,\n /**\n * @description The identification scheme version identifier of the Item classification identifier.\n *\n * @remarks\n * Only used with danish.\n *\n * @summary Item classification identifier version identification scheme identifier\n *\n * @name `@listVersionID`\n */\n listVersionId: Schema.optional(Schema.String),\n })\n) {}\n","import { Schema } from 'effect';\n\nimport { PeppolIdentifier } from '#/schemas/fields/peppol-identifier-schema.ts';\nimport { PeppolItemClassification } from '#/schemas/fields/peppol-item-classification-schema.ts';\nimport { PeppolTaxCategory } from '#/schemas/fields/peppol-tax-category-schema.ts';\nimport { opaque } from '#/schemas/utils/opaque.ts';\nimport { PeppolIcdCode } from '#/schemas/values/icd-codes-schema.ts';\nimport { PeppolCountryCodeValue } from '#/schemas/values/peppol-country-code-schema.ts';\n\n/**\n * @description An additional property of the item, expressed as an attribute name and value pair.\n *\n * @example\n * ```ts\n * { name: 'Colour', value: 'Blue' }\n * ```;\n *\n * @see {@link PeppolLineItem}\n */\nexport class PeppolAdditionalItemProperties extends opaque<PeppolAdditionalItemProperties>()(\n Schema.Struct({\n /**\n * @description The name of the attribute or property of the item.\n *\n * @summary Item attribute name\n *\n * @name cbc:Name\n */\n name: Schema.String,\n /**\n * @description The value of the attribute or property of the item.\n *\n * @summary Item attribute value\n *\n * @name cbc:Value\n */\n value: Schema.String,\n })\n) {}\n\n/**\n * @description A code classifying the item by its type or nature, identified by a scheme such as CPV.\n *\n * @example\n * ```ts\n * { itemClassification: { id: '09348023', listId: 'STI' } }\n * ```;\n *\n * @see {@link PeppolItemClassification}\n */\nexport class PeppolCommodityClassifications extends opaque<PeppolCommodityClassifications>()(\n Schema.Struct({\n /**\n * @description A code for classifying the item by its type or nature.\n *\n * @example\n * `9873242`;\n *\n * @summary Item classification identifier\n *\n * @name `cbc:ItemClassificationCode`\n */\n itemClassification: PeppolItemClassification,\n })\n) {}\n\n/**\n * @description The country from which the item originates, identified by an ISO 3166-1 country code.\n *\n * @example\n * ```ts\n * { identificationCode: 'NO' }\n * ```;\n *\n * @see {@link PeppolLineItem}\n */\nexport class PeppolOriginCountryCode extends opaque<PeppolOriginCountryCode>()(\n Schema.Struct({\n /**\n * @description The code identifying the country from which the item originates.\n *\n * @summary Item country of origin\n *\n * @name `cbc:IdentificationCode`\n */\n identificationCode: PeppolCountryCodeValue,\n })\n) {}\n\n/**\n * @description An item identifier based on a registered scheme, such as a GTIN or EAN.\n *\n * @example\n * ```ts\n * { id: { id: '21382183120983', schemeId: '0088' } }\n * ```;\n *\n * @see {@link PeppolIdentifier}\n */\nexport class PeppolStandardItemIdentification extends opaque<PeppolStandardItemIdentification>()(\n Schema.Struct({\n /**\n * @description An item identifier based on a registered scheme.\n *\n * @summary Item standard identifier\n *\n * @name `cbc:ID`\n */\n id: PeppolIdentifier.pipe(\n Schema.fieldsAssign({\n /**\n * @description An item identifier based on a registered scheme.\n *\n * @summary Item standard identifier\n *\n * @name `#text`\n */\n id: Schema.String,\n /**\n * @description The identification scheme identifier of the Item standard identifier.\n *\n * @summary Item standard identifier identification scheme identifier\n *\n * @name `@schemeID`\n */\n schemeId: PeppolIcdCode,\n })\n ),\n })\n) {}\n\n/**\n * @description An identifier assigned by the Seller for the item.\n *\n * @example\n * ```ts\n * { id: '987323' }\n * ```;\n *\n * @see {@link PeppolLineItem}\n */\nexport class PeppolSellersItemIdentification extends opaque<PeppolSellersItemIdentification>()(\n Schema.Struct({\n /**\n * @description An identifier, assigned by the Seller, for the item.\n *\n * @example\n * `987323`;\n *\n * @summary Item Seller's identifier\n *\n * @name `cbc:ID`\n */\n id: Schema.String,\n })\n) {}\n\n/**\n * @description An identifier assigned by the Buyer for the item.\n *\n * @example\n * ```ts\n * { id: '12345' }\n * ```;\n *\n * @see {@link PeppolLineItem}\n */\nexport class PeppolBuyersItemIdentification extends opaque<PeppolBuyersItemIdentification>()(\n Schema.Struct({\n /**\n * @description An identifier, assigned by the Buyer, for the item.\n *\n * @example\n * `12345`;\n *\n * @summary Item Buyer's identifier\n *\n * @name `cbc:ID`\n */\n id: Schema.String,\n })\n) {}\n\n/**\n * @description The item details for an invoice or credit note line, including its name, identifiers, classification, and line VAT category.\n *\n * @summary Item details on invoice/credit-note line\n *\n * @name cac:Item\n */\nexport class PeppolLineItem extends opaque<PeppolLineItem>()(\n Schema.Struct({\n /**\n * @description A description for an item. The item description allows for descibing the item and its features in more detail than the item name.\n *\n * @summary Item description\n *\n * @name cbc:Description\n */\n description: Schema.optional(Schema.String),\n /**\n * @description A name for an item.\n *\n * @summary Item name\n *\n * @name cbc:Name\n */\n name: Schema.String,\n /**\n * @summary BUYERS ITEM IDENTIFICATION\n *\n * @name cac:BuyersItemIdentification\n */\n buyersItemIdentification: Schema.optional(PeppolBuyersItemIdentification),\n /**\n * @summary Sellers item identification\n *\n * @name cac:SellersItemIdentification\n */\n sellersItemIdentification: Schema.optional(PeppolSellersItemIdentification),\n /**\n * @summary Standard item identification\n *\n * @name cac:StandardItemIdentification\n */\n standardItemIdentification: Schema.optional(PeppolStandardItemIdentification),\n /**\n * @summary ORIGIN COUNTRY\n *\n * @name `cac:OriginCountry`\n */\n originCountryCode: Schema.optional(PeppolOriginCountryCode),\n /**\n * @summary COMMODITY CLASSIFICATION\n *\n * @name cac:CommodityClassification (0..n)\n */\n commodityClassifications: Schema.optional(Schema.Array(PeppolCommodityClassifications)),\n /**\n * @description A group of business terms providing information about the VAT applicable for the goods and services invoiced on the Invoice line.\n *\n * @summary LINE VAT INFORMATION\n *\n * @name cac:ClassifiedTaxCategory\n */\n classifiedTaxCategory: PeppolTaxCategory,\n /**\n * @description A group of business terms providing information about properties of the goods and services invoiced.\n *\n * @summary ITEM ATTRIBUTES\n *\n * @name cac:AdditionalItemProperty\n */\n additionalItemProperties: Schema.optional(Schema.Array(PeppolAdditionalItemProperties)),\n })\n) {}\n\n/**\n * @description Alias for {@link PeppolLineItem}.\n */\nexport type PeppolItem = PeppolLineItem;\n","import { Schema } from 'effect';\n\nimport { opaque } from '#/schemas/utils/opaque.ts';\nimport { quantityUnitCodesKeys } from '#/values/quantity-unit-codes.generated';\n\n/**\n * @description A unit of measure code from the PEPPOL subset of UN/ECE Recommendation 20.\n *\n * @example\n * ```ts\n * '10';\n * ```;\n *\n * @validations\n * - BR-CL-23: Unit of measure code MUST be a valid UN/ECE Rec 20 code.\n *\n * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/UNECERec20/\n * @see {@link quantityUnitCodesKeys}\n */\nexport class PeppolQuantityUnitCode extends opaque<PeppolQuantityUnitCode>()(\n Schema.Literals(quantityUnitCodesKeys).pipe(Schema.brand('PeppolQuantityUnitCode'))\n) {}\n","import { Schema } from 'effect';\n\nimport { opaque } from '#/schemas/utils/opaque.ts';\nimport { PeppolQuantityUnitCode } from '#/schemas/values/quantity-unit-codes-schema.ts';\n\n/**\n * @description A quantity value with an optional unit of measure code.\n *\n * @summary Quantity with optional unit code\n *\n * @name `cbc:* (+ @unitCode)`\n */\nexport class PeppolQuantity extends opaque<PeppolQuantity>()(\n Schema.Struct({\n /**\n * @name `@unitCode`\n */\n unitCode: Schema.optional(PeppolQuantityUnitCode),\n /**\n * @name `#text (value)`\n */\n value: Schema.Finite,\n })\n) {}\n","import { Schema } from 'effect';\n\nimport { PeppolAmount } from '#/schemas/fields/peppol-amount-schema.ts';\nimport { PeppolLinePriceAllowanceCharge } from '#/schemas/fields/peppol-line-price-allowance-charge-schema.ts';\nimport { PeppolQuantity } from '#/schemas/fields/peppol-quantity-schema.ts';\nimport { opaque } from '#/schemas/utils/opaque.ts';\n\n/**\n * @description The price details of an invoice or credit note line, including the price amount and any price level allowance.\n *\n * @summary Price details on invoice line\n *\n * @name cac:Price\n */\nexport class PeppolLinePrice extends opaque<PeppolLinePrice>()(\n Schema.Struct({\n /**\n * @name cac:AllowanceCharge\n *\n * @cardinality 0..1\n */\n allowanceCharge: Schema.optional(PeppolLinePriceAllowanceCharge),\n /**\n * @name cbc:BaseQuantity (+ @unitCode)\n *\n * @cardinality 0..1\n */\n baseQuantity: Schema.optional(PeppolQuantity),\n /**\n * @name cbc:PriceAmount (+ @currencyID)\n */\n priceAmount: PeppolAmount,\n })\n) {}\n","import { Effect, Schema } from 'effect';\n\nimport { PeppolAmount } from '#/schemas/fields/peppol-amount-schema.ts';\nimport { PeppolIdentifier } from '#/schemas/fields/peppol-identifier-schema.ts';\nimport { PeppolInvoiceLinePeriod } from '#/schemas/fields/peppol-invoice-line-period-schema.ts';\nimport { PeppolLineAllowanceCharge } from '#/schemas/fields/peppol-line-allowance-charge-schema.ts';\nimport { PeppolLineItem } from '#/schemas/fields/peppol-line-item-schema.ts';\nimport { PeppolLinePrice } from '#/schemas/fields/peppol-line-price-schema.ts';\nimport { opaque } from '#/schemas/utils/opaque.ts';\n\n/**\n * @description A reference to the order line that the Invoice line fulfils. Wraps the `cac:OrderLineReference` element and its `cbc:LineID`.\n *\n * @example\n * ```ts\n * { lineId: '123' }\n * ```;\n *\n * @see {@link PeppolBaseLine}\n */\nexport class PeppolOrderLineReference extends opaque<PeppolOrderLineReference>()(Schema.Struct({ lineId: Schema.String })) {}\n\n/**\n * @description Base of the invoice line and credit note line schemas.\n */\nexport class PeppolBaseLine extends opaque<PeppolBaseLine>()(\n Schema.Struct({\n /**\n * @description A textual value that specifies where to book the relevant data into the Buyer's financial accounts.\n *\n * @example\n * `1287:65464`;\n *\n * @summary Invoice line Buyer accounting reference\n *\n * @name cbc:AccountingCost\n *\n * @cardinality 0..1\n */\n accountingCost: Schema.optional(Schema.String),\n /**\n * @description A group of business terms providing information about allowances or charges applicable to the individual Invoice line.\n *\n * @summary Invoice line allowances or charges\n *\n * @name cac:AllowanceCharge\n *\n * @cardinality 0..n\n */\n allowanceCharges: Schema.optional(Schema.Array(PeppolLineAllowanceCharge)),\n /**\n * @summary Line object identifier\n *\n * @name cac:DocumentReference\n *\n * @cardinality 0..1\n */\n documentReference: Schema.optional(\n Schema.Array(\n PeppolIdentifier.pipe(\n Schema.fieldsAssign({\n /**\n * @default 130\n *\n * @name cbc:DocumentTypeCode\n */\n documentTypeCode: Schema.String.pipe(Schema.withDecodingDefaultType(Effect.succeed('130'))),\n })\n )\n )\n ),\n /**\n * @description A unique identifier for the individual line within the Invoice.\n *\n * @example\n * 12;\n *\n * @summary Invoice line identifier\n *\n * @name cbc:ID\n *\n * @cardinality 1..1\n */\n id: Schema.String,\n /**\n * @description A group of business terms providing information about the period relevant for the Invoice line.\n *\n * @summary Invoice line period\n *\n * @name cac:InvoicePeriod\n *\n * @cardinality 0..1\n */\n invoicePeriod: Schema.optional(PeppolInvoiceLinePeriod),\n /**\n * @description A group of business terms providing information about the goods and services invoiced.\n *\n * @summary Item information\n *\n * @name cac:Item\n *\n * @cardinality 1..1\n */\n item: PeppolLineItem,\n /**\n * @description The total amount of the Invoice line. The amount is “net” without VAT, i.e. inclusive of line level allowances and charges as well as other\n * relevant taxes. Must be rounded to maximum 2 decimals.\n *\n * @example\n * { value: 2145.0, currencyId: \"EUR\" }\n *\n * @summary Invoice line net amount\n *\n * @name cbc:LineExtensionAmount (+ @currencyID)\n *\n * @cardinality 1..1\n */\n lineExtensionAmount: PeppolAmount,\n /**\n * @description A textual note that gives unstructured information that is relevant to the Invoice line.\n *\n * @example\n * New article number 12345\n *\n * @summary Invoice line note\n *\n * @name cbc:Note\n *\n * @cardinality 0..1\n */\n note: Schema.optional(Schema.String),\n /**\n * @summary Order line reference\n *\n * @name cac:OrderLineReference\n *\n * @cardinality 0..1\n */\n orderLineReference: Schema.optional(PeppolOrderLineReference),\n /**\n * @description A group of business terms providing information about the price applied for the goods and services invoices on the Invoice line.\n *\n * @summary Price Details\n *\n * @name cac:Price\n *\n * @cardinality 1..1\n */\n price: PeppolLinePrice,\n })\n) {}\n","import { Schema } from 'effect';\n\nimport { PeppolBaseLine } from '#/schemas/fields/peppol-base-line-schema.ts';\nimport { PeppolQuantity } from '#/schemas/fields/peppol-quantity-schema.ts';\nimport { opaque } from '#/schemas/utils/opaque.ts';\nimport { PeppolQuantityUnitCode } from '#/schemas/values/quantity-unit-codes-schema.ts';\n\n/**\n * @description A line of the Invoice, extending the common line fields with the invoiced quantity. Wraps the `cac:InvoiceLine` element.\n *\n * @summary Invoice line\n *\n * @name cac:InvoiceLine\n */\nexport class PeppolInvoiceLine extends opaque<PeppolInvoiceLine>()(\n Schema.Struct({\n ...PeppolBaseLine.fields,\n /**\n * @description The quantity of items (goods or services) that is charged in the Invoice line.\n *\n * @example\n * { value: 100, unitCode: \"C62\" }\n *\n * @summary Invoiced quantity\n *\n * @name cbc:InvoicedQuantity (+ @unitCode)\n */\n invoicedQuantity: PeppolQuantity.pipe(\n Schema.fieldsAssign({\n /**\n * @description The unit of measure that applies to the invoiced quantity. Codes for unit of packaging from UNECE Recommendation No. 21 can be used in\n * accordance with the descriptions in the \"Intro\" section of UN/ECE Recommendation 20, Revision 11 (2015): The 2 character alphanumeric code\n * values in UNECE Recommendation 21 shall be used. To avoid duplication with existing code values in UNECE Recommendation No. 20, each code\n * value from UNECE Recommendation 21 shall be prefixed with an “X”, resulting in a 3 alphanumeric code when used as a unit of measure.\n *\n * @example\n * `C62`;\n *\n * @summary Invoiced quantity unit of measure\n *\n * @see {@link quantityUnitCodes}\n */\n unitCode: PeppolQuantityUnitCode,\n })\n ),\n })\n) {}\n/**\n * @description Encoded form of {@link PeppolInvoiceLine} produced by the Effect Schema codec. Fields mirror the decoded structure.\n *\n * @see {@link PeppolInvoiceLine}\n */\nexport interface PeppolInvoiceLineEncoded extends Schema.Codec.Encoded<typeof PeppolInvoiceLine> {}\n","import { Schema } from 'effect';\n\nimport { opaque } from '#/schemas/utils/opaque.ts';\nimport { invoiceTypeCodesKeys } from '#/values/invoice-type-codes.generated';\n\n/**\n * @description An invoice type code from the PEPPOL subset of UNCL 1001.\n *\n * @example\n * ```ts\n * '71';\n * ```;\n *\n * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/UNCL1001-inv/\n * @see {@link invoiceTypeCodesKeys}\n */\nexport class PeppolInvoiceTypeCode extends opaque<PeppolInvoiceTypeCode>()(\n Schema.Literals(invoiceTypeCodesKeys).pipe(Schema.brand('PeppolInvoiceTypeCode'))\n) {}\n","import { Schema } from 'effect';\n\nimport { PeppolInvoiceLine } from '#/schemas/fields/peppol-invoice-line-schema.ts';\nimport { PeppolBillingBase } from '#/schemas/peppol-billing-base-schema.ts';\nimport { PeppolIsoDateString } from '#/schemas/peppol-iso-date-string.ts';\nimport { opaque } from '#/schemas/utils/opaque.ts';\nimport { PeppolInvoiceTypeCode } from '#/schemas/values/invoice-type-code-schema.ts';\n\n/**\n * @description Wraps the `cac:ProjectReference` element on an invoice: an identifier of the project the invoice relates to.\n *\n * @example\n * ```ts\n * { id: 'project-123' }\n * ```;\n *\n * @see {@link PeppolInvoice}\n */\nexport class PeppolProjectReference extends opaque<PeppolProjectReference>()(Schema.Struct({ id: Schema.String })) {}\n\n/**\n * @description UBL `Invoice` for PEPPOL BIS Billing 3.0. Extends {@link PeppolBillingBase} with the due date, type code, lines and project reference.\n *\n * @example\n * ```ts\n * {\n * customizationId: 'urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0',\n * profileId: 'urn:fdc:peppol.eu:2017:poacc:billing:01:1.0',\n * id: '33445566',\n * issueDate: '2017-11-01',\n * documentCurrencyCode: 'EUR',\n * invoiceTypeCode: '380'\n * }\n * ```;\n *\n * @see {@link PeppolBillingBase}\n * @see {@link PeppolCreditNote}\n */\nexport class PeppolInvoice extends opaque<PeppolInvoice>()(\n Schema.Struct({\n ...PeppolBillingBase.fields,\n /**\n * @example\n * `2017-11-01`;\n *\n * @summary Payment due date\n *\n * @name cbc:DueDate\n */\n dueDate: Schema.optional(PeppolIsoDateString),\n /**\n * @summary INVOICE LINE\n *\n * @name cac:InvoiceLine\n */\n invoiceLines: Schema.Array(PeppolInvoiceLine).check(Schema.isMinLength(1)),\n /**\n * @example\n * `380`;\n *\n * @summary Invoice type code\n *\n * @name cbc:InvoiceTypeCode\n */\n invoiceTypeCode: PeppolInvoiceTypeCode,\n /**\n * @summary PROJECT REFERENCE\n *\n * @name cac:ProjectReference\n */\n projectReference: Schema.optional(PeppolProjectReference),\n })\n) {}\n","import { Schema } from 'effect';\n\nimport { PeppolBaseLine } from '#/schemas/fields/peppol-base-line-schema.ts';\nimport { PeppolQuantity } from '#/schemas/fields/peppol-quantity-schema.ts';\nimport { opaque } from '#/schemas/utils/opaque.ts';\nimport { PeppolQuantityUnitCode } from '#/schemas/values/quantity-unit-codes-schema.ts';\n\n/**\n * @description Credit note line is identical to Invoice line except the quantity element name.\n */\nexport class PeppolCreditNoteLine extends opaque<PeppolCreditNoteLine>()(\n PeppolBaseLine.pipe(\n Schema.fieldsAssign({\n /**\n * @description Invoiced/Credited quantity.\n *\n * @example\n * { value: 40, unitCode: \"C62\" }\n *\n * @name cbc:CreditedQuantity (+ @unitCode)\n */\n creditedQuantity: PeppolQuantity.pipe(\n Schema.fieldsAssign({\n /**\n * @description The unit of measure that applies to the invoiced quantity. Codes for unit of packaging from UNECE Recommendation No. 21 can be used in\n * accordance with the descriptions in the \"Intro\" section of UN/ECE Recommendation 20, Revision 11 (2015): The 2 character alphanumeric\n * code values in UNECE Recommendation 21 shall be used. To avoid duplication with existing code values in UNECE Recommendation No. 20, each\n * code value from UNECE Recommendation 21 shall be prefixed with an “X”, resulting in a 3 alphanumeric code when used as a unit of\n * measure.\n *\n * @example\n * `C62`;\n *\n * @summary Invoiced quantity unit of measure\n *\n * @see {@link quantityUnitCodes}\n */\n unitCode: PeppolQuantityUnitCode,\n })\n ),\n })\n )\n) {}\n/**\n * @description Encoded form of {@link PeppolCreditNoteLine} produced by the Effect Schema codec. Fields mirror the decoded structure.\n *\n * @see {@link PeppolCreditNoteLine}\n */\nexport interface PeppolCreditNoteLineEncoded extends Schema.Codec.Encoded<typeof PeppolCreditNoteLine> {}\n","import { Schema } from 'effect';\n\nimport { opaque } from '#/schemas/utils/opaque.ts';\nimport { creditNoteTypeCodesKeys } from '#/values/credit-notes-type-codes.generated';\n\n/**\n * @description A credit note type code from the PEPPOL subset of UNCL 1001 (credit note).\n *\n * @example\n * ```ts\n * '81';\n * ```;\n *\n * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/UNCL1001-cn/\n * @see {@link creditNoteTypeCodesKeys}\n */\nexport class PeppolCreditNoteTypeCode extends opaque<PeppolCreditNoteTypeCode>()(Schema.Literals(creditNoteTypeCodesKeys)) {}\n","import { Schema } from 'effect';\n\nimport { PeppolCreditNoteLine } from '#/schemas/fields/peppol-credit-note-line-schema.ts';\nimport { PeppolBillingBase } from '#/schemas/peppol-billing-base-schema.ts';\nimport { opaque } from '#/schemas/utils/opaque.ts';\nimport { PeppolCreditNoteTypeCode } from '#/schemas/values/credit-note-type-code-schema.ts';\n\n/**\n * @description Main UBL Credit Note schema (camelCase properties) Effect port of `creditNoteSchema` (`z.extend(billingBaseSchema, ...)` →\n * `PeppolBillingBase.pipe(Schema.fieldsAssign(...))`).\n */\nexport class PeppolCreditNote extends opaque<PeppolCreditNote>()(\n Schema.Struct({\n ...PeppolBillingBase.fields,\n /**\n * @description CREDIT NOTE LINE.\n *\n * @name cac:CreditNoteLine (1..n)\n */\n creditNoteLines: Schema.Array(PeppolCreditNoteLine).check(Schema.isMinLength(1)),\n /**\n * @description Invoice type code A code specifying the functional type of the Credit Note.\n *\n * @example\n * 381;\n *\n * @name cbc:CreditNoteTypeCode\n */\n creditNoteTypeCode: PeppolCreditNoteTypeCode,\n })\n) {}\n","import { Schema } from 'effect';\n\nimport { PeppolIdentifier } from '#/schemas/fields/peppol-identifier-schema.ts';\nimport { opaque } from '#/schemas/utils/opaque.ts';\n\n/**\n * @description Party used as `cac:SenderParty` or `cac:ReceiverParty` on a message level response, holding the party's electronic address.\n *\n * @example\n * ```ts\n * { endpointId: { id: '7300010000001', schemeId: '0088' } }\n * ```;\n *\n * @see {@link PeppolMessageLevelResponse}\n */\nexport class PeppolMessageLevelResponseParty extends opaque<PeppolMessageLevelResponseParty>()(\n Schema.Struct({\n /**\n * @description Identifies the sender party's electronic address.\n *\n * @example\n * 7300010000001;\n *\n * @summary Sender/Receiver party's electronic address\n *\n * @name `cbc:EndpointID (+ @schemeID)`\n */\n endpointId: Schema.optional(PeppolIdentifier),\n })\n) {}\n","import { Schema } from 'effect';\n\nimport { opaque } from '#/schemas/utils/opaque.ts';\nimport { documentTypeCodesKeys } from '#/values/document-type-codes.generated';\n\n/**\n * @description A document type code from the PEPPOL subset of UNCL 1001.\n *\n * @example\n * ```ts\n * '1';\n * ```;\n *\n * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/UNCL1001/\n * @see {@link documentTypeCodesKeys}\n */\nexport class PeppolDocumentTypeCode extends opaque<PeppolDocumentTypeCode>()(\n Schema.Literals(documentTypeCodesKeys).pipe(Schema.brand('PeppolDocumentTypeCode'))\n) {}\n","import { Schema } from 'effect';\n\nimport { opaque } from '#/schemas/utils/opaque.ts';\nimport { PeppolDocumentTypeCode } from '#/schemas/values/peppol-document-type-code-schema.ts';\n\n/**\n * @description Wraps `cac:DocumentReference` inside a message level response: identifies the business document the response is based on.\n *\n * @example\n * ```ts\n * { id: 'EnvelopeID-12345', versionId: '2' }\n * ```;\n *\n * @see {@link PeppolMessageLevelResponseDocumentResponse}\n */\nexport class PeppolDocumentResponseDocumentReference extends opaque<PeppolDocumentResponseDocumentReference>()(\n Schema.Struct({\n /**\n * @description Identifies the document on which the message level response is based.\n *\n * @example\n * `EnvelopeID-12345`;\n *\n * @summary Document identifier\n *\n * @name `cbc:ID`\n */\n id: Schema.String,\n /**\n * @description The type of the document being referred to, expressed as a code.\n *\n * @summary Document type code\n *\n * @name `cbc:DocumentTypeCode`\n */\n documentTypeCode: Schema.optional(PeppolDocumentTypeCode),\n /**\n * @description The version of the document that has been identifier with the document identifier.\n *\n * @example\n * `2`;\n *\n * @summary Document version identifier\n *\n * @name `cbc:VersionID`\n */\n versionId: Schema.optional(Schema.String),\n })\n) {}\n\n/**\n * @description Alias of {@link PeppolDocumentResponseDocumentReference} under the message level response naming.\n */\nexport type PeppolMessageLevelDocumentResponseDocumentReference = PeppolDocumentResponseDocumentReference;\n","import { Schema } from 'effect';\n\nimport { opaque } from '#/schemas/utils/opaque.ts';\nimport { applicationResponseTypeCodesKeys } from '#/values/application-response-type-codes.generated';\n\n/**\n * @description An application response type code from the PEPPOL subset of UNCL 4343.\n *\n * @example\n * ```ts\n * 'AB';\n * ```;\n *\n * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/UNCL4343/\n * @see {@link applicationResponseTypeCodesKeys}\n */\nexport class PeppolApplicationResponseTypeCode extends opaque<PeppolApplicationResponseTypeCode>()(\n Schema.Literals(applicationResponseTypeCodesKeys)\n) {}\n","import { Schema } from 'effect';\n\nimport { opaque } from '#/schemas/utils/opaque.ts';\nimport { PeppolApplicationResponseTypeCode } from '#/schemas/values/application-response-type-code-schema.ts';\n\n/**\n * @description Wraps `cac:Response` inside a message level response: the overall response code and an optional textual note.\n *\n * @summary Response information\n *\n * @name `cac:Response`\n *\n * @cardinality (1..1)\n *\n * @see {@link PeppolMessageLevelResponseDocumentResponse}\n */\nexport class PeppolDocumentResponseDocument extends opaque<PeppolDocumentResponseDocument>()(\n Schema.Struct({\n /**\n * @description An indicator stating whether the referenced message was cleared through validation and advanced to the next step in the process. A negative\n * response states that the document was not processed because of identified issues.\n *\n * @example\n * `RE`;\n *\n * @summary Message response code\n *\n * @name `cbc:ResponseCode`\n */\n responseCode: PeppolApplicationResponseTypeCode,\n /**\n * @description Used to meake any comments or instructions relevant to the response. The use of this element requires manual assessment by the receiver.\n *\n * @summary Response textual notes\n */\n description: Schema.optional(Schema.String),\n })\n) {}\n\n/**\n * @description Alias of {@link PeppolDocumentResponseDocument} under the message level response naming.\n */\nexport type PeppolMessageLevelResponseDocumentResponseDocument = PeppolDocumentResponseDocument;\n","import { Schema } from 'effect';\n\nimport { opaque } from '#/schemas/utils/opaque.ts';\nimport { PeppolApplicationResponseTypeCode } from '#/schemas/values/application-response-type-code-schema.ts';\n\n/**\n * @description Wraps `cac:Status` inside a line response: the coded reason for an issue found in the document.\n *\n * @example\n * ```ts\n * { statusReasonCode: 'SV' }\n * ```;\n *\n * @see {@link PeppolDocumentResponseLineResponseContent}\n */\nexport class PeppolStatus extends opaque<PeppolStatus>()(\n Schema.Struct({\n /**\n * @description A codified version of the issue description that describes the nature of the issue. e.g. Syntax violation, business rule violation, ...\n *\n * @summary Issue type coded\n *\n * @name `cbc:StatusReasonCode`\n */\n statusReasonCode: Schema.Literals(['BV', 'BW', 'SV']),\n })\n) {}\n\n/**\n * @description A response to a particular line in the business document: the line response code, a description of the issue and its coded status.\n *\n * @example\n * ```ts\n * { responseCode: 'RE', description: 'Validation gives error [CL-T77-R0002]', status: { statusReasonCode: 'SV' } }\n * ```;\n *\n * @see {@link PeppolDocumentResponseLineResponse}\n */\nexport class PeppolDocumentResponseLineResponseContent extends opaque<PeppolDocumentResponseLineResponseContent>()(\n Schema.Struct({\n /**\n * @description An indicator stating whether the referenced message was cleared through validation and advanced to the next step in the process. A negative\n * response states that the document was not processed because of identified issues.\n *\n * @example\n * `RE`;\n *\n * @summary Line response code\n *\n * @name `cbc:ResponseCode`\n */\n responseCode: PeppolApplicationResponseTypeCode,\n /**\n * @description The description of the issued identifier in the transaction document.\n *\n * @example\n * `Validation gives error [CL-T77-R0002]- Tax categories MUST be coded using UN/ECE 5305 code list`;\n *\n * @summary Issue description\n *\n * @name `cbc:Description`\n */\n description: Schema.String,\n /**\n * @name `cac:Status`\n */\n status: PeppolStatus,\n })\n) {}\n","import { Schema } from 'effect';\n\nimport { PeppolDocumentResponseLineResponseContent } from '#/schemas/peppol-document-response-line-response-content-schema.ts';\nimport { opaque } from '#/schemas/utils/opaque.ts';\n\n/**\n * @description Wraps `cac:LineReference` inside a line response: an XPath pointing at the element that caused the reported issue.\n *\n * @example\n * ```ts\n * { lineId: '/Invoice/cac:InvoiceLine[1]' }\n * ```;\n *\n * @see {@link PeppolDocumentResponseLineResponse}\n */\nexport class PeppolLineReference extends opaque<PeppolLineReference>()(\n Schema.Struct({\n /**\n * @description Identifies the section of the document to which the reported issue applied. The LineID element mustbe used to indicate where in the business\n * document the error occurred by using XPath to reference the element causing the error. To cater for scenarios where it is not possible to\n * provide XPath, a dummy value must be applied. The dummay value must consist of the characters NA. This is due to that the LineID element is\n * mendatory in the ApplicationResponse message in UBL 2.1 on which the MLR message is based.\n *\n * @example\n * `/Catalogue/cac:CatalogueLine[3]/cac:Item[1]/cac:ClassifiedTaxCategory[1]/cbc:ID[1]`;\n *\n * @summary Section identifier\n */\n lineId: Schema.String,\n })\n) {}\n\n/**\n * @description Wraps `cac:LineResponse` inside a message level response: pairs a line reference with the response for that line.\n *\n * @example\n * ```ts\n * {\n * lineReference: { lineId: '/Invoice/cac:InvoiceLine[1]' },\n * response: { responseCode: 'RE', description: 'Invalid tax category', status: { statusReasonCode: 'SV' } }\n * }\n * ```;\n *\n * @see {@link PeppolMessageLevelResponseDocumentResponse}\n */\nexport class PeppolDocumentResponseLineResponse extends opaque<PeppolDocumentResponseLineResponse>()(\n Schema.Struct({\n /**\n * @description Identifies the line in the business document to which the reported issue applies.\n *\n * @summary Line reference\n *\n * @name `cac:LineReference`\n */\n lineReference: PeppolLineReference,\n /**\n * @summary Line response information\n */\n response: PeppolDocumentResponseLineResponseContent,\n })\n) {}\n\n/**\n * @description Alias of {@link PeppolDocumentResponseLineResponse} under the message level response naming.\n */\nexport type PeppolMessageLevelDocumentResponseLineResponse = PeppolDocumentResponseLineResponse;\n","import { Schema } from 'effect';\n\nimport { PeppolDocumentResponseDocumentReference } from '#/schemas/peppol-document-response-document-reference-schema.ts';\nimport { PeppolDocumentResponseDocument } from '#/schemas/peppol-document-response-document-schema.ts';\nimport { PeppolDocumentResponseLineResponse } from '#/schemas/peppol-document-response-line-response-schema.ts';\nimport { opaque } from '#/schemas/utils/opaque.ts';\n\n/**\n * @description Wraps `cac:DocumentResponse` inside a message level response: the response, the document reference and any per-line responses.\n *\n * @example\n * ```ts\n * { response: { responseCode: 'RE' }, documentReference: { id: 'EnvelopeID-12345' }, lineResponse: [] }\n * ```;\n *\n * @see {@link PeppolMessageLevelResponse}\n */\nexport class PeppolMessageLevelResponseDocumentResponse extends opaque<PeppolMessageLevelResponseDocumentResponse>()(\n Schema.Struct({\n /**\n * @summary Response information\n *\n * @name `cac:Response`\n *\n * @cardinality (1..1)\n */\n response: PeppolDocumentResponseDocument,\n /**\n * @description The document reference is used to provide a reference to the envelope of the business document on which the message level response is based.\n * The message level response message may only cover exactly one business document. The element\n * `cac:DocumentResponse/cac:DocumentReference/cbc:ID` **MUST** contain the instance identifier of the envelope of the original business\n * document.\n *\n * @summary Document reference\n */\n documentReference: PeppolDocumentResponseDocumentReference,\n /**\n * @description A response to a particular line in the document. If the document response is negative (code='RE'), the line response element is used to specify\n * the errors in the business document.\n *\n * @summary Line response information\n */\n lineResponse: Schema.Array(PeppolDocumentResponseLineResponse),\n })\n) {}\n","import { DateTime } from 'effect';\n\n/**\n * @description Pads a number with leading zeros, preserving a leading `-` for negative values. Extracted from date-fns\n * `pkgs/core/src/_lib/addLeadingZeros/index.ts`.\n *\n * @param value - The number to pad.\n * @param targetLength - The total length the output should have.\n *\n * @returns The zero-padded string.\n */\nconst addLeadingZeros = (value: number, targetLength: number): string => {\n const sign = value < 0 ? '-' : '';\n return sign + Math.abs(value).toString().padStart(targetLength, '0');\n};\n\n/**\n * @description The `HH`, `mm` and `ss` tokens extracted from the date-fns `lightFormatters` (`pkgs/core/src/_lib/format/lightFormatters/index.ts`). The date-fns\n * implementation reads the local components of a `Date`; this port reads the UTC components because the caller hands it a `Date` whose UTC fields\n * already hold the wall-clock time of the target time zone.\n *\n * @param date - A `Date` whose UTC fields hold the wall-clock time to format.\n *\n * @returns The zero-padded `HH` component.\n */\nconst formatHours = (date: Date): string => addLeadingZeros(date.getUTCHours(), 2);\n\n/**\n * @description See {@link formatHours}. Formats the `mm` token.\n *\n * @param date - A `Date` whose UTC fields hold the wall-clock time to format.\n *\n * @returns The zero-padded `mm` component.\n */\nconst formatMinutes = (date: Date): string => addLeadingZeros(date.getUTCMinutes(), 2);\n\n/**\n * @description See {@link formatHours}. Formats the `ss` token. Fractional seconds are dropped because XSD `time` values produced by this library carry second\n * precision.\n *\n * @param date - A `Date` whose UTC fields hold the wall-clock time to format.\n *\n * @returns The zero-padded `ss` component.\n */\nconst formatSeconds = (date: Date): string => addLeadingZeros(date.getUTCSeconds(), 2);\n\n/**\n * @description Formats a UTC offset as the ISO-8601 `XXX` token (`+HH:MM` / `-HH:MM`). The digit handling is extracted from date-fns `formatTimezone`\n * (`pkgs/core/src/_lib/format/formatters/index.ts`) with two deliberate differences:\n *\n * 1. The offset is expressed in the standard direction (positive means east of UTC) instead of JavaScript's inverted `Date#getTimezoneOffset` sign.\n * 2. A zero offset returns an empty string. date-fns renders it as `Z`; XSD `time` wants the time zone to be optional, so UTC produces no offset at all.\n *\n * @param offsetInMinutes - The offset east of UTC in minutes (for example `+05:30` is `330`).\n *\n * @returns The formatted offset, or an empty string for UTC.\n */\nexport const formatTimeZoneOffset = (offsetInMinutes: number): string => {\n if (offsetInMinutes === 0) return '';\n const sign = offsetInMinutes > 0 ? '+' : '-';\n const absoluteOffset = Math.abs(offsetInMinutes);\n const hours = addLeadingZeros(Math.trunc(absoluteOffset / 60), 2);\n const minutes = addLeadingZeros(absoluteOffset % 60, 2);\n return `${sign}${hours}:${minutes}`;\n};\n\n/**\n * @description Formats a `DateTime` as an XSD `time` lexical value: `HH:mm:ss` followed by an optional `±HH:MM` offset. The offset is omitted for UTC, so a UTC\n * value encodes as bare `HH:mm:ss` while a zoned value encodes as `HH:mm:ss±HH:MM`. Fractional seconds are intentionally dropped to match the second\n * precision the schema round-trips.\n *\n * @param date - The `DateTime` to format. It is rendered in its own time zone, not normalised to UTC.\n *\n * @returns The XSD `time` string.\n */\nexport const formatXsdTime = (date: DateTime.DateTime): string => {\n const wallClock = DateTime.toDate(date);\n const offsetInMinutes = (wallClock.getTime() - DateTime.toEpochMillis(date)) / (60 * 1000);\n return `${formatHours(wallClock)}:${formatMinutes(wallClock)}:${formatSeconds(wallClock)}${formatTimeZoneOffset(offsetInMinutes)}`;\n};\n","import { Clock, Option, DateTime, Effect, Predicate, Schema, SchemaGetter, SchemaIssue } from 'effect';\n\nimport { formatXsdTime } from '#/schemas/utils/format-xsd-time.ts';\nimport { opaque } from '#/schemas/utils/opaque.ts';\n\nconst timeRegex =\n /^(?<hours>[01]\\d|2[0-3]):(?<minutes>[0-5]\\d):(?<seconds>[0-5]\\d)(?<nanoseconds>\\.\\d{1,9})?(?<tz>(?:Z|-0[1-9]|-1\\d|-2[0-3]|-00:?(?:0[1-9]|[1-5]\\d)|\\+[01]\\d|\\+2[0-3])?(?:|:?[0-5]\\d))$/;\nconst timeZoneRegex = /^(?:(?<utc>Z)|[-+](?<hours>0[1-9]|1\\d|2[0-3]|00):?(?<minutes>[0-5]\\d))$/;\nconst numberFromString = (value: string | undefined): number => {\n if (value === undefined) {\n return 0;\n }\n const parsed = Number(value);\n return Number.isFinite(parsed) ? parsed : 0;\n};\n\n/**\n * @description Parse a timezone offset from a string. The string must be in the format `(+|-)HH:MM` where `HH` and `MM` are two digits.\n *\n * @example\n * ```ts\n * parseZoneOffsetFromString('+01:00'); // a +01:00 zone offset\n * ```;\n *\n * @param tz - The timezone offset string.\n *\n * @returns A `DateTime.Zone` offset built from the parsed hours and minutes, or `undefined` when `tz` does not match the offset pattern.\n *\n * @internal\n */\nexport const parseZoneOffsetFromString = (tz: `+${number}:${number}` | `-${number}:${number}` | (string & {})) => {\n const tzRegexResult = timeZoneRegex.exec(tz);\n if (Predicate.isNullish(tzRegexResult)) {\n return undefined;\n }\n const [_tzParsed, _isUtc, tzHours, tzMinutes] = tzRegexResult;\n const offset = DateTime.zoneMakeOffset((numberFromString(tzHours) * 60 + numberFromString(tzMinutes)) * 60 * 1000);\n return offset;\n};\n\n/**\n * @description XSD `time` lexical value (`HH:MM:SS` with optional fractional seconds and timezone). Effect port of `xsdTime` (`z.string().check(z.regex(...))`):\n * keeps the value as a plain string and only validates the shape.\n *\n * @example\n * ```ts\n * const value = '12:30:45+01:00';\n * ```;\n */\nexport class PeppolXsdTime extends opaque<PeppolXsdTime>()(\n Schema.String.check(\n Schema.isPattern(\n /^(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d{1,9})?(?:Z|-0[1-9]|-1\\d|-2[0-3]|-00:?(?:0[1-9]|[1-5]\\d)|\\+[01]\\d|\\+2[0-3])?(?:|:?[0-5]\\d)$/\n ).annotate({ message: 'Invalid ISO time' })\n )\n .pipe(\n Schema.decodeTo(Schema.DateTimeUtc, {\n decode: SchemaGetter.transformEffect((input, options) =>\n Clock.currentTimeMillis.pipe(\n Effect.map(millis => DateTime.make(millis)),\n Effect.flatMap(option => Effect.fromOption(option)),\n Effect.map(date =>\n DateTime.withDate(date, date => {\n const regexResult = timeRegex.exec(input);\n if (Predicate.isNullish(regexResult)) return Option.none();\n const [_time, hours, minutes, seconds, nanoseconds, tz] = regexResult;\n\n date.setUTCHours(numberFromString(hours), numberFromString(minutes), numberFromString(seconds), numberFromString(nanoseconds));\n if (Predicate.isUndefined(tz) || tz === 'Z') {\n return DateTime.make(date.getTime());\n }\n const offset = parseZoneOffsetFromString(tz);\n if (Predicate.isNullish(offset)) {\n return DateTime.make(date.getTime());\n }\n\n return DateTime.makeZoned(date.getTime(), { adjustForTimeZone: false, timeZone: offset }).pipe(\n Option.map(date => DateTime.toUtc(date))\n );\n })\n ),\n Effect.flatMap(option => Effect.fromOption(option)),\n Effect.catchTag('NoSuchElementError', () => Effect.fail(new SchemaIssue.InvalidValue({ message: 'Invalid date input' }, input, options)))\n )\n ),\n encode: SchemaGetter.transform(self => formatXsdTime(self)),\n })\n )\n .annotate({ message: 'Invalid ISO time' })\n) {}\n","import { Schema } from 'effect';\n\nimport { MESSAGE_LEVEL_RESPONSE_PROFILE_ID } from '#/constants/message-level-response-profile-id.ts';\nimport { PeppolIsoDateString } from '#/schemas/peppol-iso-date-string.ts';\nimport { PeppolMessageLevelResponseDocumentResponse } from '#/schemas/peppol-message-level-response-document-response-schema.ts';\nimport { PeppolMessageLevelResponseParty } from '#/schemas/peppol-message-level-response-party-schema.ts';\nimport { opaque } from '#/schemas/utils/opaque.ts';\nimport { PeppolXsdTime } from '#/schemas/utils/peppol-xsd-time-schema.ts';\n\n/**\n * @description UBL `ApplicationResponse` message level response for PEPPOL BIS Billing 3.0 (profile `urn:fdc:peppol.eu:poacc:bis:mlr:3`).\n *\n * @example\n * ```ts\n * {\n * customizationId: 'urn:fdc:peppol.eu:poacc:trns:mlr:3',\n * profileId: 'urn:fdc:peppol.eu:poacc:bis:mlr:3',\n * id: '23',\n * issueDate: '2017-11-01',\n * senderParty: {},\n * receiverParty: {},\n * documentResponse: { response: { responseCode: 'RE' }, documentReference: { id: 'EnvelopeID-12345' }, lineResponse: [] }\n * }\n * ```;\n *\n * @see {@link PeppolInvoiceResponse}\n */\nexport class PeppolMessageLevelResponse extends opaque<PeppolMessageLevelResponse>()(\n Schema.Struct({\n /**\n * @description Identifies the specification of content and rules that apply to the transaction.\n *\n * @default `urn:fdc:peppol.eu:poacc:trns:mlr:3`\n *\n * @summary Specification identification\n *\n * @name `cbc:CustomizationID`\n *\n * @cardinality 1..1\n */\n customizationId: Schema.String,\n /**\n * @description Identifies the BII profile or business process context in which the transaction appears.\n *\n * @remarks\n * Fixed value to `urn:fdc:peppol.eu:poacc:bis:mlr:3`\n *\n * @default `urn:fdc:peppol.eu:poacc:bis:mlr:3`\n *\n * @summary Business process type identifier\n *\n * @name `cbc:ProfileID`\n */\n profileId: Schema.Literal(MESSAGE_LEVEL_RESPONSE_PROFILE_ID),\n /**\n * @description A transaction instance must contain an identifier. The identifier enables positive referencing the transaction instance for various puropses\n * including referencing between transactions that are part of the same process.\n *\n * @example\n * 23;\n *\n * @summary Response identifier\n *\n * @name cbc:ID\n */\n id: Schema.String,\n /**\n * @description The date on which the transaction instance was issued.\n *\n * @example\n * 2017 - 11 - 01;\n *\n * @summary Response issue date\n *\n * @format `YYYY-MM-DD`\n *\n * @name cbc:IssueDate\n */\n issueDate: PeppolIsoDateString,\n /**\n * @description The time at which the transaction instance was issued.\n *\n * @example\n * 12:01:34\n *\n * @summary Response issue time\n *\n * @format `hh:mm:ss`\n *\n * @name cbc:IssueDate\n */\n issueTime: Schema.optional(PeppolXsdTime),\n /**\n * @description The party sending an electronic message level response message back to the sending party of the business document.\n *\n * @summary Sender information\n */\n senderParty: PeppolMessageLevelResponseParty,\n /**\n * @description The party, an electronic message level response was addressed to, and who is supposed to process the message level response. This is the same\n * party as the sender of the business document.\n *\n * @summary Receiver information\n */\n receiverParty: PeppolMessageLevelResponseParty,\n /**\n * @description The document response is used to indicate the result of business document validation. The element\n * `cac:DocumentResponse/cac:Response/cbc:ResponseCode` MUST contain the overall result code.\n *\n * @summary Document response\n *\n * @name `cac:DocumentResponse`\n */\n documentResponse: PeppolMessageLevelResponseDocumentResponse,\n })\n) {}\n","import { Schema } from 'effect';\n\nimport { opaque } from '#/schemas/utils/opaque.ts';\nimport { opStatusActionKeys } from '#/values/op-status-action.generated';\n\n/**\n * @description An OpenPeppol operation status action code from the OPStatusAction codelist.\n *\n * @example\n * ```ts\n * 'NOA';\n * ```;\n *\n * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/OPStatusAction/\n * @see {@link opStatusActionKeys}\n */\nexport class PeppolOpStatusAction extends opaque<PeppolOpStatusAction>()(\n Schema.Literals(opStatusActionKeys).pipe(Schema.brand('PeppolOpStatusAction'))\n) {}\n","import { Schema } from 'effect';\n\nimport { opaque } from '#/schemas/utils/opaque.ts';\nimport { opStatusReasonKeys } from '#/values/op-status-reason.generated';\n\n/**\n * @description An OpenPeppol operation status reason code from the OPStatusReason codelist.\n *\n * @example\n * ```ts\n * 'NON';\n * ```;\n *\n * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/OPStatusReason/\n * @see {@link opStatusReasonKeys}\n */\nexport class PeppolOpStatusReason extends opaque<PeppolOpStatusReason>()(\n Schema.Literals(opStatusReasonKeys).pipe(Schema.brand('PeppolOpStatusReason'))\n) {}\n","import { Schema } from 'effect';\n\nimport { opaque } from '#/schemas/utils/opaque.ts';\nimport { PeppolOpStatusAction } from '#/schemas/values/op-status-action-schema.ts';\nimport { PeppolOpStatusReason } from '#/schemas/values/op-status-reason-schema.ts';\n\n/**\n * @description Status clarification reason (`cbc:StatusReasonCode` with `@listId=\"OPStatusReason\"`), a value from the OPStatusReason code list.\n *\n * @example\n * ```ts\n * { value: 'REF', listId: 'OPStatusReason' }\n * ```;\n *\n * @see {@link PeppolInvoiceResponseStatusReasonCode}\n */\nexport class PeppolInvoiceResponseStatusReasonCodeReason extends opaque<PeppolInvoiceResponseStatusReasonCodeReason>()(\n Schema.Struct({\n value: PeppolOpStatusReason,\n /**\n * @description List identifier for clarification.\n *\n * @summary List identifier\n *\n * @name `@listId`\n */\n listId: Schema.Literal('OPStatusReason'),\n })\n) {}\n\n/**\n * @description Status clarification action (`cbc:StatusReasonCode` with `@listId=\"OPStatusAction\"`), a value from the OPStatusAction code list.\n *\n * @example\n * ```ts\n * { value: 'PIN', listId: 'OPStatusAction' }\n * ```;\n *\n * @see {@link PeppolInvoiceResponseStatusReasonCode}\n */\nexport class PeppolInvoiceResponseStatusReasonCodeAction extends opaque<PeppolInvoiceResponseStatusReasonCodeAction>()(\n Schema.Struct({\n value: PeppolOpStatusAction,\n /**\n * @description List identifier for clarification.\n *\n * @summary List identifier\n *\n * @name `@listId`\n */\n listId: Schema.Literal('OPStatusAction'),\n })\n) {}\n\n/**\n * @description Union of the accepted status clarification reasons and actions on an invoice response.\n *\n * @example\n * ```ts\n * { value: 'REF', listId: 'OPStatusReason' }\n * ```;\n *\n * @see {@link PeppolInvoiceResponseDocumentActualResponseStatus}\n */\nexport class PeppolInvoiceResponseStatusReasonCode extends opaque<PeppolInvoiceResponseStatusReasonCode>()(\n Schema.Union([PeppolInvoiceResponseStatusReasonCodeAction, PeppolInvoiceResponseStatusReasonCodeReason])\n) {}\n","import { Schema } from 'effect';\n\nimport { PeppolInvoiceResponseStatusReasonCode } from '#/schemas/peppol-invoice-response-status-reason-code-schema.ts';\nimport { opaque } from '#/schemas/utils/opaque.ts';\n\n/**\n * @description Wraps `cac:Condition` inside a status: a detail code and its optional value that further explains the clarification.\n *\n * @example\n * ```ts\n * { attributeId: 'BT-75', description: 'EU123456789' }\n * ```;\n *\n * @see {@link PeppolInvoiceResponseDocumentActualResponseStatus}\n */\nexport class PeppolInvoiceResponseCondition extends opaque<PeppolInvoiceResponseCondition>()(\n Schema.Struct({\n /**\n * @description A code defining the type of the detail.\n *\n * @example\n * `BT-75`;\n *\n * @summary Detail type code\n *\n * @name `cbc:AttributeId`\n */\n attributeId: Schema.String,\n /**\n * @description The value of the detail.\n *\n * @example\n * `EU123456789`;\n *\n * @summary Detail value\n *\n * @name `cbc:Description`\n */\n description: Schema.optional(Schema.String),\n })\n) {}\n\n/**\n * @description Wraps `cac:Status` inside an invoice response: an optional clarification code and description plus any condition details.\n *\n * @example\n * ```ts\n * { statusReasonCode: { value: 'REF', listId: 'OPStatusReason' }, statusReason: 'TAX reference not found' }\n * ```;\n *\n * @see {@link PeppolInvoiceResponseDocumentActualResponse}\n */\nexport class PeppolInvoiceResponseDocumentActualResponseStatus extends opaque<PeppolInvoiceResponseDocumentActualResponseStatus>()(\n Schema.Struct({\n /**\n * @description A code defining a clarification given for the invoice status.\n *\n * @summary Clarification code\n *\n * @name `cbc:StatusReasonCode`\n */\n statusReasonCode: Schema.optional(PeppolInvoiceResponseStatusReasonCode),\n /**\n * @description The description of the clarification given for the invoice status.\n *\n * @example\n * `TAX reference not found`;\n *\n * @summary Clarification description\n *\n * @name `cbc:StatusReason\n */\n statusReason: Schema.optional(Schema.String),\n /**\n * @summary Condition\n *\n * @name `cac:Condition`\n */\n condition: Schema.optional(Schema.Array(PeppolInvoiceResponseCondition)),\n })\n) {}\n\n/**\n * @description Alias of {@link PeppolInvoiceResponseDocumentActualResponseStatus}.\n */\nexport type InvoiceResponseDocumentActualResponseStatus = PeppolInvoiceResponseDocumentActualResponseStatus;\n","import { Schema } from 'effect';\n\nimport { invoiceResponseCodeNeedsSchema } from '#/invoice-response-codes/invoice-response-code-needs-schema.ts';\nimport { invoiceResponseCodeNotNeedsSchema } from '#/invoice-response-codes/invoice-response-code-not-needs-schema.ts';\nimport { PeppolInvoiceResponseDocumentActualResponseStatus } from '#/schemas/peppol-invoice-response-document-actual-response-status-schema.ts';\nimport { PeppolIsoDateString } from '#/schemas/peppol-iso-date-string.ts';\nimport { opaque } from '#/schemas/utils/opaque.ts';\n\n/**\n * @description Response codes that require a clarification in `cac:Status`: `UQ`, `RE` and `CA`.\n *\n * @example\n * ```ts\n * withStatusCodes; // Schema.Literals(['UQ', 'RE', 'CA'])\n * ```;\n *\n * @see {@link PeppolInvoiceResponseDocumentActualResponseWithStatus}\n */\nexport const withStatusCodes = Schema.Literals(invoiceResponseCodeNeedsSchema);\n\n/**\n * @description Response codes that do not require a clarification in `cac:Status`: `AB`, `AP`, `IP` and `PD`.\n *\n * @example\n * ```ts\n * withoutStatusCodes; // Schema.Literals(['AB', 'AP', 'IP', 'PD'])\n * ```;\n *\n * @see {@link PeppolInvoiceResponseDocumentActualResponseWithoutStatus}\n */\nexport const withoutStatusCodes = Schema.Literals(invoiceResponseCodeNotNeedsSchema);\n\n/**\n * @description Invoice response for statuses that do not require a clarification; the `cac:Status` group is optional.\n *\n * @example\n * ```ts\n * { responseCode: 'AP', effectiveDate: '2018-08-02' }\n * ```;\n *\n * @see {@link PeppolInvoiceResponseDocumentActualResponse}\n */\nexport class PeppolInvoiceResponseDocumentActualResponseWithoutStatus extends opaque<PeppolInvoiceResponseDocumentActualResponseWithoutStatus>()(\n Schema.Struct({\n /**\n * @summary A code stating the status of the invoice in the process.\n *\n * @name `cbc:ResponseCode`\n */\n responseCode: withoutStatusCodes,\n /**\n * @description The date when the status became effective.\n *\n * @example\n * `2018-08-02`;\n *\n * @summary Status date\n *\n * @name `cbc:EffectiveDate`\n */\n effectiveDate: Schema.optional(PeppolIsoDateString),\n /**\n * @description Clarification is mendatory when the status is UQ-`under query`,RE-`rejected` and `CA`-Conditionally accepted. Clarification may be given as a\n * code, a description or both. If both are used, they must indicate the same clarification.\n *\n * @summary Clarification information\n *\n * @name `cac:Status`\n */\n status: Schema.optional(Schema.Array(PeppolInvoiceResponseDocumentActualResponseStatus)),\n })\n) {}\n\n/**\n * @description Invoice response for statuses that require a clarification; at least one `cac:Status` group is mandatory.\n *\n * @example\n * ```ts\n * { responseCode: 'RE', status: [{ statusReason: 'TAX reference not found' }] }\n * ```;\n *\n * @see {@link PeppolInvoiceResponseDocumentActualResponse}\n */\nexport class PeppolInvoiceResponseDocumentActualResponseWithStatus extends opaque<PeppolInvoiceResponseDocumentActualResponseWithStatus>()(\n Schema.Struct({\n /**\n * @remarks\n * This is a rejection code that needs clarification in {@link status}\n *\n * @summary A code stating the status of the invoice in the process.\n *\n * @name `cbc:ResponseCode`\n */\n responseCode: withStatusCodes,\n /**\n * @description The date when the status became effective.\n *\n * @example\n * `2018-08-02`;\n *\n * @summary Status date\n *\n * @name `cbc:EffectiveDate`\n */\n effectiveDate: Schema.optional(PeppolIsoDateString),\n /**\n * @description Clarification is mendatory when the status is UQ-`under query`,RE-`rejected` and `CA`-Conditionally accepted. Clarification may be given as a\n * code, a description or both. If both are used, they must indicate the same clarification.\n *\n * @summary Clarification information\n *\n * @name `cac:Status`\n */\n status: Schema.Array(PeppolInvoiceResponseDocumentActualResponseStatus).check(Schema.isMinLength(1)),\n })\n) {}\n\n/**\n * @description Union of the invoice response variants selected by `cbc:ResponseCode`: one that requires a clarification and one that does not.\n *\n * @example\n * ```ts\n * { responseCode: 'AP', effectiveDate: '2018-08-02' }\n * ```;\n *\n * @see {@link PeppolInvoiceResponseDocumentResponse}\n */\nexport class PeppolInvoiceResponseDocumentActualResponse extends opaque<PeppolInvoiceResponseDocumentActualResponse>()(\n Schema.Union([PeppolInvoiceResponseDocumentActualResponseWithStatus, PeppolInvoiceResponseDocumentActualResponseWithoutStatus])\n) {}\n\n/**\n * @description Alias of {@link PeppolInvoiceResponseDocumentActualResponse}.\n */\nexport type InvoiceResponseDocumentActualResponse = PeppolInvoiceResponseDocumentActualResponse;\n","import { Schema, Struct } from 'effect';\n\nimport { INVOICE_RESPONSE_PROFILE_ID } from '#/constants/invoice-response-profile-id.ts';\nimport { PeppolContact } from '#/schemas/fields/peppol-contact-schema.ts';\nimport { PeppolIdentifier } from '#/schemas/fields/peppol-identifier-schema.ts';\nimport { PeppolPartyLegalEntity } from '#/schemas/fields/peppol-party-legal-entity-schema.ts';\nimport { PeppolInvoiceResponseDocumentActualResponse } from '#/schemas/peppol-invoice-response-document-actual-response-schema.ts';\nimport { PeppolIsoDateString } from '#/schemas/peppol-iso-date-string.ts';\nimport { PeppolMessageLevelResponseParty } from '#/schemas/peppol-message-level-response-party-schema.ts';\nimport { PeppolMessageLevelResponse } from '#/schemas/peppol-message-level-response-schema.ts';\nimport { opaque } from '#/schemas/utils/opaque.ts';\nimport { PeppolDocumentTypeCode } from '#/schemas/values/peppol-document-type-code-schema.ts';\n\n/**\n * @description Wraps `cac:PartyName` for the seller or buyer on an invoice response: the party's legal or trading name.\n *\n * @example\n * ```ts\n * { name: 'Seller Business Name AS' }\n * ```;\n *\n * @see {@link PeppolInvoiceResponseDocumentResponseParty}\n */\nexport class PeppolInvoiceResponseDocumentResponsePartyName extends opaque<PeppolInvoiceResponseDocumentResponsePartyName>()(\n Schema.Struct({\n /**\n * @description - The party that issued the reference invoice\n * - The party who the referenced invoice is issued.\n *\n * @summary Seller/Buyer party name\n *\n * @name `cbc:Name`\n */\n name: Schema.String,\n })\n) {}\n\n/**\n * @description Party used for the sender and receiver of an invoice response. Extends {@link PeppolMessageLevelResponseParty}.\n *\n * @example\n * ```ts\n * { partyLegalEntity: { registrationName: 'Seller Business Name AS' } }\n * ```;\n *\n * @see {@link PeppolInvoiceResponse}\n */\nexport class PeppolInvoiceResponseParty extends opaque<PeppolInvoiceResponseParty>()(\n PeppolMessageLevelResponseParty.pipe(\n Schema.fieldsAssign({\n /**\n * @summary Party partyIdentification\n */\n partyIdentification: Schema.optional(PeppolIdentifier),\n partyLegalEntity: PeppolPartyLegalEntity.mapFields(Struct.pick(['registrationName'])),\n })\n )\n) {}\n\n/**\n * @description Sender party of an invoice response. Extends {@link PeppolInvoiceResponseParty} with optional `cac:Contact` details.\n *\n * @example\n * ```ts\n * { partyLegalEntity: { registrationName: 'Seller Business Name AS' } }\n * ```;\n *\n * @see {@link PeppolInvoiceResponse}\n */\nexport class PeppolInvoiceResponseSenderParty extends opaque<PeppolInvoiceResponseSenderParty>()(\n PeppolInvoiceResponseParty.pipe(\n Schema.fieldsAssign({\n /**\n * @summary Contact information\n *\n * @name `cac:Contact`\n */\n contact: Schema.optional(PeppolContact),\n })\n )\n) {}\n\n/**\n * @description Party schema used under `cac:DocumentReference/(cac:IssuerParty|cac:RecipientParty)`\n */\nexport class PeppolInvoiceResponseDocumentResponseParty extends opaque<PeppolInvoiceResponseDocumentResponseParty>()(\n Schema.Struct({\n /**\n * @summary Party partyIdentification\n */\n partyIdentification: Schema.optional(PeppolIdentifier),\n /**\n * @example\n * Seller Business Name AS\n *\n * @name cac:PartyName\n */\n partyName: PeppolInvoiceResponseDocumentResponsePartyName,\n })\n) {}\n\n/**\n * @description Alias of {@link PeppolInvoiceResponseDocumentResponseParty}.\n */\nexport type PeppolInvoiceDocumentResponseParty = PeppolInvoiceResponseDocumentResponseParty;\n\n/**\n * @description Wraps `cac:DocumentReference` inside an invoice response: identifies the invoice the status applies to.\n *\n * @example\n * ```ts\n * { id: 'inv-99876', issueDate: '2018-08-01', documentTypeCode: '380' }\n * ```;\n *\n * @see {@link PeppolInvoiceResponseDocumentResponse}\n */\nexport class PeppolInvoiceResponseDocumentReference extends opaque<PeppolInvoiceResponseDocumentReference>()(\n Schema.Struct({\n /**\n * @description An identifier for the invoice that the status applies to. The invoice identifier must be of the main invoice number that appears in the invoice\n * itself.\n *\n * @example\n * `inv-99876`;\n *\n * @summary Invoice identifier\n *\n * @name `cbc:ID`\n */\n id: Schema.String,\n /**\n * @description The date on which the referenced invoice was issued.\n *\n * @example\n * `2018-08-01`;\n *\n * @summary Invoice issue date\n *\n * @name `cbc:IssueDate`\n */\n issueDate: Schema.optional(PeppolIsoDateString),\n /**\n * @example\n * `380`;\n *\n * @summary Identifier type code\n */\n documentTypeCode: PeppolDocumentTypeCode,\n })\n) {}\n\n/**\n * @description Wraps `cac:DocumentResponse` inside an invoice response: the response, the referenced invoice and optional parties.\n *\n * @example\n * ```ts\n * { response: { responseCode: 'AP', effectiveDate: '2018-08-02' }, documentReference: { id: 'inv-99876', documentTypeCode: '380' } }\n * ```;\n *\n * @see {@link PeppolInvoiceResponse}\n */\nexport class PeppolInvoiceResponseDocumentResponse extends opaque<PeppolInvoiceResponseDocumentResponse>()(\n Schema.Struct({\n /**\n * @summary Response information\n *\n * @name `cac:Response`\n *\n * @cardinality (1..1)\n */\n response: PeppolInvoiceResponseDocumentActualResponse,\n /**\n * @summary Document reference\n *\n * @name `cac:DocumentReference`\n */\n documentReference: PeppolInvoiceResponseDocumentReference,\n /**\n * @summary Seller party information\n *\n * @name `cac:IssuerParty`\n */\n issuerParty: Schema.optional(PeppolInvoiceResponseDocumentResponseParty),\n /**\n * @summary Buyer party information\n *\n * @name `cac:RecipientParty`\n */\n recipientParty: Schema.optional(PeppolInvoiceResponseDocumentResponseParty),\n })\n) {}\n\n/**\n * @description The invoice response is a descendant of the message level response with more fields. Effect port of `invoiceResponseSchema`\n * (`z.extend(messageLevelResponse, ...)` → `messageLevelResponse.pipe(Schema.fieldsAssign(...))`), overriding `profileId` with\n * `Schema.Literal(INVOICE_RESPONSE_PROFILE_ID)` plus sender/receiver/documentResponse.\n */\nexport class PeppolInvoiceResponse extends opaque<PeppolInvoiceResponse>()(\n Schema.Struct({\n ...PeppolMessageLevelResponse.fields,\n profileId: Schema.Literal(INVOICE_RESPONSE_PROFILE_ID),\n /**\n * @description The party sending an electronic message level response message back to the sending party of the business document.\n *\n * @summary Sender information\n */\n senderParty: PeppolInvoiceResponseSenderParty,\n /**\n * @description The party, an electronic message level response was addressed to, and who is supposed to process the message level response. This is the same\n * party as the sender of the business document.\n *\n * @summary Receiver information\n */\n receiverParty: PeppolInvoiceResponseParty,\n /**\n * @description General comments or instructions that are revelant to the response as a whole.\n *\n * @example\n * `Please refere to previous email exchange regarding this invoice.`;\n *\n * @summary Invoice response note\n */\n note: Schema.optional(Schema.String),\n /**\n * @summary Document response\n */\n documentResponse: PeppolInvoiceResponseDocumentResponse,\n })\n) {}\n","import { Effect, Predicate } from 'effect';\n\n// oxlint-disable-next-line typescript/no-explicit-any\nexport type XmlNode = any;\n\nexport const getProp = Effect.fn(function* (node: XmlNode, ...path: Array<string>): Effect.fn.Return<XmlNode> {\n if (!Predicate.isTruthy(node)) {\n return undefined;\n }\n if (path.length === 0) {\n return node;\n }\n let currentNode = node;\n for (const key of path) {\n const newNode = currentNode[key];\n if (Predicate.isNotNullish(newNode)) {\n currentNode = newNode;\n continue;\n }\n if (key.includes(':')) {\n const [, localKey] = key.split(':') as [string, string, ...Array<string>];\n currentNode = currentNode[localKey];\n if (Predicate.isNullish(currentNode)) {\n return undefined;\n }\n } else {\n return undefined;\n }\n }\n return currentNode;\n});\n","import { Effect, Predicate } from 'effect';\n\nimport type { XmlNode } from '#/helpers/get-prop.ts';\n\nimport { getProp } from '#/helpers/get-prop.ts';\n\nexport const strOrUnd = Effect.fn('str-or-und')(function* <const T extends string = string>(\n node: XmlNode,\n ...path: Array<string>\n): Effect.fn.Return<T | undefined> {\n const val = yield* getProp(node, ...path);\n if (Predicate.isNullish(val)) return undefined;\n if (!Predicate.isObject(val)) return (val as { toString(): T }).toString();\n const raw = val as XmlNode;\n if (Predicate.isUndefined(raw['#text'])) return undefined;\n return raw['#text'].toString();\n});\n","import { Effect, Predicate } from 'effect';\n\nimport type { XmlNode } from '#/helpers/get-prop.ts';\nimport type { PeppolIdentifier } from '#/schemas/fields/peppol-identifier-schema.ts';\nimport type { RecursivePartial } from '#/types.ts';\n\nimport { getProp } from '#/helpers/get-prop.ts';\nimport { strOrUnd } from '#/helpers/str-or-und.ts';\n\nexport interface Identifier<T extends PeppolIdentifier['schemeId'] = string> extends PeppolIdentifier {\n schemeId?: T;\n}\n\nexport const decodeIdentifier = Effect.fn(function* <const T extends PeppolIdentifier['schemeId'] = string>(\n node: XmlNode | undefined,\n ...path: Array<string>\n): Effect.fn.Return<RecursivePartial<Identifier<T>> | undefined> {\n const val = yield* getProp(node, ...path);\n if (!Predicate.isTruthy(val) && val !== 0) return undefined;\n const id = yield* strOrUnd(val);\n if ((Predicate.isString(val) || Predicate.isNumber(val)) && Predicate.isTruthy(id)) {\n return { id };\n }\n if (!Predicate.isTruthy(id)) return undefined;\n return {\n id,\n // @ts-expect-error I don't want to bother with the typecheck\n schemeId: yield* strOrUnd(val, '@schemeID'),\n };\n});\n","import { Effect, Predicate } from 'effect';\n\nimport type { XmlNode } from '#/helpers/get-prop.ts';\n\nimport { getProp } from '#/helpers/get-prop.ts';\n\nexport const getArray = Effect.fn(function* (node: XmlNode, ...path: Array<string>): Effect.fn.Return<Array<XmlNode>> {\n if (!Predicate.isTruthy(node)) return [];\n let currentNode = node;\n for (const key of path) {\n if (!Predicate.isTruthy(currentNode)) {\n return [];\n }\n if (Array.isArray(currentNode)) {\n const flattened = yield* Effect.forEach(\n currentNode,\n Effect.fn(function* (n: XmlNode) {\n return (yield* getProp(n, key)) || [];\n })\n );\n currentNode = flattened.flat();\n } else {\n currentNode = yield* getProp(currentNode, key);\n }\n }\n if (!Predicate.isTruthy(currentNode)) {\n return [];\n }\n return Array.isArray(currentNode) ? currentNode : [currentNode];\n});\n","import { Effect, Predicate } from 'effect';\n\nimport type { XmlNode } from '#/helpers/get-prop.ts';\nimport type { PeppolAdditionalDocumentReference } from '#/schemas/fields/peppol-additional-document-reference-schema.ts';\nimport type { RecursivePartial } from '#/types.ts';\n\nimport { decodeIdentifier } from '#/decoders/fields/decode-identifier.ts';\nimport { getArray } from '#/helpers/get-array.ts';\nimport { getProp } from '#/helpers/get-prop.ts';\nimport { strOrUnd } from '#/helpers/str-or-und.ts';\n\nexport const decodeAdditionalDocumentReferences = Effect.fn(function* (\n doc: XmlNode\n): Effect.fn.Return<Array<RecursivePartial<PeppolAdditionalDocumentReference>> | undefined> {\n const arr = yield* getArray(doc, 'cac:AdditionalDocumentReference');\n if (arr.length === 0) {\n return undefined;\n }\n\n return yield* Effect.forEach(\n arr,\n Effect.fn(function* (additionalDocumentReference: XmlNode) {\n const attachment = yield* getProp(additionalDocumentReference, 'cac:Attachment');\n const embeddedDocumentBinaryObject = yield* getProp(attachment, 'cbc:EmbeddedDocumentBinaryObject');\n const externalReference = yield* getProp(attachment, 'cac:ExternalReference');\n return {\n attachment: Predicate.isNotNullish(attachment)\n ? {\n embeddedDocumentBinaryObject: Predicate.isNotNullish(embeddedDocumentBinaryObject)\n ? {\n content: yield* strOrUnd(embeddedDocumentBinaryObject),\n filename: yield* strOrUnd(embeddedDocumentBinaryObject, '@filename'),\n mimeCode: yield* strOrUnd(embeddedDocumentBinaryObject, '@mimeCode'),\n }\n : undefined,\n externalReference: Predicate.isNotNullish(externalReference) ? { uri: yield* strOrUnd(externalReference, 'cbc:URI') } : undefined,\n }\n : undefined,\n documentDescription: yield* strOrUnd(additionalDocumentReference, 'cbc:DocumentDescription'),\n documentTypeCode: yield* strOrUnd(additionalDocumentReference, 'cbc:DocumentTypeCode'),\n id: yield* decodeIdentifier(additionalDocumentReference, 'cbc:ID'),\n };\n })\n );\n});\n","import { Effect, Predicate } from 'effect';\n\nimport type { XmlNode } from '#/helpers/get-prop.ts';\nimport type { PeppolAmount } from '#/schemas/fields/peppol-amount-schema.ts';\nimport type { PeppolCurrencyCode } from '#/schemas/values/currency-code-schema.ts';\nimport type { RecursivePartial } from '#/types.ts';\n\nimport { getProp } from '#/helpers/get-prop.ts';\n\nexport const decodeAmount = Effect.fn(function* (\n amount: XmlNode | undefined,\n ...path: Array<string>\n): Effect.fn.Return<RecursivePartial<PeppolAmount> | undefined> {\n const val = yield* getProp(amount, ...path);\n if (!Predicate.isTruthy(val) && val !== 0) return undefined;\n if (Predicate.isObject(val)) {\n const raw = val as XmlNode;\n return { currencyId: String(raw['@currencyID']) as PeppolCurrencyCode, value: parseFloat(String(raw['#text'] ?? raw)) };\n }\n return { currencyId: '' as PeppolCurrencyCode, value: parseFloat(String(val)) };\n});\n","import { Effect, Predicate, SchemaIssue } from 'effect';\n\nimport type { XmlNode } from '#/helpers/get-prop.ts';\n\nimport { getProp } from '#/helpers/get-prop.ts';\n\nexport const bool = Effect.fn(function* <const T extends boolean = boolean>(node: XmlNode, ...path: Array<string>) {\n const val = yield* getProp(node, ...path).pipe(\n Effect.filterOrFail(\n val => Predicate.isNotNullish(val),\n () => new SchemaIssue.MissingKey({ message: `Unable to find ${path.join('->')} into ${node}` })\n )\n );\n if (Predicate.isBoolean(val)) return val as T;\n if (Predicate.isObject(val) && Predicate.hasProperty(val, '#text') && Predicate.isNotUndefined(val['#text'])) return val['#text'] as T;\n return yield* Effect.fail(new SchemaIssue.MissingKey({ message: `Unable to find ${path.join('->')} into ${node}` }));\n});\n","import { Effect, Predicate } from 'effect';\n\nimport type { XmlNode } from '#/helpers/get-prop.ts';\n\nimport { strOrUnd } from '#/helpers/str-or-und.ts';\n\nexport const numOrUnd = Effect.fn(function* (node: XmlNode, ...path: Array<string>): Effect.fn.Return<number | undefined> {\n const val = yield* strOrUnd(node, ...path);\n\n return Predicate.isNotUndefined(val) ? parseFloat(val) : undefined;\n});\n","import { Effect } from 'effect';\n\nimport type { XmlNode } from '#/helpers/get-prop.ts';\n\nimport { decodeAmount } from '#/decoders/fields/decode-amount.ts';\nimport { bool } from '#/helpers/bool.ts';\nimport { numOrUnd } from '#/helpers/num-or-und.ts';\nimport { strOrUnd } from '#/helpers/str-or-und.ts';\n\nexport const decodeBaseAllowanceCharge = Effect.fn(function* (allowanceCharge: XmlNode) {\n return {\n allowanceChargeReason: yield* strOrUnd(allowanceCharge, 'cbc:AllowanceChargeReason'),\n allowanceChargeReasonCode: yield* strOrUnd(allowanceCharge, 'cbc:AllowanceChargeReasonCode'),\n amount: yield* decodeAmount(allowanceCharge, 'cbc:Amount'),\n baseAmount: yield* decodeAmount(allowanceCharge, 'cbc:BaseAmount'),\n chargeIndicator: yield* bool(allowanceCharge, 'cbc:ChargeIndicator'),\n multiplierFactorNumeric: yield* numOrUnd(allowanceCharge, 'cbc:MultiplierFactorNumeric'),\n };\n});\n","import { Effect } from 'effect';\n\nimport type { XmlNode } from '#/helpers/get-prop.ts';\n\nimport { getArray } from '#/helpers/get-array.ts';\n\nexport const decodeNodeList = Effect.fn(function* <A, E, R>(\n node: XmlNode,\n decodeItem: (item: XmlNode) => Effect.Effect<A, E, R>,\n ...path: Array<string>\n): Effect.fn.Return<Array<A> | undefined, E, R> {\n const arr = yield* getArray(node, ...path);\n if (arr.length === 0) return undefined;\n return yield* Effect.forEach(arr, decodeItem);\n});\n","import { Effect, Predicate } from 'effect';\n\nimport type { XmlNode } from '#/helpers/get-prop.ts';\nimport type { RecursivePartial } from '#/types.ts';\n\nimport { getProp } from '#/helpers/get-prop.ts';\nimport { strOrUnd } from '#/helpers/str-or-und.ts';\n\nexport const decodeSimpleIdentifer = Effect.fn('decode-simple-identifier')(function* (\n doc: XmlNode,\n ...path: Array<string>\n): Effect.fn.Return<RecursivePartial<{ id: string }> | undefined> {\n const node = yield* getProp(doc, ...path);\n if (Predicate.isNullish(node)) return undefined;\n\n return { id: yield* strOrUnd(node, 'cbc:ID') };\n});\n","import { Effect, Predicate } from 'effect';\n\nimport type { XmlNode } from '#/helpers/get-prop.ts';\nimport type { PeppolAllowanceCharge } from '#/schemas/fields/peppol-allowance-charge-schema.ts';\nimport type { RecursivePartial } from '#/types.ts';\n\nimport { decodeSimpleIdentifer } from '#/decoders/fields/decode-simple-identifier.ts';\nimport { getProp } from '#/helpers/get-prop.ts';\nimport { numOrUnd } from '#/helpers/num-or-und.ts';\nimport { strOrUnd } from '#/helpers/str-or-und.ts';\n\nexport const decodeTaxCategory = Effect.fn(function* (\n doc: XmlNode,\n ...path: Array<string>\n): Effect.fn.Return<RecursivePartial<PeppolAllowanceCharge['taxCategory']> | undefined> {\n const taxCategory = yield* getProp(doc, ...path);\n if (Predicate.isNullish(taxCategory)) {\n return undefined;\n }\n\n return {\n id: yield* strOrUnd(taxCategory, 'cbc:ID'),\n percent: yield* numOrUnd(taxCategory, 'cbc:Percent'),\n taxSchemeId: yield* decodeSimpleIdentifer(taxCategory, 'cac:TaxScheme'),\n };\n});\n","import { Effect } from 'effect';\n\nimport type { XmlNode } from '#/helpers/get-prop.ts';\nimport type { PeppolAllowanceCharge } from '#/schemas/fields/peppol-allowance-charge-schema.ts';\nimport type { RecursivePartial } from '#/types.ts';\n\nimport { decodeBaseAllowanceCharge } from '#/decoders/fields/decode-base-allowance-charge.ts';\nimport { decodeNodeList } from '#/decoders/fields/decode-node-list.ts';\nimport { decodeTaxCategory } from '#/decoders/fields/decode-tax-category.ts';\n\nexport const decodeAllowanceCharges = Effect.fn(function* (allowanceCharges: XmlNode, ...path: Array<string>) {\n return yield* decodeNodeList(\n allowanceCharges,\n Effect.fn(function* (allowanceCharge: XmlNode) {\n return {\n ...(yield* decodeBaseAllowanceCharge(allowanceCharge)),\n taxCategory: yield* decodeTaxCategory(allowanceCharge, 'cac:TaxCategory'),\n } as RecursivePartial<PeppolAllowanceCharge>;\n }),\n ...path\n );\n});\n","import { Effect } from 'effect';\n\nimport type { XmlNode } from '#/helpers/get-prop.ts';\nimport type { PeppolBillingReference } from '#/schemas/fields/peppol-billing-reference-schema.ts';\nimport type { RecursivePartial } from '#/types.ts';\n\nimport { getArray } from '#/helpers/get-array.ts';\nimport { strOrUnd } from '#/helpers/str-or-und.ts';\n\nexport const decodeBillingReferences = Effect.fn(function* (\n doc: XmlNode,\n ...path: Array<string>\n): Effect.fn.Return<Array<RecursivePartial<PeppolBillingReference>> | undefined> {\n const arr = yield* getArray(doc, ...path);\n if (arr.length === 0) return undefined;\n\n return yield* Effect.forEach(\n arr,\n Effect.fn(function* (billingReference: XmlNode) {\n return {\n invoiceDocumentReference: {\n id: yield* strOrUnd(billingReference, 'cac:InvoiceDocumentReference', 'cbc:ID'),\n issueDate: yield* strOrUnd(billingReference, 'cac:InvoiceDocumentReference', 'cbc:IssueDate'),\n },\n };\n })\n );\n});\n","import { Effect, Predicate } from 'effect';\n\nimport type { XmlNode } from '#/helpers/get-prop.ts';\nimport type { PeppolAddress } from '#/schemas/fields/peppol-address-schema.ts';\nimport type { RecursivePartial } from '#/types.ts';\n\nimport { getProp } from '#/helpers/get-prop.ts';\nimport { strOrUnd } from '#/helpers/str-or-und.ts';\n\nexport const decodeAddress = Effect.fn(function* (\n address: XmlNode | undefined,\n ...path: Array<string>\n): Effect.fn.Return<RecursivePartial<PeppolAddress> | undefined> {\n const val = yield* getProp(address, ...path);\n if (Predicate.isNullish(val)) return undefined;\n return {\n additionalStreetName: yield* strOrUnd(val, 'cbc:AdditionalStreetName'),\n addressLine: yield* decodeAddressLine(val, 'cac:AddressLine'),\n cityName: yield* strOrUnd(val, 'cbc:CityName'),\n countryCode: yield* decodeCountryCode(val, 'cac:Country'),\n countrySubentity: yield* strOrUnd(val, 'cbc:CountrySubentity'),\n postalZone: yield* strOrUnd(val, 'cbc:PostalZone'),\n streetName: yield* strOrUnd(val, 'cbc:StreetName'),\n };\n});\n\nconst decodeAddressLine = Effect.fn(function* (\n address: XmlNode,\n ...path: Array<string>\n): Effect.fn.Return<RecursivePartial<PeppolAddress['addressLine']> | undefined> {\n const val = yield* getProp(address, ...path);\n if (Predicate.isNullish(val)) return undefined;\n return { line: yield* strOrUnd(val, 'cbc:Line') };\n});\n\nconst decodeCountryCode = Effect.fn(function* (\n node: XmlNode,\n ...path: Array<string>\n): Effect.fn.Return<RecursivePartial<PeppolAddress['countryCode']> | undefined> {\n const country = yield* getProp(node, ...path);\n if (Predicate.isNullish(country)) return undefined;\n return { identificationCode: yield* strOrUnd(country, 'cbc:IdentificationCode') };\n});\n","import { Effect, Predicate } from 'effect';\n\nimport type { XmlNode } from '#/helpers/get-prop.ts';\nimport type { PeppolDelivery } from '#/schemas/fields/peppol-delivery-schema.ts';\nimport type { RecursivePartial } from '#/types.ts';\n\nimport { decodeAddress } from '#/decoders/fields/decode-address.ts';\nimport { decodeIdentifier } from '#/decoders/fields/decode-identifier.ts';\nimport { getProp } from '#/helpers/get-prop.ts';\nimport { strOrUnd } from '#/helpers/str-or-und.ts';\n\nexport const decodeDelivery = Effect.fn(function* (\n node: XmlNode,\n ...path: Array<string>\n): Effect.fn.Return<RecursivePartial<PeppolDelivery> | undefined> {\n const val = yield* getProp(node, ...path);\n if (Predicate.isNullish(val)) return undefined;\n\n return {\n actualDeliveryDate: yield* strOrUnd(val, 'cbc:ActualDeliveryDate'),\n deliveryLocation: yield* decodeDeliveryLocation(val, 'cac:DeliveryLocation'),\n deliveryParty: yield* decodeDeliveryParty(val, 'cac:DeliveryParty'),\n };\n});\n\nconst decodeDeliveryLocation = Effect.fn(function* (\n node: XmlNode,\n ...path: Array<string>\n): Effect.fn.Return<RecursivePartial<PeppolDelivery['deliveryLocation']> | undefined> {\n const val = yield* getProp(node, ...path);\n if (Predicate.isNullish(val)) return undefined;\n\n return { address: yield* decodeAddress(val, 'cac:Address'), id: yield* decodeIdentifier(val, 'cbc:ID') };\n});\n\nconst decodeDeliveryParty = Effect.fn(function* (\n node: XmlNode,\n ...path: Array<string>\n): Effect.fn.Return<RecursivePartial<PeppolDelivery['deliveryParty']> | undefined> {\n const val = yield* getProp(node, ...path);\n if (Predicate.isNullish(val)) return undefined;\n const name = yield* strOrUnd(val, 'cac:PartyName', 'cbc:Name');\n if (!Predicate.isTruthy(name)) return undefined;\n\n return { partyName: { name } };\n});\n","import { Effect, Predicate } from 'effect';\n\nimport type { XmlNode } from '#/helpers/get-prop.ts';\n\nimport { getProp } from '#/helpers/get-prop.ts';\nimport { strOrUnd } from '#/helpers/str-or-und.ts';\n\nexport const decodeInvoicePeriod = Effect.fn(function* (doc: XmlNode, ...path: Array<string>) {\n const invoicePeriod = yield* getProp(doc, ...path);\n if (Predicate.isNullish(invoicePeriod)) return undefined;\n return {\n descriptionCode: yield* strOrUnd(invoicePeriod, 'cbc:DescriptionCode'),\n endDate: yield* strOrUnd(invoicePeriod, 'cbc:EndDate'),\n startDate: yield* strOrUnd(invoicePeriod, 'cbc:StartDate'),\n };\n});\n","import { Effect, Predicate } from 'effect';\n\nimport type { XmlNode } from '#/helpers/get-prop.ts';\nimport type { PeppolLegalMonetaryTotal } from '#/schemas/fields/peppol-legal-monetary-total-schema.ts';\nimport type { RecursivePartial } from '#/types.ts';\n\nimport { decodeAmount } from '#/decoders/fields/decode-amount.ts';\nimport { getProp } from '#/helpers/get-prop.ts';\n\nexport const decodeLegalMonetaryTotal = Effect.fn(function* (\n node: XmlNode | undefined,\n ...path: Array<string>\n): Effect.fn.Return<RecursivePartial<PeppolLegalMonetaryTotal> | undefined> {\n const val = yield* getProp(node, ...path);\n if (Predicate.isNullish(val)) return undefined;\n\n return {\n allowanceTotalAmount: yield* decodeAmount(val, 'cbc:AllowanceTotalAmount'),\n chargeTotalAmount: yield* decodeAmount(val, 'cbc:ChargeTotalAmount'),\n lineExtensionAmount: yield* decodeAmount(val, 'cbc:LineExtensionAmount'),\n payableAmount: yield* decodeAmount(val, 'cbc:PayableAmount'),\n payableRoundingAmount: yield* decodeAmount(val, 'cbc:PayableRoundingAmount'),\n prepaidAmount: yield* decodeAmount(val, 'cbc:PrepaidAmount'),\n taxExclusiveAmount: yield* decodeAmount(val, 'cbc:TaxExclusiveAmount'),\n taxInclusiveAmount: yield* decodeAmount(val, 'cbc:TaxInclusiveAmount'),\n };\n});\n","import { Effect, Predicate } from 'effect';\n\nimport type { XmlNode } from '#/helpers/get-prop.ts';\nimport type { PeppolOrderReference } from '#/schemas/fields/peppol-order-reference-schema.ts';\nimport type { RecursivePartial } from '#/types.ts';\n\nimport { getProp } from '#/helpers/get-prop.ts';\nimport { strOrUnd } from '#/helpers/str-or-und.ts';\n\nexport const decodeOrderReference = Effect.fn(function* (\n node: XmlNode,\n ...path: Array<string>\n): Effect.fn.Return<RecursivePartial<PeppolOrderReference> | undefined> {\n const val = yield* getProp(node, ...path);\n if (Predicate.isNullish(val)) return undefined;\n\n return { id: yield* strOrUnd(val, 'cbc:ID'), salesOrderId: yield* strOrUnd(val, 'cbc:SalesOrderID') };\n});\n","import { Effect, Predicate } from 'effect';\n\nimport type { XmlNode } from '#/helpers/get-prop.ts';\nimport type { PeppolContact } from '#/schemas/fields/peppol-contact-schema.ts';\nimport type { RecursivePartial } from '#/types.ts';\n\nimport { getProp } from '#/helpers/get-prop.ts';\nimport { strOrUnd } from '#/helpers/str-or-und.ts';\n\nexport const decodeContact = Effect.fn(function* (\n node: XmlNode,\n ...path: Array<string>\n): Effect.fn.Return<RecursivePartial<PeppolContact> | undefined> {\n const contactNode = yield* getProp(node, ...path);\n if (Predicate.isNullish(contactNode)) return undefined;\n\n return {\n electronicMail: yield* strOrUnd(contactNode, 'cbc:ElectronicMail'),\n name: yield* strOrUnd(contactNode, 'cbc:Name'),\n telephone: yield* strOrUnd(contactNode, 'cbc:Telephone'),\n };\n});\n","import { Effect, Predicate } from 'effect';\n\nimport type { XmlNode } from '#/helpers/get-prop.ts';\nimport type { PeppolIdentifier } from '#/schemas/fields/peppol-identifier-schema.ts';\n\nimport { decodeIdentifier } from '#/decoders/fields/decode-identifier.ts';\n\nexport const decodeElectronicAddress = Effect.fn(function* <const T extends PeppolIdentifier['schemeId'] = string>(\n node: XmlNode | undefined,\n ...path: Array<string>\n) {\n const value = yield* decodeIdentifier<T>(node, ...path);\n if (Predicate.isTruthy(value?.schemeId)) {\n // @ts-expect-error I don't want to bother with the typecheck\n value.schemeId = (value.schemeId as string).padStart(4, '0') as T;\n }\n return value;\n});\n","import { Effect, Predicate } from 'effect';\n\nimport type { XmlNode } from '#/helpers/get-prop.ts';\nimport type { PeppolPartyTaxSchema } from '#/schemas/fields/peppol-party-tax-scheme-schema.ts';\nimport type { RecursivePartial } from '#/types.ts';\n\nimport { decodeSimpleIdentifer } from '#/decoders/fields/decode-simple-identifier.ts';\nimport { getProp } from '#/helpers/get-prop.ts';\nimport { strOrUnd } from '#/helpers/str-or-und.ts';\n\nexport const decodePartyTaxScheme = Effect.fn(function* (\n doc: XmlNode,\n ...path: Array<string>\n): Effect.fn.Return<RecursivePartial<PeppolPartyTaxSchema> | undefined> {\n const node = yield* getProp(doc, ...path);\n if (Predicate.isNullish(node)) return undefined;\n\n return { companyId: yield* strOrUnd(node, 'cbc:CompanyID'), taxSchemeId: yield* decodeSimpleIdentifer(node, 'cac:TaxScheme') };\n});\n","import { Effect, Predicate } from 'effect';\n\nimport type { XmlNode } from '#/helpers/get-prop.ts';\nimport type { PeppolPartyTaxSchema } from '#/schemas/fields/peppol-party-tax-scheme-schema.ts';\nimport type { RecursivePartial } from '#/types.ts';\n\nimport { decodePartyTaxScheme } from '#/decoders/fields/decode-party-tax-scheme.ts';\nimport { getArray } from '#/helpers/get-array.ts';\n\nexport const decodePartiesTaxScheme = Effect.fn(function* (\n doc: XmlNode,\n ...path: Array<string>\n): Effect.fn.Return<RecursivePartial<Array<PeppolPartyTaxSchema>> | undefined> {\n const node = yield* getArray(doc, ...path);\n if (node.length === 0) return undefined;\n\n const values = yield* Effect.forEach(\n node,\n Effect.fn(function* (n: XmlNode) {\n return yield* decodePartyTaxScheme(n);\n })\n );\n return values.filter(Predicate.isNotNullish);\n});\n","import { Effect, Predicate } from 'effect';\n\nimport type { XmlNode } from '#/helpers/get-prop.ts';\nimport type { PeppolPartyLegalEntitySchema } from '#/schemas/fields/peppol-party-legal-entity-schema.ts';\nimport type { RecursivePartial } from '#/types.ts';\n\nimport { decodeIdentifier } from '#/decoders/fields/decode-identifier.ts';\nimport { getProp } from '#/helpers/get-prop.ts';\nimport { strOrUnd } from '#/helpers/str-or-und.ts';\n\nexport const decodePartyLegalEntity = Effect.fn(function* (\n node: XmlNode,\n ...path: Array<string>\n): Effect.fn.Return<RecursivePartial<PeppolPartyLegalEntitySchema> | undefined> {\n const partyLegalEntityNode = yield* getProp(node, ...path);\n if (Predicate.isNullish(partyLegalEntityNode)) return undefined;\n\n return {\n companyId: yield* decodeIdentifier(partyLegalEntityNode, 'cbc:CompanyID'),\n companyLegalForm: yield* strOrUnd(partyLegalEntityNode, 'cbc:CompanyLegalForm'),\n registrationName: yield* strOrUnd(partyLegalEntityNode, 'cbc:RegistrationName'),\n };\n});\n","import { Effect, Predicate } from 'effect';\n\nimport type { XmlNode } from '#/helpers/get-prop.ts';\n\nimport { decodeAddress } from '#/decoders/fields/decode-address.ts';\nimport { decodeContact } from '#/decoders/fields/decode-contact.ts';\nimport { decodeElectronicAddress } from '#/decoders/fields/decode-electronic-address.ts';\nimport { decodeIdentifier } from '#/decoders/fields/decode-identifier.ts';\nimport { decodePartiesTaxScheme } from '#/decoders/fields/decode-parties-tax-scheme.ts';\nimport { decodePartyLegalEntity } from '#/decoders/fields/decode-party-legal-entity.ts';\nimport { getProp } from '#/helpers/get-prop.ts';\nimport { strOrUnd } from '#/helpers/str-or-und.ts';\n\nexport const decodeParty = Effect.fn(function* (party: XmlNode | undefined, ...path: Array<string>) {\n const val = yield* getProp(party, ...path);\n if (Predicate.isNullish(val)) return undefined;\n\n return {\n contact: yield* decodeContact(val, 'cac:Contact'),\n endpointId: yield* decodeElectronicAddress(val, 'cbc:EndpointID'),\n partyIdentification: yield* decodeAdditionalIdentifiers(val, 'cac:PartyIdentification'),\n partyLegalEntity: yield* decodePartyLegalEntity(val, 'cac:PartyLegalEntity'),\n partyName: yield* decodePartyName(val, 'cac:PartyName'),\n partyTaxSchemes: yield* decodePartiesTaxScheme(val, 'cac:PartyTaxScheme'),\n postalAddress: yield* decodeAddress(val, 'cac:PostalAddress'),\n };\n});\n\nconst decodePartyName = Effect.fn(function* (node: XmlNode, ...path: Array<string>) {\n const partyNameNode = yield* getProp(node, ...path);\n if (Predicate.isNullish(partyNameNode)) return undefined;\n return { name: yield* strOrUnd(partyNameNode, 'cbc:Name') };\n});\n\nconst decodeAdditionalIdentifiers = Effect.fn(function* (node: XmlNode, ...path: Array<string>) {\n const val = yield* getProp(node, ...path);\n if (Predicate.isNullish(val)) return undefined;\n return { id: yield* decodeIdentifier(val, 'cbc:ID') };\n});\n","import { Effect, Predicate } from 'effect';\n\nimport type { XmlNode } from '#/helpers/get-prop.ts';\nimport type { PeppolPayeeParty } from '#/schemas/fields/peppol-payee-party-schema.ts';\nimport type { RecursivePartial } from '#/types.ts';\n\nimport { decodeIdentifier } from '#/decoders/fields/decode-identifier.ts';\nimport { getProp } from '#/helpers/get-prop.ts';\nimport { strOrUnd } from '#/helpers/str-or-und.ts';\n\nexport const decodePayeeParty = Effect.fn(function* (\n payee: XmlNode | undefined,\n ...path: Array<string>\n): Effect.fn.Return<RecursivePartial<PeppolPayeeParty> | undefined> {\n const node = yield* getProp(payee, ...path);\n if (Predicate.isNullish(node)) return undefined;\n return {\n partyIdentification: yield* decodePartyIdentification(node, 'cac:PartyIdentification'),\n partyLegalEntity: yield* decodePartyLegalEntity(node, 'cac:PartyLegalEntity'),\n partyName: yield* decodePartyName(node, 'cac:PartyName'),\n };\n});\n\nconst decodePartyLegalEntity = Effect.fn(function* (\n party: XmlNode | undefined,\n ...path: Array<string>\n): Effect.fn.Return<RecursivePartial<PeppolPayeeParty['partyLegalEntity']> | undefined> {\n const node = yield* getProp(party, ...path);\n if (Predicate.isNullish(node)) return undefined;\n return { companyId: yield* decodeIdentifier(node, 'cbc:CompanyID') };\n});\n\nconst decodePartyName = Effect.fn(function* (\n party: XmlNode | undefined,\n ...path: Array<string>\n): Effect.fn.Return<RecursivePartial<PeppolPayeeParty['partyName']> | undefined> {\n const node = yield* getProp(party, ...path);\n if (Predicate.isNullish(node)) return undefined;\n return { name: yield* strOrUnd(node, 'cbc:Name') };\n});\n\nconst decodePartyIdentification = Effect.fn(function* (\n party: XmlNode | undefined,\n ...path: Array<string>\n): Effect.fn.Return<RecursivePartial<PeppolPayeeParty['partyIdentification']> | undefined> {\n const node = yield* getProp(party, ...path);\n if (Predicate.isNullish(node)) return undefined;\n return { id: yield* decodeIdentifier(node, 'cbc:ID') };\n});\n","import { Effect, Predicate } from 'effect';\n\nimport type { XmlNode } from '#/helpers/get-prop.ts';\nimport type { PeppolIdentifier } from '#/schemas/fields/peppol-identifier-schema.ts';\nimport type { PeppolPaymentMeans } from '#/schemas/fields/peppol-payment-means-schema.ts';\nimport type { RecursivePartial } from '#/types.ts';\n\nimport { decodeSimpleIdentifer } from '#/decoders/fields/decode-simple-identifier.ts';\nimport { getArray } from '#/helpers/get-array.ts';\nimport { getProp } from '#/helpers/get-prop.ts';\nimport { strOrUnd } from '#/helpers/str-or-und.ts';\n\nexport const decodePaymentMeans = Effect.fn(function* (\n doc: XmlNode,\n ...path: Array<string>\n): Effect.fn.Return<Array<RecursivePartial<PeppolPaymentMeans>> | undefined> {\n const arr = yield* getArray(doc, ...path);\n if (arr.length === 0) return undefined;\n\n return yield* Effect.forEach(\n arr,\n Effect.fn(function* (paymentMeans: XmlNode) {\n const cardAccount = yield* getProp(paymentMeans, 'cac:CardAccount');\n\n return {\n cardAccount: Predicate.isNotNullish(cardAccount)\n ? {\n holderName: yield* strOrUnd(cardAccount, 'cbc:HolderName'),\n networkId: yield* strOrUnd(cardAccount, 'cbc:NetworkID'),\n primaryAccountNumberId: yield* strOrUnd(cardAccount, 'cbc:PrimaryAccountNumberID'),\n }\n : undefined,\n payeeFinancialAccount: yield* decodePayeeFinancialAccount(paymentMeans, 'cac:PayeeFinancialAccount'),\n paymentDueDate: yield* strOrUnd(paymentMeans, 'cbc:PaymentDueDate'),\n paymentId: yield* strOrUnd(paymentMeans, 'cbc:PaymentID'),\n paymentMandate: yield* decodePaymentMendates(paymentMeans, 'cac:PaymentMandate'),\n paymentMeansCode: yield* decodePaymentMeansCodes(paymentMeans, 'cbc:PaymentMeansCode'),\n };\n })\n );\n});\n\nconst decodePayeeFinancialAccount = Effect.fn(function* (\n doc: XmlNode,\n ...path: Array<string>\n): Effect.fn.Return<RecursivePartial<PeppolPaymentMeans['payeeFinancialAccount']> | undefined> {\n const node = yield* getProp(doc, ...path);\n if (Predicate.isNullish(node)) return undefined;\n\n let financialInstitutionBranch: RecursivePartial<PeppolIdentifier> | undefined = yield* decodeSimpleIdentifer(\n node,\n 'cac:FinancialInstitutionBranch'\n );\n // NOTE: this 2 way comparision is necessary to ensure that `id` is null with a returned value which means that it is not direct child\n if (Predicate.isNotUndefined(financialInstitutionBranch) && !Predicate.isTruthy(financialInstitutionBranch?.id)) {\n financialInstitutionBranch = yield* decodeSimpleIdentifer(node, 'cac:FinancialInstitutionBranch', 'ns0:FinancialInstitution');\n }\n return { financialInstitutionBranch, id: yield* strOrUnd(node, 'cbc:ID'), name: yield* strOrUnd(node, 'cbc:Name') };\n});\n\nconst decodePaymentMendates = Effect.fn(function* (\n doc: XmlNode,\n ...path: Array<string>\n): Effect.fn.Return<RecursivePartial<PeppolPaymentMeans['paymentMandate']> | undefined> {\n const node = yield* getProp(doc, ...path);\n if (Predicate.isNullish(node)) return undefined;\n\n return { id: yield* strOrUnd(node, 'cbc:ID'), payerFinancialAccountId: yield* decodeSimpleIdentifer(node, 'cac:PayerFinancialAccount') };\n});\n\nconst decodePaymentMeansCodes = Effect.fn(function* (\n doc: XmlNode,\n ...path: Array<string>\n): Effect.fn.Return<RecursivePartial<PeppolPaymentMeans['paymentMeansCode']> | undefined> {\n const node = yield* getProp(doc, ...path);\n if (Predicate.isNullish(node)) return undefined;\n return { code: yield* strOrUnd(node), name: yield* strOrUnd(node, '@name') };\n});\n","import { Effect, Predicate } from 'effect';\n\nimport type { XmlNode } from '#/helpers/get-prop.ts';\nimport type { PeppolPaymentTerms } from '#/schemas/fields/peppol-payment-terms-schema.ts';\nimport type { RecursivePartial } from '#/types.ts';\n\nimport { getProp } from '#/helpers/get-prop.ts';\nimport { strOrUnd } from '#/helpers/str-or-und.ts';\n\nexport const decodePaymentTerms = Effect.fn(function* (\n doc: XmlNode,\n ...path: Array<string>\n): Effect.fn.Return<RecursivePartial<PeppolPaymentTerms> | undefined> {\n const terms = yield* getProp(doc, ...path);\n if (Predicate.isNullish(terms)) return undefined;\n const note = yield* getProp(terms, 'cbc:Note');\n return Predicate.isNotNullish(note) ? { note: yield* strOrUnd(note) } : undefined;\n});\n","import { Effect, Predicate } from 'effect';\n\nimport type { XmlNode } from '#/helpers/get-prop.ts';\nimport type { PeppolTaxRepresentativeParty } from '#/schemas/fields/peppol-tax-representative-schema.ts';\nimport type { RecursivePartial } from '#/types.ts';\n\nimport { decodeAddress } from '#/decoders/fields/decode-address.ts';\nimport { decodePartyTaxScheme } from '#/decoders/fields/decode-party-tax-scheme.ts';\nimport { getProp } from '#/helpers/get-prop.ts';\nimport { strOrUnd } from '#/helpers/str-or-und.ts';\n\nexport const decodeTaxRepresentativeParty = Effect.fn(function* (\n doc: XmlNode,\n ...path: Array<string>\n): Effect.fn.Return<RecursivePartial<PeppolTaxRepresentativeParty> | undefined> {\n const taxRepresentative = yield* getProp(doc, ...path);\n if (Predicate.isNullish(taxRepresentative)) return undefined;\n\n return {\n name: yield* strOrUnd(taxRepresentative, 'cac:PartyName', 'cbc:Name'),\n partyTaxScheme: yield* decodePartyTaxScheme(taxRepresentative, 'cac:PartyTaxScheme'),\n postalAddress: yield* decodeAddress(taxRepresentative, 'cac:PostalAddress'),\n };\n});\n","import { Effect, Predicate } from 'effect';\n\nimport type { XmlNode } from '#/helpers/get-prop.ts';\nimport type { PeppolTaxSubTotal } from '#/schemas/fields/peppol-tax-subtotal-schema.ts';\nimport type { PeppolTaxTotal } from '#/schemas/fields/peppol-tax-totals-base-schema.ts';\nimport type { RecursivePartial } from '#/types.ts';\n\nimport { decodeAmount } from '#/decoders/fields/decode-amount.ts';\nimport { decodeSimpleIdentifer } from '#/decoders/fields/decode-simple-identifier.ts';\nimport { getArray } from '#/helpers/get-array.ts';\nimport { getProp } from '#/helpers/get-prop.ts';\nimport { numOrUnd } from '#/helpers/num-or-und.ts';\nimport { strOrUnd } from '#/helpers/str-or-und.ts';\n\nexport const decodeTaxTotals = Effect.fn(function* (\n doc: XmlNode,\n ...path: Array<string>\n): Effect.fn.Return<Array<RecursivePartial<PeppolTaxTotal>> | undefined> {\n const arr = yield* getArray(doc, ...path);\n if (arr.length === 0) return undefined;\n\n return yield* Effect.forEach(\n arr,\n Effect.fn(function* (n: XmlNode) {\n return { taxAmount: yield* decodeAmount(n, 'cbc:TaxAmount'), taxSubtotals: yield* decodeTaxSubTotal(n, 'cac:TaxSubtotal') };\n })\n );\n});\n\nconst decodeTaxSubTotal = Effect.fn(function* (\n doc: XmlNode,\n ...path: Array<string>\n): Effect.fn.Return<Array<RecursivePartial<PeppolTaxSubTotal>> | undefined> {\n const arr = yield* getArray(doc, ...path);\n if (arr.length === 0) return undefined;\n return yield* Effect.forEach(\n arr,\n Effect.fn(function* (node: XmlNode) {\n return {\n taxAmount: yield* decodeAmount(node, 'cbc:TaxAmount'),\n taxCategory: yield* decodeTaxCategory(node, 'cac:TaxCategory'),\n taxableAmount: yield* decodeAmount(node, 'cbc:TaxableAmount'),\n };\n })\n );\n});\n\nconst decodeTaxCategory = Effect.fn(function* (\n doc: XmlNode,\n ...path: Array<string>\n): Effect.fn.Return<RecursivePartial<PeppolTaxSubTotal['taxCategory']> | undefined> {\n const node = yield* getProp(doc, ...path);\n if (Predicate.isNullish(node)) {\n return undefined;\n }\n\n return {\n id: yield* strOrUnd(node, 'cbc:ID'),\n percent: yield* numOrUnd(node, 'cbc:Percent'),\n taxExemptionReason: yield* strOrUnd(node, 'cbc:TaxExemptionReason'),\n taxExemptionReasonCode: yield* strOrUnd(node, 'cbc:TaxExemptionReasonCode'),\n taxSchemeId: yield* decodeSimpleIdentifer(node, 'cac:TaxScheme'),\n };\n});\n","import { Effect } from 'effect';\n\nimport type { XmlNode } from '#/helpers/get-prop.ts';\n\nimport { decodeAdditionalDocumentReferences } from '#/decoders/fields/decode-additional-document-references.ts';\nimport { decodeAllowanceCharges } from '#/decoders/fields/decode-allowance-charges.ts';\nimport { decodeBillingReferences } from '#/decoders/fields/decode-billing-references.ts';\nimport { decodeDelivery } from '#/decoders/fields/decode-delivery.ts';\nimport { decodeInvoicePeriod } from '#/decoders/fields/decode-invoice-period.ts';\nimport { decodeLegalMonetaryTotal } from '#/decoders/fields/decode-legal-monetary-total.ts';\nimport { decodeOrderReference } from '#/decoders/fields/decode-order-reference.ts';\nimport { decodeParty } from '#/decoders/fields/decode-party.ts';\nimport { decodePayeeParty } from '#/decoders/fields/decode-payee-party.ts';\nimport { decodePaymentMeans } from '#/decoders/fields/decode-payment-means.ts';\nimport { decodePaymentTerms } from '#/decoders/fields/decode-payment-terms.ts';\nimport { decodeSimpleIdentifer } from '#/decoders/fields/decode-simple-identifier.ts';\nimport { decodeTaxRepresentativeParty } from '#/decoders/fields/decode-tax-representative-party.ts';\nimport { decodeTaxTotals } from '#/decoders/fields/decode-tax-totals.ts';\nimport { strOrUnd } from '#/helpers/str-or-und.ts';\n\nexport const decodeBilling = Effect.fn('decode-billing')(function* (doc: XmlNode) {\n return {\n accountingCost: yield* strOrUnd(doc, 'cbc:AccountingCost'),\n accountingCustomerParty: yield* decodeParty(doc, 'cac:AccountingCustomerParty', 'cac:Party'),\n accountingSupplierParty: yield* decodeParty(doc, 'cac:AccountingSupplierParty', 'cac:Party'),\n additionalDocumentReferences: yield* decodeAdditionalDocumentReferences(doc),\n allowanceCharges: yield* decodeAllowanceCharges(doc, 'cac:AllowanceCharge'),\n billingReferences: yield* decodeBillingReferences(doc, 'cac:BillingReference'),\n buyerReference: yield* strOrUnd(doc, 'cbc:BuyerReference'),\n contractDocumentReference: yield* decodeSimpleIdentifer(doc, 'cac:ContractDocumentReference'),\n customizationId: yield* strOrUnd(doc, 'cbc:CustomizationID'),\n delivery: yield* decodeDelivery(doc, 'cac:Delivery'),\n despatchDocumentReference: yield* decodeSimpleIdentifer(doc, 'cac:DespatchDocumentReference'),\n documentCurrencyCode: yield* strOrUnd(doc, 'cbc:DocumentCurrencyCode'),\n id: yield* strOrUnd(doc, 'cbc:ID'),\n invoicePeriod: yield* decodeInvoicePeriod(doc, 'cac:InvoicePeriod'),\n issueDate: yield* strOrUnd(doc, 'cbc:IssueDate'),\n legalMonetaryTotal: yield* decodeLegalMonetaryTotal(doc, 'cac:LegalMonetaryTotal'),\n note: yield* strOrUnd(doc, 'cbc:Note'),\n orderReference: yield* decodeOrderReference(doc, 'cac:OrderReference'),\n originatorDocumentReference: yield* decodeSimpleIdentifer(doc, 'cac:OriginatorDocumentReference'),\n payeeParty: yield* decodePayeeParty(doc, 'cac:PayeeParty'),\n paymentMeans: yield* decodePaymentMeans(doc, 'cac:PaymentMeans'),\n paymentTerms: yield* decodePaymentTerms(doc, 'cac:PaymentTerms'),\n profileId: yield* strOrUnd(doc, 'cbc:ProfileID'),\n receiptDocumentReference: yield* decodeSimpleIdentifer(doc, 'cac:ReceiptDocumentReference'),\n taxCurrencyCode: yield* strOrUnd(doc, 'cbc:TaxCurrencyCode'),\n taxPointDate: yield* strOrUnd(doc, 'cbc:TaxPointDate'),\n taxRepresentativeParty: yield* decodeTaxRepresentativeParty(doc, 'cac:TaxRepresentativeParty'),\n taxTotals: yield* decodeTaxTotals(doc, 'cac:TaxTotal'),\n };\n});\n","import { Effect, Predicate } from 'effect';\n\nimport type { XmlNode } from '#/helpers/get-prop.ts';\nimport type { PeppolInvoiceLinePeriod } from '#/schemas/fields/peppol-invoice-line-period-schema.ts';\nimport type { RecursivePartial } from '#/types.ts';\n\nimport { getProp } from '#/helpers/get-prop.ts';\nimport { strOrUnd } from '#/helpers/str-or-und.ts';\n\nexport const decodeInvoiceLinePeriod = Effect.fn(function* (\n doc: XmlNode,\n ...path: Array<string>\n): Effect.fn.Return<RecursivePartial<PeppolInvoiceLinePeriod> | undefined> {\n const invoicePeriod = yield* getProp(doc, ...path);\n return Predicate.isNotNullish(invoicePeriod)\n ? { endDate: yield* strOrUnd(invoicePeriod, 'cbc:EndDate'), startDate: yield* strOrUnd(invoicePeriod, 'cbc:StartDate') }\n : undefined;\n});\n","import { Effect } from 'effect';\n\nimport type { XmlNode } from '#/helpers/get-prop.ts';\nimport type { PeppolLineAllowanceCharge } from '#/schemas/fields/peppol-line-allowance-charge-schema.ts';\nimport type { RecursivePartial } from '#/types.ts';\n\nimport { decodeBaseAllowanceCharge } from '#/decoders/fields/decode-base-allowance-charge.ts';\nimport { decodeNodeList } from '#/decoders/fields/decode-node-list.ts';\n\nexport const decodeLineAllowanceCharges = Effect.fn(function* (allowanceCharges: XmlNode, ...path: Array<string>) {\n return yield* decodeNodeList(\n allowanceCharges,\n Effect.fn(function* (allowanceCharge: XmlNode) {\n return { ...(yield* decodeBaseAllowanceCharge(allowanceCharge)) } as RecursivePartial<PeppolLineAllowanceCharge>;\n }),\n ...path\n );\n});\n","import { Effect, Predicate } from 'effect';\n\nimport type { XmlNode } from '#/helpers/get-prop.ts';\n\nimport { decodeAmount } from '#/decoders/fields/decode-amount.ts';\nimport { bool } from '#/helpers/bool.ts';\nimport { getProp } from '#/helpers/get-prop.ts';\n\nexport const decodePriceAllowanceCharge = Effect.fn(function* (allowanceCharges: XmlNode, ...path: Array<string>) {\n const allowanceCharge = yield* getProp(allowanceCharges, ...path);\n if (Predicate.isNullish(allowanceCharge)) {\n return undefined;\n }\n return {\n amount: yield* decodeAmount(allowanceCharge, 'cbc:Amount'),\n baseAmount: yield* decodeAmount(allowanceCharge, 'cbc:BaseAmount'),\n chargeIndicator: yield* bool<false>(allowanceCharge, 'cbc:ChargeIndicator'),\n };\n});\n","import { Effect, Predicate } from 'effect';\n\nimport type { XmlNode } from '#/helpers/get-prop.ts';\n\nimport { getProp } from '#/helpers/get-prop.ts';\nimport { numOrUnd } from '#/helpers/num-or-und.ts';\n\nexport const decodeQuantity = Effect.fn(function* (quantity: XmlNode | undefined, ...path: Array<string>) {\n const val = yield* getProp(quantity, ...path);\n if (!Predicate.isTruthy(val) && val !== 0) return undefined;\n if (Predicate.isObject(val)) {\n return { unitCode: yield* getProp(val, '@unitCode'), value: yield* numOrUnd(val) };\n }\n return { value: yield* numOrUnd(val) };\n});\n","import { Effect, Predicate } from 'effect';\n\nimport type { XmlNode } from '#/helpers/get-prop.ts';\n\nimport { decodeAmount } from '#/decoders/fields/decode-amount.ts';\nimport { decodePriceAllowanceCharge } from '#/decoders/fields/decode-price-allowance-charge.ts';\nimport { decodeQuantity } from '#/decoders/fields/decode-quantity.ts';\nimport { getProp } from '#/helpers/get-prop.ts';\n\nexport const decodeLinePrice = Effect.fn(function* (price: XmlNode, ...path: Array<string>) {\n const node = yield* getProp(price, ...path);\n if (Predicate.isNullish(node)) return undefined;\n\n return {\n allowanceCharge: yield* decodePriceAllowanceCharge(node, 'cac:AllowanceCharge'),\n baseQuantity: yield* decodeQuantity(node, 'cbc:BaseQuantity'),\n priceAmount: yield* decodeAmount(node, 'cbc:PriceAmount'),\n };\n});\n","import { Effect, Predicate } from 'effect';\n\nimport type { XmlNode } from '#/helpers/get-prop.ts';\nimport type { PeppolDocumentLine } from '#/schemas/peppol-document-schema.ts';\nimport type { RecursivePartial } from '#/types.ts';\n\nimport { decodeAmount } from '#/decoders/fields/decode-amount.ts';\nimport { decodeIdentifier } from '#/decoders/fields/decode-identifier.ts';\nimport { decodeInvoiceLinePeriod } from '#/decoders/fields/decode-invoice-line-period.ts';\nimport { decodeLineAllowanceCharges } from '#/decoders/fields/decode-line-allowance-charges.ts';\nimport { decodeLinePrice } from '#/decoders/fields/decode-line-price.ts';\nimport { decodeSimpleIdentifer } from '#/decoders/fields/decode-simple-identifier.ts';\nimport { decodeTaxCategory } from '#/decoders/fields/decode-tax-category.ts';\nimport { getArray } from '#/helpers/get-array.ts';\nimport { getProp } from '#/helpers/get-prop.ts';\nimport { strOrUnd } from '#/helpers/str-or-und.ts';\n\ntype PeppolDocumentLineItem = PeppolDocumentLine['item'];\n\nexport const decodeLineShared = Effect.fn(function* (lineShared: XmlNode) {\n const item = yield* getProp(lineShared, 'cac:Item');\n const orderLineReference = yield* getProp(lineShared, 'cac:OrderLineReference');\n\n return {\n accountingCost: yield* strOrUnd(lineShared, 'cbc:AccountingCost'),\n allowanceCharges: yield* decodeLineAllowanceCharges(lineShared, 'cac:AllowanceCharge'),\n documentReference: yield* Effect.forEach(\n yield* getArray(lineShared, 'cac:DocumentReference'),\n Effect.fn(function* (documentReference: XmlNode) {\n return {\n documentTypeCode: yield* strOrUnd(documentReference, 'cbc:DocumentTypeCode'),\n id: yield* strOrUnd(documentReference, 'cbc:ID'),\n schemeId: yield* strOrUnd(documentReference, 'cbc:ID', '@schemeID'),\n };\n })\n ),\n id: yield* strOrUnd(lineShared, 'cbc:ID'),\n invoicePeriod: yield* decodeInvoiceLinePeriod(lineShared, 'cac:InvoicePeriod'),\n item: {\n additionalItemProperties: yield* Effect.forEach(\n yield* getArray(item, 'cac:AdditionalItemProperty'),\n Effect.fn(function* (n: XmlNode) {\n return { name: yield* strOrUnd(n, 'cbc:Name'), value: yield* strOrUnd(n, 'cbc:Value') };\n })\n ),\n buyersItemIdentification: yield* decodeSimpleIdentifer(item, 'cac:BuyersItemIdentification'),\n classifiedTaxCategory: yield* decodeTaxCategory(item, 'cac:ClassifiedTaxCategory'),\n commodityClassifications: yield* Effect.forEach(\n yield* getArray(item, 'cac:CommodityClassification'),\n Effect.fn(function* (commodityClassification: XmlNode) {\n return {\n itemClassification: {\n id: yield* strOrUnd(commodityClassification, 'cbc:ItemClassificationCode'),\n listId: yield* strOrUnd(commodityClassification, 'cbc:ItemClassificationCode', '@listID'),\n listVersionId: yield* strOrUnd(commodityClassification, 'cbc:ItemClassificationCode', '@listVersionID'),\n },\n };\n })\n ),\n description: yield* strOrUnd(item, 'cbc:Description'),\n name: yield* strOrUnd(item, 'cbc:Name'),\n originCountryCode: yield* decodeOriginCountryCode(item, 'cac:OriginCountry'),\n sellersItemIdentification: yield* decodeSimpleIdentifer(item, 'cac:SellersItemIdentification'),\n standardItemIdentification: yield* decodeStandardItem(item, 'cac:StandardItemIdentification'),\n },\n lineExtensionAmount: yield* decodeAmount(lineShared, 'cbc:LineExtensionAmount'),\n note: yield* strOrUnd(lineShared, 'cbc:Note'),\n orderLineReference: Predicate.isNotNullish(orderLineReference) ? { lineId: yield* strOrUnd(orderLineReference, 'cbc:LineID') } : undefined,\n price: yield* decodeLinePrice(lineShared, 'cac:Price'),\n };\n});\n\nconst decodeStandardItem = Effect.fn(function* (\n node: XmlNode,\n ...path: Array<string>\n): Effect.fn.Return<RecursivePartial<PeppolDocumentLineItem['standardItemIdentification']>> {\n const val = yield* getProp(node, ...path);\n if (Predicate.isNullish(val)) return undefined;\n return { id: yield* decodeIdentifier(val, 'cbc:ID') };\n});\n\nconst decodeOriginCountryCode = Effect.fn(function* (\n node: XmlNode,\n ...path: Array<string>\n): Effect.fn.Return<RecursivePartial<PeppolDocumentLineItem['originCountryCode']>> {\n const country = yield* getProp(node, ...path);\n if (Predicate.isNullish(country)) return undefined;\n return { identificationCode: yield* strOrUnd(country, 'cbc:IdentificationCode') };\n});\n","import { Effect } from 'effect';\n\nimport type { XmlNode } from '#/helpers/get-prop.ts';\n\nimport { decodeLineShared } from '#/decoders/fields/decode-line-shared.ts';\nimport { decodeNodeList } from '#/decoders/fields/decode-node-list.ts';\nimport { decodeQuantity } from '#/decoders/fields/decode-quantity.ts';\n\nexport const decodeCreditNoteLines = Effect.fn(function* (doc: XmlNode, ...path: Array<string>) {\n return yield* decodeNodeList(\n doc,\n Effect.fn(function* (lineNode: XmlNode) {\n const shared = yield* decodeLineShared(lineNode);\n return { ...shared, creditedQuantity: (yield* decodeQuantity(lineNode, 'cbc:CreditedQuantity'))! };\n }),\n ...path\n ).pipe(Effect.map(items => items ?? []));\n});\n","import { Effect } from 'effect';\n\nimport type { XmlNode } from '#/helpers/get-prop.ts';\n\nimport { decodeBilling } from '#/decoders/decode-billing.ts';\nimport { decodeCreditNoteLines } from '#/decoders/fields/decode-credit-note-lines.ts';\nimport { getProp } from '#/helpers/get-prop.ts';\nimport { strOrUnd } from '#/helpers/str-or-und.ts';\n\nexport const decodeCreditNote = Effect.fn('decode-credit-note')(function* (value: XmlNode) {\n const root = value || {};\n const doc: XmlNode = (yield* getProp(root, 'ubl:CreditNote')) ?? root; // accept either the whole JSON or just the CreditNote node\n\n return {\n ...(yield* decodeBilling(doc)),\n creditNoteLines: yield* decodeCreditNoteLines(doc, 'cac:CreditNoteLine'),\n creditNoteTypeCode: yield* strOrUnd(doc, 'cbc:CreditNoteTypeCode'),\n };\n});\n","import { Effect } from 'effect';\n\nimport type { XmlNode } from '#/helpers/get-prop.ts';\n\nimport { getProp } from '#/helpers/get-prop.ts';\nimport { strOrUnd } from '#/helpers/str-or-und.ts';\n\nexport const decodeApplicationResponseBase = Effect.fn(function* (value: XmlNode) {\n const root = value || {};\n const doc: XmlNode = yield* getProp(root, 'ubl:ApplicationResponse');\n\n return {\n base: {\n customizationId: yield* strOrUnd(doc, 'cbc:CustomizationID'),\n id: yield* strOrUnd(doc, 'cbc:ID'),\n issueDate: yield* strOrUnd(doc, 'cbc:IssueDate'),\n issueTime: yield* strOrUnd(doc, 'cbc:IssueTime'),\n },\n doc,\n };\n});\n","import { Effect, Predicate } from 'effect';\n\nimport type { XmlNode } from '#/helpers/get-prop.ts';\nimport type { PeppolInvoiceDocumentResponseParty } from '#/schemas/peppol-invoice-response-schema.ts';\nimport type { RecursivePartial } from '#/types.ts';\n\nimport { decodeIdentifier } from '#/decoders/fields/decode-identifier.ts';\nimport { getProp } from '#/helpers/get-prop.ts';\nimport { strOrUnd } from '#/helpers/str-or-und.ts';\n\nexport const decodeInvoiceMessageDocumentParty = Effect.fn(function* (\n party: XmlNode,\n ...path: Array<string>\n): Effect.fn.Return<RecursivePartial<PeppolInvoiceDocumentResponseParty> | undefined> {\n const val = yield* getProp(party, ...path);\n if (Predicate.isNullish(val)) return undefined;\n const partyName = yield* getProp(val, 'cac:PartyName');\n return {\n partyIdentification: yield* decodeIdentifier(val, 'cac:PartyIdentification', 'cbc:ID'),\n partyName: Predicate.isNotNullish(partyName) ? { name: yield* strOrUnd(partyName, 'cbc:Name') } : undefined,\n };\n});\n","import { Effect, Predicate } from 'effect';\n\nimport type { XmlNode } from '#/helpers/get-prop.ts';\n\nimport { decodeContact } from '#/decoders/fields/decode-contact.ts';\nimport { decodeElectronicAddress } from '#/decoders/fields/decode-electronic-address.ts';\nimport { decodeIdentifier } from '#/decoders/fields/decode-identifier.ts';\nimport { decodePartyLegalEntity } from '#/decoders/fields/decode-party-legal-entity.ts';\nimport { getProp } from '#/helpers/get-prop.ts';\n\nexport const decodeInvoiceMessageParty = Effect.fn(function* (party: XmlNode, ...path: Array<string>) {\n const val = yield* getProp(party, ...path);\n if (Predicate.isNullish(val)) return undefined;\n return {\n contact: yield* decodeContact(val, 'cac:Contact'),\n endpointId: yield* decodeElectronicAddress(val, 'cbc:EndpointID'),\n partyIdentification: yield* decodeIdentifier(val, 'cac:PartyIdentification', 'cbc:ID'),\n partyLegalEntity: yield* decodePartyLegalEntity(val, 'cac:PartyLegalEntity'),\n };\n});\n","import { Effect, Predicate } from 'effect';\n\nimport type { XmlNode } from '#/helpers/get-prop.ts';\n\nimport { decodeApplicationResponseBase } from '#/decoders/fields/decode-application-response.ts';\nimport { decodeInvoiceMessageDocumentParty } from '#/decoders/fields/decode-invoice-message-document-party.ts';\nimport { decodeInvoiceMessageParty } from '#/decoders/fields/decode-invoice-message-party.ts';\nimport { getArray } from '#/helpers/get-array.ts';\nimport { getProp } from '#/helpers/get-prop.ts';\nimport { strOrUnd } from '#/helpers/str-or-und.ts';\n\nconst decodeStatusReasonCode = Effect.fn(function* (doc: XmlNode, ...path: Array<string>) {\n const val = yield* getProp(doc, ...path);\n if (!Predicate.isTruthy(val) && val !== 0) return undefined;\n const value = yield* strOrUnd(val);\n if (Predicate.isString(val) || Predicate.isNumber(val)) {\n return { value };\n }\n if (!Predicate.isTruthy(value)) return undefined;\n return { listId: yield* strOrUnd(val, '@listID'), value };\n});\n\nconst decodeCondition = Effect.fn(function* (doc: XmlNode, ...path: Array<string>) {\n const val = yield* getArray(doc, ...path);\n /* istanbul ignore next -- getArray never returns a falsy value */\n if (Predicate.isNullish(val)) return undefined;\n return yield* Effect.forEach(\n val,\n Effect.fn(function* (item: XmlNode) {\n return { attributeId: yield* strOrUnd(item, 'cbc:AttributeID'), description: yield* strOrUnd(item, 'cbc:Description') };\n })\n );\n});\n\nconst decodeDocumentResponseStatus = Effect.fn(function* (doc: XmlNode, ...path: Array<string>) {\n const val = yield* getArray(doc, ...path);\n /* istanbul ignore next -- getArray never returns a falsy value */\n if (Predicate.isNullish(val)) return undefined;\n return yield* Effect.forEach(\n val,\n Effect.fn(function* (item: XmlNode) {\n return {\n condition: yield* decodeCondition(item, 'cac:Condition'),\n statusReason: yield* strOrUnd(item, 'cbc:StatusReason'),\n statusReasonCode: yield* decodeStatusReasonCode(item, 'cbc:StatusReasonCode'),\n };\n })\n );\n});\n\nconst decodeDocumentActualResponse = Effect.fn(function* (doc: XmlNode, ...path: Array<string>) {\n const val = yield* getProp(doc, ...path);\n if (Predicate.isNullish(val)) return undefined;\n return {\n effectiveDate: yield* strOrUnd(val, 'cbc:EffectiveDate'),\n responseCode: yield* strOrUnd(val, 'cbc:ResponseCode'),\n status: yield* decodeDocumentResponseStatus(val, 'cac:Status'),\n };\n});\n\nconst decodeDocumentReference = Effect.fn(function* (doc: XmlNode, ...path: Array<string>) {\n const val = yield* getProp(doc, ...path);\n if (Predicate.isNullish(val)) return undefined;\n return {\n documentTypeCode: yield* strOrUnd(val, 'cbc:DocumentTypeCode'),\n id: yield* strOrUnd(val, 'cbc:ID'),\n issueDate: yield* strOrUnd(val, 'cbc:IssueDate'),\n };\n});\n\nconst decodeDocumentResponse = Effect.fn(function* (doc: XmlNode, ...path: Array<string>) {\n const val = yield* getProp(doc, ...path);\n if (Predicate.isNullish(val)) return undefined;\n\n return {\n documentReference: yield* decodeDocumentReference(val, 'cac:DocumentReference'),\n issuerParty: yield* decodeInvoiceMessageDocumentParty(val, 'cac:IssuerParty'),\n recipientParty: yield* decodeInvoiceMessageDocumentParty(val, 'cac:RecipientParty'),\n response: yield* decodeDocumentActualResponse(val, 'cac:Response'),\n };\n});\n\nexport const decodeInvoiceResponse = Effect.fn(function* (value: XmlNode) {\n const { base, doc } = yield* decodeApplicationResponseBase(value);\n\n return {\n ...base,\n documentResponse: yield* decodeDocumentResponse(doc, 'cac:DocumentResponse'),\n note: yield* strOrUnd(doc, 'cbc:Note'),\n profileId: yield* strOrUnd<'urn:fdc:peppol.eu:poacc:bis:invoice_response:3'>(doc, 'cbc:ProfileID'),\n receiverParty: yield* decodeInvoiceMessageParty(doc, 'cac:ReceiverParty'),\n senderParty: yield* decodeInvoiceMessageParty(doc, 'cac:SenderParty'),\n };\n});\n","import { Effect } from 'effect';\n\nimport type { XmlNode } from '#/helpers/get-prop.ts';\n\nimport { decodeLineShared } from '#/decoders/fields/decode-line-shared.ts';\nimport { decodeNodeList } from '#/decoders/fields/decode-node-list.ts';\nimport { decodeQuantity } from '#/decoders/fields/decode-quantity.ts';\n\nexport const decodeInvoiceLines = Effect.fn('decode-invoice-lines')(function* (doc: XmlNode, ...path: Array<string>) {\n return yield* decodeNodeList(\n doc,\n Effect.fn(function* (lineNode: XmlNode) {\n const shared = yield* decodeLineShared(lineNode);\n return { ...shared, invoicedQuantity: yield* decodeQuantity(lineNode, 'cbc:InvoicedQuantity') };\n }),\n ...path\n );\n});\n","import { Effect } from 'effect';\n\nimport type { XmlNode } from '#/helpers/get-prop.ts';\n\nimport { decodeBilling } from '#/decoders/decode-billing.ts';\nimport { decodeInvoiceLines } from '#/decoders/fields/decode-invoice-lines.ts';\nimport { decodeSimpleIdentifer } from '#/decoders/fields/decode-simple-identifier.ts';\nimport { getProp } from '#/helpers/get-prop.ts';\nimport { strOrUnd } from '#/helpers/str-or-und.ts';\n\nexport const decodeInvoice = Effect.fn('decode-invoice')(function* (value: XmlNode) {\n const root = value || {};\n const doc: XmlNode = (yield* getProp(root, 'ubl:Invoice')) ?? root;\n\n return {\n ...(yield* decodeBilling(doc)),\n dueDate: yield* strOrUnd(doc, 'cbc:DueDate'),\n invoiceLines: yield* decodeInvoiceLines(doc, 'cac:InvoiceLine'),\n invoiceTypeCode: yield* strOrUnd(doc, 'cbc:InvoiceTypeCode'),\n projectReference: yield* decodeSimpleIdentifer(doc, 'cac:ProjectReference'),\n };\n});\n","import { Effect, Predicate } from 'effect';\n\nimport type { XmlNode } from '#/helpers/get-prop.ts';\nimport type { PeppolMessageLevelResponseParty } from '#/schemas/peppol-message-level-response-party-schema.ts';\nimport type { RecursivePartial } from '#/types.ts';\n\nimport { decodeElectronicAddress } from '#/decoders/fields/decode-electronic-address.ts';\nimport { getProp } from '#/helpers/get-prop.ts';\n\nexport const decodeMessageLevelParty = Effect.fn(function* (\n party: XmlNode,\n ...path: Array<string>\n): Effect.fn.Return<RecursivePartial<PeppolMessageLevelResponseParty> | undefined> {\n const val = yield* getProp(party, ...path);\n if (Predicate.isNullish(val)) return undefined;\n return { endpointId: yield* decodeElectronicAddress(val, 'cbc:EndpointID') };\n});\n","import { Effect, Predicate } from 'effect';\n\nimport type { XmlNode } from '#/helpers/get-prop.ts';\n\nimport { decodeApplicationResponseBase } from '#/decoders/fields/decode-application-response.ts';\nimport { decodeMessageLevelParty } from '#/decoders/fields/decode-message-level-party.ts';\nimport { getArray } from '#/helpers/get-array.ts';\nimport { getProp } from '#/helpers/get-prop.ts';\nimport { strOrUnd } from '#/helpers/str-or-und.ts';\n\nconst decodeLineResponseContent = Effect.fn(function* (doc: XmlNode, ...path: Array<string>) {\n const val = yield* getProp(doc, ...path);\n if (Predicate.isNullish(val)) return undefined;\n return {\n description: yield* strOrUnd(val, 'cbc:Description'),\n responseCode: yield* strOrUnd(val, 'cbc:ResponseCode'),\n status: { statusReasonCode: yield* strOrUnd<'BV' | 'BW' | 'SV'>(val, 'cac:Status', 'cbc:StatusReasonCode') },\n };\n});\n\nconst decodeLineResponse = Effect.fn(function* (doc: XmlNode, ...path: Array<string>) {\n const val = yield* getArray(doc, ...path);\n /* istanbul ignore next -- getArray never returns a falsy value */\n if (Predicate.isNullish(val)) return undefined;\n\n return yield* Effect.forEach(\n val,\n Effect.fn(function* (line: XmlNode) {\n return {\n lineReference: { lineId: yield* strOrUnd(line, 'cac:LineReference', 'cbc:LineID') },\n response: yield* decodeLineResponseContent(line, 'cac:Response'),\n };\n })\n );\n});\n\nconst decodeResponse = Effect.fn(function* (doc: XmlNode, ...path: Array<string>) {\n const val = yield* getProp(doc, ...path);\n if (Predicate.isNullish(val)) return undefined;\n return { description: yield* strOrUnd(val, 'cbc:Description'), responseCode: yield* strOrUnd(val, 'cbc:ResponseCode') };\n});\n\nconst decodeDocumentReference = Effect.fn(function* (doc: XmlNode, ...path: Array<string>) {\n const val = yield* getProp(doc, ...path);\n if (Predicate.isNullish(val)) return undefined;\n return {\n documentTypeCode: yield* strOrUnd(val, 'cbc:DocumentTypeCode'),\n id: yield* strOrUnd(val, 'cbc:ID'),\n versionId: yield* strOrUnd(val, 'cbc:VersionID'),\n };\n});\n\nconst decodeDocumentResponse = Effect.fn(function* (doc: XmlNode, ...path: Array<string>) {\n const val = yield* getProp(doc, ...path);\n if (Predicate.isNullish(val)) return undefined;\n\n return {\n documentReference: yield* decodeDocumentReference(val, 'cac:DocumentReference'),\n lineResponse: yield* decodeLineResponse(val, 'cac:LineResponse'),\n response: yield* decodeResponse(val, 'cac:Response'),\n };\n});\n\nexport const decodeMessageLevelResponse = Effect.fn(function* (value: XmlNode) {\n const { base, doc } = yield* decodeApplicationResponseBase(value);\n return {\n ...base,\n documentResponse: yield* decodeDocumentResponse(doc, 'cac:DocumentResponse'),\n profileId: yield* strOrUnd<'urn:fdc:peppol.eu:poacc:bis:mlr:3'>(doc, 'cbc:ProfileID'),\n receiverParty: yield* decodeMessageLevelParty(doc, 'cac:ReceiverParty'),\n senderParty: yield* decodeMessageLevelParty(doc, 'cac:SenderParty'),\n };\n});\n","import { Effect, Predicate } from 'effect';\n\nimport type { PeppolIdentifier } from '#/schemas/fields/peppol-identifier-schema.ts';\n\nexport const encodeIdentifier = Effect.fn(function* (id?: PeppolIdentifier) {\n if (Predicate.isNullish(id)) return undefined;\n if (Predicate.isNullish(id.schemeId) || id.schemeId === '') return id.id;\n return { '#text': id.id, '@schemeID': id.schemeId };\n});\n","import { Effect, Predicate } from 'effect';\n\nimport type { PeppolAdditionalDocumentReference } from '#/schemas/fields/peppol-additional-document-reference-schema.ts';\n\nimport { encodeIdentifier } from '#/decoders/fields/encode-identifier.ts';\n\nexport const encodeAdditionalDocumentReferences = Effect.fn(function* (refs: ReadonlyArray<PeppolAdditionalDocumentReference> | undefined) {\n if (Predicate.isNullish(refs)) return undefined;\n\n return yield* Effect.forEach(\n refs,\n Effect.fn(function* (ref: PeppolAdditionalDocumentReference) {\n return {\n 'cbc:ID': yield* encodeIdentifier(ref.id),\n 'cbc:DocumentTypeCode': ref.documentTypeCode,\n 'cbc:DocumentDescription': ref.documentDescription,\n 'cac:Attachment': yield* encodeAttachment(ref.attachment),\n };\n })\n );\n});\n\nconst encodeAttachment = Effect.fn(function* (attachment: PeppolAdditionalDocumentReference['attachment'] | undefined) {\n if (Predicate.isNullish(attachment)) return undefined;\n return {\n 'cac:ExternalReference': Predicate.isNotNullish(attachment.externalReference) ? { 'cbc:URI': attachment.externalReference.uri } : undefined,\n 'cbc:EmbeddedDocumentBinaryObject': Predicate.isNotNullish(attachment.embeddedDocumentBinaryObject)\n ? {\n '#text': attachment.embeddedDocumentBinaryObject.content,\n '@filename': attachment.embeddedDocumentBinaryObject.filename,\n '@mimeCode': attachment.embeddedDocumentBinaryObject.mimeCode,\n }\n : undefined,\n };\n});\n","import { Effect, Predicate } from 'effect';\n\nimport type { PeppolAmount } from '#/schemas/fields/peppol-amount-schema.ts';\n\nexport const encodeAmount = Effect.fn(function* (amount?: PeppolAmount) {\n if (Predicate.isNullish(amount)) return undefined;\n return { '#text': amount.value, '@currencyID': amount.currencyId };\n});\n","import { Effect, Predicate } from 'effect';\n\ntype Exact<TExpected, TActual extends TExpected> = keyof TExpected extends keyof TActual\n ? keyof TActual extends keyof TExpected\n ? TActual\n : never\n : never;\n\nexport const encodeSimpleIdentifier = Effect.fn(function* <const T extends { id: string } = { id: string }>(\n identifier: Exact<{ id: string }, T> | undefined\n) {\n if (Predicate.isNullish(identifier)) return undefined;\n\n return { 'cbc:ID': identifier.id };\n});\n","import { Effect, Predicate } from 'effect';\n\nimport type { PeppolAllowanceCharge } from '#/schemas/fields/peppol-allowance-charge-schema.ts';\n\nimport { encodeSimpleIdentifier } from '#/decoders/fields/encode-simple-identifier.ts';\n\nexport const encodeTaxCategory = Effect.fn(function* (taxCategory: PeppolAllowanceCharge['taxCategory']) {\n if (Predicate.isNullish(taxCategory)) {\n return undefined;\n }\n return { 'cbc:ID': taxCategory.id, 'cbc:Percent': taxCategory.percent, 'cac:TaxScheme': yield* encodeSimpleIdentifier(taxCategory.taxSchemeId) };\n});\n","import { Effect, Predicate } from 'effect';\n\nimport type { PeppolAllowanceCharge } from '#/schemas/fields/peppol-allowance-charge-schema.ts';\n\nimport { encodeAmount } from '#/decoders/fields/encode-amount.ts';\nimport { encodeTaxCategory } from '#/decoders/fields/encode-tax-category.ts';\n\nexport const encodeAllowanceCharges = Effect.fn(function* (allowanceCharges: ReadonlyArray<PeppolAllowanceCharge> | undefined) {\n if (Predicate.isNullish(allowanceCharges)) return undefined;\n\n return yield* Effect.forEach(\n allowanceCharges,\n Effect.fn(function* (allowanceCharge: PeppolAllowanceCharge) {\n return {\n 'cbc:ChargeIndicator': allowanceCharge.chargeIndicator,\n 'cbc:AllowanceChargeReasonCode': allowanceCharge.allowanceChargeReasonCode,\n 'cbc:AllowanceChargeReason': allowanceCharge.allowanceChargeReason,\n 'cbc:MultiplierFactorNumeric': allowanceCharge.multiplierFactorNumeric,\n 'cbc:Amount': yield* encodeAmount(allowanceCharge.amount),\n 'cbc:BaseAmount': yield* encodeAmount(allowanceCharge.baseAmount),\n 'cac:TaxCategory': yield* encodeTaxCategory(allowanceCharge.taxCategory),\n };\n })\n );\n});\n","import { Effect } from 'effect';\n\nimport type { PeppolBillingReference } from '#/schemas/fields/peppol-billing-reference-schema.ts';\n\nexport const encodeBillingReferences = Effect.fn(function* (billingReferences: ReadonlyArray<PeppolBillingReference> | undefined) {\n return billingReferences?.map(billingReference => ({\n 'cac:InvoiceDocumentReference': {\n 'cbc:ID': billingReference.invoiceDocumentReference.id,\n 'cbc:IssueDate': billingReference.invoiceDocumentReference.issueDate,\n },\n }));\n});\n","import { Effect, Predicate } from 'effect';\n\nimport type { PeppolInvoiceLinePeriod } from '#/schemas/fields/peppol-invoice-line-period-schema.ts';\n\nexport const encodeInvoiceLinePeriod = Effect.fn(function* (invoicePeriod: PeppolInvoiceLinePeriod | undefined) {\n return Predicate.isNotNullish(invoicePeriod) ? { 'cbc:StartDate': invoicePeriod.startDate, 'cbc:EndDate': invoicePeriod.endDate } : undefined;\n});\n","import { Effect, Predicate } from 'effect';\n\nimport type { PeppolLineAllowanceCharge } from '#/schemas/fields/peppol-line-allowance-charge-schema.ts';\n\nimport { encodeAmount } from '#/decoders/fields/encode-amount.ts';\n\nexport const encodeLineAllowanceCharges = Effect.fn(function* (allowanceCharges: ReadonlyArray<PeppolLineAllowanceCharge> | undefined) {\n if (Predicate.isNullish(allowanceCharges)) return undefined;\n\n return yield* Effect.forEach(\n allowanceCharges,\n Effect.fn(function* (allowanceCharge: PeppolLineAllowanceCharge) {\n return {\n 'cbc:ChargeIndicator': allowanceCharge.chargeIndicator,\n 'cbc:AllowanceChargeReasonCode': allowanceCharge.allowanceChargeReasonCode,\n 'cbc:AllowanceChargeReason': allowanceCharge.allowanceChargeReason,\n 'cbc:MultiplierFactorNumeric': allowanceCharge.multiplierFactorNumeric,\n 'cbc:Amount': yield* encodeAmount(allowanceCharge.amount),\n 'cbc:BaseAmount': yield* encodeAmount(allowanceCharge.baseAmount),\n };\n })\n );\n});\n","import { Effect, Predicate } from 'effect';\n\nimport type { PeppolLinePriceAllowanceCharge } from '#/schemas/fields/peppol-line-price-allowance-charge-schema.ts';\n\nimport { encodeAmount } from '#/decoders/fields/encode-amount.ts';\n\nexport const encodePriceAllowanceCharges = Effect.fn(function* (allowanceCharge: PeppolLinePriceAllowanceCharge | undefined) {\n if (Predicate.isNullish(allowanceCharge)) {\n return undefined;\n }\n\n return {\n 'cbc:ChargeIndicator': allowanceCharge.chargeIndicator,\n 'cbc:Amount': yield* encodeAmount(allowanceCharge.amount),\n 'cbc:BaseAmount': yield* encodeAmount(allowanceCharge.baseAmount),\n };\n});\n","import { Effect, Predicate } from 'effect';\n\nimport type { PeppolQuantity } from '#/schemas/fields/peppol-quantity-schema.ts';\n\nexport const encodeQuantity = Effect.fn(function* (quantity?: PeppolQuantity) {\n if (Predicate.isNullish(quantity)) return undefined;\n return { '#text': quantity.value, '@unitCode': quantity.unitCode };\n});\n","import { Effect, Predicate } from 'effect';\n\nimport type { PeppolLinePrice } from '#/schemas/fields/peppol-line-price-schema.ts';\n\nimport { encodeAmount } from '#/decoders/fields/encode-amount.ts';\nimport { encodePriceAllowanceCharges } from '#/decoders/fields/encode-price-allowance-charges.ts';\nimport { encodeQuantity } from '#/decoders/fields/encode-quantity.ts';\n\nexport const encodeLinePrice = Effect.fn(function* (price: PeppolLinePrice | undefined) {\n if (Predicate.isNullish(price)) {\n return undefined;\n }\n return {\n 'cbc:PriceAmount': yield* encodeAmount(price.priceAmount),\n 'cbc:BaseQuantity': yield* encodeQuantity(price.baseQuantity),\n 'cac:AllowanceCharge': yield* encodePriceAllowanceCharges(price.allowanceCharge),\n };\n});\n","import { Effect, Predicate } from 'effect';\n\nimport type { PeppolDocumentLine } from '#/schemas/peppol-document-schema.ts';\n\nimport { encodeAmount } from '#/decoders/fields/encode-amount.ts';\nimport { encodeIdentifier } from '#/decoders/fields/encode-identifier.ts';\nimport { encodeInvoiceLinePeriod } from '#/decoders/fields/encode-invoice-line-period.ts';\nimport { encodeLineAllowanceCharges } from '#/decoders/fields/encode-line-allowance-charges.ts';\nimport { encodeLinePrice } from '#/decoders/fields/encode-line-price.ts';\nimport { encodeQuantity } from '#/decoders/fields/encode-quantity.ts';\nimport { encodeSimpleIdentifier } from '#/decoders/fields/encode-simple-identifier.ts';\nimport { encodeTaxCategory } from '#/decoders/fields/encode-tax-category.ts';\n\nexport const encodeLineShared = Effect.fn(function* (lineShared: PeppolDocumentLine) {\n return {\n 'cbc:ID': lineShared.id,\n 'cbc:Note': lineShared.note,\n 'cbc:InvoicedQuantity': 'invoicedQuantity' in lineShared ? yield* encodeQuantity(lineShared.invoicedQuantity) : undefined,\n 'cbc:CreditedQuantity': 'creditedQuantity' in lineShared ? yield* encodeQuantity(lineShared.creditedQuantity) : undefined,\n 'cbc:LineExtensionAmount': yield* encodeAmount(lineShared.lineExtensionAmount),\n 'cbc:AccountingCost': lineShared.accountingCost,\n 'cac:InvoicePeriod': yield* encodeInvoiceLinePeriod(lineShared.invoicePeriod),\n 'cac:OrderLineReference': lineShared.orderLineReference ? { 'cbc:LineID': lineShared.orderLineReference.lineId } : undefined,\n 'cac:DocumentReference': Predicate.isNullish(lineShared.documentReference)\n ? undefined\n : yield* Effect.forEach(\n lineShared.documentReference,\n Effect.fn(function* (documentReference) {\n return { 'cbc:DocumentTypeCode': documentReference.documentTypeCode, 'cbc:ID': yield* encodeIdentifier(documentReference) };\n })\n ),\n 'cac:AllowanceCharge': yield* encodeLineAllowanceCharges(lineShared.allowanceCharges),\n 'cac:Item': {\n 'cbc:Description': lineShared.item.description,\n 'cbc:Name': lineShared.item.name,\n 'cac:BuyersItemIdentification': yield* encodeSimpleIdentifier(lineShared.item.buyersItemIdentification),\n 'cac:SellersItemIdentification': yield* encodeSimpleIdentifier(lineShared.item.sellersItemIdentification),\n 'cac:StandardItemIdentification': lineShared.item.standardItemIdentification\n ? { 'cbc:ID': yield* encodeIdentifier(lineShared.item.standardItemIdentification.id) }\n : undefined,\n 'cac:OriginCountry': lineShared.item.originCountryCode\n ? { 'cbc:IdentificationCode': lineShared.item.originCountryCode.identificationCode }\n : undefined,\n 'cac:CommodityClassification': lineShared.item.commodityClassifications?.map(c => ({\n 'cbc:ItemClassificationCode': {\n '#text': c.itemClassification.id,\n '@listID': c.itemClassification.listId,\n '@listVersionID': c.itemClassification.listVersionId,\n },\n })),\n 'cac:ClassifiedTaxCategory': yield* encodeTaxCategory(lineShared.item.classifiedTaxCategory),\n 'cac:AdditionalItemProperty': lineShared.item.additionalItemProperties?.map(p => ({ 'cbc:Name': p.name, 'cbc:Value': p.value })),\n },\n 'cac:Price': yield* encodeLinePrice(lineShared.price),\n };\n});\n","import { Effect } from 'effect';\n\nimport type { PeppolCreditNoteLine } from '#/schemas/fields/peppol-credit-note-line-schema.ts';\n\nimport { encodeLineShared } from '#/decoders/fields/encode-line-shared.ts';\n\nexport const encodeCreditNoteLines = Effect.fn(function* (creditNoteLines: ReadonlyArray<PeppolCreditNoteLine>) {\n if (creditNoteLines.length === 0) return undefined;\n\n return yield* Effect.forEach(creditNoteLines, encodeLineShared);\n});\n","import { Effect, Predicate } from 'effect';\n\nimport type { XmlNode } from '#/helpers/get-prop.ts';\nimport type { PeppolAddress } from '#/schemas/fields/peppol-address-schema.ts';\n\nexport const encodeAddress = Effect.fn(function* (address?: PeppolAddress): Effect.fn.Return<XmlNode> {\n if (Predicate.isNullish(address)) return undefined;\n return {\n 'cbc:StreetName': address.streetName,\n 'cbc:AdditionalStreetName': address.additionalStreetName,\n 'cbc:CityName': address.cityName,\n 'cbc:PostalZone': address.postalZone,\n 'cbc:CountrySubentity': address.countrySubentity,\n 'cac:AddressLine': address.addressLine?.line ? { 'cbc:Line': address.addressLine.line } : undefined,\n 'cac:Country': { 'cbc:IdentificationCode': address.countryCode.identificationCode },\n };\n});\n","import { Effect, Predicate } from 'effect';\n\nimport type { PeppolDelivery } from '#/schemas/fields/peppol-delivery-schema.ts';\n\nimport { encodeAddress } from '#/decoders/fields/encode-address.ts';\nimport { encodeIdentifier } from '#/decoders/fields/encode-identifier.ts';\n\nexport const encodeDelivery = Effect.fn(function* (delivery: PeppolDelivery | undefined) {\n if (Predicate.isNullish(delivery)) return undefined;\n\n return {\n 'cbc:ActualDeliveryDate': delivery.actualDeliveryDate,\n 'cac:DeliveryLocation': yield* encodeDeliveryLocation(delivery.deliveryLocation),\n 'cac:DeliveryParty': Predicate.isTruthy(delivery.deliveryParty?.partyName.name)\n ? { 'cac:PartyName': { 'cbc:Name': delivery.deliveryParty?.partyName.name } }\n : undefined,\n };\n});\n\nconst encodeDeliveryLocation = Effect.fn(function* (location: PeppolDelivery['deliveryLocation']) {\n if (Predicate.isNullish(location)) return undefined;\n return { 'cbc:ID': yield* encodeIdentifier(location.id), 'cac:Address': yield* encodeAddress(location.address) };\n});\n","import { Effect, Predicate } from 'effect';\n\nimport type { PeppolInvoicePeriod } from '#/schemas/fields/peppol-invoice-period-schema.ts';\n\nexport const encodeInvoicePeriod = Effect.fn(function* (invoicePeriod: PeppolInvoicePeriod | undefined) {\n return Predicate.isNotNullish(invoicePeriod)\n ? { 'cbc:StartDate': invoicePeriod.startDate, 'cbc:EndDate': invoicePeriod.endDate, 'cbc:DescriptionCode': invoicePeriod.descriptionCode }\n : undefined;\n});\n","import { Effect } from 'effect';\n\nimport type { PeppolLegalMonetaryTotal } from '#/schemas/fields/peppol-legal-monetary-total-schema.ts';\n\nimport { encodeAmount } from '#/decoders/fields/encode-amount.ts';\n\nexport const encodeLegalMonetaryTotal = Effect.fn(function* (legalMonetaryTotal: PeppolLegalMonetaryTotal) {\n return {\n 'cbc:LineExtensionAmount': yield* encodeAmount(legalMonetaryTotal.lineExtensionAmount),\n 'cbc:TaxExclusiveAmount': yield* encodeAmount(legalMonetaryTotal.taxExclusiveAmount),\n 'cbc:TaxInclusiveAmount': yield* encodeAmount(legalMonetaryTotal.taxInclusiveAmount),\n 'cbc:AllowanceTotalAmount': yield* encodeAmount(legalMonetaryTotal.allowanceTotalAmount),\n 'cbc:ChargeTotalAmount': yield* encodeAmount(legalMonetaryTotal.chargeTotalAmount),\n 'cbc:PrepaidAmount': yield* encodeAmount(legalMonetaryTotal.prepaidAmount),\n 'cbc:PayableRoundingAmount': yield* encodeAmount(legalMonetaryTotal.payableRoundingAmount),\n 'cbc:PayableAmount': yield* encodeAmount(legalMonetaryTotal.payableAmount),\n };\n});\n","import { Effect, Predicate } from 'effect';\n\nimport type { PeppolOrderReference } from '#/schemas/fields/peppol-order-reference-schema.ts';\n\nexport const encodeOrderReference = Effect.fn(function* (orderReference: PeppolOrderReference | undefined) {\n if (Predicate.isNullish(orderReference)) return undefined;\n\n return { 'cbc:ID': orderReference.id, 'cbc:SalesOrderID': orderReference.salesOrderId };\n});\n","import { Effect, Predicate } from 'effect';\n\nimport type { PeppolContact } from '#/schemas/fields/peppol-contact-schema.ts';\n\nexport const encodeContact = Effect.fn(function* (contact: PeppolContact | undefined) {\n if (Predicate.isNullish(contact)) return undefined;\n\n return { 'cbc:Name': contact.name, 'cbc:Telephone': contact.telephone, 'cbc:ElectronicMail': contact.electronicMail };\n});\n","import { Effect, Predicate } from 'effect';\n\nimport type { XmlNode } from '#/helpers/get-prop.ts';\nimport type { PeppolPartyTaxSchema } from '#/schemas/fields/peppol-party-tax-scheme-schema.ts';\n\nimport { encodeSimpleIdentifier } from '#/decoders/fields/encode-simple-identifier.ts';\n\nexport const encodePartyTaxScheme = Effect.fn(function* (partyTaxScheme: PeppolPartyTaxSchema | undefined): Effect.fn.Return<XmlNode> {\n if (Predicate.isNullish(partyTaxScheme)) return undefined;\n\n return { 'cbc:CompanyID': partyTaxScheme.companyId, 'cac:TaxScheme': yield* encodeSimpleIdentifier(partyTaxScheme.taxSchemeId) };\n});\n","import { Effect, Predicate } from 'effect';\n\nimport type { XmlNode } from '#/helpers/get-prop.ts';\nimport type { PeppolPartyTaxSchema } from '#/schemas/fields/peppol-party-tax-scheme-schema.ts';\n\nimport { encodePartyTaxScheme } from '#/decoders/fields/encode-party-tax-scheme.ts';\n\nexport const encodePartiesTaxScheme = Effect.fn(function* (partiesTaxScheme: Array<PeppolPartyTaxSchema> | undefined): Effect.fn.Return<XmlNode> {\n if (Predicate.isNullish(partiesTaxScheme) || partiesTaxScheme.length === 0) return undefined;\n\n return yield* Effect.forEach(\n partiesTaxScheme,\n Effect.fn(function* (partyTaxScheme: PeppolPartyTaxSchema) {\n return yield* encodePartyTaxScheme(partyTaxScheme);\n })\n );\n});\n","import { Effect } from 'effect';\n\nimport { encodeIdentifier } from '#/decoders/fields/encode-identifier.ts';\n\nexport const encodePartyLegalEntity = Effect.fn(function* (legalEntity: {\n registrationName?: string;\n companyId?: Parameters<typeof encodeIdentifier>[0];\n companyLegalForm?: string | undefined;\n}) {\n return {\n 'cbc:RegistrationName': legalEntity.registrationName,\n 'cbc:CompanyID': yield* encodeIdentifier(legalEntity.companyId),\n 'cbc:CompanyLegalForm': legalEntity.companyLegalForm,\n };\n});\n","import { Effect, Predicate } from 'effect';\n\nimport type { PeppolPartySchema } from '#/schemas/fields/peppol-party-base-schema.ts';\n\nimport { encodeAddress } from '#/decoders/fields/encode-address.ts';\nimport { encodeContact } from '#/decoders/fields/encode-contact.ts';\nimport { encodeIdentifier } from '#/decoders/fields/encode-identifier.ts';\nimport { encodePartiesTaxScheme } from '#/decoders/fields/encode-parties-tax-scheme.ts';\nimport { encodePartyLegalEntity } from '#/decoders/fields/encode-party-legal-entity.ts';\n\nexport const encodeParty = Effect.fn(function* (party?: PeppolPartySchema) {\n if (Predicate.isNullish(party)) return undefined;\n\n return {\n 'cac:Party': {\n 'cbc:EndpointID': yield* encodeIdentifier(party.endpointId),\n 'cac:PartyIdentification': yield* encodeAdditionalIdentifiers(party.partyIdentification),\n 'cac:PartyName': yield* encodePartyName(party.partyName),\n 'cac:PostalAddress': yield* encodeAddress(party.postalAddress),\n 'cac:PartyTaxScheme': yield* encodePartiesTaxScheme(party.partyTaxSchemes),\n 'cac:PartyLegalEntity': yield* encodePartyLegalEntity(party.partyLegalEntity),\n 'cac:Contact': yield* encodeContact(party.contact),\n },\n };\n});\n\nconst encodePartyName = Effect.fn(function* (partyName?: PeppolPartySchema['partyName']) {\n if (Predicate.isNullish(partyName)) return undefined;\n return { 'cbc:Name': partyName.name };\n});\n\nconst encodeAdditionalIdentifiers = Effect.fn(function* (identifiers: PeppolPartySchema['partyIdentification']) {\n if (Predicate.isNullish(identifiers)) return undefined;\n return { 'cbc:ID': yield* encodeIdentifier(identifiers?.id) };\n});\n","import { Effect, Predicate } from 'effect';\n\nimport type { PeppolPayeeParty } from '#/schemas/fields/peppol-payee-party-schema.ts';\n\nimport { encodeIdentifier } from '#/decoders/fields/encode-identifier.ts';\n\nexport const encodePayeeParty = Effect.fn(function* (payeeParty: PeppolPayeeParty | undefined) {\n if (Predicate.isNullish(payeeParty)) return undefined;\n return {\n 'cac:PartyIdentification': yield* encodePartyIdentification(payeeParty.partyIdentification),\n 'cac:PartyName': yield* encodePartyName(payeeParty.partyName),\n 'cac:PartyLegalEntity': yield* encodePartyLegalEntity(payeeParty.partyLegalEntity),\n };\n});\n\nconst encodePartyName = Effect.fn(function* (partyName: PeppolPayeeParty['partyName']) {\n return { 'cbc:Name': partyName.name };\n});\n\nconst encodePartyLegalEntity = Effect.fn(function* (partyLegalEntity: PeppolPayeeParty['partyLegalEntity']) {\n if (Predicate.isNullish(partyLegalEntity)) return undefined;\n return { 'cbc:CompanyId': Predicate.isTruthy(partyLegalEntity?.companyId) ? yield* encodeIdentifier(partyLegalEntity?.companyId) : undefined };\n});\n\nconst encodePartyIdentification = Effect.fn(function* (partyIdentification: PeppolPayeeParty['partyIdentification']) {\n if (Predicate.isNullish(partyIdentification)) return undefined;\n return { 'cbc:ID': Predicate.isTruthy(partyIdentification.id) ? yield* encodeIdentifier(partyIdentification.id) : undefined };\n});\n","import { Effect, Predicate } from 'effect';\n\nimport type { PeppolPaymentMeans } from '#/schemas/fields/peppol-payment-means-schema.ts';\n\nimport { encodeSimpleIdentifier } from '#/decoders/fields/encode-simple-identifier.ts';\n\nexport const encodePaymentMeans = Effect.fn(function* (pms: ReadonlyArray<PeppolPaymentMeans> | undefined) {\n if (Predicate.isNullish(pms)) return undefined;\n\n return yield* Effect.forEach(\n pms,\n Effect.fn(function* (pm: PeppolPaymentMeans) {\n return {\n 'cbc:PaymentMeansCode': yield* encodePaymentMeansCode(pm.paymentMeansCode),\n 'cbc:PaymentID': pm.paymentId,\n 'cbc:PaymentDueDate': pm.paymentDueDate,\n 'cac:CardAccount': Predicate.isNotNullish(pm.cardAccount)\n ? {\n 'cbc:PrimaryAccountNumberID': pm.cardAccount.primaryAccountNumberId,\n 'cbc:NetworkID': pm.cardAccount.networkId,\n 'cbc:HolderName': pm.cardAccount.holderName,\n }\n : undefined,\n 'cac:PayeeFinancialAccount': yield* encodePayeeFinancialAccount(pm.payeeFinancialAccount),\n 'cac:PaymentMandate': yield* encodePaymentMendate(pm.paymentMandate),\n };\n })\n );\n});\n\nconst encodePaymentMeansCode = Effect.fn(function* (code: PeppolPaymentMeans['paymentMeansCode'] | undefined) {\n if (Predicate.isNullish(code)) return undefined;\n return { '#text': code.code, '@name': code.name };\n});\n\nconst encodePaymentMendate = Effect.fn(function* (mendate: PeppolPaymentMeans['paymentMandate'] | undefined) {\n if (Predicate.isNullish(mendate)) return undefined;\n return { 'cbc:Id': mendate.id, 'cac:PayerFinancialAccount': yield* encodeSimpleIdentifier(mendate.payerFinancialAccountId) };\n});\n\nconst encodePayeeFinancialAccount = Effect.fn(function* (account: PeppolPaymentMeans['payeeFinancialAccount'] | undefined) {\n if (Predicate.isNullish(account)) return undefined;\n return {\n 'cbc:ID': account.id,\n 'cbc:Name': account.name,\n 'cac:FinancialInstitutionBranch': yield* encodeSimpleIdentifier(account.financialInstitutionBranch),\n };\n});\n","import { Effect, Predicate } from 'effect';\n\nimport type { PeppolPaymentTerms } from '#/schemas/fields/peppol-payment-terms-schema.ts';\n\nexport const encodePaymentTerms = Effect.fn(function* (paymentTerms: PeppolPaymentTerms | undefined) {\n if (Predicate.isNullish(paymentTerms)) return undefined;\n\n return { 'cbc:Note': paymentTerms.note };\n});\n","import { Effect, Predicate } from 'effect';\n\nimport type { XmlNode } from '#/helpers/get-prop.ts';\nimport type { PeppolTaxRepresentativeParty } from '#/schemas/fields/peppol-tax-representative-schema.ts';\n\nimport { encodeAddress } from '#/decoders/fields/encode-address.ts';\nimport { encodePartyTaxScheme } from '#/decoders/fields/encode-party-tax-scheme.ts';\n\nexport const encodeTaxRepresentativeParty = Effect.fn(function* (\n taxRepresentativeParty: PeppolTaxRepresentativeParty | undefined\n): Effect.fn.Return<XmlNode> {\n if (Predicate.isNullish(taxRepresentativeParty)) {\n return undefined;\n }\n return {\n 'cac:PartyName': { 'cbc:Name': taxRepresentativeParty.name },\n 'cac:PostalAddress': yield* encodeAddress(taxRepresentativeParty.postalAddress),\n 'cac:PartyTaxScheme': yield* encodePartyTaxScheme(taxRepresentativeParty.partyTaxScheme),\n };\n});\n","import { Effect, Predicate } from 'effect';\n\nimport type { PeppolTaxSubTotal } from '#/schemas/fields/peppol-tax-subtotal-schema.ts';\nimport type { PeppolTaxTotal } from '#/schemas/fields/peppol-tax-totals-base-schema.ts';\n\nimport { encodeAmount } from '#/decoders/fields/encode-amount.ts';\nimport { encodeSimpleIdentifier } from '#/decoders/fields/encode-simple-identifier.ts';\n\nexport const encodeTaxTotals = Effect.fn(function* (taxTotals: ReadonlyArray<PeppolTaxTotal>) {\n return yield* Effect.forEach(\n taxTotals,\n Effect.fn(function* (taxTotal: PeppolTaxTotal) {\n return { 'cbc:TaxAmount': yield* encodeAmount(taxTotal.taxAmount), 'cac:TaxSubtotal': yield* encodeTaxSubtotals(taxTotal.taxSubtotals) };\n })\n );\n});\n\nconst encodeTaxSubtotals = Effect.fn(function* (taxSubtotals: ReadonlyArray<PeppolTaxSubTotal> | undefined) {\n if (Predicate.isNullish(taxSubtotals)) return undefined;\n\n return yield* Effect.forEach(\n taxSubtotals,\n Effect.fn(function* (taxSubTotal: PeppolTaxSubTotal) {\n return {\n 'cbc:TaxableAmount': yield* encodeAmount(taxSubTotal.taxableAmount),\n 'cbc:TaxAmount': yield* encodeAmount(taxSubTotal.taxAmount),\n 'cac:TaxCategory': {\n 'cbc:ID': taxSubTotal.taxCategory.id,\n 'cbc:Percent': taxSubTotal.taxCategory.percent,\n 'cbc:TaxExemptionReasonCode': taxSubTotal.taxCategory.taxExemptionReasonCode,\n 'cbc:TaxExemptionReason': taxSubTotal.taxCategory.taxExemptionReason,\n 'cac:TaxScheme': yield* encodeSimpleIdentifier(taxSubTotal.taxCategory.taxSchemeId),\n },\n };\n })\n );\n});\n","import { Effect } from 'effect';\n\nimport type { PeppolCreditNote } from '#/schemas/peppol-credit-note-schema.ts';\n\nimport { encodeAdditionalDocumentReferences } from '#/decoders/fields/encode-additional-document-references.ts';\nimport { encodeAllowanceCharges } from '#/decoders/fields/encode-allowance-charges.ts';\nimport { encodeBillingReferences } from '#/decoders/fields/encode-billing-references.ts';\nimport { encodeCreditNoteLines } from '#/decoders/fields/encode-credit-note-lines.ts';\nimport { encodeDelivery } from '#/decoders/fields/encode-delivery.ts';\nimport { encodeInvoicePeriod } from '#/decoders/fields/encode-invoice-period.ts';\nimport { encodeLegalMonetaryTotal } from '#/decoders/fields/encode-legal-monetary-total.ts';\nimport { encodeOrderReference } from '#/decoders/fields/encode-order-reference.ts';\nimport { encodeParty } from '#/decoders/fields/encode-party.ts';\nimport { encodePayeeParty } from '#/decoders/fields/encode-payee-party.ts';\nimport { encodePaymentMeans } from '#/decoders/fields/encode-payment-means.ts';\nimport { encodePaymentTerms } from '#/decoders/fields/encode-payment-terms.ts';\nimport { encodeSimpleIdentifier } from '#/decoders/fields/encode-simple-identifier.ts';\nimport { encodeTaxRepresentativeParty } from '#/decoders/fields/encode-tax-representative-party.ts';\nimport { encodeTaxTotals } from '#/decoders/fields/encode-tax-totals.ts';\n\nexport const encodeCreditNote = Effect.fn(function* (creditNote: PeppolCreditNote) {\n return {\n '?xml': { '@version': '1.0', '@encoding': 'UTF-8' },\n CreditNote: {\n '@xmlns:xsi': 'http://www.w3.org/2001/XMLSchema-instance',\n '@xsi:schemaLocation':\n import.meta.env['MODE'] === 'test'\n ? 'urn:oasis:names:specification:ubl:schema:xsd:CreditNote-2 https://docs.oasis-open.org/ubl/os-UBL-2.4/xsd/maindoc/UBL-CreditNote-2.4.xsd urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2 https://docs.oasis-open.org/ubl/os-UBL-2.4/xsd/common/UBL-CommonAggregateComponents-2.4.xsd urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2 https://docs.oasis-open.org/ubl/os-UBL-2.4/xsd/common/UBL-CommonBasicComponents-2.4.xsd'\n : undefined,\n '@xmlns:cac': 'urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2',\n '@xmlns:cbc': 'urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2',\n '@xmlns': 'urn:oasis:names:specification:ubl:schema:xsd:CreditNote-2',\n 'cbc:CustomizationID': creditNote.customizationId,\n 'cbc:ProfileID': creditNote.profileId,\n 'cbc:ID': creditNote.id,\n 'cbc:IssueDate': creditNote.issueDate,\n 'cbc:CreditNoteTypeCode': creditNote.creditNoteTypeCode,\n 'cbc:Note': creditNote.note,\n 'cbc:TaxPointDate': creditNote.taxPointDate,\n 'cbc:DocumentCurrencyCode': creditNote.documentCurrencyCode,\n 'cbc:TaxCurrencyCode': creditNote.taxCurrencyCode,\n 'cbc:AccountingCost': creditNote.accountingCost,\n 'cbc:BuyerReference': creditNote.buyerReference,\n 'cac:InvoicePeriod': yield* encodeInvoicePeriod(creditNote.invoicePeriod),\n 'cac:OrderReference': yield* encodeOrderReference(creditNote.orderReference),\n 'cac:BillingReference': yield* encodeBillingReferences(creditNote.billingReferences),\n 'cac:DespatchDocumentReference': yield* encodeSimpleIdentifier(creditNote.despatchDocumentReference),\n 'cac:ReceiptDocumentReference': yield* encodeSimpleIdentifier(creditNote.receiptDocumentReference),\n 'cac:OriginatorDocumentReference': yield* encodeSimpleIdentifier(creditNote.originatorDocumentReference),\n 'cac:ContractDocumentReference': yield* encodeSimpleIdentifier(creditNote.contractDocumentReference),\n 'cac:AdditionalDocumentReference': yield* encodeAdditionalDocumentReferences(creditNote.additionalDocumentReferences),\n 'cac:AccountingSupplierParty': yield* encodeParty(creditNote.accountingSupplierParty),\n 'cac:AccountingCustomerParty': yield* encodeParty(creditNote.accountingCustomerParty),\n 'cac:PayeeParty': yield* encodePayeeParty(creditNote.payeeParty),\n 'cac:TaxRepresentativeParty': yield* encodeTaxRepresentativeParty(creditNote.taxRepresentativeParty),\n 'cac:Delivery': yield* encodeDelivery(creditNote.delivery),\n 'cac:PaymentMeans': yield* encodePaymentMeans(creditNote.paymentMeans),\n 'cac:PaymentTerms': yield* encodePaymentTerms(creditNote.paymentTerms),\n 'cac:AllowanceCharge': yield* encodeAllowanceCharges(creditNote.allowanceCharges),\n 'cac:TaxTotal': yield* encodeTaxTotals(creditNote.taxTotals),\n 'cac:LegalMonetaryTotal': yield* encodeLegalMonetaryTotal(creditNote.legalMonetaryTotal),\n 'cac:CreditNoteLine': yield* encodeCreditNoteLines(creditNote.creditNoteLines),\n },\n };\n});\n","import { Effect, Predicate } from 'effect';\n\nimport type { PeppolContact } from '#/schemas/fields/peppol-contact-schema.ts';\nimport type { PeppolIdentifier } from '#/schemas/fields/peppol-identifier-schema.ts';\nimport type { PeppolInvoiceDocumentResponseParty, PeppolInvoiceResponseParty } from '#/schemas/peppol-invoice-response-schema.ts';\nimport type { PeppolMessageLevelResponseParty } from '#/schemas/peppol-message-level-response-party-schema.ts';\n\nimport { encodeContact } from '#/decoders/fields/encode-contact.ts';\nimport { encodeIdentifier } from '#/decoders/fields/encode-identifier.ts';\nimport { encodePartyLegalEntity } from '#/decoders/fields/encode-party-legal-entity.ts';\n\ntype ResponseParty = PeppolMessageLevelResponseParty | PeppolInvoiceResponseParty | PeppolInvoiceDocumentResponseParty;\n\n/**\n * @description The response party union exposes different fields per variant; reading the optional ones through a shared view keeps the encoder branch-free.\n */\ninterface ResponsePartyFields {\n endpointId?: PeppolIdentifier | undefined;\n partyIdentification?: PeppolIdentifier | undefined;\n partyName?: { name: string } | undefined;\n partyLegalEntity?:\n | { registrationName?: string | undefined; companyId?: PeppolIdentifier | undefined; companyLegalForm?: string | undefined }\n | undefined;\n contact?: PeppolContact | undefined;\n}\n\nexport const encodeMessageParty = Effect.fn(function* (party?: ResponseParty) {\n if (Predicate.isNullish(party)) return undefined;\n const fields = party as ResponsePartyFields;\n return {\n 'cbc:EndpointID': yield* encodeIdentifier(fields.endpointId),\n 'cac:PartyIdentification': fields.partyIdentification ? { 'cbc:ID': yield* encodeIdentifier(fields.partyIdentification) } : undefined,\n 'cac:PartyName': fields.partyName ? { 'cbc:Name': fields.partyName.name } : undefined,\n 'cac:PartyLegalEntity': fields.partyLegalEntity ? yield* encodePartyLegalEntity(fields.partyLegalEntity) : undefined,\n 'cac:Contact': yield* encodeContact(fields.contact),\n };\n});\n","import { Effect, Predicate } from 'effect';\n\nimport type {\n PeppolInvoiceResponse,\n PeppolInvoiceResponseDocumentReference,\n PeppolInvoiceResponseDocumentResponse,\n} from '#/schemas/peppol-invoice-response-schema.ts';\n\nimport { encodeMessageParty } from '#/decoders/fields/encode-message-party.ts';\n\nexport const encodeInvoiceResponse = Effect.fn(function* (invoiceResponse: PeppolInvoiceResponse) {\n return {\n '?xml': { '@version': '1.0', '@encoding': 'UTF-8' },\n ApplicationResponse: {\n '@xmlns:xsi': 'http://www.w3.org/2001/XMLSchema-instance',\n '@xsi:schemaLocation':\n import.meta.env['MODE'] === 'test'\n ? 'urn:oasis:names:specification:ubl:schema:xsd:ApplicationResponse-2 https://docs.oasis-open.org/ubl/os-UBL-2.4/xsd/maindoc/UBL-ApplicationResponse-2.4.xsd urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2 https://docs.oasis-open.org/ubl/os-UBL-2.4/xsd/common/UBL-CommonAggregateComponents-2.4.xsd urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2 https://docs.oasis-open.org/ubl/os-UBL-2.4/xsd/common/UBL-CommonBasicComponents-2.4.xsd'\n : undefined,\n '@xmlns:cac': 'urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2',\n '@xmlns:cbc': 'urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2',\n '@xmlns': 'urn:oasis:names:specification:ubl:schema:xsd:ApplicationResponse-2',\n 'cbc:CustomizationID': invoiceResponse.customizationId,\n 'cbc:ProfileID': invoiceResponse.profileId,\n 'cbc:ID': invoiceResponse.id,\n 'cbc:IssueDate': invoiceResponse.issueDate,\n 'cbc:IssueTime': invoiceResponse.issueTime,\n 'cbc:Note': invoiceResponse.note,\n 'cac:SenderParty': yield* encodeMessageParty(invoiceResponse.senderParty),\n 'cac:ReceiverParty': yield* encodeMessageParty(invoiceResponse.receiverParty),\n 'cac:DocumentResponse': yield* encodeDocumentResponse(invoiceResponse.documentResponse),\n },\n };\n});\n\nconst encodeDocumentResponse = Effect.fn(function* (documentResponse: PeppolInvoiceResponseDocumentResponse) {\n if (Predicate.isNullish(documentResponse)) {\n return undefined;\n }\n return {\n 'cac:Response': {\n 'cbc:ResponseCode': documentResponse.response.responseCode,\n 'cbc:EffectiveDate': documentResponse.response.effectiveDate,\n 'cac:Status': documentResponse.response.status?.map(status => ({\n 'cbc:StatusReasonCode': Predicate.isNotNullish(status.statusReasonCode)\n ? { '#text': status.statusReasonCode.value, '@listID': status.statusReasonCode.listId }\n : undefined,\n 'cbc:StatusReason': status.statusReason,\n 'cac:Condition': status.condition?.map(condition => ({ 'cbc:AttributeID': condition.attributeId, 'cbc:Description': condition.description })),\n })),\n },\n 'cac:DocumentReference': yield* encodeDocumentReference(documentResponse.documentReference),\n 'cac:IssuerParty': yield* encodeMessageParty(documentResponse.issuerParty),\n 'cac:RecipientParty': yield* encodeMessageParty(documentResponse.recipientParty),\n };\n});\n\nconst encodeDocumentReference = Effect.fn(function* (documentReference: PeppolInvoiceResponseDocumentReference) {\n if (Predicate.isNullish(documentReference)) return undefined;\n return { 'cbc:ID': documentReference.id, 'cbc:IssueDate': documentReference.issueDate, 'cbc:DocumentTypeCode': documentReference.documentTypeCode };\n});\n","import { Effect } from 'effect';\n\nimport type { PeppolInvoiceLine } from '#/schemas/fields/peppol-invoice-line-schema.ts';\n\nimport { encodeLineShared } from '#/decoders/fields/encode-line-shared.ts';\n\nexport const encodeInvoiceLines = Effect.fn(function* (invoiceLines: ReadonlyArray<PeppolInvoiceLine>) {\n if (invoiceLines.length === 0) return undefined;\n\n return yield* Effect.forEach(invoiceLines, encodeLineShared);\n});\n","import { Effect } from 'effect';\n\nimport type { PeppolInvoice } from '#/schemas/peppol-invoice-schema.ts';\n\nimport { encodeAdditionalDocumentReferences } from '#/decoders/fields/encode-additional-document-references.ts';\nimport { encodeAllowanceCharges } from '#/decoders/fields/encode-allowance-charges.ts';\nimport { encodeBillingReferences } from '#/decoders/fields/encode-billing-references.ts';\nimport { encodeDelivery } from '#/decoders/fields/encode-delivery.ts';\nimport { encodeInvoiceLines } from '#/decoders/fields/encode-invoice-lines.ts';\nimport { encodeInvoicePeriod } from '#/decoders/fields/encode-invoice-period.ts';\nimport { encodeLegalMonetaryTotal } from '#/decoders/fields/encode-legal-monetary-total.ts';\nimport { encodeOrderReference } from '#/decoders/fields/encode-order-reference.ts';\nimport { encodeParty } from '#/decoders/fields/encode-party.ts';\nimport { encodePayeeParty } from '#/decoders/fields/encode-payee-party.ts';\nimport { encodePaymentMeans } from '#/decoders/fields/encode-payment-means.ts';\nimport { encodePaymentTerms } from '#/decoders/fields/encode-payment-terms.ts';\nimport { encodeSimpleIdentifier } from '#/decoders/fields/encode-simple-identifier.ts';\nimport { encodeTaxRepresentativeParty } from '#/decoders/fields/encode-tax-representative-party.ts';\nimport { encodeTaxTotals } from '#/decoders/fields/encode-tax-totals.ts';\n\nexport const encodeInvoice = Effect.fn(function* (invoice: PeppolInvoice) {\n return {\n '?xml': { '@version': '1.0', '@encoding': 'UTF-8' },\n Invoice: {\n '@xmlns:xsi': 'http://www.w3.org/2001/XMLSchema-instance',\n '@xmlns:cac': 'urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2',\n '@xmlns:cbc': 'urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2',\n '@xmlns': 'urn:oasis:names:specification:ubl:schema:xsd:Invoice-2',\n 'cbc:CustomizationID': invoice.customizationId,\n 'cbc:ProfileID': invoice.profileId,\n 'cbc:ID': invoice.id,\n 'cbc:IssueDate': invoice.issueDate,\n 'cbc:DueDate': invoice.dueDate,\n 'cbc:InvoiceTypeCode': invoice.invoiceTypeCode,\n 'cbc:Note': invoice.note,\n 'cbc:TaxPointDate': invoice.taxPointDate,\n 'cbc:DocumentCurrencyCode': invoice.documentCurrencyCode,\n 'cbc:TaxCurrencyCode': invoice.taxCurrencyCode,\n 'cbc:AccountingCost': invoice.accountingCost,\n 'cbc:BuyerReference': invoice.buyerReference,\n 'cac:InvoicePeriod': yield* encodeInvoicePeriod(invoice.invoicePeriod),\n 'cac:OrderReference': yield* encodeOrderReference(invoice.orderReference),\n 'cac:BillingReference': yield* encodeBillingReferences(invoice.billingReferences),\n 'cac:DespatchDocumentReference': yield* encodeSimpleIdentifier(invoice.despatchDocumentReference),\n 'cac:ReceiptDocumentReference': yield* encodeSimpleIdentifier(invoice.receiptDocumentReference),\n 'cac:OriginatorDocumentReference': yield* encodeSimpleIdentifier(invoice.originatorDocumentReference),\n 'cac:ContractDocumentReference': yield* encodeSimpleIdentifier(invoice.contractDocumentReference),\n 'cac:AdditionalDocumentReference': yield* encodeAdditionalDocumentReferences(invoice.additionalDocumentReferences),\n 'cac:ProjectReference': yield* encodeSimpleIdentifier(invoice.projectReference),\n 'cac:AccountingSupplierParty': yield* encodeParty(invoice.accountingSupplierParty),\n 'cac:AccountingCustomerParty': yield* encodeParty(invoice.accountingCustomerParty),\n 'cac:PayeeParty': yield* encodePayeeParty(invoice.payeeParty),\n 'cac:TaxRepresentativeParty': yield* encodeTaxRepresentativeParty(invoice.taxRepresentativeParty),\n 'cac:Delivery': yield* encodeDelivery(invoice.delivery),\n 'cac:PaymentMeans': yield* encodePaymentMeans(invoice.paymentMeans),\n 'cac:PaymentTerms': yield* encodePaymentTerms(invoice.paymentTerms),\n 'cac:AllowanceCharge': yield* encodeAllowanceCharges(invoice.allowanceCharges),\n 'cac:TaxTotal': yield* encodeTaxTotals(invoice.taxTotals),\n 'cac:LegalMonetaryTotal': yield* encodeLegalMonetaryTotal(invoice.legalMonetaryTotal),\n 'cac:InvoiceLine': yield* encodeInvoiceLines(invoice.invoiceLines),\n },\n };\n});\n","import { Effect } from 'effect';\n\nimport type { PeppolMessageLevelResponseDocumentResponse } from '#/schemas/peppol-message-level-response-document-response-schema.ts';\nimport type { PeppolMessageLevelResponse } from '#/schemas/peppol-message-level-response-schema.ts';\n\nimport { encodeMessageParty } from '#/decoders/fields/encode-message-party.ts';\n\nexport const encodeMessageLevelResponse = Effect.fn(function* (messageResponse: PeppolMessageLevelResponse) {\n return {\n '?xml': { '@version': '1.0', '@encoding': 'UTF-8' },\n ApplicationResponse: {\n '@xmlns:xsi': 'http://www.w3.org/2001/XMLSchema-instance',\n '@xsi:schemaLocation':\n import.meta.env['MODE'] === 'test'\n ? 'urn:oasis:names:specification:ubl:schema:xsd:ApplicationResponse-2 https://docs.oasis-open.org/ubl/os-UBL-2.4/xsd/maindoc/UBL-ApplicationResponse-2.4.xsd urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2 https://docs.oasis-open.org/ubl/os-UBL-2.4/xsd/common/UBL-CommonAggregateComponents-2.4.xsd urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2 https://docs.oasis-open.org/ubl/os-UBL-2.4/xsd/common/UBL-CommonBasicComponents-2.4.xsd'\n : undefined,\n '@xmlns:cac': 'urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2',\n '@xmlns:cbc': 'urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2',\n '@xmlns': 'urn:oasis:names:specification:ubl:schema:xsd:ApplicationResponse-2',\n 'cbc:CustomizationID': messageResponse.customizationId,\n 'cbc:ProfileID': messageResponse.profileId,\n 'cbc:ID': messageResponse.id,\n 'cbc:IssueDate': messageResponse.issueDate,\n 'cbc:IssueTime': messageResponse.issueTime,\n 'cac:SenderParty': yield* encodeMessageParty(messageResponse.senderParty),\n 'cac:ReceiverParty': yield* encodeMessageParty(messageResponse.receiverParty),\n 'cac:DocumentResponse': yield* encodeMessageLevelDocumentResponse(messageResponse.documentResponse),\n },\n };\n});\n\nconst encodeMessageLevelDocumentResponse = Effect.fn(function* (documentResponse: PeppolMessageLevelResponseDocumentResponse) {\n return {\n 'cac:Response': { 'cbc:ResponseCode': documentResponse.response.responseCode, 'cbc:Description': documentResponse.response.description },\n 'cac:DocumentReference': {\n 'cbc:ID': documentResponse.documentReference.id,\n 'cbc:DocumentTypeCode': documentResponse.documentReference.documentTypeCode,\n 'cbc:VersionID': documentResponse.documentReference.versionId,\n },\n 'cac:LineResponse': documentResponse.lineResponse.map(line => ({\n 'cac:LineReference': { 'cbc:LineID': line.lineReference.lineId },\n 'cac:Response': {\n 'cbc:ResponseCode': line.response.responseCode,\n 'cbc:Description': line.response.description,\n 'cac:Status': { 'cbc:StatusReasonCode': line.response.status.statusReasonCode },\n },\n })),\n };\n});\n","import type { SchemaAST } from 'effect';\n\nimport { Effect, Predicate, Schema, SchemaGetter, SchemaIssue } from 'effect';\nimport XMLBuilder from 'fast-xml-builder';\n\nimport type { XmlNode } from '#/helpers/get-prop.ts';\nimport type { PeppolCreditNoteLine } from '#/schemas/fields/peppol-credit-note-line-schema.ts';\nimport type { PeppolInvoiceLine } from '#/schemas/fields/peppol-invoice-line-schema.ts';\n\nimport { INVOICE_RESPONSE_PROFILE_ID } from '#/constants/invoice-response-profile-id.ts';\nimport { MESSAGE_LEVEL_RESPONSE_PROFILE_ID } from '#/constants/message-level-response-profile-id.ts';\nimport { decodeCreditNote } from '#/decoders/decode-credit-note.ts';\nimport { decodeInvoiceResponse } from '#/decoders/decode-invoice-response.ts';\nimport { decodeInvoice } from '#/decoders/decode-invoice.ts';\nimport { decodeMessageLevelResponse } from '#/decoders/decode-message-level-response.ts';\nimport { encodeCreditNote } from '#/decoders/encode-credit-note.ts';\nimport { encodeInvoiceResponse } from '#/decoders/encode-invoice-response.ts';\nimport { encodeInvoice } from '#/decoders/encode-invoice.ts';\nimport { encodeMessageLevelResponse } from '#/decoders/encode-message-level-response.ts';\nimport { strOrUnd } from '#/helpers/str-or-und.ts';\nimport { PeppolCreditNote } from '#/schemas/peppol-credit-note-schema.ts';\nimport { PeppolInvoiceResponse } from '#/schemas/peppol-invoice-response-schema.ts';\nimport { PeppolInvoice } from '#/schemas/peppol-invoice-schema.ts';\nimport { PeppolMessageLevelResponse } from '#/schemas/peppol-message-level-response-schema.ts';\nimport { opaque } from '#/schemas/utils/opaque.ts';\nimport { builderOptions } from '#/xml/builder-options.ts';\nimport { parseXmlNodable } from '#/xml/nodable-parser.ts';\n\n/**\n * @description Object representation of a PEPPOL document, before the member schemas normalise it (dates stay strings, enums stay loose). This is the shape\n * produced by the legacy `#/decoders/*` functions and consumed by their `#/decoders/encode-*` counterparts.\n */\nconst peppolDocumentObjectSchema = Schema.Union([PeppolInvoice, PeppolCreditNote, PeppolMessageLevelResponse, PeppolInvoiceResponse], {\n mode: 'oneOf',\n});\n\ntype PeppolDocumentObject = typeof peppolDocumentObjectSchema.Encoded;\n\nconst parseXml = (value: string): XmlNode => parseXmlNodable(value);\n\n/**\n * @description Type guard that returns `true` when a decoded value is a {@link PeppolInvoice}.\n *\n * @example\n * ```ts\n * isPeppolInvoice(doc); // true for a UBL Invoice\n * ```;\n *\n * @see {@link PeppolDocumentSchema}\n */\nexport const isPeppolInvoice = Schema.is(PeppolInvoice);\n/**\n * @description Type guard that returns `true` when a decoded value is a {@link PeppolCreditNote}.\n *\n * @example\n * ```ts\n * isPeppolCreditNote(doc); // true for a UBL CreditNote\n * ```;\n *\n * @see {@link PeppolDocumentSchema}\n */\nexport const isPeppolCreditNote = Schema.is(PeppolCreditNote);\n/**\n * @description Type guard that returns `true` when a decoded value is a {@link PeppolMessageLevelResponse}.\n *\n * @example\n * ```ts\n * isPeppolMessageLevelResponse(doc); // true for an MLR ApplicationResponse\n * ```;\n *\n * @see {@link PeppolDocumentSchema}\n */\nexport const isPeppolMessageLevelResponse = Schema.is(PeppolMessageLevelResponse);\n/**\n * @description Type guard that returns `true` when a decoded value is a {@link PeppolInvoiceResponse}.\n *\n * @example\n * ```ts\n * isPeppolInvoiceResponse(doc); // true for an invoice response ApplicationResponse\n * ```;\n *\n * @see {@link PeppolDocumentSchema}\n */\nexport const isPeppolInvoiceResponse = Schema.is(PeppolInvoiceResponse);\n\n/**\n * @description XML string -> loose document object. Dispatches on the root element; `ApplicationResponse` is further split by its `cbc:ProfileID`.\n */\nconst decodeDocumentXml = Effect.fn('decode-peppol-document-xml')(function* (value: string, options: SchemaAST.ParseOptions) {\n const parsed = parseXml(value);\n\n if (Predicate.isNotNullish(parsed.Invoice)) {\n return yield* decodeInvoice(parsed);\n }\n if (Predicate.isNotNullish(parsed.CreditNote)) {\n return yield* decodeCreditNote(parsed);\n }\n if (Predicate.isNotNullish(parsed.ApplicationResponse)) {\n const profileId = yield* strOrUnd(parsed.ApplicationResponse, 'cbc:ProfileID');\n if (profileId === MESSAGE_LEVEL_RESPONSE_PROFILE_ID) {\n return yield* decodeMessageLevelResponse(parsed);\n }\n if (profileId === INVOICE_RESPONSE_PROFILE_ID) {\n return yield* decodeInvoiceResponse(parsed);\n }\n }\n\n const rootNodes = Object.keys(parsed);\n return yield* Effect.fail(new SchemaIssue.InvalidValue({ message: `Unsupported document type: ${rootNodes.join(',')}` }, value, options));\n});\n\n/**\n * @description Loose document object -> XML string. Mirrors {@link decodeDocumentXml} by dispatching on the decoded discriminant.\n */\nconst encodeDocumentXml = Effect.fn('encode-peppol-document-xml')(function* (value: PeppolDocumentObject, options: SchemaAST.ParseOptions) {\n let content: unknown;\n\n if (isPeppolInvoice(value) || Predicate.hasProperty(value, 'invoiceLines')) {\n content = yield* encodeInvoice(value as never);\n } else if (isPeppolCreditNote(value) || Predicate.hasProperty(value, 'creditNoteLines')) {\n content = yield* encodeCreditNote(value as never);\n } else if (isPeppolMessageLevelResponse(value) || value.profileId === MESSAGE_LEVEL_RESPONSE_PROFILE_ID) {\n content = yield* encodeMessageLevelResponse(value as never);\n } else if (isPeppolInvoiceResponse(value) || value.profileId === INVOICE_RESPONSE_PROFILE_ID) {\n content = yield* encodeInvoiceResponse(value as never);\n } else {\n const rootNodes = Object.keys(value);\n return yield* Effect.fail(\n new SchemaIssue.InvalidValue({ message: `Unsupported document type: ${value.profileId}\\n${rootNodes.join(',')}` }, value, options)\n );\n }\n\n return new XMLBuilder(builderOptions).build(content) as string;\n});\n\n/**\n * @description Union of every supported PEPPOL business document. Members discriminate cleanly: invoice vs credit note via `invoiceLines`/`creditNoteLines`,\n * message-level vs invoice response via the `profileId` literal. Decodes and encodes XML strings by dispatching on the root element;\n * `ApplicationResponse` is split on `cbc:ProfileID`.\n *\n * @example\n * ```ts\n * const doc = Schema.decodeUnknownSync(PeppolDocumentSchema)(xml); // decoded document union\n * ```;\n *\n * @see {@link PeppolDocumentDecoded}\n * @see {@link PeppolDocumentEncoded}\n */\nexport class PeppolDocumentSchema extends opaque<PeppolDocumentSchema>()(\n peppolDocumentObjectSchema.pipe(\n Schema.encodeTo(Schema.String, {\n encode: SchemaGetter.transformEffect((value, options) => encodeDocumentXml(value, options)),\n decode: SchemaGetter.transformEffect((value, options) => decodeDocumentXml(value, options)),\n })\n )\n) {}\n\n/**\n * @description Encoded form of {@link PeppolDocumentSchema}: the XML string representation.\n */\nexport type PeppolDocumentEncoded = Schema.Codec.Encoded<typeof PeppolDocumentSchema>;\n\n/**\n * @description Decoded form of {@link PeppolDocumentSchema}: the union of supported document classes.\n */\nexport type PeppolDocumentDecoded = Schema.Schema.Type<typeof PeppolDocumentSchema>;\n\n/**\n * @description This defines the types of documents that are sent/received through the peppol network.\n */\nexport type PeppolDocument = PeppolInvoice | PeppolCreditNote;\n/**\n * @description This defines the types of message that are sent/received through the peppol network.\n */\nexport type PeppolMessage = PeppolMessageLevelResponse | PeppolInvoiceResponse;\n/**\n * @description Every document type supported by {@link PeppolDocumentSchema}: the billing documents and the response messages.\n */\nexport type PeppolAllDocuments = PeppolDocument | PeppolMessage;\n/**\n * @description A line from either a {@link PeppolInvoice} or a {@link PeppolCreditNote}.\n */\nexport type PeppolDocumentLine = PeppolInvoiceLine | PeppolCreditNoteLine;\n","import { Schema } from 'effect';\n\nimport { opaque } from '#/schemas/utils/opaque.ts';\n\n/**\n * @description A reference identifier, such as an order or sales order reference.\n *\n * @example\n * ```ts\n * { id: '123' }\n * ```;\n */\nexport class PeppolReferenceId extends opaque<PeppolReferenceId>()(Schema.Struct({ id: Schema.String })) {}\n\n/**\n * @description A schema for an optional reference identifier, accepting either {@link PeppolReferenceId} or `undefined`.\n *\n * @example\n * ```ts\n * peppolReferenceSchema; // Schema.Union([PeppolReferenceId, Schema.Undefined])\n * ```;\n */\nexport const peppolReferenceSchema = Schema.Union([PeppolReferenceId, Schema.Undefined]);\n\n/**\n * @description The decoded type of {@link peppolReferenceSchema}, either a {@link PeppolReferenceId} or `undefined`.\n */\nexport type PeppolReferenceSchema = Schema.Schema.Type<typeof peppolReferenceSchema>;\n","import type { PeppolQuantityUnitCode } from '#/schemas/values/quantity-unit-codes-schema.ts';\n\n/**\n * @description String union of `Intl.NumberFormat` unit identifiers for base units such as length, area, volume, mass, and temperature.\n */\nexport type BaseIntlUnit =\n | 'acre'\n | 'bit'\n | 'byte'\n | 'celsius'\n | 'centimeter'\n | 'degree'\n | 'fahrenheit'\n | 'fluid-ounce'\n | 'foot'\n | 'gallon'\n | 'gigabit'\n | 'gigabyte'\n | 'gram'\n | 'hectare'\n | 'inch'\n | 'kilobit'\n | 'kilobyte'\n | 'kilogram'\n | 'kilometer'\n | 'liter'\n | 'megabit'\n | 'megabyte'\n | 'meter'\n | 'mile'\n | 'mile-scandinavian'\n | 'milliliter'\n | 'millimeter'\n | 'ounce'\n | 'percent'\n | 'petabyte'\n | 'pound'\n | 'stone'\n | 'terabit'\n | 'terabyte'\n | 'yard';\n/**\n * @description String union of `Intl.NumberFormat` unit identifiers for time units, used on their own and as the denominator of a rate.\n */\nexport type TimeIntlUnit = 'nanosecond' | 'microsecond' | 'millisecond' | 'second' | 'minute' | 'hour' | 'day' | 'week' | 'month' | 'year';\n\n/**\n * @description Any `Intl.NumberFormat` unit identifier supported by this module: a {@link BaseIntlUnit}, a {@link TimeIntlUnit}, or a rate such as\n * `'kilometer-per-hour'`.\n */\nexport type IntlUnit = BaseIntlUnit | TimeIntlUnit | `${BaseIntlUnit}-per-${TimeIntlUnit}`;\n\n/**\n * @description Maps UN/ECE Rec 20 quantity unit codes to `Intl.NumberFormat` unit identifiers. Unmapped codes are omitted.\n *\n * @example\n * ```ts\n * quantityToIntlUnitMap.KGM; // 'kilogram'\n * quantityToIntlUnitMap.KMH; // 'kilometer-per-hour'\n * ```;\n */\nexport const quantityToIntlUnitMap = {\n CMT: 'centimeter',\n MTR: 'meter',\n MMT: 'millimeter',\n KMT: 'kilometer',\n INH: 'inch',\n FOT: 'foot',\n YRD: 'yard',\n SMI: 'mile',\n F49: 'mile-scandinavian',\n ACR: 'acre',\n H18: 'hectare',\n LTR: 'liter',\n MLT: 'milliliter',\n GLI: 'gallon',\n GLL: 'gallon',\n OZA: 'fluid-ounce',\n GRM: 'gram',\n KGM: 'kilogram',\n LBR: 'pound',\n ONZ: 'ounce',\n STI: 'stone',\n STN: 'stone',\n SEC: 'second',\n MIN: 'minute',\n HUR: 'hour',\n DAY: 'day',\n WEE: 'week',\n MON: 'month',\n ANN: 'year',\n B98: 'microsecond',\n C26: 'millisecond',\n C47: 'nanosecond',\n CEL: 'celsius',\n FAH: 'fahrenheit',\n A99: 'bit',\n AD: 'byte',\n '2P': 'kilobyte',\n '4L': 'megabyte',\n E34: 'gigabyte',\n E35: 'terabyte',\n E36: 'petabyte',\n B68: 'gigabit',\n B80: 'gigabit',\n C21: 'kilobit',\n B10: 'bit',\n DD: 'degree',\n P1: 'percent',\n KMH: 'kilometer-per-hour',\n MTS: 'meter-per-second',\n HM: 'mile-per-hour',\n KNT: 'kilometer-per-hour',\n '2X': 'meter-per-minute',\n '40': 'milliliter-per-second',\n '41': 'milliliter-per-minute',\n '4G': 'milliliter',\n '4H': 'micrometer' as IntlUnit,\n A44: 'liter',\n A45: 'meter',\n A11: 'meter',\n A12: 'kilometer',\n B57: 'kilometer',\n '4U': 'pound-per-hour',\n '4M': 'gram-per-hour' as IntlUnit,\n} satisfies Partial<Record<string, IntlUnit>>;\n\n/**\n * @description Looks up the `Intl.NumberFormat` unit identifier for a UN/ECE Rec 20 quantity unit code.\n *\n * @example\n * ```ts\n * quantityUnitCodeToIntlUnit('KGM'); // 'kilogram'\n * quantityUnitCodeToIntlUnit('EA'); // undefined\n * ```;\n *\n * @param code - A quantity unit code, typed as {@link PeppolQuantityUnitCode} but accepting any string.\n *\n * @returns The matching {@link IntlUnit}, or `undefined` when the code has no `Intl` unit mapping.\n *\n * @see {@link quantityToIntlUnitMap}\n */\nexport function quantityUnitCodeToIntlUnit(code: PeppolQuantityUnitCode | (string & {})): IntlUnit | undefined {\n return (quantityToIntlUnitMap as Record<string, IntlUnit>)[code];\n}\n","import { quantityToIntlUnitMap } from '#/schemas/utils/quantity-unit-code-to-intl-unit.ts';\nimport { quantityUnitCodes } from '#/values/quantity-unit-codes.generated';\n\n/**\n * @description Formats a quantity and its unit code for a locale. Uses `Intl.NumberFormat` for mapped codes, otherwise the code list name.\n *\n * @example\n * ```ts\n * formatQuantityWithUnit(5, 'KGM', 'en-US', 'long'); // '5 kilograms'\n * formatQuantityWithUnit(10, 'EA'); // '10 each'\n * ```;\n *\n * @param value - The numeric quantity to format.\n * @param code - The UN/ECE Rec 20 unit code to render, for example `KGM` or `MTR`.\n * @param locale - BCP 47 locale tag passed to `Intl.NumberFormat`. Defaults to `'en-US'`.\n * @param unitDisplay - `Intl` unit display style: `'short'`, `'narrow'`, or `'long'`. Defaults to `'short'`.\n *\n * @returns The formatted quantity and unit, for example `'5 kilograms'`. Falls back to `<number> <name>` when the code has no `Intl` unit or `Intl`\n * rejects the unit.\n *\n * @see {@link quantityUnitCodeToIntlUnit}\n */\nexport function formatQuantityWithUnit(\n value: number,\n code: string,\n locale: string = 'en-US',\n unitDisplay: 'short' | 'narrow' | 'long' = 'short'\n): string {\n const intlUnit = quantityToIntlUnitMap[code as keyof typeof quantityToIntlUnitMap];\n\n if (intlUnit) {\n try {\n return new Intl.NumberFormat(locale, { style: 'unit', unit: intlUnit, unitDisplay }).format(value);\n } catch {}\n }\n\n const formattedNumber = new Intl.NumberFormat(locale).format(value);\n const unitName = (quantityUnitCodes as Record<string, string>)[code];\n return `${formattedNumber} ${unitName}`;\n}\n","import type { PeppolCreditNoteTypeCode } from '#/schemas/values/credit-note-type-code-schema.ts';\n\nimport { creditNoteTypeCodes } from '#/values/credit-notes-type-codes.generated';\n\n/**\n * @description Returns the human-readable description of a PEPPOL credit note type code (UNCL1001 subset).\n *\n * @example\n * ```ts\n * getCreditNoteTypeCodeDescription('381'); // 'Credit note'\n * ```;\n *\n * @param code - A valid {@link PeppolCreditNoteTypeCode}, for example `'381'`.\n *\n * @returns The description registered for the code, for example `'Credit note'`.\n */\nexport function getCreditNoteTypeCodeDescription(code: PeppolCreditNoteTypeCode): string {\n return (creditNoteTypeCodes as Record<string, string>)[code] as string;\n}\n","import type { PeppolInvoiceTypeCode } from '#/schemas/values/invoice-type-code-schema.ts';\n\nimport { invoiceTypeCodes } from '#/values/invoice-type-codes.generated';\n\n/**\n * @description Returns the human-readable description of a PEPPOL invoice type code (UNCL1001 subset).\n *\n * @example\n * ```ts\n * getInvoiceTypeCodeDescription('380'); // 'Commercial invoice'\n * ```;\n *\n * @param code - A valid {@link PeppolInvoiceTypeCode}, for example `'380'`.\n *\n * @returns The description registered for the code, for example `'Commercial invoice'`.\n */\nexport function getInvoiceTypeCodeDescription(code: PeppolInvoiceTypeCode): string {\n return (invoiceTypeCodes as Record<string, string>)[code] as string;\n}\n","import type { PeppolCreditNoteTypeCode } from '#/schemas/values/credit-note-type-code-schema.ts';\n\nimport { creditNoteTypeCodes } from '#/values/credit-notes-type-codes.generated';\n\n/**\n * @description Type guard for PEPPOL credit note type codes (UNCL1001 subset).\n *\n * @example\n * ```ts\n * isValidCreditNoteTypeCode('381'); // true\n * isValidCreditNoteTypeCode('UNKNOWN'); // false\n * ```;\n *\n * @param code - The string to test.\n *\n * @returns `true` when `code` is a known credit note type code, narrowing it to {@link PeppolCreditNoteTypeCode}; otherwise `false`.\n */\nexport function isValidCreditNoteTypeCode(code: string): code is PeppolCreditNoteTypeCode {\n return code in creditNoteTypeCodes;\n}\n","import type { PeppolInvoiceTypeCode } from '#/schemas/values/invoice-type-code-schema.ts';\n\nimport { invoiceTypeCodes } from '#/values/invoice-type-codes.generated';\n\n/**\n * @description Type guard for PEPPOL invoice type codes (UNCL1001 subset).\n *\n * @example\n * ```ts\n * isValidInvoiceTypeCode('380'); // true\n * isValidInvoiceTypeCode('UNKNOWN'); // false\n * ```;\n *\n * @param code - The string to test.\n *\n * @returns `true` when `code` is a known invoice type code, narrowing it to {@link PeppolInvoiceTypeCode}; otherwise `false`.\n */\nexport function isValidInvoiceTypeCode(code: string): code is PeppolInvoiceTypeCode {\n return code in invoiceTypeCodes;\n}\n","import type { PeppolProcesses } from '#/schemas/values/peppol-process-schema.ts';\n\nimport { processesList } from '#/values/processes.generated';\n\n/**\n * @description Type guard for PEPPOL business process identifiers of the form `<scheme>::<value>`.\n *\n * @example\n * ```ts\n * isValidProcess('cenbii-procid-ubl::urn:fdc:peppol.eu:2017:poacc:billing:01:1.0'); // true\n * isValidProcess('cenbii-procid-ubl::urn:not:a:process'); // false\n * ```;\n *\n * @param code - The process identifier to test.\n *\n * @returns `true` when `code` appears in {@link processesList}, narrowing it to {@link PeppolProcesses}; otherwise `false`.\n */\nexport function isValidProcess(code: string): code is PeppolProcesses {\n return processesList.includes(code);\n}\n","import { Schema } from 'effect';\n\nimport { isValidMod97_0208 } from '#/peppol-validations/is-valid-mod97-0208.ts';\nimport { opaque } from '#/schemas/utils/opaque.ts';\n\n/**\n * @description Belgian VAT number (`BE` + 10 digits with mod 97-0208 check digits). Effect port of the `BE` member of `vatRegexSchema`: prefix, exact length,\n * pattern, and mod 97 check-digit validation share the original `'Invalid belgian vat number'` message.\n */\nconst belgianVat = Schema.String.check(\n Schema.isStartsWith('BE'),\n Schema.isLengthBetween(12, 12),\n Schema.isPattern(/^BE[01]\\d{9}$/),\n Schema.makeFilter((value: string) => isValidMod97_0208(value.substring(2)).success)\n).annotate({ message: 'Invalid belgian vat number' });\n\n/**\n * @description EU VAT identification number (one member per member-state prefix/pattern). Effect port of `vatRegexSchema` (`z.union([...])` of\n * `z.string().check(...)` members): each member keeps its original prefix + pattern checks as `Schema.String.check` filters.\n *\n * @example\n * ```ts\n * const value = 'DE123456789';\n * ```;\n */\nexport class PeppolVatRegex extends opaque<PeppolVatRegex>()(\n Schema.Union([\n belgianVat,\n Schema.String.check(Schema.isStartsWith('AT'), Schema.isPattern(/^ATU\\d{8}$/)),\n Schema.String.check(Schema.isStartsWith('BG'), Schema.isPattern(/^BG\\d{9,10}$/)),\n Schema.String.check(Schema.isStartsWith('CY'), Schema.isPattern(/^CY\\d{8}L$/)),\n Schema.String.check(Schema.isStartsWith('CZ'), Schema.isPattern(/^CZ\\d{8,10}$/)),\n Schema.String.check(Schema.isStartsWith('DE'), Schema.isPattern(/^DE\\d{9}$/)),\n Schema.String.check(Schema.isStartsWith('DK'), Schema.isPattern(/^DK\\d{8}$/)),\n Schema.String.check(Schema.isStartsWith('EE'), Schema.isPattern(/^EE\\d{9}$/)),\n Schema.String.check(Schema.isStartsWith('EL'), Schema.isPattern(/^EL\\d{9}$/)),\n Schema.String.check(Schema.isStartsWith('GR'), Schema.isPattern(/^GR\\d{9}$/)),\n Schema.String.check(Schema.isStartsWith('ES'), Schema.isPattern(/^ES[0-9A-Z]\\d{7}[0-9A-Z]$/)),\n Schema.String.check(Schema.isStartsWith('FI'), Schema.isPattern(/^FI\\d{8}$/)),\n Schema.String.check(Schema.isStartsWith('FR'), Schema.isPattern(/^FR[0-9A-Z]{2}\\d{9}$/)),\n Schema.String.check(Schema.isStartsWith('GB'), Schema.isPattern(/^GB(\\d{9}(\\d{3})?|[A-Z]{2}\\d{3})$/)),\n Schema.String.check(Schema.isStartsWith('HU'), Schema.isPattern(/^HU\\d{8}$/)),\n Schema.String.check(Schema.isStartsWith('IE'), Schema.isPattern(/^IE\\dS\\d{5}L$/)),\n Schema.String.check(Schema.isStartsWith('IT'), Schema.isPattern(/^IT\\d{11}$/)),\n Schema.String.check(Schema.isStartsWith('LT'), Schema.isPattern(/^LT(\\d{9}|\\d{12})$/)),\n Schema.String.check(Schema.isStartsWith('LU'), Schema.isPattern(/^LU\\d{8}$/)),\n Schema.String.check(Schema.isStartsWith('LV'), Schema.isPattern(/^LV\\d{11}$/)),\n Schema.String.check(Schema.isStartsWith('MT'), Schema.isPattern(/^MT\\d{8}$/)),\n Schema.String.check(Schema.isStartsWith('NL'), Schema.isPattern(/^NL\\d{9}B\\d{2}$/)),\n Schema.String.check(Schema.isStartsWith('PL'), Schema.isPattern(/^PL\\d{10}$/)),\n Schema.String.check(Schema.isStartsWith('PT'), Schema.isPattern(/^PT\\d{9}$/)),\n Schema.String.check(Schema.isStartsWith('RO'), Schema.isPattern(/^RO\\d{2,10}$/)),\n Schema.String.check(Schema.isStartsWith('SE'), Schema.isPattern(/^SE\\d{12}$/)),\n Schema.String.check(Schema.isStartsWith('SI'), Schema.isPattern(/^SI\\d{8}$/)),\n Schema.String.check(Schema.isStartsWith('SK'), Schema.isPattern(/^SK\\d{10}$/)),\n ])\n) {}\n","import { Predicate, Schema } from 'effect';\n\nimport type { DocumentTypesTableKeys } from '#/values/document-type.generated';\n\nimport { opaque } from '#/schemas/utils/opaque.ts';\nimport { documentTypesTable, documentTypesTableKeys } from '#/values/document-type.generated';\n\n/**\n * @description A full PEPPOL document type identifier in `<scheme>::<value>` form. The scheme prefix and value must both be known.\n *\n * @see {@link documentTypesTable}\n */\nexport class PeppolDocumentType extends opaque<PeppolDocumentType>()(\n Schema.TemplateLiteral([Schema.Literals(documentTypesTableKeys), Schema.Literal('::'), Schema.String]).check(\n Schema.makeFilter((val: string) => {\n const [prefix, ...suffix] = val.split('::');\n if (Predicate.isNullish(prefix) || !documentTypesTableKeys.includes(prefix as never)) return false;\n const info = documentTypesTable[prefix as DocumentTypesTableKeys];\n return Predicate.isNotNullish(info) && info.some(v => v === suffix.join('::'));\n })\n )\n) {}\n","import { Schema } from 'effect';\n\nimport { opaque } from '#/schemas/utils/opaque.ts';\nimport { documentTypesScheme } from '#/values/document-type.generated';\n\n/**\n * @description A PEPPOL document type scheme, for example `busdox-docid-qns` or `peppol-doctype-wildcard`.\n *\n * @example\n * ```ts\n * 'busdox-docid-qns';\n * ```;\n *\n * @see {@link documentTypesScheme}\n */\nexport class PeppolDocumentTypeScheme extends opaque<PeppolDocumentTypeScheme>()(\n Schema.Literals(documentTypesScheme as [string, ...Array<string>])\n) {}\n","import { Record, Schema } from 'effect';\n\nimport { opaque } from '#/schemas/utils/opaque.ts';\nimport { documentTypesTable } from '#/values/document-type.generated';\n\nconst values = Record.values(documentTypesTable).flat();\n\n/**\n * @description The value part of a PEPPOL document type identifier (the portion after the scheme prefix) from the known document type table.\n *\n * @see {@link documentTypesTable}\n */\nexport class PeppolDocumentTypeValue extends opaque<PeppolDocumentTypeValue>()(\n Schema.String.check(Schema.makeFilter((val: string) => values.includes(val as never)))\n) {}\n","import { Schema } from 'effect';\n\nimport { opaque } from '#/schemas/utils/opaque.ts';\nimport { invoiceStatusCodesKeys } from '#/values/invoice-status-codes.generated';\n\n/**\n * @description An invoice status code from the PEPPOL subset of UNCL 4343 (T111).\n *\n * @example\n * ```ts\n * 'AB';\n * ```;\n *\n * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/UNCL4343-T111/\n * @see {@link invoiceStatusCodesKeys}\n */\nexport class PeppolInvoiceStatusCodes extends opaque<PeppolInvoiceStatusCodes>()(\n Schema.Literals(invoiceStatusCodesKeys).pipe(Schema.brand('PeppolInvoiceStatusCodes'))\n) {}\n","import { Schema } from 'effect';\n\nimport { opaque } from '#/schemas/utils/opaque.ts';\nimport { participantIdentifierSchemesKeys } from '#/values/participant-identifier-schemes.generated';\n\n/**\n * @description A PEPPOL participant identifier scheme from the participant identifier schemes codelist.\n *\n * @example\n * ```ts\n * '0002';\n * ```;\n *\n * @see {@link participantIdentifierSchemesKeys}\n */\nexport class PeppolParticipantIdentifierCode extends opaque<PeppolParticipantIdentifierCode>()(\n Schema.Literals(participantIdentifierSchemesKeys).pipe(Schema.brand('PeppolParticipantIdentifierCode'))\n) {}\n","import { Schema } from 'effect';\n\nimport type { ProcessesKeys } from '#/values/processes.generated';\n\nimport { opaque } from '#/schemas/utils/opaque.ts';\nimport { processes, processesKeys } from '#/values/processes.generated';\n\n/**\n * @description A full PEPPOL business process identifier in `<scheme>::<value>` form from the known processes table.\n *\n * @example\n * ```ts\n * 'cenbii-procid-ubl::urn:fdc:peppol.eu:2017:poacc:billing:01:1.0';\n * ```;\n *\n * @see {@link processes}\n */\nexport class PeppolProcess extends opaque<PeppolProcess>()(\n Schema.TemplateLiteral([Schema.Literals(processesKeys), Schema.Literal('::'), Schema.String]).check(\n Schema.makeFilter((val: string) => {\n const [prefix, suffix] = val.split('::');\n if (prefix === undefined || suffix === undefined) return false;\n const info = processes[prefix as ProcessesKeys];\n return info !== undefined && info.some(v => v === suffix);\n })\n )\n) {}\n\n/**\n * @description A PEPPOL business process identifier key as defined by the processes codelist.\n *\n * @see {@link processes}\n */\nexport type PeppolProcesses = Schema.Codec.Encoded<typeof PeppolProcess>;\n","import { Schema } from 'effect';\n\nimport type { PeppolDocumentType } from '#/schemas/values/peppol-document-type-schema.ts';\n\nimport { PeppolProcess } from '#/schemas/values/peppol-process-schema.ts';\nimport { documentTypesProcessIds } from '#/values/document-type.generated';\n\n/**\n * @description Validates a business process identifier (`<scheme>::<value>`) against the processes allowed for a given document type.\n *\n * @param documentType - The PEPPOL document type scheme whose allowed processes should be used.\n * @param error - The custom error message to use when validation fails. Defaults to `'invalid process type for document type'`.\n *\n * @returns An Effect schema that matches only processes allowed for the given document type.\n *\n * @see {@link PeppolProcess}\n * @see {@link documentTypesProcessIds}\n */\nexport function processFromDocumentTypeSchema(documentType: PeppolDocumentType, error = 'invalid process type for document type') {\n const allowed = documentTypesProcessIds[documentType as keyof typeof documentTypesProcessIds];\n if (allowed === undefined) {\n return PeppolProcess;\n }\n const values = allowed.map(p => `${p.scheme}::${p.value}`);\n return Schema.String.check(Schema.makeFilter((val: string) => values.includes(val as never))).annotate({ message: error });\n}\n","import { Schema } from 'effect';\n\nimport { opaque } from '#/schemas/utils/opaque.ts';\nimport { vatexCodesKeys } from '#/values/vatex-codes.generated';\n\n/**\n * @description A VAT exemption reason code from the CEF VATEX codelist.\n *\n * @example\n * ```ts\n * 'VATEX-EU-79-C';\n * ```;\n *\n * @validations\n * - BR-CL-22: VAT exemption reason code MUST be a valid CEF VATEX code.\n *\n * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/vatex/\n * @see {@link vatexCodesKeys}\n */\nexport class PeppolVatexCode extends opaque<PeppolVatexCode>()(Schema.Literals(vatexCodesKeys).pipe(Schema.brand('PeppolVatexCode'))) {}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AASA,MAAa,2BAA2B;;;;;;;;;;;;ACAxC,MAAa,qBAAqB;;;ACelC,MAAM,YAAY;;;;;;;;;;AAWlB,IAAa,eAAb,cAAkC,OAAqB,CAAC,CACtD,OAAO,OAAO,MAAM,OAAO,YAAY,QAAgB,UAAU,KAAK,IAAI,QAAQ,UAAU,EAAE,CAAC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