@factpulse/sdk 2.0.11 → 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
package/README.md
CHANGED
|
@@ -2,16 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
Client TypeScript/JavaScript officiel pour l'API FactPulse - Facturation électronique française.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Fonctionnalités
|
|
6
6
|
|
|
7
7
|
- **Factur-X** : Génération et validation de factures électroniques (profils MINIMUM, BASIC, EN16931, EXTENDED)
|
|
8
8
|
- **Chorus Pro** : Intégration avec la plateforme de facturation publique française
|
|
9
9
|
- **AFNOR PDP/PA** : Soumission de flux conformes à la norme XP Z12-013
|
|
10
10
|
- **Signature électronique** : Signature PDF (PAdES-B-B, PAdES-B-T, PAdES-B-LT)
|
|
11
11
|
- **Client simplifié** : Authentification JWT et polling intégrés via `helpers`
|
|
12
|
-
- **TypeScript** : Support complet avec types générés automatiquement
|
|
13
12
|
|
|
14
|
-
##
|
|
13
|
+
## Installation
|
|
15
14
|
|
|
16
15
|
```bash
|
|
17
16
|
npm install @factpulse/sdk
|
|
@@ -19,174 +18,224 @@ npm install @factpulse/sdk
|
|
|
19
18
|
yarn add @factpulse/sdk
|
|
20
19
|
```
|
|
21
20
|
|
|
22
|
-
##
|
|
23
|
-
|
|
24
|
-
### Méthode recommandée : Client simplifié avec helpers
|
|
21
|
+
## Démarrage rapide
|
|
25
22
|
|
|
26
23
|
Le module `helpers` offre une API simplifiée avec authentification et polling automatiques :
|
|
27
24
|
|
|
28
25
|
```typescript
|
|
29
|
-
import {
|
|
26
|
+
import {
|
|
27
|
+
FactPulseClient,
|
|
28
|
+
montant,
|
|
29
|
+
montantTotal,
|
|
30
|
+
ligneDePoste,
|
|
31
|
+
ligneDeTva,
|
|
32
|
+
fournisseur,
|
|
33
|
+
destinataire,
|
|
34
|
+
} from '@factpulse/sdk/helpers';
|
|
30
35
|
import * as fs from 'fs';
|
|
31
36
|
|
|
32
|
-
// Créer le client
|
|
37
|
+
// Créer le client
|
|
33
38
|
const client = new FactPulseClient({
|
|
34
39
|
email: 'votre_email@example.com',
|
|
35
40
|
password: 'votre_mot_de_passe'
|
|
36
41
|
});
|
|
37
42
|
|
|
38
|
-
//
|
|
43
|
+
// Construire la facture avec les helpers
|
|
39
44
|
const factureData = {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
fournisseur:
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
montant_ht_total: '1000.00',
|
|
64
|
-
montant_tva: '200.00',
|
|
65
|
-
montant_ttc_total: '1200.00',
|
|
66
|
-
montant_a_payer: '1200.00'
|
|
67
|
-
},
|
|
68
|
-
lignes_de_poste: [{
|
|
69
|
-
numero: 1,
|
|
70
|
-
denomination: 'Prestation de conseil',
|
|
71
|
-
quantite: '10.00',
|
|
72
|
-
unite: 'PIECE',
|
|
73
|
-
montant_unitaire_ht: '100.00'
|
|
74
|
-
}]
|
|
45
|
+
numeroFacture: 'FAC-2025-001',
|
|
46
|
+
dateFacture: '2025-01-15',
|
|
47
|
+
fournisseur: fournisseur(
|
|
48
|
+
'Mon Entreprise SAS',
|
|
49
|
+
'12345678901234',
|
|
50
|
+
'123 Rue Example',
|
|
51
|
+
'75001',
|
|
52
|
+
'Paris'
|
|
53
|
+
),
|
|
54
|
+
destinataire: destinataire(
|
|
55
|
+
'Client SARL',
|
|
56
|
+
'98765432109876',
|
|
57
|
+
'456 Avenue Test',
|
|
58
|
+
'69001',
|
|
59
|
+
'Lyon'
|
|
60
|
+
),
|
|
61
|
+
montantTotal: montantTotal(1000.00, 200.00, 1200.00, 1200.00),
|
|
62
|
+
lignesDePoste: [
|
|
63
|
+
ligneDePoste(1, 'Prestation de conseil', 10, 100.00, 1000.00)
|
|
64
|
+
],
|
|
65
|
+
lignesDeTva: [
|
|
66
|
+
ligneDeTva(1000.00, 200.00, { tauxManuel: '20.00' })
|
|
67
|
+
],
|
|
75
68
|
};
|
|
76
69
|
|
|
77
|
-
//
|
|
78
|
-
const pdfSource = fs.readFileSync('facture_source.pdf');
|
|
79
|
-
|
|
80
|
-
// Générer le PDF Factur-X (polling automatique)
|
|
70
|
+
// Générer le PDF Factur-X
|
|
81
71
|
const pdfBytes = await client.genererFacturx(
|
|
82
72
|
factureData,
|
|
83
|
-
|
|
84
|
-
'EN16931'
|
|
85
|
-
'pdf', // format
|
|
86
|
-
true // sync (attend le résultat)
|
|
73
|
+
'facture_source.pdf',
|
|
74
|
+
'EN16931'
|
|
87
75
|
);
|
|
88
76
|
|
|
89
|
-
// Sauvegarder
|
|
90
77
|
fs.writeFileSync('facture_facturx.pdf', pdfBytes);
|
|
91
78
|
```
|
|
92
79
|
|
|
93
|
-
|
|
80
|
+
## Helpers disponibles
|
|
81
|
+
|
|
82
|
+
### montant(value)
|
|
94
83
|
|
|
95
|
-
|
|
84
|
+
Convertit une valeur en string formaté pour les montants monétaires.
|
|
96
85
|
|
|
97
86
|
```typescript
|
|
98
|
-
import {
|
|
99
|
-
import axios from 'axios';
|
|
87
|
+
import { montant } from '@factpulse/sdk/helpers';
|
|
100
88
|
|
|
101
|
-
//
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
});
|
|
106
|
-
const token = tokenResponse.data.access;
|
|
89
|
+
montant(1234.5); // "1234.50"
|
|
90
|
+
montant("1234.56"); // "1234.56"
|
|
91
|
+
montant(null); // "0.00"
|
|
92
|
+
```
|
|
107
93
|
|
|
108
|
-
|
|
109
|
-
const config = new Configuration({
|
|
110
|
-
basePath: 'https://factpulse.fr/api/facturation',
|
|
111
|
-
accessToken: token
|
|
112
|
-
});
|
|
94
|
+
### montantTotal(ht, tva, ttc, aPayer, options?)
|
|
113
95
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
'EN16931',
|
|
119
|
-
'pdf',
|
|
120
|
-
new Blob([pdfSource])
|
|
121
|
-
);
|
|
96
|
+
Crée un objet MontantTotal complet.
|
|
97
|
+
|
|
98
|
+
```typescript
|
|
99
|
+
import { montantTotal } from '@factpulse/sdk/helpers';
|
|
122
100
|
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
//
|
|
101
|
+
const total = montantTotal(1000.00, 200.00, 1200.00, 1200.00, {
|
|
102
|
+
remiseTtc: 50.00, // Optionnel
|
|
103
|
+
motifRemise: 'Fidélité', // Optionnel
|
|
104
|
+
acompte: 100.00, // Optionnel
|
|
105
|
+
});
|
|
126
106
|
```
|
|
127
107
|
|
|
128
|
-
|
|
108
|
+
### ligneDePoste(numero, denomination, quantite, montantUnitaireHt, montantTotalLigneHt, options?)
|
|
129
109
|
|
|
130
|
-
|
|
131
|
-
|----------------|----------|---------|
|
|
132
|
-
| Authentification | Manuelle | Automatique |
|
|
133
|
-
| Refresh token | Manuel | Automatique |
|
|
134
|
-
| Polling tâches async | Manuel | Automatique (backoff) |
|
|
135
|
-
| Retry sur 401 | Manuel | Automatique |
|
|
136
|
-
| Types TypeScript | ✓ | ✓ |
|
|
110
|
+
Crée une ligne de facturation.
|
|
137
111
|
|
|
138
|
-
|
|
112
|
+
```typescript
|
|
113
|
+
import { ligneDePoste } from '@factpulse/sdk/helpers';
|
|
114
|
+
|
|
115
|
+
const ligne = ligneDePoste(
|
|
116
|
+
1,
|
|
117
|
+
'Prestation de conseil',
|
|
118
|
+
5,
|
|
119
|
+
200.00,
|
|
120
|
+
1000.00, // montantTotalLigneHt requis
|
|
121
|
+
{
|
|
122
|
+
tauxTva: 'TVA20', // Ou tauxTvaManuel: '20.00'
|
|
123
|
+
categorieTva: 'S', // S, Z, E, AE, K
|
|
124
|
+
unite: 'HEURE', // FORFAIT, PIECE, HEURE, JOUR...
|
|
125
|
+
reference: 'REF-001', // Optionnel
|
|
126
|
+
}
|
|
127
|
+
);
|
|
128
|
+
```
|
|
139
129
|
|
|
140
|
-
###
|
|
130
|
+
### ligneDeTva(montantBaseHt, montantTva, options?)
|
|
141
131
|
|
|
142
|
-
|
|
132
|
+
Crée une ligne de ventilation TVA.
|
|
143
133
|
|
|
144
134
|
```typescript
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
135
|
+
import { ligneDeTva } from '@factpulse/sdk/helpers';
|
|
136
|
+
|
|
137
|
+
const tva = ligneDeTva(1000.00, 200.00, {
|
|
138
|
+
taux: 'TVA20', // Ou tauxManuel: '20.00'
|
|
139
|
+
categorie: 'S', // S, Z, E, AE, K
|
|
149
140
|
});
|
|
150
141
|
```
|
|
151
142
|
|
|
152
|
-
###
|
|
143
|
+
### adressePostale(ligne1, codePostal, ville, options?)
|
|
144
|
+
|
|
145
|
+
Crée une adresse postale structurée.
|
|
153
146
|
|
|
154
147
|
```typescript
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
pollingTimeout: 120000, // Timeout de polling (ms)
|
|
161
|
-
maxRetries: 2 // Tentatives en cas de 401
|
|
148
|
+
import { adressePostale } from '@factpulse/sdk/helpers';
|
|
149
|
+
|
|
150
|
+
const adresse = adressePostale('123 Rue de la République', '75001', 'Paris', {
|
|
151
|
+
pays: 'FR', // Défaut: 'FR'
|
|
152
|
+
ligne2: 'Bâtiment A' // Optionnel
|
|
162
153
|
});
|
|
163
154
|
```
|
|
164
155
|
|
|
165
|
-
|
|
156
|
+
### adresseElectronique(identifiant, schemeId?)
|
|
157
|
+
|
|
158
|
+
Crée une adresse électronique (identifiant numérique).
|
|
159
|
+
|
|
160
|
+
```typescript
|
|
161
|
+
import { adresseElectronique } from '@factpulse/sdk/helpers';
|
|
162
|
+
|
|
163
|
+
// SIRET (schemeId="0225")
|
|
164
|
+
const adresse = adresseElectronique('12345678901234', '0225');
|
|
165
|
+
|
|
166
|
+
// SIREN (schemeId="0009", défaut)
|
|
167
|
+
const adresse = adresseElectronique('123456789');
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
### fournisseur(nom, siret, adresseLigne1, codePostal, ville, options?)
|
|
171
|
+
|
|
172
|
+
Crée un fournisseur complet avec calcul automatique du SIREN et TVA intra.
|
|
173
|
+
|
|
174
|
+
```typescript
|
|
175
|
+
import { fournisseur } from '@factpulse/sdk/helpers';
|
|
176
|
+
|
|
177
|
+
const f = fournisseur(
|
|
178
|
+
'Ma Société SAS',
|
|
179
|
+
'12345678901234',
|
|
180
|
+
'123 Rue Example',
|
|
181
|
+
'75001',
|
|
182
|
+
'Paris',
|
|
183
|
+
{ iban: 'FR7630006000011234567890189' }
|
|
184
|
+
);
|
|
185
|
+
// SIREN et TVA intracommunautaire calculés automatiquement
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
### destinataire(nom, siret, adresseLigne1, codePostal, ville, options?)
|
|
166
189
|
|
|
167
|
-
|
|
190
|
+
Crée un destinataire (client) avec calcul automatique du SIREN.
|
|
168
191
|
|
|
169
192
|
```typescript
|
|
170
|
-
|
|
171
|
-
|
|
193
|
+
import { destinataire } from '@factpulse/sdk/helpers';
|
|
194
|
+
|
|
195
|
+
const d = destinataire(
|
|
196
|
+
'Client SARL',
|
|
197
|
+
'98765432109876',
|
|
198
|
+
'456 Avenue Test',
|
|
199
|
+
'69001',
|
|
200
|
+
'Lyon'
|
|
201
|
+
);
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
## Mode Zero-Trust (Chorus Pro / AFNOR)
|
|
172
205
|
|
|
173
|
-
|
|
174
|
-
const montant = 1234.56;
|
|
206
|
+
Pour passer vos propres credentials sans stockage côté serveur :
|
|
175
207
|
|
|
176
|
-
|
|
177
|
-
|
|
208
|
+
```typescript
|
|
209
|
+
import {
|
|
210
|
+
FactPulseClient,
|
|
211
|
+
ChorusProCredentials,
|
|
212
|
+
AFNORCredentials,
|
|
213
|
+
} from '@factpulse/sdk/helpers';
|
|
178
214
|
|
|
179
|
-
|
|
180
|
-
|
|
215
|
+
const client = new FactPulseClient({
|
|
216
|
+
email: 'votre_email@example.com',
|
|
217
|
+
password: 'votre_mot_de_passe',
|
|
218
|
+
chorusCredentials: {
|
|
219
|
+
pisteClientId: 'votre_client_id',
|
|
220
|
+
pisteClientSecret: 'votre_client_secret',
|
|
221
|
+
chorusProLogin: 'votre_login',
|
|
222
|
+
chorusProPassword: 'votre_password',
|
|
223
|
+
sandbox: true,
|
|
224
|
+
},
|
|
225
|
+
afnorCredentials: {
|
|
226
|
+
flowServiceUrl: 'https://api.pdp.fr/flow/v1',
|
|
227
|
+
tokenUrl: 'https://auth.pdp.fr/oauth/token',
|
|
228
|
+
clientId: 'votre_client_id',
|
|
229
|
+
clientSecret: 'votre_client_secret',
|
|
230
|
+
},
|
|
231
|
+
});
|
|
181
232
|
```
|
|
182
233
|
|
|
183
|
-
##
|
|
234
|
+
## Ressources
|
|
184
235
|
|
|
185
236
|
- **Documentation API** : https://factpulse.fr/api/facturation/documentation
|
|
186
|
-
- **Code source** : https://github.com/factpulse/sdk-typescript
|
|
187
|
-
- **Issues** : https://github.com/factpulse/sdk-typescript/issues
|
|
188
237
|
- **Support** : contact@factpulse.fr
|
|
189
238
|
|
|
190
|
-
##
|
|
239
|
+
## Licence
|
|
191
240
|
|
|
192
241
|
MIT License - Copyright (c) 2025 FactPulse
|
package/api/afnorpdppaapi.ts
CHANGED
|
@@ -21,11 +21,92 @@ import globalAxios from 'axios';
|
|
|
21
21
|
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
|
|
22
22
|
// @ts-ignore
|
|
23
23
|
import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base';
|
|
24
|
+
// @ts-ignore
|
|
25
|
+
import type { FactureEntrante } from '../models';
|
|
26
|
+
// @ts-ignore
|
|
27
|
+
import type { HTTPValidationError } from '../models';
|
|
24
28
|
/**
|
|
25
29
|
* AFNORPDPPAApi - axios parameter creator
|
|
26
30
|
*/
|
|
27
31
|
export const AFNORPDPPAApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
28
32
|
return {
|
|
33
|
+
/**
|
|
34
|
+
* Récupère les credentials AFNOR/PDP stockés pour le client_uid du JWT. Cet endpoint est utilisé par le SDK en mode \'stored\' pour récupérer les credentials avant de faire l\'OAuth AFNOR lui-même.
|
|
35
|
+
* @summary Récupérer les credentials AFNOR stockés
|
|
36
|
+
* @param {*} [options] Override http request option.
|
|
37
|
+
* @throws {RequiredError}
|
|
38
|
+
*/
|
|
39
|
+
getAfnorCredentialsApiV1AfnorCredentialsGet: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
40
|
+
const localVarPath = `/api/v1/afnor/credentials`;
|
|
41
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
42
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
43
|
+
let baseOptions;
|
|
44
|
+
if (configuration) {
|
|
45
|
+
baseOptions = configuration.baseOptions;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
49
|
+
const localVarHeaderParameter = {} as any;
|
|
50
|
+
const localVarQueryParameter = {} as any;
|
|
51
|
+
|
|
52
|
+
// authentication HTTPBearer required
|
|
53
|
+
// http bearer authentication required
|
|
54
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
55
|
+
|
|
56
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
57
|
+
|
|
58
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
59
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
60
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
61
|
+
|
|
62
|
+
return {
|
|
63
|
+
url: toPathString(localVarUrlObj),
|
|
64
|
+
options: localVarRequestOptions,
|
|
65
|
+
};
|
|
66
|
+
},
|
|
67
|
+
/**
|
|
68
|
+
* Télécharge un flux entrant depuis la PDP AFNOR et extrait les métadonnées de la facture vers un format JSON unifié. Supporte les formats Factur-X, CII et UBL.
|
|
69
|
+
* @summary Récupérer et extraire une facture entrante
|
|
70
|
+
* @param {string} flowId
|
|
71
|
+
* @param {boolean} [includeDocument]
|
|
72
|
+
* @param {*} [options] Override http request option.
|
|
73
|
+
* @throws {RequiredError}
|
|
74
|
+
*/
|
|
75
|
+
getFluxEntrantApiV1AfnorFluxEntrantsFlowIdGet: async (flowId: string, includeDocument?: boolean, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
76
|
+
// verify required parameter 'flowId' is not null or undefined
|
|
77
|
+
assertParamExists('getFluxEntrantApiV1AfnorFluxEntrantsFlowIdGet', 'flowId', flowId)
|
|
78
|
+
const localVarPath = `/api/v1/afnor/flux-entrants/{flow_id}`
|
|
79
|
+
.replace(`{${"flow_id"}}`, encodeURIComponent(String(flowId)));
|
|
80
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
81
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
82
|
+
let baseOptions;
|
|
83
|
+
if (configuration) {
|
|
84
|
+
baseOptions = configuration.baseOptions;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
88
|
+
const localVarHeaderParameter = {} as any;
|
|
89
|
+
const localVarQueryParameter = {} as any;
|
|
90
|
+
|
|
91
|
+
// authentication HTTPBearer required
|
|
92
|
+
// http bearer authentication required
|
|
93
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
94
|
+
|
|
95
|
+
if (includeDocument !== undefined) {
|
|
96
|
+
localVarQueryParameter['include_document'] = includeDocument;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
100
|
+
|
|
101
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
102
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
103
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
104
|
+
|
|
105
|
+
return {
|
|
106
|
+
url: toPathString(localVarUrlObj),
|
|
107
|
+
options: localVarRequestOptions,
|
|
108
|
+
};
|
|
109
|
+
},
|
|
29
110
|
/**
|
|
30
111
|
* Endpoint proxy OAuth2 pour obtenir un token d\'accès AFNOR. Fait proxy vers le mock AFNOR (sandbox) ou la vraie PDP selon MOCK_AFNOR_BASE_URL. Cet endpoint est public (pas d\'auth Django requise) car il est appelé par le SDK AFNOR.
|
|
31
112
|
* @summary Endpoint OAuth2 pour authentification AFNOR
|
|
@@ -65,6 +146,32 @@ export const AFNORPDPPAApiAxiosParamCreator = function (configuration?: Configur
|
|
|
65
146
|
export const AFNORPDPPAApiFp = function(configuration?: Configuration) {
|
|
66
147
|
const localVarAxiosParamCreator = AFNORPDPPAApiAxiosParamCreator(configuration)
|
|
67
148
|
return {
|
|
149
|
+
/**
|
|
150
|
+
* Récupère les credentials AFNOR/PDP stockés pour le client_uid du JWT. Cet endpoint est utilisé par le SDK en mode \'stored\' pour récupérer les credentials avant de faire l\'OAuth AFNOR lui-même.
|
|
151
|
+
* @summary Récupérer les credentials AFNOR stockés
|
|
152
|
+
* @param {*} [options] Override http request option.
|
|
153
|
+
* @throws {RequiredError}
|
|
154
|
+
*/
|
|
155
|
+
async getAfnorCredentialsApiV1AfnorCredentialsGet(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<any>> {
|
|
156
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getAfnorCredentialsApiV1AfnorCredentialsGet(options);
|
|
157
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
158
|
+
const localVarOperationServerBasePath = operationServerMap['AFNORPDPPAApi.getAfnorCredentialsApiV1AfnorCredentialsGet']?.[localVarOperationServerIndex]?.url;
|
|
159
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
160
|
+
},
|
|
161
|
+
/**
|
|
162
|
+
* Télécharge un flux entrant depuis la PDP AFNOR et extrait les métadonnées de la facture vers un format JSON unifié. Supporte les formats Factur-X, CII et UBL.
|
|
163
|
+
* @summary Récupérer et extraire une facture entrante
|
|
164
|
+
* @param {string} flowId
|
|
165
|
+
* @param {boolean} [includeDocument]
|
|
166
|
+
* @param {*} [options] Override http request option.
|
|
167
|
+
* @throws {RequiredError}
|
|
168
|
+
*/
|
|
169
|
+
async getFluxEntrantApiV1AfnorFluxEntrantsFlowIdGet(flowId: string, includeDocument?: boolean, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<FactureEntrante>> {
|
|
170
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getFluxEntrantApiV1AfnorFluxEntrantsFlowIdGet(flowId, includeDocument, options);
|
|
171
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
172
|
+
const localVarOperationServerBasePath = operationServerMap['AFNORPDPPAApi.getFluxEntrantApiV1AfnorFluxEntrantsFlowIdGet']?.[localVarOperationServerIndex]?.url;
|
|
173
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
174
|
+
},
|
|
68
175
|
/**
|
|
69
176
|
* Endpoint proxy OAuth2 pour obtenir un token d\'accès AFNOR. Fait proxy vers le mock AFNOR (sandbox) ou la vraie PDP selon MOCK_AFNOR_BASE_URL. Cet endpoint est public (pas d\'auth Django requise) car il est appelé par le SDK AFNOR.
|
|
70
177
|
* @summary Endpoint OAuth2 pour authentification AFNOR
|
|
@@ -86,6 +193,26 @@ export const AFNORPDPPAApiFp = function(configuration?: Configuration) {
|
|
|
86
193
|
export const AFNORPDPPAApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
87
194
|
const localVarFp = AFNORPDPPAApiFp(configuration)
|
|
88
195
|
return {
|
|
196
|
+
/**
|
|
197
|
+
* Récupère les credentials AFNOR/PDP stockés pour le client_uid du JWT. Cet endpoint est utilisé par le SDK en mode \'stored\' pour récupérer les credentials avant de faire l\'OAuth AFNOR lui-même.
|
|
198
|
+
* @summary Récupérer les credentials AFNOR stockés
|
|
199
|
+
* @param {*} [options] Override http request option.
|
|
200
|
+
* @throws {RequiredError}
|
|
201
|
+
*/
|
|
202
|
+
getAfnorCredentialsApiV1AfnorCredentialsGet(options?: RawAxiosRequestConfig): AxiosPromise<any> {
|
|
203
|
+
return localVarFp.getAfnorCredentialsApiV1AfnorCredentialsGet(options).then((request) => request(axios, basePath));
|
|
204
|
+
},
|
|
205
|
+
/**
|
|
206
|
+
* Télécharge un flux entrant depuis la PDP AFNOR et extrait les métadonnées de la facture vers un format JSON unifié. Supporte les formats Factur-X, CII et UBL.
|
|
207
|
+
* @summary Récupérer et extraire une facture entrante
|
|
208
|
+
* @param {string} flowId
|
|
209
|
+
* @param {boolean} [includeDocument]
|
|
210
|
+
* @param {*} [options] Override http request option.
|
|
211
|
+
* @throws {RequiredError}
|
|
212
|
+
*/
|
|
213
|
+
getFluxEntrantApiV1AfnorFluxEntrantsFlowIdGet(flowId: string, includeDocument?: boolean, options?: RawAxiosRequestConfig): AxiosPromise<FactureEntrante> {
|
|
214
|
+
return localVarFp.getFluxEntrantApiV1AfnorFluxEntrantsFlowIdGet(flowId, includeDocument, options).then((request) => request(axios, basePath));
|
|
215
|
+
},
|
|
89
216
|
/**
|
|
90
217
|
* Endpoint proxy OAuth2 pour obtenir un token d\'accès AFNOR. Fait proxy vers le mock AFNOR (sandbox) ou la vraie PDP selon MOCK_AFNOR_BASE_URL. Cet endpoint est public (pas d\'auth Django requise) car il est appelé par le SDK AFNOR.
|
|
91
218
|
* @summary Endpoint OAuth2 pour authentification AFNOR
|
|
@@ -102,6 +229,28 @@ export const AFNORPDPPAApiFactory = function (configuration?: Configuration, bas
|
|
|
102
229
|
* AFNORPDPPAApi - object-oriented interface
|
|
103
230
|
*/
|
|
104
231
|
export class AFNORPDPPAApi extends BaseAPI {
|
|
232
|
+
/**
|
|
233
|
+
* Récupère les credentials AFNOR/PDP stockés pour le client_uid du JWT. Cet endpoint est utilisé par le SDK en mode \'stored\' pour récupérer les credentials avant de faire l\'OAuth AFNOR lui-même.
|
|
234
|
+
* @summary Récupérer les credentials AFNOR stockés
|
|
235
|
+
* @param {*} [options] Override http request option.
|
|
236
|
+
* @throws {RequiredError}
|
|
237
|
+
*/
|
|
238
|
+
public getAfnorCredentialsApiV1AfnorCredentialsGet(options?: RawAxiosRequestConfig) {
|
|
239
|
+
return AFNORPDPPAApiFp(this.configuration).getAfnorCredentialsApiV1AfnorCredentialsGet(options).then((request) => request(this.axios, this.basePath));
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
/**
|
|
243
|
+
* Télécharge un flux entrant depuis la PDP AFNOR et extrait les métadonnées de la facture vers un format JSON unifié. Supporte les formats Factur-X, CII et UBL.
|
|
244
|
+
* @summary Récupérer et extraire une facture entrante
|
|
245
|
+
* @param {string} flowId
|
|
246
|
+
* @param {boolean} [includeDocument]
|
|
247
|
+
* @param {*} [options] Override http request option.
|
|
248
|
+
* @throws {RequiredError}
|
|
249
|
+
*/
|
|
250
|
+
public getFluxEntrantApiV1AfnorFluxEntrantsFlowIdGet(flowId: string, includeDocument?: boolean, options?: RawAxiosRequestConfig) {
|
|
251
|
+
return AFNORPDPPAApiFp(this.configuration).getFluxEntrantApiV1AfnorFluxEntrantsFlowIdGet(flowId, includeDocument, options).then((request) => request(this.axios, this.basePath));
|
|
252
|
+
}
|
|
253
|
+
|
|
105
254
|
/**
|
|
106
255
|
* Endpoint proxy OAuth2 pour obtenir un token d\'accès AFNOR. Fait proxy vers le mock AFNOR (sandbox) ou la vraie PDP selon MOCK_AFNOR_BASE_URL. Cet endpoint est public (pas d\'auth Django requise) car il est appelé par le SDK AFNOR.
|
|
107
256
|
* @summary Endpoint OAuth2 pour authentification AFNOR
|