@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
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export declare class FactPulseError extends Error {
|
|
2
|
+
constructor(message: string);
|
|
3
|
+
}
|
|
4
|
+
export declare class FactPulseAuthError extends FactPulseError {
|
|
5
|
+
constructor(message?: string);
|
|
6
|
+
}
|
|
7
|
+
export declare class FactPulsePollingTimeout extends FactPulseError {
|
|
8
|
+
readonly taskId: string;
|
|
9
|
+
readonly timeout: number;
|
|
10
|
+
constructor(taskId: string, timeout: number);
|
|
11
|
+
}
|
|
12
|
+
export interface ValidationErrorDetail {
|
|
13
|
+
level?: string;
|
|
14
|
+
item?: string;
|
|
15
|
+
reason?: string;
|
|
16
|
+
source?: string;
|
|
17
|
+
code?: string;
|
|
18
|
+
}
|
|
19
|
+
export declare function formatValidationError(e: ValidationErrorDetail): string;
|
|
20
|
+
export declare class FactPulseValidationError extends FactPulseError {
|
|
21
|
+
readonly errors: ValidationErrorDetail[];
|
|
22
|
+
constructor(message: string, errors?: ValidationErrorDetail[]);
|
|
23
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FactPulseValidationError = exports.FactPulsePollingTimeout = exports.FactPulseAuthError = exports.FactPulseError = void 0;
|
|
4
|
+
exports.formatValidationError = formatValidationError;
|
|
5
|
+
class FactPulseError extends Error {
|
|
6
|
+
constructor(message) { super(message); this.name = 'FactPulseError'; Object.setPrototypeOf(this, FactPulseError.prototype); }
|
|
7
|
+
}
|
|
8
|
+
exports.FactPulseError = FactPulseError;
|
|
9
|
+
class FactPulseAuthError extends FactPulseError {
|
|
10
|
+
constructor(message = "Erreur d'authentification") { super(message); this.name = 'FactPulseAuthError'; Object.setPrototypeOf(this, FactPulseAuthError.prototype); }
|
|
11
|
+
}
|
|
12
|
+
exports.FactPulseAuthError = FactPulseAuthError;
|
|
13
|
+
class FactPulsePollingTimeout extends FactPulseError {
|
|
14
|
+
constructor(taskId, timeout) {
|
|
15
|
+
super(`Timeout (${timeout}ms) atteint pour la tâche ${taskId}`);
|
|
16
|
+
this.name = 'FactPulsePollingTimeout';
|
|
17
|
+
this.taskId = taskId;
|
|
18
|
+
this.timeout = timeout;
|
|
19
|
+
Object.setPrototypeOf(this, FactPulsePollingTimeout.prototype);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
exports.FactPulsePollingTimeout = FactPulsePollingTimeout;
|
|
23
|
+
function formatValidationError(e) {
|
|
24
|
+
return `[${e.item || 'unknown'}] ${e.reason || 'Unknown error'}`;
|
|
25
|
+
}
|
|
26
|
+
class FactPulseValidationError extends FactPulseError {
|
|
27
|
+
constructor(message, errors = []) {
|
|
28
|
+
const fullMessage = errors.length > 0 ? `${message}\n\nDétails:\n${errors.map(e => ` - ${formatValidationError(e)}`).join('\n')}` : message;
|
|
29
|
+
super(fullMessage);
|
|
30
|
+
this.name = 'FactPulseValidationError';
|
|
31
|
+
this.errors = errors;
|
|
32
|
+
Object.setPrototypeOf(this, FactPulseValidationError.prototype);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
exports.FactPulseValidationError = FactPulseValidationError;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { FactPulseError, FactPulseAuthError, FactPulsePollingTimeout, FactPulseValidationError, ValidationErrorDetail, formatValidationError } from './exceptions';
|
|
2
|
+
export { FactPulseClient, FactPulseClientConfig, ChorusProCredentials, AFNORCredentials } from './client';
|
|
3
|
+
export { montant, montantTotal, ligneDePoste, ligneDeTva, adressePostale, adresseElectronique, fournisseur, destinataire } from './client';
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.destinataire = exports.fournisseur = exports.adresseElectronique = exports.adressePostale = exports.ligneDeTva = exports.ligneDePoste = exports.montantTotal = exports.montant = exports.FactPulseClient = exports.formatValidationError = exports.FactPulseValidationError = exports.FactPulsePollingTimeout = exports.FactPulseAuthError = exports.FactPulseError = void 0;
|
|
4
|
+
// Exceptions
|
|
5
|
+
var exceptions_1 = require("./exceptions");
|
|
6
|
+
Object.defineProperty(exports, "FactPulseError", { enumerable: true, get: function () { return exceptions_1.FactPulseError; } });
|
|
7
|
+
Object.defineProperty(exports, "FactPulseAuthError", { enumerable: true, get: function () { return exceptions_1.FactPulseAuthError; } });
|
|
8
|
+
Object.defineProperty(exports, "FactPulsePollingTimeout", { enumerable: true, get: function () { return exceptions_1.FactPulsePollingTimeout; } });
|
|
9
|
+
Object.defineProperty(exports, "FactPulseValidationError", { enumerable: true, get: function () { return exceptions_1.FactPulseValidationError; } });
|
|
10
|
+
Object.defineProperty(exports, "formatValidationError", { enumerable: true, get: function () { return exceptions_1.formatValidationError; } });
|
|
11
|
+
// Client et configuration
|
|
12
|
+
var client_1 = require("./client");
|
|
13
|
+
Object.defineProperty(exports, "FactPulseClient", { enumerable: true, get: function () { return client_1.FactPulseClient; } });
|
|
14
|
+
// Helpers pour les montants
|
|
15
|
+
var client_2 = require("./client");
|
|
16
|
+
Object.defineProperty(exports, "montant", { enumerable: true, get: function () { return client_2.montant; } });
|
|
17
|
+
Object.defineProperty(exports, "montantTotal", { enumerable: true, get: function () { return client_2.montantTotal; } });
|
|
18
|
+
Object.defineProperty(exports, "ligneDePoste", { enumerable: true, get: function () { return client_2.ligneDePoste; } });
|
|
19
|
+
Object.defineProperty(exports, "ligneDeTva", { enumerable: true, get: function () { return client_2.ligneDeTva; } });
|
|
20
|
+
Object.defineProperty(exports, "adressePostale", { enumerable: true, get: function () { return client_2.adressePostale; } });
|
|
21
|
+
Object.defineProperty(exports, "adresseElectronique", { enumerable: true, get: function () { return client_2.adresseElectronique; } });
|
|
22
|
+
Object.defineProperty(exports, "fournisseur", { enumerable: true, get: function () { return client_2.fournisseur; } });
|
|
23
|
+
Object.defineProperty(exports, "destinataire", { enumerable: true, get: function () { return client_2.destinataire; } });
|
package/docs/AFNORPDPPAApi.md
CHANGED
|
@@ -4,8 +4,116 @@ All URIs are relative to *http://localhost*
|
|
|
4
4
|
|
|
5
5
|
|Method | HTTP request | Description|
|
|
6
6
|
|------------- | ------------- | -------------|
|
|
7
|
+
|[**getAfnorCredentialsApiV1AfnorCredentialsGet**](#getafnorcredentialsapiv1afnorcredentialsget) | **GET** /api/v1/afnor/credentials | Récupérer les credentials AFNOR stockés|
|
|
8
|
+
|[**getFluxEntrantApiV1AfnorFluxEntrantsFlowIdGet**](#getfluxentrantapiv1afnorfluxentrantsflowidget) | **GET** /api/v1/afnor/flux-entrants/{flow_id} | Récupérer et extraire une facture entrante|
|
|
7
9
|
|[**oauthTokenProxyApiV1AfnorOauthTokenPost**](#oauthtokenproxyapiv1afnoroauthtokenpost) | **POST** /api/v1/afnor/oauth/token | Endpoint OAuth2 pour authentification AFNOR|
|
|
8
10
|
|
|
11
|
+
# **getAfnorCredentialsApiV1AfnorCredentialsGet**
|
|
12
|
+
> any getAfnorCredentialsApiV1AfnorCredentialsGet()
|
|
13
|
+
|
|
14
|
+
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.
|
|
15
|
+
|
|
16
|
+
### Example
|
|
17
|
+
|
|
18
|
+
```typescript
|
|
19
|
+
import {
|
|
20
|
+
AFNORPDPPAApi,
|
|
21
|
+
Configuration
|
|
22
|
+
} from '@factpulse/sdk';
|
|
23
|
+
|
|
24
|
+
const configuration = new Configuration();
|
|
25
|
+
const apiInstance = new AFNORPDPPAApi(configuration);
|
|
26
|
+
|
|
27
|
+
const { status, data } = await apiInstance.getAfnorCredentialsApiV1AfnorCredentialsGet();
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
### Parameters
|
|
31
|
+
This endpoint does not have any parameters.
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
### Return type
|
|
35
|
+
|
|
36
|
+
**any**
|
|
37
|
+
|
|
38
|
+
### Authorization
|
|
39
|
+
|
|
40
|
+
[HTTPBearer](../README.md#HTTPBearer)
|
|
41
|
+
|
|
42
|
+
### HTTP request headers
|
|
43
|
+
|
|
44
|
+
- **Content-Type**: Not defined
|
|
45
|
+
- **Accept**: application/json
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
### HTTP response details
|
|
49
|
+
| Status code | Description | Response headers |
|
|
50
|
+
|-------------|-------------|------------------|
|
|
51
|
+
|**200** | Credentials AFNOR récupérés avec succès | - |
|
|
52
|
+
|**400** | Aucun client_uid dans le JWT | - |
|
|
53
|
+
|**401** | Non authentifié - Token JWT manquant ou invalide | - |
|
|
54
|
+
|**404** | Client non trouvé ou pas de credentials AFNOR configurés | - |
|
|
55
|
+
|
|
56
|
+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
57
|
+
|
|
58
|
+
# **getFluxEntrantApiV1AfnorFluxEntrantsFlowIdGet**
|
|
59
|
+
> FactureEntrante getFluxEntrantApiV1AfnorFluxEntrantsFlowIdGet()
|
|
60
|
+
|
|
61
|
+
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.
|
|
62
|
+
|
|
63
|
+
### Example
|
|
64
|
+
|
|
65
|
+
```typescript
|
|
66
|
+
import {
|
|
67
|
+
AFNORPDPPAApi,
|
|
68
|
+
Configuration
|
|
69
|
+
} from '@factpulse/sdk';
|
|
70
|
+
|
|
71
|
+
const configuration = new Configuration();
|
|
72
|
+
const apiInstance = new AFNORPDPPAApi(configuration);
|
|
73
|
+
|
|
74
|
+
let flowId: string; // (default to undefined)
|
|
75
|
+
let includeDocument: boolean; // (optional) (default to false)
|
|
76
|
+
|
|
77
|
+
const { status, data } = await apiInstance.getFluxEntrantApiV1AfnorFluxEntrantsFlowIdGet(
|
|
78
|
+
flowId,
|
|
79
|
+
includeDocument
|
|
80
|
+
);
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
### Parameters
|
|
84
|
+
|
|
85
|
+
|Name | Type | Description | Notes|
|
|
86
|
+
|------------- | ------------- | ------------- | -------------|
|
|
87
|
+
| **flowId** | [**string**] | | defaults to undefined|
|
|
88
|
+
| **includeDocument** | [**boolean**] | | (optional) defaults to false|
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
### Return type
|
|
92
|
+
|
|
93
|
+
**FactureEntrante**
|
|
94
|
+
|
|
95
|
+
### Authorization
|
|
96
|
+
|
|
97
|
+
[HTTPBearer](../README.md#HTTPBearer)
|
|
98
|
+
|
|
99
|
+
### HTTP request headers
|
|
100
|
+
|
|
101
|
+
- **Content-Type**: Not defined
|
|
102
|
+
- **Accept**: application/json
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
### HTTP response details
|
|
106
|
+
| Status code | Description | Response headers |
|
|
107
|
+
|-------------|-------------|------------------|
|
|
108
|
+
|**200** | Facture extraite avec succès | - |
|
|
109
|
+
|**400** | Format de facture non supporté ou invalide | - |
|
|
110
|
+
|**401** | Non authentifié | - |
|
|
111
|
+
|**404** | Flux non trouvé | - |
|
|
112
|
+
|**503** | Service PDP indisponible | - |
|
|
113
|
+
|**422** | Validation Error | - |
|
|
114
|
+
|
|
115
|
+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
116
|
+
|
|
9
117
|
# **oauthTokenProxyApiV1AfnorOauthTokenPost**
|
|
10
118
|
> any oauthTokenProxyApiV1AfnorOauthTokenPost()
|
|
11
119
|
|
package/docs/APIError.md
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# APIError
|
|
2
|
+
|
|
3
|
+
Erreur API standardisée (alignée sur AFNOR Error schema). Format unifié pour toutes les réponses d\'erreur HTTP.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type | Description | Notes
|
|
8
|
+
------------ | ------------- | ------------- | -------------
|
|
9
|
+
**errorCode** | **string** | Code alphanumérique identifiant précisément l\'erreur | [default to undefined]
|
|
10
|
+
**errorMessage** | **string** | Message décrivant l\'erreur (non destiné à l\'utilisateur final) | [default to undefined]
|
|
11
|
+
**details** | [**Array<ValidationErrorDetail>**](ValidationErrorDetail.md) | | [optional] [default to undefined]
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
import { APIError } from '@factpulse/sdk';
|
|
17
|
+
|
|
18
|
+
const instance: APIError = {
|
|
19
|
+
errorCode,
|
|
20
|
+
errorMessage,
|
|
21
|
+
details,
|
|
22
|
+
};
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Beneficiaire
|
|
2
|
+
|
|
3
|
+
Informations sur le bénéficiaire du paiement (BG-10 / PayeeTradeParty). Le bénéficiaire est la partie qui reçoit le paiement. Ce bloc est utilisé uniquement si le bénéficiaire est différent du vendeur (fournisseur). **Cas d\'usage principal** : Affacturage (factoring) Quand une facture est affacturée, le factor (société d\'affacturage) devient le bénéficiaire du paiement à la place du fournisseur. **Business Terms (EN16931)** : - BT-59 : Nom du bénéficiaire (obligatoire) - BT-60 : Identifiant du bénéficiaire (SIRET avec schemeID 0009) - BT-61 : Identifiant légal du bénéficiaire (SIREN avec schemeID 0002) **Référence** : docs/guide_affacturage.md
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type | Description | Notes
|
|
8
|
+
------------ | ------------- | ------------- | -------------
|
|
9
|
+
**nom** | **string** | Nom du bénéficiaire (BT-59). Obligatoire. | [default to undefined]
|
|
10
|
+
**siret** | **string** | | [optional] [default to undefined]
|
|
11
|
+
**siren** | **string** | | [optional] [default to undefined]
|
|
12
|
+
**adresseElectronique** | [**AdresseElectronique**](AdresseElectronique.md) | | [optional] [default to undefined]
|
|
13
|
+
**iban** | **string** | | [optional] [default to undefined]
|
|
14
|
+
**bic** | **string** | | [optional] [default to undefined]
|
|
15
|
+
|
|
16
|
+
## Example
|
|
17
|
+
|
|
18
|
+
```typescript
|
|
19
|
+
import { Beneficiaire } from '@factpulse/sdk';
|
|
20
|
+
|
|
21
|
+
const instance: Beneficiaire = {
|
|
22
|
+
nom,
|
|
23
|
+
siret,
|
|
24
|
+
siren,
|
|
25
|
+
adresseElectronique,
|
|
26
|
+
iban,
|
|
27
|
+
bic,
|
|
28
|
+
};
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# BoundingBoxSchema
|
|
2
|
+
|
|
3
|
+
Coordonnées d\'une zone rectangulaire dans le PDF. Les coordonnées sont en points PDF (1 point = 1/72 pouce). L\'origine (0,0) est en bas à gauche de la page.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type | Description | Notes
|
|
8
|
+
------------ | ------------- | ------------- | -------------
|
|
9
|
+
**x0** | **number** | Coordonnée X gauche | [default to undefined]
|
|
10
|
+
**y0** | **number** | Coordonnée Y bas | [default to undefined]
|
|
11
|
+
**x1** | **number** | Coordonnée X droite | [default to undefined]
|
|
12
|
+
**y1** | **number** | Coordonnée Y haut | [default to undefined]
|
|
13
|
+
**page** | **number** | Numéro de page (0-indexed) | [optional] [default to 0]
|
|
14
|
+
**width** | **number** | Largeur de la zone | [default to undefined]
|
|
15
|
+
**height** | **number** | Hauteur de la zone | [default to undefined]
|
|
16
|
+
|
|
17
|
+
## Example
|
|
18
|
+
|
|
19
|
+
```typescript
|
|
20
|
+
import { BoundingBoxSchema } from '@factpulse/sdk';
|
|
21
|
+
|
|
22
|
+
const instance: BoundingBoxSchema = {
|
|
23
|
+
x0,
|
|
24
|
+
y0,
|
|
25
|
+
x1,
|
|
26
|
+
y1,
|
|
27
|
+
page,
|
|
28
|
+
width,
|
|
29
|
+
height,
|
|
30
|
+
};
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
# CadreDeFacturation
|
|
2
2
|
|
|
3
|
-
Définit le cadre de facturation
|
|
3
|
+
Définit le cadre de facturation. - code_cadre_facturation: Code Chorus Pro (A1, A2, A9, A12) - utilisé pour B2G - nature_operation: Nature de l\'opération (B1, S1, M1, etc.) - prioritaire pour Factur-X Si nature_operation est fourni, il sera utilisé directement dans le XML Factur-X (BT-23). Sinon, le code sera déduit de code_cadre_facturation via un mapping automatique. Exemple: >>> cadre = CadreDeFacturation( ... code_cadre_facturation=CodeCadreFacturation.A1_FACTURE_FOURNISSEUR, ... nature_operation=NatureOperation.BIENS # Force B1 au lieu de S1 ... )
|
|
4
4
|
|
|
5
5
|
## Properties
|
|
6
6
|
|
|
7
7
|
Name | Type | Description | Notes
|
|
8
8
|
------------ | ------------- | ------------- | -------------
|
|
9
9
|
**codeCadreFacturation** | [**CodeCadreFacturation**](CodeCadreFacturation.md) | | [default to undefined]
|
|
10
|
+
**natureOperation** | [**NatureOperation**](NatureOperation.md) | | [optional] [default to undefined]
|
|
10
11
|
**codeServiceValideur** | **string** | | [optional] [default to undefined]
|
|
11
12
|
**codeStructureValideur** | **string** | | [optional] [default to undefined]
|
|
12
13
|
|
|
@@ -17,6 +18,7 @@ import { CadreDeFacturation } from '@factpulse/sdk';
|
|
|
17
18
|
|
|
18
19
|
const instance: CadreDeFacturation = {
|
|
19
20
|
codeCadreFacturation,
|
|
21
|
+
natureOperation,
|
|
20
22
|
codeServiceValideur,
|
|
21
23
|
codeStructureValideur,
|
|
22
24
|
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# ChampVerifieSchema
|
|
2
|
+
|
|
3
|
+
Un champ vérifié avec toutes ses informations (extraction + conformité + localisation).
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type | Description | Notes
|
|
8
|
+
------------ | ------------- | ------------- | -------------
|
|
9
|
+
**business_term** | **string** | Business Term EN16931 (ex: BT-1) | [default to undefined]
|
|
10
|
+
**label** | **string** | Libellé du champ (ex: N° Facture) | [default to undefined]
|
|
11
|
+
**valeur_pdf** | **string** | | [optional] [default to undefined]
|
|
12
|
+
**valeur_xml** | **string** | | [optional] [default to undefined]
|
|
13
|
+
**statut** | [**StatutChampAPI**](StatutChampAPI.md) | Statut de conformité | [default to undefined]
|
|
14
|
+
**message** | **string** | | [optional] [default to undefined]
|
|
15
|
+
**confiance** | **number** | Score de confiance (0-1) | [optional] [default to 1.0]
|
|
16
|
+
**source** | **string** | Source d\'extraction | [optional] [default to 'pdf_natif']
|
|
17
|
+
**bbox** | [**BoundingBoxSchema**](BoundingBoxSchema.md) | | [optional] [default to undefined]
|
|
18
|
+
|
|
19
|
+
## Example
|
|
20
|
+
|
|
21
|
+
```typescript
|
|
22
|
+
import { ChampVerifieSchema } from '@factpulse/sdk';
|
|
23
|
+
|
|
24
|
+
const instance: ChampVerifieSchema = {
|
|
25
|
+
business_term,
|
|
26
|
+
label,
|
|
27
|
+
valeur_pdf,
|
|
28
|
+
valeur_xml,
|
|
29
|
+
statut,
|
|
30
|
+
message,
|
|
31
|
+
confiance,
|
|
32
|
+
source,
|
|
33
|
+
bbox,
|
|
34
|
+
};
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|