@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
|
@@ -0,0 +1,1000 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* FactPulse REST API
|
|
5
|
+
* REST API for electronic invoicing in France: Factur-X, AFNOR PDP/PA, electronic signatures. ## 🎯 Main Features ### 📄 Factur-X Invoice Generation - **Formats**: XML only or PDF/A-3 with embedded XML - **Profiles**: MINIMUM, BASIC, EN16931, EXTENDED - **Standards**: EN 16931 (EU directive 2014/55), ISO 19005-3 (PDF/A-3), CII (UN/CEFACT) - **🆕 Simplified Format**: Generation from SIRET + auto-enrichment (Chorus Pro API + Business Search) ### ✅ Validation and Compliance - **XML Validation**: Schematron (45 to 210+ rules depending on profile) - **PDF Validation**: PDF/A-3, Factur-X XMP metadata, electronic signatures - **VeraPDF**: Strict PDF/A validation (146+ ISO 19005-3 rules) - **Asynchronous Processing**: Celery support for heavy validations (VeraPDF) ### 📡 AFNOR PDP/PA Integration (XP Z12-013) - **Flow Submission**: Send invoices to Partner Dematerialization Platforms - **Flow Search**: View submitted invoices - **Download**: Retrieve PDF/A-3 with XML - **Directory Service**: Company search (SIREN/SIRET) - **Multi-client**: Support for multiple PDP configs per user (stored credentials or zero-storage) ### ✍️ PDF Electronic Signature - **Standards**: PAdES-B-B, PAdES-B-T (RFC 3161 timestamping), PAdES-B-LT (long-term archival) - **eIDAS Levels**: SES (self-signed), AdES (commercial CA), QES (QTSP) - **Validation**: Cryptographic integrity and certificate verification - **Certificate Generation**: Self-signed X.509 certificates for testing ### 🔄 Asynchronous Processing - **Celery**: Asynchronous generation, validation and signing - **Polling**: Status tracking via `/tasks/{task_id}/status` - **No timeout**: Ideal for large files or heavy validations ## 🔒 Authentication All requests require a **JWT token** in the Authorization header: ``` Authorization: Bearer YOUR_JWT_TOKEN ``` ### How to obtain a JWT token? #### 🔑 Method 1: `/api/token/` API (Recommended) **URL:** `https://www.factpulse.fr/api/token/` This method is **recommended** for integration in your applications and CI/CD workflows. **Prerequisites:** Having set a password on your account **For users registered via email/password:** - You already have a password, use it directly **For users registered via OAuth (Google/GitHub):** - You must first set a password at: https://www.factpulse.fr/accounts/password/set/ - Once the password is created, you can use the API **Request example:** ```bash curl -X POST https://www.factpulse.fr/api/token/ \\ -H \"Content-Type: application/json\" \\ -d \'{ \"username\": \"your_email@example.com\", \"password\": \"your_password\" }\' ``` **Optional `client_uid` parameter:** To select credentials for a specific client (PA/PDP, Chorus Pro, signing certificates), add `client_uid`: ```bash curl -X POST https://www.factpulse.fr/api/token/ \\ -H \"Content-Type: application/json\" \\ -d \'{ \"username\": \"your_email@example.com\", \"password\": \"your_password\", \"client_uid\": \"550e8400-e29b-41d4-a716-446655440000\" }\' ``` The `client_uid` will be included in the JWT and allow the API to automatically use: - AFNOR/PDP credentials configured for this client - Chorus Pro credentials configured for this client - Electronic signature certificates configured for this client **Response:** ```json { \"access\": \"eyJ0eXAiOiJKV1QiLCJhbGc...\", // Access token (validity: 30 min) \"refresh\": \"eyJ0eXAiOiJKV1QiLCJhbGc...\" // Refresh token (validity: 7 days) } ``` **Advantages:** - ✅ Full automation (CI/CD, scripts) - ✅ Programmatic token management - ✅ Refresh token support for automatic access renewal - ✅ Easy integration in any language/tool #### 🖥️ Method 2: Dashboard Generation (Alternative) **URL:** https://www.factpulse.fr/dashboard/ This method is suitable for quick tests or occasional use via the graphical interface. **How it works:** - Log in to the dashboard - Use the \"Generate Test Token\" or \"Generate Production Token\" buttons - Works for **all** users (OAuth and email/password), without requiring a password **Token types:** - **Test Token**: 24h validity, 1000 calls/day quota (free) - **Production Token**: 7 days validity, quota based on your plan **Advantages:** - ✅ Quick for API testing - ✅ No password required - ✅ Simple visual interface **Disadvantages:** - ❌ Requires manual action - ❌ No refresh token - ❌ Less suited for automation ### 📚 Full Documentation For more information on authentication and API usage: https://www.factpulse.fr/documentation-api/
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
15
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
16
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
17
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
18
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
19
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
20
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
import globalAxios from 'axios';
|
|
24
|
+
// Some imports not used depending on template conditions
|
|
25
|
+
// @ts-ignore
|
|
26
|
+
import { DUMMY_BASE_URL, assertParamExists, setBearerAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
|
|
27
|
+
// @ts-ignore
|
|
28
|
+
import { BASE_PATH, BaseAPI, operationServerMap } from '../base';
|
|
29
|
+
/**
|
|
30
|
+
* InvoiceProcessingApi - axios parameter creator
|
|
31
|
+
*/
|
|
32
|
+
export const InvoiceProcessingApiAxiosParamCreator = function (configuration) {
|
|
33
|
+
return {
|
|
34
|
+
/**
|
|
35
|
+
* Generates an electronic invoice in Factur-X format compliant with European standards. ## Applied Standards - **Factur-X** (France): FNFE-MPE standard (Forum National de la Facture Électronique) - **ZUGFeRD** (Germany): German format compatible with Factur-X - **EN 16931**: European semantic standard for electronic invoicing - **ISO 19005-3** (PDF/A-3): Long-term electronic archiving - **Cross Industry Invoice (CII)**: UN/CEFACT XML syntax ## 🆕 New: Simplified format with auto-enrichment (P0.1) You can now create an invoice by providing only: - An invoice number - A sender SIRET + **IBAN** (required) - A recipient SIRET - Invoice lines (description, quantity, net price) **Simplified format example**: ```json { \"number\": \"FACT-2025-001\", \"sender\": { \"siret\": \"92019522900017\", \"iban\": \"FR7630001007941234567890185\" }, \"recipient\": {\"siret\": \"35600000000048\"}, \"lines\": [ {\"description\": \"Service\", \"quantity\": 10, \"unitPrice\": 100.00, \"vatRate\": 20.0} ] } ``` **⚠️ Required fields (simplified format)**: - `number`: Unique invoice number - `sender.siret`: Sender\'s SIRET (14 digits) - `sender.iban`: Bank account IBAN (no public API to retrieve it) - `recipient.siret`: Recipient\'s SIRET - `lines[]`: At least one invoice line **What happens automatically with `auto_enrich=True`**: - ✅ Name enrichment from Chorus Pro API - ✅ Address enrichment from Business Search API (free, public) - ✅ Automatic intra-EU VAT calculation (FR + key + SIREN) - ✅ Chorus Pro ID retrieval for electronic invoicing - ✅ Net/VAT/Gross totals calculation - ✅ Date generation (today + 30-day due date) - ✅ Multi-rate VAT handling **Supported identifiers**: - SIRET (14 digits): Specific establishment ⭐ Recommended - SIREN (9 digits): Company (auto-selection of headquarters) - Special types: UE_HORS_FRANCE, RIDET, TAHITI, etc. ## Checks performed during generation ### 1. Data validation (Pydantic) - Data types (amounts as Decimal, ISO 8601 dates) - Formats (14-digit SIRET, 9-digit SIREN, IBAN) - Required fields per profile - Amount consistency (Net + VAT = Gross) ### 2. CII-compliant XML generation - Serialization according to Cross Industry Invoice XSD schema - Correct UN/CEFACT namespaces - Hierarchical structure respected - UTF-8 encoding without BOM ### 3. Schematron validation - Business rules for selected profile (MINIMUM, BASIC, EN16931, EXTENDED) - Element cardinality (required, optional, repeatable) - Calculation rules (totals, VAT, discounts) - European EN 16931 compliance ### 4. PDF/A-3 conversion (if output_format=\'pdf\') - Source PDF conversion to PDF/A-3 via Ghostscript - Factur-X XML embedding in PDF - Compliant XMP metadata - ICC sRGB color profile - Removal of forbidden elements (JavaScript, forms) ## How it works 1. **Submission**: Invoice is queued in Celery for asynchronous processing 2. **Immediate return**: You receive a `task_id` (HTTP 202 Accepted) 3. **Tracking**: Use the `/tasks/{task_id}/status` endpoint to track progress ## Output formats - **xml**: Generates only Factur-X XML (recommended for testing) - **pdf**: Generates PDF/A-3 with embedded XML (requires `source_pdf`) ## Factur-X profiles - **MINIMUM**: Minimal data (simplified invoice) - **BASIC**: Basic information (SMEs) - **EN16931**: European standard (recommended, compliant with directive 2014/55/EU) - **EXTENDED**: All available data (large accounts) ## What you get After successful processing (status `completed`): - **XML only**: Base64-encoded Factur-X compliant XML file - **PDF/A-3**: PDF with embedded XML, ready for sending/archiving - **Metadata**: Profile, Factur-X version, file size - **Validation**: Schematron compliance confirmation ## Validation Data is automatically validated according to detected format. On error, a 422 status is returned with invalid field details.
|
|
36
|
+
* @summary Generate a Factur-X invoice
|
|
37
|
+
* @param {string} invoiceData Invoice data in JSON format. Two formats accepted: 1. **Classic format**: Complete FactureFacturX structure (all fields) 2. **Simplified format** (🆕 P0.1): Minimal structure with auto-enrichment Format is detected automatically!
|
|
38
|
+
* @param {APIProfile} [profile] Factur-X profile: MINIMUM, BASIC, EN16931 or EXTENDED.
|
|
39
|
+
* @param {OutputFormat} [outputFormat] Output format: \\\'xml\\\' (XML only) or \\\'pdf\\\' (Factur-X PDF with embedded XML).
|
|
40
|
+
* @param {boolean} [autoEnrich] 🆕 Enable auto-enrichment from SIRET/SIREN (simplified format only)
|
|
41
|
+
* @param {File | null} [sourcePdf]
|
|
42
|
+
* @param {*} [options] Override http request option.
|
|
43
|
+
* @throws {RequiredError}
|
|
44
|
+
*/
|
|
45
|
+
generateInvoiceApiV1ProcessingGenerateInvoicePost: (invoiceData_1, profile_1, outputFormat_1, autoEnrich_1, sourcePdf_1, ...args_1) => __awaiter(this, [invoiceData_1, profile_1, outputFormat_1, autoEnrich_1, sourcePdf_1, ...args_1], void 0, function* (invoiceData, profile, outputFormat, autoEnrich, sourcePdf, options = {}) {
|
|
46
|
+
// verify required parameter 'invoiceData' is not null or undefined
|
|
47
|
+
assertParamExists('generateInvoiceApiV1ProcessingGenerateInvoicePost', 'invoiceData', invoiceData);
|
|
48
|
+
const localVarPath = `/api/v1/processing/generate-invoice`;
|
|
49
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
50
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
51
|
+
let baseOptions;
|
|
52
|
+
if (configuration) {
|
|
53
|
+
baseOptions = configuration.baseOptions;
|
|
54
|
+
}
|
|
55
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
56
|
+
const localVarHeaderParameter = {};
|
|
57
|
+
const localVarQueryParameter = {};
|
|
58
|
+
const localVarFormParams = new ((configuration && configuration.formDataCtor) || FormData)();
|
|
59
|
+
// authentication HTTPBearer required
|
|
60
|
+
// http bearer authentication required
|
|
61
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
62
|
+
if (invoiceData !== undefined) {
|
|
63
|
+
localVarFormParams.append('invoice_data', invoiceData);
|
|
64
|
+
}
|
|
65
|
+
if (profile !== undefined) {
|
|
66
|
+
localVarFormParams.append('profile', profile);
|
|
67
|
+
}
|
|
68
|
+
if (outputFormat !== undefined) {
|
|
69
|
+
localVarFormParams.append('output_format', outputFormat);
|
|
70
|
+
}
|
|
71
|
+
if (autoEnrich !== undefined) {
|
|
72
|
+
localVarFormParams.append('auto_enrich', String(autoEnrich));
|
|
73
|
+
}
|
|
74
|
+
if (sourcePdf !== undefined) {
|
|
75
|
+
localVarFormParams.append('source_pdf', sourcePdf);
|
|
76
|
+
}
|
|
77
|
+
localVarHeaderParameter['Content-Type'] = 'multipart/form-data';
|
|
78
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
79
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
80
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
81
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
82
|
+
localVarRequestOptions.data = localVarFormParams;
|
|
83
|
+
return {
|
|
84
|
+
url: toPathString(localVarUrlObj),
|
|
85
|
+
options: localVarRequestOptions,
|
|
86
|
+
};
|
|
87
|
+
}),
|
|
88
|
+
/**
|
|
89
|
+
* Generates a self-signed X.509 certificate for PDF electronic signature testing. **⚠️ WARNING: TEST certificate only!** This certificate is: - ✅ Suitable for testing and development - ✅ Compatible with PDF signing (PAdES) - ✅ Compliant with eIDAS **SES** level (Simple Electronic Signature) - ❌ **NEVER usable in production** - ❌ **Not recognized** by browsers and PDF readers - ❌ **No legal value** ## eIDAS levels - **SES** (Simple): Self-signed certificate ← Generated by this endpoint - **AdES** (Advanced): Commercial CA certificate (Let\'s Encrypt, etc.) - **QES** (Qualified): Qualified certificate from QTSP (CertEurope, Universign, etc.) ## Usage Once generated, the certificate can be: 1. **Saved in Django** (recommended): - Django Admin > Signing Certificates - Upload `certificate_pem` and `private_key_pem` 2. **Used directly**: - Sign a PDF with `/sign-pdf` - The certificate will be automatically used ## Example call ```bash curl -X POST \"https://www.factpulse.fr/api/v1/processing/generate-test-certificate\" \\ -H \"Authorization: Bearer eyJ0eXAi...\" \\ -H \"Content-Type: application/json\" \\ -d \'{ \"cn\": \"Test Client XYZ\", \"organization\": \"Client XYZ Ltd\", \"email\": \"contact@xyz.com\", \"validity_days\": 365 }\' ``` ## Use cases - PDF signature testing in development - Electronic signature POC - Training and demos - Automated integration tests ## Technical compliance Certificate generated with: - RSA key 2048 or 4096 bits - SHA-256 algorithm - Key Usage extensions: `digitalSignature`, `contentCommitment` (non-repudiation) - Extended Key Usage extensions: `codeSigning`, `emailProtection` - Validity: 1 day to 10 years (configurable) - Format: PEM (certificate and key) - Optional: PKCS#12 (.p12)
|
|
90
|
+
* @summary Generate a self-signed X.509 test certificate
|
|
91
|
+
* @param {GenerateCertificateRequest} generateCertificateRequest
|
|
92
|
+
* @param {*} [options] Override http request option.
|
|
93
|
+
* @throws {RequiredError}
|
|
94
|
+
*/
|
|
95
|
+
generateTestCertificateApiV1ProcessingGenerateTestCertificatePost: (generateCertificateRequest_1, ...args_1) => __awaiter(this, [generateCertificateRequest_1, ...args_1], void 0, function* (generateCertificateRequest, options = {}) {
|
|
96
|
+
// verify required parameter 'generateCertificateRequest' is not null or undefined
|
|
97
|
+
assertParamExists('generateTestCertificateApiV1ProcessingGenerateTestCertificatePost', 'generateCertificateRequest', generateCertificateRequest);
|
|
98
|
+
const localVarPath = `/api/v1/processing/generate-test-certificate`;
|
|
99
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
100
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
101
|
+
let baseOptions;
|
|
102
|
+
if (configuration) {
|
|
103
|
+
baseOptions = configuration.baseOptions;
|
|
104
|
+
}
|
|
105
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
106
|
+
const localVarHeaderParameter = {};
|
|
107
|
+
const localVarQueryParameter = {};
|
|
108
|
+
// authentication HTTPBearer required
|
|
109
|
+
// http bearer authentication required
|
|
110
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
111
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
112
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
113
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
114
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
115
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
116
|
+
localVarRequestOptions.data = serializeDataIfNeeded(generateCertificateRequest, localVarRequestOptions, configuration);
|
|
117
|
+
return {
|
|
118
|
+
url: toPathString(localVarUrlObj),
|
|
119
|
+
options: localVarRequestOptions,
|
|
120
|
+
};
|
|
121
|
+
}),
|
|
122
|
+
/**
|
|
123
|
+
* Retrieves the progress status of an invoice generation task. ## Possible states The `status` field uses the `CeleryStatus` enum with values: - **PENDING, STARTED, SUCCESS, FAILURE, RETRY** See the `CeleryStatus` schema documentation for details. ## Business result When `status=\"SUCCESS\"`, the `result` field contains: - `status`: \"SUCCESS\" or \"ERROR\" (business result) - `content_b64`: Base64 encoded content (if success) - `errorCode`, `errorMessage`, `details`: AFNOR format (if business error) ## Usage Poll this endpoint every 2-3 seconds until `status` is `SUCCESS` or `FAILURE`.
|
|
124
|
+
* @summary Get task generation status
|
|
125
|
+
* @param {string} taskId
|
|
126
|
+
* @param {*} [options] Override http request option.
|
|
127
|
+
* @throws {RequiredError}
|
|
128
|
+
*/
|
|
129
|
+
getTaskStatusApiV1ProcessingTasksTaskIdStatusGet: (taskId_1, ...args_1) => __awaiter(this, [taskId_1, ...args_1], void 0, function* (taskId, options = {}) {
|
|
130
|
+
// verify required parameter 'taskId' is not null or undefined
|
|
131
|
+
assertParamExists('getTaskStatusApiV1ProcessingTasksTaskIdStatusGet', 'taskId', taskId);
|
|
132
|
+
const localVarPath = `/api/v1/processing/tasks/{task_id}/status`
|
|
133
|
+
.replace(`{${"task_id"}}`, encodeURIComponent(String(taskId)));
|
|
134
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
135
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
136
|
+
let baseOptions;
|
|
137
|
+
if (configuration) {
|
|
138
|
+
baseOptions = configuration.baseOptions;
|
|
139
|
+
}
|
|
140
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
141
|
+
const localVarHeaderParameter = {};
|
|
142
|
+
const localVarQueryParameter = {};
|
|
143
|
+
// authentication HTTPBearer required
|
|
144
|
+
// http bearer authentication required
|
|
145
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
146
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
147
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
148
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
149
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
150
|
+
return {
|
|
151
|
+
url: toPathString(localVarUrlObj),
|
|
152
|
+
options: localVarRequestOptions,
|
|
153
|
+
};
|
|
154
|
+
}),
|
|
155
|
+
/**
|
|
156
|
+
* Signs an uploaded PDF with the electronic certificate configured for the client (via client_uid from JWT). **Supported standards**: PAdES-B-B, PAdES-B-T (timestamping), PAdES-B-LT (long-term archiving). **eIDAS levels**: SES (self-signed), AdES (commercial CA), QES (PSCO - out of scope). **Security**: Double authentication X-Internal-Secret + JWT Bearer to retrieve the certificate. **⚠️ Legal disclaimer**: Generated signatures are electronic seals as defined by the eIDAS regulation. The level of legal validity depends on the certificate used (SES/AdES/QES). FactPulse does not provide QES qualified certificates - you must obtain a certificate from a PSCO (qualified Trust Service Provider) for maximum legal validity.
|
|
157
|
+
* @summary Sign a PDF with client\'s certificate (PAdES-B-LT)
|
|
158
|
+
* @param {File} pdfFile PDF file to sign (will be processed and returned signed in base64)
|
|
159
|
+
* @param {string | null} [reason]
|
|
160
|
+
* @param {string | null} [location]
|
|
161
|
+
* @param {string | null} [contact]
|
|
162
|
+
* @param {string} [fieldName] PDF signature field name
|
|
163
|
+
* @param {boolean} [usePadesLt] Enable PAdES-B-LT (long-term archiving with embedded validation data). REQUIRES a certificate with OCSP/CRL access.
|
|
164
|
+
* @param {boolean} [useTimestamp] Enable RFC 3161 timestamping with FreeTSA (PAdES-B-T)
|
|
165
|
+
* @param {*} [options] Override http request option.
|
|
166
|
+
* @throws {RequiredError}
|
|
167
|
+
*/
|
|
168
|
+
signPdfApiV1ProcessingSignPdfPost: (pdfFile_1, reason_1, location_1, contact_1, fieldName_1, usePadesLt_1, useTimestamp_1, ...args_1) => __awaiter(this, [pdfFile_1, reason_1, location_1, contact_1, fieldName_1, usePadesLt_1, useTimestamp_1, ...args_1], void 0, function* (pdfFile, reason, location, contact, fieldName, usePadesLt, useTimestamp, options = {}) {
|
|
169
|
+
// verify required parameter 'pdfFile' is not null or undefined
|
|
170
|
+
assertParamExists('signPdfApiV1ProcessingSignPdfPost', 'pdfFile', pdfFile);
|
|
171
|
+
const localVarPath = `/api/v1/processing/sign-pdf`;
|
|
172
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
173
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
174
|
+
let baseOptions;
|
|
175
|
+
if (configuration) {
|
|
176
|
+
baseOptions = configuration.baseOptions;
|
|
177
|
+
}
|
|
178
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
179
|
+
const localVarHeaderParameter = {};
|
|
180
|
+
const localVarQueryParameter = {};
|
|
181
|
+
const localVarFormParams = new ((configuration && configuration.formDataCtor) || FormData)();
|
|
182
|
+
// authentication HTTPBearer required
|
|
183
|
+
// http bearer authentication required
|
|
184
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
185
|
+
if (pdfFile !== undefined) {
|
|
186
|
+
localVarFormParams.append('pdf_file', pdfFile);
|
|
187
|
+
}
|
|
188
|
+
if (reason !== undefined) {
|
|
189
|
+
localVarFormParams.append('reason', reason);
|
|
190
|
+
}
|
|
191
|
+
if (location !== undefined) {
|
|
192
|
+
localVarFormParams.append('location', location);
|
|
193
|
+
}
|
|
194
|
+
if (contact !== undefined) {
|
|
195
|
+
localVarFormParams.append('contact', contact);
|
|
196
|
+
}
|
|
197
|
+
if (fieldName !== undefined) {
|
|
198
|
+
localVarFormParams.append('field_name', fieldName);
|
|
199
|
+
}
|
|
200
|
+
if (usePadesLt !== undefined) {
|
|
201
|
+
localVarFormParams.append('use_pades_lt', String(usePadesLt));
|
|
202
|
+
}
|
|
203
|
+
if (useTimestamp !== undefined) {
|
|
204
|
+
localVarFormParams.append('use_timestamp', String(useTimestamp));
|
|
205
|
+
}
|
|
206
|
+
localVarHeaderParameter['Content-Type'] = 'multipart/form-data';
|
|
207
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
208
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
209
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
210
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
211
|
+
localVarRequestOptions.data = localVarFormParams;
|
|
212
|
+
return {
|
|
213
|
+
url: toPathString(localVarUrlObj),
|
|
214
|
+
options: localVarRequestOptions,
|
|
215
|
+
};
|
|
216
|
+
}),
|
|
217
|
+
/**
|
|
218
|
+
* Signs an uploaded PDF asynchronously via a Celery task. **Difference with /sign-pdf**: - `/sign-pdf`: Synchronous signature (blocking until completion) - `/sign-pdf-async`: Asynchronous signature (returns immediately with task_id) **Async advantages**: - No timeout for large files - No blocking of FastAPI worker - Progress tracking via task_id - Ideal for batch processing **Supported standards**: PAdES-B-B, PAdES-B-T (timestamping), PAdES-B-LT (long-term archiving). **⚠️ Legal disclaimer**: Same as /sign-pdf (see that endpoint\'s documentation).
|
|
219
|
+
* @summary Sign a PDF asynchronously (Celery)
|
|
220
|
+
* @param {File} pdfFile PDF file to sign (processed asynchronously)
|
|
221
|
+
* @param {string | null} [reason]
|
|
222
|
+
* @param {string | null} [location]
|
|
223
|
+
* @param {string | null} [contact]
|
|
224
|
+
* @param {string} [fieldName] PDF signature field name
|
|
225
|
+
* @param {boolean} [usePadesLt] Enable PAdES-B-LT (long-term archiving with embedded validation data). REQUIRES a certificate with OCSP/CRL access.
|
|
226
|
+
* @param {boolean} [useTimestamp] Enable RFC 3161 timestamping with FreeTSA (PAdES-B-T)
|
|
227
|
+
* @param {*} [options] Override http request option.
|
|
228
|
+
* @throws {RequiredError}
|
|
229
|
+
*/
|
|
230
|
+
signPdfAsyncApiV1ProcessingSignPdfAsyncPost: (pdfFile_1, reason_1, location_1, contact_1, fieldName_1, usePadesLt_1, useTimestamp_1, ...args_1) => __awaiter(this, [pdfFile_1, reason_1, location_1, contact_1, fieldName_1, usePadesLt_1, useTimestamp_1, ...args_1], void 0, function* (pdfFile, reason, location, contact, fieldName, usePadesLt, useTimestamp, options = {}) {
|
|
231
|
+
// verify required parameter 'pdfFile' is not null or undefined
|
|
232
|
+
assertParamExists('signPdfAsyncApiV1ProcessingSignPdfAsyncPost', 'pdfFile', pdfFile);
|
|
233
|
+
const localVarPath = `/api/v1/processing/sign-pdf-async`;
|
|
234
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
235
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
236
|
+
let baseOptions;
|
|
237
|
+
if (configuration) {
|
|
238
|
+
baseOptions = configuration.baseOptions;
|
|
239
|
+
}
|
|
240
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
241
|
+
const localVarHeaderParameter = {};
|
|
242
|
+
const localVarQueryParameter = {};
|
|
243
|
+
const localVarFormParams = new ((configuration && configuration.formDataCtor) || FormData)();
|
|
244
|
+
// authentication HTTPBearer required
|
|
245
|
+
// http bearer authentication required
|
|
246
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
247
|
+
if (pdfFile !== undefined) {
|
|
248
|
+
localVarFormParams.append('pdf_file', pdfFile);
|
|
249
|
+
}
|
|
250
|
+
if (reason !== undefined) {
|
|
251
|
+
localVarFormParams.append('reason', reason);
|
|
252
|
+
}
|
|
253
|
+
if (location !== undefined) {
|
|
254
|
+
localVarFormParams.append('location', location);
|
|
255
|
+
}
|
|
256
|
+
if (contact !== undefined) {
|
|
257
|
+
localVarFormParams.append('contact', contact);
|
|
258
|
+
}
|
|
259
|
+
if (fieldName !== undefined) {
|
|
260
|
+
localVarFormParams.append('field_name', fieldName);
|
|
261
|
+
}
|
|
262
|
+
if (usePadesLt !== undefined) {
|
|
263
|
+
localVarFormParams.append('use_pades_lt', String(usePadesLt));
|
|
264
|
+
}
|
|
265
|
+
if (useTimestamp !== undefined) {
|
|
266
|
+
localVarFormParams.append('use_timestamp', String(useTimestamp));
|
|
267
|
+
}
|
|
268
|
+
localVarHeaderParameter['Content-Type'] = 'multipart/form-data';
|
|
269
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
270
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
271
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
272
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
273
|
+
localVarRequestOptions.data = localVarFormParams;
|
|
274
|
+
return {
|
|
275
|
+
url: toPathString(localVarUrlObj),
|
|
276
|
+
options: localVarRequestOptions,
|
|
277
|
+
};
|
|
278
|
+
}),
|
|
279
|
+
/**
|
|
280
|
+
* Unified endpoint to submit a complete invoice to different destinations. **Automated workflow:** 1. **Auto-enrichment** (optional): retrieves data via public APIs and Chorus Pro/AFNOR 2. **Factur-X PDF generation**: creates a PDF/A-3 with embedded XML 3. **Electronic signature** (optional): signs the PDF with a certificate 4. **Submission**: sends to the chosen destination (Chorus Pro or AFNOR PDP) **Supported destinations:** - **Chorus Pro**: French B2G platform (invoices to public sector) - **AFNOR PDP**: Partner Dematerialization Platforms **Destination credentials - 2 modes available:** **Mode 1 - Retrieval via JWT (recommended):** - Credentials are retrieved automatically via the JWT `client_uid` - Do not provide the `credentials` field in `destination` - Zero-trust architecture: no secrets in the payload - Example: `\"destination\": {\"type\": \"chorus_pro\"}` **Mode 2 - Credentials in the payload:** - Provide credentials directly in the payload - Useful for tests or third-party integrations - Example: `\"destination\": {\"type\": \"chorus_pro\", \"credentials\": {...}}` **Electronic signature (optional) - 2 modes available:** **Mode 1 - Stored certificate (recommended):** - Certificate is retrieved automatically via the JWT `client_uid` - No key to provide in the payload - PAdES-B-LT signature with timestamp (eIDAS compliant) - Example: `\"signature\": {\"reason\": \"Factur-X compliance\"}` **Mode 2 - Keys in the payload (for tests):** - Provide `key_pem` and `cert_pem` directly - PEM format accepted: raw or base64 - Useful for tests or special cases without stored certificate - Example: `\"signature\": {\"key_pem\": \"-----BEGIN...\", \"cert_pem\": \"-----BEGIN...\"}` If `key_pem` and `cert_pem` are provided → Mode 2 Otherwise → Mode 1 (certificate retrieved via `client_uid`)
|
|
281
|
+
* @summary Submit a complete invoice (generation + signature + submission)
|
|
282
|
+
* @param {SubmitCompleteInvoiceRequest} submitCompleteInvoiceRequest
|
|
283
|
+
* @param {*} [options] Override http request option.
|
|
284
|
+
* @throws {RequiredError}
|
|
285
|
+
*/
|
|
286
|
+
submitCompleteInvoiceApiV1ProcessingInvoicesSubmitCompletePost: (submitCompleteInvoiceRequest_1, ...args_1) => __awaiter(this, [submitCompleteInvoiceRequest_1, ...args_1], void 0, function* (submitCompleteInvoiceRequest, options = {}) {
|
|
287
|
+
// verify required parameter 'submitCompleteInvoiceRequest' is not null or undefined
|
|
288
|
+
assertParamExists('submitCompleteInvoiceApiV1ProcessingInvoicesSubmitCompletePost', 'submitCompleteInvoiceRequest', submitCompleteInvoiceRequest);
|
|
289
|
+
const localVarPath = `/api/v1/processing/invoices/submit-complete`;
|
|
290
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
291
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
292
|
+
let baseOptions;
|
|
293
|
+
if (configuration) {
|
|
294
|
+
baseOptions = configuration.baseOptions;
|
|
295
|
+
}
|
|
296
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
297
|
+
const localVarHeaderParameter = {};
|
|
298
|
+
const localVarQueryParameter = {};
|
|
299
|
+
// authentication HTTPBearer required
|
|
300
|
+
// http bearer authentication required
|
|
301
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
302
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
303
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
304
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
305
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
306
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
307
|
+
localVarRequestOptions.data = serializeDataIfNeeded(submitCompleteInvoiceRequest, localVarRequestOptions, configuration);
|
|
308
|
+
return {
|
|
309
|
+
url: toPathString(localVarUrlObj),
|
|
310
|
+
options: localVarRequestOptions,
|
|
311
|
+
};
|
|
312
|
+
}),
|
|
313
|
+
/**
|
|
314
|
+
* Asynchronous version of the `/invoices/submit-complete` endpoint using Celery for background processing. **Automated workflow (same as synchronous version):** 1. **Auto-enrichment** (optional): retrieves data via public APIs and Chorus Pro/AFNOR 2. **Factur-X PDF generation**: creates a PDF/A-3 with embedded XML 3. **Electronic signature** (optional): signs the PDF with a certificate 4. **Submission**: sends to the chosen destination (Chorus Pro or AFNOR PDP) **Supported destinations:** - **Chorus Pro**: French B2G platform (invoices to public sector) - **AFNOR PDP**: Partner Dematerialization Platforms **Differences with synchronous version:** - ✅ **Non-blocking**: Returns immediately with a `task_id` (HTTP 202 Accepted) - ✅ **Background processing**: Invoice is processed by a Celery worker - ✅ **Progress tracking**: Use `/tasks/{task_id}/status` to track status - ✅ **Ideal for high volumes**: Allows processing many invoices in parallel **How to use:** 1. **Submission**: Call this endpoint with your invoice data 2. **Immediate return**: You receive a `task_id` (e.g., \"abc123-def456\") 3. **Tracking**: Call `/tasks/{task_id}/status` to check progress 4. **Result**: When `status = \"SUCCESS\"`, the `result` field contains the complete response **Credentials and signature**: Same modes as the synchronous version (JWT or payload).
|
|
315
|
+
* @summary Submit a complete invoice (asynchronous with Celery)
|
|
316
|
+
* @param {SubmitCompleteInvoiceRequest} submitCompleteInvoiceRequest
|
|
317
|
+
* @param {*} [options] Override http request option.
|
|
318
|
+
* @throws {RequiredError}
|
|
319
|
+
*/
|
|
320
|
+
submitCompleteInvoiceAsyncApiV1ProcessingInvoicesSubmitCompleteAsyncPost: (submitCompleteInvoiceRequest_1, ...args_1) => __awaiter(this, [submitCompleteInvoiceRequest_1, ...args_1], void 0, function* (submitCompleteInvoiceRequest, options = {}) {
|
|
321
|
+
// verify required parameter 'submitCompleteInvoiceRequest' is not null or undefined
|
|
322
|
+
assertParamExists('submitCompleteInvoiceAsyncApiV1ProcessingInvoicesSubmitCompleteAsyncPost', 'submitCompleteInvoiceRequest', submitCompleteInvoiceRequest);
|
|
323
|
+
const localVarPath = `/api/v1/processing/invoices/submit-complete-async`;
|
|
324
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
325
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
326
|
+
let baseOptions;
|
|
327
|
+
if (configuration) {
|
|
328
|
+
baseOptions = configuration.baseOptions;
|
|
329
|
+
}
|
|
330
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
331
|
+
const localVarHeaderParameter = {};
|
|
332
|
+
const localVarQueryParameter = {};
|
|
333
|
+
// authentication HTTPBearer required
|
|
334
|
+
// http bearer authentication required
|
|
335
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
336
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
337
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
338
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
339
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
340
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
341
|
+
localVarRequestOptions.data = serializeDataIfNeeded(submitCompleteInvoiceRequest, localVarRequestOptions, configuration);
|
|
342
|
+
return {
|
|
343
|
+
url: toPathString(localVarUrlObj),
|
|
344
|
+
options: localVarRequestOptions,
|
|
345
|
+
};
|
|
346
|
+
}),
|
|
347
|
+
/**
|
|
348
|
+
* Validates a complete Factur-X PDF according to European and French standards. ## Applied validation standards - **EN 16931**: European semantic standard (directive 2014/55/EU) - **ISO 19005-3** (PDF/A-3): Long-term electronic archiving - **Factur-X / ZUGFeRD**: Franco-German specification - **Schematron**: XML business rules validation - **eIDAS**: European regulation on electronic identification (signatures) ## Checks performed ### 1. Factur-X XML extraction and validation **Checks performed:** - Presence of embedded XML file (`factur-x.xml` or `zugferd-invoice.xml`) - Automatic profile detection (MINIMUM, BASIC, EN16931, EXTENDED) - XML parsing with UTF-8 validation - GuidelineSpecifiedDocumentContextParameter/ID extraction **Schematron validation:** - Business rules for detected profile (MINIMUM: 45 rules, EN16931: 178 rules) - Cardinality of required elements - Calculation consistency (net, VAT, gross amounts, discounts) - Identifier formats (SIRET, intra-EU VAT, IBAN) - Standardized codes (ISO country codes, UN/ECE units, VAT codes) **What is verified:** - ✅ XML structure conforming to Cross Industry Invoice XSD - ✅ Correct UN/CEFACT namespace - ✅ European business rules (BR-xx) - ✅ French-specific rules (FR-xx) ### 2. PDF/A-3 compliance **Basic validation (metadata):** - Presence of `/Type` field set to `Catalog` - Metadata `pdfaid:part` = 3 (PDF/A-3) - Metadata `pdfaid:conformance` = B or U - PDF version >= 1.4 **Strict VeraPDF validation (if use_verapdf=True):** - 146+ ISO 19005-3 rules (PDF/A-3B) - Absence of forbidden content (JavaScript, multimedia, dynamic forms) - Correctly embedded fonts and subsets - Compliant color spaces (sRGB, DeviceGray) - Valid file structure (cross-reference table) - XMP metadata conforming to ISO 16684-1 **What is verified:** - ✅ Long-term archivable file (20+ years) - ✅ Guaranteed readability (embedded fonts) - ✅ Legal compliance (France, Germany, EU) ### 3. XMP metadata (eXtensible Metadata Platform) **Checks performed:** - Presence of `<?xpacket>` block with XMP metadata - `fx:` namespace for Factur-X: `urn:factur-x:pdfa:CrossIndustryDocument:invoice:1p0#` - Required Factur-X fields: - `fx:ConformanceLevel`: Profile (MINIMUM, BASIC, EN16931, EXTENDED) - `fx:DocumentFileName`: Embedded XML name - `fx:DocumentType`: \"INVOICE\" - `fx:Version`: Factur-X version (1.0.07) **What is verified:** - ✅ Metadata conforming to ISO 16684-1 - ✅ Correct declared Factur-X profile - ✅ Supported Factur-X version ### 4. Electronic signatures **Detection and analysis:** - Presence of `/Sig` dictionaries in PDF - Signature type: PAdES (PDF Advanced Electronic Signature) - Information extraction: - Signer name (`/Name`) - Signing date (`/M`) - Signature reason (`/Reason`) - Signature location (`/Location`) - Signature type (approval, certification) **What is verified:** - ✅ Presence of signatures or seals - ✅ Number of signatures (single or multi-signature) - ℹ️ No cryptographic verification (requires certificates) ## Parameters - **pdf_file** (required): The Factur-X PDF file to validate - **profile** (optional): Expected profile. If absent, auto-detected from XML - **use_verapdf** (optional, default=false): Enable strict PDF/A validation with VeraPDF - `false`: Fast metadata validation (2-3 seconds) - `true`: Complete ISO 19005-3 validation (15-30 seconds, **recommended for production**) ## Detailed response ```json { \"isCompliant\": true, \"xml\": { \"present\": true, \"compliant\": true, \"profile\": \"EN16931\", \"errors\": [] }, \"pdfa\": { \"compliant\": true, \"version\": \"PDF/A-3B\", \"method\": \"verapdf\", \"errors\": [] }, \"xmp\": { \"present\": true, \"compliant\": true, \"metadata\": {...} }, \"signatures\": { \"present\": true, \"count\": 1, \"details\": [...] } } ``` ## Use cases - **Before sending**: Validate generated invoice before transmission to client - **On reception**: Verify compliance of invoice received from supplier - **Audit**: Check quality of invoice batches - **Legal compliance**: Ensure B2B/B2G obligations are met in France - **Debugging**: Identify issues in generation process - **Archiving**: Guarantee long-term validity (PDF/A-3) ## Processing time - Basic validation: 2-3 seconds - VeraPDF validation: 15-30 seconds (depends on PDF size)
|
|
349
|
+
* @summary Validate a complete Factur-X PDF
|
|
350
|
+
* @param {File} pdfFile Factur-X PDF file to validate (.pdf format).
|
|
351
|
+
* @param {APIProfile | null} [profile]
|
|
352
|
+
* @param {boolean} [useVerapdf] Enable strict PDF/A validation with VeraPDF (recommended for production). If False, uses basic metadata validation.
|
|
353
|
+
* @param {*} [options] Override http request option.
|
|
354
|
+
* @throws {RequiredError}
|
|
355
|
+
*/
|
|
356
|
+
validateFacturxPdfApiV1ProcessingValidateFacturxPdfPost: (pdfFile_1, profile_1, useVerapdf_1, ...args_1) => __awaiter(this, [pdfFile_1, profile_1, useVerapdf_1, ...args_1], void 0, function* (pdfFile, profile, useVerapdf, options = {}) {
|
|
357
|
+
// verify required parameter 'pdfFile' is not null or undefined
|
|
358
|
+
assertParamExists('validateFacturxPdfApiV1ProcessingValidateFacturxPdfPost', 'pdfFile', pdfFile);
|
|
359
|
+
const localVarPath = `/api/v1/processing/validate-facturx-pdf`;
|
|
360
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
361
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
362
|
+
let baseOptions;
|
|
363
|
+
if (configuration) {
|
|
364
|
+
baseOptions = configuration.baseOptions;
|
|
365
|
+
}
|
|
366
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
367
|
+
const localVarHeaderParameter = {};
|
|
368
|
+
const localVarQueryParameter = {};
|
|
369
|
+
const localVarFormParams = new ((configuration && configuration.formDataCtor) || FormData)();
|
|
370
|
+
// authentication HTTPBearer required
|
|
371
|
+
// http bearer authentication required
|
|
372
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
373
|
+
if (pdfFile !== undefined) {
|
|
374
|
+
localVarFormParams.append('pdf_file', pdfFile);
|
|
375
|
+
}
|
|
376
|
+
if (profile !== undefined) {
|
|
377
|
+
localVarFormParams.append('profile', profile);
|
|
378
|
+
}
|
|
379
|
+
if (useVerapdf !== undefined) {
|
|
380
|
+
localVarFormParams.append('use_verapdf', String(useVerapdf));
|
|
381
|
+
}
|
|
382
|
+
localVarHeaderParameter['Content-Type'] = 'multipart/form-data';
|
|
383
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
384
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
385
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
386
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
387
|
+
localVarRequestOptions.data = localVarFormParams;
|
|
388
|
+
return {
|
|
389
|
+
url: toPathString(localVarUrlObj),
|
|
390
|
+
options: localVarRequestOptions,
|
|
391
|
+
};
|
|
392
|
+
}),
|
|
393
|
+
/**
|
|
394
|
+
* Validates a Factur-X PDF asynchronously with polling system. ## How it works 1. **Submission**: PDF is queued for asynchronous validation 2. **Immediate return**: You receive a `task_id` (HTTP 202) 3. **Tracking**: Use the `/tasks/{task_id}/status` endpoint to track progress ## Advantages of asynchronous mode - **No timeout**: Ideal for large PDFs or VeraPDF validation (which can take several seconds) - **Scalability**: Validations are processed by dedicated Celery workers - **Status tracking**: Allows you to monitor validation progress - **Non-blocking**: Your client doesn\'t wait during validation ## When to use this mode? - **VeraPDF validation enabled** (`use_verapdf=True`): Strict validation can take 2-10 seconds - **Large PDF files**: PDFs > 1 MB - **Batch processing**: Validating multiple invoices in parallel - **Asynchronous integration**: Your system supports polling ## Checks performed ### 1. Factur-X XML extraction and validation - Verifies presence of Factur-X compliant embedded XML file - Automatically detects profile used (MINIMUM, BASIC, EN16931, EXTENDED) - Validates XML against detected profile\'s Schematron rules ### 2. PDF/A compliance - **Without VeraPDF**: Basic metadata validation (fast, ~100ms) - **With VeraPDF**: Strict ISO 19005 validation (146+ rules, 2-10s) - Detects PDF/A version (PDF/A-1, PDF/A-3, etc.) - Detailed non-compliance reports ### 3. XMP metadata - Verifies presence of XMP metadata in PDF - Validates Factur-X metadata compliance (profile, version) - Extracts all available XMP metadata ### 4. Electronic signatures - Detects presence of electronic signatures or seals - Extracts information about each signature (signer, date, reason) - Counts number of signatures present ## Parameters - **pdf_file**: The Factur-X PDF file to validate - **profile**: Expected Factur-X profile (optional). If not specified, profile will be auto-detected from embedded XML file. - **use_verapdf**: Enable strict PDF/A validation with VeraPDF. ⚠️ **Warning**: VeraPDF can take 2-10 seconds depending on PDF size. Recommended only in asynchronous mode to avoid timeouts. ## Retrieving results After submission, use `GET /tasks/{task_id}/status` endpoint to retrieve the result. **Polling example**: ```python import requests import time # 1. Submit task response = requests.post(\"/validate-facturx-async\", files={\"pdf_file\": pdf_file}) task_id = response.json()[\"taskId\"] # 2. Poll every 2 seconds while True: status_response = requests.get(f\"/tasks/{task_id}/status\") status = status_response.json() if status[\"status\"] == \"SUCCESS\": result = status[\"result\"][\"validation_result\"] print(f\"Compliant: {result[\'is_compliant\']}\") break elif status[\"status\"] == \"FAILURE\": print(f\"Error: {status[\'result\'][\'errorMessage\']}\") break time.sleep(2) # Wait 2 seconds before next check ``` ## Use cases - Validate invoices before sending with VeraPDF (strict validation) - Process invoice batches in parallel - Integrate validation into an asynchronous pipeline - Validate large PDFs without timeout risk
|
|
395
|
+
* @summary Validate a Factur-X PDF (asynchronous with polling)
|
|
396
|
+
* @param {File} pdfFile Factur-X PDF file to validate (.pdf format).
|
|
397
|
+
* @param {APIProfile | null} [profile]
|
|
398
|
+
* @param {boolean} [useVerapdf] Enable strict PDF/A validation with VeraPDF (recommended for production). May take several seconds.
|
|
399
|
+
* @param {*} [options] Override http request option.
|
|
400
|
+
* @throws {RequiredError}
|
|
401
|
+
*/
|
|
402
|
+
validateFacturxPdfAsyncApiV1ProcessingValidateFacturxAsyncPost: (pdfFile_1, profile_1, useVerapdf_1, ...args_1) => __awaiter(this, [pdfFile_1, profile_1, useVerapdf_1, ...args_1], void 0, function* (pdfFile, profile, useVerapdf, options = {}) {
|
|
403
|
+
// verify required parameter 'pdfFile' is not null or undefined
|
|
404
|
+
assertParamExists('validateFacturxPdfAsyncApiV1ProcessingValidateFacturxAsyncPost', 'pdfFile', pdfFile);
|
|
405
|
+
const localVarPath = `/api/v1/processing/validate-facturx-async`;
|
|
406
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
407
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
408
|
+
let baseOptions;
|
|
409
|
+
if (configuration) {
|
|
410
|
+
baseOptions = configuration.baseOptions;
|
|
411
|
+
}
|
|
412
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
413
|
+
const localVarHeaderParameter = {};
|
|
414
|
+
const localVarQueryParameter = {};
|
|
415
|
+
const localVarFormParams = new ((configuration && configuration.formDataCtor) || FormData)();
|
|
416
|
+
// authentication HTTPBearer required
|
|
417
|
+
// http bearer authentication required
|
|
418
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
419
|
+
if (pdfFile !== undefined) {
|
|
420
|
+
localVarFormParams.append('pdf_file', pdfFile);
|
|
421
|
+
}
|
|
422
|
+
if (profile !== undefined) {
|
|
423
|
+
localVarFormParams.append('profile', profile);
|
|
424
|
+
}
|
|
425
|
+
if (useVerapdf !== undefined) {
|
|
426
|
+
localVarFormParams.append('use_verapdf', String(useVerapdf));
|
|
427
|
+
}
|
|
428
|
+
localVarHeaderParameter['Content-Type'] = 'multipart/form-data';
|
|
429
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
430
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
431
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
432
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
433
|
+
localVarRequestOptions.data = localVarFormParams;
|
|
434
|
+
return {
|
|
435
|
+
url: toPathString(localVarUrlObj),
|
|
436
|
+
options: localVarRequestOptions,
|
|
437
|
+
};
|
|
438
|
+
}),
|
|
439
|
+
/**
|
|
440
|
+
* Validates electronic signatures present in an uploaded PDF. **Verifications performed**: - Presence of signatures - Document integrity (not modified since signing) - Certificate validity - Chain of trust (if available) - Presence of timestamp (PAdES-B-T) - Validation data (PAdES-B-LT) **Supported standards**: PAdES-B-B, PAdES-B-T, PAdES-B-LT, ISO 32000-2. **⚠️ Note**: This validation is technical (cryptographic integrity). Legal validity depends on the eIDAS level of the certificate (SES/AdES/QES) and the context of use.
|
|
441
|
+
* @summary Validate electronic signatures of a PDF
|
|
442
|
+
* @param {File} pdfFile PDF file to validate (will be analyzed to detect and validate signatures)
|
|
443
|
+
* @param {*} [options] Override http request option.
|
|
444
|
+
* @throws {RequiredError}
|
|
445
|
+
*/
|
|
446
|
+
validatePdfSignatureEndpointApiV1ProcessingValidatePdfSignaturePost: (pdfFile_1, ...args_1) => __awaiter(this, [pdfFile_1, ...args_1], void 0, function* (pdfFile, options = {}) {
|
|
447
|
+
// verify required parameter 'pdfFile' is not null or undefined
|
|
448
|
+
assertParamExists('validatePdfSignatureEndpointApiV1ProcessingValidatePdfSignaturePost', 'pdfFile', pdfFile);
|
|
449
|
+
const localVarPath = `/api/v1/processing/validate-pdf-signature`;
|
|
450
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
451
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
452
|
+
let baseOptions;
|
|
453
|
+
if (configuration) {
|
|
454
|
+
baseOptions = configuration.baseOptions;
|
|
455
|
+
}
|
|
456
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
457
|
+
const localVarHeaderParameter = {};
|
|
458
|
+
const localVarQueryParameter = {};
|
|
459
|
+
const localVarFormParams = new ((configuration && configuration.formDataCtor) || FormData)();
|
|
460
|
+
// authentication HTTPBearer required
|
|
461
|
+
// http bearer authentication required
|
|
462
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
463
|
+
if (pdfFile !== undefined) {
|
|
464
|
+
localVarFormParams.append('pdf_file', pdfFile);
|
|
465
|
+
}
|
|
466
|
+
localVarHeaderParameter['Content-Type'] = 'multipart/form-data';
|
|
467
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
468
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
469
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
470
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
471
|
+
localVarRequestOptions.data = localVarFormParams;
|
|
472
|
+
return {
|
|
473
|
+
url: toPathString(localVarUrlObj),
|
|
474
|
+
options: localVarRequestOptions,
|
|
475
|
+
};
|
|
476
|
+
}),
|
|
477
|
+
/**
|
|
478
|
+
* Validates a Factur-X XML file against Schematron business rules according to EN 16931 standard. ## Applied Standard **Schematron ISO/IEC 19757-3**: Business rules validation language for XML - Semantic validation (beyond XSD syntax) - European EN 16931 business rules - French-specific Factur-X rules - Arithmetic calculations and data consistency ## Profiles and validated rules ### MINIMUM (45 rules) - Unique invoice identifier - Dates (issue, due date) - Party identifiers (SIRET/SIREN) - Total gross amount ### BASIC (102 rules) - All MINIMUM rules - Detailed invoice lines - Basic VAT calculations - Payment methods - References (order, contract) ### EN16931 (178 rules) - All BASIC rules - **European rules (BR-xx)**: 81 business rules - **French rules (FR-xx)**: 12 France-specific rules - **Advanced calculations (CR-xx)**: 32 calculation rules - **Standardized codes (CL-xx)**: 52 code lists ### EXTENDED (210+ rules) - All EN16931 rules - Logistics information - Advanced accounting data - Multiple external references ## Checks performed ### 1. Syntax validation - Correct XML parsing (UTF-8, well-formed) - UN/CEFACT namespaces present - Hierarchical structure respected ### 2. Business rules (BR-xx) Examples: - `BR-1`: Invoice total must equal sum of line totals + document-level amounts - `BR-CO-10`: Sum of VAT base amounts must equal invoice net total - `BR-16`: Invoice currency code must be in ISO 4217 list ### 3. French rules (FR-xx) Examples: - `FR-1`: Supplier SIRET must have 14 digits - `FR-2`: Customer SIRET must have 14 digits (if present) - `FR-5`: Intra-EU VAT number must be in format FRxx999999999 ### 4. Calculation rules (CR-xx) - Net + VAT = Gross amounts - Sum of lines = Document total - Discounts and surcharges correctly applied - Compliant rounding (2 decimals for amounts) ### 5. Standardized codes (CL-xx) - ISO 3166-1 alpha-2 country codes - ISO 4217 currency codes - UN/ECE Rec 20 measurement units - VAT codes (types, categories, exemptions) - SchemeID for identifiers (0002=SIREN, 0009=SIRET, etc.) ## Validation process 1. **XSLT loading**: Schematron file converted to XSLT (Saxon-HE) 2. **Transformation**: Rules applied to XML 3. **Results analysis**: Extraction of errors (`failed-assert`) and warnings (`successful-report`) 4. **Report**: Structured list of non-conformities ## Responses **200 OK**: Compliant XML ```json { \"message\": \"XML is compliant with EN16931 profile\" } ``` **400 Bad Request**: Non-compliant XML ```json { \"detail\": [ \"[BR-1] Invoice total (120.00) does not match calculated sum (100.00 + 20.00)\", \"[FR-1] Supplier SIRET must contain exactly 14 digits\" ] } ``` ## Use cases - **Pre-validation**: Verify XML before PDF/A integration - **Debugging**: Precisely identify generation errors - **Testing**: Validate test or example XMLs - **Compliance**: Ensure European and French rules are met - **Development**: Quick testing without PDF generation ## Processing time - MINIMUM profile: ~0.5 second - EN16931 profile: ~1-2 seconds - EXTENDED profile: ~2-3 seconds
|
|
479
|
+
* @summary Validate an existing Factur-X XML
|
|
480
|
+
* @param {File} xmlFile Factur-X XML file to validate (.xml format).
|
|
481
|
+
* @param {APIProfile} [profile] Validation profile (MINIMUM, BASIC, EN16931, EXTENDED).
|
|
482
|
+
* @param {*} [options] Override http request option.
|
|
483
|
+
* @throws {RequiredError}
|
|
484
|
+
*/
|
|
485
|
+
validateXmlApiV1ProcessingValidateXmlPost: (xmlFile_1, profile_1, ...args_1) => __awaiter(this, [xmlFile_1, profile_1, ...args_1], void 0, function* (xmlFile, profile, options = {}) {
|
|
486
|
+
// verify required parameter 'xmlFile' is not null or undefined
|
|
487
|
+
assertParamExists('validateXmlApiV1ProcessingValidateXmlPost', 'xmlFile', xmlFile);
|
|
488
|
+
const localVarPath = `/api/v1/processing/validate-xml`;
|
|
489
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
490
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
491
|
+
let baseOptions;
|
|
492
|
+
if (configuration) {
|
|
493
|
+
baseOptions = configuration.baseOptions;
|
|
494
|
+
}
|
|
495
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
496
|
+
const localVarHeaderParameter = {};
|
|
497
|
+
const localVarQueryParameter = {};
|
|
498
|
+
const localVarFormParams = new ((configuration && configuration.formDataCtor) || FormData)();
|
|
499
|
+
// authentication HTTPBearer required
|
|
500
|
+
// http bearer authentication required
|
|
501
|
+
yield setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
502
|
+
if (xmlFile !== undefined) {
|
|
503
|
+
localVarFormParams.append('xml_file', xmlFile);
|
|
504
|
+
}
|
|
505
|
+
if (profile !== undefined) {
|
|
506
|
+
localVarFormParams.append('profile', profile);
|
|
507
|
+
}
|
|
508
|
+
localVarHeaderParameter['Content-Type'] = 'multipart/form-data';
|
|
509
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
510
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
511
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
512
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
513
|
+
localVarRequestOptions.data = localVarFormParams;
|
|
514
|
+
return {
|
|
515
|
+
url: toPathString(localVarUrlObj),
|
|
516
|
+
options: localVarRequestOptions,
|
|
517
|
+
};
|
|
518
|
+
}),
|
|
519
|
+
};
|
|
520
|
+
};
|
|
521
|
+
/**
|
|
522
|
+
* InvoiceProcessingApi - functional programming interface
|
|
523
|
+
*/
|
|
524
|
+
export const InvoiceProcessingApiFp = function (configuration) {
|
|
525
|
+
const localVarAxiosParamCreator = InvoiceProcessingApiAxiosParamCreator(configuration);
|
|
526
|
+
return {
|
|
527
|
+
/**
|
|
528
|
+
* Generates an electronic invoice in Factur-X format compliant with European standards. ## Applied Standards - **Factur-X** (France): FNFE-MPE standard (Forum National de la Facture Électronique) - **ZUGFeRD** (Germany): German format compatible with Factur-X - **EN 16931**: European semantic standard for electronic invoicing - **ISO 19005-3** (PDF/A-3): Long-term electronic archiving - **Cross Industry Invoice (CII)**: UN/CEFACT XML syntax ## 🆕 New: Simplified format with auto-enrichment (P0.1) You can now create an invoice by providing only: - An invoice number - A sender SIRET + **IBAN** (required) - A recipient SIRET - Invoice lines (description, quantity, net price) **Simplified format example**: ```json { \"number\": \"FACT-2025-001\", \"sender\": { \"siret\": \"92019522900017\", \"iban\": \"FR7630001007941234567890185\" }, \"recipient\": {\"siret\": \"35600000000048\"}, \"lines\": [ {\"description\": \"Service\", \"quantity\": 10, \"unitPrice\": 100.00, \"vatRate\": 20.0} ] } ``` **⚠️ Required fields (simplified format)**: - `number`: Unique invoice number - `sender.siret`: Sender\'s SIRET (14 digits) - `sender.iban`: Bank account IBAN (no public API to retrieve it) - `recipient.siret`: Recipient\'s SIRET - `lines[]`: At least one invoice line **What happens automatically with `auto_enrich=True`**: - ✅ Name enrichment from Chorus Pro API - ✅ Address enrichment from Business Search API (free, public) - ✅ Automatic intra-EU VAT calculation (FR + key + SIREN) - ✅ Chorus Pro ID retrieval for electronic invoicing - ✅ Net/VAT/Gross totals calculation - ✅ Date generation (today + 30-day due date) - ✅ Multi-rate VAT handling **Supported identifiers**: - SIRET (14 digits): Specific establishment ⭐ Recommended - SIREN (9 digits): Company (auto-selection of headquarters) - Special types: UE_HORS_FRANCE, RIDET, TAHITI, etc. ## Checks performed during generation ### 1. Data validation (Pydantic) - Data types (amounts as Decimal, ISO 8601 dates) - Formats (14-digit SIRET, 9-digit SIREN, IBAN) - Required fields per profile - Amount consistency (Net + VAT = Gross) ### 2. CII-compliant XML generation - Serialization according to Cross Industry Invoice XSD schema - Correct UN/CEFACT namespaces - Hierarchical structure respected - UTF-8 encoding without BOM ### 3. Schematron validation - Business rules for selected profile (MINIMUM, BASIC, EN16931, EXTENDED) - Element cardinality (required, optional, repeatable) - Calculation rules (totals, VAT, discounts) - European EN 16931 compliance ### 4. PDF/A-3 conversion (if output_format=\'pdf\') - Source PDF conversion to PDF/A-3 via Ghostscript - Factur-X XML embedding in PDF - Compliant XMP metadata - ICC sRGB color profile - Removal of forbidden elements (JavaScript, forms) ## How it works 1. **Submission**: Invoice is queued in Celery for asynchronous processing 2. **Immediate return**: You receive a `task_id` (HTTP 202 Accepted) 3. **Tracking**: Use the `/tasks/{task_id}/status` endpoint to track progress ## Output formats - **xml**: Generates only Factur-X XML (recommended for testing) - **pdf**: Generates PDF/A-3 with embedded XML (requires `source_pdf`) ## Factur-X profiles - **MINIMUM**: Minimal data (simplified invoice) - **BASIC**: Basic information (SMEs) - **EN16931**: European standard (recommended, compliant with directive 2014/55/EU) - **EXTENDED**: All available data (large accounts) ## What you get After successful processing (status `completed`): - **XML only**: Base64-encoded Factur-X compliant XML file - **PDF/A-3**: PDF with embedded XML, ready for sending/archiving - **Metadata**: Profile, Factur-X version, file size - **Validation**: Schematron compliance confirmation ## Validation Data is automatically validated according to detected format. On error, a 422 status is returned with invalid field details.
|
|
529
|
+
* @summary Generate a Factur-X invoice
|
|
530
|
+
* @param {string} invoiceData Invoice data in JSON format. Two formats accepted: 1. **Classic format**: Complete FactureFacturX structure (all fields) 2. **Simplified format** (🆕 P0.1): Minimal structure with auto-enrichment Format is detected automatically!
|
|
531
|
+
* @param {APIProfile} [profile] Factur-X profile: MINIMUM, BASIC, EN16931 or EXTENDED.
|
|
532
|
+
* @param {OutputFormat} [outputFormat] Output format: \\\'xml\\\' (XML only) or \\\'pdf\\\' (Factur-X PDF with embedded XML).
|
|
533
|
+
* @param {boolean} [autoEnrich] 🆕 Enable auto-enrichment from SIRET/SIREN (simplified format only)
|
|
534
|
+
* @param {File | null} [sourcePdf]
|
|
535
|
+
* @param {*} [options] Override http request option.
|
|
536
|
+
* @throws {RequiredError}
|
|
537
|
+
*/
|
|
538
|
+
generateInvoiceApiV1ProcessingGenerateInvoicePost(invoiceData, profile, outputFormat, autoEnrich, sourcePdf, options) {
|
|
539
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
540
|
+
var _a, _b, _c;
|
|
541
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.generateInvoiceApiV1ProcessingGenerateInvoicePost(invoiceData, profile, outputFormat, autoEnrich, sourcePdf, options);
|
|
542
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
543
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['InvoiceProcessingApi.generateInvoiceApiV1ProcessingGenerateInvoicePost']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
544
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
545
|
+
});
|
|
546
|
+
},
|
|
547
|
+
/**
|
|
548
|
+
* Generates a self-signed X.509 certificate for PDF electronic signature testing. **⚠️ WARNING: TEST certificate only!** This certificate is: - ✅ Suitable for testing and development - ✅ Compatible with PDF signing (PAdES) - ✅ Compliant with eIDAS **SES** level (Simple Electronic Signature) - ❌ **NEVER usable in production** - ❌ **Not recognized** by browsers and PDF readers - ❌ **No legal value** ## eIDAS levels - **SES** (Simple): Self-signed certificate ← Generated by this endpoint - **AdES** (Advanced): Commercial CA certificate (Let\'s Encrypt, etc.) - **QES** (Qualified): Qualified certificate from QTSP (CertEurope, Universign, etc.) ## Usage Once generated, the certificate can be: 1. **Saved in Django** (recommended): - Django Admin > Signing Certificates - Upload `certificate_pem` and `private_key_pem` 2. **Used directly**: - Sign a PDF with `/sign-pdf` - The certificate will be automatically used ## Example call ```bash curl -X POST \"https://www.factpulse.fr/api/v1/processing/generate-test-certificate\" \\ -H \"Authorization: Bearer eyJ0eXAi...\" \\ -H \"Content-Type: application/json\" \\ -d \'{ \"cn\": \"Test Client XYZ\", \"organization\": \"Client XYZ Ltd\", \"email\": \"contact@xyz.com\", \"validity_days\": 365 }\' ``` ## Use cases - PDF signature testing in development - Electronic signature POC - Training and demos - Automated integration tests ## Technical compliance Certificate generated with: - RSA key 2048 or 4096 bits - SHA-256 algorithm - Key Usage extensions: `digitalSignature`, `contentCommitment` (non-repudiation) - Extended Key Usage extensions: `codeSigning`, `emailProtection` - Validity: 1 day to 10 years (configurable) - Format: PEM (certificate and key) - Optional: PKCS#12 (.p12)
|
|
549
|
+
* @summary Generate a self-signed X.509 test certificate
|
|
550
|
+
* @param {GenerateCertificateRequest} generateCertificateRequest
|
|
551
|
+
* @param {*} [options] Override http request option.
|
|
552
|
+
* @throws {RequiredError}
|
|
553
|
+
*/
|
|
554
|
+
generateTestCertificateApiV1ProcessingGenerateTestCertificatePost(generateCertificateRequest, options) {
|
|
555
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
556
|
+
var _a, _b, _c;
|
|
557
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.generateTestCertificateApiV1ProcessingGenerateTestCertificatePost(generateCertificateRequest, options);
|
|
558
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
559
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['InvoiceProcessingApi.generateTestCertificateApiV1ProcessingGenerateTestCertificatePost']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
560
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
561
|
+
});
|
|
562
|
+
},
|
|
563
|
+
/**
|
|
564
|
+
* Retrieves the progress status of an invoice generation task. ## Possible states The `status` field uses the `CeleryStatus` enum with values: - **PENDING, STARTED, SUCCESS, FAILURE, RETRY** See the `CeleryStatus` schema documentation for details. ## Business result When `status=\"SUCCESS\"`, the `result` field contains: - `status`: \"SUCCESS\" or \"ERROR\" (business result) - `content_b64`: Base64 encoded content (if success) - `errorCode`, `errorMessage`, `details`: AFNOR format (if business error) ## Usage Poll this endpoint every 2-3 seconds until `status` is `SUCCESS` or `FAILURE`.
|
|
565
|
+
* @summary Get task generation status
|
|
566
|
+
* @param {string} taskId
|
|
567
|
+
* @param {*} [options] Override http request option.
|
|
568
|
+
* @throws {RequiredError}
|
|
569
|
+
*/
|
|
570
|
+
getTaskStatusApiV1ProcessingTasksTaskIdStatusGet(taskId, options) {
|
|
571
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
572
|
+
var _a, _b, _c;
|
|
573
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getTaskStatusApiV1ProcessingTasksTaskIdStatusGet(taskId, options);
|
|
574
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
575
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['InvoiceProcessingApi.getTaskStatusApiV1ProcessingTasksTaskIdStatusGet']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
576
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
577
|
+
});
|
|
578
|
+
},
|
|
579
|
+
/**
|
|
580
|
+
* Signs an uploaded PDF with the electronic certificate configured for the client (via client_uid from JWT). **Supported standards**: PAdES-B-B, PAdES-B-T (timestamping), PAdES-B-LT (long-term archiving). **eIDAS levels**: SES (self-signed), AdES (commercial CA), QES (PSCO - out of scope). **Security**: Double authentication X-Internal-Secret + JWT Bearer to retrieve the certificate. **⚠️ Legal disclaimer**: Generated signatures are electronic seals as defined by the eIDAS regulation. The level of legal validity depends on the certificate used (SES/AdES/QES). FactPulse does not provide QES qualified certificates - you must obtain a certificate from a PSCO (qualified Trust Service Provider) for maximum legal validity.
|
|
581
|
+
* @summary Sign a PDF with client\'s certificate (PAdES-B-LT)
|
|
582
|
+
* @param {File} pdfFile PDF file to sign (will be processed and returned signed in base64)
|
|
583
|
+
* @param {string | null} [reason]
|
|
584
|
+
* @param {string | null} [location]
|
|
585
|
+
* @param {string | null} [contact]
|
|
586
|
+
* @param {string} [fieldName] PDF signature field name
|
|
587
|
+
* @param {boolean} [usePadesLt] Enable PAdES-B-LT (long-term archiving with embedded validation data). REQUIRES a certificate with OCSP/CRL access.
|
|
588
|
+
* @param {boolean} [useTimestamp] Enable RFC 3161 timestamping with FreeTSA (PAdES-B-T)
|
|
589
|
+
* @param {*} [options] Override http request option.
|
|
590
|
+
* @throws {RequiredError}
|
|
591
|
+
*/
|
|
592
|
+
signPdfApiV1ProcessingSignPdfPost(pdfFile, reason, location, contact, fieldName, usePadesLt, useTimestamp, options) {
|
|
593
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
594
|
+
var _a, _b, _c;
|
|
595
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.signPdfApiV1ProcessingSignPdfPost(pdfFile, reason, location, contact, fieldName, usePadesLt, useTimestamp, options);
|
|
596
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
597
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['InvoiceProcessingApi.signPdfApiV1ProcessingSignPdfPost']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
598
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
599
|
+
});
|
|
600
|
+
},
|
|
601
|
+
/**
|
|
602
|
+
* Signs an uploaded PDF asynchronously via a Celery task. **Difference with /sign-pdf**: - `/sign-pdf`: Synchronous signature (blocking until completion) - `/sign-pdf-async`: Asynchronous signature (returns immediately with task_id) **Async advantages**: - No timeout for large files - No blocking of FastAPI worker - Progress tracking via task_id - Ideal for batch processing **Supported standards**: PAdES-B-B, PAdES-B-T (timestamping), PAdES-B-LT (long-term archiving). **⚠️ Legal disclaimer**: Same as /sign-pdf (see that endpoint\'s documentation).
|
|
603
|
+
* @summary Sign a PDF asynchronously (Celery)
|
|
604
|
+
* @param {File} pdfFile PDF file to sign (processed asynchronously)
|
|
605
|
+
* @param {string | null} [reason]
|
|
606
|
+
* @param {string | null} [location]
|
|
607
|
+
* @param {string | null} [contact]
|
|
608
|
+
* @param {string} [fieldName] PDF signature field name
|
|
609
|
+
* @param {boolean} [usePadesLt] Enable PAdES-B-LT (long-term archiving with embedded validation data). REQUIRES a certificate with OCSP/CRL access.
|
|
610
|
+
* @param {boolean} [useTimestamp] Enable RFC 3161 timestamping with FreeTSA (PAdES-B-T)
|
|
611
|
+
* @param {*} [options] Override http request option.
|
|
612
|
+
* @throws {RequiredError}
|
|
613
|
+
*/
|
|
614
|
+
signPdfAsyncApiV1ProcessingSignPdfAsyncPost(pdfFile, reason, location, contact, fieldName, usePadesLt, useTimestamp, options) {
|
|
615
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
616
|
+
var _a, _b, _c;
|
|
617
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.signPdfAsyncApiV1ProcessingSignPdfAsyncPost(pdfFile, reason, location, contact, fieldName, usePadesLt, useTimestamp, options);
|
|
618
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
619
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['InvoiceProcessingApi.signPdfAsyncApiV1ProcessingSignPdfAsyncPost']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
620
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
621
|
+
});
|
|
622
|
+
},
|
|
623
|
+
/**
|
|
624
|
+
* Unified endpoint to submit a complete invoice to different destinations. **Automated workflow:** 1. **Auto-enrichment** (optional): retrieves data via public APIs and Chorus Pro/AFNOR 2. **Factur-X PDF generation**: creates a PDF/A-3 with embedded XML 3. **Electronic signature** (optional): signs the PDF with a certificate 4. **Submission**: sends to the chosen destination (Chorus Pro or AFNOR PDP) **Supported destinations:** - **Chorus Pro**: French B2G platform (invoices to public sector) - **AFNOR PDP**: Partner Dematerialization Platforms **Destination credentials - 2 modes available:** **Mode 1 - Retrieval via JWT (recommended):** - Credentials are retrieved automatically via the JWT `client_uid` - Do not provide the `credentials` field in `destination` - Zero-trust architecture: no secrets in the payload - Example: `\"destination\": {\"type\": \"chorus_pro\"}` **Mode 2 - Credentials in the payload:** - Provide credentials directly in the payload - Useful for tests or third-party integrations - Example: `\"destination\": {\"type\": \"chorus_pro\", \"credentials\": {...}}` **Electronic signature (optional) - 2 modes available:** **Mode 1 - Stored certificate (recommended):** - Certificate is retrieved automatically via the JWT `client_uid` - No key to provide in the payload - PAdES-B-LT signature with timestamp (eIDAS compliant) - Example: `\"signature\": {\"reason\": \"Factur-X compliance\"}` **Mode 2 - Keys in the payload (for tests):** - Provide `key_pem` and `cert_pem` directly - PEM format accepted: raw or base64 - Useful for tests or special cases without stored certificate - Example: `\"signature\": {\"key_pem\": \"-----BEGIN...\", \"cert_pem\": \"-----BEGIN...\"}` If `key_pem` and `cert_pem` are provided → Mode 2 Otherwise → Mode 1 (certificate retrieved via `client_uid`)
|
|
625
|
+
* @summary Submit a complete invoice (generation + signature + submission)
|
|
626
|
+
* @param {SubmitCompleteInvoiceRequest} submitCompleteInvoiceRequest
|
|
627
|
+
* @param {*} [options] Override http request option.
|
|
628
|
+
* @throws {RequiredError}
|
|
629
|
+
*/
|
|
630
|
+
submitCompleteInvoiceApiV1ProcessingInvoicesSubmitCompletePost(submitCompleteInvoiceRequest, options) {
|
|
631
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
632
|
+
var _a, _b, _c;
|
|
633
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.submitCompleteInvoiceApiV1ProcessingInvoicesSubmitCompletePost(submitCompleteInvoiceRequest, options);
|
|
634
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
635
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['InvoiceProcessingApi.submitCompleteInvoiceApiV1ProcessingInvoicesSubmitCompletePost']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
636
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
637
|
+
});
|
|
638
|
+
},
|
|
639
|
+
/**
|
|
640
|
+
* Asynchronous version of the `/invoices/submit-complete` endpoint using Celery for background processing. **Automated workflow (same as synchronous version):** 1. **Auto-enrichment** (optional): retrieves data via public APIs and Chorus Pro/AFNOR 2. **Factur-X PDF generation**: creates a PDF/A-3 with embedded XML 3. **Electronic signature** (optional): signs the PDF with a certificate 4. **Submission**: sends to the chosen destination (Chorus Pro or AFNOR PDP) **Supported destinations:** - **Chorus Pro**: French B2G platform (invoices to public sector) - **AFNOR PDP**: Partner Dematerialization Platforms **Differences with synchronous version:** - ✅ **Non-blocking**: Returns immediately with a `task_id` (HTTP 202 Accepted) - ✅ **Background processing**: Invoice is processed by a Celery worker - ✅ **Progress tracking**: Use `/tasks/{task_id}/status` to track status - ✅ **Ideal for high volumes**: Allows processing many invoices in parallel **How to use:** 1. **Submission**: Call this endpoint with your invoice data 2. **Immediate return**: You receive a `task_id` (e.g., \"abc123-def456\") 3. **Tracking**: Call `/tasks/{task_id}/status` to check progress 4. **Result**: When `status = \"SUCCESS\"`, the `result` field contains the complete response **Credentials and signature**: Same modes as the synchronous version (JWT or payload).
|
|
641
|
+
* @summary Submit a complete invoice (asynchronous with Celery)
|
|
642
|
+
* @param {SubmitCompleteInvoiceRequest} submitCompleteInvoiceRequest
|
|
643
|
+
* @param {*} [options] Override http request option.
|
|
644
|
+
* @throws {RequiredError}
|
|
645
|
+
*/
|
|
646
|
+
submitCompleteInvoiceAsyncApiV1ProcessingInvoicesSubmitCompleteAsyncPost(submitCompleteInvoiceRequest, options) {
|
|
647
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
648
|
+
var _a, _b, _c;
|
|
649
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.submitCompleteInvoiceAsyncApiV1ProcessingInvoicesSubmitCompleteAsyncPost(submitCompleteInvoiceRequest, options);
|
|
650
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
651
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['InvoiceProcessingApi.submitCompleteInvoiceAsyncApiV1ProcessingInvoicesSubmitCompleteAsyncPost']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
652
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
653
|
+
});
|
|
654
|
+
},
|
|
655
|
+
/**
|
|
656
|
+
* Validates a complete Factur-X PDF according to European and French standards. ## Applied validation standards - **EN 16931**: European semantic standard (directive 2014/55/EU) - **ISO 19005-3** (PDF/A-3): Long-term electronic archiving - **Factur-X / ZUGFeRD**: Franco-German specification - **Schematron**: XML business rules validation - **eIDAS**: European regulation on electronic identification (signatures) ## Checks performed ### 1. Factur-X XML extraction and validation **Checks performed:** - Presence of embedded XML file (`factur-x.xml` or `zugferd-invoice.xml`) - Automatic profile detection (MINIMUM, BASIC, EN16931, EXTENDED) - XML parsing with UTF-8 validation - GuidelineSpecifiedDocumentContextParameter/ID extraction **Schematron validation:** - Business rules for detected profile (MINIMUM: 45 rules, EN16931: 178 rules) - Cardinality of required elements - Calculation consistency (net, VAT, gross amounts, discounts) - Identifier formats (SIRET, intra-EU VAT, IBAN) - Standardized codes (ISO country codes, UN/ECE units, VAT codes) **What is verified:** - ✅ XML structure conforming to Cross Industry Invoice XSD - ✅ Correct UN/CEFACT namespace - ✅ European business rules (BR-xx) - ✅ French-specific rules (FR-xx) ### 2. PDF/A-3 compliance **Basic validation (metadata):** - Presence of `/Type` field set to `Catalog` - Metadata `pdfaid:part` = 3 (PDF/A-3) - Metadata `pdfaid:conformance` = B or U - PDF version >= 1.4 **Strict VeraPDF validation (if use_verapdf=True):** - 146+ ISO 19005-3 rules (PDF/A-3B) - Absence of forbidden content (JavaScript, multimedia, dynamic forms) - Correctly embedded fonts and subsets - Compliant color spaces (sRGB, DeviceGray) - Valid file structure (cross-reference table) - XMP metadata conforming to ISO 16684-1 **What is verified:** - ✅ Long-term archivable file (20+ years) - ✅ Guaranteed readability (embedded fonts) - ✅ Legal compliance (France, Germany, EU) ### 3. XMP metadata (eXtensible Metadata Platform) **Checks performed:** - Presence of `<?xpacket>` block with XMP metadata - `fx:` namespace for Factur-X: `urn:factur-x:pdfa:CrossIndustryDocument:invoice:1p0#` - Required Factur-X fields: - `fx:ConformanceLevel`: Profile (MINIMUM, BASIC, EN16931, EXTENDED) - `fx:DocumentFileName`: Embedded XML name - `fx:DocumentType`: \"INVOICE\" - `fx:Version`: Factur-X version (1.0.07) **What is verified:** - ✅ Metadata conforming to ISO 16684-1 - ✅ Correct declared Factur-X profile - ✅ Supported Factur-X version ### 4. Electronic signatures **Detection and analysis:** - Presence of `/Sig` dictionaries in PDF - Signature type: PAdES (PDF Advanced Electronic Signature) - Information extraction: - Signer name (`/Name`) - Signing date (`/M`) - Signature reason (`/Reason`) - Signature location (`/Location`) - Signature type (approval, certification) **What is verified:** - ✅ Presence of signatures or seals - ✅ Number of signatures (single or multi-signature) - ℹ️ No cryptographic verification (requires certificates) ## Parameters - **pdf_file** (required): The Factur-X PDF file to validate - **profile** (optional): Expected profile. If absent, auto-detected from XML - **use_verapdf** (optional, default=false): Enable strict PDF/A validation with VeraPDF - `false`: Fast metadata validation (2-3 seconds) - `true`: Complete ISO 19005-3 validation (15-30 seconds, **recommended for production**) ## Detailed response ```json { \"isCompliant\": true, \"xml\": { \"present\": true, \"compliant\": true, \"profile\": \"EN16931\", \"errors\": [] }, \"pdfa\": { \"compliant\": true, \"version\": \"PDF/A-3B\", \"method\": \"verapdf\", \"errors\": [] }, \"xmp\": { \"present\": true, \"compliant\": true, \"metadata\": {...} }, \"signatures\": { \"present\": true, \"count\": 1, \"details\": [...] } } ``` ## Use cases - **Before sending**: Validate generated invoice before transmission to client - **On reception**: Verify compliance of invoice received from supplier - **Audit**: Check quality of invoice batches - **Legal compliance**: Ensure B2B/B2G obligations are met in France - **Debugging**: Identify issues in generation process - **Archiving**: Guarantee long-term validity (PDF/A-3) ## Processing time - Basic validation: 2-3 seconds - VeraPDF validation: 15-30 seconds (depends on PDF size)
|
|
657
|
+
* @summary Validate a complete Factur-X PDF
|
|
658
|
+
* @param {File} pdfFile Factur-X PDF file to validate (.pdf format).
|
|
659
|
+
* @param {APIProfile | null} [profile]
|
|
660
|
+
* @param {boolean} [useVerapdf] Enable strict PDF/A validation with VeraPDF (recommended for production). If False, uses basic metadata validation.
|
|
661
|
+
* @param {*} [options] Override http request option.
|
|
662
|
+
* @throws {RequiredError}
|
|
663
|
+
*/
|
|
664
|
+
validateFacturxPdfApiV1ProcessingValidateFacturxPdfPost(pdfFile, profile, useVerapdf, options) {
|
|
665
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
666
|
+
var _a, _b, _c;
|
|
667
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.validateFacturxPdfApiV1ProcessingValidateFacturxPdfPost(pdfFile, profile, useVerapdf, options);
|
|
668
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
669
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['InvoiceProcessingApi.validateFacturxPdfApiV1ProcessingValidateFacturxPdfPost']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
670
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
671
|
+
});
|
|
672
|
+
},
|
|
673
|
+
/**
|
|
674
|
+
* Validates a Factur-X PDF asynchronously with polling system. ## How it works 1. **Submission**: PDF is queued for asynchronous validation 2. **Immediate return**: You receive a `task_id` (HTTP 202) 3. **Tracking**: Use the `/tasks/{task_id}/status` endpoint to track progress ## Advantages of asynchronous mode - **No timeout**: Ideal for large PDFs or VeraPDF validation (which can take several seconds) - **Scalability**: Validations are processed by dedicated Celery workers - **Status tracking**: Allows you to monitor validation progress - **Non-blocking**: Your client doesn\'t wait during validation ## When to use this mode? - **VeraPDF validation enabled** (`use_verapdf=True`): Strict validation can take 2-10 seconds - **Large PDF files**: PDFs > 1 MB - **Batch processing**: Validating multiple invoices in parallel - **Asynchronous integration**: Your system supports polling ## Checks performed ### 1. Factur-X XML extraction and validation - Verifies presence of Factur-X compliant embedded XML file - Automatically detects profile used (MINIMUM, BASIC, EN16931, EXTENDED) - Validates XML against detected profile\'s Schematron rules ### 2. PDF/A compliance - **Without VeraPDF**: Basic metadata validation (fast, ~100ms) - **With VeraPDF**: Strict ISO 19005 validation (146+ rules, 2-10s) - Detects PDF/A version (PDF/A-1, PDF/A-3, etc.) - Detailed non-compliance reports ### 3. XMP metadata - Verifies presence of XMP metadata in PDF - Validates Factur-X metadata compliance (profile, version) - Extracts all available XMP metadata ### 4. Electronic signatures - Detects presence of electronic signatures or seals - Extracts information about each signature (signer, date, reason) - Counts number of signatures present ## Parameters - **pdf_file**: The Factur-X PDF file to validate - **profile**: Expected Factur-X profile (optional). If not specified, profile will be auto-detected from embedded XML file. - **use_verapdf**: Enable strict PDF/A validation with VeraPDF. ⚠️ **Warning**: VeraPDF can take 2-10 seconds depending on PDF size. Recommended only in asynchronous mode to avoid timeouts. ## Retrieving results After submission, use `GET /tasks/{task_id}/status` endpoint to retrieve the result. **Polling example**: ```python import requests import time # 1. Submit task response = requests.post(\"/validate-facturx-async\", files={\"pdf_file\": pdf_file}) task_id = response.json()[\"taskId\"] # 2. Poll every 2 seconds while True: status_response = requests.get(f\"/tasks/{task_id}/status\") status = status_response.json() if status[\"status\"] == \"SUCCESS\": result = status[\"result\"][\"validation_result\"] print(f\"Compliant: {result[\'is_compliant\']}\") break elif status[\"status\"] == \"FAILURE\": print(f\"Error: {status[\'result\'][\'errorMessage\']}\") break time.sleep(2) # Wait 2 seconds before next check ``` ## Use cases - Validate invoices before sending with VeraPDF (strict validation) - Process invoice batches in parallel - Integrate validation into an asynchronous pipeline - Validate large PDFs without timeout risk
|
|
675
|
+
* @summary Validate a Factur-X PDF (asynchronous with polling)
|
|
676
|
+
* @param {File} pdfFile Factur-X PDF file to validate (.pdf format).
|
|
677
|
+
* @param {APIProfile | null} [profile]
|
|
678
|
+
* @param {boolean} [useVerapdf] Enable strict PDF/A validation with VeraPDF (recommended for production). May take several seconds.
|
|
679
|
+
* @param {*} [options] Override http request option.
|
|
680
|
+
* @throws {RequiredError}
|
|
681
|
+
*/
|
|
682
|
+
validateFacturxPdfAsyncApiV1ProcessingValidateFacturxAsyncPost(pdfFile, profile, useVerapdf, options) {
|
|
683
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
684
|
+
var _a, _b, _c;
|
|
685
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.validateFacturxPdfAsyncApiV1ProcessingValidateFacturxAsyncPost(pdfFile, profile, useVerapdf, options);
|
|
686
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
687
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['InvoiceProcessingApi.validateFacturxPdfAsyncApiV1ProcessingValidateFacturxAsyncPost']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
688
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
689
|
+
});
|
|
690
|
+
},
|
|
691
|
+
/**
|
|
692
|
+
* Validates electronic signatures present in an uploaded PDF. **Verifications performed**: - Presence of signatures - Document integrity (not modified since signing) - Certificate validity - Chain of trust (if available) - Presence of timestamp (PAdES-B-T) - Validation data (PAdES-B-LT) **Supported standards**: PAdES-B-B, PAdES-B-T, PAdES-B-LT, ISO 32000-2. **⚠️ Note**: This validation is technical (cryptographic integrity). Legal validity depends on the eIDAS level of the certificate (SES/AdES/QES) and the context of use.
|
|
693
|
+
* @summary Validate electronic signatures of a PDF
|
|
694
|
+
* @param {File} pdfFile PDF file to validate (will be analyzed to detect and validate signatures)
|
|
695
|
+
* @param {*} [options] Override http request option.
|
|
696
|
+
* @throws {RequiredError}
|
|
697
|
+
*/
|
|
698
|
+
validatePdfSignatureEndpointApiV1ProcessingValidatePdfSignaturePost(pdfFile, options) {
|
|
699
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
700
|
+
var _a, _b, _c;
|
|
701
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.validatePdfSignatureEndpointApiV1ProcessingValidatePdfSignaturePost(pdfFile, options);
|
|
702
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
703
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['InvoiceProcessingApi.validatePdfSignatureEndpointApiV1ProcessingValidatePdfSignaturePost']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
704
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
705
|
+
});
|
|
706
|
+
},
|
|
707
|
+
/**
|
|
708
|
+
* Validates a Factur-X XML file against Schematron business rules according to EN 16931 standard. ## Applied Standard **Schematron ISO/IEC 19757-3**: Business rules validation language for XML - Semantic validation (beyond XSD syntax) - European EN 16931 business rules - French-specific Factur-X rules - Arithmetic calculations and data consistency ## Profiles and validated rules ### MINIMUM (45 rules) - Unique invoice identifier - Dates (issue, due date) - Party identifiers (SIRET/SIREN) - Total gross amount ### BASIC (102 rules) - All MINIMUM rules - Detailed invoice lines - Basic VAT calculations - Payment methods - References (order, contract) ### EN16931 (178 rules) - All BASIC rules - **European rules (BR-xx)**: 81 business rules - **French rules (FR-xx)**: 12 France-specific rules - **Advanced calculations (CR-xx)**: 32 calculation rules - **Standardized codes (CL-xx)**: 52 code lists ### EXTENDED (210+ rules) - All EN16931 rules - Logistics information - Advanced accounting data - Multiple external references ## Checks performed ### 1. Syntax validation - Correct XML parsing (UTF-8, well-formed) - UN/CEFACT namespaces present - Hierarchical structure respected ### 2. Business rules (BR-xx) Examples: - `BR-1`: Invoice total must equal sum of line totals + document-level amounts - `BR-CO-10`: Sum of VAT base amounts must equal invoice net total - `BR-16`: Invoice currency code must be in ISO 4217 list ### 3. French rules (FR-xx) Examples: - `FR-1`: Supplier SIRET must have 14 digits - `FR-2`: Customer SIRET must have 14 digits (if present) - `FR-5`: Intra-EU VAT number must be in format FRxx999999999 ### 4. Calculation rules (CR-xx) - Net + VAT = Gross amounts - Sum of lines = Document total - Discounts and surcharges correctly applied - Compliant rounding (2 decimals for amounts) ### 5. Standardized codes (CL-xx) - ISO 3166-1 alpha-2 country codes - ISO 4217 currency codes - UN/ECE Rec 20 measurement units - VAT codes (types, categories, exemptions) - SchemeID for identifiers (0002=SIREN, 0009=SIRET, etc.) ## Validation process 1. **XSLT loading**: Schematron file converted to XSLT (Saxon-HE) 2. **Transformation**: Rules applied to XML 3. **Results analysis**: Extraction of errors (`failed-assert`) and warnings (`successful-report`) 4. **Report**: Structured list of non-conformities ## Responses **200 OK**: Compliant XML ```json { \"message\": \"XML is compliant with EN16931 profile\" } ``` **400 Bad Request**: Non-compliant XML ```json { \"detail\": [ \"[BR-1] Invoice total (120.00) does not match calculated sum (100.00 + 20.00)\", \"[FR-1] Supplier SIRET must contain exactly 14 digits\" ] } ``` ## Use cases - **Pre-validation**: Verify XML before PDF/A integration - **Debugging**: Precisely identify generation errors - **Testing**: Validate test or example XMLs - **Compliance**: Ensure European and French rules are met - **Development**: Quick testing without PDF generation ## Processing time - MINIMUM profile: ~0.5 second - EN16931 profile: ~1-2 seconds - EXTENDED profile: ~2-3 seconds
|
|
709
|
+
* @summary Validate an existing Factur-X XML
|
|
710
|
+
* @param {File} xmlFile Factur-X XML file to validate (.xml format).
|
|
711
|
+
* @param {APIProfile} [profile] Validation profile (MINIMUM, BASIC, EN16931, EXTENDED).
|
|
712
|
+
* @param {*} [options] Override http request option.
|
|
713
|
+
* @throws {RequiredError}
|
|
714
|
+
*/
|
|
715
|
+
validateXmlApiV1ProcessingValidateXmlPost(xmlFile, profile, options) {
|
|
716
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
717
|
+
var _a, _b, _c;
|
|
718
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.validateXmlApiV1ProcessingValidateXmlPost(xmlFile, profile, options);
|
|
719
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
720
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['InvoiceProcessingApi.validateXmlApiV1ProcessingValidateXmlPost']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
721
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
722
|
+
});
|
|
723
|
+
},
|
|
724
|
+
};
|
|
725
|
+
};
|
|
726
|
+
/**
|
|
727
|
+
* InvoiceProcessingApi - factory interface
|
|
728
|
+
*/
|
|
729
|
+
export const InvoiceProcessingApiFactory = function (configuration, basePath, axios) {
|
|
730
|
+
const localVarFp = InvoiceProcessingApiFp(configuration);
|
|
731
|
+
return {
|
|
732
|
+
/**
|
|
733
|
+
* Generates an electronic invoice in Factur-X format compliant with European standards. ## Applied Standards - **Factur-X** (France): FNFE-MPE standard (Forum National de la Facture Électronique) - **ZUGFeRD** (Germany): German format compatible with Factur-X - **EN 16931**: European semantic standard for electronic invoicing - **ISO 19005-3** (PDF/A-3): Long-term electronic archiving - **Cross Industry Invoice (CII)**: UN/CEFACT XML syntax ## 🆕 New: Simplified format with auto-enrichment (P0.1) You can now create an invoice by providing only: - An invoice number - A sender SIRET + **IBAN** (required) - A recipient SIRET - Invoice lines (description, quantity, net price) **Simplified format example**: ```json { \"number\": \"FACT-2025-001\", \"sender\": { \"siret\": \"92019522900017\", \"iban\": \"FR7630001007941234567890185\" }, \"recipient\": {\"siret\": \"35600000000048\"}, \"lines\": [ {\"description\": \"Service\", \"quantity\": 10, \"unitPrice\": 100.00, \"vatRate\": 20.0} ] } ``` **⚠️ Required fields (simplified format)**: - `number`: Unique invoice number - `sender.siret`: Sender\'s SIRET (14 digits) - `sender.iban`: Bank account IBAN (no public API to retrieve it) - `recipient.siret`: Recipient\'s SIRET - `lines[]`: At least one invoice line **What happens automatically with `auto_enrich=True`**: - ✅ Name enrichment from Chorus Pro API - ✅ Address enrichment from Business Search API (free, public) - ✅ Automatic intra-EU VAT calculation (FR + key + SIREN) - ✅ Chorus Pro ID retrieval for electronic invoicing - ✅ Net/VAT/Gross totals calculation - ✅ Date generation (today + 30-day due date) - ✅ Multi-rate VAT handling **Supported identifiers**: - SIRET (14 digits): Specific establishment ⭐ Recommended - SIREN (9 digits): Company (auto-selection of headquarters) - Special types: UE_HORS_FRANCE, RIDET, TAHITI, etc. ## Checks performed during generation ### 1. Data validation (Pydantic) - Data types (amounts as Decimal, ISO 8601 dates) - Formats (14-digit SIRET, 9-digit SIREN, IBAN) - Required fields per profile - Amount consistency (Net + VAT = Gross) ### 2. CII-compliant XML generation - Serialization according to Cross Industry Invoice XSD schema - Correct UN/CEFACT namespaces - Hierarchical structure respected - UTF-8 encoding without BOM ### 3. Schematron validation - Business rules for selected profile (MINIMUM, BASIC, EN16931, EXTENDED) - Element cardinality (required, optional, repeatable) - Calculation rules (totals, VAT, discounts) - European EN 16931 compliance ### 4. PDF/A-3 conversion (if output_format=\'pdf\') - Source PDF conversion to PDF/A-3 via Ghostscript - Factur-X XML embedding in PDF - Compliant XMP metadata - ICC sRGB color profile - Removal of forbidden elements (JavaScript, forms) ## How it works 1. **Submission**: Invoice is queued in Celery for asynchronous processing 2. **Immediate return**: You receive a `task_id` (HTTP 202 Accepted) 3. **Tracking**: Use the `/tasks/{task_id}/status` endpoint to track progress ## Output formats - **xml**: Generates only Factur-X XML (recommended for testing) - **pdf**: Generates PDF/A-3 with embedded XML (requires `source_pdf`) ## Factur-X profiles - **MINIMUM**: Minimal data (simplified invoice) - **BASIC**: Basic information (SMEs) - **EN16931**: European standard (recommended, compliant with directive 2014/55/EU) - **EXTENDED**: All available data (large accounts) ## What you get After successful processing (status `completed`): - **XML only**: Base64-encoded Factur-X compliant XML file - **PDF/A-3**: PDF with embedded XML, ready for sending/archiving - **Metadata**: Profile, Factur-X version, file size - **Validation**: Schematron compliance confirmation ## Validation Data is automatically validated according to detected format. On error, a 422 status is returned with invalid field details.
|
|
734
|
+
* @summary Generate a Factur-X invoice
|
|
735
|
+
* @param {string} invoiceData Invoice data in JSON format. Two formats accepted: 1. **Classic format**: Complete FactureFacturX structure (all fields) 2. **Simplified format** (🆕 P0.1): Minimal structure with auto-enrichment Format is detected automatically!
|
|
736
|
+
* @param {APIProfile} [profile] Factur-X profile: MINIMUM, BASIC, EN16931 or EXTENDED.
|
|
737
|
+
* @param {OutputFormat} [outputFormat] Output format: \\\'xml\\\' (XML only) or \\\'pdf\\\' (Factur-X PDF with embedded XML).
|
|
738
|
+
* @param {boolean} [autoEnrich] 🆕 Enable auto-enrichment from SIRET/SIREN (simplified format only)
|
|
739
|
+
* @param {File | null} [sourcePdf]
|
|
740
|
+
* @param {*} [options] Override http request option.
|
|
741
|
+
* @throws {RequiredError}
|
|
742
|
+
*/
|
|
743
|
+
generateInvoiceApiV1ProcessingGenerateInvoicePost(invoiceData, profile, outputFormat, autoEnrich, sourcePdf, options) {
|
|
744
|
+
return localVarFp.generateInvoiceApiV1ProcessingGenerateInvoicePost(invoiceData, profile, outputFormat, autoEnrich, sourcePdf, options).then((request) => request(axios, basePath));
|
|
745
|
+
},
|
|
746
|
+
/**
|
|
747
|
+
* Generates a self-signed X.509 certificate for PDF electronic signature testing. **⚠️ WARNING: TEST certificate only!** This certificate is: - ✅ Suitable for testing and development - ✅ Compatible with PDF signing (PAdES) - ✅ Compliant with eIDAS **SES** level (Simple Electronic Signature) - ❌ **NEVER usable in production** - ❌ **Not recognized** by browsers and PDF readers - ❌ **No legal value** ## eIDAS levels - **SES** (Simple): Self-signed certificate ← Generated by this endpoint - **AdES** (Advanced): Commercial CA certificate (Let\'s Encrypt, etc.) - **QES** (Qualified): Qualified certificate from QTSP (CertEurope, Universign, etc.) ## Usage Once generated, the certificate can be: 1. **Saved in Django** (recommended): - Django Admin > Signing Certificates - Upload `certificate_pem` and `private_key_pem` 2. **Used directly**: - Sign a PDF with `/sign-pdf` - The certificate will be automatically used ## Example call ```bash curl -X POST \"https://www.factpulse.fr/api/v1/processing/generate-test-certificate\" \\ -H \"Authorization: Bearer eyJ0eXAi...\" \\ -H \"Content-Type: application/json\" \\ -d \'{ \"cn\": \"Test Client XYZ\", \"organization\": \"Client XYZ Ltd\", \"email\": \"contact@xyz.com\", \"validity_days\": 365 }\' ``` ## Use cases - PDF signature testing in development - Electronic signature POC - Training and demos - Automated integration tests ## Technical compliance Certificate generated with: - RSA key 2048 or 4096 bits - SHA-256 algorithm - Key Usage extensions: `digitalSignature`, `contentCommitment` (non-repudiation) - Extended Key Usage extensions: `codeSigning`, `emailProtection` - Validity: 1 day to 10 years (configurable) - Format: PEM (certificate and key) - Optional: PKCS#12 (.p12)
|
|
748
|
+
* @summary Generate a self-signed X.509 test certificate
|
|
749
|
+
* @param {GenerateCertificateRequest} generateCertificateRequest
|
|
750
|
+
* @param {*} [options] Override http request option.
|
|
751
|
+
* @throws {RequiredError}
|
|
752
|
+
*/
|
|
753
|
+
generateTestCertificateApiV1ProcessingGenerateTestCertificatePost(generateCertificateRequest, options) {
|
|
754
|
+
return localVarFp.generateTestCertificateApiV1ProcessingGenerateTestCertificatePost(generateCertificateRequest, options).then((request) => request(axios, basePath));
|
|
755
|
+
},
|
|
756
|
+
/**
|
|
757
|
+
* Retrieves the progress status of an invoice generation task. ## Possible states The `status` field uses the `CeleryStatus` enum with values: - **PENDING, STARTED, SUCCESS, FAILURE, RETRY** See the `CeleryStatus` schema documentation for details. ## Business result When `status=\"SUCCESS\"`, the `result` field contains: - `status`: \"SUCCESS\" or \"ERROR\" (business result) - `content_b64`: Base64 encoded content (if success) - `errorCode`, `errorMessage`, `details`: AFNOR format (if business error) ## Usage Poll this endpoint every 2-3 seconds until `status` is `SUCCESS` or `FAILURE`.
|
|
758
|
+
* @summary Get task generation status
|
|
759
|
+
* @param {string} taskId
|
|
760
|
+
* @param {*} [options] Override http request option.
|
|
761
|
+
* @throws {RequiredError}
|
|
762
|
+
*/
|
|
763
|
+
getTaskStatusApiV1ProcessingTasksTaskIdStatusGet(taskId, options) {
|
|
764
|
+
return localVarFp.getTaskStatusApiV1ProcessingTasksTaskIdStatusGet(taskId, options).then((request) => request(axios, basePath));
|
|
765
|
+
},
|
|
766
|
+
/**
|
|
767
|
+
* Signs an uploaded PDF with the electronic certificate configured for the client (via client_uid from JWT). **Supported standards**: PAdES-B-B, PAdES-B-T (timestamping), PAdES-B-LT (long-term archiving). **eIDAS levels**: SES (self-signed), AdES (commercial CA), QES (PSCO - out of scope). **Security**: Double authentication X-Internal-Secret + JWT Bearer to retrieve the certificate. **⚠️ Legal disclaimer**: Generated signatures are electronic seals as defined by the eIDAS regulation. The level of legal validity depends on the certificate used (SES/AdES/QES). FactPulse does not provide QES qualified certificates - you must obtain a certificate from a PSCO (qualified Trust Service Provider) for maximum legal validity.
|
|
768
|
+
* @summary Sign a PDF with client\'s certificate (PAdES-B-LT)
|
|
769
|
+
* @param {File} pdfFile PDF file to sign (will be processed and returned signed in base64)
|
|
770
|
+
* @param {string | null} [reason]
|
|
771
|
+
* @param {string | null} [location]
|
|
772
|
+
* @param {string | null} [contact]
|
|
773
|
+
* @param {string} [fieldName] PDF signature field name
|
|
774
|
+
* @param {boolean} [usePadesLt] Enable PAdES-B-LT (long-term archiving with embedded validation data). REQUIRES a certificate with OCSP/CRL access.
|
|
775
|
+
* @param {boolean} [useTimestamp] Enable RFC 3161 timestamping with FreeTSA (PAdES-B-T)
|
|
776
|
+
* @param {*} [options] Override http request option.
|
|
777
|
+
* @throws {RequiredError}
|
|
778
|
+
*/
|
|
779
|
+
signPdfApiV1ProcessingSignPdfPost(pdfFile, reason, location, contact, fieldName, usePadesLt, useTimestamp, options) {
|
|
780
|
+
return localVarFp.signPdfApiV1ProcessingSignPdfPost(pdfFile, reason, location, contact, fieldName, usePadesLt, useTimestamp, options).then((request) => request(axios, basePath));
|
|
781
|
+
},
|
|
782
|
+
/**
|
|
783
|
+
* Signs an uploaded PDF asynchronously via a Celery task. **Difference with /sign-pdf**: - `/sign-pdf`: Synchronous signature (blocking until completion) - `/sign-pdf-async`: Asynchronous signature (returns immediately with task_id) **Async advantages**: - No timeout for large files - No blocking of FastAPI worker - Progress tracking via task_id - Ideal for batch processing **Supported standards**: PAdES-B-B, PAdES-B-T (timestamping), PAdES-B-LT (long-term archiving). **⚠️ Legal disclaimer**: Same as /sign-pdf (see that endpoint\'s documentation).
|
|
784
|
+
* @summary Sign a PDF asynchronously (Celery)
|
|
785
|
+
* @param {File} pdfFile PDF file to sign (processed asynchronously)
|
|
786
|
+
* @param {string | null} [reason]
|
|
787
|
+
* @param {string | null} [location]
|
|
788
|
+
* @param {string | null} [contact]
|
|
789
|
+
* @param {string} [fieldName] PDF signature field name
|
|
790
|
+
* @param {boolean} [usePadesLt] Enable PAdES-B-LT (long-term archiving with embedded validation data). REQUIRES a certificate with OCSP/CRL access.
|
|
791
|
+
* @param {boolean} [useTimestamp] Enable RFC 3161 timestamping with FreeTSA (PAdES-B-T)
|
|
792
|
+
* @param {*} [options] Override http request option.
|
|
793
|
+
* @throws {RequiredError}
|
|
794
|
+
*/
|
|
795
|
+
signPdfAsyncApiV1ProcessingSignPdfAsyncPost(pdfFile, reason, location, contact, fieldName, usePadesLt, useTimestamp, options) {
|
|
796
|
+
return localVarFp.signPdfAsyncApiV1ProcessingSignPdfAsyncPost(pdfFile, reason, location, contact, fieldName, usePadesLt, useTimestamp, options).then((request) => request(axios, basePath));
|
|
797
|
+
},
|
|
798
|
+
/**
|
|
799
|
+
* Unified endpoint to submit a complete invoice to different destinations. **Automated workflow:** 1. **Auto-enrichment** (optional): retrieves data via public APIs and Chorus Pro/AFNOR 2. **Factur-X PDF generation**: creates a PDF/A-3 with embedded XML 3. **Electronic signature** (optional): signs the PDF with a certificate 4. **Submission**: sends to the chosen destination (Chorus Pro or AFNOR PDP) **Supported destinations:** - **Chorus Pro**: French B2G platform (invoices to public sector) - **AFNOR PDP**: Partner Dematerialization Platforms **Destination credentials - 2 modes available:** **Mode 1 - Retrieval via JWT (recommended):** - Credentials are retrieved automatically via the JWT `client_uid` - Do not provide the `credentials` field in `destination` - Zero-trust architecture: no secrets in the payload - Example: `\"destination\": {\"type\": \"chorus_pro\"}` **Mode 2 - Credentials in the payload:** - Provide credentials directly in the payload - Useful for tests or third-party integrations - Example: `\"destination\": {\"type\": \"chorus_pro\", \"credentials\": {...}}` **Electronic signature (optional) - 2 modes available:** **Mode 1 - Stored certificate (recommended):** - Certificate is retrieved automatically via the JWT `client_uid` - No key to provide in the payload - PAdES-B-LT signature with timestamp (eIDAS compliant) - Example: `\"signature\": {\"reason\": \"Factur-X compliance\"}` **Mode 2 - Keys in the payload (for tests):** - Provide `key_pem` and `cert_pem` directly - PEM format accepted: raw or base64 - Useful for tests or special cases without stored certificate - Example: `\"signature\": {\"key_pem\": \"-----BEGIN...\", \"cert_pem\": \"-----BEGIN...\"}` If `key_pem` and `cert_pem` are provided → Mode 2 Otherwise → Mode 1 (certificate retrieved via `client_uid`)
|
|
800
|
+
* @summary Submit a complete invoice (generation + signature + submission)
|
|
801
|
+
* @param {SubmitCompleteInvoiceRequest} submitCompleteInvoiceRequest
|
|
802
|
+
* @param {*} [options] Override http request option.
|
|
803
|
+
* @throws {RequiredError}
|
|
804
|
+
*/
|
|
805
|
+
submitCompleteInvoiceApiV1ProcessingInvoicesSubmitCompletePost(submitCompleteInvoiceRequest, options) {
|
|
806
|
+
return localVarFp.submitCompleteInvoiceApiV1ProcessingInvoicesSubmitCompletePost(submitCompleteInvoiceRequest, options).then((request) => request(axios, basePath));
|
|
807
|
+
},
|
|
808
|
+
/**
|
|
809
|
+
* Asynchronous version of the `/invoices/submit-complete` endpoint using Celery for background processing. **Automated workflow (same as synchronous version):** 1. **Auto-enrichment** (optional): retrieves data via public APIs and Chorus Pro/AFNOR 2. **Factur-X PDF generation**: creates a PDF/A-3 with embedded XML 3. **Electronic signature** (optional): signs the PDF with a certificate 4. **Submission**: sends to the chosen destination (Chorus Pro or AFNOR PDP) **Supported destinations:** - **Chorus Pro**: French B2G platform (invoices to public sector) - **AFNOR PDP**: Partner Dematerialization Platforms **Differences with synchronous version:** - ✅ **Non-blocking**: Returns immediately with a `task_id` (HTTP 202 Accepted) - ✅ **Background processing**: Invoice is processed by a Celery worker - ✅ **Progress tracking**: Use `/tasks/{task_id}/status` to track status - ✅ **Ideal for high volumes**: Allows processing many invoices in parallel **How to use:** 1. **Submission**: Call this endpoint with your invoice data 2. **Immediate return**: You receive a `task_id` (e.g., \"abc123-def456\") 3. **Tracking**: Call `/tasks/{task_id}/status` to check progress 4. **Result**: When `status = \"SUCCESS\"`, the `result` field contains the complete response **Credentials and signature**: Same modes as the synchronous version (JWT or payload).
|
|
810
|
+
* @summary Submit a complete invoice (asynchronous with Celery)
|
|
811
|
+
* @param {SubmitCompleteInvoiceRequest} submitCompleteInvoiceRequest
|
|
812
|
+
* @param {*} [options] Override http request option.
|
|
813
|
+
* @throws {RequiredError}
|
|
814
|
+
*/
|
|
815
|
+
submitCompleteInvoiceAsyncApiV1ProcessingInvoicesSubmitCompleteAsyncPost(submitCompleteInvoiceRequest, options) {
|
|
816
|
+
return localVarFp.submitCompleteInvoiceAsyncApiV1ProcessingInvoicesSubmitCompleteAsyncPost(submitCompleteInvoiceRequest, options).then((request) => request(axios, basePath));
|
|
817
|
+
},
|
|
818
|
+
/**
|
|
819
|
+
* Validates a complete Factur-X PDF according to European and French standards. ## Applied validation standards - **EN 16931**: European semantic standard (directive 2014/55/EU) - **ISO 19005-3** (PDF/A-3): Long-term electronic archiving - **Factur-X / ZUGFeRD**: Franco-German specification - **Schematron**: XML business rules validation - **eIDAS**: European regulation on electronic identification (signatures) ## Checks performed ### 1. Factur-X XML extraction and validation **Checks performed:** - Presence of embedded XML file (`factur-x.xml` or `zugferd-invoice.xml`) - Automatic profile detection (MINIMUM, BASIC, EN16931, EXTENDED) - XML parsing with UTF-8 validation - GuidelineSpecifiedDocumentContextParameter/ID extraction **Schematron validation:** - Business rules for detected profile (MINIMUM: 45 rules, EN16931: 178 rules) - Cardinality of required elements - Calculation consistency (net, VAT, gross amounts, discounts) - Identifier formats (SIRET, intra-EU VAT, IBAN) - Standardized codes (ISO country codes, UN/ECE units, VAT codes) **What is verified:** - ✅ XML structure conforming to Cross Industry Invoice XSD - ✅ Correct UN/CEFACT namespace - ✅ European business rules (BR-xx) - ✅ French-specific rules (FR-xx) ### 2. PDF/A-3 compliance **Basic validation (metadata):** - Presence of `/Type` field set to `Catalog` - Metadata `pdfaid:part` = 3 (PDF/A-3) - Metadata `pdfaid:conformance` = B or U - PDF version >= 1.4 **Strict VeraPDF validation (if use_verapdf=True):** - 146+ ISO 19005-3 rules (PDF/A-3B) - Absence of forbidden content (JavaScript, multimedia, dynamic forms) - Correctly embedded fonts and subsets - Compliant color spaces (sRGB, DeviceGray) - Valid file structure (cross-reference table) - XMP metadata conforming to ISO 16684-1 **What is verified:** - ✅ Long-term archivable file (20+ years) - ✅ Guaranteed readability (embedded fonts) - ✅ Legal compliance (France, Germany, EU) ### 3. XMP metadata (eXtensible Metadata Platform) **Checks performed:** - Presence of `<?xpacket>` block with XMP metadata - `fx:` namespace for Factur-X: `urn:factur-x:pdfa:CrossIndustryDocument:invoice:1p0#` - Required Factur-X fields: - `fx:ConformanceLevel`: Profile (MINIMUM, BASIC, EN16931, EXTENDED) - `fx:DocumentFileName`: Embedded XML name - `fx:DocumentType`: \"INVOICE\" - `fx:Version`: Factur-X version (1.0.07) **What is verified:** - ✅ Metadata conforming to ISO 16684-1 - ✅ Correct declared Factur-X profile - ✅ Supported Factur-X version ### 4. Electronic signatures **Detection and analysis:** - Presence of `/Sig` dictionaries in PDF - Signature type: PAdES (PDF Advanced Electronic Signature) - Information extraction: - Signer name (`/Name`) - Signing date (`/M`) - Signature reason (`/Reason`) - Signature location (`/Location`) - Signature type (approval, certification) **What is verified:** - ✅ Presence of signatures or seals - ✅ Number of signatures (single or multi-signature) - ℹ️ No cryptographic verification (requires certificates) ## Parameters - **pdf_file** (required): The Factur-X PDF file to validate - **profile** (optional): Expected profile. If absent, auto-detected from XML - **use_verapdf** (optional, default=false): Enable strict PDF/A validation with VeraPDF - `false`: Fast metadata validation (2-3 seconds) - `true`: Complete ISO 19005-3 validation (15-30 seconds, **recommended for production**) ## Detailed response ```json { \"isCompliant\": true, \"xml\": { \"present\": true, \"compliant\": true, \"profile\": \"EN16931\", \"errors\": [] }, \"pdfa\": { \"compliant\": true, \"version\": \"PDF/A-3B\", \"method\": \"verapdf\", \"errors\": [] }, \"xmp\": { \"present\": true, \"compliant\": true, \"metadata\": {...} }, \"signatures\": { \"present\": true, \"count\": 1, \"details\": [...] } } ``` ## Use cases - **Before sending**: Validate generated invoice before transmission to client - **On reception**: Verify compliance of invoice received from supplier - **Audit**: Check quality of invoice batches - **Legal compliance**: Ensure B2B/B2G obligations are met in France - **Debugging**: Identify issues in generation process - **Archiving**: Guarantee long-term validity (PDF/A-3) ## Processing time - Basic validation: 2-3 seconds - VeraPDF validation: 15-30 seconds (depends on PDF size)
|
|
820
|
+
* @summary Validate a complete Factur-X PDF
|
|
821
|
+
* @param {File} pdfFile Factur-X PDF file to validate (.pdf format).
|
|
822
|
+
* @param {APIProfile | null} [profile]
|
|
823
|
+
* @param {boolean} [useVerapdf] Enable strict PDF/A validation with VeraPDF (recommended for production). If False, uses basic metadata validation.
|
|
824
|
+
* @param {*} [options] Override http request option.
|
|
825
|
+
* @throws {RequiredError}
|
|
826
|
+
*/
|
|
827
|
+
validateFacturxPdfApiV1ProcessingValidateFacturxPdfPost(pdfFile, profile, useVerapdf, options) {
|
|
828
|
+
return localVarFp.validateFacturxPdfApiV1ProcessingValidateFacturxPdfPost(pdfFile, profile, useVerapdf, options).then((request) => request(axios, basePath));
|
|
829
|
+
},
|
|
830
|
+
/**
|
|
831
|
+
* Validates a Factur-X PDF asynchronously with polling system. ## How it works 1. **Submission**: PDF is queued for asynchronous validation 2. **Immediate return**: You receive a `task_id` (HTTP 202) 3. **Tracking**: Use the `/tasks/{task_id}/status` endpoint to track progress ## Advantages of asynchronous mode - **No timeout**: Ideal for large PDFs or VeraPDF validation (which can take several seconds) - **Scalability**: Validations are processed by dedicated Celery workers - **Status tracking**: Allows you to monitor validation progress - **Non-blocking**: Your client doesn\'t wait during validation ## When to use this mode? - **VeraPDF validation enabled** (`use_verapdf=True`): Strict validation can take 2-10 seconds - **Large PDF files**: PDFs > 1 MB - **Batch processing**: Validating multiple invoices in parallel - **Asynchronous integration**: Your system supports polling ## Checks performed ### 1. Factur-X XML extraction and validation - Verifies presence of Factur-X compliant embedded XML file - Automatically detects profile used (MINIMUM, BASIC, EN16931, EXTENDED) - Validates XML against detected profile\'s Schematron rules ### 2. PDF/A compliance - **Without VeraPDF**: Basic metadata validation (fast, ~100ms) - **With VeraPDF**: Strict ISO 19005 validation (146+ rules, 2-10s) - Detects PDF/A version (PDF/A-1, PDF/A-3, etc.) - Detailed non-compliance reports ### 3. XMP metadata - Verifies presence of XMP metadata in PDF - Validates Factur-X metadata compliance (profile, version) - Extracts all available XMP metadata ### 4. Electronic signatures - Detects presence of electronic signatures or seals - Extracts information about each signature (signer, date, reason) - Counts number of signatures present ## Parameters - **pdf_file**: The Factur-X PDF file to validate - **profile**: Expected Factur-X profile (optional). If not specified, profile will be auto-detected from embedded XML file. - **use_verapdf**: Enable strict PDF/A validation with VeraPDF. ⚠️ **Warning**: VeraPDF can take 2-10 seconds depending on PDF size. Recommended only in asynchronous mode to avoid timeouts. ## Retrieving results After submission, use `GET /tasks/{task_id}/status` endpoint to retrieve the result. **Polling example**: ```python import requests import time # 1. Submit task response = requests.post(\"/validate-facturx-async\", files={\"pdf_file\": pdf_file}) task_id = response.json()[\"taskId\"] # 2. Poll every 2 seconds while True: status_response = requests.get(f\"/tasks/{task_id}/status\") status = status_response.json() if status[\"status\"] == \"SUCCESS\": result = status[\"result\"][\"validation_result\"] print(f\"Compliant: {result[\'is_compliant\']}\") break elif status[\"status\"] == \"FAILURE\": print(f\"Error: {status[\'result\'][\'errorMessage\']}\") break time.sleep(2) # Wait 2 seconds before next check ``` ## Use cases - Validate invoices before sending with VeraPDF (strict validation) - Process invoice batches in parallel - Integrate validation into an asynchronous pipeline - Validate large PDFs without timeout risk
|
|
832
|
+
* @summary Validate a Factur-X PDF (asynchronous with polling)
|
|
833
|
+
* @param {File} pdfFile Factur-X PDF file to validate (.pdf format).
|
|
834
|
+
* @param {APIProfile | null} [profile]
|
|
835
|
+
* @param {boolean} [useVerapdf] Enable strict PDF/A validation with VeraPDF (recommended for production). May take several seconds.
|
|
836
|
+
* @param {*} [options] Override http request option.
|
|
837
|
+
* @throws {RequiredError}
|
|
838
|
+
*/
|
|
839
|
+
validateFacturxPdfAsyncApiV1ProcessingValidateFacturxAsyncPost(pdfFile, profile, useVerapdf, options) {
|
|
840
|
+
return localVarFp.validateFacturxPdfAsyncApiV1ProcessingValidateFacturxAsyncPost(pdfFile, profile, useVerapdf, options).then((request) => request(axios, basePath));
|
|
841
|
+
},
|
|
842
|
+
/**
|
|
843
|
+
* Validates electronic signatures present in an uploaded PDF. **Verifications performed**: - Presence of signatures - Document integrity (not modified since signing) - Certificate validity - Chain of trust (if available) - Presence of timestamp (PAdES-B-T) - Validation data (PAdES-B-LT) **Supported standards**: PAdES-B-B, PAdES-B-T, PAdES-B-LT, ISO 32000-2. **⚠️ Note**: This validation is technical (cryptographic integrity). Legal validity depends on the eIDAS level of the certificate (SES/AdES/QES) and the context of use.
|
|
844
|
+
* @summary Validate electronic signatures of a PDF
|
|
845
|
+
* @param {File} pdfFile PDF file to validate (will be analyzed to detect and validate signatures)
|
|
846
|
+
* @param {*} [options] Override http request option.
|
|
847
|
+
* @throws {RequiredError}
|
|
848
|
+
*/
|
|
849
|
+
validatePdfSignatureEndpointApiV1ProcessingValidatePdfSignaturePost(pdfFile, options) {
|
|
850
|
+
return localVarFp.validatePdfSignatureEndpointApiV1ProcessingValidatePdfSignaturePost(pdfFile, options).then((request) => request(axios, basePath));
|
|
851
|
+
},
|
|
852
|
+
/**
|
|
853
|
+
* Validates a Factur-X XML file against Schematron business rules according to EN 16931 standard. ## Applied Standard **Schematron ISO/IEC 19757-3**: Business rules validation language for XML - Semantic validation (beyond XSD syntax) - European EN 16931 business rules - French-specific Factur-X rules - Arithmetic calculations and data consistency ## Profiles and validated rules ### MINIMUM (45 rules) - Unique invoice identifier - Dates (issue, due date) - Party identifiers (SIRET/SIREN) - Total gross amount ### BASIC (102 rules) - All MINIMUM rules - Detailed invoice lines - Basic VAT calculations - Payment methods - References (order, contract) ### EN16931 (178 rules) - All BASIC rules - **European rules (BR-xx)**: 81 business rules - **French rules (FR-xx)**: 12 France-specific rules - **Advanced calculations (CR-xx)**: 32 calculation rules - **Standardized codes (CL-xx)**: 52 code lists ### EXTENDED (210+ rules) - All EN16931 rules - Logistics information - Advanced accounting data - Multiple external references ## Checks performed ### 1. Syntax validation - Correct XML parsing (UTF-8, well-formed) - UN/CEFACT namespaces present - Hierarchical structure respected ### 2. Business rules (BR-xx) Examples: - `BR-1`: Invoice total must equal sum of line totals + document-level amounts - `BR-CO-10`: Sum of VAT base amounts must equal invoice net total - `BR-16`: Invoice currency code must be in ISO 4217 list ### 3. French rules (FR-xx) Examples: - `FR-1`: Supplier SIRET must have 14 digits - `FR-2`: Customer SIRET must have 14 digits (if present) - `FR-5`: Intra-EU VAT number must be in format FRxx999999999 ### 4. Calculation rules (CR-xx) - Net + VAT = Gross amounts - Sum of lines = Document total - Discounts and surcharges correctly applied - Compliant rounding (2 decimals for amounts) ### 5. Standardized codes (CL-xx) - ISO 3166-1 alpha-2 country codes - ISO 4217 currency codes - UN/ECE Rec 20 measurement units - VAT codes (types, categories, exemptions) - SchemeID for identifiers (0002=SIREN, 0009=SIRET, etc.) ## Validation process 1. **XSLT loading**: Schematron file converted to XSLT (Saxon-HE) 2. **Transformation**: Rules applied to XML 3. **Results analysis**: Extraction of errors (`failed-assert`) and warnings (`successful-report`) 4. **Report**: Structured list of non-conformities ## Responses **200 OK**: Compliant XML ```json { \"message\": \"XML is compliant with EN16931 profile\" } ``` **400 Bad Request**: Non-compliant XML ```json { \"detail\": [ \"[BR-1] Invoice total (120.00) does not match calculated sum (100.00 + 20.00)\", \"[FR-1] Supplier SIRET must contain exactly 14 digits\" ] } ``` ## Use cases - **Pre-validation**: Verify XML before PDF/A integration - **Debugging**: Precisely identify generation errors - **Testing**: Validate test or example XMLs - **Compliance**: Ensure European and French rules are met - **Development**: Quick testing without PDF generation ## Processing time - MINIMUM profile: ~0.5 second - EN16931 profile: ~1-2 seconds - EXTENDED profile: ~2-3 seconds
|
|
854
|
+
* @summary Validate an existing Factur-X XML
|
|
855
|
+
* @param {File} xmlFile Factur-X XML file to validate (.xml format).
|
|
856
|
+
* @param {APIProfile} [profile] Validation profile (MINIMUM, BASIC, EN16931, EXTENDED).
|
|
857
|
+
* @param {*} [options] Override http request option.
|
|
858
|
+
* @throws {RequiredError}
|
|
859
|
+
*/
|
|
860
|
+
validateXmlApiV1ProcessingValidateXmlPost(xmlFile, profile, options) {
|
|
861
|
+
return localVarFp.validateXmlApiV1ProcessingValidateXmlPost(xmlFile, profile, options).then((request) => request(axios, basePath));
|
|
862
|
+
},
|
|
863
|
+
};
|
|
864
|
+
};
|
|
865
|
+
/**
|
|
866
|
+
* InvoiceProcessingApi - object-oriented interface
|
|
867
|
+
*/
|
|
868
|
+
export class InvoiceProcessingApi extends BaseAPI {
|
|
869
|
+
/**
|
|
870
|
+
* Generates an electronic invoice in Factur-X format compliant with European standards. ## Applied Standards - **Factur-X** (France): FNFE-MPE standard (Forum National de la Facture Électronique) - **ZUGFeRD** (Germany): German format compatible with Factur-X - **EN 16931**: European semantic standard for electronic invoicing - **ISO 19005-3** (PDF/A-3): Long-term electronic archiving - **Cross Industry Invoice (CII)**: UN/CEFACT XML syntax ## 🆕 New: Simplified format with auto-enrichment (P0.1) You can now create an invoice by providing only: - An invoice number - A sender SIRET + **IBAN** (required) - A recipient SIRET - Invoice lines (description, quantity, net price) **Simplified format example**: ```json { \"number\": \"FACT-2025-001\", \"sender\": { \"siret\": \"92019522900017\", \"iban\": \"FR7630001007941234567890185\" }, \"recipient\": {\"siret\": \"35600000000048\"}, \"lines\": [ {\"description\": \"Service\", \"quantity\": 10, \"unitPrice\": 100.00, \"vatRate\": 20.0} ] } ``` **⚠️ Required fields (simplified format)**: - `number`: Unique invoice number - `sender.siret`: Sender\'s SIRET (14 digits) - `sender.iban`: Bank account IBAN (no public API to retrieve it) - `recipient.siret`: Recipient\'s SIRET - `lines[]`: At least one invoice line **What happens automatically with `auto_enrich=True`**: - ✅ Name enrichment from Chorus Pro API - ✅ Address enrichment from Business Search API (free, public) - ✅ Automatic intra-EU VAT calculation (FR + key + SIREN) - ✅ Chorus Pro ID retrieval for electronic invoicing - ✅ Net/VAT/Gross totals calculation - ✅ Date generation (today + 30-day due date) - ✅ Multi-rate VAT handling **Supported identifiers**: - SIRET (14 digits): Specific establishment ⭐ Recommended - SIREN (9 digits): Company (auto-selection of headquarters) - Special types: UE_HORS_FRANCE, RIDET, TAHITI, etc. ## Checks performed during generation ### 1. Data validation (Pydantic) - Data types (amounts as Decimal, ISO 8601 dates) - Formats (14-digit SIRET, 9-digit SIREN, IBAN) - Required fields per profile - Amount consistency (Net + VAT = Gross) ### 2. CII-compliant XML generation - Serialization according to Cross Industry Invoice XSD schema - Correct UN/CEFACT namespaces - Hierarchical structure respected - UTF-8 encoding without BOM ### 3. Schematron validation - Business rules for selected profile (MINIMUM, BASIC, EN16931, EXTENDED) - Element cardinality (required, optional, repeatable) - Calculation rules (totals, VAT, discounts) - European EN 16931 compliance ### 4. PDF/A-3 conversion (if output_format=\'pdf\') - Source PDF conversion to PDF/A-3 via Ghostscript - Factur-X XML embedding in PDF - Compliant XMP metadata - ICC sRGB color profile - Removal of forbidden elements (JavaScript, forms) ## How it works 1. **Submission**: Invoice is queued in Celery for asynchronous processing 2. **Immediate return**: You receive a `task_id` (HTTP 202 Accepted) 3. **Tracking**: Use the `/tasks/{task_id}/status` endpoint to track progress ## Output formats - **xml**: Generates only Factur-X XML (recommended for testing) - **pdf**: Generates PDF/A-3 with embedded XML (requires `source_pdf`) ## Factur-X profiles - **MINIMUM**: Minimal data (simplified invoice) - **BASIC**: Basic information (SMEs) - **EN16931**: European standard (recommended, compliant with directive 2014/55/EU) - **EXTENDED**: All available data (large accounts) ## What you get After successful processing (status `completed`): - **XML only**: Base64-encoded Factur-X compliant XML file - **PDF/A-3**: PDF with embedded XML, ready for sending/archiving - **Metadata**: Profile, Factur-X version, file size - **Validation**: Schematron compliance confirmation ## Validation Data is automatically validated according to detected format. On error, a 422 status is returned with invalid field details.
|
|
871
|
+
* @summary Generate a Factur-X invoice
|
|
872
|
+
* @param {string} invoiceData Invoice data in JSON format. Two formats accepted: 1. **Classic format**: Complete FactureFacturX structure (all fields) 2. **Simplified format** (🆕 P0.1): Minimal structure with auto-enrichment Format is detected automatically!
|
|
873
|
+
* @param {APIProfile} [profile] Factur-X profile: MINIMUM, BASIC, EN16931 or EXTENDED.
|
|
874
|
+
* @param {OutputFormat} [outputFormat] Output format: \\\'xml\\\' (XML only) or \\\'pdf\\\' (Factur-X PDF with embedded XML).
|
|
875
|
+
* @param {boolean} [autoEnrich] 🆕 Enable auto-enrichment from SIRET/SIREN (simplified format only)
|
|
876
|
+
* @param {File | null} [sourcePdf]
|
|
877
|
+
* @param {*} [options] Override http request option.
|
|
878
|
+
* @throws {RequiredError}
|
|
879
|
+
*/
|
|
880
|
+
generateInvoiceApiV1ProcessingGenerateInvoicePost(invoiceData, profile, outputFormat, autoEnrich, sourcePdf, options) {
|
|
881
|
+
return InvoiceProcessingApiFp(this.configuration).generateInvoiceApiV1ProcessingGenerateInvoicePost(invoiceData, profile, outputFormat, autoEnrich, sourcePdf, options).then((request) => request(this.axios, this.basePath));
|
|
882
|
+
}
|
|
883
|
+
/**
|
|
884
|
+
* Generates a self-signed X.509 certificate for PDF electronic signature testing. **⚠️ WARNING: TEST certificate only!** This certificate is: - ✅ Suitable for testing and development - ✅ Compatible with PDF signing (PAdES) - ✅ Compliant with eIDAS **SES** level (Simple Electronic Signature) - ❌ **NEVER usable in production** - ❌ **Not recognized** by browsers and PDF readers - ❌ **No legal value** ## eIDAS levels - **SES** (Simple): Self-signed certificate ← Generated by this endpoint - **AdES** (Advanced): Commercial CA certificate (Let\'s Encrypt, etc.) - **QES** (Qualified): Qualified certificate from QTSP (CertEurope, Universign, etc.) ## Usage Once generated, the certificate can be: 1. **Saved in Django** (recommended): - Django Admin > Signing Certificates - Upload `certificate_pem` and `private_key_pem` 2. **Used directly**: - Sign a PDF with `/sign-pdf` - The certificate will be automatically used ## Example call ```bash curl -X POST \"https://www.factpulse.fr/api/v1/processing/generate-test-certificate\" \\ -H \"Authorization: Bearer eyJ0eXAi...\" \\ -H \"Content-Type: application/json\" \\ -d \'{ \"cn\": \"Test Client XYZ\", \"organization\": \"Client XYZ Ltd\", \"email\": \"contact@xyz.com\", \"validity_days\": 365 }\' ``` ## Use cases - PDF signature testing in development - Electronic signature POC - Training and demos - Automated integration tests ## Technical compliance Certificate generated with: - RSA key 2048 or 4096 bits - SHA-256 algorithm - Key Usage extensions: `digitalSignature`, `contentCommitment` (non-repudiation) - Extended Key Usage extensions: `codeSigning`, `emailProtection` - Validity: 1 day to 10 years (configurable) - Format: PEM (certificate and key) - Optional: PKCS#12 (.p12)
|
|
885
|
+
* @summary Generate a self-signed X.509 test certificate
|
|
886
|
+
* @param {GenerateCertificateRequest} generateCertificateRequest
|
|
887
|
+
* @param {*} [options] Override http request option.
|
|
888
|
+
* @throws {RequiredError}
|
|
889
|
+
*/
|
|
890
|
+
generateTestCertificateApiV1ProcessingGenerateTestCertificatePost(generateCertificateRequest, options) {
|
|
891
|
+
return InvoiceProcessingApiFp(this.configuration).generateTestCertificateApiV1ProcessingGenerateTestCertificatePost(generateCertificateRequest, options).then((request) => request(this.axios, this.basePath));
|
|
892
|
+
}
|
|
893
|
+
/**
|
|
894
|
+
* Retrieves the progress status of an invoice generation task. ## Possible states The `status` field uses the `CeleryStatus` enum with values: - **PENDING, STARTED, SUCCESS, FAILURE, RETRY** See the `CeleryStatus` schema documentation for details. ## Business result When `status=\"SUCCESS\"`, the `result` field contains: - `status`: \"SUCCESS\" or \"ERROR\" (business result) - `content_b64`: Base64 encoded content (if success) - `errorCode`, `errorMessage`, `details`: AFNOR format (if business error) ## Usage Poll this endpoint every 2-3 seconds until `status` is `SUCCESS` or `FAILURE`.
|
|
895
|
+
* @summary Get task generation status
|
|
896
|
+
* @param {string} taskId
|
|
897
|
+
* @param {*} [options] Override http request option.
|
|
898
|
+
* @throws {RequiredError}
|
|
899
|
+
*/
|
|
900
|
+
getTaskStatusApiV1ProcessingTasksTaskIdStatusGet(taskId, options) {
|
|
901
|
+
return InvoiceProcessingApiFp(this.configuration).getTaskStatusApiV1ProcessingTasksTaskIdStatusGet(taskId, options).then((request) => request(this.axios, this.basePath));
|
|
902
|
+
}
|
|
903
|
+
/**
|
|
904
|
+
* Signs an uploaded PDF with the electronic certificate configured for the client (via client_uid from JWT). **Supported standards**: PAdES-B-B, PAdES-B-T (timestamping), PAdES-B-LT (long-term archiving). **eIDAS levels**: SES (self-signed), AdES (commercial CA), QES (PSCO - out of scope). **Security**: Double authentication X-Internal-Secret + JWT Bearer to retrieve the certificate. **⚠️ Legal disclaimer**: Generated signatures are electronic seals as defined by the eIDAS regulation. The level of legal validity depends on the certificate used (SES/AdES/QES). FactPulse does not provide QES qualified certificates - you must obtain a certificate from a PSCO (qualified Trust Service Provider) for maximum legal validity.
|
|
905
|
+
* @summary Sign a PDF with client\'s certificate (PAdES-B-LT)
|
|
906
|
+
* @param {File} pdfFile PDF file to sign (will be processed and returned signed in base64)
|
|
907
|
+
* @param {string | null} [reason]
|
|
908
|
+
* @param {string | null} [location]
|
|
909
|
+
* @param {string | null} [contact]
|
|
910
|
+
* @param {string} [fieldName] PDF signature field name
|
|
911
|
+
* @param {boolean} [usePadesLt] Enable PAdES-B-LT (long-term archiving with embedded validation data). REQUIRES a certificate with OCSP/CRL access.
|
|
912
|
+
* @param {boolean} [useTimestamp] Enable RFC 3161 timestamping with FreeTSA (PAdES-B-T)
|
|
913
|
+
* @param {*} [options] Override http request option.
|
|
914
|
+
* @throws {RequiredError}
|
|
915
|
+
*/
|
|
916
|
+
signPdfApiV1ProcessingSignPdfPost(pdfFile, reason, location, contact, fieldName, usePadesLt, useTimestamp, options) {
|
|
917
|
+
return InvoiceProcessingApiFp(this.configuration).signPdfApiV1ProcessingSignPdfPost(pdfFile, reason, location, contact, fieldName, usePadesLt, useTimestamp, options).then((request) => request(this.axios, this.basePath));
|
|
918
|
+
}
|
|
919
|
+
/**
|
|
920
|
+
* Signs an uploaded PDF asynchronously via a Celery task. **Difference with /sign-pdf**: - `/sign-pdf`: Synchronous signature (blocking until completion) - `/sign-pdf-async`: Asynchronous signature (returns immediately with task_id) **Async advantages**: - No timeout for large files - No blocking of FastAPI worker - Progress tracking via task_id - Ideal for batch processing **Supported standards**: PAdES-B-B, PAdES-B-T (timestamping), PAdES-B-LT (long-term archiving). **⚠️ Legal disclaimer**: Same as /sign-pdf (see that endpoint\'s documentation).
|
|
921
|
+
* @summary Sign a PDF asynchronously (Celery)
|
|
922
|
+
* @param {File} pdfFile PDF file to sign (processed asynchronously)
|
|
923
|
+
* @param {string | null} [reason]
|
|
924
|
+
* @param {string | null} [location]
|
|
925
|
+
* @param {string | null} [contact]
|
|
926
|
+
* @param {string} [fieldName] PDF signature field name
|
|
927
|
+
* @param {boolean} [usePadesLt] Enable PAdES-B-LT (long-term archiving with embedded validation data). REQUIRES a certificate with OCSP/CRL access.
|
|
928
|
+
* @param {boolean} [useTimestamp] Enable RFC 3161 timestamping with FreeTSA (PAdES-B-T)
|
|
929
|
+
* @param {*} [options] Override http request option.
|
|
930
|
+
* @throws {RequiredError}
|
|
931
|
+
*/
|
|
932
|
+
signPdfAsyncApiV1ProcessingSignPdfAsyncPost(pdfFile, reason, location, contact, fieldName, usePadesLt, useTimestamp, options) {
|
|
933
|
+
return InvoiceProcessingApiFp(this.configuration).signPdfAsyncApiV1ProcessingSignPdfAsyncPost(pdfFile, reason, location, contact, fieldName, usePadesLt, useTimestamp, options).then((request) => request(this.axios, this.basePath));
|
|
934
|
+
}
|
|
935
|
+
/**
|
|
936
|
+
* Unified endpoint to submit a complete invoice to different destinations. **Automated workflow:** 1. **Auto-enrichment** (optional): retrieves data via public APIs and Chorus Pro/AFNOR 2. **Factur-X PDF generation**: creates a PDF/A-3 with embedded XML 3. **Electronic signature** (optional): signs the PDF with a certificate 4. **Submission**: sends to the chosen destination (Chorus Pro or AFNOR PDP) **Supported destinations:** - **Chorus Pro**: French B2G platform (invoices to public sector) - **AFNOR PDP**: Partner Dematerialization Platforms **Destination credentials - 2 modes available:** **Mode 1 - Retrieval via JWT (recommended):** - Credentials are retrieved automatically via the JWT `client_uid` - Do not provide the `credentials` field in `destination` - Zero-trust architecture: no secrets in the payload - Example: `\"destination\": {\"type\": \"chorus_pro\"}` **Mode 2 - Credentials in the payload:** - Provide credentials directly in the payload - Useful for tests or third-party integrations - Example: `\"destination\": {\"type\": \"chorus_pro\", \"credentials\": {...}}` **Electronic signature (optional) - 2 modes available:** **Mode 1 - Stored certificate (recommended):** - Certificate is retrieved automatically via the JWT `client_uid` - No key to provide in the payload - PAdES-B-LT signature with timestamp (eIDAS compliant) - Example: `\"signature\": {\"reason\": \"Factur-X compliance\"}` **Mode 2 - Keys in the payload (for tests):** - Provide `key_pem` and `cert_pem` directly - PEM format accepted: raw or base64 - Useful for tests or special cases without stored certificate - Example: `\"signature\": {\"key_pem\": \"-----BEGIN...\", \"cert_pem\": \"-----BEGIN...\"}` If `key_pem` and `cert_pem` are provided → Mode 2 Otherwise → Mode 1 (certificate retrieved via `client_uid`)
|
|
937
|
+
* @summary Submit a complete invoice (generation + signature + submission)
|
|
938
|
+
* @param {SubmitCompleteInvoiceRequest} submitCompleteInvoiceRequest
|
|
939
|
+
* @param {*} [options] Override http request option.
|
|
940
|
+
* @throws {RequiredError}
|
|
941
|
+
*/
|
|
942
|
+
submitCompleteInvoiceApiV1ProcessingInvoicesSubmitCompletePost(submitCompleteInvoiceRequest, options) {
|
|
943
|
+
return InvoiceProcessingApiFp(this.configuration).submitCompleteInvoiceApiV1ProcessingInvoicesSubmitCompletePost(submitCompleteInvoiceRequest, options).then((request) => request(this.axios, this.basePath));
|
|
944
|
+
}
|
|
945
|
+
/**
|
|
946
|
+
* Asynchronous version of the `/invoices/submit-complete` endpoint using Celery for background processing. **Automated workflow (same as synchronous version):** 1. **Auto-enrichment** (optional): retrieves data via public APIs and Chorus Pro/AFNOR 2. **Factur-X PDF generation**: creates a PDF/A-3 with embedded XML 3. **Electronic signature** (optional): signs the PDF with a certificate 4. **Submission**: sends to the chosen destination (Chorus Pro or AFNOR PDP) **Supported destinations:** - **Chorus Pro**: French B2G platform (invoices to public sector) - **AFNOR PDP**: Partner Dematerialization Platforms **Differences with synchronous version:** - ✅ **Non-blocking**: Returns immediately with a `task_id` (HTTP 202 Accepted) - ✅ **Background processing**: Invoice is processed by a Celery worker - ✅ **Progress tracking**: Use `/tasks/{task_id}/status` to track status - ✅ **Ideal for high volumes**: Allows processing many invoices in parallel **How to use:** 1. **Submission**: Call this endpoint with your invoice data 2. **Immediate return**: You receive a `task_id` (e.g., \"abc123-def456\") 3. **Tracking**: Call `/tasks/{task_id}/status` to check progress 4. **Result**: When `status = \"SUCCESS\"`, the `result` field contains the complete response **Credentials and signature**: Same modes as the synchronous version (JWT or payload).
|
|
947
|
+
* @summary Submit a complete invoice (asynchronous with Celery)
|
|
948
|
+
* @param {SubmitCompleteInvoiceRequest} submitCompleteInvoiceRequest
|
|
949
|
+
* @param {*} [options] Override http request option.
|
|
950
|
+
* @throws {RequiredError}
|
|
951
|
+
*/
|
|
952
|
+
submitCompleteInvoiceAsyncApiV1ProcessingInvoicesSubmitCompleteAsyncPost(submitCompleteInvoiceRequest, options) {
|
|
953
|
+
return InvoiceProcessingApiFp(this.configuration).submitCompleteInvoiceAsyncApiV1ProcessingInvoicesSubmitCompleteAsyncPost(submitCompleteInvoiceRequest, options).then((request) => request(this.axios, this.basePath));
|
|
954
|
+
}
|
|
955
|
+
/**
|
|
956
|
+
* Validates a complete Factur-X PDF according to European and French standards. ## Applied validation standards - **EN 16931**: European semantic standard (directive 2014/55/EU) - **ISO 19005-3** (PDF/A-3): Long-term electronic archiving - **Factur-X / ZUGFeRD**: Franco-German specification - **Schematron**: XML business rules validation - **eIDAS**: European regulation on electronic identification (signatures) ## Checks performed ### 1. Factur-X XML extraction and validation **Checks performed:** - Presence of embedded XML file (`factur-x.xml` or `zugferd-invoice.xml`) - Automatic profile detection (MINIMUM, BASIC, EN16931, EXTENDED) - XML parsing with UTF-8 validation - GuidelineSpecifiedDocumentContextParameter/ID extraction **Schematron validation:** - Business rules for detected profile (MINIMUM: 45 rules, EN16931: 178 rules) - Cardinality of required elements - Calculation consistency (net, VAT, gross amounts, discounts) - Identifier formats (SIRET, intra-EU VAT, IBAN) - Standardized codes (ISO country codes, UN/ECE units, VAT codes) **What is verified:** - ✅ XML structure conforming to Cross Industry Invoice XSD - ✅ Correct UN/CEFACT namespace - ✅ European business rules (BR-xx) - ✅ French-specific rules (FR-xx) ### 2. PDF/A-3 compliance **Basic validation (metadata):** - Presence of `/Type` field set to `Catalog` - Metadata `pdfaid:part` = 3 (PDF/A-3) - Metadata `pdfaid:conformance` = B or U - PDF version >= 1.4 **Strict VeraPDF validation (if use_verapdf=True):** - 146+ ISO 19005-3 rules (PDF/A-3B) - Absence of forbidden content (JavaScript, multimedia, dynamic forms) - Correctly embedded fonts and subsets - Compliant color spaces (sRGB, DeviceGray) - Valid file structure (cross-reference table) - XMP metadata conforming to ISO 16684-1 **What is verified:** - ✅ Long-term archivable file (20+ years) - ✅ Guaranteed readability (embedded fonts) - ✅ Legal compliance (France, Germany, EU) ### 3. XMP metadata (eXtensible Metadata Platform) **Checks performed:** - Presence of `<?xpacket>` block with XMP metadata - `fx:` namespace for Factur-X: `urn:factur-x:pdfa:CrossIndustryDocument:invoice:1p0#` - Required Factur-X fields: - `fx:ConformanceLevel`: Profile (MINIMUM, BASIC, EN16931, EXTENDED) - `fx:DocumentFileName`: Embedded XML name - `fx:DocumentType`: \"INVOICE\" - `fx:Version`: Factur-X version (1.0.07) **What is verified:** - ✅ Metadata conforming to ISO 16684-1 - ✅ Correct declared Factur-X profile - ✅ Supported Factur-X version ### 4. Electronic signatures **Detection and analysis:** - Presence of `/Sig` dictionaries in PDF - Signature type: PAdES (PDF Advanced Electronic Signature) - Information extraction: - Signer name (`/Name`) - Signing date (`/M`) - Signature reason (`/Reason`) - Signature location (`/Location`) - Signature type (approval, certification) **What is verified:** - ✅ Presence of signatures or seals - ✅ Number of signatures (single or multi-signature) - ℹ️ No cryptographic verification (requires certificates) ## Parameters - **pdf_file** (required): The Factur-X PDF file to validate - **profile** (optional): Expected profile. If absent, auto-detected from XML - **use_verapdf** (optional, default=false): Enable strict PDF/A validation with VeraPDF - `false`: Fast metadata validation (2-3 seconds) - `true`: Complete ISO 19005-3 validation (15-30 seconds, **recommended for production**) ## Detailed response ```json { \"isCompliant\": true, \"xml\": { \"present\": true, \"compliant\": true, \"profile\": \"EN16931\", \"errors\": [] }, \"pdfa\": { \"compliant\": true, \"version\": \"PDF/A-3B\", \"method\": \"verapdf\", \"errors\": [] }, \"xmp\": { \"present\": true, \"compliant\": true, \"metadata\": {...} }, \"signatures\": { \"present\": true, \"count\": 1, \"details\": [...] } } ``` ## Use cases - **Before sending**: Validate generated invoice before transmission to client - **On reception**: Verify compliance of invoice received from supplier - **Audit**: Check quality of invoice batches - **Legal compliance**: Ensure B2B/B2G obligations are met in France - **Debugging**: Identify issues in generation process - **Archiving**: Guarantee long-term validity (PDF/A-3) ## Processing time - Basic validation: 2-3 seconds - VeraPDF validation: 15-30 seconds (depends on PDF size)
|
|
957
|
+
* @summary Validate a complete Factur-X PDF
|
|
958
|
+
* @param {File} pdfFile Factur-X PDF file to validate (.pdf format).
|
|
959
|
+
* @param {APIProfile | null} [profile]
|
|
960
|
+
* @param {boolean} [useVerapdf] Enable strict PDF/A validation with VeraPDF (recommended for production). If False, uses basic metadata validation.
|
|
961
|
+
* @param {*} [options] Override http request option.
|
|
962
|
+
* @throws {RequiredError}
|
|
963
|
+
*/
|
|
964
|
+
validateFacturxPdfApiV1ProcessingValidateFacturxPdfPost(pdfFile, profile, useVerapdf, options) {
|
|
965
|
+
return InvoiceProcessingApiFp(this.configuration).validateFacturxPdfApiV1ProcessingValidateFacturxPdfPost(pdfFile, profile, useVerapdf, options).then((request) => request(this.axios, this.basePath));
|
|
966
|
+
}
|
|
967
|
+
/**
|
|
968
|
+
* Validates a Factur-X PDF asynchronously with polling system. ## How it works 1. **Submission**: PDF is queued for asynchronous validation 2. **Immediate return**: You receive a `task_id` (HTTP 202) 3. **Tracking**: Use the `/tasks/{task_id}/status` endpoint to track progress ## Advantages of asynchronous mode - **No timeout**: Ideal for large PDFs or VeraPDF validation (which can take several seconds) - **Scalability**: Validations are processed by dedicated Celery workers - **Status tracking**: Allows you to monitor validation progress - **Non-blocking**: Your client doesn\'t wait during validation ## When to use this mode? - **VeraPDF validation enabled** (`use_verapdf=True`): Strict validation can take 2-10 seconds - **Large PDF files**: PDFs > 1 MB - **Batch processing**: Validating multiple invoices in parallel - **Asynchronous integration**: Your system supports polling ## Checks performed ### 1. Factur-X XML extraction and validation - Verifies presence of Factur-X compliant embedded XML file - Automatically detects profile used (MINIMUM, BASIC, EN16931, EXTENDED) - Validates XML against detected profile\'s Schematron rules ### 2. PDF/A compliance - **Without VeraPDF**: Basic metadata validation (fast, ~100ms) - **With VeraPDF**: Strict ISO 19005 validation (146+ rules, 2-10s) - Detects PDF/A version (PDF/A-1, PDF/A-3, etc.) - Detailed non-compliance reports ### 3. XMP metadata - Verifies presence of XMP metadata in PDF - Validates Factur-X metadata compliance (profile, version) - Extracts all available XMP metadata ### 4. Electronic signatures - Detects presence of electronic signatures or seals - Extracts information about each signature (signer, date, reason) - Counts number of signatures present ## Parameters - **pdf_file**: The Factur-X PDF file to validate - **profile**: Expected Factur-X profile (optional). If not specified, profile will be auto-detected from embedded XML file. - **use_verapdf**: Enable strict PDF/A validation with VeraPDF. ⚠️ **Warning**: VeraPDF can take 2-10 seconds depending on PDF size. Recommended only in asynchronous mode to avoid timeouts. ## Retrieving results After submission, use `GET /tasks/{task_id}/status` endpoint to retrieve the result. **Polling example**: ```python import requests import time # 1. Submit task response = requests.post(\"/validate-facturx-async\", files={\"pdf_file\": pdf_file}) task_id = response.json()[\"taskId\"] # 2. Poll every 2 seconds while True: status_response = requests.get(f\"/tasks/{task_id}/status\") status = status_response.json() if status[\"status\"] == \"SUCCESS\": result = status[\"result\"][\"validation_result\"] print(f\"Compliant: {result[\'is_compliant\']}\") break elif status[\"status\"] == \"FAILURE\": print(f\"Error: {status[\'result\'][\'errorMessage\']}\") break time.sleep(2) # Wait 2 seconds before next check ``` ## Use cases - Validate invoices before sending with VeraPDF (strict validation) - Process invoice batches in parallel - Integrate validation into an asynchronous pipeline - Validate large PDFs without timeout risk
|
|
969
|
+
* @summary Validate a Factur-X PDF (asynchronous with polling)
|
|
970
|
+
* @param {File} pdfFile Factur-X PDF file to validate (.pdf format).
|
|
971
|
+
* @param {APIProfile | null} [profile]
|
|
972
|
+
* @param {boolean} [useVerapdf] Enable strict PDF/A validation with VeraPDF (recommended for production). May take several seconds.
|
|
973
|
+
* @param {*} [options] Override http request option.
|
|
974
|
+
* @throws {RequiredError}
|
|
975
|
+
*/
|
|
976
|
+
validateFacturxPdfAsyncApiV1ProcessingValidateFacturxAsyncPost(pdfFile, profile, useVerapdf, options) {
|
|
977
|
+
return InvoiceProcessingApiFp(this.configuration).validateFacturxPdfAsyncApiV1ProcessingValidateFacturxAsyncPost(pdfFile, profile, useVerapdf, options).then((request) => request(this.axios, this.basePath));
|
|
978
|
+
}
|
|
979
|
+
/**
|
|
980
|
+
* Validates electronic signatures present in an uploaded PDF. **Verifications performed**: - Presence of signatures - Document integrity (not modified since signing) - Certificate validity - Chain of trust (if available) - Presence of timestamp (PAdES-B-T) - Validation data (PAdES-B-LT) **Supported standards**: PAdES-B-B, PAdES-B-T, PAdES-B-LT, ISO 32000-2. **⚠️ Note**: This validation is technical (cryptographic integrity). Legal validity depends on the eIDAS level of the certificate (SES/AdES/QES) and the context of use.
|
|
981
|
+
* @summary Validate electronic signatures of a PDF
|
|
982
|
+
* @param {File} pdfFile PDF file to validate (will be analyzed to detect and validate signatures)
|
|
983
|
+
* @param {*} [options] Override http request option.
|
|
984
|
+
* @throws {RequiredError}
|
|
985
|
+
*/
|
|
986
|
+
validatePdfSignatureEndpointApiV1ProcessingValidatePdfSignaturePost(pdfFile, options) {
|
|
987
|
+
return InvoiceProcessingApiFp(this.configuration).validatePdfSignatureEndpointApiV1ProcessingValidatePdfSignaturePost(pdfFile, options).then((request) => request(this.axios, this.basePath));
|
|
988
|
+
}
|
|
989
|
+
/**
|
|
990
|
+
* Validates a Factur-X XML file against Schematron business rules according to EN 16931 standard. ## Applied Standard **Schematron ISO/IEC 19757-3**: Business rules validation language for XML - Semantic validation (beyond XSD syntax) - European EN 16931 business rules - French-specific Factur-X rules - Arithmetic calculations and data consistency ## Profiles and validated rules ### MINIMUM (45 rules) - Unique invoice identifier - Dates (issue, due date) - Party identifiers (SIRET/SIREN) - Total gross amount ### BASIC (102 rules) - All MINIMUM rules - Detailed invoice lines - Basic VAT calculations - Payment methods - References (order, contract) ### EN16931 (178 rules) - All BASIC rules - **European rules (BR-xx)**: 81 business rules - **French rules (FR-xx)**: 12 France-specific rules - **Advanced calculations (CR-xx)**: 32 calculation rules - **Standardized codes (CL-xx)**: 52 code lists ### EXTENDED (210+ rules) - All EN16931 rules - Logistics information - Advanced accounting data - Multiple external references ## Checks performed ### 1. Syntax validation - Correct XML parsing (UTF-8, well-formed) - UN/CEFACT namespaces present - Hierarchical structure respected ### 2. Business rules (BR-xx) Examples: - `BR-1`: Invoice total must equal sum of line totals + document-level amounts - `BR-CO-10`: Sum of VAT base amounts must equal invoice net total - `BR-16`: Invoice currency code must be in ISO 4217 list ### 3. French rules (FR-xx) Examples: - `FR-1`: Supplier SIRET must have 14 digits - `FR-2`: Customer SIRET must have 14 digits (if present) - `FR-5`: Intra-EU VAT number must be in format FRxx999999999 ### 4. Calculation rules (CR-xx) - Net + VAT = Gross amounts - Sum of lines = Document total - Discounts and surcharges correctly applied - Compliant rounding (2 decimals for amounts) ### 5. Standardized codes (CL-xx) - ISO 3166-1 alpha-2 country codes - ISO 4217 currency codes - UN/ECE Rec 20 measurement units - VAT codes (types, categories, exemptions) - SchemeID for identifiers (0002=SIREN, 0009=SIRET, etc.) ## Validation process 1. **XSLT loading**: Schematron file converted to XSLT (Saxon-HE) 2. **Transformation**: Rules applied to XML 3. **Results analysis**: Extraction of errors (`failed-assert`) and warnings (`successful-report`) 4. **Report**: Structured list of non-conformities ## Responses **200 OK**: Compliant XML ```json { \"message\": \"XML is compliant with EN16931 profile\" } ``` **400 Bad Request**: Non-compliant XML ```json { \"detail\": [ \"[BR-1] Invoice total (120.00) does not match calculated sum (100.00 + 20.00)\", \"[FR-1] Supplier SIRET must contain exactly 14 digits\" ] } ``` ## Use cases - **Pre-validation**: Verify XML before PDF/A integration - **Debugging**: Precisely identify generation errors - **Testing**: Validate test or example XMLs - **Compliance**: Ensure European and French rules are met - **Development**: Quick testing without PDF generation ## Processing time - MINIMUM profile: ~0.5 second - EN16931 profile: ~1-2 seconds - EXTENDED profile: ~2-3 seconds
|
|
991
|
+
* @summary Validate an existing Factur-X XML
|
|
992
|
+
* @param {File} xmlFile Factur-X XML file to validate (.xml format).
|
|
993
|
+
* @param {APIProfile} [profile] Validation profile (MINIMUM, BASIC, EN16931, EXTENDED).
|
|
994
|
+
* @param {*} [options] Override http request option.
|
|
995
|
+
* @throws {RequiredError}
|
|
996
|
+
*/
|
|
997
|
+
validateXmlApiV1ProcessingValidateXmlPost(xmlFile, profile, options) {
|
|
998
|
+
return InvoiceProcessingApiFp(this.configuration).validateXmlApiV1ProcessingValidateXmlPost(xmlFile, profile, options).then((request) => request(this.axios, this.basePath));
|
|
999
|
+
}
|
|
1000
|
+
}
|