@endevops/peppol-schema 0.1.0-beta.6 → 0.1.0-beta.7
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/dist/constants.js.map +1 -1
- package/dist/index.js +77 -77
- package/dist/index.js.map +1 -1
- package/dist/is-valid-abn-160i38PG.js.map +1 -1
- package/dist/is-valid-mod97-0208-CzMOXMO-.js.map +1 -1
- package/dist/parser-options-mbqEQPSY.js.map +1 -1
- package/dist/peppol-iso-date-string-BXLxzxdz.js.map +1 -1
- package/dist/schematron.d.ts.map +1 -1
- package/dist/schematron.js.map +1 -1
- package/dist/validations.js.map +1 -1
- package/package.json +6 -1
- package/src/constants/credit-note-doctype-id.ts +1 -1
- package/src/constants/credit-note-process-id.ts +1 -1
- package/src/constants/index.ts +14 -14
- package/src/constants/invoice-doctype-id.ts +1 -1
- package/src/constants/invoice-process-id.ts +1 -1
- package/src/constants/invoice-response-doctype-id.ts +1 -1
- package/src/constants/invoice-response-process-id.ts +2 -2
- package/src/constants/message-level-response-doctype-id.ts +1 -1
- package/src/constants/message-level-response-process-id.ts +2 -2
- package/src/decoders/decode-billing.ts +16 -16
- package/src/decoders/decode-credit-note.ts +5 -5
- package/src/decoders/decode-invoice-response.ts +7 -7
- package/src/decoders/decode-invoice.ts +6 -6
- package/src/decoders/decode-message-level-response.ts +6 -6
- package/src/decoders/encode-credit-note.ts +16 -16
- package/src/decoders/encode-invoice-response.ts +2 -2
- package/src/decoders/encode-invoice.ts +16 -16
- package/src/decoders/encode-message-level-response.ts +3 -3
- package/src/decoders/fields/decode-additional-document-references.ts +7 -7
- package/src/decoders/fields/decode-address.ts +5 -5
- package/src/decoders/fields/decode-allowance-charges.ts +6 -6
- package/src/decoders/fields/decode-amount.ts +5 -5
- package/src/decoders/fields/decode-application-response.ts +3 -3
- package/src/decoders/fields/decode-base-allowance-charge.ts +5 -5
- package/src/decoders/fields/decode-billing-references.ts +5 -5
- package/src/decoders/fields/decode-contact.ts +5 -5
- package/src/decoders/fields/decode-credit-note-lines.ts +4 -4
- package/src/decoders/fields/decode-delivery.ts +8 -8
- package/src/decoders/fields/decode-electronic-address.ts +3 -3
- package/src/decoders/fields/decode-identifier.ts +5 -5
- package/src/decoders/fields/decode-invoice-line-period.ts +5 -5
- package/src/decoders/fields/decode-invoice-lines.ts +4 -4
- package/src/decoders/fields/decode-invoice-message-document-party.ts +6 -6
- package/src/decoders/fields/decode-invoice-message-party.ts +6 -6
- package/src/decoders/fields/decode-invoice-period.ts +3 -3
- package/src/decoders/fields/decode-legal-monetary-total.ts +5 -5
- package/src/decoders/fields/decode-line-allowance-charges.ts +5 -5
- package/src/decoders/fields/decode-line-price.ts +5 -5
- package/src/decoders/fields/decode-line-shared.ts +13 -13
- package/src/decoders/fields/decode-message-level-party.ts +5 -5
- package/src/decoders/fields/decode-node-list.ts +2 -2
- package/src/decoders/fields/decode-order-reference.ts +5 -5
- package/src/decoders/fields/decode-parties-tax-scheme.ts +5 -5
- package/src/decoders/fields/decode-party-legal-entity.ts +6 -6
- package/src/decoders/fields/decode-party-tax-scheme.ts +6 -6
- package/src/decoders/fields/decode-party.ts +9 -9
- package/src/decoders/fields/decode-payee-party.ts +6 -6
- package/src/decoders/fields/decode-payment-means.ts +8 -8
- package/src/decoders/fields/decode-payment-terms.ts +5 -5
- package/src/decoders/fields/decode-price-allowance-charge.ts +4 -4
- package/src/decoders/fields/decode-quantity.ts +3 -3
- package/src/decoders/fields/decode-simple-identifier.ts +4 -4
- package/src/decoders/fields/decode-tax-category.ts +7 -7
- package/src/decoders/fields/decode-tax-representative-party.ts +7 -7
- package/src/decoders/fields/decode-tax-totals.ts +10 -10
- package/src/decoders/fields/encode-additional-document-references.ts +2 -2
- package/src/decoders/fields/encode-address.ts +2 -2
- package/src/decoders/fields/encode-allowance-charges.ts +3 -3
- package/src/decoders/fields/encode-amount.ts +1 -1
- package/src/decoders/fields/encode-billing-references.ts +1 -1
- package/src/decoders/fields/encode-contact.ts +1 -1
- package/src/decoders/fields/encode-credit-note-lines.ts +2 -2
- package/src/decoders/fields/encode-delivery.ts +3 -3
- package/src/decoders/fields/encode-identifier.ts +1 -1
- package/src/decoders/fields/encode-invoice-line-period.ts +1 -1
- package/src/decoders/fields/encode-invoice-lines.ts +2 -2
- package/src/decoders/fields/encode-invoice-period.ts +1 -1
- package/src/decoders/fields/encode-legal-monetary-total.ts +2 -2
- package/src/decoders/fields/encode-line-allowance-charges.ts +2 -2
- package/src/decoders/fields/encode-line-price.ts +4 -4
- package/src/decoders/fields/encode-line-shared.ts +9 -9
- package/src/decoders/fields/encode-message-party.ts +7 -7
- package/src/decoders/fields/encode-order-reference.ts +1 -1
- package/src/decoders/fields/encode-parties-tax-scheme.ts +3 -3
- package/src/decoders/fields/encode-party-legal-entity.ts +1 -1
- package/src/decoders/fields/encode-party-tax-scheme.ts +3 -3
- package/src/decoders/fields/encode-party.ts +6 -6
- package/src/decoders/fields/encode-payee-party.ts +2 -2
- package/src/decoders/fields/encode-payment-means.ts +2 -2
- package/src/decoders/fields/encode-payment-terms.ts +1 -1
- package/src/decoders/fields/encode-price-allowance-charges.ts +2 -2
- package/src/decoders/fields/encode-quantity.ts +1 -1
- package/src/decoders/fields/encode-tax-category.ts +2 -2
- package/src/decoders/fields/encode-tax-representative-party.ts +4 -4
- package/src/decoders/fields/encode-tax-totals.ts +4 -4
- package/src/helpers/bool.ts +2 -2
- package/src/helpers/get-array.ts +2 -2
- package/src/helpers/num-or-und.ts +2 -2
- package/src/helpers/str-or-array.ts +3 -3
- package/src/helpers/str-or-und.ts +2 -2
- package/src/helpers/str.ts +2 -2
- package/src/index.ts +54 -54
- package/src/invoice-response-codes/index.ts +3 -3
- package/src/peppol-validations/check-cf.ts +2 -2
- package/src/peppol-validations/check-cf16.ts +1 -1
- package/src/peppol-validations/check-piva-se-it.ts +1 -1
- package/src/peppol-validations/check-piva.ts +1 -1
- package/src/peppol-validations/check-se-orgnr.ts +1 -1
- package/src/peppol-validations/index.ts +13 -13
- package/src/peppol-validations/is-valid-abn.ts +1 -1
- package/src/peppol-validations/is-valid-iban.ts +1 -1
- package/src/peppol-validations/is-valid-mod11.ts +1 -1
- package/src/peppol-validations/is-valid-mod97-0208.ts +1 -1
- package/src/peppol-validations/luhn-check.ts +1 -1
- package/src/schemas/fields/peppol-additional-document-reference-schema.ts +4 -4
- package/src/schemas/fields/peppol-address-schema.ts +2 -2
- package/src/schemas/fields/peppol-allowance-charge-schema.ts +6 -6
- package/src/schemas/fields/peppol-amount-schema.ts +2 -2
- package/src/schemas/fields/peppol-base-line-schema.ts +7 -7
- package/src/schemas/fields/peppol-billing-reference-schema.ts +2 -2
- package/src/schemas/fields/peppol-binary-object-schema.ts +3 -3
- package/src/schemas/fields/peppol-contact-schema.ts +1 -1
- package/src/schemas/fields/peppol-credit-note-line-schema.ts +4 -4
- package/src/schemas/fields/peppol-delivery-schema.ts +5 -5
- package/src/schemas/fields/peppol-identifier-schema.ts +1 -1
- package/src/schemas/fields/peppol-invoice-line-period-schema.ts +2 -2
- package/src/schemas/fields/peppol-invoice-line-schema.ts +4 -4
- package/src/schemas/fields/peppol-invoice-period-schema.ts +3 -3
- package/src/schemas/fields/peppol-item-classification-schema.ts +2 -2
- package/src/schemas/fields/peppol-legal-monetary-total-schema.ts +2 -2
- package/src/schemas/fields/peppol-line-allowance-charge-schema.ts +4 -4
- package/src/schemas/fields/peppol-line-item-schema.ts +6 -6
- package/src/schemas/fields/peppol-line-price-allowance-charge-schema.ts +2 -2
- package/src/schemas/fields/peppol-line-price-schema.ts +4 -4
- package/src/schemas/fields/peppol-order-reference-schema.ts +1 -1
- package/src/schemas/fields/peppol-party-base-schema.ts +8 -8
- package/src/schemas/fields/peppol-party-legal-entity-schema.ts +2 -2
- package/src/schemas/fields/peppol-party-tax-scheme-schema.ts +1 -1
- package/src/schemas/fields/peppol-payee-party-schema.ts +3 -3
- package/src/schemas/fields/peppol-payment-means-schema.ts +3 -3
- package/src/schemas/fields/peppol-payment-terms-schema.ts +1 -1
- package/src/schemas/fields/peppol-quantity-schema.ts +2 -2
- package/src/schemas/fields/peppol-reference-schema.ts +1 -1
- package/src/schemas/fields/peppol-tax-category-schema.ts +2 -2
- package/src/schemas/fields/peppol-tax-representative-schema.ts +3 -3
- package/src/schemas/fields/peppol-tax-subtotal-category-schema.ts +2 -2
- package/src/schemas/fields/peppol-tax-subtotal-schema.ts +3 -3
- package/src/schemas/fields/peppol-tax-totals-base-schema.ts +3 -3
- package/src/schemas/peppol-billing-base-schema.ts +18 -18
- package/src/schemas/peppol-credit-note-schema.ts +4 -4
- package/src/schemas/peppol-document-response-document-reference-schema.ts +2 -2
- package/src/schemas/peppol-document-response-document-schema.ts +2 -2
- package/src/schemas/peppol-document-response-line-response-content-schema.ts +2 -2
- package/src/schemas/peppol-document-response-line-response-schema.ts +2 -2
- package/src/schemas/peppol-document-schema.ts +21 -21
- package/src/schemas/peppol-invoice-response-document-actual-response-schema.ts +5 -5
- package/src/schemas/peppol-invoice-response-document-actual-response-status-schema.ts +2 -2
- package/src/schemas/peppol-invoice-response-schema.ts +10 -10
- package/src/schemas/peppol-invoice-response-status-reason-code-schema.ts +3 -3
- package/src/schemas/peppol-invoice-schema.ts +5 -5
- package/src/schemas/peppol-iso-date-string.ts +1 -1
- package/src/schemas/peppol-message-level-response-document-response-schema.ts +4 -4
- package/src/schemas/peppol-message-level-response-party-schema.ts +2 -2
- package/src/schemas/peppol-message-level-response-schema.ts +6 -6
- package/src/schemas/utils/format-quantity-with-unit.ts +1 -1
- package/src/schemas/utils/get-credit-note-type-code-description.ts +1 -1
- package/src/schemas/utils/get-invoice-type-code-description.ts +1 -1
- package/src/schemas/utils/index.ts +10 -10
- package/src/schemas/utils/is-valid-credit-note-type-code.ts +1 -1
- package/src/schemas/utils/is-valid-invoice-type-code.ts +1 -1
- package/src/schemas/utils/is-valid-process.ts +1 -1
- package/src/schemas/utils/peppol-vat-regex-schema.ts +1 -1
- package/src/schemas/utils/peppol-xsd-time-schema.ts +2 -2
- package/src/schemas/utils/quantity-unit-code-to-intl-unit.ts +1 -1
- package/src/schemas/values/index.ts +27 -27
- package/src/schemas/values/process-from-document-type-schema.ts +2 -2
- package/src/schematron/cen/ae/cen-en16931-br-ae-01.ts +3 -3
- package/src/schematron/cen/ae/cen-en16931-br-ae-02.ts +3 -3
- package/src/schematron/cen/ae/cen-en16931-br-ae-03.ts +3 -3
- package/src/schematron/cen/ae/cen-en16931-br-ae-04.ts +3 -3
- package/src/schematron/cen/ae/cen-en16931-br-ae-05.ts +3 -3
- package/src/schematron/cen/ae/cen-en16931-br-ae-06.ts +3 -3
- package/src/schematron/cen/ae/cen-en16931-br-ae-07.ts +3 -3
- package/src/schematron/cen/ae/cen-en16931-br-ae-08.ts +3 -3
- package/src/schematron/cen/ae/cen-en16931-br-ae-09.ts +3 -3
- package/src/schematron/cen/ae/cen-en16931-br-ae-10.ts +3 -3
- package/src/schematron/cen/af/cen-en16931-br-af-01.ts +3 -3
- package/src/schematron/cen/af/cen-en16931-br-af-02.ts +3 -3
- package/src/schematron/cen/af/cen-en16931-br-af-03.ts +8 -3
- package/src/schematron/cen/af/cen-en16931-br-af-04.ts +3 -3
- package/src/schematron/cen/af/cen-en16931-br-af-05.ts +3 -3
- package/src/schematron/cen/af/cen-en16931-br-af-06.ts +3 -3
- package/src/schematron/cen/af/cen-en16931-br-af-07.ts +3 -3
- package/src/schematron/cen/af/cen-en16931-br-af-08.ts +3 -3
- package/src/schematron/cen/af/cen-en16931-br-af-09.ts +3 -3
- package/src/schematron/cen/af/cen-en16931-br-af-10.ts +3 -3
- package/src/schematron/cen/ag/cen-en16931-br-ag-01.ts +3 -3
- package/src/schematron/cen/ag/cen-en16931-br-ag-02.ts +3 -3
- package/src/schematron/cen/ag/cen-en16931-br-ag-03.ts +8 -3
- package/src/schematron/cen/ag/cen-en16931-br-ag-04.ts +3 -3
- package/src/schematron/cen/ag/cen-en16931-br-ag-05.ts +3 -3
- package/src/schematron/cen/ag/cen-en16931-br-ag-06.ts +3 -3
- package/src/schematron/cen/ag/cen-en16931-br-ag-07.ts +3 -3
- package/src/schematron/cen/ag/cen-en16931-br-ag-08.ts +3 -3
- package/src/schematron/cen/ag/cen-en16931-br-ag-09.ts +3 -3
- package/src/schematron/cen/ag/cen-en16931-br-ag-10.ts +3 -3
- package/src/schematron/cen/b/cen-en16931-br-b-01.ts +3 -3
- package/src/schematron/cen/b/cen-en16931-br-b-02.ts +3 -3
- package/src/schematron/cen/cen-en16931-br-01.ts +3 -3
- package/src/schematron/cen/cen-en16931-br-02.ts +3 -3
- package/src/schematron/cen/cen-en16931-br-03.ts +3 -3
- package/src/schematron/cen/cen-en16931-br-04.ts +3 -3
- package/src/schematron/cen/cen-en16931-br-05.ts +3 -3
- package/src/schematron/cen/cen-en16931-br-06.ts +3 -3
- package/src/schematron/cen/cen-en16931-br-07.ts +3 -3
- package/src/schematron/cen/cen-en16931-br-08.ts +3 -3
- package/src/schematron/cen/cen-en16931-br-09.ts +3 -3
- package/src/schematron/cen/cen-en16931-br-10.ts +3 -3
- package/src/schematron/cen/cen-en16931-br-11.ts +3 -3
- package/src/schematron/cen/cen-en16931-br-12.ts +3 -3
- package/src/schematron/cen/cen-en16931-br-13.ts +3 -3
- package/src/schematron/cen/cen-en16931-br-14.ts +3 -3
- package/src/schematron/cen/cen-en16931-br-15.ts +3 -3
- package/src/schematron/cen/cen-en16931-br-16.ts +3 -3
- package/src/schematron/cen/cen-en16931-br-17.ts +3 -3
- package/src/schematron/cen/cen-en16931-br-18.ts +3 -3
- package/src/schematron/cen/cen-en16931-br-19.ts +3 -3
- package/src/schematron/cen/cen-en16931-br-20.ts +3 -3
- package/src/schematron/cen/cen-en16931-br-21.ts +3 -3
- package/src/schematron/cen/cen-en16931-br-22.ts +3 -3
- package/src/schematron/cen/cen-en16931-br-23.ts +3 -3
- package/src/schematron/cen/cen-en16931-br-24.ts +3 -3
- package/src/schematron/cen/cen-en16931-br-25.ts +3 -3
- package/src/schematron/cen/cen-en16931-br-26.ts +3 -3
- package/src/schematron/cen/cen-en16931-br-27.ts +3 -3
- package/src/schematron/cen/cen-en16931-br-28.ts +3 -3
- package/src/schematron/cen/cen-en16931-br-29.ts +3 -3
- package/src/schematron/cen/cen-en16931-br-30.ts +3 -3
- package/src/schematron/cen/cen-en16931-br-31.ts +3 -3
- package/src/schematron/cen/cen-en16931-br-32.ts +3 -3
- package/src/schematron/cen/cen-en16931-br-33.ts +3 -3
- package/src/schematron/cen/cen-en16931-br-36.ts +3 -3
- package/src/schematron/cen/cen-en16931-br-37.ts +3 -3
- package/src/schematron/cen/cen-en16931-br-38.ts +3 -3
- package/src/schematron/cen/cen-en16931-br-41.ts +3 -3
- package/src/schematron/cen/cen-en16931-br-42.ts +3 -3
- package/src/schematron/cen/cen-en16931-br-43.ts +3 -3
- package/src/schematron/cen/cen-en16931-br-44.ts +3 -3
- package/src/schematron/cen/cen-en16931-br-45.ts +3 -3
- package/src/schematron/cen/cen-en16931-br-46.ts +3 -3
- package/src/schematron/cen/cen-en16931-br-47.ts +3 -3
- package/src/schematron/cen/cen-en16931-br-48.ts +3 -3
- package/src/schematron/cen/cen-en16931-br-49.ts +3 -3
- package/src/schematron/cen/cen-en16931-br-50.ts +3 -3
- package/src/schematron/cen/cen-en16931-br-51.ts +3 -3
- package/src/schematron/cen/cen-en16931-br-52.ts +3 -3
- package/src/schematron/cen/cen-en16931-br-53.ts +3 -3
- package/src/schematron/cen/cen-en16931-br-54.ts +3 -3
- package/src/schematron/cen/cen-en16931-br-55.ts +3 -3
- package/src/schematron/cen/cen-en16931-br-56.ts +3 -3
- package/src/schematron/cen/cen-en16931-br-57.ts +3 -3
- package/src/schematron/cen/cen-en16931-br-61.ts +3 -3
- package/src/schematron/cen/cen-en16931-br-62.ts +3 -3
- package/src/schematron/cen/cen-en16931-br-63.ts +3 -3
- package/src/schematron/cen/cen-en16931-br-64.ts +3 -3
- package/src/schematron/cen/cen-en16931-br-65.ts +3 -3
- package/src/schematron/cen/cl/cen-en16931-br-cl-08.ts +3 -3
- package/src/schematron/cen/co/cen-en16931-br-co-03.ts +3 -3
- package/src/schematron/cen/co/cen-en16931-br-co-04.ts +3 -3
- package/src/schematron/cen/co/cen-en16931-br-co-05.ts +3 -3
- package/src/schematron/cen/co/cen-en16931-br-co-06.ts +3 -3
- package/src/schematron/cen/co/cen-en16931-br-co-07.ts +3 -3
- package/src/schematron/cen/co/cen-en16931-br-co-08.ts +3 -3
- package/src/schematron/cen/co/cen-en16931-br-co-09.ts +3 -3
- package/src/schematron/cen/co/cen-en16931-br-co-10.ts +3 -3
- package/src/schematron/cen/co/cen-en16931-br-co-11.ts +3 -3
- package/src/schematron/cen/co/cen-en16931-br-co-12.ts +3 -3
- package/src/schematron/cen/co/cen-en16931-br-co-13.ts +3 -3
- package/src/schematron/cen/co/cen-en16931-br-co-14.ts +3 -3
- package/src/schematron/cen/co/cen-en16931-br-co-15.ts +3 -3
- package/src/schematron/cen/co/cen-en16931-br-co-16.ts +3 -3
- package/src/schematron/cen/co/cen-en16931-br-co-17.ts +3 -3
- package/src/schematron/cen/co/cen-en16931-br-co-18.ts +3 -3
- package/src/schematron/cen/co/cen-en16931-br-co-19.ts +3 -3
- package/src/schematron/cen/co/cen-en16931-br-co-20.ts +3 -3
- package/src/schematron/cen/co/cen-en16931-br-co-21.ts +3 -3
- package/src/schematron/cen/co/cen-en16931-br-co-22.ts +3 -3
- package/src/schematron/cen/co/cen-en16931-br-co-23.ts +3 -3
- package/src/schematron/cen/co/cen-en16931-br-co-24.ts +3 -3
- package/src/schematron/cen/co/cen-en16931-br-co-25.ts +3 -3
- package/src/schematron/cen/co/cen-en16931-br-co-26.ts +3 -3
- package/src/schematron/cen/dec/cen-en16931-br-dec-01.ts +3 -3
- package/src/schematron/cen/dec/cen-en16931-br-dec-02.ts +3 -3
- package/src/schematron/cen/dec/cen-en16931-br-dec-05.ts +3 -3
- package/src/schematron/cen/dec/cen-en16931-br-dec-06.ts +3 -3
- package/src/schematron/cen/dec/cen-en16931-br-dec-09.ts +3 -3
- package/src/schematron/cen/dec/cen-en16931-br-dec-10.ts +3 -3
- package/src/schematron/cen/dec/cen-en16931-br-dec-11.ts +3 -3
- package/src/schematron/cen/dec/cen-en16931-br-dec-12.ts +3 -3
- package/src/schematron/cen/dec/cen-en16931-br-dec-13.ts +3 -3
- package/src/schematron/cen/dec/cen-en16931-br-dec-14.ts +3 -3
- package/src/schematron/cen/dec/cen-en16931-br-dec-15.ts +3 -3
- package/src/schematron/cen/dec/cen-en16931-br-dec-16.ts +3 -3
- package/src/schematron/cen/dec/cen-en16931-br-dec-17.ts +3 -3
- package/src/schematron/cen/dec/cen-en16931-br-dec-18.ts +3 -3
- package/src/schematron/cen/dec/cen-en16931-br-dec-19.ts +3 -3
- package/src/schematron/cen/dec/cen-en16931-br-dec-20.ts +3 -3
- package/src/schematron/cen/dec/cen-en16931-br-dec-23.ts +3 -3
- package/src/schematron/cen/dec/cen-en16931-br-dec-24.ts +3 -3
- package/src/schematron/cen/dec/cen-en16931-br-dec-25.ts +3 -3
- package/src/schematron/cen/dec/cen-en16931-br-dec-27.ts +3 -3
- package/src/schematron/cen/dec/cen-en16931-br-dec-28.ts +3 -3
- package/src/schematron/cen/e/cen-en16931-br-e-01.ts +3 -3
- package/src/schematron/cen/e/cen-en16931-br-e-02.ts +3 -3
- package/src/schematron/cen/e/cen-en16931-br-e-03.ts +8 -3
- package/src/schematron/cen/e/cen-en16931-br-e-04.ts +3 -3
- package/src/schematron/cen/e/cen-en16931-br-e-05.ts +3 -3
- package/src/schematron/cen/e/cen-en16931-br-e-06.ts +3 -3
- package/src/schematron/cen/e/cen-en16931-br-e-07.ts +3 -3
- package/src/schematron/cen/e/cen-en16931-br-e-08.ts +3 -3
- package/src/schematron/cen/e/cen-en16931-br-e-09.ts +3 -3
- package/src/schematron/cen/e/cen-en16931-br-e-10.ts +3 -3
- package/src/schematron/cen/g/cen-en16931-br-g-01.ts +3 -3
- package/src/schematron/cen/g/cen-en16931-br-g-02.ts +3 -3
- package/src/schematron/cen/g/cen-en16931-br-g-03.ts +8 -3
- package/src/schematron/cen/g/cen-en16931-br-g-04.ts +3 -3
- package/src/schematron/cen/g/cen-en16931-br-g-05.ts +3 -3
- package/src/schematron/cen/g/cen-en16931-br-g-06.ts +3 -3
- package/src/schematron/cen/g/cen-en16931-br-g-07.ts +3 -3
- package/src/schematron/cen/g/cen-en16931-br-g-08.ts +3 -3
- package/src/schematron/cen/g/cen-en16931-br-g-09.ts +3 -3
- package/src/schematron/cen/g/cen-en16931-br-g-10.ts +3 -3
- package/src/schematron/cen/ic/cen-en16931-br-ic-01.ts +3 -3
- package/src/schematron/cen/ic/cen-en16931-br-ic-02.ts +3 -3
- package/src/schematron/cen/ic/cen-en16931-br-ic-03.ts +3 -3
- package/src/schematron/cen/ic/cen-en16931-br-ic-04.ts +3 -3
- package/src/schematron/cen/ic/cen-en16931-br-ic-05.ts +3 -3
- package/src/schematron/cen/ic/cen-en16931-br-ic-06.ts +3 -3
- package/src/schematron/cen/ic/cen-en16931-br-ic-07.ts +3 -3
- package/src/schematron/cen/ic/cen-en16931-br-ic-08.ts +3 -3
- package/src/schematron/cen/ic/cen-en16931-br-ic-09.ts +3 -3
- package/src/schematron/cen/ic/cen-en16931-br-ic-10.ts +3 -3
- package/src/schematron/cen/ic/cen-en16931-br-ic-11.ts +3 -3
- package/src/schematron/cen/ic/cen-en16931-br-ic-12.ts +3 -3
- package/src/schematron/cen/o/cen-en16931-br-o-01.ts +3 -3
- package/src/schematron/cen/o/cen-en16931-br-o-02.ts +3 -3
- package/src/schematron/cen/o/cen-en16931-br-o-03.ts +3 -3
- package/src/schematron/cen/o/cen-en16931-br-o-04.ts +3 -3
- package/src/schematron/cen/o/cen-en16931-br-o-05.ts +3 -3
- package/src/schematron/cen/o/cen-en16931-br-o-06.ts +3 -3
- package/src/schematron/cen/o/cen-en16931-br-o-07.ts +3 -3
- package/src/schematron/cen/o/cen-en16931-br-o-08.ts +3 -3
- package/src/schematron/cen/o/cen-en16931-br-o-09.ts +3 -3
- package/src/schematron/cen/o/cen-en16931-br-o-10.ts +3 -3
- package/src/schematron/cen/o/cen-en16931-br-o-11.ts +3 -3
- package/src/schematron/cen/o/cen-en16931-br-o-12.ts +3 -3
- package/src/schematron/cen/o/cen-en16931-br-o-13.ts +3 -3
- package/src/schematron/cen/o/cen-en16931-br-o-14.ts +3 -3
- package/src/schematron/cen/s/cen-en16931-br-s-01.ts +3 -3
- package/src/schematron/cen/s/cen-en16931-br-s-02.ts +3 -3
- package/src/schematron/cen/s/cen-en16931-br-s-03.ts +8 -3
- package/src/schematron/cen/s/cen-en16931-br-s-04.ts +3 -3
- package/src/schematron/cen/s/cen-en16931-br-s-05.ts +3 -3
- package/src/schematron/cen/s/cen-en16931-br-s-06.ts +3 -3
- package/src/schematron/cen/s/cen-en16931-br-s-07.ts +3 -3
- package/src/schematron/cen/s/cen-en16931-br-s-08.ts +3 -3
- package/src/schematron/cen/s/cen-en16931-br-s-09.ts +3 -3
- package/src/schematron/cen/s/cen-en16931-br-s-10.ts +3 -3
- package/src/schematron/cen/z/cen-en16931-br-z-01.ts +3 -3
- package/src/schematron/cen/z/cen-en16931-br-z-02.ts +3 -3
- package/src/schematron/cen/z/cen-en16931-br-z-03.ts +8 -3
- package/src/schematron/cen/z/cen-en16931-br-z-04.ts +3 -3
- package/src/schematron/cen/z/cen-en16931-br-z-05.ts +3 -3
- package/src/schematron/cen/z/cen-en16931-br-z-06.ts +3 -3
- package/src/schematron/cen/z/cen-en16931-br-z-07.ts +3 -3
- package/src/schematron/cen/z/cen-en16931-br-z-08.ts +3 -3
- package/src/schematron/cen/z/cen-en16931-br-z-09.ts +3 -3
- package/src/schematron/cen/z/cen-en16931-br-z-10.ts +3 -3
- package/src/schematron/de/de-r-001.ts +3 -3
- package/src/schematron/de/de-r-002.ts +3 -3
- package/src/schematron/de/de-r-003.ts +3 -3
- package/src/schematron/de/de-r-004.ts +3 -3
- package/src/schematron/de/de-r-005.ts +3 -3
- package/src/schematron/de/de-r-006.ts +3 -3
- package/src/schematron/de/de-r-007.ts +3 -3
- package/src/schematron/de/de-r-008.ts +3 -3
- package/src/schematron/de/de-r-009.ts +3 -3
- package/src/schematron/de/de-r-010.ts +3 -3
- package/src/schematron/de/de-r-011.ts +3 -3
- package/src/schematron/de/de-r-014.ts +3 -3
- package/src/schematron/de/de-r-015.ts +3 -3
- package/src/schematron/de/de-r-016.ts +3 -3
- package/src/schematron/de/de-r-017.ts +3 -3
- package/src/schematron/de/de-r-018.ts +3 -3
- package/src/schematron/de/de-r-019.ts +4 -4
- package/src/schematron/de/de-r-020.ts +4 -4
- package/src/schematron/de/de-r-022.ts +3 -3
- package/src/schematron/de/de-r-023-1.ts +3 -3
- package/src/schematron/de/de-r-023-2.ts +3 -3
- package/src/schematron/de/de-r-024-1.ts +3 -3
- package/src/schematron/de/de-r-024-2.ts +3 -3
- package/src/schematron/de/de-r-025-1.ts +3 -3
- package/src/schematron/de/de-r-025-2.ts +3 -3
- package/src/schematron/de/de-r-026.ts +3 -3
- package/src/schematron/de/de-r-027.ts +3 -3
- package/src/schematron/de/de-r-028.ts +3 -3
- package/src/schematron/de/de-r-030.ts +3 -3
- package/src/schematron/de/de-r-031.ts +3 -3
- package/src/schematron/dk/dk-r-002.ts +3 -3
- package/src/schematron/dk/dk-r-003.ts +3 -3
- package/src/schematron/dk/dk-r-004.ts +3 -3
- package/src/schematron/dk/dk-r-005.ts +3 -3
- package/src/schematron/dk/dk-r-006.ts +3 -3
- package/src/schematron/dk/dk-r-007.ts +3 -3
- package/src/schematron/dk/dk-r-008.ts +3 -3
- package/src/schematron/dk/dk-r-009.ts +3 -3
- package/src/schematron/dk/dk-r-010.ts +3 -3
- package/src/schematron/dk/dk-r-011.ts +3 -3
- package/src/schematron/dk/dk-r-013.ts +3 -3
- package/src/schematron/dk/dk-r-014.ts +3 -3
- package/src/schematron/dk/dk-r-016.ts +3 -3
- package/src/schematron/dk/dk-r-017.ts +3 -3
- package/src/schematron/gr/gr-r-001-1.ts +3 -3
- package/src/schematron/gr/gr-r-001-2.ts +4 -4
- package/src/schematron/gr/gr-r-001-3.ts +4 -4
- package/src/schematron/gr/gr-r-001-4.ts +3 -3
- package/src/schematron/gr/gr-r-001-5.ts +3 -3
- package/src/schematron/gr/gr-r-001-6.ts +3 -3
- package/src/schematron/gr/gr-r-001-7.ts +3 -3
- package/src/schematron/gr/gr-r-002.ts +3 -3
- package/src/schematron/gr/gr-r-003.ts +4 -4
- package/src/schematron/gr/gr-r-004-1.ts +3 -3
- package/src/schematron/gr/gr-r-004-2.ts +3 -3
- package/src/schematron/gr/gr-r-005.ts +3 -3
- package/src/schematron/gr/gr-r-006.ts +4 -4
- package/src/schematron/gr/gr-r-008-2.ts +3 -3
- package/src/schematron/gr/gr-r-008-3.ts +3 -3
- package/src/schematron/gr/gr-r-009.ts +4 -4
- package/src/schematron/gr/gr-r-010.ts +4 -4
- package/src/schematron/gr/gr-s-008-1.ts +3 -3
- package/src/schematron/gr/gr-s-011.ts +3 -3
- package/src/schematron/helpers.ts +5 -5
- package/src/schematron/index.ts +366 -366
- package/src/schematron/is/is-r-001.ts +3 -3
- package/src/schematron/is/is-r-002.ts +3 -3
- package/src/schematron/is/is-r-003.ts +3 -3
- package/src/schematron/is/is-r-004.ts +3 -3
- package/src/schematron/is/is-r-005.ts +3 -3
- package/src/schematron/is/is-r-006.ts +3 -3
- package/src/schematron/is/is-r-007.ts +3 -3
- package/src/schematron/is/is-r-008.ts +3 -3
- package/src/schematron/is/is-r-009.ts +3 -3
- package/src/schematron/is/is-r-010.ts +3 -3
- package/src/schematron/it/it-r-001.ts +3 -3
- package/src/schematron/it/it-r-002.ts +3 -3
- package/src/schematron/it/it-r-003.ts +3 -3
- package/src/schematron/it/it-r-004.ts +3 -3
- package/src/schematron/nl/nl-r-001.ts +3 -3
- package/src/schematron/nl/nl-r-002.ts +3 -3
- package/src/schematron/nl/nl-r-003.ts +3 -3
- package/src/schematron/nl/nl-r-004.ts +3 -3
- package/src/schematron/nl/nl-r-005.ts +3 -3
- package/src/schematron/nl/nl-r-006.ts +3 -3
- package/src/schematron/nl/nl-r-007.ts +3 -3
- package/src/schematron/nl/nl-r-008.ts +3 -3
- package/src/schematron/nl/nl-r-009.ts +3 -3
- package/src/schematron/no/no-r-001.ts +4 -4
- package/src/schematron/no/no-r-002.ts +3 -3
- package/src/schematron/peppol/cl/peppol-en16931-cl001.ts +3 -3
- package/src/schematron/peppol/cl/peppol-en16931-cl002.ts +3 -3
- package/src/schematron/peppol/cl/peppol-en16931-cl003.ts +3 -3
- package/src/schematron/peppol/cl/peppol-en16931-cl006.ts +3 -3
- package/src/schematron/peppol/cl/peppol-en16931-cl007.ts +3 -3
- package/src/schematron/peppol/cl/peppol-en16931-cl008.ts +3 -3
- package/src/schematron/peppol/common/peppol-common-r040.ts +5 -5
- package/src/schematron/peppol/common/peppol-common-r041.ts +5 -5
- package/src/schematron/peppol/common/peppol-common-r042.ts +3 -3
- package/src/schematron/peppol/common/peppol-common-r043.ts +5 -5
- package/src/schematron/peppol/common/peppol-common-r044.ts +3 -3
- package/src/schematron/peppol/common/peppol-common-r045.ts +4 -4
- package/src/schematron/peppol/common/peppol-common-r046.ts +4 -4
- package/src/schematron/peppol/common/peppol-common-r047.ts +4 -4
- package/src/schematron/peppol/common/peppol-common-r049.ts +4 -4
- package/src/schematron/peppol/common/peppol-common-r050.ts +5 -5
- package/src/schematron/peppol/common/peppol-common-r052.ts +3 -3
- package/src/schematron/peppol/common/peppol-common-r053.ts +3 -3
- package/src/schematron/peppol/f/peppol-en16931-f001.ts +4 -4
- package/src/schematron/peppol/p/peppol-en16931-p0100.ts +3 -3
- package/src/schematron/peppol/p/peppol-en16931-p0101.ts +3 -3
- package/src/schematron/peppol/p/peppol-en16931-p0104.ts +3 -3
- package/src/schematron/peppol/p/peppol-en16931-p0105.ts +3 -3
- package/src/schematron/peppol/p/peppol-en16931-p0106.ts +3 -3
- package/src/schematron/peppol/p/peppol-en16931-p0107.ts +3 -3
- package/src/schematron/peppol/p/peppol-en16931-p0108.ts +3 -3
- package/src/schematron/peppol/p/peppol-en16931-p0109.ts +3 -3
- package/src/schematron/peppol/p/peppol-en16931-p0110.ts +3 -3
- package/src/schematron/peppol/p/peppol-en16931-p0111.ts +3 -3
- package/src/schematron/peppol/p/peppol-en16931-p0112.ts +3 -3
- package/src/schematron/peppol/r/peppol-en16931-r001.ts +3 -3
- package/src/schematron/peppol/r/peppol-en16931-r002.ts +3 -3
- package/src/schematron/peppol/r/peppol-en16931-r003.ts +3 -3
- package/src/schematron/peppol/r/peppol-en16931-r004.ts +3 -3
- package/src/schematron/peppol/r/peppol-en16931-r005.ts +3 -3
- package/src/schematron/peppol/r/peppol-en16931-r007.ts +3 -3
- package/src/schematron/peppol/r/peppol-en16931-r008.ts +3 -3
- package/src/schematron/peppol/r/peppol-en16931-r010.ts +3 -3
- package/src/schematron/peppol/r/peppol-en16931-r020.ts +3 -3
- package/src/schematron/peppol/r/peppol-en16931-r040.ts +3 -3
- package/src/schematron/peppol/r/peppol-en16931-r041.ts +3 -3
- package/src/schematron/peppol/r/peppol-en16931-r042.ts +3 -3
- package/src/schematron/peppol/r/peppol-en16931-r043.ts +3 -3
- package/src/schematron/peppol/r/peppol-en16931-r044.ts +3 -3
- package/src/schematron/peppol/r/peppol-en16931-r046.ts +3 -3
- package/src/schematron/peppol/r/peppol-en16931-r051.ts +3 -3
- package/src/schematron/peppol/r/peppol-en16931-r053.ts +3 -3
- package/src/schematron/peppol/r/peppol-en16931-r054.ts +3 -3
- package/src/schematron/peppol/r/peppol-en16931-r055.ts +3 -3
- package/src/schematron/peppol/r/peppol-en16931-r061.ts +3 -3
- package/src/schematron/peppol/r/peppol-en16931-r100.ts +3 -3
- package/src/schematron/peppol/r/peppol-en16931-r101.ts +3 -3
- package/src/schematron/peppol/r/peppol-en16931-r110.ts +3 -3
- package/src/schematron/peppol/r/peppol-en16931-r111.ts +3 -3
- package/src/schematron/peppol/r/peppol-en16931-r120.ts +3 -3
- package/src/schematron/peppol/r/peppol-en16931-r121.ts +3 -3
- package/src/schematron/peppol/r/peppol-en16931-r130.ts +3 -3
- package/src/schematron/run-all-rules.ts +361 -361
- package/src/schematron/schematron.ts +3 -3
- package/src/schematron/se/se-r-001.ts +3 -3
- package/src/schematron/se/se-r-002.ts +3 -3
- package/src/schematron/se/se-r-003.ts +3 -3
- package/src/schematron/se/se-r-004.ts +3 -3
- package/src/schematron/se/se-r-005.ts +3 -3
- package/src/schematron/se/se-r-006.ts +3 -3
- package/src/schematron/se/se-r-007.ts +3 -3
- package/src/schematron/se/se-r-008.ts +3 -3
- package/src/schematron/se/se-r-009.ts +3 -3
- package/src/schematron/se/se-r-010.ts +3 -3
- package/src/schematron/se/se-r-011.ts +3 -3
- package/src/schematron/se/se-r-012.ts +3 -3
- package/src/schematron/se/se-r-013.ts +4 -4
- package/src/xml/builder-options.ts +1 -1
- package/src/xml/parser-options.ts +1 -1
- package/src/xml.ts +2 -2
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { Effect, Predicate } from 'effect';
|
|
2
2
|
|
|
3
|
-
import type { XmlNode } from '#/helpers/get-prop';
|
|
4
|
-
import type { PeppolInvoiceDocumentResponseParty } from '#/schemas/peppol-invoice-response-schema';
|
|
5
|
-
import type { RecursivePartial } from '#/types';
|
|
3
|
+
import type { XmlNode } from '#/helpers/get-prop.ts';
|
|
4
|
+
import type { PeppolInvoiceDocumentResponseParty } from '#/schemas/peppol-invoice-response-schema.ts';
|
|
5
|
+
import type { RecursivePartial } from '#/types.ts';
|
|
6
6
|
|
|
7
|
-
import { decodeIdentifier } from '#/decoders/fields/decode-identifier';
|
|
8
|
-
import { getProp } from '#/helpers/get-prop';
|
|
9
|
-
import { strOrUnd } from '#/helpers/str-or-und';
|
|
7
|
+
import { decodeIdentifier } from '#/decoders/fields/decode-identifier.ts';
|
|
8
|
+
import { getProp } from '#/helpers/get-prop.ts';
|
|
9
|
+
import { strOrUnd } from '#/helpers/str-or-und.ts';
|
|
10
10
|
|
|
11
11
|
export const decodeInvoiceMessageDocumentParty = Effect.fn(function* (
|
|
12
12
|
party: XmlNode,
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { Effect, Predicate } from 'effect';
|
|
2
2
|
|
|
3
|
-
import type { XmlNode } from '#/helpers/get-prop';
|
|
3
|
+
import type { XmlNode } from '#/helpers/get-prop.ts';
|
|
4
4
|
|
|
5
|
-
import { decodeContact } from '#/decoders/fields/decode-contact';
|
|
6
|
-
import { decodeElectronicAddress } from '#/decoders/fields/decode-electronic-address';
|
|
7
|
-
import { decodeIdentifier } from '#/decoders/fields/decode-identifier';
|
|
8
|
-
import { decodePartyLegalEntity } from '#/decoders/fields/decode-party-legal-entity';
|
|
9
|
-
import { getProp } from '#/helpers/get-prop';
|
|
5
|
+
import { decodeContact } from '#/decoders/fields/decode-contact.ts';
|
|
6
|
+
import { decodeElectronicAddress } from '#/decoders/fields/decode-electronic-address.ts';
|
|
7
|
+
import { decodeIdentifier } from '#/decoders/fields/decode-identifier.ts';
|
|
8
|
+
import { decodePartyLegalEntity } from '#/decoders/fields/decode-party-legal-entity.ts';
|
|
9
|
+
import { getProp } from '#/helpers/get-prop.ts';
|
|
10
10
|
|
|
11
11
|
export const decodeInvoiceMessageParty = Effect.fn(function* (party: XmlNode, ...path: Array<string>) {
|
|
12
12
|
const val = yield* getProp(party, ...path);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Effect, Predicate } from 'effect';
|
|
2
2
|
|
|
3
|
-
import type { XmlNode } from '#/helpers/get-prop';
|
|
3
|
+
import type { XmlNode } from '#/helpers/get-prop.ts';
|
|
4
4
|
|
|
5
|
-
import { getProp } from '#/helpers/get-prop';
|
|
6
|
-
import { strOrUnd } from '#/helpers/str-or-und';
|
|
5
|
+
import { getProp } from '#/helpers/get-prop.ts';
|
|
6
|
+
import { strOrUnd } from '#/helpers/str-or-und.ts';
|
|
7
7
|
|
|
8
8
|
export const decodeInvoicePeriod = Effect.fn(function* (doc: XmlNode, ...path: Array<string>) {
|
|
9
9
|
const invoicePeriod = yield* getProp(doc, ...path);
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { Effect, Predicate } from 'effect';
|
|
2
2
|
|
|
3
|
-
import type { XmlNode } from '#/helpers/get-prop';
|
|
4
|
-
import type { PeppolLegalMonetaryTotal } from '#/schemas/fields/peppol-legal-monetary-total-schema';
|
|
5
|
-
import type { RecursivePartial } from '#/types';
|
|
3
|
+
import type { XmlNode } from '#/helpers/get-prop.ts';
|
|
4
|
+
import type { PeppolLegalMonetaryTotal } from '#/schemas/fields/peppol-legal-monetary-total-schema.ts';
|
|
5
|
+
import type { RecursivePartial } from '#/types.ts';
|
|
6
6
|
|
|
7
|
-
import { decodeAmount } from '#/decoders/fields/decode-amount';
|
|
8
|
-
import { getProp } from '#/helpers/get-prop';
|
|
7
|
+
import { decodeAmount } from '#/decoders/fields/decode-amount.ts';
|
|
8
|
+
import { getProp } from '#/helpers/get-prop.ts';
|
|
9
9
|
|
|
10
10
|
export const decodeLegalMonetaryTotal = Effect.fn(function* (
|
|
11
11
|
node: XmlNode | undefined,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { Effect } from 'effect';
|
|
2
2
|
|
|
3
|
-
import type { XmlNode } from '#/helpers/get-prop';
|
|
4
|
-
import type { PeppolLineAllowanceCharge } from '#/schemas/fields/peppol-line-allowance-charge-schema';
|
|
5
|
-
import type { RecursivePartial } from '#/types';
|
|
3
|
+
import type { XmlNode } from '#/helpers/get-prop.ts';
|
|
4
|
+
import type { PeppolLineAllowanceCharge } from '#/schemas/fields/peppol-line-allowance-charge-schema.ts';
|
|
5
|
+
import type { RecursivePartial } from '#/types.ts';
|
|
6
6
|
|
|
7
|
-
import { decodeBaseAllowanceCharge } from '#/decoders/fields/decode-base-allowance-charge';
|
|
8
|
-
import { decodeNodeList } from '#/decoders/fields/decode-node-list';
|
|
7
|
+
import { decodeBaseAllowanceCharge } from '#/decoders/fields/decode-base-allowance-charge.ts';
|
|
8
|
+
import { decodeNodeList } from '#/decoders/fields/decode-node-list.ts';
|
|
9
9
|
|
|
10
10
|
export const decodeLineAllowanceCharges = Effect.fn(function* (allowanceCharges: XmlNode, ...path: Array<string>) {
|
|
11
11
|
return yield* decodeNodeList(
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { Effect, Predicate } from 'effect';
|
|
2
2
|
|
|
3
|
-
import type { XmlNode } from '#/helpers/get-prop';
|
|
3
|
+
import type { XmlNode } from '#/helpers/get-prop.ts';
|
|
4
4
|
|
|
5
|
-
import { decodeAmount } from '#/decoders/fields/decode-amount';
|
|
6
|
-
import { decodePriceAllowanceCharge } from '#/decoders/fields/decode-price-allowance-charge';
|
|
7
|
-
import { decodeQuantity } from '#/decoders/fields/decode-quantity';
|
|
8
|
-
import { getProp } from '#/helpers/get-prop';
|
|
5
|
+
import { decodeAmount } from '#/decoders/fields/decode-amount.ts';
|
|
6
|
+
import { decodePriceAllowanceCharge } from '#/decoders/fields/decode-price-allowance-charge.ts';
|
|
7
|
+
import { decodeQuantity } from '#/decoders/fields/decode-quantity.ts';
|
|
8
|
+
import { getProp } from '#/helpers/get-prop.ts';
|
|
9
9
|
|
|
10
10
|
export const decodeLinePrice = Effect.fn(function* (price: XmlNode, ...path: Array<string>) {
|
|
11
11
|
const node = yield* getProp(price, ...path);
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { Effect, Predicate } from 'effect';
|
|
2
2
|
|
|
3
|
-
import type { XmlNode } from '#/helpers/get-prop';
|
|
4
|
-
import type { PeppolDocumentLine } from '#/schemas/peppol-document-schema';
|
|
5
|
-
import type { RecursivePartial } from '#/types';
|
|
3
|
+
import type { XmlNode } from '#/helpers/get-prop.ts';
|
|
4
|
+
import type { PeppolDocumentLine } from '#/schemas/peppol-document-schema.ts';
|
|
5
|
+
import type { RecursivePartial } from '#/types.ts';
|
|
6
6
|
|
|
7
|
-
import { decodeAmount } from '#/decoders/fields/decode-amount';
|
|
8
|
-
import { decodeIdentifier } from '#/decoders/fields/decode-identifier';
|
|
9
|
-
import { decodeInvoiceLinePeriod } from '#/decoders/fields/decode-invoice-line-period';
|
|
10
|
-
import { decodeLineAllowanceCharges } from '#/decoders/fields/decode-line-allowance-charges';
|
|
11
|
-
import { decodeLinePrice } from '#/decoders/fields/decode-line-price';
|
|
12
|
-
import { decodeSimpleIdentifer } from '#/decoders/fields/decode-simple-identifier';
|
|
13
|
-
import { decodeTaxCategory } from '#/decoders/fields/decode-tax-category';
|
|
14
|
-
import { getArray } from '#/helpers/get-array';
|
|
15
|
-
import { getProp } from '#/helpers/get-prop';
|
|
16
|
-
import { strOrUnd } from '#/helpers/str-or-und';
|
|
7
|
+
import { decodeAmount } from '#/decoders/fields/decode-amount.ts';
|
|
8
|
+
import { decodeIdentifier } from '#/decoders/fields/decode-identifier.ts';
|
|
9
|
+
import { decodeInvoiceLinePeriod } from '#/decoders/fields/decode-invoice-line-period.ts';
|
|
10
|
+
import { decodeLineAllowanceCharges } from '#/decoders/fields/decode-line-allowance-charges.ts';
|
|
11
|
+
import { decodeLinePrice } from '#/decoders/fields/decode-line-price.ts';
|
|
12
|
+
import { decodeSimpleIdentifer } from '#/decoders/fields/decode-simple-identifier.ts';
|
|
13
|
+
import { decodeTaxCategory } from '#/decoders/fields/decode-tax-category.ts';
|
|
14
|
+
import { getArray } from '#/helpers/get-array.ts';
|
|
15
|
+
import { getProp } from '#/helpers/get-prop.ts';
|
|
16
|
+
import { strOrUnd } from '#/helpers/str-or-und.ts';
|
|
17
17
|
|
|
18
18
|
type PeppolDocumentLineItem = PeppolDocumentLine['item'];
|
|
19
19
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { Effect, Predicate } from 'effect';
|
|
2
2
|
|
|
3
|
-
import type { XmlNode } from '#/helpers/get-prop';
|
|
4
|
-
import type { PeppolMessageLevelResponseParty } from '#/schemas/peppol-message-level-response-party-schema';
|
|
5
|
-
import type { RecursivePartial } from '#/types';
|
|
3
|
+
import type { XmlNode } from '#/helpers/get-prop.ts';
|
|
4
|
+
import type { PeppolMessageLevelResponseParty } from '#/schemas/peppol-message-level-response-party-schema.ts';
|
|
5
|
+
import type { RecursivePartial } from '#/types.ts';
|
|
6
6
|
|
|
7
|
-
import { decodeElectronicAddress } from '#/decoders/fields/decode-electronic-address';
|
|
8
|
-
import { getProp } from '#/helpers/get-prop';
|
|
7
|
+
import { decodeElectronicAddress } from '#/decoders/fields/decode-electronic-address.ts';
|
|
8
|
+
import { getProp } from '#/helpers/get-prop.ts';
|
|
9
9
|
|
|
10
10
|
export const decodeMessageLevelParty = Effect.fn(function* (
|
|
11
11
|
party: XmlNode,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Effect } from 'effect';
|
|
2
2
|
|
|
3
|
-
import type { XmlNode } from '#/helpers/get-prop';
|
|
3
|
+
import type { XmlNode } from '#/helpers/get-prop.ts';
|
|
4
4
|
|
|
5
|
-
import { getArray } from '#/helpers/get-array';
|
|
5
|
+
import { getArray } from '#/helpers/get-array.ts';
|
|
6
6
|
|
|
7
7
|
export const decodeNodeList = Effect.fn(function* <A, E, R>(
|
|
8
8
|
node: XmlNode,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { Effect, Predicate } from 'effect';
|
|
2
2
|
|
|
3
|
-
import type { XmlNode } from '#/helpers/get-prop';
|
|
4
|
-
import type { PeppolOrderReference } from '#/schemas/fields/peppol-order-reference-schema';
|
|
5
|
-
import type { RecursivePartial } from '#/types';
|
|
3
|
+
import type { XmlNode } from '#/helpers/get-prop.ts';
|
|
4
|
+
import type { PeppolOrderReference } from '#/schemas/fields/peppol-order-reference-schema.ts';
|
|
5
|
+
import type { RecursivePartial } from '#/types.ts';
|
|
6
6
|
|
|
7
|
-
import { getProp } from '#/helpers/get-prop';
|
|
8
|
-
import { strOrUnd } from '#/helpers/str-or-und';
|
|
7
|
+
import { getProp } from '#/helpers/get-prop.ts';
|
|
8
|
+
import { strOrUnd } from '#/helpers/str-or-und.ts';
|
|
9
9
|
|
|
10
10
|
export const decodeOrderReference = Effect.fn(function* (
|
|
11
11
|
node: XmlNode,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { Effect, Predicate } from 'effect';
|
|
2
2
|
|
|
3
|
-
import type { XmlNode } from '#/helpers/get-prop';
|
|
4
|
-
import type { PeppolPartyTaxSchema } from '#/schemas/fields/peppol-party-tax-scheme-schema';
|
|
5
|
-
import type { RecursivePartial } from '#/types';
|
|
3
|
+
import type { XmlNode } from '#/helpers/get-prop.ts';
|
|
4
|
+
import type { PeppolPartyTaxSchema } from '#/schemas/fields/peppol-party-tax-scheme-schema.ts';
|
|
5
|
+
import type { RecursivePartial } from '#/types.ts';
|
|
6
6
|
|
|
7
|
-
import { decodePartyTaxScheme } from '#/decoders/fields/decode-party-tax-scheme';
|
|
8
|
-
import { getArray } from '#/helpers/get-array';
|
|
7
|
+
import { decodePartyTaxScheme } from '#/decoders/fields/decode-party-tax-scheme.ts';
|
|
8
|
+
import { getArray } from '#/helpers/get-array.ts';
|
|
9
9
|
|
|
10
10
|
export const decodePartiesTaxScheme = Effect.fn(function* (
|
|
11
11
|
doc: XmlNode,
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { Effect, Predicate } from 'effect';
|
|
2
2
|
|
|
3
|
-
import type { XmlNode } from '#/helpers/get-prop';
|
|
4
|
-
import type { PeppolPartyLegalEntitySchema } from '#/schemas/fields/peppol-party-legal-entity-schema';
|
|
5
|
-
import type { RecursivePartial } from '#/types';
|
|
3
|
+
import type { XmlNode } from '#/helpers/get-prop.ts';
|
|
4
|
+
import type { PeppolPartyLegalEntitySchema } from '#/schemas/fields/peppol-party-legal-entity-schema.ts';
|
|
5
|
+
import type { RecursivePartial } from '#/types.ts';
|
|
6
6
|
|
|
7
|
-
import { decodeIdentifier } from '#/decoders/fields/decode-identifier';
|
|
8
|
-
import { getProp } from '#/helpers/get-prop';
|
|
9
|
-
import { strOrUnd } from '#/helpers/str-or-und';
|
|
7
|
+
import { decodeIdentifier } from '#/decoders/fields/decode-identifier.ts';
|
|
8
|
+
import { getProp } from '#/helpers/get-prop.ts';
|
|
9
|
+
import { strOrUnd } from '#/helpers/str-or-und.ts';
|
|
10
10
|
|
|
11
11
|
export const decodePartyLegalEntity = Effect.fn(function* (
|
|
12
12
|
node: XmlNode,
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { Effect, Predicate } from 'effect';
|
|
2
2
|
|
|
3
|
-
import type { XmlNode } from '#/helpers/get-prop';
|
|
4
|
-
import type { PeppolPartyTaxSchema } from '#/schemas/fields/peppol-party-tax-scheme-schema';
|
|
5
|
-
import type { RecursivePartial } from '#/types';
|
|
3
|
+
import type { XmlNode } from '#/helpers/get-prop.ts';
|
|
4
|
+
import type { PeppolPartyTaxSchema } from '#/schemas/fields/peppol-party-tax-scheme-schema.ts';
|
|
5
|
+
import type { RecursivePartial } from '#/types.ts';
|
|
6
6
|
|
|
7
|
-
import { decodeSimpleIdentifer } from '#/decoders/fields/decode-simple-identifier';
|
|
8
|
-
import { getProp } from '#/helpers/get-prop';
|
|
9
|
-
import { strOrUnd } from '#/helpers/str-or-und';
|
|
7
|
+
import { decodeSimpleIdentifer } from '#/decoders/fields/decode-simple-identifier.ts';
|
|
8
|
+
import { getProp } from '#/helpers/get-prop.ts';
|
|
9
|
+
import { strOrUnd } from '#/helpers/str-or-und.ts';
|
|
10
10
|
|
|
11
11
|
export const decodePartyTaxScheme = Effect.fn(function* (
|
|
12
12
|
doc: XmlNode,
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { Effect, Predicate } from 'effect';
|
|
2
2
|
|
|
3
|
-
import type { XmlNode } from '#/helpers/get-prop';
|
|
3
|
+
import type { XmlNode } from '#/helpers/get-prop.ts';
|
|
4
4
|
|
|
5
|
-
import { decodeAddress } from '#/decoders/fields/decode-address';
|
|
6
|
-
import { decodeContact } from '#/decoders/fields/decode-contact';
|
|
7
|
-
import { decodeElectronicAddress } from '#/decoders/fields/decode-electronic-address';
|
|
8
|
-
import { decodeIdentifier } from '#/decoders/fields/decode-identifier';
|
|
9
|
-
import { decodePartiesTaxScheme } from '#/decoders/fields/decode-parties-tax-scheme';
|
|
10
|
-
import { decodePartyLegalEntity } from '#/decoders/fields/decode-party-legal-entity';
|
|
11
|
-
import { getProp } from '#/helpers/get-prop';
|
|
12
|
-
import { strOrUnd } from '#/helpers/str-or-und';
|
|
5
|
+
import { decodeAddress } from '#/decoders/fields/decode-address.ts';
|
|
6
|
+
import { decodeContact } from '#/decoders/fields/decode-contact.ts';
|
|
7
|
+
import { decodeElectronicAddress } from '#/decoders/fields/decode-electronic-address.ts';
|
|
8
|
+
import { decodeIdentifier } from '#/decoders/fields/decode-identifier.ts';
|
|
9
|
+
import { decodePartiesTaxScheme } from '#/decoders/fields/decode-parties-tax-scheme.ts';
|
|
10
|
+
import { decodePartyLegalEntity } from '#/decoders/fields/decode-party-legal-entity.ts';
|
|
11
|
+
import { getProp } from '#/helpers/get-prop.ts';
|
|
12
|
+
import { strOrUnd } from '#/helpers/str-or-und.ts';
|
|
13
13
|
|
|
14
14
|
export const decodeParty = Effect.fn(function* (party: XmlNode | undefined, ...path: Array<string>) {
|
|
15
15
|
const val = yield* getProp(party, ...path);
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { Effect, Predicate } from 'effect';
|
|
2
2
|
|
|
3
|
-
import type { XmlNode } from '#/helpers/get-prop';
|
|
4
|
-
import type { PeppolPayeeParty } from '#/schemas/fields/peppol-payee-party-schema';
|
|
5
|
-
import type { RecursivePartial } from '#/types';
|
|
3
|
+
import type { XmlNode } from '#/helpers/get-prop.ts';
|
|
4
|
+
import type { PeppolPayeeParty } from '#/schemas/fields/peppol-payee-party-schema.ts';
|
|
5
|
+
import type { RecursivePartial } from '#/types.ts';
|
|
6
6
|
|
|
7
|
-
import { decodeIdentifier } from '#/decoders/fields/decode-identifier';
|
|
8
|
-
import { getProp } from '#/helpers/get-prop';
|
|
9
|
-
import { strOrUnd } from '#/helpers/str-or-und';
|
|
7
|
+
import { decodeIdentifier } from '#/decoders/fields/decode-identifier.ts';
|
|
8
|
+
import { getProp } from '#/helpers/get-prop.ts';
|
|
9
|
+
import { strOrUnd } from '#/helpers/str-or-und.ts';
|
|
10
10
|
|
|
11
11
|
export const decodePayeeParty = Effect.fn(function* (
|
|
12
12
|
payee: XmlNode | undefined,
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { Effect, Predicate } from 'effect';
|
|
2
2
|
|
|
3
|
-
import type { XmlNode } from '#/helpers/get-prop';
|
|
4
|
-
import type { PeppolIdentifier } from '#/schemas/fields/peppol-identifier-schema';
|
|
5
|
-
import type { PeppolPaymentMeans } from '#/schemas/fields/peppol-payment-means-schema';
|
|
6
|
-
import type { RecursivePartial } from '#/types';
|
|
3
|
+
import type { XmlNode } from '#/helpers/get-prop.ts';
|
|
4
|
+
import type { PeppolIdentifier } from '#/schemas/fields/peppol-identifier-schema.ts';
|
|
5
|
+
import type { PeppolPaymentMeans } from '#/schemas/fields/peppol-payment-means-schema.ts';
|
|
6
|
+
import type { RecursivePartial } from '#/types.ts';
|
|
7
7
|
|
|
8
|
-
import { decodeSimpleIdentifer } from '#/decoders/fields/decode-simple-identifier';
|
|
9
|
-
import { getArray } from '#/helpers/get-array';
|
|
10
|
-
import { getProp } from '#/helpers/get-prop';
|
|
11
|
-
import { strOrUnd } from '#/helpers/str-or-und';
|
|
8
|
+
import { decodeSimpleIdentifer } from '#/decoders/fields/decode-simple-identifier.ts';
|
|
9
|
+
import { getArray } from '#/helpers/get-array.ts';
|
|
10
|
+
import { getProp } from '#/helpers/get-prop.ts';
|
|
11
|
+
import { strOrUnd } from '#/helpers/str-or-und.ts';
|
|
12
12
|
|
|
13
13
|
export const decodePaymentMeans = Effect.fn(function* (
|
|
14
14
|
doc: XmlNode,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { Effect, Predicate } from 'effect';
|
|
2
2
|
|
|
3
|
-
import type { XmlNode } from '#/helpers/get-prop';
|
|
4
|
-
import type { PeppolPaymentTerms } from '#/schemas/fields/peppol-payment-terms-schema';
|
|
5
|
-
import type { RecursivePartial } from '#/types';
|
|
3
|
+
import type { XmlNode } from '#/helpers/get-prop.ts';
|
|
4
|
+
import type { PeppolPaymentTerms } from '#/schemas/fields/peppol-payment-terms-schema.ts';
|
|
5
|
+
import type { RecursivePartial } from '#/types.ts';
|
|
6
6
|
|
|
7
|
-
import { getProp } from '#/helpers/get-prop';
|
|
8
|
-
import { strOrUnd } from '#/helpers/str-or-und';
|
|
7
|
+
import { getProp } from '#/helpers/get-prop.ts';
|
|
8
|
+
import { strOrUnd } from '#/helpers/str-or-und.ts';
|
|
9
9
|
|
|
10
10
|
export const decodePaymentTerms = Effect.fn(function* (
|
|
11
11
|
doc: XmlNode,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Effect, Predicate } from 'effect';
|
|
2
2
|
|
|
3
|
-
import type { XmlNode } from '#/helpers/get-prop';
|
|
3
|
+
import type { XmlNode } from '#/helpers/get-prop.ts';
|
|
4
4
|
|
|
5
|
-
import { decodeAmount } from '#/decoders/fields/decode-amount';
|
|
6
|
-
import { bool } from '#/helpers/bool';
|
|
7
|
-
import { getProp } from '#/helpers/get-prop';
|
|
5
|
+
import { decodeAmount } from '#/decoders/fields/decode-amount.ts';
|
|
6
|
+
import { bool } from '#/helpers/bool.ts';
|
|
7
|
+
import { getProp } from '#/helpers/get-prop.ts';
|
|
8
8
|
|
|
9
9
|
export const decodePriceAllowanceCharge = Effect.fn(function* (allowanceCharges: XmlNode, ...path: Array<string>) {
|
|
10
10
|
const allowanceCharge = yield* getProp(allowanceCharges, ...path);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Effect, Predicate } from 'effect';
|
|
2
2
|
|
|
3
|
-
import type { XmlNode } from '#/helpers/get-prop';
|
|
3
|
+
import type { XmlNode } from '#/helpers/get-prop.ts';
|
|
4
4
|
|
|
5
|
-
import { getProp } from '#/helpers/get-prop';
|
|
6
|
-
import { numOrUnd } from '#/helpers/num-or-und';
|
|
5
|
+
import { getProp } from '#/helpers/get-prop.ts';
|
|
6
|
+
import { numOrUnd } from '#/helpers/num-or-und.ts';
|
|
7
7
|
|
|
8
8
|
export const decodeQuantity = Effect.fn(function* (quantity: XmlNode | undefined, ...path: Array<string>) {
|
|
9
9
|
const val = yield* getProp(quantity, ...path);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Effect, Predicate } from 'effect';
|
|
2
2
|
|
|
3
|
-
import type { XmlNode } from '#/helpers/get-prop';
|
|
4
|
-
import type { RecursivePartial } from '#/types';
|
|
3
|
+
import type { XmlNode } from '#/helpers/get-prop.ts';
|
|
4
|
+
import type { RecursivePartial } from '#/types.ts';
|
|
5
5
|
|
|
6
|
-
import { getProp } from '#/helpers/get-prop';
|
|
7
|
-
import { strOrUnd } from '#/helpers/str-or-und';
|
|
6
|
+
import { getProp } from '#/helpers/get-prop.ts';
|
|
7
|
+
import { strOrUnd } from '#/helpers/str-or-und.ts';
|
|
8
8
|
|
|
9
9
|
export const decodeSimpleIdentifer = Effect.fn('decode-simple-identifier')(function* (
|
|
10
10
|
doc: XmlNode,
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { Effect, Predicate } from 'effect';
|
|
2
2
|
|
|
3
|
-
import type { XmlNode } from '#/helpers/get-prop';
|
|
4
|
-
import type { PeppolAllowanceCharge } from '#/schemas/fields/peppol-allowance-charge-schema';
|
|
5
|
-
import type { RecursivePartial } from '#/types';
|
|
3
|
+
import type { XmlNode } from '#/helpers/get-prop.ts';
|
|
4
|
+
import type { PeppolAllowanceCharge } from '#/schemas/fields/peppol-allowance-charge-schema.ts';
|
|
5
|
+
import type { RecursivePartial } from '#/types.ts';
|
|
6
6
|
|
|
7
|
-
import { decodeSimpleIdentifer } from '#/decoders/fields/decode-simple-identifier';
|
|
8
|
-
import { getProp } from '#/helpers/get-prop';
|
|
9
|
-
import { numOrUnd } from '#/helpers/num-or-und';
|
|
10
|
-
import { strOrUnd } from '#/helpers/str-or-und';
|
|
7
|
+
import { decodeSimpleIdentifer } from '#/decoders/fields/decode-simple-identifier.ts';
|
|
8
|
+
import { getProp } from '#/helpers/get-prop.ts';
|
|
9
|
+
import { numOrUnd } from '#/helpers/num-or-und.ts';
|
|
10
|
+
import { strOrUnd } from '#/helpers/str-or-und.ts';
|
|
11
11
|
|
|
12
12
|
export const decodeTaxCategory = Effect.fn(function* (
|
|
13
13
|
doc: XmlNode,
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { Effect, Predicate } from 'effect';
|
|
2
2
|
|
|
3
|
-
import type { XmlNode } from '#/helpers/get-prop';
|
|
4
|
-
import type { PeppolTaxRepresentativeParty } from '#/schemas/fields/peppol-tax-representative-schema';
|
|
5
|
-
import type { RecursivePartial } from '#/types';
|
|
3
|
+
import type { XmlNode } from '#/helpers/get-prop.ts';
|
|
4
|
+
import type { PeppolTaxRepresentativeParty } from '#/schemas/fields/peppol-tax-representative-schema.ts';
|
|
5
|
+
import type { RecursivePartial } from '#/types.ts';
|
|
6
6
|
|
|
7
|
-
import { decodeAddress } from '#/decoders/fields/decode-address';
|
|
8
|
-
import { decodePartyTaxScheme } from '#/decoders/fields/decode-party-tax-scheme';
|
|
9
|
-
import { getProp } from '#/helpers/get-prop';
|
|
10
|
-
import { strOrUnd } from '#/helpers/str-or-und';
|
|
7
|
+
import { decodeAddress } from '#/decoders/fields/decode-address.ts';
|
|
8
|
+
import { decodePartyTaxScheme } from '#/decoders/fields/decode-party-tax-scheme.ts';
|
|
9
|
+
import { getProp } from '#/helpers/get-prop.ts';
|
|
10
|
+
import { strOrUnd } from '#/helpers/str-or-und.ts';
|
|
11
11
|
|
|
12
12
|
export const decodeTaxRepresentativeParty = Effect.fn(function* (
|
|
13
13
|
doc: XmlNode,
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { Effect, Predicate } from 'effect';
|
|
2
2
|
|
|
3
|
-
import type { XmlNode } from '#/helpers/get-prop';
|
|
4
|
-
import type { PeppolTaxSubTotal } from '#/schemas/fields/peppol-tax-subtotal-schema';
|
|
5
|
-
import type { PeppolTaxTotal } from '#/schemas/fields/peppol-tax-totals-base-schema';
|
|
6
|
-
import type { RecursivePartial } from '#/types';
|
|
3
|
+
import type { XmlNode } from '#/helpers/get-prop.ts';
|
|
4
|
+
import type { PeppolTaxSubTotal } from '#/schemas/fields/peppol-tax-subtotal-schema.ts';
|
|
5
|
+
import type { PeppolTaxTotal } from '#/schemas/fields/peppol-tax-totals-base-schema.ts';
|
|
6
|
+
import type { RecursivePartial } from '#/types.ts';
|
|
7
7
|
|
|
8
|
-
import { decodeAmount } from '#/decoders/fields/decode-amount';
|
|
9
|
-
import { decodeSimpleIdentifer } from '#/decoders/fields/decode-simple-identifier';
|
|
10
|
-
import { getArray } from '#/helpers/get-array';
|
|
11
|
-
import { getProp } from '#/helpers/get-prop';
|
|
12
|
-
import { numOrUnd } from '#/helpers/num-or-und';
|
|
13
|
-
import { strOrUnd } from '#/helpers/str-or-und';
|
|
8
|
+
import { decodeAmount } from '#/decoders/fields/decode-amount.ts';
|
|
9
|
+
import { decodeSimpleIdentifer } from '#/decoders/fields/decode-simple-identifier.ts';
|
|
10
|
+
import { getArray } from '#/helpers/get-array.ts';
|
|
11
|
+
import { getProp } from '#/helpers/get-prop.ts';
|
|
12
|
+
import { numOrUnd } from '#/helpers/num-or-und.ts';
|
|
13
|
+
import { strOrUnd } from '#/helpers/str-or-und.ts';
|
|
14
14
|
|
|
15
15
|
export const decodeTaxTotals = Effect.fn(function* (
|
|
16
16
|
doc: XmlNode,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Effect, Predicate } from 'effect';
|
|
2
2
|
|
|
3
|
-
import type { PeppolAdditionalDocumentReference } from '#/schemas/fields/peppol-additional-document-reference-schema';
|
|
3
|
+
import type { PeppolAdditionalDocumentReference } from '#/schemas/fields/peppol-additional-document-reference-schema.ts';
|
|
4
4
|
|
|
5
|
-
import { encodeIdentifier } from '#/decoders/fields/encode-identifier';
|
|
5
|
+
import { encodeIdentifier } from '#/decoders/fields/encode-identifier.ts';
|
|
6
6
|
|
|
7
7
|
export const encodeAdditionalDocumentReferences = Effect.fn(function* (refs: ReadonlyArray<PeppolAdditionalDocumentReference> | undefined) {
|
|
8
8
|
if (Predicate.isNullish(refs)) return undefined;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Effect, Predicate } from 'effect';
|
|
2
2
|
|
|
3
|
-
import type { XmlNode } from '#/helpers/get-prop';
|
|
4
|
-
import type { PeppolAddress } from '#/schemas/fields/peppol-address-schema';
|
|
3
|
+
import type { XmlNode } from '#/helpers/get-prop.ts';
|
|
4
|
+
import type { PeppolAddress } from '#/schemas/fields/peppol-address-schema.ts';
|
|
5
5
|
|
|
6
6
|
export const encodeAddress = Effect.fn(function* (address?: PeppolAddress): Effect.fn.Return<XmlNode> {
|
|
7
7
|
if (Predicate.isNullish(address)) return undefined;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Effect, Predicate } from 'effect';
|
|
2
2
|
|
|
3
|
-
import type { PeppolAllowanceCharge } from '#/schemas/fields/peppol-allowance-charge-schema';
|
|
3
|
+
import type { PeppolAllowanceCharge } from '#/schemas/fields/peppol-allowance-charge-schema.ts';
|
|
4
4
|
|
|
5
|
-
import { encodeAmount } from '#/decoders/fields/encode-amount';
|
|
6
|
-
import { encodeTaxCategory } from '#/decoders/fields/encode-tax-category';
|
|
5
|
+
import { encodeAmount } from '#/decoders/fields/encode-amount.ts';
|
|
6
|
+
import { encodeTaxCategory } from '#/decoders/fields/encode-tax-category.ts';
|
|
7
7
|
|
|
8
8
|
export const encodeAllowanceCharges = Effect.fn(function* (allowanceCharges: ReadonlyArray<PeppolAllowanceCharge> | undefined) {
|
|
9
9
|
if (Predicate.isNullish(allowanceCharges)) return undefined;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Effect, Predicate } from 'effect';
|
|
2
2
|
|
|
3
|
-
import type { PeppolAmount } from '#/schemas/fields/peppol-amount-schema';
|
|
3
|
+
import type { PeppolAmount } from '#/schemas/fields/peppol-amount-schema.ts';
|
|
4
4
|
|
|
5
5
|
export const encodeAmount = Effect.fn(function* (amount?: PeppolAmount) {
|
|
6
6
|
if (Predicate.isNullish(amount)) return undefined;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Effect } from 'effect';
|
|
2
2
|
|
|
3
|
-
import type { PeppolBillingReference } from '#/schemas/fields/peppol-billing-reference-schema';
|
|
3
|
+
import type { PeppolBillingReference } from '#/schemas/fields/peppol-billing-reference-schema.ts';
|
|
4
4
|
|
|
5
5
|
export const encodeBillingReferences = Effect.fn(function* (billingReferences: ReadonlyArray<PeppolBillingReference> | undefined) {
|
|
6
6
|
return billingReferences?.map(billingReference => ({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Effect, Predicate } from 'effect';
|
|
2
2
|
|
|
3
|
-
import type { PeppolContact } from '#/schemas/fields/peppol-contact-schema';
|
|
3
|
+
import type { PeppolContact } from '#/schemas/fields/peppol-contact-schema.ts';
|
|
4
4
|
|
|
5
5
|
export const encodeContact = Effect.fn(function* (contact: PeppolContact | undefined) {
|
|
6
6
|
if (Predicate.isNullish(contact)) return undefined;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Effect } from 'effect';
|
|
2
2
|
|
|
3
|
-
import type { PeppolCreditNoteLine } from '#/schemas/fields/peppol-credit-note-line-schema';
|
|
3
|
+
import type { PeppolCreditNoteLine } from '#/schemas/fields/peppol-credit-note-line-schema.ts';
|
|
4
4
|
|
|
5
|
-
import { encodeLineShared } from '#/decoders/fields/encode-line-shared';
|
|
5
|
+
import { encodeLineShared } from '#/decoders/fields/encode-line-shared.ts';
|
|
6
6
|
|
|
7
7
|
export const encodeCreditNoteLines = Effect.fn(function* (creditNoteLines: ReadonlyArray<PeppolCreditNoteLine>) {
|
|
8
8
|
if (creditNoteLines.length === 0) return undefined;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Effect, Predicate } from 'effect';
|
|
2
2
|
|
|
3
|
-
import type { PeppolDelivery } from '#/schemas/fields/peppol-delivery-schema';
|
|
3
|
+
import type { PeppolDelivery } from '#/schemas/fields/peppol-delivery-schema.ts';
|
|
4
4
|
|
|
5
|
-
import { encodeAddress } from '#/decoders/fields/encode-address';
|
|
6
|
-
import { encodeIdentifier } from '#/decoders/fields/encode-identifier';
|
|
5
|
+
import { encodeAddress } from '#/decoders/fields/encode-address.ts';
|
|
6
|
+
import { encodeIdentifier } from '#/decoders/fields/encode-identifier.ts';
|
|
7
7
|
|
|
8
8
|
export const encodeDelivery = Effect.fn(function* (delivery: PeppolDelivery | undefined) {
|
|
9
9
|
if (Predicate.isNullish(delivery)) return undefined;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Effect, Predicate } from 'effect';
|
|
2
2
|
|
|
3
|
-
import type { PeppolIdentifier } from '#/schemas/fields/peppol-identifier-schema';
|
|
3
|
+
import type { PeppolIdentifier } from '#/schemas/fields/peppol-identifier-schema.ts';
|
|
4
4
|
|
|
5
5
|
export const encodeIdentifier = Effect.fn(function* (id?: PeppolIdentifier) {
|
|
6
6
|
if (Predicate.isNullish(id)) return undefined;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Effect, Predicate } from 'effect';
|
|
2
2
|
|
|
3
|
-
import type { PeppolInvoiceLinePeriod } from '#/schemas/fields/peppol-invoice-line-period-schema';
|
|
3
|
+
import type { PeppolInvoiceLinePeriod } from '#/schemas/fields/peppol-invoice-line-period-schema.ts';
|
|
4
4
|
|
|
5
5
|
export const encodeInvoiceLinePeriod = Effect.fn(function* (invoicePeriod: PeppolInvoiceLinePeriod | undefined) {
|
|
6
6
|
return Predicate.isNotNullish(invoicePeriod) ? { 'cbc:StartDate': invoicePeriod.startDate, 'cbc:EndDate': invoicePeriod.endDate } : undefined;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Effect } from 'effect';
|
|
2
2
|
|
|
3
|
-
import type { PeppolInvoiceLine } from '#/schemas/fields/peppol-invoice-line-schema';
|
|
3
|
+
import type { PeppolInvoiceLine } from '#/schemas/fields/peppol-invoice-line-schema.ts';
|
|
4
4
|
|
|
5
|
-
import { encodeLineShared } from '#/decoders/fields/encode-line-shared';
|
|
5
|
+
import { encodeLineShared } from '#/decoders/fields/encode-line-shared.ts';
|
|
6
6
|
|
|
7
7
|
export const encodeInvoiceLines = Effect.fn(function* (invoiceLines: ReadonlyArray<PeppolInvoiceLine>) {
|
|
8
8
|
if (invoiceLines.length === 0) return undefined;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Effect, Predicate } from 'effect';
|
|
2
2
|
|
|
3
|
-
import type { PeppolInvoicePeriod } from '#/schemas/fields/peppol-invoice-period-schema';
|
|
3
|
+
import type { PeppolInvoicePeriod } from '#/schemas/fields/peppol-invoice-period-schema.ts';
|
|
4
4
|
|
|
5
5
|
export const encodeInvoicePeriod = Effect.fn(function* (invoicePeriod: PeppolInvoicePeriod | undefined) {
|
|
6
6
|
return Predicate.isNotNullish(invoicePeriod)
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Effect } from 'effect';
|
|
2
2
|
|
|
3
|
-
import type { PeppolLegalMonetaryTotal } from '#/schemas/fields/peppol-legal-monetary-total-schema';
|
|
3
|
+
import type { PeppolLegalMonetaryTotal } from '#/schemas/fields/peppol-legal-monetary-total-schema.ts';
|
|
4
4
|
|
|
5
|
-
import { encodeAmount } from '#/decoders/fields/encode-amount';
|
|
5
|
+
import { encodeAmount } from '#/decoders/fields/encode-amount.ts';
|
|
6
6
|
|
|
7
7
|
export const encodeLegalMonetaryTotal = Effect.fn(function* (legalMonetaryTotal: PeppolLegalMonetaryTotal) {
|
|
8
8
|
return {
|