@factpulse/sdk 2.0.49 → 3.0.2
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/.openapi-generator/FILES +198 -194
- package/CHANGELOG.md +3 -3
- package/README.md +106 -106
- package/api/afnorpdppaapi.ts +38 -38
- package/api/afnorpdppadirectory-service-api.ts +78 -78
- package/api/afnorpdppaflow-service-api.ts +30 -30
- package/api/chorus-pro-api.ts +210 -210
- package/api/health-api.ts +176 -0
- package/api/invoice-processing-api.ts +1083 -0
- package/api/pdfxmlverification-api.ts +536 -0
- package/api/user-api.ts +119 -0
- package/api.ts +6 -6
- package/base.ts +2 -2
- package/common.ts +2 -2
- package/configuration.ts +2 -2
- package/dist/api/afnorpdppaapi.d.ts +31 -31
- package/dist/api/afnorpdppaapi.js +36 -36
- package/dist/api/afnorpdppadirectory-service-api.d.ts +78 -78
- package/dist/api/afnorpdppadirectory-service-api.js +78 -78
- package/dist/api/afnorpdppaflow-service-api.d.ts +30 -30
- package/dist/api/afnorpdppaflow-service-api.js +30 -30
- package/dist/api/chorus-pro-api.d.ts +180 -180
- package/dist/api/chorus-pro-api.js +196 -196
- package/dist/api/health-api.d.ts +90 -0
- package/dist/api/health-api.js +184 -0
- package/dist/api/invoice-processing-api.d.ts +480 -0
- package/dist/api/invoice-processing-api.js +1010 -0
- package/dist/api/pdfxmlverification-api.d.ts +237 -0
- package/dist/api/pdfxmlverification-api.js +514 -0
- package/dist/api/user-api.d.ts +62 -0
- package/dist/api/user-api.js +128 -0
- package/dist/api.d.ts +6 -6
- package/dist/api.js +6 -6
- package/dist/base.d.ts +2 -2
- package/dist/base.js +2 -2
- package/dist/common.d.ts +2 -2
- package/dist/common.js +2 -2
- package/dist/configuration.d.ts +2 -2
- package/dist/configuration.js +2 -2
- package/dist/esm/api/afnorpdppaapi.d.ts +31 -31
- package/dist/esm/api/afnorpdppaapi.js +36 -36
- package/dist/esm/api/afnorpdppadirectory-service-api.d.ts +78 -78
- package/dist/esm/api/afnorpdppadirectory-service-api.js +78 -78
- package/dist/esm/api/afnorpdppaflow-service-api.d.ts +30 -30
- package/dist/esm/api/afnorpdppaflow-service-api.js +30 -30
- package/dist/esm/api/chorus-pro-api.d.ts +180 -180
- package/dist/esm/api/chorus-pro-api.js +196 -196
- package/dist/esm/api/health-api.d.ts +90 -0
- package/dist/esm/api/health-api.js +174 -0
- package/dist/esm/api/invoice-processing-api.d.ts +480 -0
- package/dist/esm/api/invoice-processing-api.js +1000 -0
- package/dist/esm/api/pdfxmlverification-api.d.ts +237 -0
- package/dist/esm/api/pdfxmlverification-api.js +504 -0
- package/dist/esm/api/user-api.d.ts +62 -0
- package/dist/esm/api/user-api.js +118 -0
- package/dist/esm/api.d.ts +6 -6
- package/dist/esm/api.js +6 -6
- package/dist/esm/base.d.ts +2 -2
- package/dist/esm/base.js +2 -2
- package/dist/esm/common.d.ts +2 -2
- package/dist/esm/common.js +2 -2
- package/dist/esm/configuration.d.ts +2 -2
- package/dist/esm/configuration.js +2 -2
- package/dist/esm/index.d.ts +2 -2
- package/dist/esm/index.js +2 -2
- package/dist/esm/models/acknowledgment-status.d.ts +20 -0
- package/dist/esm/models/acknowledgment-status.js +21 -0
- package/dist/esm/models/afnorcredentials.d.ts +19 -0
- package/dist/esm/models/afnorcredentials.js +14 -0
- package/dist/esm/models/afnordestination.d.ts +34 -0
- package/dist/esm/models/afnordestination.js +21 -0
- package/dist/esm/models/afnorhealth-check-response.d.ts +28 -0
- package/dist/esm/models/afnorhealth-check-response.js +14 -0
- package/dist/esm/models/afnorresult.d.ts +30 -0
- package/dist/esm/models/afnorresult.js +14 -0
- package/dist/esm/models/allowance-reason-code.d.ts +24 -0
- package/dist/esm/models/allowance-reason-code.js +25 -0
- package/dist/esm/models/amount-due.d.ts +16 -0
- package/dist/esm/models/amount-due.js +14 -0
- package/dist/esm/models/apierror.d.ts +5 -5
- package/dist/esm/models/apierror.js +2 -2
- package/dist/esm/models/apiprofile.d.ts +21 -0
- package/dist/esm/models/apiprofile.js +22 -0
- package/dist/esm/models/bounding-box-schema.d.ts +10 -10
- package/dist/esm/models/bounding-box-schema.js +2 -2
- package/dist/esm/models/celery-status.d.ts +22 -0
- package/dist/esm/models/celery-status.js +23 -0
- package/dist/esm/models/certificate-info-response.d.ts +23 -23
- package/dist/esm/models/certificate-info-response.js +2 -2
- package/dist/esm/models/chorus-pro-destination.d.ts +23 -0
- package/dist/esm/models/chorus-pro-destination.js +16 -0
- package/dist/esm/models/chorus-pro-result.d.ts +22 -0
- package/dist/esm/models/chorus-pro-result.js +14 -0
- package/dist/esm/models/destination.d.ts +7 -7
- package/dist/esm/models/destination.js +2 -2
- package/dist/esm/models/document-type.d.ts +37 -0
- package/dist/esm/models/document-type.js +38 -0
- package/dist/esm/models/electronic-address.d.ts +19 -0
- package/dist/esm/models/electronic-address.js +14 -0
- package/dist/esm/models/enriched-invoice-info.d.ts +24 -0
- package/dist/esm/models/enriched-invoice-info.js +14 -0
- package/dist/esm/models/error-level.d.ts +2 -2
- package/dist/esm/models/error-level.js +2 -2
- package/dist/esm/models/error-source.d.ts +2 -2
- package/dist/esm/models/error-source.js +2 -2
- package/dist/esm/models/factur-xpdfinfo.d.ts +28 -0
- package/dist/esm/models/factur-xpdfinfo.js +14 -0
- package/dist/esm/models/facture-electronique-rest-api-schemas-chorus-pro-chorus-pro-credentials.d.ts +36 -0
- package/dist/esm/models/facture-electronique-rest-api-schemas-chorus-pro-chorus-pro-credentials.js +14 -0
- package/dist/esm/models/facture-electronique-rest-api-schemas-processing-chorus-pro-credentials.d.ts +24 -0
- package/dist/esm/models/facture-electronique-rest-api-schemas-processing-chorus-pro-credentials.js +14 -0
- package/dist/esm/models/facture-factur-x.d.ts +30 -30
- package/dist/esm/models/facture-factur-x.js +2 -2
- package/dist/esm/models/field-status.d.ts +22 -0
- package/dist/esm/models/field-status.js +23 -0
- package/dist/esm/models/flow-direction.d.ts +19 -0
- package/dist/esm/models/flow-direction.js +20 -0
- package/dist/esm/models/flow-profile.d.ts +20 -0
- package/dist/esm/models/flow-profile.js +21 -0
- package/dist/esm/models/flow-summary.d.ts +24 -0
- package/dist/esm/models/flow-summary.js +14 -0
- package/dist/esm/models/flow-syntax.d.ts +22 -0
- package/dist/esm/models/flow-syntax.js +23 -0
- package/dist/esm/models/flow-type.d.ts +22 -0
- package/dist/esm/models/flow-type.js +23 -0
- package/dist/esm/models/generate-certificate-request.d.ts +21 -21
- package/dist/esm/models/generate-certificate-request.js +2 -2
- package/dist/esm/models/generate-certificate-response.d.ts +12 -12
- package/dist/esm/models/generate-certificate-response.js +2 -2
- package/dist/esm/models/get-chorus-pro-id-request.d.ts +26 -0
- package/dist/esm/models/get-chorus-pro-id-request.js +14 -0
- package/dist/esm/models/get-chorus-pro-id-response.d.ts +29 -0
- package/dist/esm/models/get-chorus-pro-id-response.js +14 -0
- package/dist/esm/models/get-invoice-request.d.ts +22 -0
- package/dist/esm/models/get-invoice-request.js +14 -0
- package/dist/esm/models/get-invoice-response.d.ts +26 -0
- package/dist/esm/models/get-invoice-response.js +14 -0
- package/dist/esm/models/get-structure-request.d.ts +26 -0
- package/dist/esm/models/get-structure-request.js +14 -0
- package/dist/esm/models/get-structure-response.d.ts +26 -0
- package/dist/esm/models/get-structure-response.js +14 -0
- package/dist/esm/models/global-allowance-amount.d.ts +16 -0
- package/dist/esm/models/global-allowance-amount.js +14 -0
- package/dist/esm/models/httpvalidation-error.d.ts +2 -2
- package/dist/esm/models/httpvalidation-error.js +2 -2
- package/dist/esm/models/incoming-invoice.d.ts +68 -0
- package/dist/esm/models/incoming-invoice.js +14 -0
- package/dist/esm/models/incoming-supplier.d.ts +29 -0
- package/dist/esm/models/incoming-supplier.js +14 -0
- package/dist/esm/models/index.d.ts +95 -93
- package/dist/esm/models/index.js +95 -93
- package/dist/esm/models/invoice-format.d.ts +20 -0
- package/dist/esm/models/invoice-format.js +21 -0
- package/dist/esm/models/invoice-line-allowance-amount.d.ts +16 -0
- package/dist/esm/models/invoice-line-allowance-amount.js +14 -0
- package/dist/esm/models/invoice-line.d.ts +39 -0
- package/dist/esm/models/invoice-line.js +14 -0
- package/dist/esm/models/invoice-note.d.ts +18 -0
- package/dist/esm/models/invoice-note.js +14 -0
- package/dist/esm/models/invoice-references.d.ts +27 -0
- package/dist/esm/models/invoice-references.js +14 -0
- package/dist/esm/models/invoice-status.d.ts +25 -0
- package/dist/esm/models/invoice-status.js +14 -0
- package/dist/esm/models/invoice-totals-prepayment.d.ts +16 -0
- package/dist/esm/models/invoice-totals-prepayment.js +14 -0
- package/dist/esm/models/invoice-totals.d.ts +29 -0
- package/dist/esm/models/invoice-totals.js +14 -0
- package/dist/esm/models/invoice-type-code.d.ts +97 -0
- package/dist/esm/models/invoice-type-code.js +98 -0
- package/dist/esm/models/invoicing-framework-code.d.ts +25 -0
- package/dist/esm/models/invoicing-framework-code.js +26 -0
- package/dist/esm/models/invoicing-framework.d.ts +22 -0
- package/dist/esm/models/invoicing-framework.js +14 -0
- package/dist/esm/models/line-net-amount.d.ts +16 -0
- package/dist/esm/models/line-net-amount.js +14 -0
- package/dist/esm/models/mandatory-note-schema.d.ts +34 -0
- package/dist/esm/models/mandatory-note-schema.js +14 -0
- package/dist/esm/models/manual-rate.d.ts +16 -0
- package/dist/esm/models/manual-rate.js +14 -0
- package/dist/esm/models/manual-vat-rate.d.ts +16 -0
- package/dist/esm/models/manual-vat-rate.js +14 -0
- package/dist/esm/models/operation-nature.d.ts +31 -0
- package/dist/esm/models/operation-nature.js +32 -0
- package/dist/esm/models/output-format.d.ts +19 -0
- package/dist/esm/models/output-format.js +20 -0
- package/dist/esm/models/page-dimensions-schema.d.ts +24 -0
- package/dist/esm/models/page-dimensions-schema.js +14 -0
- package/dist/esm/models/payee.d.ts +26 -0
- package/dist/esm/models/payee.js +14 -0
- package/dist/esm/models/payment-means.d.ts +29 -0
- package/dist/esm/models/payment-means.js +30 -0
- package/dist/esm/models/pdfvalidation-result-api.d.ts +93 -0
- package/dist/esm/models/pdfvalidation-result-api.js +14 -0
- package/dist/esm/models/pdpcredentials.d.ts +7 -7
- package/dist/esm/models/pdpcredentials.js +2 -2
- package/dist/esm/models/postal-address.d.ts +21 -0
- package/dist/esm/models/postal-address.js +14 -0
- package/dist/esm/models/processing-options.d.ts +33 -0
- package/dist/esm/models/processing-options.js +14 -0
- package/dist/esm/models/quantity.d.ts +16 -0
- package/dist/esm/models/quantity.js +14 -0
- package/dist/esm/models/recipient.d.ts +24 -0
- package/dist/esm/models/recipient.js +14 -0
- package/dist/esm/models/scheme-id.d.ts +5 -5
- package/dist/esm/models/scheme-id.js +5 -5
- package/dist/esm/models/search-flow-request.d.ts +34 -0
- package/dist/esm/models/search-flow-request.js +14 -0
- package/dist/esm/models/search-flow-response.d.ts +33 -0
- package/dist/esm/models/search-flow-response.js +14 -0
- package/dist/esm/models/search-services-response.d.ts +24 -0
- package/dist/esm/models/search-services-response.js +14 -0
- package/dist/esm/models/search-structure-request.d.ts +25 -0
- package/dist/esm/models/search-structure-request.js +14 -0
- package/dist/esm/models/search-structure-response.d.ts +30 -0
- package/dist/esm/models/search-structure-response.js +14 -0
- package/dist/esm/models/signature-info-api.d.ts +25 -0
- package/dist/esm/models/signature-info-api.js +14 -0
- package/dist/esm/models/signature-info.d.ts +5 -5
- package/dist/esm/models/signature-info.js +2 -2
- package/dist/esm/models/signature-parameters.d.ts +34 -0
- package/dist/esm/models/signature-parameters.js +14 -0
- package/dist/esm/models/simplified-invoice-data.d.ts +46 -0
- package/dist/esm/models/simplified-invoice-data.js +14 -0
- package/dist/esm/models/structure-info.d.ts +13 -13
- package/dist/esm/models/structure-info.js +2 -2
- package/dist/esm/models/structure-parameters.d.ts +28 -0
- package/dist/esm/models/structure-parameters.js +14 -0
- package/dist/esm/models/structure-service.d.ts +32 -0
- package/dist/esm/models/structure-service.js +14 -0
- package/dist/esm/models/submission-mode.d.ts +23 -0
- package/dist/esm/models/submission-mode.js +24 -0
- package/dist/esm/models/submit-complete-invoice-request.d.ts +34 -0
- package/dist/esm/models/submit-complete-invoice-request.js +14 -0
- package/dist/esm/models/submit-complete-invoice-response.d.ts +53 -0
- package/dist/esm/models/submit-complete-invoice-response.js +17 -0
- package/dist/esm/models/submit-flow-request.d.ts +31 -0
- package/dist/esm/models/submit-flow-request.js +14 -0
- package/dist/esm/models/submit-flow-response.d.ts +38 -0
- package/dist/esm/models/submit-flow-response.js +14 -0
- package/dist/esm/models/submit-gross-amount.d.ts +16 -0
- package/dist/esm/models/submit-gross-amount.js +14 -0
- package/dist/esm/models/submit-invoice-request.d.ts +44 -0
- package/dist/esm/models/submit-invoice-request.js +14 -0
- package/dist/esm/models/submit-invoice-response.d.ts +26 -0
- package/dist/esm/models/submit-invoice-response.js +14 -0
- package/dist/esm/models/submit-net-amount.d.ts +16 -0
- package/dist/esm/models/submit-net-amount.js +14 -0
- package/dist/esm/models/submit-vat-amount.d.ts +16 -0
- package/dist/esm/models/submit-vat-amount.js +14 -0
- package/dist/esm/models/supplementary-attachment.d.ts +21 -0
- package/dist/esm/models/supplementary-attachment.js +14 -0
- package/dist/esm/models/supplier.d.ts +28 -0
- package/dist/esm/models/supplier.js +14 -0
- package/dist/esm/models/task-response.d.ts +20 -0
- package/dist/esm/models/task-response.js +14 -0
- package/dist/esm/models/task-status.d.ts +28 -0
- package/dist/esm/models/task-status.js +14 -0
- package/dist/esm/models/taxable-amount.d.ts +16 -0
- package/dist/esm/models/taxable-amount.js +14 -0
- package/dist/esm/models/total-gross-amount.d.ts +16 -0
- package/dist/esm/models/total-gross-amount.js +14 -0
- package/dist/esm/models/total-net-amount.d.ts +16 -0
- package/dist/esm/models/total-net-amount.js +14 -0
- package/dist/esm/models/total-vatamount.d.ts +16 -0
- package/dist/esm/models/total-vatamount.js +14 -0
- package/dist/esm/models/unit-net-price.d.ts +16 -0
- package/dist/esm/models/unit-net-price.js +14 -0
- package/dist/esm/models/unit-of-measure.d.ts +29 -0
- package/dist/esm/models/unit-of-measure.js +30 -0
- package/dist/esm/models/validation-error-detail.d.ts +6 -6
- package/dist/esm/models/validation-error-detail.js +2 -2
- package/dist/esm/models/validation-error-loc-inner.d.ts +2 -2
- package/dist/esm/models/validation-error-loc-inner.js +2 -2
- package/dist/esm/models/validation-error-response.d.ts +20 -0
- package/dist/esm/models/validation-error-response.js +14 -0
- package/dist/esm/models/validation-error.d.ts +2 -2
- package/dist/esm/models/validation-error.js +2 -2
- package/dist/esm/models/validation-success-response.d.ts +20 -0
- package/dist/esm/models/validation-success-response.js +14 -0
- package/dist/esm/models/vataccounting-code.d.ts +25 -0
- package/dist/esm/models/vataccounting-code.js +26 -0
- package/dist/esm/models/vatamount.d.ts +16 -0
- package/dist/esm/models/vatamount.js +14 -0
- package/dist/esm/models/vatcategory.d.ts +26 -0
- package/dist/esm/models/vatcategory.js +27 -0
- package/dist/esm/models/vatline.d.ts +27 -0
- package/dist/esm/models/vatline.js +14 -0
- package/dist/esm/models/verification-success-response.d.ts +56 -0
- package/dist/esm/models/verification-success-response.js +14 -0
- package/dist/esm/models/verified-field-schema.d.ts +42 -0
- package/dist/esm/models/verified-field-schema.js +14 -0
- package/dist/esm/src/helpers/client.d.ts +129 -129
- package/dist/esm/src/helpers/client.js +222 -222
- package/dist/esm/src/helpers/index.d.ts +1 -1
- package/dist/esm/src/helpers/index.js +3 -3
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/models/acknowledgment-status.d.ts +20 -0
- package/dist/models/acknowledgment-status.js +24 -0
- package/dist/models/afnorcredentials.d.ts +19 -0
- package/dist/models/afnorcredentials.js +15 -0
- package/dist/models/afnordestination.d.ts +34 -0
- package/dist/models/afnordestination.js +24 -0
- package/dist/models/afnorhealth-check-response.d.ts +28 -0
- package/dist/models/afnorhealth-check-response.js +15 -0
- package/dist/models/afnorresult.d.ts +30 -0
- package/dist/models/afnorresult.js +15 -0
- package/dist/models/allowance-reason-code.d.ts +24 -0
- package/dist/models/allowance-reason-code.js +28 -0
- package/dist/models/amount-due.d.ts +16 -0
- package/dist/models/amount-due.js +15 -0
- package/dist/models/apierror.d.ts +5 -5
- package/dist/models/apierror.js +2 -2
- package/dist/models/apiprofile.d.ts +21 -0
- package/dist/models/apiprofile.js +25 -0
- package/dist/models/bounding-box-schema.d.ts +10 -10
- package/dist/models/bounding-box-schema.js +2 -2
- package/dist/models/celery-status.d.ts +22 -0
- package/dist/models/celery-status.js +26 -0
- package/dist/models/certificate-info-response.d.ts +23 -23
- package/dist/models/certificate-info-response.js +2 -2
- package/dist/models/chorus-pro-destination.d.ts +23 -0
- package/dist/models/chorus-pro-destination.js +19 -0
- package/dist/models/chorus-pro-result.d.ts +22 -0
- package/dist/models/chorus-pro-result.js +15 -0
- package/dist/models/destination.d.ts +7 -7
- package/dist/models/destination.js +2 -2
- package/dist/models/document-type.d.ts +37 -0
- package/dist/models/document-type.js +41 -0
- package/dist/models/electronic-address.d.ts +19 -0
- package/dist/models/electronic-address.js +15 -0
- package/dist/models/enriched-invoice-info.d.ts +24 -0
- package/dist/models/enriched-invoice-info.js +15 -0
- package/dist/models/error-level.d.ts +2 -2
- package/dist/models/error-level.js +2 -2
- package/dist/models/error-source.d.ts +2 -2
- package/dist/models/error-source.js +2 -2
- package/dist/models/factur-xpdfinfo.d.ts +28 -0
- package/dist/models/factur-xpdfinfo.js +15 -0
- package/dist/models/facture-electronique-rest-api-schemas-chorus-pro-chorus-pro-credentials.d.ts +36 -0
- package/dist/models/facture-electronique-rest-api-schemas-chorus-pro-chorus-pro-credentials.js +15 -0
- package/dist/models/facture-electronique-rest-api-schemas-processing-chorus-pro-credentials.d.ts +24 -0
- package/dist/models/facture-electronique-rest-api-schemas-processing-chorus-pro-credentials.js +15 -0
- package/dist/models/facture-factur-x.d.ts +30 -30
- package/dist/models/facture-factur-x.js +2 -2
- package/dist/models/field-status.d.ts +22 -0
- package/dist/models/field-status.js +26 -0
- package/dist/models/flow-direction.d.ts +19 -0
- package/dist/models/flow-direction.js +23 -0
- package/dist/models/flow-profile.d.ts +20 -0
- package/dist/models/flow-profile.js +24 -0
- package/dist/models/flow-summary.d.ts +24 -0
- package/dist/models/flow-summary.js +15 -0
- package/dist/models/flow-syntax.d.ts +22 -0
- package/dist/models/flow-syntax.js +26 -0
- package/dist/models/flow-type.d.ts +22 -0
- package/dist/models/flow-type.js +26 -0
- package/dist/models/generate-certificate-request.d.ts +21 -21
- package/dist/models/generate-certificate-request.js +2 -2
- package/dist/models/generate-certificate-response.d.ts +12 -12
- package/dist/models/generate-certificate-response.js +2 -2
- package/dist/models/get-chorus-pro-id-request.d.ts +26 -0
- package/dist/models/get-chorus-pro-id-request.js +15 -0
- package/dist/models/get-chorus-pro-id-response.d.ts +29 -0
- package/dist/models/get-chorus-pro-id-response.js +15 -0
- package/dist/models/get-invoice-request.d.ts +22 -0
- package/dist/models/get-invoice-request.js +15 -0
- package/dist/models/get-invoice-response.d.ts +26 -0
- package/dist/models/get-invoice-response.js +15 -0
- package/dist/models/get-structure-request.d.ts +26 -0
- package/dist/models/get-structure-request.js +15 -0
- package/dist/models/get-structure-response.d.ts +26 -0
- package/dist/models/get-structure-response.js +15 -0
- package/dist/models/global-allowance-amount.d.ts +16 -0
- package/dist/models/global-allowance-amount.js +15 -0
- package/dist/models/httpvalidation-error.d.ts +2 -2
- package/dist/models/httpvalidation-error.js +2 -2
- package/dist/models/incoming-invoice.d.ts +68 -0
- package/dist/models/incoming-invoice.js +15 -0
- package/dist/models/incoming-supplier.d.ts +29 -0
- package/dist/models/incoming-supplier.js +15 -0
- package/dist/models/index.d.ts +95 -93
- package/dist/models/index.js +95 -93
- package/dist/models/invoice-format.d.ts +20 -0
- package/dist/models/invoice-format.js +24 -0
- package/dist/models/invoice-line-allowance-amount.d.ts +16 -0
- package/dist/models/invoice-line-allowance-amount.js +15 -0
- package/dist/models/invoice-line.d.ts +39 -0
- package/dist/models/invoice-line.js +15 -0
- package/dist/models/invoice-note.d.ts +18 -0
- package/dist/models/invoice-note.js +15 -0
- package/dist/models/invoice-references.d.ts +27 -0
- package/dist/models/invoice-references.js +15 -0
- package/dist/models/invoice-status.d.ts +25 -0
- package/dist/models/invoice-status.js +15 -0
- package/dist/models/invoice-totals-prepayment.d.ts +16 -0
- package/dist/models/invoice-totals-prepayment.js +15 -0
- package/dist/models/invoice-totals.d.ts +29 -0
- package/dist/models/invoice-totals.js +15 -0
- package/dist/models/invoice-type-code.d.ts +97 -0
- package/dist/models/invoice-type-code.js +101 -0
- package/dist/models/invoicing-framework-code.d.ts +25 -0
- package/dist/models/invoicing-framework-code.js +29 -0
- package/dist/models/invoicing-framework.d.ts +22 -0
- package/dist/models/invoicing-framework.js +15 -0
- package/dist/models/line-net-amount.d.ts +16 -0
- package/dist/models/line-net-amount.js +15 -0
- package/dist/models/mandatory-note-schema.d.ts +34 -0
- package/dist/models/mandatory-note-schema.js +15 -0
- package/dist/models/manual-rate.d.ts +16 -0
- package/dist/models/manual-rate.js +15 -0
- package/dist/models/manual-vat-rate.d.ts +16 -0
- package/dist/models/manual-vat-rate.js +15 -0
- package/dist/models/operation-nature.d.ts +31 -0
- package/dist/models/operation-nature.js +35 -0
- package/dist/models/output-format.d.ts +19 -0
- package/dist/models/output-format.js +23 -0
- package/dist/models/page-dimensions-schema.d.ts +24 -0
- package/dist/models/page-dimensions-schema.js +15 -0
- package/dist/models/payee.d.ts +26 -0
- package/dist/models/payee.js +15 -0
- package/dist/models/payment-means.d.ts +29 -0
- package/dist/models/payment-means.js +33 -0
- package/dist/models/pdfvalidation-result-api.d.ts +93 -0
- package/dist/models/pdfvalidation-result-api.js +15 -0
- package/dist/models/pdpcredentials.d.ts +7 -7
- package/dist/models/pdpcredentials.js +2 -2
- package/dist/models/postal-address.d.ts +21 -0
- package/dist/models/postal-address.js +15 -0
- package/dist/models/processing-options.d.ts +33 -0
- package/dist/models/processing-options.js +15 -0
- package/dist/models/quantity.d.ts +16 -0
- package/dist/models/quantity.js +15 -0
- package/dist/models/recipient.d.ts +24 -0
- package/dist/models/recipient.js +15 -0
- package/dist/models/scheme-id.d.ts +5 -5
- package/dist/models/scheme-id.js +5 -5
- package/dist/models/search-flow-request.d.ts +34 -0
- package/dist/models/search-flow-request.js +15 -0
- package/dist/models/search-flow-response.d.ts +33 -0
- package/dist/models/search-flow-response.js +15 -0
- package/dist/models/search-services-response.d.ts +24 -0
- package/dist/models/search-services-response.js +15 -0
- package/dist/models/search-structure-request.d.ts +25 -0
- package/dist/models/search-structure-request.js +15 -0
- package/dist/models/search-structure-response.d.ts +30 -0
- package/dist/models/search-structure-response.js +15 -0
- package/dist/models/signature-info-api.d.ts +25 -0
- package/dist/models/signature-info-api.js +15 -0
- package/dist/models/signature-info.d.ts +5 -5
- package/dist/models/signature-info.js +2 -2
- package/dist/models/signature-parameters.d.ts +34 -0
- package/dist/models/signature-parameters.js +15 -0
- package/dist/models/simplified-invoice-data.d.ts +46 -0
- package/dist/models/simplified-invoice-data.js +15 -0
- package/dist/models/structure-info.d.ts +13 -13
- package/dist/models/structure-info.js +2 -2
- package/dist/models/structure-parameters.d.ts +28 -0
- package/dist/models/structure-parameters.js +15 -0
- package/dist/models/structure-service.d.ts +32 -0
- package/dist/models/structure-service.js +15 -0
- package/dist/models/submission-mode.d.ts +23 -0
- package/dist/models/submission-mode.js +27 -0
- package/dist/models/submit-complete-invoice-request.d.ts +34 -0
- package/dist/models/submit-complete-invoice-request.js +15 -0
- package/dist/models/submit-complete-invoice-response.d.ts +53 -0
- package/dist/models/submit-complete-invoice-response.js +20 -0
- package/dist/models/submit-flow-request.d.ts +31 -0
- package/dist/models/submit-flow-request.js +15 -0
- package/dist/models/submit-flow-response.d.ts +38 -0
- package/dist/models/submit-flow-response.js +15 -0
- package/dist/models/submit-gross-amount.d.ts +16 -0
- package/dist/models/submit-gross-amount.js +15 -0
- package/dist/models/submit-invoice-request.d.ts +44 -0
- package/dist/models/submit-invoice-request.js +15 -0
- package/dist/models/submit-invoice-response.d.ts +26 -0
- package/dist/models/submit-invoice-response.js +15 -0
- package/dist/models/submit-net-amount.d.ts +16 -0
- package/dist/models/submit-net-amount.js +15 -0
- package/dist/models/submit-vat-amount.d.ts +16 -0
- package/dist/models/submit-vat-amount.js +15 -0
- package/dist/models/supplementary-attachment.d.ts +21 -0
- package/dist/models/supplementary-attachment.js +15 -0
- package/dist/models/supplier.d.ts +28 -0
- package/dist/models/supplier.js +15 -0
- package/dist/models/task-response.d.ts +20 -0
- package/dist/models/task-response.js +15 -0
- package/dist/models/task-status.d.ts +28 -0
- package/dist/models/task-status.js +15 -0
- package/dist/models/taxable-amount.d.ts +16 -0
- package/dist/models/taxable-amount.js +15 -0
- package/dist/models/total-gross-amount.d.ts +16 -0
- package/dist/models/total-gross-amount.js +15 -0
- package/dist/models/total-net-amount.d.ts +16 -0
- package/dist/models/total-net-amount.js +15 -0
- package/dist/models/total-vatamount.d.ts +16 -0
- package/dist/models/total-vatamount.js +15 -0
- package/dist/models/unit-net-price.d.ts +16 -0
- package/dist/models/unit-net-price.js +15 -0
- package/dist/models/unit-of-measure.d.ts +29 -0
- package/dist/models/unit-of-measure.js +33 -0
- package/dist/models/validation-error-detail.d.ts +6 -6
- package/dist/models/validation-error-detail.js +2 -2
- package/dist/models/validation-error-loc-inner.d.ts +2 -2
- package/dist/models/validation-error-loc-inner.js +2 -2
- package/dist/models/validation-error-response.d.ts +20 -0
- package/dist/models/validation-error-response.js +15 -0
- package/dist/models/validation-error.d.ts +2 -2
- package/dist/models/validation-error.js +2 -2
- package/dist/models/validation-success-response.d.ts +20 -0
- package/dist/models/validation-success-response.js +15 -0
- package/dist/models/vataccounting-code.d.ts +25 -0
- package/dist/models/vataccounting-code.js +29 -0
- package/dist/models/vatamount.d.ts +16 -0
- package/dist/models/vatamount.js +15 -0
- package/dist/models/vatcategory.d.ts +26 -0
- package/dist/models/vatcategory.js +30 -0
- package/dist/models/vatline.d.ts +27 -0
- package/dist/models/vatline.js +15 -0
- package/dist/models/verification-success-response.d.ts +56 -0
- package/dist/models/verification-success-response.js +15 -0
- package/dist/models/verified-field-schema.d.ts +42 -0
- package/dist/models/verified-field-schema.js +15 -0
- package/dist/src/helpers/client.d.ts +129 -129
- package/dist/src/helpers/client.js +231 -231
- package/dist/src/helpers/index.d.ts +1 -1
- package/dist/src/helpers/index.js +12 -11
- package/docs/AFNORCredentials.md +25 -0
- package/docs/AFNORDestination.md +27 -0
- package/docs/AFNORHealthCheckResponse.md +25 -0
- package/docs/AFNORPDPPAApi.md +21 -21
- package/docs/AFNORPDPPADirectoryServiceApi.md +70 -70
- package/docs/AFNORPDPPAFlowServiceApi.md +23 -23
- package/docs/AFNORResult.md +29 -0
- package/docs/APIError.md +3 -3
- package/docs/APIProfile.md +15 -0
- package/docs/AcknowledgmentStatus.md +13 -0
- package/docs/AllowanceReasonCode.md +21 -0
- package/docs/AmountDue.md +19 -0
- package/docs/BoundingBoxSchema.md +8 -8
- package/docs/CeleryStatus.md +17 -0
- package/docs/CertificateInfoResponse.md +21 -21
- package/docs/ChorusProApi.md +63 -63
- package/docs/ChorusProDestination.md +23 -0
- package/docs/ChorusProResult.md +25 -0
- package/docs/Destination.md +6 -6
- package/docs/DocumentType.md +17 -0
- package/docs/ElectronicAddress.md +23 -0
- package/docs/EnrichedInvoiceInfo.md +35 -0
- package/docs/FacturXPDFInfo.md +25 -0
- package/docs/FactureElectroniqueRestApiSchemasChorusProChorusProCredentials.md +29 -0
- package/docs/FactureElectroniqueRestApiSchemasProcessingChorusProCredentials.md +29 -0
- package/docs/FactureFacturX.md +31 -31
- package/docs/FieldStatus.md +17 -0
- package/docs/FlowDirection.md +11 -0
- package/docs/FlowProfile.md +13 -0
- package/docs/FlowSummary.md +35 -0
- package/docs/FlowSyntax.md +17 -0
- package/docs/FlowType.md +17 -0
- package/docs/GenerateCertificateRequest.md +20 -20
- package/docs/GenerateCertificateResponse.md +11 -11
- package/docs/GetChorusProIdRequest.md +25 -0
- package/docs/GetChorusProIdResponse.md +27 -0
- package/docs/GetInvoiceRequest.md +23 -0
- package/docs/GetInvoiceResponse.md +37 -0
- package/docs/GetStructureRequest.md +25 -0
- package/docs/GetStructureResponse.md +37 -0
- package/docs/GlobalAllowanceAmount.md +19 -0
- package/docs/HealthApi.md +97 -0
- package/docs/IncomingInvoice.md +57 -0
- package/docs/IncomingSupplier.md +35 -0
- package/docs/InvoiceFormat.md +13 -0
- package/docs/InvoiceLine.md +49 -0
- package/docs/InvoiceLineAllowanceAmount.md +19 -0
- package/docs/InvoiceNote.md +23 -0
- package/docs/InvoiceProcessingApi.md +670 -0
- package/docs/InvoiceReferences.md +35 -0
- package/docs/InvoiceStatus.md +25 -0
- package/docs/InvoiceTotals.md +33 -0
- package/docs/InvoiceTotalsPrepayment.md +19 -0
- package/docs/InvoiceTypeCode.md +71 -0
- package/docs/InvoicingFramework.md +27 -0
- package/docs/InvoicingFrameworkCode.md +23 -0
- package/docs/LineNetAmount.md +19 -0
- package/docs/MandatoryNoteSchema.md +33 -0
- package/docs/ManualRate.md +19 -0
- package/docs/ManualVatRate.md +19 -0
- package/docs/OperationNature.md +35 -0
- package/docs/OutputFormat.md +11 -0
- package/docs/PDFValidationResultAPI.md +65 -0
- package/docs/PDFXMLVerificationApi.md +335 -0
- package/docs/PDPCredentials.md +5 -5
- package/docs/PageDimensionsSchema.md +23 -0
- package/docs/Payee.md +31 -0
- package/docs/PaymentMeans.md +31 -0
- package/docs/PostalAddress.md +29 -0
- package/docs/ProcessingOptions.md +27 -0
- package/docs/Quantity.md +19 -0
- package/docs/Recipient.md +31 -0
- package/docs/SchemeID.md +1 -1
- package/docs/SearchFlowRequest.md +37 -0
- package/docs/SearchFlowResponse.md +27 -0
- package/docs/SearchServicesResponse.md +27 -0
- package/docs/SearchStructureRequest.md +29 -0
- package/docs/SearchStructureResponse.md +27 -0
- package/docs/SignatureInfo.md +3 -3
- package/docs/SignatureInfoAPI.md +31 -0
- package/docs/SignatureParameters.md +37 -0
- package/docs/SimplifiedInvoiceData.md +37 -0
- package/docs/StructureInfo.md +11 -11
- package/docs/StructureParameters.md +25 -0
- package/docs/StructureService.md +27 -0
- package/docs/SubmissionMode.md +19 -0
- package/docs/SubmitCompleteInvoiceRequest.md +29 -0
- package/docs/SubmitCompleteInvoiceResponse.md +37 -0
- package/docs/SubmitFlowRequest.md +31 -0
- package/docs/SubmitFlowResponse.md +33 -0
- package/docs/SubmitGrossAmount.md +19 -0
- package/docs/SubmitInvoiceRequest.md +49 -0
- package/docs/SubmitInvoiceResponse.md +27 -0
- package/docs/SubmitNetAmount.md +19 -0
- package/docs/SubmitVatAmount.md +19 -0
- package/docs/SupplementaryAttachment.md +29 -0
- package/docs/Supplier.md +39 -0
- package/docs/TaskResponse.md +21 -0
- package/docs/TaskStatus.md +25 -0
- package/docs/TaxableAmount.md +19 -0
- package/docs/TotalGrossAmount.md +19 -0
- package/docs/TotalNetAmount.md +19 -0
- package/docs/TotalVATAmount.md +19 -0
- package/docs/UnitNetPrice.md +19 -0
- package/docs/UnitOfMeasure.md +31 -0
- package/docs/UserApi.md +52 -0
- package/docs/VATAccountingCode.md +23 -0
- package/docs/VATAmount.md +19 -0
- package/docs/VATCategory.md +25 -0
- package/docs/VATLine.md +33 -0
- package/docs/ValidationErrorDetail.md +4 -4
- package/docs/ValidationErrorResponse.md +21 -0
- package/docs/ValidationSuccessResponse.md +21 -0
- package/docs/VerificationSuccessResponse.md +39 -0
- package/docs/VerifiedFieldSchema.md +37 -0
- package/index.ts +2 -2
- package/models/acknowledgment-status.ts +30 -0
- package/models/afnorcredentials.ts +25 -0
- package/models/afnordestination.ts +46 -0
- package/models/afnorhealth-check-response.ts +34 -0
- package/models/afnorresult.ts +36 -0
- package/models/allowance-reason-code.ts +34 -0
- package/models/amount-due.ts +22 -0
- package/models/apierror.ts +5 -5
- package/models/apiprofile.ts +31 -0
- package/models/bounding-box-schema.ts +10 -10
- package/models/celery-status.ts +32 -0
- package/models/certificate-info-response.ts +23 -23
- package/models/chorus-pro-destination.ts +34 -0
- package/models/chorus-pro-result.ts +28 -0
- package/models/destination.ts +7 -7
- package/models/document-type.ts +47 -0
- package/models/electronic-address.ts +29 -0
- package/models/enriched-invoice-info.ts +30 -0
- package/models/error-level.ts +2 -2
- package/models/error-source.ts +2 -2
- package/models/factur-xpdfinfo.ts +34 -0
- package/models/facture-electronique-rest-api-schemas-chorus-pro-chorus-pro-credentials.ts +42 -0
- package/models/facture-electronique-rest-api-schemas-processing-chorus-pro-credentials.ts +30 -0
- package/models/facture-factur-x.ts +30 -30
- package/models/field-status.ts +32 -0
- package/models/flow-direction.ts +29 -0
- package/models/flow-profile.ts +30 -0
- package/models/flow-summary.ts +30 -0
- package/models/flow-syntax.ts +32 -0
- package/models/flow-type.ts +32 -0
- package/models/generate-certificate-request.ts +21 -21
- package/models/generate-certificate-response.ts +12 -12
- package/models/get-chorus-pro-id-request.ts +34 -0
- package/models/get-chorus-pro-id-response.ts +35 -0
- package/models/get-invoice-request.ts +30 -0
- package/models/get-invoice-response.ts +34 -0
- package/models/get-structure-request.ts +34 -0
- package/models/get-structure-response.ts +34 -0
- package/models/global-allowance-amount.ts +22 -0
- package/models/httpvalidation-error.ts +2 -2
- package/models/incoming-invoice.ts +82 -0
- package/models/incoming-supplier.ts +39 -0
- package/models/index.ts +95 -93
- package/models/invoice-format.ts +30 -0
- package/models/invoice-line-allowance-amount.ts +22 -0
- package/models/invoice-line.ts +63 -0
- package/models/invoice-note.ts +24 -0
- package/models/invoice-references.ts +41 -0
- package/models/invoice-status.ts +31 -0
- package/models/invoice-totals-prepayment.ts +22 -0
- package/models/invoice-totals.ts +47 -0
- package/models/invoice-type-code.ts +107 -0
- package/models/invoicing-framework-code.ts +35 -0
- package/models/invoicing-framework.ts +34 -0
- package/models/line-net-amount.ts +22 -0
- package/models/mandatory-note-schema.ts +46 -0
- package/models/manual-rate.ts +22 -0
- package/models/manual-vat-rate.ts +22 -0
- package/models/operation-nature.ts +41 -0
- package/models/output-format.ts +29 -0
- package/models/page-dimensions-schema.ts +30 -0
- package/models/payee.ts +34 -0
- package/models/payment-means.ts +39 -0
- package/models/pdfvalidation-result-api.ts +99 -0
- package/models/pdpcredentials.ts +7 -7
- package/models/postal-address.ts +27 -0
- package/models/processing-options.ts +43 -0
- package/models/quantity.ts +22 -0
- package/models/recipient.ts +34 -0
- package/models/scheme-id.ts +5 -5
- package/models/search-flow-request.ts +48 -0
- package/models/search-flow-response.ts +41 -0
- package/models/search-services-response.ts +32 -0
- package/models/search-structure-request.ts +33 -0
- package/models/search-structure-response.ts +38 -0
- package/models/signature-info-api.ts +31 -0
- package/models/signature-info.ts +5 -5
- package/models/signature-parameters.ts +40 -0
- package/models/simplified-invoice-data.ts +46 -0
- package/models/structure-info.ts +13 -13
- package/models/structure-parameters.ts +34 -0
- package/models/structure-service.ts +38 -0
- package/models/submission-mode.ts +33 -0
- package/models/submit-complete-invoice-request.ts +48 -0
- package/models/submit-complete-invoice-response.ts +72 -0
- package/models/submit-flow-request.ts +45 -0
- package/models/submit-flow-response.ts +44 -0
- package/models/submit-gross-amount.ts +22 -0
- package/models/submit-invoice-request.ts +58 -0
- package/models/submit-invoice-response.ts +32 -0
- package/models/submit-net-amount.ts +22 -0
- package/models/submit-vat-amount.ts +22 -0
- package/models/supplementary-attachment.ts +27 -0
- package/models/supplier.ts +38 -0
- package/models/task-response.ts +26 -0
- package/models/task-status.ts +36 -0
- package/models/taxable-amount.ts +22 -0
- package/models/total-gross-amount.ts +22 -0
- package/models/total-net-amount.ts +22 -0
- package/models/total-vatamount.ts +22 -0
- package/models/unit-net-price.ts +22 -0
- package/models/unit-of-measure.ts +39 -0
- package/models/validation-error-detail.ts +6 -6
- package/models/validation-error-loc-inner.ts +2 -2
- package/models/validation-error-response.ts +26 -0
- package/models/validation-error.ts +2 -2
- package/models/validation-success-response.ts +26 -0
- package/models/vataccounting-code.ts +35 -0
- package/models/vatamount.ts +22 -0
- package/models/vatcategory.ts +36 -0
- package/models/vatline.ts +43 -0
- package/models/verification-success-response.ts +68 -0
- package/models/verified-field-schema.ts +54 -0
- package/package.json +1 -1
- package/src/helpers/client.ts +233 -233
- package/src/helpers/index.ts +3 -3
- package/api/sant-api.ts +0 -176
- package/api/traitement-facture-api.ts +0 -1083
- package/api/utilisateur-api.ts +0 -119
- package/api/vrification-pdfxmlapi.ts +0 -536
- package/dist/api/sant-api.d.ts +0 -90
- package/dist/api/sant-api.js +0 -184
- package/dist/api/traitement-facture-api.d.ts +0 -480
- package/dist/api/traitement-facture-api.js +0 -1010
- package/dist/api/utilisateur-api.d.ts +0 -62
- package/dist/api/utilisateur-api.js +0 -128
- package/dist/api/vrification-pdfxmlapi.d.ts +0 -237
- package/dist/api/vrification-pdfxmlapi.js +0 -514
- package/dist/esm/api/sant-api.d.ts +0 -90
- package/dist/esm/api/sant-api.js +0 -174
- package/dist/esm/api/traitement-facture-api.d.ts +0 -480
- package/dist/esm/api/traitement-facture-api.js +0 -1000
- package/dist/esm/api/utilisateur-api.d.ts +0 -62
- package/dist/esm/api/utilisateur-api.js +0 -118
- package/dist/esm/api/vrification-pdfxmlapi.d.ts +0 -237
- package/dist/esm/api/vrification-pdfxmlapi.js +0 -504
- package/dist/esm/models/adresse-electronique.d.ts +0 -19
- package/dist/esm/models/adresse-electronique.js +0 -14
- package/dist/esm/models/adresse-postale.d.ts +0 -21
- package/dist/esm/models/adresse-postale.js +0 -14
- package/dist/esm/models/beneficiaire.d.ts +0 -26
- package/dist/esm/models/beneficiaire.js +0 -14
- package/dist/esm/models/cadre-de-facturation.d.ts +0 -22
- package/dist/esm/models/cadre-de-facturation.js +0 -14
- package/dist/esm/models/categorie-tva.d.ts +0 -53
- package/dist/esm/models/categorie-tva.js +0 -54
- package/dist/esm/models/champ-verifie-schema.d.ts +0 -42
- package/dist/esm/models/champ-verifie-schema.js +0 -14
- package/dist/esm/models/chorus-pro-credentials.d.ts +0 -36
- package/dist/esm/models/chorus-pro-credentials.js +0 -14
- package/dist/esm/models/code-cadre-facturation.d.ts +0 -21
- package/dist/esm/models/code-cadre-facturation.js +0 -22
- package/dist/esm/models/code-raison-reduction.d.ts +0 -45
- package/dist/esm/models/code-raison-reduction.js +0 -46
- package/dist/esm/models/consulter-facture-request.d.ts +0 -22
- package/dist/esm/models/consulter-facture-request.js +0 -14
- package/dist/esm/models/consulter-facture-response.d.ts +0 -26
- package/dist/esm/models/consulter-facture-response.js +0 -14
- package/dist/esm/models/consulter-structure-request.d.ts +0 -26
- package/dist/esm/models/consulter-structure-request.js +0 -14
- package/dist/esm/models/consulter-structure-response.d.ts +0 -26
- package/dist/esm/models/consulter-structure-response.js +0 -14
- package/dist/esm/models/credentials-afnor.d.ts +0 -19
- package/dist/esm/models/credentials-afnor.js +0 -14
- package/dist/esm/models/credentials-chorus-pro.d.ts +0 -24
- package/dist/esm/models/credentials-chorus-pro.js +0 -14
- package/dist/esm/models/destinataire.d.ts +0 -24
- package/dist/esm/models/destinataire.js +0 -14
- package/dist/esm/models/destination-afnor.d.ts +0 -34
- package/dist/esm/models/destination-afnor.js +0 -21
- package/dist/esm/models/destination-chorus-pro.d.ts +0 -23
- package/dist/esm/models/destination-chorus-pro.js +0 -16
- package/dist/esm/models/dimension-page-schema.d.ts +0 -24
- package/dist/esm/models/dimension-page-schema.js +0 -14
- package/dist/esm/models/direction-flux.d.ts +0 -19
- package/dist/esm/models/direction-flux.js +0 -20
- package/dist/esm/models/donnees-facture-simplifiees.d.ts +0 -46
- package/dist/esm/models/donnees-facture-simplifiees.js +0 -14
- package/dist/esm/models/facture-enrichie-info.d.ts +0 -24
- package/dist/esm/models/facture-enrichie-info.js +0 -14
- package/dist/esm/models/facture-entrante.d.ts +0 -68
- package/dist/esm/models/facture-entrante.js +0 -14
- package/dist/esm/models/flux-resume.d.ts +0 -24
- package/dist/esm/models/flux-resume.js +0 -14
- package/dist/esm/models/format-facture.d.ts +0 -20
- package/dist/esm/models/format-facture.js +0 -21
- package/dist/esm/models/format-sortie.d.ts +0 -16
- package/dist/esm/models/format-sortie.js +0 -17
- package/dist/esm/models/fournisseur-entrant.d.ts +0 -29
- package/dist/esm/models/fournisseur-entrant.js +0 -14
- package/dist/esm/models/fournisseur.d.ts +0 -28
- package/dist/esm/models/fournisseur.js +0 -14
- package/dist/esm/models/information-signature-api.d.ts +0 -25
- package/dist/esm/models/information-signature-api.js +0 -14
- package/dist/esm/models/ligne-de-poste-montant-remise-ht.d.ts +0 -16
- package/dist/esm/models/ligne-de-poste-montant-remise-ht.js +0 -14
- package/dist/esm/models/ligne-de-poste-taux-tva-manuel.d.ts +0 -16
- package/dist/esm/models/ligne-de-poste-taux-tva-manuel.js +0 -14
- package/dist/esm/models/ligne-de-poste.d.ts +0 -39
- package/dist/esm/models/ligne-de-poste.js +0 -14
- package/dist/esm/models/ligne-de-tva.d.ts +0 -27
- package/dist/esm/models/ligne-de-tva.js +0 -14
- package/dist/esm/models/mode-depot.d.ts +0 -20
- package/dist/esm/models/mode-depot.js +0 -21
- package/dist/esm/models/mode-paiement.d.ts +0 -23
- package/dist/esm/models/mode-paiement.js +0 -24
- package/dist/esm/models/montant-apayer.d.ts +0 -16
- package/dist/esm/models/montant-apayer.js +0 -14
- package/dist/esm/models/montant-base-ht.d.ts +0 -16
- package/dist/esm/models/montant-base-ht.js +0 -14
- package/dist/esm/models/montant-ht-total.d.ts +0 -16
- package/dist/esm/models/montant-ht-total.js +0 -14
- package/dist/esm/models/montant-remise-globale-ttc.d.ts +0 -16
- package/dist/esm/models/montant-remise-globale-ttc.js +0 -14
- package/dist/esm/models/montant-total-acompte.d.ts +0 -16
- package/dist/esm/models/montant-total-acompte.js +0 -14
- package/dist/esm/models/montant-total-ligne-ht.d.ts +0 -16
- package/dist/esm/models/montant-total-ligne-ht.js +0 -14
- package/dist/esm/models/montant-total.d.ts +0 -29
- package/dist/esm/models/montant-total.js +0 -14
- package/dist/esm/models/montant-ttc-total.d.ts +0 -16
- package/dist/esm/models/montant-ttc-total.js +0 -14
- package/dist/esm/models/montant-tva-ligne.d.ts +0 -16
- package/dist/esm/models/montant-tva-ligne.js +0 -14
- package/dist/esm/models/montant-tva-total.d.ts +0 -16
- package/dist/esm/models/montant-tva-total.js +0 -14
- package/dist/esm/models/montant-tva.d.ts +0 -16
- package/dist/esm/models/montant-tva.js +0 -14
- package/dist/esm/models/montant-unitaire-ht.d.ts +0 -16
- package/dist/esm/models/montant-unitaire-ht.js +0 -14
- package/dist/esm/models/nature-operation.d.ts +0 -31
- package/dist/esm/models/nature-operation.js +0 -32
- package/dist/esm/models/note-obligatoire-schema.d.ts +0 -34
- package/dist/esm/models/note-obligatoire-schema.js +0 -14
- package/dist/esm/models/note.d.ts +0 -18
- package/dist/esm/models/note.js +0 -14
- package/dist/esm/models/obtenir-id-chorus-pro-request.d.ts +0 -26
- package/dist/esm/models/obtenir-id-chorus-pro-request.js +0 -14
- package/dist/esm/models/obtenir-id-chorus-pro-response.d.ts +0 -29
- package/dist/esm/models/obtenir-id-chorus-pro-response.js +0 -14
- package/dist/esm/models/options-processing.d.ts +0 -33
- package/dist/esm/models/options-processing.js +0 -14
- package/dist/esm/models/parametres-signature.d.ts +0 -34
- package/dist/esm/models/parametres-signature.js +0 -14
- package/dist/esm/models/parametres-structure.d.ts +0 -28
- package/dist/esm/models/parametres-structure.js +0 -14
- package/dist/esm/models/pdffactur-xinfo.d.ts +0 -28
- package/dist/esm/models/pdffactur-xinfo.js +0 -14
- package/dist/esm/models/piece-jointe-complementaire.d.ts +0 -21
- package/dist/esm/models/piece-jointe-complementaire.js +0 -14
- package/dist/esm/models/profil-api.d.ts +0 -18
- package/dist/esm/models/profil-api.js +0 -19
- package/dist/esm/models/profil-flux.d.ts +0 -20
- package/dist/esm/models/profil-flux.js +0 -21
- package/dist/esm/models/quantite.d.ts +0 -16
- package/dist/esm/models/quantite.js +0 -14
- package/dist/esm/models/rechercher-services-response.d.ts +0 -24
- package/dist/esm/models/rechercher-services-response.js +0 -14
- package/dist/esm/models/rechercher-structure-request.d.ts +0 -25
- package/dist/esm/models/rechercher-structure-request.js +0 -14
- package/dist/esm/models/rechercher-structure-response.d.ts +0 -30
- package/dist/esm/models/rechercher-structure-response.js +0 -14
- package/dist/esm/models/references.d.ts +0 -27
- package/dist/esm/models/references.js +0 -14
- package/dist/esm/models/reponse-healthcheck-afnor.d.ts +0 -28
- package/dist/esm/models/reponse-healthcheck-afnor.js +0 -14
- package/dist/esm/models/reponse-recherche-flux.d.ts +0 -33
- package/dist/esm/models/reponse-recherche-flux.js +0 -14
- package/dist/esm/models/reponse-soumission-flux.d.ts +0 -38
- package/dist/esm/models/reponse-soumission-flux.js +0 -14
- package/dist/esm/models/reponse-tache.d.ts +0 -17
- package/dist/esm/models/reponse-tache.js +0 -14
- package/dist/esm/models/reponse-validation-erreur.d.ts +0 -17
- package/dist/esm/models/reponse-validation-erreur.js +0 -14
- package/dist/esm/models/reponse-validation-succes.d.ts +0 -17
- package/dist/esm/models/reponse-validation-succes.js +0 -14
- package/dist/esm/models/reponse-verification-succes.d.ts +0 -56
- package/dist/esm/models/reponse-verification-succes.js +0 -14
- package/dist/esm/models/requete-recherche-flux.d.ts +0 -34
- package/dist/esm/models/requete-recherche-flux.js +0 -14
- package/dist/esm/models/requete-soumission-flux.d.ts +0 -31
- package/dist/esm/models/requete-soumission-flux.js +0 -14
- package/dist/esm/models/resultat-afnor.d.ts +0 -30
- package/dist/esm/models/resultat-afnor.js +0 -14
- package/dist/esm/models/resultat-chorus-pro.d.ts +0 -22
- package/dist/esm/models/resultat-chorus-pro.js +0 -14
- package/dist/esm/models/resultat-validation-pdfapi.d.ts +0 -93
- package/dist/esm/models/resultat-validation-pdfapi.js +0 -14
- package/dist/esm/models/service-structure.d.ts +0 -32
- package/dist/esm/models/service-structure.js +0 -14
- package/dist/esm/models/soumettre-facture-complete-request.d.ts +0 -34
- package/dist/esm/models/soumettre-facture-complete-request.js +0 -14
- package/dist/esm/models/soumettre-facture-complete-response.d.ts +0 -53
- package/dist/esm/models/soumettre-facture-complete-response.js +0 -17
- package/dist/esm/models/soumettre-facture-request.d.ts +0 -44
- package/dist/esm/models/soumettre-facture-request.js +0 -14
- package/dist/esm/models/soumettre-facture-response.d.ts +0 -26
- package/dist/esm/models/soumettre-facture-response.js +0 -14
- package/dist/esm/models/statut-acquittement.d.ts +0 -20
- package/dist/esm/models/statut-acquittement.js +0 -21
- package/dist/esm/models/statut-celery.d.ts +0 -22
- package/dist/esm/models/statut-celery.js +0 -23
- package/dist/esm/models/statut-champ-api.d.ts +0 -22
- package/dist/esm/models/statut-champ-api.js +0 -23
- package/dist/esm/models/statut-facture.d.ts +0 -25
- package/dist/esm/models/statut-facture.js +0 -14
- package/dist/esm/models/statut-tache.d.ts +0 -25
- package/dist/esm/models/statut-tache.js +0 -14
- package/dist/esm/models/syntaxe-flux.d.ts +0 -22
- package/dist/esm/models/syntaxe-flux.js +0 -23
- package/dist/esm/models/tauxmanuel.d.ts +0 -16
- package/dist/esm/models/tauxmanuel.js +0 -14
- package/dist/esm/models/type-document.d.ts +0 -37
- package/dist/esm/models/type-document.js +0 -38
- package/dist/esm/models/type-facture.d.ts +0 -81
- package/dist/esm/models/type-facture.js +0 -82
- package/dist/esm/models/type-flux.d.ts +0 -22
- package/dist/esm/models/type-flux.js +0 -23
- package/dist/esm/models/type-tva.d.ts +0 -21
- package/dist/esm/models/type-tva.js +0 -22
- package/dist/esm/models/unite.d.ts +0 -23
- package/dist/esm/models/unite.js +0 -24
- package/dist/models/adresse-electronique.d.ts +0 -19
- package/dist/models/adresse-electronique.js +0 -15
- package/dist/models/adresse-postale.d.ts +0 -21
- package/dist/models/adresse-postale.js +0 -15
- package/dist/models/beneficiaire.d.ts +0 -26
- package/dist/models/beneficiaire.js +0 -15
- package/dist/models/cadre-de-facturation.d.ts +0 -22
- package/dist/models/cadre-de-facturation.js +0 -15
- package/dist/models/categorie-tva.d.ts +0 -53
- package/dist/models/categorie-tva.js +0 -57
- package/dist/models/champ-verifie-schema.d.ts +0 -42
- package/dist/models/champ-verifie-schema.js +0 -15
- package/dist/models/chorus-pro-credentials.d.ts +0 -36
- package/dist/models/chorus-pro-credentials.js +0 -15
- package/dist/models/code-cadre-facturation.d.ts +0 -21
- package/dist/models/code-cadre-facturation.js +0 -25
- package/dist/models/code-raison-reduction.d.ts +0 -45
- package/dist/models/code-raison-reduction.js +0 -49
- package/dist/models/consulter-facture-request.d.ts +0 -22
- package/dist/models/consulter-facture-request.js +0 -15
- package/dist/models/consulter-facture-response.d.ts +0 -26
- package/dist/models/consulter-facture-response.js +0 -15
- package/dist/models/consulter-structure-request.d.ts +0 -26
- package/dist/models/consulter-structure-request.js +0 -15
- package/dist/models/consulter-structure-response.d.ts +0 -26
- package/dist/models/consulter-structure-response.js +0 -15
- package/dist/models/credentials-afnor.d.ts +0 -19
- package/dist/models/credentials-afnor.js +0 -15
- package/dist/models/credentials-chorus-pro.d.ts +0 -24
- package/dist/models/credentials-chorus-pro.js +0 -15
- package/dist/models/destinataire.d.ts +0 -24
- package/dist/models/destinataire.js +0 -15
- package/dist/models/destination-afnor.d.ts +0 -34
- package/dist/models/destination-afnor.js +0 -24
- package/dist/models/destination-chorus-pro.d.ts +0 -23
- package/dist/models/destination-chorus-pro.js +0 -19
- package/dist/models/dimension-page-schema.d.ts +0 -24
- package/dist/models/dimension-page-schema.js +0 -15
- package/dist/models/direction-flux.d.ts +0 -19
- package/dist/models/direction-flux.js +0 -23
- package/dist/models/donnees-facture-simplifiees.d.ts +0 -46
- package/dist/models/donnees-facture-simplifiees.js +0 -15
- package/dist/models/facture-enrichie-info.d.ts +0 -24
- package/dist/models/facture-enrichie-info.js +0 -15
- package/dist/models/facture-entrante.d.ts +0 -68
- package/dist/models/facture-entrante.js +0 -15
- package/dist/models/flux-resume.d.ts +0 -24
- package/dist/models/flux-resume.js +0 -15
- package/dist/models/format-facture.d.ts +0 -20
- package/dist/models/format-facture.js +0 -24
- package/dist/models/format-sortie.d.ts +0 -16
- package/dist/models/format-sortie.js +0 -20
- package/dist/models/fournisseur-entrant.d.ts +0 -29
- package/dist/models/fournisseur-entrant.js +0 -15
- package/dist/models/fournisseur.d.ts +0 -28
- package/dist/models/fournisseur.js +0 -15
- package/dist/models/information-signature-api.d.ts +0 -25
- package/dist/models/information-signature-api.js +0 -15
- package/dist/models/ligne-de-poste-montant-remise-ht.d.ts +0 -16
- package/dist/models/ligne-de-poste-montant-remise-ht.js +0 -15
- package/dist/models/ligne-de-poste-taux-tva-manuel.d.ts +0 -16
- package/dist/models/ligne-de-poste-taux-tva-manuel.js +0 -15
- package/dist/models/ligne-de-poste.d.ts +0 -39
- package/dist/models/ligne-de-poste.js +0 -15
- package/dist/models/ligne-de-tva.d.ts +0 -27
- package/dist/models/ligne-de-tva.js +0 -15
- package/dist/models/mode-depot.d.ts +0 -20
- package/dist/models/mode-depot.js +0 -24
- package/dist/models/mode-paiement.d.ts +0 -23
- package/dist/models/mode-paiement.js +0 -27
- package/dist/models/montant-apayer.d.ts +0 -16
- package/dist/models/montant-apayer.js +0 -15
- package/dist/models/montant-base-ht.d.ts +0 -16
- package/dist/models/montant-base-ht.js +0 -15
- package/dist/models/montant-ht-total.d.ts +0 -16
- package/dist/models/montant-ht-total.js +0 -15
- package/dist/models/montant-remise-globale-ttc.d.ts +0 -16
- package/dist/models/montant-remise-globale-ttc.js +0 -15
- package/dist/models/montant-total-acompte.d.ts +0 -16
- package/dist/models/montant-total-acompte.js +0 -15
- package/dist/models/montant-total-ligne-ht.d.ts +0 -16
- package/dist/models/montant-total-ligne-ht.js +0 -15
- package/dist/models/montant-total.d.ts +0 -29
- package/dist/models/montant-total.js +0 -15
- package/dist/models/montant-ttc-total.d.ts +0 -16
- package/dist/models/montant-ttc-total.js +0 -15
- package/dist/models/montant-tva-ligne.d.ts +0 -16
- package/dist/models/montant-tva-ligne.js +0 -15
- package/dist/models/montant-tva-total.d.ts +0 -16
- package/dist/models/montant-tva-total.js +0 -15
- package/dist/models/montant-tva.d.ts +0 -16
- package/dist/models/montant-tva.js +0 -15
- package/dist/models/montant-unitaire-ht.d.ts +0 -16
- package/dist/models/montant-unitaire-ht.js +0 -15
- package/dist/models/nature-operation.d.ts +0 -31
- package/dist/models/nature-operation.js +0 -35
- package/dist/models/note-obligatoire-schema.d.ts +0 -34
- package/dist/models/note-obligatoire-schema.js +0 -15
- package/dist/models/note.d.ts +0 -18
- package/dist/models/note.js +0 -15
- package/dist/models/obtenir-id-chorus-pro-request.d.ts +0 -26
- package/dist/models/obtenir-id-chorus-pro-request.js +0 -15
- package/dist/models/obtenir-id-chorus-pro-response.d.ts +0 -29
- package/dist/models/obtenir-id-chorus-pro-response.js +0 -15
- package/dist/models/options-processing.d.ts +0 -33
- package/dist/models/options-processing.js +0 -15
- package/dist/models/parametres-signature.d.ts +0 -34
- package/dist/models/parametres-signature.js +0 -15
- package/dist/models/parametres-structure.d.ts +0 -28
- package/dist/models/parametres-structure.js +0 -15
- package/dist/models/pdffactur-xinfo.d.ts +0 -28
- package/dist/models/pdffactur-xinfo.js +0 -15
- package/dist/models/piece-jointe-complementaire.d.ts +0 -21
- package/dist/models/piece-jointe-complementaire.js +0 -15
- package/dist/models/profil-api.d.ts +0 -18
- package/dist/models/profil-api.js +0 -22
- package/dist/models/profil-flux.d.ts +0 -20
- package/dist/models/profil-flux.js +0 -24
- package/dist/models/quantite.d.ts +0 -16
- package/dist/models/quantite.js +0 -15
- package/dist/models/rechercher-services-response.d.ts +0 -24
- package/dist/models/rechercher-services-response.js +0 -15
- package/dist/models/rechercher-structure-request.d.ts +0 -25
- package/dist/models/rechercher-structure-request.js +0 -15
- package/dist/models/rechercher-structure-response.d.ts +0 -30
- package/dist/models/rechercher-structure-response.js +0 -15
- package/dist/models/references.d.ts +0 -27
- package/dist/models/references.js +0 -15
- package/dist/models/reponse-healthcheck-afnor.d.ts +0 -28
- package/dist/models/reponse-healthcheck-afnor.js +0 -15
- package/dist/models/reponse-recherche-flux.d.ts +0 -33
- package/dist/models/reponse-recherche-flux.js +0 -15
- package/dist/models/reponse-soumission-flux.d.ts +0 -38
- package/dist/models/reponse-soumission-flux.js +0 -15
- package/dist/models/reponse-tache.d.ts +0 -17
- package/dist/models/reponse-tache.js +0 -15
- package/dist/models/reponse-validation-erreur.d.ts +0 -17
- package/dist/models/reponse-validation-erreur.js +0 -15
- package/dist/models/reponse-validation-succes.d.ts +0 -17
- package/dist/models/reponse-validation-succes.js +0 -15
- package/dist/models/reponse-verification-succes.d.ts +0 -56
- package/dist/models/reponse-verification-succes.js +0 -15
- package/dist/models/requete-recherche-flux.d.ts +0 -34
- package/dist/models/requete-recherche-flux.js +0 -15
- package/dist/models/requete-soumission-flux.d.ts +0 -31
- package/dist/models/requete-soumission-flux.js +0 -15
- package/dist/models/resultat-afnor.d.ts +0 -30
- package/dist/models/resultat-afnor.js +0 -15
- package/dist/models/resultat-chorus-pro.d.ts +0 -22
- package/dist/models/resultat-chorus-pro.js +0 -15
- package/dist/models/resultat-validation-pdfapi.d.ts +0 -93
- package/dist/models/resultat-validation-pdfapi.js +0 -15
- package/dist/models/service-structure.d.ts +0 -32
- package/dist/models/service-structure.js +0 -15
- package/dist/models/soumettre-facture-complete-request.d.ts +0 -34
- package/dist/models/soumettre-facture-complete-request.js +0 -15
- package/dist/models/soumettre-facture-complete-response.d.ts +0 -53
- package/dist/models/soumettre-facture-complete-response.js +0 -20
- package/dist/models/soumettre-facture-request.d.ts +0 -44
- package/dist/models/soumettre-facture-request.js +0 -15
- package/dist/models/soumettre-facture-response.d.ts +0 -26
- package/dist/models/soumettre-facture-response.js +0 -15
- package/dist/models/statut-acquittement.d.ts +0 -20
- package/dist/models/statut-acquittement.js +0 -24
- package/dist/models/statut-celery.d.ts +0 -22
- package/dist/models/statut-celery.js +0 -26
- package/dist/models/statut-champ-api.d.ts +0 -22
- package/dist/models/statut-champ-api.js +0 -26
- package/dist/models/statut-facture.d.ts +0 -25
- package/dist/models/statut-facture.js +0 -15
- package/dist/models/statut-tache.d.ts +0 -25
- package/dist/models/statut-tache.js +0 -15
- package/dist/models/syntaxe-flux.d.ts +0 -22
- package/dist/models/syntaxe-flux.js +0 -26
- package/dist/models/tauxmanuel.d.ts +0 -16
- package/dist/models/tauxmanuel.js +0 -15
- package/dist/models/type-document.d.ts +0 -37
- package/dist/models/type-document.js +0 -41
- package/dist/models/type-facture.d.ts +0 -81
- package/dist/models/type-facture.js +0 -85
- package/dist/models/type-flux.d.ts +0 -22
- package/dist/models/type-flux.js +0 -26
- package/dist/models/type-tva.d.ts +0 -21
- package/dist/models/type-tva.js +0 -25
- package/dist/models/unite.d.ts +0 -23
- package/dist/models/unite.js +0 -27
- package/docs/AdresseElectronique.md +0 -23
- package/docs/AdressePostale.md +0 -29
- package/docs/Beneficiaire.md +0 -31
- package/docs/CadreDeFacturation.md +0 -27
- package/docs/CategorieTVA.md +0 -25
- package/docs/ChampVerifieSchema.md +0 -37
- package/docs/ChorusProCredentials.md +0 -29
- package/docs/CodeCadreFacturation.md +0 -15
- package/docs/CodeRaisonReduction.md +0 -21
- package/docs/ConsulterFactureRequest.md +0 -23
- package/docs/ConsulterFactureResponse.md +0 -37
- package/docs/ConsulterStructureRequest.md +0 -25
- package/docs/ConsulterStructureResponse.md +0 -37
- package/docs/CredentialsAFNOR.md +0 -25
- package/docs/CredentialsChorusPro.md +0 -29
- package/docs/Destinataire.md +0 -31
- package/docs/DestinationAFNOR.md +0 -27
- package/docs/DestinationChorusPro.md +0 -23
- package/docs/DimensionPageSchema.md +0 -23
- package/docs/DirectionFlux.md +0 -11
- package/docs/DonneesFactureSimplifiees.md +0 -37
- package/docs/FactureEnrichieInfo.md +0 -35
- package/docs/FactureEntrante.md +0 -57
- package/docs/FluxResume.md +0 -35
- package/docs/FormatFacture.md +0 -13
- package/docs/FormatSortie.md +0 -10
- package/docs/Fournisseur.md +0 -39
- package/docs/FournisseurEntrant.md +0 -35
- package/docs/InformationSignatureAPI.md +0 -31
- package/docs/LigneDePoste.md +0 -49
- package/docs/LigneDePosteMontantRemiseHt.md +0 -19
- package/docs/LigneDePosteTauxTvaManuel.md +0 -19
- package/docs/LigneDeTVA.md +0 -33
- package/docs/ModeDepot.md +0 -13
- package/docs/ModePaiement.md +0 -19
- package/docs/MontantAPayer.md +0 -19
- package/docs/MontantBaseHt.md +0 -19
- package/docs/MontantHtTotal.md +0 -19
- package/docs/MontantRemiseGlobaleTtc.md +0 -19
- package/docs/MontantTotal.md +0 -33
- package/docs/MontantTotalAcompte.md +0 -19
- package/docs/MontantTotalLigneHt.md +0 -19
- package/docs/MontantTtcTotal.md +0 -19
- package/docs/MontantTva.md +0 -19
- package/docs/MontantTvaLigne.md +0 -19
- package/docs/MontantTvaTotal.md +0 -19
- package/docs/MontantUnitaireHt.md +0 -19
- package/docs/NatureOperation.md +0 -35
- package/docs/Note.md +0 -23
- package/docs/NoteObligatoireSchema.md +0 -33
- package/docs/ObtenirIdChorusProRequest.md +0 -25
- package/docs/ObtenirIdChorusProResponse.md +0 -27
- package/docs/OptionsProcessing.md +0 -27
- package/docs/PDFFacturXInfo.md +0 -25
- package/docs/ParametresSignature.md +0 -37
- package/docs/ParametresStructure.md +0 -25
- package/docs/PieceJointeComplementaire.md +0 -29
- package/docs/ProfilAPI.md +0 -14
- package/docs/ProfilFlux.md +0 -13
- package/docs/Quantite.md +0 -19
- package/docs/RechercherServicesResponse.md +0 -27
- package/docs/RechercherStructureRequest.md +0 -29
- package/docs/RechercherStructureResponse.md +0 -27
- package/docs/References.md +0 -35
- package/docs/ReponseHealthcheckAFNOR.md +0 -25
- package/docs/ReponseRechercheFlux.md +0 -27
- package/docs/ReponseSoumissionFlux.md +0 -33
- package/docs/ReponseTache.md +0 -21
- package/docs/ReponseValidationErreur.md +0 -20
- package/docs/ReponseValidationSucces.md +0 -20
- package/docs/ReponseVerificationSucces.md +0 -39
- package/docs/RequeteRechercheFlux.md +0 -37
- package/docs/RequeteSoumissionFlux.md +0 -31
- package/docs/ResultatAFNOR.md +0 -29
- package/docs/ResultatChorusPro.md +0 -25
- package/docs/ResultatValidationPDFAPI.md +0 -65
- package/docs/SantApi.md +0 -97
- package/docs/ServiceStructure.md +0 -27
- package/docs/SoumettreFactureCompleteRequest.md +0 -29
- package/docs/SoumettreFactureCompleteResponse.md +0 -37
- package/docs/SoumettreFactureRequest.md +0 -49
- package/docs/SoumettreFactureResponse.md +0 -27
- package/docs/StatutAcquittement.md +0 -13
- package/docs/StatutCelery.md +0 -17
- package/docs/StatutChampAPI.md +0 -17
- package/docs/StatutFacture.md +0 -25
- package/docs/StatutTache.md +0 -25
- package/docs/SyntaxeFlux.md +0 -17
- package/docs/Tauxmanuel.md +0 -19
- package/docs/TraitementFactureApi.md +0 -670
- package/docs/TypeDocument.md +0 -17
- package/docs/TypeFacture.md +0 -39
- package/docs/TypeFlux.md +0 -17
- package/docs/TypeTVA.md +0 -15
- package/docs/Unite.md +0 -19
- package/docs/UtilisateurApi.md +0 -52
- package/docs/VrificationPDFXMLApi.md +0 -335
- package/models/adresse-electronique.ts +0 -29
- package/models/adresse-postale.ts +0 -27
- package/models/beneficiaire.ts +0 -34
- package/models/cadre-de-facturation.ts +0 -34
- package/models/categorie-tva.ts +0 -63
- package/models/champ-verifie-schema.ts +0 -54
- package/models/chorus-pro-credentials.ts +0 -42
- package/models/code-cadre-facturation.ts +0 -31
- package/models/code-raison-reduction.ts +0 -55
- package/models/consulter-facture-request.ts +0 -30
- package/models/consulter-facture-response.ts +0 -34
- package/models/consulter-structure-request.ts +0 -34
- package/models/consulter-structure-response.ts +0 -34
- package/models/credentials-afnor.ts +0 -25
- package/models/credentials-chorus-pro.ts +0 -30
- package/models/destinataire.ts +0 -34
- package/models/destination-afnor.ts +0 -46
- package/models/destination-chorus-pro.ts +0 -34
- package/models/dimension-page-schema.ts +0 -30
- package/models/direction-flux.ts +0 -29
- package/models/donnees-facture-simplifiees.ts +0 -46
- package/models/facture-enrichie-info.ts +0 -30
- package/models/facture-entrante.ts +0 -82
- package/models/flux-resume.ts +0 -30
- package/models/format-facture.ts +0 -30
- package/models/format-sortie.ts +0 -26
- package/models/fournisseur-entrant.ts +0 -39
- package/models/fournisseur.ts +0 -38
- package/models/information-signature-api.ts +0 -31
- package/models/ligne-de-poste-montant-remise-ht.ts +0 -22
- package/models/ligne-de-poste-taux-tva-manuel.ts +0 -22
- package/models/ligne-de-poste.ts +0 -63
- package/models/ligne-de-tva.ts +0 -43
- package/models/mode-depot.ts +0 -30
- package/models/mode-paiement.ts +0 -33
- package/models/montant-apayer.ts +0 -22
- package/models/montant-base-ht.ts +0 -22
- package/models/montant-ht-total.ts +0 -22
- package/models/montant-remise-globale-ttc.ts +0 -22
- package/models/montant-total-acompte.ts +0 -22
- package/models/montant-total-ligne-ht.ts +0 -22
- package/models/montant-total.ts +0 -47
- package/models/montant-ttc-total.ts +0 -22
- package/models/montant-tva-ligne.ts +0 -22
- package/models/montant-tva-total.ts +0 -22
- package/models/montant-tva.ts +0 -22
- package/models/montant-unitaire-ht.ts +0 -22
- package/models/nature-operation.ts +0 -41
- package/models/note-obligatoire-schema.ts +0 -46
- package/models/note.ts +0 -24
- package/models/obtenir-id-chorus-pro-request.ts +0 -34
- package/models/obtenir-id-chorus-pro-response.ts +0 -35
- package/models/options-processing.ts +0 -43
- package/models/parametres-signature.ts +0 -40
- package/models/parametres-structure.ts +0 -34
- package/models/pdffactur-xinfo.ts +0 -34
- package/models/piece-jointe-complementaire.ts +0 -27
- package/models/profil-api.ts +0 -28
- package/models/profil-flux.ts +0 -30
- package/models/quantite.ts +0 -22
- package/models/rechercher-services-response.ts +0 -32
- package/models/rechercher-structure-request.ts +0 -33
- package/models/rechercher-structure-response.ts +0 -38
- package/models/references.ts +0 -41
- package/models/reponse-healthcheck-afnor.ts +0 -34
- package/models/reponse-recherche-flux.ts +0 -41
- package/models/reponse-soumission-flux.ts +0 -44
- package/models/reponse-tache.ts +0 -23
- package/models/reponse-validation-erreur.ts +0 -23
- package/models/reponse-validation-succes.ts +0 -23
- package/models/reponse-verification-succes.ts +0 -68
- package/models/requete-recherche-flux.ts +0 -48
- package/models/requete-soumission-flux.ts +0 -45
- package/models/resultat-afnor.ts +0 -36
- package/models/resultat-chorus-pro.ts +0 -28
- package/models/resultat-validation-pdfapi.ts +0 -99
- package/models/service-structure.ts +0 -38
- package/models/soumettre-facture-complete-request.ts +0 -48
- package/models/soumettre-facture-complete-response.ts +0 -72
- package/models/soumettre-facture-request.ts +0 -58
- package/models/soumettre-facture-response.ts +0 -32
- package/models/statut-acquittement.ts +0 -30
- package/models/statut-celery.ts +0 -32
- package/models/statut-champ-api.ts +0 -32
- package/models/statut-facture.ts +0 -31
- package/models/statut-tache.ts +0 -33
- package/models/syntaxe-flux.ts +0 -32
- package/models/tauxmanuel.ts +0 -22
- package/models/type-document.ts +0 -47
- package/models/type-facture.ts +0 -91
- package/models/type-flux.ts +0 -32
- package/models/type-tva.ts +0 -31
- package/models/unite.ts +0 -33
|
@@ -46,22 +46,22 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
46
46
|
};
|
|
47
47
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
48
48
|
exports.FactPulseClient = void 0;
|
|
49
|
-
exports.
|
|
50
|
-
exports.
|
|
51
|
-
exports.
|
|
52
|
-
exports.
|
|
53
|
-
exports.
|
|
54
|
-
exports.
|
|
55
|
-
exports.
|
|
56
|
-
exports.
|
|
57
|
-
exports.
|
|
49
|
+
exports.amount = amount;
|
|
50
|
+
exports.invoiceTotals = invoiceTotals;
|
|
51
|
+
exports.invoiceLine = invoiceLine;
|
|
52
|
+
exports.vatLine = vatLine;
|
|
53
|
+
exports.postalAddress = postalAddress;
|
|
54
|
+
exports.electronicAddress = electronicAddress;
|
|
55
|
+
exports.supplier = supplier;
|
|
56
|
+
exports.recipient = recipient;
|
|
57
|
+
exports.beneficiary = beneficiary;
|
|
58
58
|
const axios_1 = __importDefault(require("axios"));
|
|
59
59
|
const form_data_1 = __importDefault(require("form-data"));
|
|
60
60
|
const fs = __importStar(require("fs"));
|
|
61
61
|
const path = __importStar(require("path"));
|
|
62
62
|
const exceptions_1 = require("./exceptions");
|
|
63
|
-
/**
|
|
64
|
-
function
|
|
63
|
+
/** Converts a value to an amount string for the API. */
|
|
64
|
+
function amount(value) {
|
|
65
65
|
if (value === null || value === undefined)
|
|
66
66
|
return '0.00';
|
|
67
67
|
if (typeof value === 'number')
|
|
@@ -70,150 +70,150 @@ function montant(value) {
|
|
|
70
70
|
return value;
|
|
71
71
|
return '0.00';
|
|
72
72
|
}
|
|
73
|
-
/**
|
|
74
|
-
function
|
|
73
|
+
/** Creates a simplified InvoiceTotals object. */
|
|
74
|
+
function invoiceTotals(exclTax, vat, inclTax, amountDue, options) {
|
|
75
75
|
const result = {
|
|
76
|
-
|
|
77
|
-
|
|
76
|
+
totalNetAmount: amount(exclTax), vatAmount: amount(vat),
|
|
77
|
+
totalGrossAmount: amount(inclTax), amountDue: amount(amountDue),
|
|
78
78
|
};
|
|
79
|
-
if ((options === null || options === void 0 ? void 0 : options.
|
|
80
|
-
result.
|
|
81
|
-
if ((options === null || options === void 0 ? void 0 : options.
|
|
82
|
-
result.
|
|
83
|
-
if ((options === null || options === void 0 ? void 0 : options.
|
|
84
|
-
result.
|
|
79
|
+
if ((options === null || options === void 0 ? void 0 : options.globalAllowanceAmount) !== undefined)
|
|
80
|
+
result.globalAllowanceAmount = amount(options.globalAllowanceAmount);
|
|
81
|
+
if ((options === null || options === void 0 ? void 0 : options.globalAllowanceReason) !== undefined)
|
|
82
|
+
result.globalAllowanceReason = options.globalAllowanceReason;
|
|
83
|
+
if ((options === null || options === void 0 ? void 0 : options.prepayment) !== undefined)
|
|
84
|
+
result.prepayment = amount(options.prepayment);
|
|
85
85
|
return result;
|
|
86
86
|
}
|
|
87
|
-
/**
|
|
88
|
-
*
|
|
89
|
-
function
|
|
87
|
+
/** Creates an invoice line (aligned with InvoiceLine in models.py).
|
|
88
|
+
* For VAT rate: either vatRate (code e.g.: "VAT20") or manualVatRate (value e.g.: 20.00) */
|
|
89
|
+
function invoiceLine(lineNumber, itemName, quantity, unitNetPrice, lineNetAmount, options) {
|
|
90
90
|
var _a, _b, _c;
|
|
91
91
|
const result = {
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
92
|
+
lineNumber, itemName, quantity: amount(quantity), unitNetPrice: amount(unitNetPrice),
|
|
93
|
+
lineNetAmount: amount(lineNetAmount),
|
|
94
|
+
vatCategory: (_a = options === null || options === void 0 ? void 0 : options.vatCategory) !== null && _a !== void 0 ? _a : 'S', unit: (_b = options === null || options === void 0 ? void 0 : options.unit) !== null && _b !== void 0 ? _b : 'LUMP_SUM',
|
|
95
95
|
};
|
|
96
|
-
//
|
|
97
|
-
if (options === null || options === void 0 ? void 0 : options.
|
|
98
|
-
result.
|
|
96
|
+
// Either vatRate (code) or manualVatRate (value)
|
|
97
|
+
if (options === null || options === void 0 ? void 0 : options.vatRate)
|
|
98
|
+
result.vatRate = options.vatRate;
|
|
99
99
|
else
|
|
100
|
-
result.
|
|
100
|
+
result.manualVatRate = amount((_c = options === null || options === void 0 ? void 0 : options.manualVatRate) !== null && _c !== void 0 ? _c : '20.00');
|
|
101
101
|
if (options === null || options === void 0 ? void 0 : options.reference)
|
|
102
102
|
result.reference = options.reference;
|
|
103
|
-
if ((options === null || options === void 0 ? void 0 : options.
|
|
104
|
-
result.
|
|
105
|
-
if (options === null || options === void 0 ? void 0 : options.
|
|
106
|
-
result.
|
|
107
|
-
if (options === null || options === void 0 ? void 0 : options.
|
|
108
|
-
result.
|
|
109
|
-
if (options === null || options === void 0 ? void 0 : options.
|
|
110
|
-
result.
|
|
111
|
-
if (options === null || options === void 0 ? void 0 : options.
|
|
112
|
-
result.
|
|
103
|
+
if ((options === null || options === void 0 ? void 0 : options.lineAllowanceAmount) !== undefined)
|
|
104
|
+
result.lineAllowanceAmount = amount(options.lineAllowanceAmount);
|
|
105
|
+
if (options === null || options === void 0 ? void 0 : options.allowanceReasonCode)
|
|
106
|
+
result.allowanceReasonCode = options.allowanceReasonCode;
|
|
107
|
+
if (options === null || options === void 0 ? void 0 : options.allowanceReason)
|
|
108
|
+
result.allowanceReason = options.allowanceReason;
|
|
109
|
+
if (options === null || options === void 0 ? void 0 : options.periodStartDate)
|
|
110
|
+
result.periodStartDate = options.periodStartDate;
|
|
111
|
+
if (options === null || options === void 0 ? void 0 : options.periodEndDate)
|
|
112
|
+
result.periodEndDate = options.periodEndDate;
|
|
113
113
|
return result;
|
|
114
114
|
}
|
|
115
|
-
/**
|
|
116
|
-
*
|
|
117
|
-
function
|
|
115
|
+
/** Creates a VAT line (aligned with VATLine in models.py).
|
|
116
|
+
* For rate: either rate (code e.g.: "VAT20") or manualRate (value e.g.: 20.00) */
|
|
117
|
+
function vatLine(taxableAmount, vatAmount, options) {
|
|
118
118
|
var _a, _b;
|
|
119
119
|
const result = {
|
|
120
|
-
|
|
120
|
+
taxableAmount: amount(taxableAmount), vatAmount: amount(vatAmount), category: (_a = options === null || options === void 0 ? void 0 : options.category) !== null && _a !== void 0 ? _a : 'S',
|
|
121
121
|
};
|
|
122
|
-
//
|
|
123
|
-
if (options === null || options === void 0 ? void 0 : options.
|
|
124
|
-
result.
|
|
122
|
+
// Either rate (code) or manualRate (value)
|
|
123
|
+
if (options === null || options === void 0 ? void 0 : options.rate)
|
|
124
|
+
result.rate = options.rate;
|
|
125
125
|
else
|
|
126
|
-
result.
|
|
126
|
+
result.manualRate = amount((_b = options === null || options === void 0 ? void 0 : options.manualRate) !== null && _b !== void 0 ? _b : '20.00');
|
|
127
127
|
return result;
|
|
128
128
|
}
|
|
129
|
-
/**
|
|
130
|
-
function
|
|
129
|
+
/** Creates a postal address for the FactPulse API. */
|
|
130
|
+
function postalAddress(lineOne, postalCode, city, options) {
|
|
131
131
|
var _a;
|
|
132
|
-
const result = {
|
|
133
|
-
if (options === null || options === void 0 ? void 0 : options.
|
|
134
|
-
result.
|
|
135
|
-
if (options === null || options === void 0 ? void 0 : options.
|
|
136
|
-
result.
|
|
132
|
+
const result = { lineOne, postalCode, city, countryCode: (_a = options === null || options === void 0 ? void 0 : options.countryCode) !== null && _a !== void 0 ? _a : 'FR' };
|
|
133
|
+
if (options === null || options === void 0 ? void 0 : options.lineTwo)
|
|
134
|
+
result.lineTwo = options.lineTwo;
|
|
135
|
+
if (options === null || options === void 0 ? void 0 : options.lineThree)
|
|
136
|
+
result.lineThree = options.lineThree;
|
|
137
137
|
return result;
|
|
138
138
|
}
|
|
139
|
-
/**
|
|
140
|
-
function
|
|
141
|
-
return {
|
|
139
|
+
/** Creates an electronic address for the FactPulse API. schemeId: "0009"=SIREN, "0225"=SIRET */
|
|
140
|
+
function electronicAddress(identifier, schemeId = '0009') {
|
|
141
|
+
return { identifier, schemeId };
|
|
142
142
|
}
|
|
143
|
-
/**
|
|
144
|
-
function
|
|
143
|
+
/** Computes the French intra-community VAT number from a SIREN. */
|
|
144
|
+
function computeVatIntra(siren) {
|
|
145
145
|
if (siren.length !== 9 || !/^\d+$/.test(siren))
|
|
146
146
|
return null;
|
|
147
147
|
const cle = (12 + 3 * (parseInt(siren, 10) % 97)) % 97;
|
|
148
148
|
return `FR${cle.toString().padStart(2, '0')}${siren}`;
|
|
149
149
|
}
|
|
150
|
-
/**
|
|
151
|
-
function
|
|
150
|
+
/** Creates a supplier (issuer) with auto-computed SIREN, intra-EU VAT number and addresses. */
|
|
151
|
+
function supplier(name, siret, addressLine1, postalCode, city, options) {
|
|
152
152
|
var _a, _b, _c;
|
|
153
153
|
const opts = options !== null && options !== void 0 ? options : {};
|
|
154
154
|
const siren = (_a = opts.siren) !== null && _a !== void 0 ? _a : (siret.length === 14 ? siret.slice(0, 9) : undefined);
|
|
155
|
-
const
|
|
155
|
+
const vatNumber = (_b = opts.vatNumber) !== null && _b !== void 0 ? _b : (siren ? computeVatIntra(siren) : null);
|
|
156
156
|
const result = {
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
157
|
+
name, supplierId: (_c = opts.supplierId) !== null && _c !== void 0 ? _c : 0, siret,
|
|
158
|
+
electronicAddress: electronicAddress(siret, '0225'),
|
|
159
|
+
postalAddress: postalAddress(addressLine1, postalCode, city, { countryCode: opts.countryCode, lineTwo: opts.addressLine2 }),
|
|
160
160
|
};
|
|
161
161
|
if (siren)
|
|
162
162
|
result.siren = siren;
|
|
163
|
-
if (
|
|
164
|
-
result.
|
|
163
|
+
if (vatNumber)
|
|
164
|
+
result.vatNumber = vatNumber;
|
|
165
165
|
if (opts.iban)
|
|
166
166
|
result.iban = opts.iban;
|
|
167
|
-
if (opts.
|
|
168
|
-
result.
|
|
169
|
-
if (opts.
|
|
170
|
-
result.
|
|
167
|
+
if (opts.supplierServiceId)
|
|
168
|
+
result.supplierServiceId = opts.supplierServiceId;
|
|
169
|
+
if (opts.supplierBankDetailsCode)
|
|
170
|
+
result.supplierBankDetailsCode = opts.supplierBankDetailsCode;
|
|
171
171
|
return result;
|
|
172
172
|
}
|
|
173
|
-
/**
|
|
174
|
-
function
|
|
173
|
+
/** Creates a recipient (customer) with auto-computed SIREN and addresses. */
|
|
174
|
+
function recipient(name, siret, addressLine1, postalCode, city, options) {
|
|
175
175
|
var _a;
|
|
176
176
|
const opts = options !== null && options !== void 0 ? options : {};
|
|
177
177
|
const siren = (_a = opts.siren) !== null && _a !== void 0 ? _a : (siret.length === 14 ? siret.slice(0, 9) : undefined);
|
|
178
178
|
const result = {
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
179
|
+
name, siret,
|
|
180
|
+
electronicAddress: electronicAddress(siret, '0225'),
|
|
181
|
+
postalAddress: postalAddress(addressLine1, postalCode, city, { countryCode: opts.countryCode, lineTwo: opts.addressLine2 }),
|
|
182
182
|
};
|
|
183
183
|
if (siren)
|
|
184
184
|
result.siren = siren;
|
|
185
|
-
if (opts.
|
|
186
|
-
result.
|
|
185
|
+
if (opts.executingServiceCode)
|
|
186
|
+
result.executingServiceCode = opts.executingServiceCode;
|
|
187
187
|
return result;
|
|
188
188
|
}
|
|
189
189
|
/**
|
|
190
|
-
*
|
|
190
|
+
* Creates a beneficiary (factor) for factoring.
|
|
191
191
|
*
|
|
192
|
-
*
|
|
193
|
-
*
|
|
194
|
-
* factor (
|
|
192
|
+
* The beneficiary (BG-10 / PayeeTradeParty) is used when payment
|
|
193
|
+
* must be made to a third party different from the supplier, typically
|
|
194
|
+
* a factor (factoring company).
|
|
195
195
|
*
|
|
196
|
-
*
|
|
197
|
-
* -
|
|
198
|
-
* -
|
|
199
|
-
* -
|
|
196
|
+
* For factored invoices, you also need to:
|
|
197
|
+
* - Use a factored document type (393, 396, 501, 502, 472, 473)
|
|
198
|
+
* - Add an ACC note with the subrogation mention
|
|
199
|
+
* - The beneficiary's IBAN will be used for payment
|
|
200
200
|
*
|
|
201
|
-
* @param
|
|
201
|
+
* @param name Factor's business name (BT-59)
|
|
202
202
|
* @param options Options: siret (BT-60), siren (BT-61), iban, bic
|
|
203
|
-
* @returns Dict
|
|
203
|
+
* @returns Dict ready to be used in a factored invoice
|
|
204
204
|
*
|
|
205
205
|
* @example
|
|
206
|
-
* const factor =
|
|
206
|
+
* const factor = beneficiary('FACTOR SAS', {
|
|
207
207
|
* siret: '30000000700033',
|
|
208
208
|
* iban: 'FR76 3000 4000 0500 0012 3456 789',
|
|
209
209
|
* });
|
|
210
210
|
*/
|
|
211
|
-
function
|
|
211
|
+
function beneficiary(name, options) {
|
|
212
212
|
var _a;
|
|
213
213
|
const opts = options !== null && options !== void 0 ? options : {};
|
|
214
|
-
// Auto-
|
|
214
|
+
// Auto-compute SIREN from SIRET
|
|
215
215
|
const siren = (_a = opts.siren) !== null && _a !== void 0 ? _a : (opts.siret && opts.siret.length === 14 ? opts.siret.slice(0, 9) : undefined);
|
|
216
|
-
const result = {
|
|
216
|
+
const result = { name };
|
|
217
217
|
if (opts.siret)
|
|
218
218
|
result.siret = opts.siret;
|
|
219
219
|
if (siren)
|
|
@@ -225,7 +225,7 @@ function beneficiaire(nom, options) {
|
|
|
225
225
|
return result;
|
|
226
226
|
}
|
|
227
227
|
// =============================================================================
|
|
228
|
-
//
|
|
228
|
+
// Main client
|
|
229
229
|
// =============================================================================
|
|
230
230
|
const DEFAULT_API_URL = 'https://factpulse.fr';
|
|
231
231
|
const DEFAULT_POLLING_INTERVAL = 2000;
|
|
@@ -272,7 +272,7 @@ class FactPulseClient {
|
|
|
272
272
|
flow_service_url: this.afnorCredentials.flowServiceUrl,
|
|
273
273
|
};
|
|
274
274
|
}
|
|
275
|
-
//
|
|
275
|
+
// Shorter aliases
|
|
276
276
|
getChorusProCredentials() { return this.getChorusCredentialsForApi(); }
|
|
277
277
|
getAfnorCredentials() { return this.getAfnorCredentialsForApi(); }
|
|
278
278
|
obtainToken() {
|
|
@@ -287,7 +287,7 @@ class FactPulseClient {
|
|
|
287
287
|
}
|
|
288
288
|
catch (error) {
|
|
289
289
|
const axiosError = error;
|
|
290
|
-
throw new exceptions_1.FactPulseAuthError(`
|
|
290
|
+
throw new exceptions_1.FactPulseAuthError(`Unable to obtain JWT token: ${((_b = (_a = axiosError.response) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.detail) || axiosError.message}`);
|
|
291
291
|
}
|
|
292
292
|
});
|
|
293
293
|
}
|
|
@@ -315,7 +315,7 @@ class FactPulseClient {
|
|
|
315
315
|
throw new exceptions_1.FactPulsePollingTimeout(taskId, timeoutMs);
|
|
316
316
|
yield this.ensureAuthenticated();
|
|
317
317
|
try {
|
|
318
|
-
const response = yield this.httpClient.get(`${this.config.apiUrl}/api/v1/
|
|
318
|
+
const response = yield this.httpClient.get(`${this.config.apiUrl}/api/v1/processing/tasks/${taskId}/status`, {
|
|
319
319
|
headers: { Authorization: `Bearer ${this.accessToken}` },
|
|
320
320
|
});
|
|
321
321
|
const { statut, resultat } = response.data;
|
|
@@ -325,7 +325,7 @@ class FactPulseClient {
|
|
|
325
325
|
// Format AFNOR: errorMessage, details
|
|
326
326
|
const result = resultat;
|
|
327
327
|
const errors = Array.isArray(result === null || result === void 0 ? void 0 : result.details) ? result.details.filter((e) => typeof e === 'object' && e !== null) : [];
|
|
328
|
-
throw new exceptions_1.FactPulseValidationError(`
|
|
328
|
+
throw new exceptions_1.FactPulseValidationError(`Task ${taskId} failed: ${(result === null || result === void 0 ? void 0 : result.errorMessage) || 'Unknown error'}`, errors);
|
|
329
329
|
}
|
|
330
330
|
yield new Promise(resolve => setTimeout(resolve, currentInterval));
|
|
331
331
|
currentInterval = Math.min(currentInterval * 1.5, 10000);
|
|
@@ -338,28 +338,28 @@ class FactPulseClient {
|
|
|
338
338
|
this.resetAuth();
|
|
339
339
|
continue;
|
|
340
340
|
}
|
|
341
|
-
throw new exceptions_1.FactPulseValidationError(`
|
|
341
|
+
throw new exceptions_1.FactPulseValidationError(`API Error: ${axiosError.message}`);
|
|
342
342
|
}
|
|
343
343
|
}
|
|
344
344
|
});
|
|
345
345
|
}
|
|
346
|
-
|
|
347
|
-
return __awaiter(this, arguments, void 0, function* (
|
|
346
|
+
generateFacturx(invoiceData_1, pdfPath_1) {
|
|
347
|
+
return __awaiter(this, arguments, void 0, function* (invoiceData, pdfPath, profile = 'EN16931', outputFormat = 'pdf', sync = true, timeout) {
|
|
348
348
|
var _a, _b, _c, _d;
|
|
349
|
-
const jsonData = typeof
|
|
349
|
+
const jsonData = typeof invoiceData === 'string' ? invoiceData : JSON.stringify(invoiceData);
|
|
350
350
|
let taskId = null;
|
|
351
351
|
for (let attempt = 0; attempt <= this.config.maxRetries; attempt++) {
|
|
352
352
|
yield this.ensureAuthenticated();
|
|
353
353
|
const form = new form_data_1.default();
|
|
354
|
-
form.append('
|
|
355
|
-
form.append('
|
|
356
|
-
form.append('
|
|
354
|
+
form.append('invoice_data', jsonData);
|
|
355
|
+
form.append('profile', profile);
|
|
356
|
+
form.append('output_format', outputFormat);
|
|
357
357
|
form.append('source_pdf', fs.createReadStream(pdfPath), { filename: path.basename(pdfPath), contentType: 'application/pdf' });
|
|
358
358
|
try {
|
|
359
|
-
const response = yield this.httpClient.post(`${this.config.apiUrl}/api/v1/
|
|
359
|
+
const response = yield this.httpClient.post(`${this.config.apiUrl}/api/v1/processing/generate-invoice`, form, {
|
|
360
360
|
headers: Object.assign(Object.assign({}, form.getHeaders()), { Authorization: `Bearer ${this.accessToken}` }), timeout: 60000,
|
|
361
361
|
});
|
|
362
|
-
taskId = response.data.
|
|
362
|
+
taskId = response.data.task_id;
|
|
363
363
|
break;
|
|
364
364
|
}
|
|
365
365
|
catch (error) {
|
|
@@ -368,14 +368,14 @@ class FactPulseClient {
|
|
|
368
368
|
this.resetAuth();
|
|
369
369
|
continue;
|
|
370
370
|
}
|
|
371
|
-
//
|
|
371
|
+
// Extract error details from response body
|
|
372
372
|
const responseData = (_b = axiosError.response) === null || _b === void 0 ? void 0 : _b.data;
|
|
373
|
-
let errorMsg = `
|
|
373
|
+
let errorMsg = `API Error (${((_c = axiosError.response) === null || _c === void 0 ? void 0 : _c.status) || 'unknown'}): ${axiosError.message}`;
|
|
374
374
|
const errors = [];
|
|
375
375
|
if (responseData) {
|
|
376
376
|
// Format FastAPI/Pydantic: {"detail": [{"loc": [...], "msg": "...", "type": "..."}]}
|
|
377
377
|
if (Array.isArray(responseData.detail)) {
|
|
378
|
-
errorMsg = '
|
|
378
|
+
errorMsg = 'Validation error';
|
|
379
379
|
for (const err of responseData.detail) {
|
|
380
380
|
if (typeof err === 'object' && err !== null) {
|
|
381
381
|
const loc = err.loc || [];
|
|
@@ -396,21 +396,21 @@ class FactPulseClient {
|
|
|
396
396
|
errorMsg = responseData.errorMessage;
|
|
397
397
|
}
|
|
398
398
|
}
|
|
399
|
-
console.error(`
|
|
399
|
+
console.error(`API Error ${(_d = axiosError.response) === null || _d === void 0 ? void 0 : _d.status}:`, responseData);
|
|
400
400
|
throw new exceptions_1.FactPulseValidationError(errorMsg, errors);
|
|
401
401
|
}
|
|
402
402
|
}
|
|
403
403
|
if (!taskId)
|
|
404
|
-
throw new exceptions_1.FactPulseValidationError("
|
|
404
|
+
throw new exceptions_1.FactPulseValidationError("No task ID");
|
|
405
405
|
if (!sync)
|
|
406
406
|
return taskId;
|
|
407
407
|
const result = yield this.pollTask(taskId, timeout);
|
|
408
|
-
if (result.
|
|
409
|
-
return Buffer.from(result.
|
|
410
|
-
throw new exceptions_1.FactPulseValidationError('
|
|
408
|
+
if (result.content_b64)
|
|
409
|
+
return Buffer.from(result.content_b64, 'base64');
|
|
410
|
+
throw new exceptions_1.FactPulseValidationError('No content');
|
|
411
411
|
});
|
|
412
412
|
}
|
|
413
|
-
static
|
|
413
|
+
static formatAmount(m) {
|
|
414
414
|
if (m === null || m === undefined)
|
|
415
415
|
return '0.00';
|
|
416
416
|
if (typeof m === 'number')
|
|
@@ -420,21 +420,21 @@ class FactPulseClient {
|
|
|
420
420
|
return '0.00';
|
|
421
421
|
}
|
|
422
422
|
// =========================================================================
|
|
423
|
-
// AFNOR - Authentication
|
|
423
|
+
// AFNOR - Authentication and internal helpers
|
|
424
424
|
// =========================================================================
|
|
425
425
|
/**
|
|
426
|
-
*
|
|
427
|
-
*
|
|
428
|
-
*
|
|
426
|
+
* Retrieves AFNOR credentials (stored or zero-trust mode).
|
|
427
|
+
* Zero-trust mode: Returns the afnorCredentials provided to the constructor.
|
|
428
|
+
* Stored mode: Retrieves credentials via GET /api/v1/afnor/credentials.
|
|
429
429
|
*/
|
|
430
430
|
getAfnorCredentialsInternal() {
|
|
431
431
|
return __awaiter(this, void 0, void 0, function* () {
|
|
432
432
|
var _a, _b;
|
|
433
|
-
//
|
|
433
|
+
// Zero-trust mode: credentials provided to the constructor
|
|
434
434
|
if (this.afnorCredentials) {
|
|
435
435
|
return this.afnorCredentials;
|
|
436
436
|
}
|
|
437
|
-
//
|
|
437
|
+
// Stored mode: retrieve credentials via the API
|
|
438
438
|
yield this.ensureAuthenticated();
|
|
439
439
|
try {
|
|
440
440
|
const response = yield this.httpClient.get(`${this.config.apiUrl}/api/v1/afnor/credentials`, {
|
|
@@ -454,27 +454,27 @@ class FactPulseClient {
|
|
|
454
454
|
if (((_a = axiosError.response) === null || _a === void 0 ? void 0 : _a.status) === 400) {
|
|
455
455
|
const detail = (_b = axiosError.response.data) === null || _b === void 0 ? void 0 : _b.detail;
|
|
456
456
|
if (typeof detail === 'object' && (detail === null || detail === void 0 ? void 0 : detail.error) === 'NO_CLIENT_UID') {
|
|
457
|
-
throw new exceptions_1.FactPulseAuthError("
|
|
458
|
-
"1.
|
|
459
|
-
"2.
|
|
457
|
+
throw new exceptions_1.FactPulseAuthError("No client_uid in JWT. To use AFNOR endpoints, either:\n" +
|
|
458
|
+
"1. Generate a token with a client_uid (stored mode)\n" +
|
|
459
|
+
"2. Provide AFNORCredentials to the client constructor (zero-trust mode)");
|
|
460
460
|
}
|
|
461
461
|
}
|
|
462
|
-
throw new exceptions_1.FactPulseAuthError(`
|
|
462
|
+
throw new exceptions_1.FactPulseAuthError(`Failed to retrieve AFNOR credentials: ${axiosError.message}`);
|
|
463
463
|
}
|
|
464
464
|
});
|
|
465
465
|
}
|
|
466
466
|
/**
|
|
467
|
-
*
|
|
468
|
-
*
|
|
469
|
-
* 1.
|
|
470
|
-
* 2.
|
|
471
|
-
* 3.
|
|
467
|
+
* Obtains the AFNOR OAuth2 token and the PDP URL.
|
|
468
|
+
* This method:
|
|
469
|
+
* 1. Retrieves AFNOR credentials (stored or zero-trust mode)
|
|
470
|
+
* 2. Performs AFNOR OAuth to obtain a token
|
|
471
|
+
* 3. Returns the token and the PDP URL
|
|
472
472
|
*/
|
|
473
473
|
getAfnorTokenAndUrl() {
|
|
474
474
|
return __awaiter(this, void 0, void 0, function* () {
|
|
475
|
-
//
|
|
475
|
+
// Step 1: Get AFNOR credentials
|
|
476
476
|
const credentials = yield this.getAfnorCredentialsInternal();
|
|
477
|
-
//
|
|
477
|
+
// Step 2: Perform AFNOR OAuth via the FactPulse proxy
|
|
478
478
|
const oauthData = new URLSearchParams({
|
|
479
479
|
grant_type: 'client_credentials',
|
|
480
480
|
client_id: credentials.clientId,
|
|
@@ -489,7 +489,7 @@ class FactPulseClient {
|
|
|
489
489
|
});
|
|
490
490
|
const tokenData = response.data;
|
|
491
491
|
if (!tokenData.access_token) {
|
|
492
|
-
throw new exceptions_1.FactPulseAuthError('
|
|
492
|
+
throw new exceptions_1.FactPulseAuthError('Invalid AFNOR OAuth2 response: access_token missing');
|
|
493
493
|
}
|
|
494
494
|
return {
|
|
495
495
|
token: tokenData.access_token,
|
|
@@ -498,13 +498,13 @@ class FactPulseClient {
|
|
|
498
498
|
}
|
|
499
499
|
catch (error) {
|
|
500
500
|
const axiosError = error;
|
|
501
|
-
throw new exceptions_1.FactPulseAuthError(`
|
|
501
|
+
throw new exceptions_1.FactPulseAuthError(`AFNOR OAuth2 failed: ${axiosError.message}`);
|
|
502
502
|
}
|
|
503
503
|
});
|
|
504
504
|
}
|
|
505
505
|
/**
|
|
506
|
-
*
|
|
507
|
-
* IMPORTANT:
|
|
506
|
+
* Performs a request to the AFNOR API with auth and error handling.
|
|
507
|
+
* IMPORTANT: This method uses the AFNOR OAuth token, NOT the FactPulse JWT!
|
|
508
508
|
*/
|
|
509
509
|
makeAfnorRequest(method, endpoint, options) {
|
|
510
510
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -512,7 +512,7 @@ class FactPulseClient {
|
|
|
512
512
|
// Obtenir le token AFNOR et l'URL de la PDP
|
|
513
513
|
const { token: afnorToken, pdpBaseUrl } = yield this.getAfnorTokenAndUrl();
|
|
514
514
|
const url = `${this.config.apiUrl}/api/v1/afnor${endpoint}`;
|
|
515
|
-
//
|
|
515
|
+
// ALWAYS use the AFNOR token + X-PDP-Base-URL header
|
|
516
516
|
const headers = {
|
|
517
517
|
'Authorization': `Bearer ${afnorToken}`,
|
|
518
518
|
'X-PDP-Base-URL': pdpBaseUrl,
|
|
@@ -546,7 +546,7 @@ class FactPulseClient {
|
|
|
546
546
|
const errorMsg = ((_b = (_a = axiosError.response) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.errorMessage) ||
|
|
547
547
|
((_d = (_c = axiosError.response) === null || _c === void 0 ? void 0 : _c.data) === null || _d === void 0 ? void 0 : _d.detail) ||
|
|
548
548
|
axiosError.message;
|
|
549
|
-
throw new exceptions_1.FactPulseValidationError(`
|
|
549
|
+
throw new exceptions_1.FactPulseValidationError(`AFNOR Error: ${errorMsg}`);
|
|
550
550
|
}
|
|
551
551
|
});
|
|
552
552
|
}
|
|
@@ -568,22 +568,22 @@ class FactPulseClient {
|
|
|
568
568
|
}
|
|
569
569
|
// ==================== AFNOR Flow ====================
|
|
570
570
|
/**
|
|
571
|
-
*
|
|
572
|
-
*
|
|
573
|
-
*
|
|
574
|
-
*
|
|
571
|
+
* Submits an invoice to a PDP via the AFNOR API.
|
|
572
|
+
* Authentication uses the AFNOR OAuth token (obtained automatically),
|
|
573
|
+
* either via stored credentials (stored mode), or via the afnorCredentials
|
|
574
|
+
* provided to the constructor (zero-trust mode).
|
|
575
575
|
*
|
|
576
|
-
* @param pdfBuffer Buffer
|
|
577
|
-
* @param flowName
|
|
576
|
+
* @param pdfBuffer Buffer of the Factur-X PDF to submit
|
|
577
|
+
* @param flowName Flow name (e.g.: "Invoice INV-2025-001")
|
|
578
578
|
* @param options Options: trackingId, flowSyntax (CII/UBL), flowProfile
|
|
579
579
|
*/
|
|
580
|
-
|
|
580
|
+
submitInvoiceAfnor(pdfBuffer_1, flowName_1) {
|
|
581
581
|
return __awaiter(this, arguments, void 0, function* (pdfBuffer, flowName, options = {}) {
|
|
582
582
|
const { trackingId, flowSyntax = 'CII', flowProfile = 'EN16931' } = options;
|
|
583
|
-
//
|
|
583
|
+
// Compute SHA-256
|
|
584
584
|
const crypto = require('crypto');
|
|
585
585
|
const sha256 = crypto.createHash('sha256').update(pdfBuffer).digest('hex');
|
|
586
|
-
//
|
|
586
|
+
// Prepare flowInfo
|
|
587
587
|
const flowInfo = { name: flowName, flowSyntax, flowProfile, sha256 };
|
|
588
588
|
if (trackingId)
|
|
589
589
|
flowInfo.trackingId = trackingId;
|
|
@@ -593,7 +593,7 @@ class FactPulseClient {
|
|
|
593
593
|
return this.makeAfnorRequest('POST', '/flow/v1/flows', { files: form });
|
|
594
594
|
});
|
|
595
595
|
}
|
|
596
|
-
|
|
596
|
+
searchFlowsAfnor() {
|
|
597
597
|
return __awaiter(this, arguments, void 0, function* (criteria = {}) {
|
|
598
598
|
var _a, _b;
|
|
599
599
|
const searchBody = {
|
|
@@ -608,9 +608,9 @@ class FactPulseClient {
|
|
|
608
608
|
return this.makeAfnorRequest('POST', '/flow/v1/flows/search', { data: searchBody });
|
|
609
609
|
});
|
|
610
610
|
}
|
|
611
|
-
|
|
611
|
+
downloadFlowAfnor(flowId) {
|
|
612
612
|
return __awaiter(this, void 0, void 0, function* () {
|
|
613
|
-
//
|
|
613
|
+
// For downloading, we need to handle the response type differently
|
|
614
614
|
const { token: afnorToken, pdpBaseUrl } = yield this.getAfnorTokenAndUrl();
|
|
615
615
|
const url = `${this.config.apiUrl}/api/v1/afnor/flow/v1/flows/${flowId}`;
|
|
616
616
|
const response = yield this.httpClient.get(url, {
|
|
@@ -624,27 +624,27 @@ class FactPulseClient {
|
|
|
624
624
|
});
|
|
625
625
|
}
|
|
626
626
|
/**
|
|
627
|
-
*
|
|
628
|
-
*
|
|
629
|
-
*
|
|
627
|
+
* Retrieves JSON metadata of an incoming flow (supplier invoice).
|
|
628
|
+
* Downloads an incoming flow from the AFNOR PDP and extracts invoice
|
|
629
|
+
* metadata into a unified JSON format. Supports Factur-X, CII and UBL.
|
|
630
630
|
*
|
|
631
|
-
* Note:
|
|
632
|
-
*
|
|
631
|
+
* Note: This endpoint uses FactPulse JWT authentication (not AFNOR OAuth).
|
|
632
|
+
* The FactPulse server handles calling the PDP with stored credentials.
|
|
633
633
|
*
|
|
634
|
-
* @param flowId
|
|
635
|
-
* @param includeDocument
|
|
636
|
-
* @returns
|
|
634
|
+
* @param flowId Flow identifier (UUID)
|
|
635
|
+
* @param includeDocument If true, includes the original document encoded in base64
|
|
636
|
+
* @returns Invoice metadata (supplier, amounts, dates, etc.)
|
|
637
637
|
*
|
|
638
638
|
* @example
|
|
639
|
-
* const
|
|
640
|
-
* console.log(`
|
|
641
|
-
* console.log(`
|
|
639
|
+
* const invoice = await client.getIncomingInvoiceAfnor("550e8400-...");
|
|
640
|
+
* console.log(`Supplier: ${invoice.supplier.name}`);
|
|
641
|
+
* console.log(`Total incl. tax: ${invoice.total_incl_tax} ${invoice.currency}`);
|
|
642
642
|
*/
|
|
643
|
-
|
|
643
|
+
getIncomingInvoiceAfnor(flowId_1) {
|
|
644
644
|
return __awaiter(this, arguments, void 0, function* (flowId, includeDocument = false) {
|
|
645
645
|
var _a, _b;
|
|
646
646
|
yield this.ensureAuthenticated();
|
|
647
|
-
const url = `${this.config.apiUrl}/api/v1/afnor/
|
|
647
|
+
const url = `${this.config.apiUrl}/api/v1/afnor/incoming-flows/${flowId}`;
|
|
648
648
|
const params = {};
|
|
649
649
|
if (includeDocument) {
|
|
650
650
|
params.include_document = 'true';
|
|
@@ -659,7 +659,7 @@ class FactPulseClient {
|
|
|
659
659
|
}
|
|
660
660
|
catch (error) {
|
|
661
661
|
const axiosError = error;
|
|
662
|
-
throw new exceptions_1.FactPulseValidationError(`
|
|
662
|
+
throw new exceptions_1.FactPulseValidationError(`Incoming flow error: ${((_b = (_a = axiosError.response) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.detail) || axiosError.message}`);
|
|
663
663
|
}
|
|
664
664
|
});
|
|
665
665
|
}
|
|
@@ -688,9 +688,9 @@ class FactPulseClient {
|
|
|
688
688
|
});
|
|
689
689
|
}
|
|
690
690
|
/**
|
|
691
|
-
*
|
|
692
|
-
* @param idStructureCpp
|
|
693
|
-
* @returns
|
|
691
|
+
* Lists the services of a Chorus Pro structure.
|
|
692
|
+
* @param idStructureCpp Chorus Pro ID of the structure
|
|
693
|
+
* @returns Object with listeServices, total, codeRetour, libelle
|
|
694
694
|
*/
|
|
695
695
|
listerServicesStructureChorus(idStructureCpp) {
|
|
696
696
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -709,19 +709,19 @@ class FactPulseClient {
|
|
|
709
709
|
return null;
|
|
710
710
|
});
|
|
711
711
|
}
|
|
712
|
-
|
|
712
|
+
submitInvoiceChorus(invoiceData) {
|
|
713
713
|
return __awaiter(this, void 0, void 0, function* () {
|
|
714
714
|
yield this.ensureAuthenticated();
|
|
715
|
-
const response = yield this.httpClient.post(`${this.config.apiUrl}/api/v1/chorus/factures/soumettre`,
|
|
715
|
+
const response = yield this.httpClient.post(`${this.config.apiUrl}/api/v1/chorus/factures/soumettre`, invoiceData, {
|
|
716
716
|
headers: { Authorization: `Bearer ${this.accessToken}`, 'Content-Type': 'application/json' },
|
|
717
717
|
});
|
|
718
718
|
return response.data;
|
|
719
719
|
});
|
|
720
720
|
}
|
|
721
|
-
|
|
721
|
+
lookupInvoiceChorus(invoiceIdCpp) {
|
|
722
722
|
return __awaiter(this, void 0, void 0, function* () {
|
|
723
723
|
yield this.ensureAuthenticated();
|
|
724
|
-
const response = yield this.httpClient.post(`${this.config.apiUrl}/api/v1/chorus/factures/consulter`, { identifiant_facture_cpp:
|
|
724
|
+
const response = yield this.httpClient.post(`${this.config.apiUrl}/api/v1/chorus/factures/consulter`, { identifiant_facture_cpp: invoiceIdCpp }, {
|
|
725
725
|
headers: { Authorization: `Bearer ${this.accessToken}`, 'Content-Type': 'application/json' },
|
|
726
726
|
});
|
|
727
727
|
return response.data;
|
|
@@ -729,46 +729,46 @@ class FactPulseClient {
|
|
|
729
729
|
}
|
|
730
730
|
// ==================== Validation ====================
|
|
731
731
|
/**
|
|
732
|
-
*
|
|
733
|
-
* @param pdfBuffer -
|
|
734
|
-
* @param options -
|
|
735
|
-
* @param options.
|
|
736
|
-
* @param options.useVerapdf -
|
|
732
|
+
* Validates a Factur-X PDF.
|
|
733
|
+
* @param pdfBuffer - PDF content as Buffer
|
|
734
|
+
* @param options - Validation options
|
|
735
|
+
* @param options.profile - Factur-X profile (MINIMUM, BASIC, EN16931, EXTENDED). If not specified, auto-detected.
|
|
736
|
+
* @param options.useVerapdf - Enable strict PDF/A validation with VeraPDF (default: false)
|
|
737
737
|
*/
|
|
738
|
-
|
|
738
|
+
validateFacturxPdf(pdfBuffer_1) {
|
|
739
739
|
return __awaiter(this, arguments, void 0, function* (pdfBuffer, options = {}) {
|
|
740
740
|
var _a;
|
|
741
741
|
yield this.ensureAuthenticated();
|
|
742
742
|
const form = new form_data_1.default();
|
|
743
|
-
form.append('
|
|
744
|
-
if (options.
|
|
745
|
-
form.append('
|
|
743
|
+
form.append('pdf_file', pdfBuffer, { filename: 'facture.pdf', contentType: 'application/pdf' });
|
|
744
|
+
if (options.profile) {
|
|
745
|
+
form.append('profile', options.profile);
|
|
746
746
|
}
|
|
747
747
|
form.append('use_verapdf', String((_a = options.useVerapdf) !== null && _a !== void 0 ? _a : false));
|
|
748
|
-
const response = yield this.httpClient.post(`${this.config.apiUrl}/api/v1/
|
|
748
|
+
const response = yield this.httpClient.post(`${this.config.apiUrl}/api/v1/processing/validate-facturx-pdf`, form, {
|
|
749
749
|
headers: Object.assign(Object.assign({}, form.getHeaders()), { Authorization: `Bearer ${this.accessToken}` }),
|
|
750
750
|
});
|
|
751
751
|
return response.data;
|
|
752
752
|
});
|
|
753
753
|
}
|
|
754
|
-
|
|
755
|
-
return __awaiter(this, arguments, void 0, function* (xmlContent,
|
|
754
|
+
validateFacturxXml(xmlContent_1) {
|
|
755
|
+
return __awaiter(this, arguments, void 0, function* (xmlContent, profile = 'EN16931') {
|
|
756
756
|
yield this.ensureAuthenticated();
|
|
757
757
|
const form = new form_data_1.default();
|
|
758
|
-
form.append('
|
|
759
|
-
form.append('
|
|
760
|
-
const response = yield this.httpClient.post(`${this.config.apiUrl}/api/v1/
|
|
758
|
+
form.append('xml_file', Buffer.from(xmlContent, 'utf-8'), { filename: 'facture.xml', contentType: 'application/xml' });
|
|
759
|
+
form.append('profile', profile);
|
|
760
|
+
const response = yield this.httpClient.post(`${this.config.apiUrl}/api/v1/processing/validate-xml`, form, {
|
|
761
761
|
headers: Object.assign(Object.assign({}, form.getHeaders()), { Authorization: `Bearer ${this.accessToken}` }),
|
|
762
762
|
});
|
|
763
763
|
return response.data;
|
|
764
764
|
});
|
|
765
765
|
}
|
|
766
|
-
|
|
766
|
+
validatePdfSignature(pdfBuffer) {
|
|
767
767
|
return __awaiter(this, void 0, void 0, function* () {
|
|
768
768
|
yield this.ensureAuthenticated();
|
|
769
769
|
const form = new form_data_1.default();
|
|
770
|
-
form.append('
|
|
771
|
-
const response = yield this.httpClient.post(`${this.config.apiUrl}/api/v1/
|
|
770
|
+
form.append('pdf_file', pdfBuffer, { filename: 'document.pdf', contentType: 'application/pdf' });
|
|
771
|
+
const response = yield this.httpClient.post(`${this.config.apiUrl}/api/v1/processing/validate-pdf-signature`, form, {
|
|
772
772
|
headers: Object.assign(Object.assign({}, form.getHeaders()), { Authorization: `Bearer ${this.accessToken}` }),
|
|
773
773
|
});
|
|
774
774
|
return response.data;
|
|
@@ -776,48 +776,48 @@ class FactPulseClient {
|
|
|
776
776
|
}
|
|
777
777
|
// ==================== Signature ====================
|
|
778
778
|
/**
|
|
779
|
-
*
|
|
780
|
-
*
|
|
779
|
+
* Signs a PDF with the server-configured certificate (via JWT client_uid).
|
|
780
|
+
* The certificate must be previously configured in Django Admin.
|
|
781
781
|
*/
|
|
782
|
-
|
|
782
|
+
signPdf(pdfBuffer_1) {
|
|
783
783
|
return __awaiter(this, arguments, void 0, function* (pdfBuffer, options = {}) {
|
|
784
784
|
yield this.ensureAuthenticated();
|
|
785
785
|
const form = new form_data_1.default();
|
|
786
|
-
form.append('
|
|
787
|
-
if (options.
|
|
788
|
-
form.append('
|
|
789
|
-
if (options.
|
|
790
|
-
form.append('
|
|
786
|
+
form.append('pdf_file', pdfBuffer, { filename: 'document.pdf', contentType: 'application/pdf' });
|
|
787
|
+
if (options.reason)
|
|
788
|
+
form.append('reason', options.reason);
|
|
789
|
+
if (options.location)
|
|
790
|
+
form.append('location', options.location);
|
|
791
791
|
if (options.contact)
|
|
792
792
|
form.append('contact', options.contact);
|
|
793
793
|
if (options.usePadesLt !== undefined)
|
|
794
794
|
form.append('use_pades_lt', String(options.usePadesLt));
|
|
795
795
|
if (options.useTimestamp !== undefined)
|
|
796
796
|
form.append('use_timestamp', String(options.useTimestamp));
|
|
797
|
-
const response = yield this.httpClient.post(`${this.config.apiUrl}/api/v1/
|
|
797
|
+
const response = yield this.httpClient.post(`${this.config.apiUrl}/api/v1/processing/sign-pdf`, form, {
|
|
798
798
|
headers: Object.assign(Object.assign({}, form.getHeaders()), { Authorization: `Bearer ${this.accessToken}` }),
|
|
799
799
|
});
|
|
800
|
-
//
|
|
800
|
+
// The API returns JSON with pdf_signe_base64
|
|
801
801
|
const data = response.data;
|
|
802
802
|
if (data.pdf_signe_base64) {
|
|
803
803
|
return Buffer.from(data.pdf_signe_base64, 'base64');
|
|
804
804
|
}
|
|
805
|
-
throw new Error('
|
|
805
|
+
throw new Error('Invalid signature response');
|
|
806
806
|
});
|
|
807
807
|
}
|
|
808
808
|
/**
|
|
809
|
-
*
|
|
810
|
-
*
|
|
809
|
+
* Generates a test certificate (NOT FOR PRODUCTION).
|
|
810
|
+
* The certificate must then be configured in Django Admin.
|
|
811
811
|
*/
|
|
812
|
-
|
|
812
|
+
generateTestCertificate() {
|
|
813
813
|
return __awaiter(this, arguments, void 0, function* (options = {}) {
|
|
814
814
|
yield this.ensureAuthenticated();
|
|
815
|
-
const response = yield this.httpClient.post(`${this.config.apiUrl}/api/v1/
|
|
815
|
+
const response = yield this.httpClient.post(`${this.config.apiUrl}/api/v1/processing/generate-test-certificate`, {
|
|
816
816
|
cn: options.cn || 'Test Organisation',
|
|
817
817
|
organisation: options.organisation || 'Test Organisation',
|
|
818
818
|
email: options.email || 'test@example.com',
|
|
819
|
-
|
|
820
|
-
|
|
819
|
+
validity_days: options.validityDays || 365,
|
|
820
|
+
key_size: options.keySize || 2048,
|
|
821
821
|
}, {
|
|
822
822
|
headers: { Authorization: `Bearer ${this.accessToken}`, 'Content-Type': 'application/json' },
|
|
823
823
|
});
|
|
@@ -826,37 +826,37 @@ class FactPulseClient {
|
|
|
826
826
|
}
|
|
827
827
|
// ==================== Workflow complet ====================
|
|
828
828
|
/**
|
|
829
|
-
*
|
|
830
|
-
* Note:
|
|
831
|
-
* @param
|
|
832
|
-
* @param pdfPath
|
|
833
|
-
* @param options
|
|
834
|
-
* @returns
|
|
829
|
+
* Complete workflow: generation + validation + signature + AFNOR submission.
|
|
830
|
+
* Note: Signature uses the server-configured certificate (via JWT client_uid).
|
|
831
|
+
* @param invoiceData Invoice data
|
|
832
|
+
* @param pdfPath Path to the source PDF
|
|
833
|
+
* @param options Workflow options
|
|
834
|
+
* @returns Result with pdfBuffer, validation, signature and afnor
|
|
835
835
|
*/
|
|
836
|
-
|
|
837
|
-
return __awaiter(this, arguments, void 0, function* (
|
|
838
|
-
const {
|
|
836
|
+
generateCompleteFacturx(invoiceData_1, pdfPath_1) {
|
|
837
|
+
return __awaiter(this, arguments, void 0, function* (invoiceData, pdfPath, options = {}) {
|
|
838
|
+
const { profile = 'EN16931', validate = true, sign = false, submitAfnor = false, afnorFlowName, afnorTrackingId, timeout, } = options;
|
|
839
839
|
const result = { pdfBuffer: Buffer.alloc(0) };
|
|
840
|
-
// 1.
|
|
841
|
-
const pdfBuffer = yield this.
|
|
840
|
+
// 1. Generation
|
|
841
|
+
const pdfBuffer = yield this.generateFacturx(invoiceData, pdfPath, profile, 'pdf', true, timeout);
|
|
842
842
|
result.pdfBuffer = pdfBuffer;
|
|
843
843
|
// 2. Validation
|
|
844
|
-
if (
|
|
845
|
-
const validation = yield this.
|
|
844
|
+
if (validate) {
|
|
845
|
+
const validation = yield this.validateFacturxPdf(pdfBuffer, { profile });
|
|
846
846
|
result.validation = validation;
|
|
847
847
|
}
|
|
848
|
-
// 3. Signature (
|
|
849
|
-
if (
|
|
850
|
-
const signedPdf = yield this.
|
|
848
|
+
// 3. Signature (uses the server-configured certificate)
|
|
849
|
+
if (sign) {
|
|
850
|
+
const signedPdf = yield this.signPdf(result.pdfBuffer);
|
|
851
851
|
result.pdfBuffer = signedPdf;
|
|
852
|
-
result.signature = {
|
|
852
|
+
result.signature = { signed: true };
|
|
853
853
|
}
|
|
854
|
-
// 4.
|
|
855
|
-
if (
|
|
856
|
-
const
|
|
857
|
-
const flowName = afnorFlowName || `
|
|
858
|
-
const trackingId = afnorTrackingId ||
|
|
859
|
-
const afnorResult = yield this.
|
|
854
|
+
// 4. AFNOR submission
|
|
855
|
+
if (submitAfnor) {
|
|
856
|
+
const invoiceNumber = (invoiceData.invoiceNumber || invoiceData.invoice_number || 'INVOICE');
|
|
857
|
+
const flowName = afnorFlowName || `Invoice ${invoiceNumber}`;
|
|
858
|
+
const trackingId = afnorTrackingId || invoiceNumber;
|
|
859
|
+
const afnorResult = yield this.submitInvoiceAfnor(result.pdfBuffer, flowName, { trackingId });
|
|
860
860
|
result.afnor = afnorResult;
|
|
861
861
|
}
|
|
862
862
|
return result;
|