@factpulse/sdk 2.0.12 → 2.0.49
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/.github/SETUP_GITHUB_ACTIONS.md +70 -8
- package/.github/workflows/publish-npm.yml +5 -7
- package/.openapi-generator/FILES +58 -26
- package/CHANGELOG.md +3 -3
- package/README.md +165 -116
- package/api/afnorpdppaapi.ts +149 -0
- package/api/chorus-pro-api.ts +151 -181
- package/api/traitement-facture-api.ts +12 -12
- package/api/vrification-pdfxmlapi.ts +536 -0
- package/api.ts +1 -0
- package/dist/api/afnorpdppaapi.d.ts +65 -0
- package/dist/api/afnorpdppaapi.js +142 -1
- package/dist/api/afnorpdppadirectory-service-api.js +4 -1
- package/dist/api/afnorpdppaflow-service-api.js +4 -1
- package/dist/api/chorus-pro-api.d.ts +168 -103
- package/dist/api/chorus-pro-api.js +155 -160
- package/dist/api/sant-api.js +4 -1
- package/dist/api/traitement-facture-api.d.ts +12 -12
- package/dist/api/traitement-facture-api.js +16 -13
- package/dist/api/utilisateur-api.js +4 -1
- package/dist/api/vrification-pdfxmlapi.d.ts +237 -0
- package/dist/api/vrification-pdfxmlapi.js +514 -0
- package/dist/api.d.ts +1 -0
- package/dist/api.js +1 -0
- package/dist/base.js +4 -1
- package/dist/esm/api/afnorpdppaapi.d.ts +65 -0
- package/dist/esm/api/afnorpdppaapi.js +139 -1
- package/dist/esm/api/chorus-pro-api.d.ts +168 -103
- package/dist/esm/api/chorus-pro-api.js +151 -159
- package/dist/esm/api/traitement-facture-api.d.ts +12 -12
- package/dist/esm/api/traitement-facture-api.js +12 -12
- package/dist/esm/api/vrification-pdfxmlapi.d.ts +237 -0
- package/dist/esm/api/vrification-pdfxmlapi.js +504 -0
- package/dist/esm/api.d.ts +1 -0
- package/dist/esm/api.js +1 -0
- package/dist/esm/models/{utilisateur.d.ts → apierror.d.ts} +12 -15
- package/dist/esm/models/beneficiaire.d.ts +26 -0
- package/dist/esm/models/bounding-box-schema.d.ts +44 -0
- package/dist/esm/models/cadre-de-facturation.d.ts +3 -1
- package/dist/esm/models/champ-verifie-schema.d.ts +42 -0
- package/dist/esm/models/code-cadre-facturation.d.ts +3 -0
- package/dist/esm/models/code-cadre-facturation.js +3 -0
- package/dist/esm/models/destinataire.d.ts +1 -1
- package/dist/esm/models/dimension-page-schema.d.ts +24 -0
- package/dist/esm/models/{quota-info.d.ts → direction-flux.d.ts} +6 -8
- package/dist/esm/models/direction-flux.js +20 -0
- package/dist/esm/models/error-level.d.ts +16 -0
- package/dist/esm/models/error-level.js +17 -0
- package/dist/esm/models/{body-ajouter-fichier-api-v1-chorus-pro-transverses-ajouter-fichier-post.d.ts → error-source.d.ts} +11 -9
- package/dist/esm/models/error-source.js +23 -0
- package/dist/esm/models/facture-entrante.d.ts +68 -0
- package/dist/esm/models/facture-factur-x.d.ts +2 -0
- package/dist/esm/models/{body-rechercher-factures-destinataire-api-v1-chorus-pro-factures-rechercher-destinataire-post.d.ts → flux-resume.d.ts} +12 -8
- package/dist/esm/models/format-facture.d.ts +20 -0
- package/dist/esm/models/format-facture.js +21 -0
- package/dist/esm/models/fournisseur-entrant.d.ts +29 -0
- package/dist/esm/models/fournisseur.d.ts +1 -1
- package/dist/esm/models/index.d.ts +28 -13
- package/dist/esm/models/index.js +28 -13
- package/dist/esm/models/ligne-de-tva.d.ts +3 -1
- package/dist/esm/models/nature-operation.d.ts +31 -0
- package/dist/esm/models/nature-operation.js +32 -0
- package/dist/esm/models/note-obligatoire-schema.d.ts +34 -0
- package/dist/esm/models/note.d.ts +2 -2
- package/dist/esm/models/pdpcredentials.d.ts +33 -0
- package/dist/esm/models/profil-flux.d.ts +20 -0
- package/dist/esm/models/profil-flux.js +21 -0
- package/dist/esm/models/{body-completer-facture-api-v1-chorus-pro-factures-completer-post.d.ts → reponse-healthcheck-afnor.d.ts} +16 -8
- package/dist/esm/models/reponse-recherche-flux.d.ts +33 -0
- package/dist/esm/models/reponse-soumission-flux.d.ts +38 -0
- package/dist/esm/models/reponse-verification-succes.d.ts +56 -0
- package/dist/esm/models/reponse-verification-succes.js +14 -0
- package/dist/esm/models/requete-recherche-flux.d.ts +34 -0
- package/dist/esm/models/requete-recherche-flux.js +14 -0
- package/dist/esm/models/requete-soumission-flux.d.ts +31 -0
- package/dist/esm/models/requete-soumission-flux.js +14 -0
- package/dist/esm/models/statut-acquittement.d.ts +20 -0
- package/dist/esm/models/statut-acquittement.js +21 -0
- package/dist/esm/models/statut-champ-api.d.ts +22 -0
- package/dist/esm/models/statut-champ-api.js +23 -0
- package/dist/esm/models/syntaxe-flux.d.ts +22 -0
- package/dist/esm/models/syntaxe-flux.js +23 -0
- package/dist/esm/models/type-document.d.ts +37 -0
- package/dist/esm/models/type-document.js +38 -0
- package/dist/esm/models/type-facture.d.ts +65 -3
- package/dist/esm/models/type-facture.js +65 -3
- package/dist/esm/models/type-flux.d.ts +22 -0
- package/dist/esm/models/type-flux.js +23 -0
- package/dist/esm/models/validation-error-detail.d.ts +32 -0
- package/dist/esm/models/validation-error-detail.js +14 -0
- package/dist/esm/src/helpers/client.d.ts +265 -0
- package/dist/esm/src/helpers/client.js +817 -0
- package/dist/esm/src/helpers/exceptions.d.ts +23 -0
- package/dist/esm/src/helpers/exceptions.js +27 -0
- package/dist/esm/src/helpers/index.d.ts +3 -0
- package/dist/esm/src/helpers/index.js +6 -0
- package/dist/models/{utilisateur.d.ts → apierror.d.ts} +12 -15
- package/dist/models/beneficiaire.d.ts +26 -0
- package/dist/models/bounding-box-schema.d.ts +44 -0
- package/dist/models/cadre-de-facturation.d.ts +3 -1
- package/dist/models/champ-verifie-schema.d.ts +42 -0
- package/dist/models/code-cadre-facturation.d.ts +3 -0
- package/dist/models/code-cadre-facturation.js +3 -0
- package/dist/models/destinataire.d.ts +1 -1
- package/dist/models/dimension-page-schema.d.ts +24 -0
- package/dist/models/{quota-info.d.ts → direction-flux.d.ts} +6 -8
- package/dist/models/direction-flux.js +23 -0
- package/dist/models/error-level.d.ts +16 -0
- package/dist/models/error-level.js +20 -0
- package/dist/models/error-source.d.ts +22 -0
- package/dist/models/error-source.js +26 -0
- package/dist/models/facture-entrante.d.ts +68 -0
- package/dist/models/facture-factur-x.d.ts +2 -0
- package/dist/models/flux-resume.d.ts +24 -0
- package/dist/models/format-facture.d.ts +20 -0
- package/dist/models/format-facture.js +24 -0
- package/dist/models/fournisseur-entrant.d.ts +29 -0
- package/dist/models/fournisseur.d.ts +1 -1
- package/dist/models/index.d.ts +28 -13
- package/dist/models/index.js +28 -13
- package/dist/models/ligne-de-tva.d.ts +3 -1
- package/dist/models/nature-operation.d.ts +31 -0
- package/dist/models/nature-operation.js +35 -0
- package/dist/models/note-obligatoire-schema.d.ts +34 -0
- package/dist/models/note.d.ts +2 -2
- package/dist/models/pdpcredentials.d.ts +33 -0
- package/dist/models/profil-flux.d.ts +20 -0
- package/dist/models/profil-flux.js +24 -0
- package/dist/{esm/models/body-recycler-facture-api-v1-chorus-pro-factures-recycler-post.d.ts → models/reponse-healthcheck-afnor.d.ts} +16 -8
- package/dist/models/reponse-recherche-flux.d.ts +33 -0
- package/dist/models/reponse-soumission-flux.d.ts +38 -0
- package/dist/models/reponse-verification-succes.d.ts +56 -0
- package/dist/models/reponse-verification-succes.js +15 -0
- package/dist/models/requete-recherche-flux.d.ts +34 -0
- package/dist/models/requete-recherche-flux.js +15 -0
- package/dist/models/requete-soumission-flux.d.ts +31 -0
- package/dist/models/requete-soumission-flux.js +15 -0
- package/dist/models/statut-acquittement.d.ts +20 -0
- package/dist/models/statut-acquittement.js +24 -0
- package/dist/models/statut-champ-api.d.ts +22 -0
- package/dist/models/statut-champ-api.js +26 -0
- package/dist/models/syntaxe-flux.d.ts +22 -0
- package/dist/models/syntaxe-flux.js +26 -0
- package/dist/models/type-document.d.ts +37 -0
- package/dist/models/type-document.js +41 -0
- package/dist/models/type-facture.d.ts +65 -3
- package/dist/models/type-facture.js +65 -3
- package/dist/models/type-flux.d.ts +22 -0
- package/dist/models/type-flux.js +26 -0
- package/dist/models/validation-error-detail.d.ts +32 -0
- package/dist/models/validation-error-detail.js +15 -0
- package/dist/src/helpers/client.d.ts +265 -0
- package/dist/src/helpers/client.js +866 -0
- package/dist/src/helpers/exceptions.d.ts +23 -0
- package/dist/src/helpers/exceptions.js +35 -0
- package/dist/src/helpers/index.d.ts +3 -0
- package/dist/src/helpers/index.js +23 -0
- package/docs/AFNORPDPPAApi.md +108 -0
- package/docs/APIError.md +25 -0
- package/docs/Beneficiaire.md +31 -0
- package/docs/BoundingBoxSchema.md +33 -0
- package/docs/CadreDeFacturation.md +3 -1
- package/docs/ChampVerifieSchema.md +37 -0
- package/docs/ChorusProApi.md +54 -69
- package/docs/CodeCadreFacturation.md +1 -0
- package/docs/DimensionPageSchema.md +23 -0
- package/docs/DirectionFlux.md +11 -0
- package/docs/ErrorLevel.md +10 -0
- package/docs/ErrorSource.md +22 -0
- package/docs/FactureEntrante.md +57 -0
- package/docs/FactureFacturX.md +2 -0
- package/docs/FluxResume.md +35 -0
- package/docs/FormatFacture.md +13 -0
- package/docs/FournisseurEntrant.md +35 -0
- package/docs/LigneDeTVA.md +5 -1
- package/docs/NatureOperation.md +35 -0
- package/docs/Note.md +4 -4
- package/docs/NoteObligatoireSchema.md +33 -0
- package/docs/PDPCredentials.md +29 -0
- package/docs/ProfilFlux.md +13 -0
- package/docs/ReponseHealthcheckAFNOR.md +25 -0
- package/docs/ReponseRechercheFlux.md +27 -0
- package/docs/ReponseSoumissionFlux.md +33 -0
- package/docs/ReponseVerificationSucces.md +39 -0
- package/docs/RequeteRechercheFlux.md +37 -0
- package/docs/RequeteSoumissionFlux.md +31 -0
- package/docs/StatutAcquittement.md +13 -0
- package/docs/StatutChampAPI.md +17 -0
- package/docs/SyntaxeFlux.md +17 -0
- package/docs/TraitementFactureApi.md +3 -3
- package/docs/TypeDocument.md +17 -0
- package/docs/TypeFacture.md +31 -3
- package/docs/TypeFlux.md +17 -0
- package/docs/ValidationErrorDetail.md +29 -0
- package/docs/VrificationPDFXMLApi.md +335 -0
- package/models/{utilisateur.ts → apierror.ts} +12 -15
- package/models/beneficiaire.ts +34 -0
- package/models/bounding-box-schema.ts +50 -0
- package/models/cadre-de-facturation.ts +5 -1
- package/models/champ-verifie-schema.ts +54 -0
- package/models/code-cadre-facturation.ts +3 -0
- package/models/destinataire.ts +1 -1
- package/models/dimension-page-schema.ts +30 -0
- package/models/{quota-info.ts → direction-flux.ts} +10 -8
- package/models/error-level.ts +26 -0
- package/models/error-source.ts +32 -0
- package/models/facture-entrante.ts +82 -0
- package/models/facture-factur-x.ts +4 -0
- package/models/flux-resume.ts +30 -0
- package/models/format-facture.ts +30 -0
- package/models/fournisseur-entrant.ts +39 -0
- package/models/fournisseur.ts +1 -1
- package/models/index.ts +28 -13
- package/models/ligne-de-tva.ts +3 -1
- package/models/nature-operation.ts +41 -0
- package/models/{body-lister-services-structure-api-v1-chorus-pro-structures-id-structure-cpp-services-get.ts → note-obligatoire-schema.ts} +24 -5
- package/models/note.ts +2 -2
- package/models/pdpcredentials.ts +39 -0
- package/models/profil-flux.ts +30 -0
- package/models/reponse-healthcheck-afnor.ts +34 -0
- package/models/{body-ajouter-fichier-api-v1-chorus-pro-transverses-ajouter-fichier-post.ts → reponse-recherche-flux.ts} +21 -8
- package/models/{body-completer-facture-api-v1-chorus-pro-factures-completer-post.ts → reponse-soumission-flux.ts} +26 -10
- package/models/reponse-verification-succes.ts +68 -0
- package/models/requete-recherche-flux.ts +48 -0
- package/models/{body-rechercher-factures-destinataire-api-v1-chorus-pro-factures-rechercher-destinataire-post.ts → requete-soumission-flux.ts} +23 -6
- package/models/statut-acquittement.ts +30 -0
- package/models/statut-champ-api.ts +32 -0
- package/models/syntaxe-flux.ts +32 -0
- package/models/type-document.ts +47 -0
- package/models/type-facture.ts +65 -3
- package/models/type-flux.ts +32 -0
- package/models/validation-error-detail.ts +44 -0
- package/package.json +2 -2
- package/src/helpers/client.ts +882 -0
- package/src/helpers/exceptions.ts +32 -0
- package/src/helpers/index.ts +6 -0
- package/tsconfig.esm.json +1 -0
- package/tsconfig.json +1 -0
- package/dist/esm/models/body-lister-services-structure-api-v1-chorus-pro-structures-id-structure-cpp-services-get.d.ts +0 -17
- package/dist/esm/models/body-rechercher-factures-fournisseur-api-v1-chorus-pro-factures-rechercher-fournisseur-post.d.ts +0 -20
- package/dist/esm/models/body-telecharger-groupe-factures-api-v1-chorus-pro-factures-telecharger-groupe-post.d.ts +0 -20
- package/dist/esm/models/body-traiter-facture-recue-api-v1-chorus-pro-factures-traiter-facture-recue-post.d.ts +0 -20
- package/dist/esm/models/body-valideur-consulter-facture-api-v1-chorus-pro-factures-valideur-consulter-post.d.ts +0 -20
- package/dist/esm/models/body-valideur-rechercher-factures-api-v1-chorus-pro-factures-valideur-rechercher-post.d.ts +0 -20
- package/dist/esm/models/body-valideur-traiter-facture-api-v1-chorus-pro-factures-valideur-traiter-post.d.ts +0 -20
- package/dist/models/body-ajouter-fichier-api-v1-chorus-pro-transverses-ajouter-fichier-post.d.ts +0 -20
- package/dist/models/body-completer-facture-api-v1-chorus-pro-factures-completer-post.d.ts +0 -20
- package/dist/models/body-lister-services-structure-api-v1-chorus-pro-structures-id-structure-cpp-services-get.d.ts +0 -17
- package/dist/models/body-rechercher-factures-destinataire-api-v1-chorus-pro-factures-rechercher-destinataire-post.d.ts +0 -20
- package/dist/models/body-rechercher-factures-fournisseur-api-v1-chorus-pro-factures-rechercher-fournisseur-post.d.ts +0 -20
- package/dist/models/body-recycler-facture-api-v1-chorus-pro-factures-recycler-post.d.ts +0 -20
- package/dist/models/body-telecharger-groupe-factures-api-v1-chorus-pro-factures-telecharger-groupe-post.d.ts +0 -20
- package/dist/models/body-traiter-facture-recue-api-v1-chorus-pro-factures-traiter-facture-recue-post.d.ts +0 -20
- package/dist/models/body-valideur-consulter-facture-api-v1-chorus-pro-factures-valideur-consulter-post.d.ts +0 -20
- package/dist/models/body-valideur-rechercher-factures-api-v1-chorus-pro-factures-valideur-rechercher-post.d.ts +0 -20
- package/dist/models/body-valideur-traiter-facture-api-v1-chorus-pro-factures-valideur-traiter-post.d.ts +0 -20
- package/docs/BodyAjouterFichierApiV1ChorusProTransversesAjouterFichierPost.md +0 -24
- package/docs/BodyCompleterFactureApiV1ChorusProFacturesCompleterPost.md +0 -24
- package/docs/BodyListerServicesStructureApiV1ChorusProStructuresIdStructureCppServicesGet.md +0 -22
- package/docs/BodyRechercherFacturesDestinataireApiV1ChorusProFacturesRechercherDestinatairePost.md +0 -24
- package/docs/BodyRechercherFacturesFournisseurApiV1ChorusProFacturesRechercherFournisseurPost.md +0 -24
- package/docs/BodyRecyclerFactureApiV1ChorusProFacturesRecyclerPost.md +0 -24
- package/docs/BodyTelechargerGroupeFacturesApiV1ChorusProFacturesTelechargerGroupePost.md +0 -24
- package/docs/BodyTraiterFactureRecueApiV1ChorusProFacturesTraiterFactureRecuePost.md +0 -24
- package/docs/BodyValideurConsulterFactureApiV1ChorusProFacturesValideurConsulterPost.md +0 -24
- package/docs/BodyValideurRechercherFacturesApiV1ChorusProFacturesValideurRechercherPost.md +0 -24
- package/docs/BodyValideurTraiterFactureApiV1ChorusProFacturesValideurTraiterPost.md +0 -24
- package/docs/QuotaInfo.md +0 -29
- package/docs/Utilisateur.md +0 -43
- package/models/body-rechercher-factures-fournisseur-api-v1-chorus-pro-factures-rechercher-fournisseur-post.ts +0 -28
- package/models/body-recycler-facture-api-v1-chorus-pro-factures-recycler-post.ts +0 -28
- package/models/body-telecharger-groupe-factures-api-v1-chorus-pro-factures-telecharger-groupe-post.ts +0 -28
- package/models/body-traiter-facture-recue-api-v1-chorus-pro-factures-traiter-facture-recue-post.ts +0 -28
- package/models/body-valideur-consulter-facture-api-v1-chorus-pro-factures-valideur-consulter-post.ts +0 -28
- package/models/body-valideur-rechercher-factures-api-v1-chorus-pro-factures-valideur-rechercher-post.ts +0 -28
- package/models/body-valideur-traiter-facture-api-v1-chorus-pro-factures-valideur-traiter-post.ts +0 -28
- /package/dist/esm/models/{body-ajouter-fichier-api-v1-chorus-pro-transverses-ajouter-fichier-post.js → apierror.js} +0 -0
- /package/dist/esm/models/{body-completer-facture-api-v1-chorus-pro-factures-completer-post.js → beneficiaire.js} +0 -0
- /package/dist/esm/models/{body-lister-services-structure-api-v1-chorus-pro-structures-id-structure-cpp-services-get.js → bounding-box-schema.js} +0 -0
- /package/dist/esm/models/{body-rechercher-factures-destinataire-api-v1-chorus-pro-factures-rechercher-destinataire-post.js → champ-verifie-schema.js} +0 -0
- /package/dist/esm/models/{body-rechercher-factures-fournisseur-api-v1-chorus-pro-factures-rechercher-fournisseur-post.js → dimension-page-schema.js} +0 -0
- /package/dist/esm/models/{body-recycler-facture-api-v1-chorus-pro-factures-recycler-post.js → facture-entrante.js} +0 -0
- /package/dist/esm/models/{body-telecharger-groupe-factures-api-v1-chorus-pro-factures-telecharger-groupe-post.js → flux-resume.js} +0 -0
- /package/dist/esm/models/{body-traiter-facture-recue-api-v1-chorus-pro-factures-traiter-facture-recue-post.js → fournisseur-entrant.js} +0 -0
- /package/dist/esm/models/{body-valideur-consulter-facture-api-v1-chorus-pro-factures-valideur-consulter-post.js → note-obligatoire-schema.js} +0 -0
- /package/dist/esm/models/{body-valideur-rechercher-factures-api-v1-chorus-pro-factures-valideur-rechercher-post.js → pdpcredentials.js} +0 -0
- /package/dist/esm/models/{body-valideur-traiter-facture-api-v1-chorus-pro-factures-valideur-traiter-post.js → reponse-healthcheck-afnor.js} +0 -0
- /package/dist/esm/models/{quota-info.js → reponse-recherche-flux.js} +0 -0
- /package/dist/esm/models/{utilisateur.js → reponse-soumission-flux.js} +0 -0
- /package/dist/models/{body-ajouter-fichier-api-v1-chorus-pro-transverses-ajouter-fichier-post.js → apierror.js} +0 -0
- /package/dist/models/{body-completer-facture-api-v1-chorus-pro-factures-completer-post.js → beneficiaire.js} +0 -0
- /package/dist/models/{body-lister-services-structure-api-v1-chorus-pro-structures-id-structure-cpp-services-get.js → bounding-box-schema.js} +0 -0
- /package/dist/models/{body-rechercher-factures-destinataire-api-v1-chorus-pro-factures-rechercher-destinataire-post.js → champ-verifie-schema.js} +0 -0
- /package/dist/models/{body-rechercher-factures-fournisseur-api-v1-chorus-pro-factures-rechercher-fournisseur-post.js → dimension-page-schema.js} +0 -0
- /package/dist/models/{body-recycler-facture-api-v1-chorus-pro-factures-recycler-post.js → facture-entrante.js} +0 -0
- /package/dist/models/{body-telecharger-groupe-factures-api-v1-chorus-pro-factures-telecharger-groupe-post.js → flux-resume.js} +0 -0
- /package/dist/models/{body-traiter-facture-recue-api-v1-chorus-pro-factures-traiter-facture-recue-post.js → fournisseur-entrant.js} +0 -0
- /package/dist/models/{body-valideur-consulter-facture-api-v1-chorus-pro-factures-valideur-consulter-post.js → note-obligatoire-schema.js} +0 -0
- /package/dist/models/{body-valideur-rechercher-factures-api-v1-chorus-pro-factures-valideur-rechercher-post.js → pdpcredentials.js} +0 -0
- /package/dist/models/{body-valideur-traiter-facture-api-v1-chorus-pro-factures-valideur-traiter-post.js → reponse-healthcheck-afnor.js} +0 -0
- /package/dist/models/{quota-info.js → reponse-recherche-flux.js} +0 -0
- /package/dist/models/{utilisateur.js → reponse-soumission-flux.js} +0 -0
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* API REST FactPulse
|
|
3
|
+
* API REST pour la facturation électronique en France : Factur-X, AFNOR PDP/PA, signatures électroniques. ## 🎯 Fonctionnalités principales ### 📄 Génération de factures Factur-X - **Formats** : XML seul ou PDF/A-3 avec XML embarqué - **Profils** : MINIMUM, BASIC, EN16931, EXTENDED - **Normes** : EN 16931 (directive UE 2014/55), ISO 19005-3 (PDF/A-3), CII (UN/CEFACT) - **🆕 Format simplifié** : Génération à partir de SIRET + auto-enrichissement (API Chorus Pro + Recherche Entreprises) ### ✅ Validation et conformité - **Validation XML** : Schematron (45 à 210+ règles selon profil) - **Validation PDF** : PDF/A-3, métadonnées XMP Factur-X, signatures électroniques - **VeraPDF** : Validation stricte PDF/A (146+ règles ISO 19005-3) - **Traitement asynchrone** : Support Celery pour validations lourdes (VeraPDF) ### 📡 Intégration AFNOR PDP/PA (XP Z12-013) - **Soumission de flux** : Envoi de factures vers Plateformes de Dématérialisation Partenaires - **Recherche de flux** : Consultation des factures soumises - **Téléchargement** : Récupération des PDF/A-3 avec XML - **Directory Service** : Recherche d\'entreprises (SIREN/SIRET) - **Multi-client** : Support de plusieurs configs PDP par utilisateur (stored credentials ou zero-storage) ### ✍️ Signature électronique PDF - **Standards** : PAdES-B-B, PAdES-B-T (horodatage RFC 3161), PAdES-B-LT (archivage long terme) - **Niveaux eIDAS** : SES (auto-signé), AdES (CA commerciale), QES (PSCO) - **Validation** : Vérification intégrité cryptographique et certificats - **Génération de certificats** : Certificats X.509 auto-signés pour tests ### 🔄 Traitement asynchrone - **Celery** : Génération, validation et signature asynchrones - **Polling** : Suivi d\'état via `/taches/{id_tache}/statut` - **Pas de timeout** : Idéal pour gros fichiers ou validations lourdes ## 🔒 Authentification Toutes les requêtes nécessitent un **token JWT** dans le header Authorization : ``` Authorization: Bearer YOUR_JWT_TOKEN ``` ### Comment obtenir un token JWT ? #### 🔑 Méthode 1 : API `/api/token/` (Recommandée) **URL :** `https://www.factpulse.fr/api/token/` Cette méthode est **recommandée** pour l\'intégration dans vos applications et workflows CI/CD. **Prérequis :** Avoir défini un mot de passe sur votre compte **Pour les utilisateurs inscrits via email/password :** - Vous avez déjà un mot de passe, utilisez-le directement **Pour les utilisateurs inscrits via OAuth (Google/GitHub) :** - Vous devez d\'abord définir un mot de passe sur : https://www.factpulse.fr/accounts/password/set/ - Une fois le mot de passe créé, vous pourrez utiliser l\'API **Exemple de requête :** ```bash curl -X POST https://www.factpulse.fr/api/token/ \\ -H \"Content-Type: application/json\" \\ -d \'{ \"username\": \"votre_email@example.com\", \"password\": \"votre_mot_de_passe\" }\' ``` **Paramètre optionnel `client_uid` :** Pour sélectionner les credentials d\'un client spécifique (PA/PDP, Chorus Pro, certificats de signature), ajoutez `client_uid` : ```bash curl -X POST https://www.factpulse.fr/api/token/ \\ -H \"Content-Type: application/json\" \\ -d \'{ \"username\": \"votre_email@example.com\", \"password\": \"votre_mot_de_passe\", \"client_uid\": \"550e8400-e29b-41d4-a716-446655440000\" }\' ``` Le `client_uid` sera inclus dans le JWT et permettra à l\'API d\'utiliser automatiquement : - Les credentials AFNOR/PDP configurés pour ce client - Les credentials Chorus Pro configurés pour ce client - Les certificats de signature électronique configurés pour ce client **Réponse :** ```json { \"access\": \"eyJ0eXAiOiJKV1QiLCJhbGc...\", // Token d\'accès (validité: 30 min) \"refresh\": \"eyJ0eXAiOiJKV1QiLCJhbGc...\" // Token de rafraîchissement (validité: 7 jours) } ``` **Avantages :** - ✅ Automatisation complète (CI/CD, scripts) - ✅ Gestion programmatique des tokens - ✅ Support du refresh token pour renouveler automatiquement l\'accès - ✅ Intégration facile dans n\'importe quel langage/outil #### 🖥️ Méthode 2 : Génération via Dashboard (Alternative) **URL :** https://www.factpulse.fr/dashboard/ Cette méthode convient pour des tests rapides ou une utilisation occasionnelle via l\'interface graphique. **Fonctionnement :** - Connectez-vous au dashboard - Utilisez les boutons \"Generate Test Token\" ou \"Generate Production Token\" - Fonctionne pour **tous** les utilisateurs (OAuth et email/password), sans nécessiter de mot de passe **Types de tokens :** - **Token Test** : Validité 24h, quota 1000 appels/jour (gratuit) - **Token Production** : Validité 7 jours, quota selon votre forfait **Avantages :** - ✅ Rapide pour tester l\'API - ✅ Aucun mot de passe requis - ✅ Interface visuelle simple **Inconvénients :** - ❌ Nécessite une action manuelle - ❌ Pas de refresh token - ❌ Moins adapté pour l\'automatisation ### 📚 Documentation complète Pour plus d\'informations sur l\'authentification et l\'utilisation de l\'API : https://www.factpulse.fr/documentation-api/
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* Types de documents commerciaux (UNTDID 1001). | Code | Nom | Description | |------|-----|-------------| | 380 | FACTURE | Facture commerciale | | 381 | AVOIR | Avoir | | 384 | FACTURE_RECTIFICATIVE | Facture rectificative | | 386 | ACOMPTE | Facture d\'acompte | | 389 | AUTOFACTURATION | Facture auto-facturée |
|
|
14
|
+
*/
|
|
15
|
+
export declare const TypeDocument: {
|
|
16
|
+
/**
|
|
17
|
+
* Facture commerciale
|
|
18
|
+
*/
|
|
19
|
+
readonly FACTURE: "380";
|
|
20
|
+
/**
|
|
21
|
+
* Avoir
|
|
22
|
+
*/
|
|
23
|
+
readonly AVOIR: "381";
|
|
24
|
+
/**
|
|
25
|
+
* Facture rectificative
|
|
26
|
+
*/
|
|
27
|
+
readonly FACTURE_RECTIFICATIVE: "384";
|
|
28
|
+
/**
|
|
29
|
+
* Facture d'acompte
|
|
30
|
+
*/
|
|
31
|
+
readonly ACOMPTE: "386";
|
|
32
|
+
/**
|
|
33
|
+
* Facture auto-facturée
|
|
34
|
+
*/
|
|
35
|
+
readonly AUTOFACTURATION: "389";
|
|
36
|
+
};
|
|
37
|
+
export type TypeDocument = typeof TypeDocument[keyof typeof TypeDocument];
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* API REST FactPulse
|
|
6
|
+
* API REST pour la facturation électronique en France : Factur-X, AFNOR PDP/PA, signatures électroniques. ## 🎯 Fonctionnalités principales ### 📄 Génération de factures Factur-X - **Formats** : XML seul ou PDF/A-3 avec XML embarqué - **Profils** : MINIMUM, BASIC, EN16931, EXTENDED - **Normes** : EN 16931 (directive UE 2014/55), ISO 19005-3 (PDF/A-3), CII (UN/CEFACT) - **🆕 Format simplifié** : Génération à partir de SIRET + auto-enrichissement (API Chorus Pro + Recherche Entreprises) ### ✅ Validation et conformité - **Validation XML** : Schematron (45 à 210+ règles selon profil) - **Validation PDF** : PDF/A-3, métadonnées XMP Factur-X, signatures électroniques - **VeraPDF** : Validation stricte PDF/A (146+ règles ISO 19005-3) - **Traitement asynchrone** : Support Celery pour validations lourdes (VeraPDF) ### 📡 Intégration AFNOR PDP/PA (XP Z12-013) - **Soumission de flux** : Envoi de factures vers Plateformes de Dématérialisation Partenaires - **Recherche de flux** : Consultation des factures soumises - **Téléchargement** : Récupération des PDF/A-3 avec XML - **Directory Service** : Recherche d\'entreprises (SIREN/SIRET) - **Multi-client** : Support de plusieurs configs PDP par utilisateur (stored credentials ou zero-storage) ### ✍️ Signature électronique PDF - **Standards** : PAdES-B-B, PAdES-B-T (horodatage RFC 3161), PAdES-B-LT (archivage long terme) - **Niveaux eIDAS** : SES (auto-signé), AdES (CA commerciale), QES (PSCO) - **Validation** : Vérification intégrité cryptographique et certificats - **Génération de certificats** : Certificats X.509 auto-signés pour tests ### 🔄 Traitement asynchrone - **Celery** : Génération, validation et signature asynchrones - **Polling** : Suivi d\'état via `/taches/{id_tache}/statut` - **Pas de timeout** : Idéal pour gros fichiers ou validations lourdes ## 🔒 Authentification Toutes les requêtes nécessitent un **token JWT** dans le header Authorization : ``` Authorization: Bearer YOUR_JWT_TOKEN ``` ### Comment obtenir un token JWT ? #### 🔑 Méthode 1 : API `/api/token/` (Recommandée) **URL :** `https://www.factpulse.fr/api/token/` Cette méthode est **recommandée** pour l\'intégration dans vos applications et workflows CI/CD. **Prérequis :** Avoir défini un mot de passe sur votre compte **Pour les utilisateurs inscrits via email/password :** - Vous avez déjà un mot de passe, utilisez-le directement **Pour les utilisateurs inscrits via OAuth (Google/GitHub) :** - Vous devez d\'abord définir un mot de passe sur : https://www.factpulse.fr/accounts/password/set/ - Une fois le mot de passe créé, vous pourrez utiliser l\'API **Exemple de requête :** ```bash curl -X POST https://www.factpulse.fr/api/token/ \\ -H \"Content-Type: application/json\" \\ -d \'{ \"username\": \"votre_email@example.com\", \"password\": \"votre_mot_de_passe\" }\' ``` **Paramètre optionnel `client_uid` :** Pour sélectionner les credentials d\'un client spécifique (PA/PDP, Chorus Pro, certificats de signature), ajoutez `client_uid` : ```bash curl -X POST https://www.factpulse.fr/api/token/ \\ -H \"Content-Type: application/json\" \\ -d \'{ \"username\": \"votre_email@example.com\", \"password\": \"votre_mot_de_passe\", \"client_uid\": \"550e8400-e29b-41d4-a716-446655440000\" }\' ``` Le `client_uid` sera inclus dans le JWT et permettra à l\'API d\'utiliser automatiquement : - Les credentials AFNOR/PDP configurés pour ce client - Les credentials Chorus Pro configurés pour ce client - Les certificats de signature électronique configurés pour ce client **Réponse :** ```json { \"access\": \"eyJ0eXAiOiJKV1QiLCJhbGc...\", // Token d\'accès (validité: 30 min) \"refresh\": \"eyJ0eXAiOiJKV1QiLCJhbGc...\" // Token de rafraîchissement (validité: 7 jours) } ``` **Avantages :** - ✅ Automatisation complète (CI/CD, scripts) - ✅ Gestion programmatique des tokens - ✅ Support du refresh token pour renouveler automatiquement l\'accès - ✅ Intégration facile dans n\'importe quel langage/outil #### 🖥️ Méthode 2 : Génération via Dashboard (Alternative) **URL :** https://www.factpulse.fr/dashboard/ Cette méthode convient pour des tests rapides ou une utilisation occasionnelle via l\'interface graphique. **Fonctionnement :** - Connectez-vous au dashboard - Utilisez les boutons \"Generate Test Token\" ou \"Generate Production Token\" - Fonctionne pour **tous** les utilisateurs (OAuth et email/password), sans nécessiter de mot de passe **Types de tokens :** - **Token Test** : Validité 24h, quota 1000 appels/jour (gratuit) - **Token Production** : Validité 7 jours, quota selon votre forfait **Avantages :** - ✅ Rapide pour tester l\'API - ✅ Aucun mot de passe requis - ✅ Interface visuelle simple **Inconvénients :** - ❌ Nécessite une action manuelle - ❌ Pas de refresh token - ❌ Moins adapté pour l\'automatisation ### 📚 Documentation complète Pour plus d\'informations sur l\'authentification et l\'utilisation de l\'API : https://www.factpulse.fr/documentation-api/
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.TypeDocument = void 0;
|
|
17
|
+
/**
|
|
18
|
+
* Types de documents commerciaux (UNTDID 1001). | Code | Nom | Description | |------|-----|-------------| | 380 | FACTURE | Facture commerciale | | 381 | AVOIR | Avoir | | 384 | FACTURE_RECTIFICATIVE | Facture rectificative | | 386 | ACOMPTE | Facture d\'acompte | | 389 | AUTOFACTURATION | Facture auto-facturée |
|
|
19
|
+
*/
|
|
20
|
+
exports.TypeDocument = {
|
|
21
|
+
/**
|
|
22
|
+
* Facture commerciale
|
|
23
|
+
*/
|
|
24
|
+
FACTURE: '380',
|
|
25
|
+
/**
|
|
26
|
+
* Avoir
|
|
27
|
+
*/
|
|
28
|
+
AVOIR: '381',
|
|
29
|
+
/**
|
|
30
|
+
* Facture rectificative
|
|
31
|
+
*/
|
|
32
|
+
FACTURE_RECTIFICATIVE: '384',
|
|
33
|
+
/**
|
|
34
|
+
* Facture d'acompte
|
|
35
|
+
*/
|
|
36
|
+
ACOMPTE: '386',
|
|
37
|
+
/**
|
|
38
|
+
* Facture auto-facturée
|
|
39
|
+
*/
|
|
40
|
+
AUTOFACTURATION: '389'
|
|
41
|
+
};
|
|
@@ -10,10 +10,72 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
/**
|
|
13
|
-
* Type de document (
|
|
13
|
+
* Type de document selon BR-FR-04 (codes UNTDID 1001). | Code | Nom | Description | |------|-----|-------------| | 380 | FACTURE | Facture commerciale | | 389 | FACTURE_AUTOFACTUREE | Facture auto-facturée | | 393 | FACTURE_AFFACTUREE | Facture affacturée | | 501 | FACTURE_AUTOFACTUREE_AFFACTUREE | Facture auto-facturée affacturée | | 386 | FACTURE_ACOMPTE | Facture d\'acompte | | 500 | FACTURE_ACOMPTE_AUTOFACTUREE | Facture d\'acompte auto-facturée | | 384 | FACTURE_RECTIFICATIVE | Facture rectificative | | 471 | FACTURE_RECTIFICATIVE_AUTOFACTUREE | Facture rectificative auto-facturée | | 472 | FACTURE_RECTIFICATIVE_AFFACTUREE | Facture rectificative affacturée | | 473 | FACTURE_RECTIFICATIVE_AUTOFACTUREE_AFFACTUREE | Facture rectificative auto-facturée affacturée | | 381 | AVOIR | Avoir | | 261 | AVOIR_AUTOFACTURE | Avoir auto-facturé | | 262 | AVOIR_REMISE_GLOBALE | Avoir pour remise globale | | 396 | AVOIR_AFFACTURE | Avoir affacturé | | 502 | AVOIR_AUTOFACTURE_AFFACTURE | Avoir auto-facturé affacturé | | 503 | AVOIR_ACOMPTE | Avoir de facture d\'acompte |
|
|
14
14
|
*/
|
|
15
15
|
export declare const TypeFacture: {
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
/**
|
|
17
|
+
* Facture commerciale
|
|
18
|
+
*/
|
|
19
|
+
readonly FACTURE: "380";
|
|
20
|
+
/**
|
|
21
|
+
* Facture auto-facturée
|
|
22
|
+
*/
|
|
23
|
+
readonly FACTURE_AUTOFACTUREE: "389";
|
|
24
|
+
/**
|
|
25
|
+
* Facture affacturée
|
|
26
|
+
*/
|
|
27
|
+
readonly FACTURE_AFFACTUREE: "393";
|
|
28
|
+
/**
|
|
29
|
+
* Facture auto-facturée affacturée
|
|
30
|
+
*/
|
|
31
|
+
readonly FACTURE_AUTOFACTUREE_AFFACTUREE: "501";
|
|
32
|
+
/**
|
|
33
|
+
* Facture d'acompte
|
|
34
|
+
*/
|
|
35
|
+
readonly FACTURE_ACOMPTE: "386";
|
|
36
|
+
/**
|
|
37
|
+
* Facture d'acompte auto-facturée
|
|
38
|
+
*/
|
|
39
|
+
readonly FACTURE_ACOMPTE_AUTOFACTUREE: "500";
|
|
40
|
+
/**
|
|
41
|
+
* Facture rectificative
|
|
42
|
+
*/
|
|
43
|
+
readonly FACTURE_RECTIFICATIVE: "384";
|
|
44
|
+
/**
|
|
45
|
+
* Facture rectificative auto-facturée
|
|
46
|
+
*/
|
|
47
|
+
readonly FACTURE_RECTIFICATIVE_AUTOFACTUREE: "471";
|
|
48
|
+
/**
|
|
49
|
+
* Facture rectificative affacturée
|
|
50
|
+
*/
|
|
51
|
+
readonly FACTURE_RECTIFICATIVE_AFFACTUREE: "472";
|
|
52
|
+
/**
|
|
53
|
+
* Facture rectificative auto-facturée affacturée
|
|
54
|
+
*/
|
|
55
|
+
readonly FACTURE_RECTIFICATIVE_AUTOFACTUREE_AFFACTUREE: "473";
|
|
56
|
+
/**
|
|
57
|
+
* Avoir
|
|
58
|
+
*/
|
|
59
|
+
readonly AVOIR: "381";
|
|
60
|
+
/**
|
|
61
|
+
* Avoir auto-facturé
|
|
62
|
+
*/
|
|
63
|
+
readonly AVOIR_AUTOFACTURE: "261";
|
|
64
|
+
/**
|
|
65
|
+
* Avoir pour remise globale
|
|
66
|
+
*/
|
|
67
|
+
readonly AVOIR_REMISE_GLOBALE: "262";
|
|
68
|
+
/**
|
|
69
|
+
* Avoir affacturé
|
|
70
|
+
*/
|
|
71
|
+
readonly AVOIR_AFFACTURE: "396";
|
|
72
|
+
/**
|
|
73
|
+
* Avoir auto-facturé affacturé
|
|
74
|
+
*/
|
|
75
|
+
readonly AVOIR_AUTOFACTURE_AFFACTURE: "502";
|
|
76
|
+
/**
|
|
77
|
+
* Avoir de facture d'acompte
|
|
78
|
+
*/
|
|
79
|
+
readonly AVOIR_ACOMPTE: "503";
|
|
18
80
|
};
|
|
19
81
|
export type TypeFacture = typeof TypeFacture[keyof typeof TypeFacture];
|
|
@@ -15,9 +15,71 @@
|
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
16
|
exports.TypeFacture = void 0;
|
|
17
17
|
/**
|
|
18
|
-
* Type de document (
|
|
18
|
+
* Type de document selon BR-FR-04 (codes UNTDID 1001). | Code | Nom | Description | |------|-----|-------------| | 380 | FACTURE | Facture commerciale | | 389 | FACTURE_AUTOFACTUREE | Facture auto-facturée | | 393 | FACTURE_AFFACTUREE | Facture affacturée | | 501 | FACTURE_AUTOFACTUREE_AFFACTUREE | Facture auto-facturée affacturée | | 386 | FACTURE_ACOMPTE | Facture d\'acompte | | 500 | FACTURE_ACOMPTE_AUTOFACTUREE | Facture d\'acompte auto-facturée | | 384 | FACTURE_RECTIFICATIVE | Facture rectificative | | 471 | FACTURE_RECTIFICATIVE_AUTOFACTUREE | Facture rectificative auto-facturée | | 472 | FACTURE_RECTIFICATIVE_AFFACTUREE | Facture rectificative affacturée | | 473 | FACTURE_RECTIFICATIVE_AUTOFACTUREE_AFFACTUREE | Facture rectificative auto-facturée affacturée | | 381 | AVOIR | Avoir | | 261 | AVOIR_AUTOFACTURE | Avoir auto-facturé | | 262 | AVOIR_REMISE_GLOBALE | Avoir pour remise globale | | 396 | AVOIR_AFFACTURE | Avoir affacturé | | 502 | AVOIR_AUTOFACTURE_AFFACTURE | Avoir auto-facturé affacturé | | 503 | AVOIR_ACOMPTE | Avoir de facture d\'acompte |
|
|
19
19
|
*/
|
|
20
20
|
exports.TypeFacture = {
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
/**
|
|
22
|
+
* Facture commerciale
|
|
23
|
+
*/
|
|
24
|
+
FACTURE: '380',
|
|
25
|
+
/**
|
|
26
|
+
* Facture auto-facturée
|
|
27
|
+
*/
|
|
28
|
+
FACTURE_AUTOFACTUREE: '389',
|
|
29
|
+
/**
|
|
30
|
+
* Facture affacturée
|
|
31
|
+
*/
|
|
32
|
+
FACTURE_AFFACTUREE: '393',
|
|
33
|
+
/**
|
|
34
|
+
* Facture auto-facturée affacturée
|
|
35
|
+
*/
|
|
36
|
+
FACTURE_AUTOFACTUREE_AFFACTUREE: '501',
|
|
37
|
+
/**
|
|
38
|
+
* Facture d'acompte
|
|
39
|
+
*/
|
|
40
|
+
FACTURE_ACOMPTE: '386',
|
|
41
|
+
/**
|
|
42
|
+
* Facture d'acompte auto-facturée
|
|
43
|
+
*/
|
|
44
|
+
FACTURE_ACOMPTE_AUTOFACTUREE: '500',
|
|
45
|
+
/**
|
|
46
|
+
* Facture rectificative
|
|
47
|
+
*/
|
|
48
|
+
FACTURE_RECTIFICATIVE: '384',
|
|
49
|
+
/**
|
|
50
|
+
* Facture rectificative auto-facturée
|
|
51
|
+
*/
|
|
52
|
+
FACTURE_RECTIFICATIVE_AUTOFACTUREE: '471',
|
|
53
|
+
/**
|
|
54
|
+
* Facture rectificative affacturée
|
|
55
|
+
*/
|
|
56
|
+
FACTURE_RECTIFICATIVE_AFFACTUREE: '472',
|
|
57
|
+
/**
|
|
58
|
+
* Facture rectificative auto-facturée affacturée
|
|
59
|
+
*/
|
|
60
|
+
FACTURE_RECTIFICATIVE_AUTOFACTUREE_AFFACTUREE: '473',
|
|
61
|
+
/**
|
|
62
|
+
* Avoir
|
|
63
|
+
*/
|
|
64
|
+
AVOIR: '381',
|
|
65
|
+
/**
|
|
66
|
+
* Avoir auto-facturé
|
|
67
|
+
*/
|
|
68
|
+
AVOIR_AUTOFACTURE: '261',
|
|
69
|
+
/**
|
|
70
|
+
* Avoir pour remise globale
|
|
71
|
+
*/
|
|
72
|
+
AVOIR_REMISE_GLOBALE: '262',
|
|
73
|
+
/**
|
|
74
|
+
* Avoir affacturé
|
|
75
|
+
*/
|
|
76
|
+
AVOIR_AFFACTURE: '396',
|
|
77
|
+
/**
|
|
78
|
+
* Avoir auto-facturé affacturé
|
|
79
|
+
*/
|
|
80
|
+
AVOIR_AUTOFACTURE_AFFACTURE: '502',
|
|
81
|
+
/**
|
|
82
|
+
* Avoir de facture d'acompte
|
|
83
|
+
*/
|
|
84
|
+
AVOIR_ACOMPTE: '503'
|
|
23
85
|
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* API REST FactPulse
|
|
3
|
+
* API REST pour la facturation électronique en France : Factur-X, AFNOR PDP/PA, signatures électroniques. ## 🎯 Fonctionnalités principales ### 📄 Génération de factures Factur-X - **Formats** : XML seul ou PDF/A-3 avec XML embarqué - **Profils** : MINIMUM, BASIC, EN16931, EXTENDED - **Normes** : EN 16931 (directive UE 2014/55), ISO 19005-3 (PDF/A-3), CII (UN/CEFACT) - **🆕 Format simplifié** : Génération à partir de SIRET + auto-enrichissement (API Chorus Pro + Recherche Entreprises) ### ✅ Validation et conformité - **Validation XML** : Schematron (45 à 210+ règles selon profil) - **Validation PDF** : PDF/A-3, métadonnées XMP Factur-X, signatures électroniques - **VeraPDF** : Validation stricte PDF/A (146+ règles ISO 19005-3) - **Traitement asynchrone** : Support Celery pour validations lourdes (VeraPDF) ### 📡 Intégration AFNOR PDP/PA (XP Z12-013) - **Soumission de flux** : Envoi de factures vers Plateformes de Dématérialisation Partenaires - **Recherche de flux** : Consultation des factures soumises - **Téléchargement** : Récupération des PDF/A-3 avec XML - **Directory Service** : Recherche d\'entreprises (SIREN/SIRET) - **Multi-client** : Support de plusieurs configs PDP par utilisateur (stored credentials ou zero-storage) ### ✍️ Signature électronique PDF - **Standards** : PAdES-B-B, PAdES-B-T (horodatage RFC 3161), PAdES-B-LT (archivage long terme) - **Niveaux eIDAS** : SES (auto-signé), AdES (CA commerciale), QES (PSCO) - **Validation** : Vérification intégrité cryptographique et certificats - **Génération de certificats** : Certificats X.509 auto-signés pour tests ### 🔄 Traitement asynchrone - **Celery** : Génération, validation et signature asynchrones - **Polling** : Suivi d\'état via `/taches/{id_tache}/statut` - **Pas de timeout** : Idéal pour gros fichiers ou validations lourdes ## 🔒 Authentification Toutes les requêtes nécessitent un **token JWT** dans le header Authorization : ``` Authorization: Bearer YOUR_JWT_TOKEN ``` ### Comment obtenir un token JWT ? #### 🔑 Méthode 1 : API `/api/token/` (Recommandée) **URL :** `https://www.factpulse.fr/api/token/` Cette méthode est **recommandée** pour l\'intégration dans vos applications et workflows CI/CD. **Prérequis :** Avoir défini un mot de passe sur votre compte **Pour les utilisateurs inscrits via email/password :** - Vous avez déjà un mot de passe, utilisez-le directement **Pour les utilisateurs inscrits via OAuth (Google/GitHub) :** - Vous devez d\'abord définir un mot de passe sur : https://www.factpulse.fr/accounts/password/set/ - Une fois le mot de passe créé, vous pourrez utiliser l\'API **Exemple de requête :** ```bash curl -X POST https://www.factpulse.fr/api/token/ \\ -H \"Content-Type: application/json\" \\ -d \'{ \"username\": \"votre_email@example.com\", \"password\": \"votre_mot_de_passe\" }\' ``` **Paramètre optionnel `client_uid` :** Pour sélectionner les credentials d\'un client spécifique (PA/PDP, Chorus Pro, certificats de signature), ajoutez `client_uid` : ```bash curl -X POST https://www.factpulse.fr/api/token/ \\ -H \"Content-Type: application/json\" \\ -d \'{ \"username\": \"votre_email@example.com\", \"password\": \"votre_mot_de_passe\", \"client_uid\": \"550e8400-e29b-41d4-a716-446655440000\" }\' ``` Le `client_uid` sera inclus dans le JWT et permettra à l\'API d\'utiliser automatiquement : - Les credentials AFNOR/PDP configurés pour ce client - Les credentials Chorus Pro configurés pour ce client - Les certificats de signature électronique configurés pour ce client **Réponse :** ```json { \"access\": \"eyJ0eXAiOiJKV1QiLCJhbGc...\", // Token d\'accès (validité: 30 min) \"refresh\": \"eyJ0eXAiOiJKV1QiLCJhbGc...\" // Token de rafraîchissement (validité: 7 jours) } ``` **Avantages :** - ✅ Automatisation complète (CI/CD, scripts) - ✅ Gestion programmatique des tokens - ✅ Support du refresh token pour renouveler automatiquement l\'accès - ✅ Intégration facile dans n\'importe quel langage/outil #### 🖥️ Méthode 2 : Génération via Dashboard (Alternative) **URL :** https://www.factpulse.fr/dashboard/ Cette méthode convient pour des tests rapides ou une utilisation occasionnelle via l\'interface graphique. **Fonctionnement :** - Connectez-vous au dashboard - Utilisez les boutons \"Generate Test Token\" ou \"Generate Production Token\" - Fonctionne pour **tous** les utilisateurs (OAuth et email/password), sans nécessiter de mot de passe **Types de tokens :** - **Token Test** : Validité 24h, quota 1000 appels/jour (gratuit) - **Token Production** : Validité 7 jours, quota selon votre forfait **Avantages :** - ✅ Rapide pour tester l\'API - ✅ Aucun mot de passe requis - ✅ Interface visuelle simple **Inconvénients :** - ❌ Nécessite une action manuelle - ❌ Pas de refresh token - ❌ Moins adapté pour l\'automatisation ### 📚 Documentation complète Pour plus d\'informations sur l\'authentification et l\'utilisation de l\'API : https://www.factpulse.fr/documentation-api/
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* Types de flux de facturation
|
|
14
|
+
*/
|
|
15
|
+
export declare const TypeFlux: {
|
|
16
|
+
readonly CustomerInvoice: "CustomerInvoice";
|
|
17
|
+
readonly SupplierInvoice: "SupplierInvoice";
|
|
18
|
+
readonly CustomerInvoiceLc: "CustomerInvoiceLC";
|
|
19
|
+
readonly SupplierInvoiceLc: "SupplierInvoiceLC";
|
|
20
|
+
readonly EReporting: "eReporting";
|
|
21
|
+
};
|
|
22
|
+
export type TypeFlux = typeof TypeFlux[keyof typeof TypeFlux];
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* API REST FactPulse
|
|
6
|
+
* API REST pour la facturation électronique en France : Factur-X, AFNOR PDP/PA, signatures électroniques. ## 🎯 Fonctionnalités principales ### 📄 Génération de factures Factur-X - **Formats** : XML seul ou PDF/A-3 avec XML embarqué - **Profils** : MINIMUM, BASIC, EN16931, EXTENDED - **Normes** : EN 16931 (directive UE 2014/55), ISO 19005-3 (PDF/A-3), CII (UN/CEFACT) - **🆕 Format simplifié** : Génération à partir de SIRET + auto-enrichissement (API Chorus Pro + Recherche Entreprises) ### ✅ Validation et conformité - **Validation XML** : Schematron (45 à 210+ règles selon profil) - **Validation PDF** : PDF/A-3, métadonnées XMP Factur-X, signatures électroniques - **VeraPDF** : Validation stricte PDF/A (146+ règles ISO 19005-3) - **Traitement asynchrone** : Support Celery pour validations lourdes (VeraPDF) ### 📡 Intégration AFNOR PDP/PA (XP Z12-013) - **Soumission de flux** : Envoi de factures vers Plateformes de Dématérialisation Partenaires - **Recherche de flux** : Consultation des factures soumises - **Téléchargement** : Récupération des PDF/A-3 avec XML - **Directory Service** : Recherche d\'entreprises (SIREN/SIRET) - **Multi-client** : Support de plusieurs configs PDP par utilisateur (stored credentials ou zero-storage) ### ✍️ Signature électronique PDF - **Standards** : PAdES-B-B, PAdES-B-T (horodatage RFC 3161), PAdES-B-LT (archivage long terme) - **Niveaux eIDAS** : SES (auto-signé), AdES (CA commerciale), QES (PSCO) - **Validation** : Vérification intégrité cryptographique et certificats - **Génération de certificats** : Certificats X.509 auto-signés pour tests ### 🔄 Traitement asynchrone - **Celery** : Génération, validation et signature asynchrones - **Polling** : Suivi d\'état via `/taches/{id_tache}/statut` - **Pas de timeout** : Idéal pour gros fichiers ou validations lourdes ## 🔒 Authentification Toutes les requêtes nécessitent un **token JWT** dans le header Authorization : ``` Authorization: Bearer YOUR_JWT_TOKEN ``` ### Comment obtenir un token JWT ? #### 🔑 Méthode 1 : API `/api/token/` (Recommandée) **URL :** `https://www.factpulse.fr/api/token/` Cette méthode est **recommandée** pour l\'intégration dans vos applications et workflows CI/CD. **Prérequis :** Avoir défini un mot de passe sur votre compte **Pour les utilisateurs inscrits via email/password :** - Vous avez déjà un mot de passe, utilisez-le directement **Pour les utilisateurs inscrits via OAuth (Google/GitHub) :** - Vous devez d\'abord définir un mot de passe sur : https://www.factpulse.fr/accounts/password/set/ - Une fois le mot de passe créé, vous pourrez utiliser l\'API **Exemple de requête :** ```bash curl -X POST https://www.factpulse.fr/api/token/ \\ -H \"Content-Type: application/json\" \\ -d \'{ \"username\": \"votre_email@example.com\", \"password\": \"votre_mot_de_passe\" }\' ``` **Paramètre optionnel `client_uid` :** Pour sélectionner les credentials d\'un client spécifique (PA/PDP, Chorus Pro, certificats de signature), ajoutez `client_uid` : ```bash curl -X POST https://www.factpulse.fr/api/token/ \\ -H \"Content-Type: application/json\" \\ -d \'{ \"username\": \"votre_email@example.com\", \"password\": \"votre_mot_de_passe\", \"client_uid\": \"550e8400-e29b-41d4-a716-446655440000\" }\' ``` Le `client_uid` sera inclus dans le JWT et permettra à l\'API d\'utiliser automatiquement : - Les credentials AFNOR/PDP configurés pour ce client - Les credentials Chorus Pro configurés pour ce client - Les certificats de signature électronique configurés pour ce client **Réponse :** ```json { \"access\": \"eyJ0eXAiOiJKV1QiLCJhbGc...\", // Token d\'accès (validité: 30 min) \"refresh\": \"eyJ0eXAiOiJKV1QiLCJhbGc...\" // Token de rafraîchissement (validité: 7 jours) } ``` **Avantages :** - ✅ Automatisation complète (CI/CD, scripts) - ✅ Gestion programmatique des tokens - ✅ Support du refresh token pour renouveler automatiquement l\'accès - ✅ Intégration facile dans n\'importe quel langage/outil #### 🖥️ Méthode 2 : Génération via Dashboard (Alternative) **URL :** https://www.factpulse.fr/dashboard/ Cette méthode convient pour des tests rapides ou une utilisation occasionnelle via l\'interface graphique. **Fonctionnement :** - Connectez-vous au dashboard - Utilisez les boutons \"Generate Test Token\" ou \"Generate Production Token\" - Fonctionne pour **tous** les utilisateurs (OAuth et email/password), sans nécessiter de mot de passe **Types de tokens :** - **Token Test** : Validité 24h, quota 1000 appels/jour (gratuit) - **Token Production** : Validité 7 jours, quota selon votre forfait **Avantages :** - ✅ Rapide pour tester l\'API - ✅ Aucun mot de passe requis - ✅ Interface visuelle simple **Inconvénients :** - ❌ Nécessite une action manuelle - ❌ Pas de refresh token - ❌ Moins adapté pour l\'automatisation ### 📚 Documentation complète Pour plus d\'informations sur l\'authentification et l\'utilisation de l\'API : https://www.factpulse.fr/documentation-api/
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.TypeFlux = void 0;
|
|
17
|
+
/**
|
|
18
|
+
* Types de flux de facturation
|
|
19
|
+
*/
|
|
20
|
+
exports.TypeFlux = {
|
|
21
|
+
CustomerInvoice: 'CustomerInvoice',
|
|
22
|
+
SupplierInvoice: 'SupplierInvoice',
|
|
23
|
+
CustomerInvoiceLc: 'CustomerInvoiceLC',
|
|
24
|
+
SupplierInvoiceLc: 'SupplierInvoiceLC',
|
|
25
|
+
EReporting: 'eReporting'
|
|
26
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* API REST FactPulse
|
|
3
|
+
* API REST pour la facturation électronique en France : Factur-X, AFNOR PDP/PA, signatures électroniques. ## 🎯 Fonctionnalités principales ### 📄 Génération de factures Factur-X - **Formats** : XML seul ou PDF/A-3 avec XML embarqué - **Profils** : MINIMUM, BASIC, EN16931, EXTENDED - **Normes** : EN 16931 (directive UE 2014/55), ISO 19005-3 (PDF/A-3), CII (UN/CEFACT) - **🆕 Format simplifié** : Génération à partir de SIRET + auto-enrichissement (API Chorus Pro + Recherche Entreprises) ### ✅ Validation et conformité - **Validation XML** : Schematron (45 à 210+ règles selon profil) - **Validation PDF** : PDF/A-3, métadonnées XMP Factur-X, signatures électroniques - **VeraPDF** : Validation stricte PDF/A (146+ règles ISO 19005-3) - **Traitement asynchrone** : Support Celery pour validations lourdes (VeraPDF) ### 📡 Intégration AFNOR PDP/PA (XP Z12-013) - **Soumission de flux** : Envoi de factures vers Plateformes de Dématérialisation Partenaires - **Recherche de flux** : Consultation des factures soumises - **Téléchargement** : Récupération des PDF/A-3 avec XML - **Directory Service** : Recherche d\'entreprises (SIREN/SIRET) - **Multi-client** : Support de plusieurs configs PDP par utilisateur (stored credentials ou zero-storage) ### ✍️ Signature électronique PDF - **Standards** : PAdES-B-B, PAdES-B-T (horodatage RFC 3161), PAdES-B-LT (archivage long terme) - **Niveaux eIDAS** : SES (auto-signé), AdES (CA commerciale), QES (PSCO) - **Validation** : Vérification intégrité cryptographique et certificats - **Génération de certificats** : Certificats X.509 auto-signés pour tests ### 🔄 Traitement asynchrone - **Celery** : Génération, validation et signature asynchrones - **Polling** : Suivi d\'état via `/taches/{id_tache}/statut` - **Pas de timeout** : Idéal pour gros fichiers ou validations lourdes ## 🔒 Authentification Toutes les requêtes nécessitent un **token JWT** dans le header Authorization : ``` Authorization: Bearer YOUR_JWT_TOKEN ``` ### Comment obtenir un token JWT ? #### 🔑 Méthode 1 : API `/api/token/` (Recommandée) **URL :** `https://www.factpulse.fr/api/token/` Cette méthode est **recommandée** pour l\'intégration dans vos applications et workflows CI/CD. **Prérequis :** Avoir défini un mot de passe sur votre compte **Pour les utilisateurs inscrits via email/password :** - Vous avez déjà un mot de passe, utilisez-le directement **Pour les utilisateurs inscrits via OAuth (Google/GitHub) :** - Vous devez d\'abord définir un mot de passe sur : https://www.factpulse.fr/accounts/password/set/ - Une fois le mot de passe créé, vous pourrez utiliser l\'API **Exemple de requête :** ```bash curl -X POST https://www.factpulse.fr/api/token/ \\ -H \"Content-Type: application/json\" \\ -d \'{ \"username\": \"votre_email@example.com\", \"password\": \"votre_mot_de_passe\" }\' ``` **Paramètre optionnel `client_uid` :** Pour sélectionner les credentials d\'un client spécifique (PA/PDP, Chorus Pro, certificats de signature), ajoutez `client_uid` : ```bash curl -X POST https://www.factpulse.fr/api/token/ \\ -H \"Content-Type: application/json\" \\ -d \'{ \"username\": \"votre_email@example.com\", \"password\": \"votre_mot_de_passe\", \"client_uid\": \"550e8400-e29b-41d4-a716-446655440000\" }\' ``` Le `client_uid` sera inclus dans le JWT et permettra à l\'API d\'utiliser automatiquement : - Les credentials AFNOR/PDP configurés pour ce client - Les credentials Chorus Pro configurés pour ce client - Les certificats de signature électronique configurés pour ce client **Réponse :** ```json { \"access\": \"eyJ0eXAiOiJKV1QiLCJhbGc...\", // Token d\'accès (validité: 30 min) \"refresh\": \"eyJ0eXAiOiJKV1QiLCJhbGc...\" // Token de rafraîchissement (validité: 7 jours) } ``` **Avantages :** - ✅ Automatisation complète (CI/CD, scripts) - ✅ Gestion programmatique des tokens - ✅ Support du refresh token pour renouveler automatiquement l\'accès - ✅ Intégration facile dans n\'importe quel langage/outil #### 🖥️ Méthode 2 : Génération via Dashboard (Alternative) **URL :** https://www.factpulse.fr/dashboard/ Cette méthode convient pour des tests rapides ou une utilisation occasionnelle via l\'interface graphique. **Fonctionnement :** - Connectez-vous au dashboard - Utilisez les boutons \"Generate Test Token\" ou \"Generate Production Token\" - Fonctionne pour **tous** les utilisateurs (OAuth et email/password), sans nécessiter de mot de passe **Types de tokens :** - **Token Test** : Validité 24h, quota 1000 appels/jour (gratuit) - **Token Production** : Validité 7 jours, quota selon votre forfait **Avantages :** - ✅ Rapide pour tester l\'API - ✅ Aucun mot de passe requis - ✅ Interface visuelle simple **Inconvénients :** - ❌ Nécessite une action manuelle - ❌ Pas de refresh token - ❌ Moins adapté pour l\'automatisation ### 📚 Documentation complète Pour plus d\'informations sur l\'authentification et l\'utilisation de l\'API : https://www.factpulse.fr/documentation-api/
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import type { ErrorLevel } from './error-level';
|
|
13
|
+
import type { ErrorSource } from './error-source';
|
|
14
|
+
/**
|
|
15
|
+
* Détail d\'une erreur de validation (aligné sur AFNOR AcknowledgementDetail). Format unifié pour toutes les erreurs de validation Factur-X, compatible avec la norme AFNOR XP Z12-013.
|
|
16
|
+
*/
|
|
17
|
+
export interface ValidationErrorDetail {
|
|
18
|
+
/**
|
|
19
|
+
* Niveau de gravité : \'Error\' ou \'Warning\'
|
|
20
|
+
*/
|
|
21
|
+
'level'?: ErrorLevel;
|
|
22
|
+
/**
|
|
23
|
+
* Identifiant de l\'élément concerné (XPath, champ, règle BR-FR, etc.)
|
|
24
|
+
*/
|
|
25
|
+
'item': string;
|
|
26
|
+
/**
|
|
27
|
+
* Description de l\'erreur
|
|
28
|
+
*/
|
|
29
|
+
'reason': string;
|
|
30
|
+
'source'?: ErrorSource | null;
|
|
31
|
+
'code'?: string | null;
|
|
32
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* API REST FactPulse
|
|
6
|
+
* API REST pour la facturation électronique en France : Factur-X, AFNOR PDP/PA, signatures électroniques. ## 🎯 Fonctionnalités principales ### 📄 Génération de factures Factur-X - **Formats** : XML seul ou PDF/A-3 avec XML embarqué - **Profils** : MINIMUM, BASIC, EN16931, EXTENDED - **Normes** : EN 16931 (directive UE 2014/55), ISO 19005-3 (PDF/A-3), CII (UN/CEFACT) - **🆕 Format simplifié** : Génération à partir de SIRET + auto-enrichissement (API Chorus Pro + Recherche Entreprises) ### ✅ Validation et conformité - **Validation XML** : Schematron (45 à 210+ règles selon profil) - **Validation PDF** : PDF/A-3, métadonnées XMP Factur-X, signatures électroniques - **VeraPDF** : Validation stricte PDF/A (146+ règles ISO 19005-3) - **Traitement asynchrone** : Support Celery pour validations lourdes (VeraPDF) ### 📡 Intégration AFNOR PDP/PA (XP Z12-013) - **Soumission de flux** : Envoi de factures vers Plateformes de Dématérialisation Partenaires - **Recherche de flux** : Consultation des factures soumises - **Téléchargement** : Récupération des PDF/A-3 avec XML - **Directory Service** : Recherche d\'entreprises (SIREN/SIRET) - **Multi-client** : Support de plusieurs configs PDP par utilisateur (stored credentials ou zero-storage) ### ✍️ Signature électronique PDF - **Standards** : PAdES-B-B, PAdES-B-T (horodatage RFC 3161), PAdES-B-LT (archivage long terme) - **Niveaux eIDAS** : SES (auto-signé), AdES (CA commerciale), QES (PSCO) - **Validation** : Vérification intégrité cryptographique et certificats - **Génération de certificats** : Certificats X.509 auto-signés pour tests ### 🔄 Traitement asynchrone - **Celery** : Génération, validation et signature asynchrones - **Polling** : Suivi d\'état via `/taches/{id_tache}/statut` - **Pas de timeout** : Idéal pour gros fichiers ou validations lourdes ## 🔒 Authentification Toutes les requêtes nécessitent un **token JWT** dans le header Authorization : ``` Authorization: Bearer YOUR_JWT_TOKEN ``` ### Comment obtenir un token JWT ? #### 🔑 Méthode 1 : API `/api/token/` (Recommandée) **URL :** `https://www.factpulse.fr/api/token/` Cette méthode est **recommandée** pour l\'intégration dans vos applications et workflows CI/CD. **Prérequis :** Avoir défini un mot de passe sur votre compte **Pour les utilisateurs inscrits via email/password :** - Vous avez déjà un mot de passe, utilisez-le directement **Pour les utilisateurs inscrits via OAuth (Google/GitHub) :** - Vous devez d\'abord définir un mot de passe sur : https://www.factpulse.fr/accounts/password/set/ - Une fois le mot de passe créé, vous pourrez utiliser l\'API **Exemple de requête :** ```bash curl -X POST https://www.factpulse.fr/api/token/ \\ -H \"Content-Type: application/json\" \\ -d \'{ \"username\": \"votre_email@example.com\", \"password\": \"votre_mot_de_passe\" }\' ``` **Paramètre optionnel `client_uid` :** Pour sélectionner les credentials d\'un client spécifique (PA/PDP, Chorus Pro, certificats de signature), ajoutez `client_uid` : ```bash curl -X POST https://www.factpulse.fr/api/token/ \\ -H \"Content-Type: application/json\" \\ -d \'{ \"username\": \"votre_email@example.com\", \"password\": \"votre_mot_de_passe\", \"client_uid\": \"550e8400-e29b-41d4-a716-446655440000\" }\' ``` Le `client_uid` sera inclus dans le JWT et permettra à l\'API d\'utiliser automatiquement : - Les credentials AFNOR/PDP configurés pour ce client - Les credentials Chorus Pro configurés pour ce client - Les certificats de signature électronique configurés pour ce client **Réponse :** ```json { \"access\": \"eyJ0eXAiOiJKV1QiLCJhbGc...\", // Token d\'accès (validité: 30 min) \"refresh\": \"eyJ0eXAiOiJKV1QiLCJhbGc...\" // Token de rafraîchissement (validité: 7 jours) } ``` **Avantages :** - ✅ Automatisation complète (CI/CD, scripts) - ✅ Gestion programmatique des tokens - ✅ Support du refresh token pour renouveler automatiquement l\'accès - ✅ Intégration facile dans n\'importe quel langage/outil #### 🖥️ Méthode 2 : Génération via Dashboard (Alternative) **URL :** https://www.factpulse.fr/dashboard/ Cette méthode convient pour des tests rapides ou une utilisation occasionnelle via l\'interface graphique. **Fonctionnement :** - Connectez-vous au dashboard - Utilisez les boutons \"Generate Test Token\" ou \"Generate Production Token\" - Fonctionne pour **tous** les utilisateurs (OAuth et email/password), sans nécessiter de mot de passe **Types de tokens :** - **Token Test** : Validité 24h, quota 1000 appels/jour (gratuit) - **Token Production** : Validité 7 jours, quota selon votre forfait **Avantages :** - ✅ Rapide pour tester l\'API - ✅ Aucun mot de passe requis - ✅ Interface visuelle simple **Inconvénients :** - ❌ Nécessite une action manuelle - ❌ Pas de refresh token - ❌ Moins adapté pour l\'automatisation ### 📚 Documentation complète Pour plus d\'informations sur l\'authentification et l\'utilisation de l\'API : https://www.factpulse.fr/documentation-api/
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -0,0 +1,265 @@
|
|
|
1
|
+
/** Credentials Chorus Pro pour le mode Zero-Trust. */
|
|
2
|
+
export interface ChorusProCredentials {
|
|
3
|
+
pisteClientId: string;
|
|
4
|
+
pisteClientSecret: string;
|
|
5
|
+
chorusProLogin: string;
|
|
6
|
+
chorusProPassword: string;
|
|
7
|
+
sandbox?: boolean;
|
|
8
|
+
}
|
|
9
|
+
/** Credentials AFNOR PDP pour le mode Zero-Trust. L'API FactPulse utilise ces credentials pour s'authentifier auprès de la PDP AFNOR. */
|
|
10
|
+
export interface AFNORCredentials {
|
|
11
|
+
flowServiceUrl: string;
|
|
12
|
+
tokenUrl: string;
|
|
13
|
+
clientId: string;
|
|
14
|
+
clientSecret: string;
|
|
15
|
+
directoryServiceUrl?: string;
|
|
16
|
+
}
|
|
17
|
+
export interface FactPulseClientConfig {
|
|
18
|
+
email: string;
|
|
19
|
+
password: string;
|
|
20
|
+
apiUrl?: string;
|
|
21
|
+
clientUid?: string;
|
|
22
|
+
chorusCredentials?: ChorusProCredentials;
|
|
23
|
+
afnorCredentials?: AFNORCredentials;
|
|
24
|
+
pollingInterval?: number;
|
|
25
|
+
pollingTimeout?: number;
|
|
26
|
+
maxRetries?: number;
|
|
27
|
+
}
|
|
28
|
+
type MontantValue = string | number | null | undefined;
|
|
29
|
+
/** Convertit une valeur en string de montant pour l'API. */
|
|
30
|
+
export declare function montant(value: MontantValue): string;
|
|
31
|
+
/** Crée un objet MontantTotal simplifié. */
|
|
32
|
+
export declare function montantTotal(ht: MontantValue, tva: MontantValue, ttc: MontantValue, aPayer: MontantValue, options?: {
|
|
33
|
+
remiseTtc?: MontantValue;
|
|
34
|
+
motifRemise?: string;
|
|
35
|
+
acompte?: MontantValue;
|
|
36
|
+
}): Record<string, unknown>;
|
|
37
|
+
/** Crée une ligne de poste (aligné sur LigneDePoste de models.py).
|
|
38
|
+
* Pour le taux TVA: soit tauxTva (code ex: "TVA20") soit tauxTvaManuel (valeur ex: 20.00) */
|
|
39
|
+
export declare function ligneDePoste(numero: number, denomination: string, quantite: MontantValue, montantUnitaireHt: MontantValue, montantTotalLigneHt: MontantValue, options?: {
|
|
40
|
+
tauxTva?: string;
|
|
41
|
+
tauxTvaManuel?: MontantValue;
|
|
42
|
+
categorieTva?: string;
|
|
43
|
+
unite?: string;
|
|
44
|
+
reference?: string;
|
|
45
|
+
montantRemiseHt?: MontantValue;
|
|
46
|
+
codeRaisonReduction?: string;
|
|
47
|
+
raisonReduction?: string;
|
|
48
|
+
dateDebutPeriode?: string;
|
|
49
|
+
dateFinPeriode?: string;
|
|
50
|
+
}): Record<string, unknown>;
|
|
51
|
+
/** Crée une ligne de TVA (aligné sur LigneDeTVA de models.py).
|
|
52
|
+
* Pour le taux: soit taux (code ex: "TVA20") soit tauxManuel (valeur ex: 20.00) */
|
|
53
|
+
export declare function ligneDeTva(montantBaseHt: MontantValue, montantTva: MontantValue, options?: {
|
|
54
|
+
taux?: string;
|
|
55
|
+
tauxManuel?: MontantValue;
|
|
56
|
+
categorie?: string;
|
|
57
|
+
}): Record<string, unknown>;
|
|
58
|
+
/** Crée une adresse postale pour l'API FactPulse. */
|
|
59
|
+
export declare function adressePostale(ligne1: string, codePostal: string, ville: string, options?: {
|
|
60
|
+
pays?: string;
|
|
61
|
+
ligne2?: string;
|
|
62
|
+
ligne3?: string;
|
|
63
|
+
}): Record<string, unknown>;
|
|
64
|
+
/** Crée une adresse électronique pour l'API FactPulse. schemeId: "0009"=SIREN, "0225"=SIRET */
|
|
65
|
+
export declare function adresseElectronique(identifiant: string, schemeId?: string): Record<string, unknown>;
|
|
66
|
+
/** Crée un fournisseur (émetteur) avec auto-calcul SIREN, TVA intracommunautaire et adresses. */
|
|
67
|
+
export declare function fournisseur(nom: string, siret: string, adresseLigne1: string, codePostal: string, ville: string, options?: {
|
|
68
|
+
idFournisseur?: number;
|
|
69
|
+
siren?: string;
|
|
70
|
+
numeroTvaIntra?: string;
|
|
71
|
+
iban?: string;
|
|
72
|
+
pays?: string;
|
|
73
|
+
adresseLigne2?: string;
|
|
74
|
+
codeService?: number;
|
|
75
|
+
codeCoordonnesBancaires?: number;
|
|
76
|
+
}): Record<string, unknown>;
|
|
77
|
+
/** Crée un destinataire (client) avec auto-calcul SIREN et adresses. */
|
|
78
|
+
export declare function destinataire(nom: string, siret: string, adresseLigne1: string, codePostal: string, ville: string, options?: {
|
|
79
|
+
siren?: string;
|
|
80
|
+
pays?: string;
|
|
81
|
+
adresseLigne2?: string;
|
|
82
|
+
codeServiceExecutant?: string;
|
|
83
|
+
}): Record<string, unknown>;
|
|
84
|
+
/**
|
|
85
|
+
* Crée un bénéficiaire (factor) pour l'affacturage.
|
|
86
|
+
*
|
|
87
|
+
* Le bénéficiaire (BG-10 / PayeeTradeParty) est utilisé lorsque le paiement
|
|
88
|
+
* doit être effectué à un tiers différent du fournisseur, typiquement un
|
|
89
|
+
* factor (société d'affacturage).
|
|
90
|
+
*
|
|
91
|
+
* Pour les factures affacturées, il faut aussi:
|
|
92
|
+
* - Utiliser un type de document affacturé (393, 396, 501, 502, 472, 473)
|
|
93
|
+
* - Ajouter une note ACC avec la mention de subrogation
|
|
94
|
+
* - L'IBAN du bénéficiaire sera utilisé pour le paiement
|
|
95
|
+
*
|
|
96
|
+
* @param nom Raison sociale du factor (BT-59)
|
|
97
|
+
* @param options Options: siret (BT-60), siren (BT-61), iban, bic
|
|
98
|
+
* @returns Dict prêt à être utilisé dans une facture affacturée
|
|
99
|
+
*
|
|
100
|
+
* @example
|
|
101
|
+
* const factor = beneficiaire('FACTOR SAS', {
|
|
102
|
+
* siret: '30000000700033',
|
|
103
|
+
* iban: 'FR76 3000 4000 0500 0012 3456 789',
|
|
104
|
+
* });
|
|
105
|
+
*/
|
|
106
|
+
export declare function beneficiaire(nom: string, options?: {
|
|
107
|
+
siret?: string;
|
|
108
|
+
siren?: string;
|
|
109
|
+
iban?: string;
|
|
110
|
+
bic?: string;
|
|
111
|
+
}): Record<string, unknown>;
|
|
112
|
+
export declare class FactPulseClient {
|
|
113
|
+
private config;
|
|
114
|
+
private httpClient;
|
|
115
|
+
private accessToken;
|
|
116
|
+
private refreshToken;
|
|
117
|
+
private tokenExpiresAt;
|
|
118
|
+
readonly chorusCredentials?: ChorusProCredentials;
|
|
119
|
+
readonly afnorCredentials?: AFNORCredentials;
|
|
120
|
+
constructor(config: FactPulseClientConfig);
|
|
121
|
+
getChorusCredentialsForApi(): Record<string, unknown> | undefined;
|
|
122
|
+
getAfnorCredentialsForApi(): Record<string, unknown> | undefined;
|
|
123
|
+
getChorusProCredentials(): Record<string, unknown> | undefined;
|
|
124
|
+
getAfnorCredentials(): Record<string, unknown> | undefined;
|
|
125
|
+
private obtainToken;
|
|
126
|
+
ensureAuthenticated(forceRefresh?: boolean): Promise<void>;
|
|
127
|
+
resetAuth(): void;
|
|
128
|
+
pollTask(taskId: string, timeout?: number, interval?: number): Promise<Record<string, unknown>>;
|
|
129
|
+
genererFacturx(factureData: Record<string, unknown> | string, pdfPath: string, profil?: string, formatSortie?: string, sync?: boolean, timeout?: number): Promise<Buffer | string>;
|
|
130
|
+
static formatMontant(m: unknown): string;
|
|
131
|
+
/**
|
|
132
|
+
* Recupere les credentials AFNOR (mode stored ou zero-trust).
|
|
133
|
+
* Mode zero-trust: Retourne les afnorCredentials fournis au constructeur.
|
|
134
|
+
* Mode stored: Recupere les credentials via GET /api/v1/afnor/credentials.
|
|
135
|
+
*/
|
|
136
|
+
private getAfnorCredentialsInternal;
|
|
137
|
+
/**
|
|
138
|
+
* Obtient le token OAuth2 AFNOR et l'URL de la PDP.
|
|
139
|
+
* Cette methode:
|
|
140
|
+
* 1. Recupere les credentials AFNOR (mode stored ou zero-trust)
|
|
141
|
+
* 2. Fait l'OAuth AFNOR pour obtenir un token
|
|
142
|
+
* 3. Retourne le token et l'URL de la PDP
|
|
143
|
+
*/
|
|
144
|
+
private getAfnorTokenAndUrl;
|
|
145
|
+
/**
|
|
146
|
+
* Effectue une requete vers l'API AFNOR avec gestion d'auth et d'erreurs.
|
|
147
|
+
* IMPORTANT: Cette methode utilise le token OAuth AFNOR, PAS le JWT FactPulse!
|
|
148
|
+
*/
|
|
149
|
+
private makeAfnorRequest;
|
|
150
|
+
rechercherSiretAfnor(siret: string): Promise<Record<string, unknown>>;
|
|
151
|
+
rechercherSirenAfnor(siren: string): Promise<Record<string, unknown>>;
|
|
152
|
+
listerCodesRoutageAfnor(siren: string): Promise<unknown[]>;
|
|
153
|
+
/**
|
|
154
|
+
* Soumet une facture a une PDP via l'API AFNOR.
|
|
155
|
+
* L'authentification utilise le token OAuth AFNOR (obtenu automatiquement),
|
|
156
|
+
* soit via les credentials stockes (mode stored), soit via les afnorCredentials
|
|
157
|
+
* fournis au constructeur (mode zero-trust).
|
|
158
|
+
*
|
|
159
|
+
* @param pdfBuffer Buffer du PDF Factur-X a soumettre
|
|
160
|
+
* @param flowName Nom du flux (ex: "Facture FAC-2025-001")
|
|
161
|
+
* @param options Options: trackingId, flowSyntax (CII/UBL), flowProfile
|
|
162
|
+
*/
|
|
163
|
+
soumettreFactureAfnor(pdfBuffer: Buffer, flowName: string, options?: {
|
|
164
|
+
trackingId?: string;
|
|
165
|
+
flowSyntax?: string;
|
|
166
|
+
flowProfile?: string;
|
|
167
|
+
}): Promise<Record<string, unknown>>;
|
|
168
|
+
rechercherFluxAfnor(criteria?: {
|
|
169
|
+
trackingId?: string;
|
|
170
|
+
status?: string;
|
|
171
|
+
offset?: number;
|
|
172
|
+
limit?: number;
|
|
173
|
+
}): Promise<Record<string, unknown>>;
|
|
174
|
+
telechargerFluxAfnor(flowId: string): Promise<Buffer>;
|
|
175
|
+
/**
|
|
176
|
+
* Récupère les métadonnées JSON d'un flux entrant (facture fournisseur).
|
|
177
|
+
* Télécharge un flux entrant depuis la PDP AFNOR et extrait les métadonnées
|
|
178
|
+
* de la facture vers un format JSON unifié. Supporte Factur-X, CII et UBL.
|
|
179
|
+
*
|
|
180
|
+
* Note: Cet endpoint utilise l'authentification JWT FactPulse (pas OAuth AFNOR).
|
|
181
|
+
* Le serveur FactPulse se charge d'appeler la PDP avec les credentials stockés.
|
|
182
|
+
*
|
|
183
|
+
* @param flowId Identifiant du flux (UUID)
|
|
184
|
+
* @param includeDocument Si true, inclut le document original encodé en base64
|
|
185
|
+
* @returns Métadonnées de la facture (fournisseur, montants, dates, etc.)
|
|
186
|
+
*
|
|
187
|
+
* @example
|
|
188
|
+
* const facture = await client.obtenirFactureEntranteAfnor("550e8400-...");
|
|
189
|
+
* console.log(`Fournisseur: ${facture.fournisseur.nom}`);
|
|
190
|
+
* console.log(`Montant TTC: ${facture.montant_ttc} ${facture.devise}`);
|
|
191
|
+
*/
|
|
192
|
+
obtenirFactureEntranteAfnor(flowId: string, includeDocument?: boolean): Promise<Record<string, unknown>>;
|
|
193
|
+
healthcheckAfnor(): Promise<Record<string, unknown>>;
|
|
194
|
+
rechercherStructureChorus(criteria: Record<string, unknown>): Promise<unknown[]>;
|
|
195
|
+
consulterStructureChorus(idStructureCpp: number): Promise<Record<string, unknown>>;
|
|
196
|
+
/**
|
|
197
|
+
* Liste les services d'une structure Chorus Pro.
|
|
198
|
+
* @param idStructureCpp ID Chorus Pro de la structure
|
|
199
|
+
* @returns Objet avec listeServices, total, codeRetour, libelle
|
|
200
|
+
*/
|
|
201
|
+
listerServicesStructureChorus(idStructureCpp: number): Promise<Record<string, unknown>>;
|
|
202
|
+
obtenirIdChorusDepuisSiret(siret: string): Promise<number | null>;
|
|
203
|
+
soumettreFactureChorus(factureData: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
204
|
+
consulterFactureChorus(identifiantFactureCpp: number): Promise<Record<string, unknown>>;
|
|
205
|
+
/**
|
|
206
|
+
* Valide un PDF Factur-X.
|
|
207
|
+
* @param pdfBuffer - Contenu du PDF en Buffer
|
|
208
|
+
* @param options - Options de validation
|
|
209
|
+
* @param options.profil - Profil Factur-X (MINIMUM, BASIC, EN16931, EXTENDED). Si non spécifié, auto-détecté.
|
|
210
|
+
* @param options.useVerapdf - Active la validation stricte PDF/A avec VeraPDF (défaut: false)
|
|
211
|
+
*/
|
|
212
|
+
validerPdfFacturx(pdfBuffer: Buffer, options?: {
|
|
213
|
+
profil?: string;
|
|
214
|
+
useVerapdf?: boolean;
|
|
215
|
+
}): Promise<Record<string, unknown>>;
|
|
216
|
+
validerXmlFacturx(xmlContent: string, profil?: string): Promise<Record<string, unknown>>;
|
|
217
|
+
validerSignaturePdf(pdfBuffer: Buffer): Promise<Record<string, unknown>>;
|
|
218
|
+
/**
|
|
219
|
+
* Signe un PDF avec le certificat configuré côté serveur (via client_uid du JWT).
|
|
220
|
+
* Le certificat doit être préalablement configuré dans Django Admin.
|
|
221
|
+
*/
|
|
222
|
+
signerPdf(pdfBuffer: Buffer, options?: {
|
|
223
|
+
raison?: string;
|
|
224
|
+
localisation?: string;
|
|
225
|
+
contact?: string;
|
|
226
|
+
usePadesLt?: boolean;
|
|
227
|
+
useTimestamp?: boolean;
|
|
228
|
+
}): Promise<Buffer>;
|
|
229
|
+
/**
|
|
230
|
+
* Génère un certificat de test (NON PRODUCTION).
|
|
231
|
+
* Le certificat doit ensuite être configuré dans Django Admin.
|
|
232
|
+
*/
|
|
233
|
+
genererCertificatTest(options?: {
|
|
234
|
+
cn?: string;
|
|
235
|
+
organisation?: string;
|
|
236
|
+
email?: string;
|
|
237
|
+
dureeJours?: number;
|
|
238
|
+
tailleClé?: number;
|
|
239
|
+
}): Promise<Record<string, unknown>>;
|
|
240
|
+
/**
|
|
241
|
+
* Workflow complet : génération + validation + signature + soumission AFNOR.
|
|
242
|
+
* Note: La signature utilise le certificat configuré côté serveur (via client_uid du JWT).
|
|
243
|
+
* @param factureData Données de la facture
|
|
244
|
+
* @param pdfPath Chemin vers le PDF source
|
|
245
|
+
* @param options Options du workflow
|
|
246
|
+
* @returns Résultat avec pdfBuffer, validation, signature et afnor
|
|
247
|
+
*/
|
|
248
|
+
genererFacturxComplet(factureData: Record<string, unknown>, pdfPath: string, options?: {
|
|
249
|
+
profil?: string;
|
|
250
|
+
valider?: boolean;
|
|
251
|
+
signer?: boolean;
|
|
252
|
+
soumettreAfnor?: boolean;
|
|
253
|
+
afnorFlowName?: string;
|
|
254
|
+
afnorTrackingId?: string;
|
|
255
|
+
timeout?: number;
|
|
256
|
+
}): Promise<{
|
|
257
|
+
pdfBuffer: Buffer;
|
|
258
|
+
validation?: Record<string, unknown>;
|
|
259
|
+
signature?: {
|
|
260
|
+
signe: boolean;
|
|
261
|
+
};
|
|
262
|
+
afnor?: Record<string, unknown>;
|
|
263
|
+
}>;
|
|
264
|
+
}
|
|
265
|
+
export {};
|