@factpulse/sdk 3.0.4 → 3.0.6
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 +66 -4
- package/.openapi-generator/VERSION +1 -1
- package/CHANGELOG.md +3 -3
- package/api/document-conversion-api.ts +485 -0
- package/api/invoice-processing-api.ts +34 -34
- package/api.ts +1 -0
- package/dist/api/document-conversion-api.d.ts +226 -0
- package/dist/api/document-conversion-api.js +464 -0
- package/dist/api/invoice-processing-api.d.ts +33 -33
- package/dist/api/invoice-processing-api.js +16 -16
- package/dist/api.d.ts +1 -0
- package/dist/api.js +1 -0
- package/dist/esm/api/document-conversion-api.d.ts +226 -0
- package/dist/esm/api/document-conversion-api.js +454 -0
- package/dist/esm/api/invoice-processing-api.d.ts +33 -33
- package/dist/esm/api/invoice-processing-api.js +16 -16
- package/dist/esm/api.d.ts +1 -0
- package/dist/esm/api.js +1 -0
- package/dist/esm/models/additional-document.d.ts +24 -0
- package/dist/esm/models/additional-document.js +14 -0
- package/dist/esm/models/allowance-charge.d.ts +31 -0
- package/dist/esm/models/allowance-charge.js +14 -0
- package/dist/esm/models/{apiprofile.d.ts → allowance-total-amount.d.ts} +3 -8
- package/dist/esm/models/allowance-total-amount.js +14 -0
- package/dist/esm/models/amount-due.d.ts +1 -1
- package/dist/{models/apiprofile.d.ts → esm/models/amount.d.ts} +3 -8
- package/dist/esm/models/amount.js +14 -0
- package/dist/esm/models/base-amount.d.ts +16 -0
- package/dist/esm/models/base-amount.js +14 -0
- package/dist/esm/models/charge-total-amount.d.ts +16 -0
- package/dist/esm/models/charge-total-amount.js +14 -0
- package/dist/esm/models/contact.d.ts +20 -0
- package/dist/esm/models/contact.js +14 -0
- package/dist/esm/models/convert-error-response.d.ts +27 -0
- package/dist/esm/models/convert-error-response.js +14 -0
- package/dist/esm/models/convert-pending-input-response.d.ts +31 -0
- package/dist/esm/models/convert-pending-input-response.js +14 -0
- package/dist/esm/models/convert-resume-request.d.ts +22 -0
- package/dist/esm/models/convert-resume-request.js +14 -0
- package/dist/esm/models/{document-type.d.ts → convert-success-response.d.ts} +29 -19
- package/dist/esm/models/convert-success-response.js +14 -0
- package/dist/{models/document-type.d.ts → esm/models/convert-validation-failed-response.d.ts} +25 -20
- package/dist/esm/models/convert-validation-failed-response.js +14 -0
- package/dist/esm/models/delivery-party.d.ts +22 -0
- package/dist/esm/models/delivery-party.js +14 -0
- package/dist/esm/models/document-type-info.d.ts +28 -0
- package/dist/esm/models/document-type-info.js +14 -0
- package/dist/esm/models/extraction-info.d.ts +32 -0
- package/dist/esm/models/extraction-info.js +14 -0
- package/dist/esm/models/factur-xinvoice.d.ts +19 -0
- package/dist/esm/models/factur-xprofile.d.ts +21 -0
- package/{models/apiprofile.ts → dist/esm/models/factur-xprofile.js} +5 -14
- package/dist/esm/models/facture-electronique-rest-api-schemas-chorus-pro-chorus-pro-credentials.d.ts +4 -4
- package/dist/esm/models/file-info.d.ts +21 -0
- package/dist/esm/models/file-info.js +14 -0
- package/dist/esm/models/files-info.d.ts +19 -0
- package/dist/esm/models/files-info.js +14 -0
- package/dist/esm/models/generate-certificate-request.d.ts +5 -5
- package/dist/esm/models/get-chorus-pro-id-request.d.ts +1 -1
- package/dist/esm/models/get-invoice-request.d.ts +1 -1
- package/dist/esm/models/get-structure-request.d.ts +2 -2
- package/dist/esm/models/global-allowance-amount.d.ts +1 -1
- package/dist/esm/models/gross-unit-price.d.ts +16 -0
- package/dist/esm/models/gross-unit-price.js +14 -0
- package/dist/esm/models/incoming-invoice.d.ts +2 -2
- package/dist/esm/models/index.d.ts +32 -2
- package/dist/esm/models/index.js +32 -2
- package/dist/esm/models/invoice-line-allowance-amount.d.ts +1 -1
- package/dist/esm/models/invoice-line.d.ts +40 -6
- package/dist/esm/models/invoice-references.d.ts +20 -1
- package/dist/esm/models/invoice-totals-prepayment.d.ts +1 -1
- package/dist/esm/models/invoice-totals.d.ts +10 -2
- package/dist/esm/models/line-net-amount.d.ts +1 -1
- package/dist/esm/models/line-total-amount.d.ts +16 -0
- package/dist/esm/models/line-total-amount.js +14 -0
- package/dist/esm/models/manual-rate.d.ts +1 -1
- package/dist/esm/models/manual-vat-rate.d.ts +1 -1
- package/dist/esm/models/missing-field.d.ts +34 -0
- package/dist/esm/models/missing-field.js +14 -0
- package/dist/esm/models/payee.d.ts +2 -0
- package/dist/esm/models/payment-card.d.ts +18 -0
- package/dist/esm/models/payment-card.js +14 -0
- package/dist/esm/models/pdpcredentials.d.ts +5 -5
- package/dist/esm/models/percentage.d.ts +16 -0
- package/dist/esm/models/percentage.js +14 -0
- package/dist/esm/models/postal-address.d.ts +3 -1
- package/dist/esm/models/price-allowance-amount.d.ts +16 -0
- package/dist/esm/models/price-allowance-amount.js +14 -0
- package/dist/esm/models/price-basis-quantity.d.ts +16 -0
- package/dist/esm/models/price-basis-quantity.js +14 -0
- package/dist/esm/models/processing-options.d.ts +3 -3
- package/dist/esm/models/product-characteristic.d.ts +24 -0
- package/dist/esm/models/product-characteristic.js +14 -0
- package/dist/esm/models/product-classification.d.ts +22 -0
- package/dist/esm/models/product-classification.js +14 -0
- package/dist/esm/models/quantity.d.ts +1 -1
- package/dist/esm/models/recipient.d.ts +5 -1
- package/dist/esm/models/rounding-amount.d.ts +16 -0
- package/dist/esm/models/rounding-amount.js +14 -0
- package/dist/esm/models/scheme-id.d.ts +11 -5
- package/dist/esm/models/scheme-id.js +11 -5
- package/dist/esm/models/search-flow-request.d.ts +7 -7
- package/dist/esm/models/search-structure-request.d.ts +4 -4
- package/dist/esm/models/submit-flow-request.d.ts +6 -6
- package/dist/esm/models/submit-invoice-request.d.ts +13 -13
- package/dist/esm/models/supplier.d.ts +10 -1
- package/dist/esm/models/tax-representative.d.ts +29 -0
- package/dist/esm/models/tax-representative.js +14 -0
- package/dist/esm/models/taxable-amount.d.ts +1 -1
- package/dist/esm/models/total-gross-amount.d.ts +1 -1
- package/dist/esm/models/total-net-amount.d.ts +1 -1
- package/dist/esm/models/total-vatamount.d.ts +1 -1
- package/dist/esm/models/unit-net-price.d.ts +1 -1
- package/dist/esm/models/validation-info.d.ts +38 -0
- package/dist/esm/models/validation-info.js +14 -0
- package/dist/esm/models/vat-rate.d.ts +16 -0
- package/dist/esm/models/vat-rate.js +14 -0
- package/dist/esm/models/vatamount.d.ts +1 -1
- package/dist/esm/models/vatline.d.ts +3 -1
- package/dist/esm/models/vatpoint-date-code.d.ts +20 -0
- package/dist/esm/models/{apiprofile.js → vatpoint-date-code.js} +5 -6
- package/dist/models/additional-document.d.ts +24 -0
- package/dist/models/{apiprofile.js → additional-document.js} +0 -10
- package/dist/models/allowance-charge.d.ts +31 -0
- package/dist/models/allowance-charge.js +15 -0
- package/dist/models/allowance-total-amount.d.ts +16 -0
- package/dist/models/allowance-total-amount.js +15 -0
- package/dist/models/amount-due.d.ts +1 -1
- package/dist/models/amount.d.ts +16 -0
- package/dist/models/amount.js +15 -0
- package/dist/models/base-amount.d.ts +16 -0
- package/dist/models/base-amount.js +15 -0
- package/dist/models/charge-total-amount.d.ts +16 -0
- package/dist/models/charge-total-amount.js +15 -0
- package/dist/models/contact.d.ts +20 -0
- package/dist/models/contact.js +15 -0
- package/dist/models/convert-error-response.d.ts +27 -0
- package/dist/models/convert-error-response.js +15 -0
- package/dist/models/convert-pending-input-response.d.ts +31 -0
- package/dist/models/convert-pending-input-response.js +15 -0
- package/dist/models/convert-resume-request.d.ts +22 -0
- package/dist/models/convert-resume-request.js +15 -0
- package/dist/models/convert-success-response.d.ts +47 -0
- package/dist/models/convert-success-response.js +15 -0
- package/dist/models/{document-type.js → convert-validation-failed-response.d.ts} +25 -24
- package/dist/models/convert-validation-failed-response.js +15 -0
- package/dist/models/delivery-party.d.ts +22 -0
- package/dist/models/delivery-party.js +15 -0
- package/dist/models/document-type-info.d.ts +28 -0
- package/dist/models/document-type-info.js +15 -0
- package/dist/models/extraction-info.d.ts +32 -0
- package/dist/models/extraction-info.js +15 -0
- package/dist/models/factur-xinvoice.d.ts +19 -0
- package/dist/models/factur-xprofile.d.ts +21 -0
- package/dist/models/factur-xprofile.js +25 -0
- package/dist/models/facture-electronique-rest-api-schemas-chorus-pro-chorus-pro-credentials.d.ts +4 -4
- package/dist/models/file-info.d.ts +21 -0
- package/dist/models/file-info.js +15 -0
- package/dist/models/files-info.d.ts +19 -0
- package/dist/models/files-info.js +15 -0
- package/dist/models/generate-certificate-request.d.ts +5 -5
- package/dist/models/get-chorus-pro-id-request.d.ts +1 -1
- package/dist/models/get-invoice-request.d.ts +1 -1
- package/dist/models/get-structure-request.d.ts +2 -2
- package/dist/models/global-allowance-amount.d.ts +1 -1
- package/dist/models/gross-unit-price.d.ts +16 -0
- package/dist/models/gross-unit-price.js +15 -0
- package/dist/models/incoming-invoice.d.ts +2 -2
- package/dist/models/index.d.ts +32 -2
- package/dist/models/index.js +32 -2
- package/dist/models/invoice-line-allowance-amount.d.ts +1 -1
- package/dist/models/invoice-line.d.ts +40 -6
- package/dist/models/invoice-references.d.ts +20 -1
- package/dist/models/invoice-totals-prepayment.d.ts +1 -1
- package/dist/models/invoice-totals.d.ts +10 -2
- package/dist/models/line-net-amount.d.ts +1 -1
- package/dist/models/line-total-amount.d.ts +16 -0
- package/dist/models/line-total-amount.js +15 -0
- package/dist/models/manual-rate.d.ts +1 -1
- package/dist/models/manual-vat-rate.d.ts +1 -1
- package/dist/models/missing-field.d.ts +34 -0
- package/dist/models/missing-field.js +15 -0
- package/dist/models/payee.d.ts +2 -0
- package/dist/models/payment-card.d.ts +18 -0
- package/dist/models/payment-card.js +15 -0
- package/dist/models/pdpcredentials.d.ts +5 -5
- package/dist/models/percentage.d.ts +16 -0
- package/dist/models/percentage.js +15 -0
- package/dist/models/postal-address.d.ts +3 -1
- package/dist/models/price-allowance-amount.d.ts +16 -0
- package/dist/models/price-allowance-amount.js +15 -0
- package/dist/models/price-basis-quantity.d.ts +16 -0
- package/dist/models/price-basis-quantity.js +15 -0
- package/dist/models/processing-options.d.ts +3 -3
- package/dist/models/product-characteristic.d.ts +24 -0
- package/dist/models/product-characteristic.js +15 -0
- package/dist/models/product-classification.d.ts +22 -0
- package/dist/models/product-classification.js +15 -0
- package/dist/models/quantity.d.ts +1 -1
- package/dist/models/recipient.d.ts +5 -1
- package/dist/models/rounding-amount.d.ts +16 -0
- package/dist/models/rounding-amount.js +15 -0
- package/dist/models/scheme-id.d.ts +11 -5
- package/dist/models/scheme-id.js +11 -5
- package/dist/models/search-flow-request.d.ts +7 -7
- package/dist/models/search-structure-request.d.ts +4 -4
- package/dist/models/submit-flow-request.d.ts +6 -6
- package/dist/models/submit-invoice-request.d.ts +13 -13
- package/dist/models/supplier.d.ts +10 -1
- package/dist/models/tax-representative.d.ts +29 -0
- package/dist/models/tax-representative.js +15 -0
- package/dist/models/taxable-amount.d.ts +1 -1
- package/dist/models/total-gross-amount.d.ts +1 -1
- package/dist/models/total-net-amount.d.ts +1 -1
- package/dist/models/total-vatamount.d.ts +1 -1
- package/dist/models/unit-net-price.d.ts +1 -1
- package/dist/models/validation-info.d.ts +38 -0
- package/dist/models/validation-info.js +15 -0
- package/dist/models/vat-rate.d.ts +16 -0
- package/dist/models/vat-rate.js +15 -0
- package/dist/models/vatamount.d.ts +1 -1
- package/dist/models/vatline.d.ts +3 -1
- package/dist/models/vatpoint-date-code.d.ts +20 -0
- package/dist/models/vatpoint-date-code.js +24 -0
- package/docs/AdditionalDocument.md +29 -0
- package/docs/AllowanceCharge.md +35 -0
- package/docs/AllowanceTotalAmount.md +19 -0
- package/docs/Amount.md +19 -0
- package/docs/AmountDue.md +1 -1
- package/docs/BaseAmount.md +19 -0
- package/docs/ChargeTotalAmount.md +19 -0
- package/docs/Contact.md +27 -0
- package/docs/ConvertErrorResponse.md +29 -0
- package/docs/ConvertPendingInputResponse.md +35 -0
- package/docs/ConvertResumeRequest.md +21 -0
- package/docs/ConvertSuccessResponse.md +39 -0
- package/docs/ConvertValidationFailedResponse.md +37 -0
- package/docs/DeliveryParty.md +27 -0
- package/docs/DocumentConversionApi.md +297 -0
- package/docs/DocumentTypeInfo.md +25 -0
- package/docs/ExtractionInfo.md +27 -0
- package/docs/FacturXInvoice.md +28 -0
- package/docs/{APIProfile.md → FacturXProfile.md} +2 -2
- package/docs/FactureElectroniqueRestApiSchemasChorusProChorusProCredentials.md +8 -8
- package/docs/FileInfo.md +23 -0
- package/docs/FilesInfo.md +23 -0
- package/docs/GenerateCertificateRequest.md +10 -10
- package/docs/GetChorusProIdRequest.md +2 -2
- package/docs/GetInvoiceRequest.md +2 -2
- package/docs/GetStructureRequest.md +4 -4
- package/docs/GlobalAllowanceAmount.md +1 -1
- package/docs/GrossUnitPrice.md +19 -0
- package/docs/IncomingInvoice.md +1 -1
- package/docs/InvoiceLine.md +48 -14
- package/docs/InvoiceLineAllowanceAmount.md +1 -1
- package/docs/InvoiceProcessingApi.md +8 -8
- package/docs/InvoiceReferences.md +25 -5
- package/docs/InvoiceTotals.md +11 -3
- package/docs/InvoiceTotalsPrepayment.md +1 -1
- package/docs/LineNetAmount.md +1 -1
- package/docs/LineTotalAmount.md +19 -0
- package/docs/ManualRate.md +1 -1
- package/docs/ManualVatRate.md +1 -1
- package/docs/MissingField.md +31 -0
- package/docs/PDPCredentials.md +10 -10
- package/docs/Payee.md +4 -0
- package/docs/PaymentCard.md +23 -0
- package/docs/Percentage.md +19 -0
- package/docs/PostalAddress.md +5 -1
- package/docs/PriceAllowanceAmount.md +19 -0
- package/docs/PriceBasisQuantity.md +19 -0
- package/docs/ProcessingOptions.md +3 -3
- package/docs/ProductCharacteristic.md +23 -0
- package/docs/ProductClassification.md +25 -0
- package/docs/Quantity.md +1 -1
- package/docs/Recipient.md +7 -1
- package/docs/RoundingAmount.md +19 -0
- package/docs/SchemeID.md +17 -5
- package/docs/SearchFlowRequest.md +14 -14
- package/docs/SearchStructureRequest.md +8 -8
- package/docs/SubmitFlowRequest.md +12 -12
- package/docs/SubmitInvoiceRequest.md +26 -26
- package/docs/Supplier.md +17 -1
- package/docs/TaxRepresentative.md +25 -0
- package/docs/TaxableAmount.md +1 -1
- package/docs/TotalGrossAmount.md +1 -1
- package/docs/TotalNetAmount.md +1 -1
- package/docs/TotalVATAmount.md +1 -1
- package/docs/UnitNetPrice.md +1 -1
- package/docs/VATAmount.md +1 -1
- package/docs/VATLine.md +3 -1
- package/docs/VATPointDateCode.md +13 -0
- package/docs/ValidationInfo.md +31 -0
- package/docs/VatRate.md +19 -0
- package/models/additional-document.ts +30 -0
- package/models/{document-type.ts → allowance-charge.ts} +25 -27
- package/models/allowance-total-amount.ts +22 -0
- package/models/amount-due.ts +1 -1
- package/models/amount.ts +22 -0
- package/models/base-amount.ts +22 -0
- package/models/charge-total-amount.ts +22 -0
- package/models/contact.ts +26 -0
- package/models/convert-error-response.ts +33 -0
- package/models/convert-pending-input-response.ts +39 -0
- package/models/convert-resume-request.ts +26 -0
- package/models/convert-success-response.ts +59 -0
- package/models/convert-validation-failed-response.ts +52 -0
- package/models/delivery-party.ts +32 -0
- package/models/document-type-info.ts +34 -0
- package/models/extraction-info.ts +38 -0
- package/models/factur-xinvoice.ts +29 -0
- package/models/factur-xprofile.ts +31 -0
- package/models/facture-electronique-rest-api-schemas-chorus-pro-chorus-pro-credentials.ts +4 -4
- package/models/file-info.ts +27 -0
- package/models/files-info.ts +27 -0
- package/models/generate-certificate-request.ts +5 -5
- package/models/get-chorus-pro-id-request.ts +1 -1
- package/models/get-invoice-request.ts +1 -1
- package/models/get-structure-request.ts +2 -2
- package/models/global-allowance-amount.ts +1 -1
- package/models/gross-unit-price.ts +22 -0
- package/models/incoming-invoice.ts +4 -4
- package/models/index.ts +32 -2
- package/models/invoice-line-allowance-amount.ts +1 -1
- package/models/invoice-line.ts +56 -6
- package/models/invoice-references.ts +20 -1
- package/models/invoice-totals-prepayment.ts +1 -1
- package/models/invoice-totals.ts +18 -2
- package/models/line-net-amount.ts +1 -1
- package/models/line-total-amount.ts +22 -0
- package/models/manual-rate.ts +1 -1
- package/models/manual-vat-rate.ts +1 -1
- package/models/missing-field.ts +40 -0
- package/models/payee.ts +2 -0
- package/models/payment-card.ts +24 -0
- package/models/pdpcredentials.ts +5 -5
- package/models/percentage.ts +22 -0
- package/models/postal-address.ts +3 -1
- package/models/price-allowance-amount.ts +22 -0
- package/models/price-basis-quantity.ts +22 -0
- package/models/processing-options.ts +3 -3
- package/models/product-characteristic.ts +30 -0
- package/models/product-classification.ts +28 -0
- package/models/quantity.ts +1 -1
- package/models/recipient.ts +7 -1
- package/models/rounding-amount.ts +22 -0
- package/models/scheme-id.ts +11 -5
- package/models/search-flow-request.ts +7 -7
- package/models/search-structure-request.ts +4 -4
- package/models/submit-flow-request.ts +6 -6
- package/models/submit-invoice-request.ts +13 -13
- package/models/supplier.ts +12 -1
- package/models/tax-representative.ts +37 -0
- package/models/taxable-amount.ts +1 -1
- package/models/total-gross-amount.ts +1 -1
- package/models/total-net-amount.ts +1 -1
- package/models/total-vatamount.ts +1 -1
- package/models/unit-net-price.ts +1 -1
- package/{dist/esm/models/document-type.js → models/validation-info.ts} +28 -20
- package/models/vat-rate.ts +22 -0
- package/models/vatamount.ts +1 -1
- package/models/vatline.ts +5 -1
- package/models/vatpoint-date-code.ts +30 -0
- package/package.json +1 -1
- package/docs/DocumentType.md +0 -17
|
@@ -0,0 +1,27 @@
|
|
|
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
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Informations sur un fichier genere (contenu inline en base64).
|
|
19
|
+
*/
|
|
20
|
+
export interface FileInfo {
|
|
21
|
+
'content_b64'?: string | null;
|
|
22
|
+
/**
|
|
23
|
+
* Taille en bytes
|
|
24
|
+
*/
|
|
25
|
+
'size_bytes'?: number;
|
|
26
|
+
}
|
|
27
|
+
|
|
@@ -0,0 +1,27 @@
|
|
|
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
|
+
|
|
15
|
+
|
|
16
|
+
// May contain unused imports in some cases
|
|
17
|
+
// @ts-ignore
|
|
18
|
+
import type { FileInfo } from './file-info';
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Fichiers generes.
|
|
22
|
+
*/
|
|
23
|
+
export interface FilesInfo {
|
|
24
|
+
'facturx_pdf'?: FileInfo | null;
|
|
25
|
+
'xml'?: FileInfo | null;
|
|
26
|
+
}
|
|
27
|
+
|
|
@@ -42,19 +42,19 @@ export interface GenerateCertificateRequest {
|
|
|
42
42
|
/**
|
|
43
43
|
* Validity duration in days
|
|
44
44
|
*/
|
|
45
|
-
'
|
|
45
|
+
'validityDays'?: number;
|
|
46
46
|
/**
|
|
47
47
|
* RSA key size in bits
|
|
48
48
|
*/
|
|
49
|
-
'
|
|
50
|
-
'
|
|
49
|
+
'keySize'?: number;
|
|
50
|
+
'keyPassphrase'?: string | null;
|
|
51
51
|
/**
|
|
52
52
|
* Also generate a PKCS#12 (.p12) file
|
|
53
53
|
*/
|
|
54
|
-
'
|
|
54
|
+
'generateP12'?: boolean;
|
|
55
55
|
/**
|
|
56
56
|
* Passphrase for PKCS#12 file
|
|
57
57
|
*/
|
|
58
|
-
'
|
|
58
|
+
'p12Passphrase'?: string;
|
|
59
59
|
}
|
|
60
60
|
|
|
@@ -0,0 +1,22 @@
|
|
|
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
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Item gross price before line discount (BT-148).
|
|
19
|
+
*/
|
|
20
|
+
export interface GrossUnitPrice {
|
|
21
|
+
}
|
|
22
|
+
|
|
@@ -13,15 +13,15 @@
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
// May contain unused imports in some cases
|
|
17
|
-
// @ts-ignore
|
|
18
|
-
import type { DocumentType } from './document-type';
|
|
19
16
|
// May contain unused imports in some cases
|
|
20
17
|
// @ts-ignore
|
|
21
18
|
import type { IncomingSupplier } from './incoming-supplier';
|
|
22
19
|
// May contain unused imports in some cases
|
|
23
20
|
// @ts-ignore
|
|
24
21
|
import type { InvoiceFormat } from './invoice-format';
|
|
22
|
+
// May contain unused imports in some cases
|
|
23
|
+
// @ts-ignore
|
|
24
|
+
import type { InvoiceTypeCode } from './invoice-type-code';
|
|
25
25
|
|
|
26
26
|
/**
|
|
27
27
|
* Invoice received from a supplier via PDP/PA. This model contains essential metadata extracted from incoming invoices, regardless of their source format (CII, UBL, Factur-X). Amounts are Decimal in Python but will be serialized as strings in JSON to preserve monetary precision.
|
|
@@ -39,7 +39,7 @@ export interface IncomingInvoice {
|
|
|
39
39
|
/**
|
|
40
40
|
* Document type (BT-3)
|
|
41
41
|
*/
|
|
42
|
-
'documentType'?:
|
|
42
|
+
'documentType'?: InvoiceTypeCode;
|
|
43
43
|
/**
|
|
44
44
|
* Invoice issuer (SellerTradeParty)
|
|
45
45
|
*/
|
package/models/index.ts
CHANGED
|
@@ -3,27 +3,43 @@ export * from './afnordestination';
|
|
|
3
3
|
export * from './afnorhealth-check-response';
|
|
4
4
|
export * from './afnorresult';
|
|
5
5
|
export * from './apierror';
|
|
6
|
-
export * from './apiprofile';
|
|
7
6
|
export * from './acknowledgment-status';
|
|
7
|
+
export * from './additional-document';
|
|
8
|
+
export * from './allowance-charge';
|
|
8
9
|
export * from './allowance-reason-code';
|
|
10
|
+
export * from './allowance-total-amount';
|
|
11
|
+
export * from './amount';
|
|
9
12
|
export * from './amount-due';
|
|
10
13
|
export * from './async-task-status';
|
|
14
|
+
export * from './base-amount';
|
|
11
15
|
export * from './bounding-box-schema';
|
|
12
16
|
export * from './celery-status';
|
|
13
17
|
export * from './certificate-info-response';
|
|
18
|
+
export * from './charge-total-amount';
|
|
14
19
|
export * from './chorus-pro-destination';
|
|
15
20
|
export * from './chorus-pro-result';
|
|
21
|
+
export * from './contact';
|
|
22
|
+
export * from './convert-error-response';
|
|
23
|
+
export * from './convert-pending-input-response';
|
|
24
|
+
export * from './convert-resume-request';
|
|
25
|
+
export * from './convert-success-response';
|
|
26
|
+
export * from './convert-validation-failed-response';
|
|
27
|
+
export * from './delivery-party';
|
|
16
28
|
export * from './destination';
|
|
17
|
-
export * from './document-type';
|
|
29
|
+
export * from './document-type-info';
|
|
18
30
|
export * from './electronic-address';
|
|
19
31
|
export * from './enriched-invoice-info';
|
|
20
32
|
export * from './error-level';
|
|
21
33
|
export * from './error-source';
|
|
34
|
+
export * from './extraction-info';
|
|
22
35
|
export * from './factur-xinvoice';
|
|
23
36
|
export * from './factur-xpdfinfo';
|
|
37
|
+
export * from './factur-xprofile';
|
|
24
38
|
export * from './facture-electronique-rest-api-schemas-chorus-pro-chorus-pro-credentials';
|
|
25
39
|
export * from './facture-electronique-rest-api-schemas-processing-chorus-pro-credentials';
|
|
26
40
|
export * from './field-status';
|
|
41
|
+
export * from './file-info';
|
|
42
|
+
export * from './files-info';
|
|
27
43
|
export * from './flow-direction';
|
|
28
44
|
export * from './flow-profile';
|
|
29
45
|
export * from './flow-summary';
|
|
@@ -38,6 +54,7 @@ export * from './get-invoice-response';
|
|
|
38
54
|
export * from './get-structure-request';
|
|
39
55
|
export * from './get-structure-response';
|
|
40
56
|
export * from './global-allowance-amount';
|
|
57
|
+
export * from './gross-unit-price';
|
|
41
58
|
export * from './httpvalidation-error';
|
|
42
59
|
export * from './incoming-invoice';
|
|
43
60
|
export * from './incoming-supplier';
|
|
@@ -53,20 +70,29 @@ export * from './invoice-type-code';
|
|
|
53
70
|
export * from './invoicing-framework';
|
|
54
71
|
export * from './invoicing-framework-code';
|
|
55
72
|
export * from './line-net-amount';
|
|
73
|
+
export * from './line-total-amount';
|
|
56
74
|
export * from './mandatory-note-schema';
|
|
57
75
|
export * from './manual-rate';
|
|
58
76
|
export * from './manual-vat-rate';
|
|
77
|
+
export * from './missing-field';
|
|
59
78
|
export * from './operation-nature';
|
|
60
79
|
export * from './output-format';
|
|
61
80
|
export * from './pdfvalidation-result-api';
|
|
62
81
|
export * from './pdpcredentials';
|
|
63
82
|
export * from './page-dimensions-schema';
|
|
64
83
|
export * from './payee';
|
|
84
|
+
export * from './payment-card';
|
|
65
85
|
export * from './payment-means';
|
|
86
|
+
export * from './percentage';
|
|
66
87
|
export * from './postal-address';
|
|
88
|
+
export * from './price-allowance-amount';
|
|
89
|
+
export * from './price-basis-quantity';
|
|
67
90
|
export * from './processing-options';
|
|
91
|
+
export * from './product-characteristic';
|
|
92
|
+
export * from './product-classification';
|
|
68
93
|
export * from './quantity';
|
|
69
94
|
export * from './recipient';
|
|
95
|
+
export * from './rounding-amount';
|
|
70
96
|
export * from './scheme-id';
|
|
71
97
|
export * from './search-flow-request';
|
|
72
98
|
export * from './search-flow-response';
|
|
@@ -93,6 +119,7 @@ export * from './submit-vat-amount';
|
|
|
93
119
|
export * from './supplementary-attachment';
|
|
94
120
|
export * from './supplier';
|
|
95
121
|
export * from './task-response';
|
|
122
|
+
export * from './tax-representative';
|
|
96
123
|
export * from './taxable-amount';
|
|
97
124
|
export * from './total-gross-amount';
|
|
98
125
|
export * from './total-net-amount';
|
|
@@ -103,10 +130,13 @@ export * from './vataccounting-code';
|
|
|
103
130
|
export * from './vatamount';
|
|
104
131
|
export * from './vatcategory';
|
|
105
132
|
export * from './vatline';
|
|
133
|
+
export * from './vatpoint-date-code';
|
|
106
134
|
export * from './validation-error';
|
|
107
135
|
export * from './validation-error-detail';
|
|
108
136
|
export * from './validation-error-loc-inner';
|
|
109
137
|
export * from './validation-error-response';
|
|
138
|
+
export * from './validation-info';
|
|
110
139
|
export * from './validation-success-response';
|
|
140
|
+
export * from './vat-rate';
|
|
111
141
|
export * from './verification-success-response';
|
|
112
142
|
export * from './verified-field-schema';
|
package/models/invoice-line.ts
CHANGED
|
@@ -13,20 +13,44 @@
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
|
|
16
|
+
// May contain unused imports in some cases
|
|
17
|
+
// @ts-ignore
|
|
18
|
+
import type { AdditionalDocument } from './additional-document';
|
|
19
|
+
// May contain unused imports in some cases
|
|
20
|
+
// @ts-ignore
|
|
21
|
+
import type { AllowanceCharge } from './allowance-charge';
|
|
16
22
|
// May contain unused imports in some cases
|
|
17
23
|
// @ts-ignore
|
|
18
24
|
import type { AllowanceReasonCode } from './allowance-reason-code';
|
|
19
25
|
// May contain unused imports in some cases
|
|
20
26
|
// @ts-ignore
|
|
27
|
+
import type { GrossUnitPrice } from './gross-unit-price';
|
|
28
|
+
// May contain unused imports in some cases
|
|
29
|
+
// @ts-ignore
|
|
21
30
|
import type { InvoiceLineAllowanceAmount } from './invoice-line-allowance-amount';
|
|
22
31
|
// May contain unused imports in some cases
|
|
23
32
|
// @ts-ignore
|
|
33
|
+
import type { InvoiceNote } from './invoice-note';
|
|
34
|
+
// May contain unused imports in some cases
|
|
35
|
+
// @ts-ignore
|
|
24
36
|
import type { LineNetAmount } from './line-net-amount';
|
|
25
37
|
// May contain unused imports in some cases
|
|
26
38
|
// @ts-ignore
|
|
27
39
|
import type { ManualVatRate } from './manual-vat-rate';
|
|
28
40
|
// May contain unused imports in some cases
|
|
29
41
|
// @ts-ignore
|
|
42
|
+
import type { PriceAllowanceAmount } from './price-allowance-amount';
|
|
43
|
+
// May contain unused imports in some cases
|
|
44
|
+
// @ts-ignore
|
|
45
|
+
import type { PriceBasisQuantity } from './price-basis-quantity';
|
|
46
|
+
// May contain unused imports in some cases
|
|
47
|
+
// @ts-ignore
|
|
48
|
+
import type { ProductCharacteristic } from './product-characteristic';
|
|
49
|
+
// May contain unused imports in some cases
|
|
50
|
+
// @ts-ignore
|
|
51
|
+
import type { ProductClassification } from './product-classification';
|
|
52
|
+
// May contain unused imports in some cases
|
|
53
|
+
// @ts-ignore
|
|
30
54
|
import type { Quantity } from './quantity';
|
|
31
55
|
// May contain unused imports in some cases
|
|
32
56
|
// @ts-ignore
|
|
@@ -39,24 +63,50 @@ import type { UnitOfMeasure } from './unit-of-measure';
|
|
|
39
63
|
import type { VATCategory } from './vatcategory';
|
|
40
64
|
|
|
41
65
|
/**
|
|
42
|
-
* Represents
|
|
66
|
+
* Represents an invoice line item (BG-25).
|
|
43
67
|
*/
|
|
44
68
|
export interface InvoiceLine {
|
|
69
|
+
/**
|
|
70
|
+
* Invoice line identifier (BT-126).
|
|
71
|
+
*/
|
|
45
72
|
'line_number': number;
|
|
73
|
+
'line_note'?: string | null;
|
|
46
74
|
'reference'?: string | null;
|
|
75
|
+
'buyer_assigned_id'?: string | null;
|
|
76
|
+
'product_global_id'?: string | null;
|
|
77
|
+
'product_global_id_scheme'?: string | null;
|
|
78
|
+
/**
|
|
79
|
+
* Item name (BT-153).
|
|
80
|
+
*/
|
|
47
81
|
'item_name': string;
|
|
82
|
+
'item_description'?: string | null;
|
|
83
|
+
'origin_country'?: string | null;
|
|
84
|
+
'characteristics'?: Array<ProductCharacteristic> | null;
|
|
85
|
+
'classifications'?: Array<ProductClassification> | null;
|
|
48
86
|
'quantity': Quantity;
|
|
87
|
+
/**
|
|
88
|
+
* Invoiced quantity unit of measure code (BT-130).
|
|
89
|
+
*/
|
|
49
90
|
'unit': UnitOfMeasure;
|
|
91
|
+
'gross_unit_price'?: GrossUnitPrice | null;
|
|
50
92
|
'unit_net_price': UnitNetPrice;
|
|
93
|
+
'price_basis_quantity'?: PriceBasisQuantity | null;
|
|
94
|
+
'price_basis_unit'?: string | null;
|
|
95
|
+
'price_allowance_amount'?: PriceAllowanceAmount | null;
|
|
96
|
+
'lineNetAmount'?: LineNetAmount | null;
|
|
51
97
|
'allowanceAmount'?: InvoiceLineAllowanceAmount | null;
|
|
52
|
-
'
|
|
98
|
+
'allowanceReasonCode'?: AllowanceReasonCode | null;
|
|
99
|
+
'allowanceReason'?: string | null;
|
|
100
|
+
'allowances_charges'?: Array<AllowanceCharge> | null;
|
|
53
101
|
'vat_rate'?: string | null;
|
|
54
102
|
'manual_vat_rate'?: ManualVatRate;
|
|
55
103
|
'vat_category'?: VATCategory | null;
|
|
56
|
-
'
|
|
57
|
-
'
|
|
58
|
-
'
|
|
59
|
-
'
|
|
104
|
+
'period_start_date'?: string | null;
|
|
105
|
+
'period_end_date'?: string | null;
|
|
106
|
+
'purchase_order_line_ref'?: string | null;
|
|
107
|
+
'accounting_account'?: string | null;
|
|
108
|
+
'additional_documents'?: Array<AdditionalDocument> | null;
|
|
109
|
+
'line_notes'?: Array<InvoiceNote> | null;
|
|
60
110
|
}
|
|
61
111
|
|
|
62
112
|
|
|
@@ -27,14 +27,33 @@ import type { VATAccountingCode } from './vataccounting-code';
|
|
|
27
27
|
* Contains various invoice references (currency, type, etc.).
|
|
28
28
|
*/
|
|
29
29
|
export interface InvoiceReferences {
|
|
30
|
+
'business_process_id'?: string | null;
|
|
31
|
+
/**
|
|
32
|
+
* Invoice currency code (BT-5). ISO 4217.
|
|
33
|
+
*/
|
|
30
34
|
'invoice_currency'?: string;
|
|
35
|
+
/**
|
|
36
|
+
* Payment means type code (BT-81).
|
|
37
|
+
*/
|
|
31
38
|
'payment_means': PaymentMeans;
|
|
39
|
+
'payment_means_text'?: string | null;
|
|
32
40
|
'invoice_type': InvoiceTypeCode;
|
|
41
|
+
/**
|
|
42
|
+
* VAT accounting code.
|
|
43
|
+
*/
|
|
33
44
|
'vat_accounting_code': VATAccountingCode;
|
|
45
|
+
'buyer_reference'?: string | null;
|
|
34
46
|
'contract_reference'?: string | null;
|
|
35
|
-
'vat_exemption_reason'?: string | null;
|
|
36
47
|
'purchase_order_reference'?: string | null;
|
|
48
|
+
'seller_order_reference'?: string | null;
|
|
49
|
+
'receiving_advice_reference'?: string | null;
|
|
50
|
+
'despatch_advice_reference'?: string | null;
|
|
51
|
+
'tender_reference'?: string | null;
|
|
37
52
|
'preceding_invoice_reference'?: string | null;
|
|
53
|
+
'preceding_invoice_date'?: string | null;
|
|
54
|
+
'project_reference'?: string | null;
|
|
55
|
+
'project_name'?: string | null;
|
|
56
|
+
'vat_exemption_reason'?: string | null;
|
|
38
57
|
}
|
|
39
58
|
|
|
40
59
|
|
package/models/invoice-totals.ts
CHANGED
|
@@ -13,17 +13,29 @@
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
|
|
16
|
+
// May contain unused imports in some cases
|
|
17
|
+
// @ts-ignore
|
|
18
|
+
import type { AllowanceTotalAmount } from './allowance-total-amount';
|
|
16
19
|
// May contain unused imports in some cases
|
|
17
20
|
// @ts-ignore
|
|
18
21
|
import type { AmountDue } from './amount-due';
|
|
19
22
|
// May contain unused imports in some cases
|
|
20
23
|
// @ts-ignore
|
|
24
|
+
import type { ChargeTotalAmount } from './charge-total-amount';
|
|
25
|
+
// May contain unused imports in some cases
|
|
26
|
+
// @ts-ignore
|
|
21
27
|
import type { GlobalAllowanceAmount } from './global-allowance-amount';
|
|
22
28
|
// May contain unused imports in some cases
|
|
23
29
|
// @ts-ignore
|
|
24
30
|
import type { InvoiceTotalsPrepayment } from './invoice-totals-prepayment';
|
|
25
31
|
// May contain unused imports in some cases
|
|
26
32
|
// @ts-ignore
|
|
33
|
+
import type { LineTotalAmount } from './line-total-amount';
|
|
34
|
+
// May contain unused imports in some cases
|
|
35
|
+
// @ts-ignore
|
|
36
|
+
import type { RoundingAmount } from './rounding-amount';
|
|
37
|
+
// May contain unused imports in some cases
|
|
38
|
+
// @ts-ignore
|
|
27
39
|
import type { TotalGrossAmount } from './total-gross-amount';
|
|
28
40
|
// May contain unused imports in some cases
|
|
29
41
|
// @ts-ignore
|
|
@@ -33,14 +45,18 @@ import type { TotalNetAmount } from './total-net-amount';
|
|
|
33
45
|
import type { TotalVATAmount } from './total-vatamount';
|
|
34
46
|
|
|
35
47
|
/**
|
|
36
|
-
* Contains all invoice total amounts.
|
|
48
|
+
* Contains all invoice total amounts (BG-22).
|
|
37
49
|
*/
|
|
38
50
|
export interface InvoiceTotals {
|
|
51
|
+
'line_total_amount'?: LineTotalAmount | null;
|
|
52
|
+
'allowance_total_amount'?: AllowanceTotalAmount | null;
|
|
53
|
+
'charge_total_amount'?: ChargeTotalAmount | null;
|
|
39
54
|
'total_net_amount': TotalNetAmount;
|
|
40
55
|
'vat_amount': TotalVATAmount;
|
|
41
56
|
'total_gross_amount': TotalGrossAmount;
|
|
42
|
-
'amount_due': AmountDue;
|
|
43
57
|
'prepayment'?: InvoiceTotalsPrepayment | null;
|
|
58
|
+
'rounding_amount'?: RoundingAmount | null;
|
|
59
|
+
'amount_due': AmountDue;
|
|
44
60
|
'globalAllowanceAmount'?: GlobalAllowanceAmount;
|
|
45
61
|
'globalAllowanceReason'?: string | null;
|
|
46
62
|
}
|
|
@@ -0,0 +1,22 @@
|
|
|
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
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Sum of all Invoice line net amounts (BT-106).
|
|
19
|
+
*/
|
|
20
|
+
export interface LineTotalAmount {
|
|
21
|
+
}
|
|
22
|
+
|
package/models/manual-rate.ts
CHANGED
|
@@ -0,0 +1,40 @@
|
|
|
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
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Champ manquant requis pour la conformite.
|
|
19
|
+
*/
|
|
20
|
+
export interface MissingField {
|
|
21
|
+
/**
|
|
22
|
+
* Nom du champ
|
|
23
|
+
*/
|
|
24
|
+
'field': string;
|
|
25
|
+
/**
|
|
26
|
+
* Code Business Term (BT-XX)
|
|
27
|
+
*/
|
|
28
|
+
'bt_code': string;
|
|
29
|
+
/**
|
|
30
|
+
* Description du champ
|
|
31
|
+
*/
|
|
32
|
+
'description': string;
|
|
33
|
+
/**
|
|
34
|
+
* Profils necessitant ce champ
|
|
35
|
+
*/
|
|
36
|
+
'required_for': Array<string>;
|
|
37
|
+
'suggested_value'?: string | null;
|
|
38
|
+
'confidence'?: number | null;
|
|
39
|
+
}
|
|
40
|
+
|
package/models/payee.ts
CHANGED
|
@@ -25,10 +25,12 @@ export interface Payee {
|
|
|
25
25
|
* Payee name (BT-59). Mandatory.
|
|
26
26
|
*/
|
|
27
27
|
'nom': string;
|
|
28
|
+
'payeeId'?: string | null;
|
|
28
29
|
'siret'?: string | null;
|
|
29
30
|
'siren'?: string | null;
|
|
30
31
|
'electronicAddress'?: ElectronicAddress | null;
|
|
31
32
|
'iban'?: string | null;
|
|
32
33
|
'bic'?: string | null;
|
|
34
|
+
'global_ids'?: Array<ElectronicAddress> | null;
|
|
33
35
|
}
|
|
34
36
|
|