factpulse 1.0.6__py3-none-any.whl → 2.0.37__py3-none-any.whl

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.

Potentially problematic release.


This version of factpulse might be problematic. Click here for more details.

Files changed (147) hide show
  1. factpulse/__init__.py +54 -54
  2. factpulse/api/__init__.py +1 -2
  3. factpulse/api/afnorpdppa_api.py +552 -2
  4. factpulse/api/afnorpdppa_directory_service_api.py +4312 -65
  5. factpulse/api/afnorpdppa_flow_service_api.py +1 -1
  6. factpulse/api/chorus_pro_api.py +152 -194
  7. factpulse/api/sant_api.py +246 -1
  8. factpulse/api/traitement_facture_api.py +25 -27
  9. factpulse/api/utilisateur_api.py +1 -1
  10. factpulse/api/vrification_pdfxml_api.py +1719 -0
  11. factpulse/api_client.py +5 -5
  12. factpulse/configuration.py +5 -3
  13. factpulse/exceptions.py +7 -4
  14. factpulse/models/__init__.py +26 -25
  15. factpulse/models/adresse_electronique.py +1 -1
  16. factpulse/models/adresse_postale.py +1 -1
  17. factpulse/models/{body_ajouter_fichier_api_v1_chorus_pro_transverses_ajouter_fichier_post.py → api_error.py} +24 -24
  18. factpulse/models/{body_completer_facture_api_v1_chorus_pro_factures_completer_post.py → bounding_box_schema.py} +23 -27
  19. factpulse/models/cadre_de_facturation.py +11 -3
  20. factpulse/models/categorie_tva.py +11 -11
  21. factpulse/models/certificate_info_response.py +1 -1
  22. factpulse/models/champ_verifie_schema.py +129 -0
  23. factpulse/models/chorus_pro_credentials.py +1 -1
  24. factpulse/models/code_cadre_facturation.py +2 -2
  25. factpulse/models/code_raison_reduction.py +9 -9
  26. factpulse/models/consulter_facture_request.py +1 -1
  27. factpulse/models/consulter_facture_response.py +1 -1
  28. factpulse/models/consulter_structure_request.py +1 -1
  29. factpulse/models/consulter_structure_response.py +1 -1
  30. factpulse/models/credentials_afnor.py +1 -1
  31. factpulse/models/credentials_chorus_pro.py +1 -1
  32. factpulse/models/destinataire.py +16 -2
  33. factpulse/models/destination.py +1 -1
  34. factpulse/models/destination_afnor.py +1 -1
  35. factpulse/models/destination_chorus_pro.py +1 -1
  36. factpulse/models/{quota_info.py → dimension_page_schema.py} +12 -18
  37. factpulse/models/direction_flux.py +1 -1
  38. factpulse/models/donnees_facture_simplifiees.py +1 -1
  39. factpulse/models/error_level.py +37 -0
  40. factpulse/models/error_source.py +43 -0
  41. factpulse/models/{facture_enrichie_info_output.py → facture_enrichie_info.py} +4 -4
  42. factpulse/models/facture_entrante.py +196 -0
  43. factpulse/models/facture_factur_x.py +12 -2
  44. factpulse/models/flux_resume.py +1 -1
  45. factpulse/models/format_facture.py +38 -0
  46. factpulse/models/format_sortie.py +1 -1
  47. factpulse/models/fournisseur.py +9 -2
  48. factpulse/models/fournisseur_entrant.py +144 -0
  49. factpulse/models/generate_certificate_request.py +1 -1
  50. factpulse/models/generate_certificate_response.py +1 -1
  51. factpulse/models/http_validation_error.py +1 -1
  52. factpulse/models/information_signature_api.py +1 -1
  53. factpulse/models/ligne_de_poste.py +7 -12
  54. factpulse/models/ligne_de_poste_montant_remise_ht.py +2 -2
  55. factpulse/models/ligne_de_poste_taux_tva_manuel.py +2 -2
  56. factpulse/models/ligne_de_tva.py +24 -10
  57. factpulse/models/mode_depot.py +1 -1
  58. factpulse/models/mode_paiement.py +1 -1
  59. factpulse/models/{montantapayer.py → montant_a_payer.py} +6 -6
  60. factpulse/models/{montantbaseht.py → montant_base_ht.py} +6 -6
  61. factpulse/models/montant_ht_total.py +4 -4
  62. factpulse/models/{montant_total_montant_remise_globale_ttc.py → montant_remise_globale_ttc.py} +7 -13
  63. factpulse/models/montant_total.py +16 -21
  64. factpulse/models/montant_total_acompte.py +2 -2
  65. factpulse/models/{ligne_de_poste_montant_total_ligne_ht.py → montant_total_ligne_ht.py} +7 -13
  66. factpulse/models/montant_ttc_total.py +4 -4
  67. factpulse/models/montant_tva.py +2 -2
  68. factpulse/models/{montanttva1.py → montant_tva_ligne.py} +7 -7
  69. factpulse/models/{montantttctotal.py → montant_tva_total.py} +7 -7
  70. factpulse/models/{montantunitaireht.py → montant_unitaire_ht.py} +5 -5
  71. factpulse/models/nature_operation.py +49 -0
  72. factpulse/models/{body_valideur_rechercher_factures_api_v1_chorus_pro_factures_valideur_rechercher_post.py → note.py} +14 -24
  73. factpulse/models/{utilisateur.py → note_obligatoire_schema.py} +40 -44
  74. factpulse/models/obtenir_id_chorus_pro_request.py +1 -1
  75. factpulse/models/obtenir_id_chorus_pro_response.py +1 -1
  76. factpulse/models/options_processing.py +5 -14
  77. factpulse/models/parametres_signature.py +1 -1
  78. factpulse/models/parametres_structure.py +1 -1
  79. factpulse/models/pdf_factur_x_info.py +1 -1
  80. factpulse/models/pdp_credentials.py +10 -3
  81. factpulse/models/piece_jointe_complementaire.py +1 -1
  82. factpulse/models/profil_api.py +1 -1
  83. factpulse/models/profil_flux.py +1 -1
  84. factpulse/models/quantite.py +1 -1
  85. factpulse/models/rechercher_services_response.py +1 -1
  86. factpulse/models/rechercher_structure_request.py +1 -1
  87. factpulse/models/rechercher_structure_response.py +1 -1
  88. factpulse/models/references.py +1 -1
  89. factpulse/models/reponse_healthcheck_afnor.py +1 -1
  90. factpulse/models/reponse_recherche_flux.py +1 -1
  91. factpulse/models/reponse_soumission_flux.py +1 -1
  92. factpulse/models/reponse_tache.py +1 -1
  93. factpulse/models/reponse_validation_erreur.py +1 -1
  94. factpulse/models/reponse_validation_succes.py +1 -1
  95. factpulse/models/reponse_verification_succes.py +135 -0
  96. factpulse/models/requete_recherche_flux.py +1 -1
  97. factpulse/models/requete_soumission_flux.py +1 -1
  98. factpulse/models/resultat_afnor.py +1 -1
  99. factpulse/models/resultat_chorus_pro.py +1 -1
  100. factpulse/models/resultat_validation_pdfapi.py +1 -1
  101. factpulse/models/scheme_id.py +7 -7
  102. factpulse/models/service_structure.py +1 -1
  103. factpulse/models/signature_info.py +1 -1
  104. factpulse/models/soumettre_facture_complete_request.py +1 -1
  105. factpulse/models/soumettre_facture_complete_response.py +4 -4
  106. factpulse/models/soumettre_facture_request.py +19 -7
  107. factpulse/models/soumettre_facture_response.py +1 -1
  108. factpulse/models/statut_acquittement.py +1 -1
  109. factpulse/models/statut_celery.py +40 -0
  110. factpulse/models/statut_champ_api.py +40 -0
  111. factpulse/models/statut_facture.py +1 -1
  112. factpulse/models/statut_tache.py +7 -9
  113. factpulse/models/structure_info.py +1 -1
  114. factpulse/models/syntaxe_flux.py +1 -1
  115. factpulse/models/tauxmanuel.py +2 -2
  116. factpulse/models/type_document.py +40 -0
  117. factpulse/models/type_facture.py +1 -1
  118. factpulse/models/type_flux.py +1 -1
  119. factpulse/models/type_tva.py +1 -1
  120. factpulse/models/unite.py +1 -1
  121. factpulse/models/validation_error.py +1 -1
  122. factpulse/models/{body_rechercher_factures_fournisseur_api_v1_chorus_pro_factures_rechercher_fournisseur_post.py → validation_error_detail.py} +27 -24
  123. factpulse/models/validation_error_loc_inner.py +1 -1
  124. factpulse/rest.py +8 -3
  125. factpulse-2.0.37.dist-info/METADATA +292 -0
  126. factpulse-2.0.37.dist-info/RECORD +134 -0
  127. factpulse-2.0.37.dist-info/top_level.txt +2 -0
  128. factpulse_helpers/__init__.py +96 -0
  129. factpulse_helpers/client.py +1887 -0
  130. factpulse_helpers/exceptions.py +253 -0
  131. factpulse/api/processing_endpoints_unifis_api.py +0 -592
  132. factpulse/api/signature_lectronique_api.py +0 -1358
  133. factpulse/models/body_lister_services_structure_api_v1_chorus_pro_structures_id_structure_cpp_services_get.py +0 -102
  134. factpulse/models/body_rechercher_factures_destinataire_api_v1_chorus_pro_factures_rechercher_destinataire_post.py +0 -104
  135. factpulse/models/body_recycler_facture_api_v1_chorus_pro_factures_recycler_post.py +0 -104
  136. factpulse/models/body_telecharger_groupe_factures_api_v1_chorus_pro_factures_telecharger_groupe_post.py +0 -104
  137. factpulse/models/body_traiter_facture_recue_api_v1_chorus_pro_factures_traiter_facture_recue_post.py +0 -104
  138. factpulse/models/body_valideur_consulter_facture_api_v1_chorus_pro_factures_valideur_consulter_post.py +0 -104
  139. factpulse/models/body_valideur_traiter_facture_api_v1_chorus_pro_factures_valideur_traiter_post.py +0 -104
  140. factpulse/models/facture_enrichie_info_input.py +0 -123
  141. factpulse/models/montanthttotal.py +0 -139
  142. factpulse/models/montanttva.py +0 -139
  143. factpulse-1.0.6.dist-info/METADATA +0 -182
  144. factpulse-1.0.6.dist-info/RECORD +0 -131
  145. factpulse-1.0.6.dist-info/top_level.txt +0 -1
  146. {factpulse-1.0.6.dist-info → factpulse-2.0.37.dist-info}/WHEEL +0 -0
  147. {factpulse-1.0.6.dist-info → factpulse-2.0.37.dist-info}/licenses/LICENSE +0 -0
@@ -3,7 +3,7 @@
3
3
  """
4
4
  API REST FactPulse
5
5
 
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\" }' ``` **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/
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
7
 
8
8
  The version of the OpenAPI document: 1.0.0
9
9
  Generated by OpenAPI Generator (https://openapi-generator.tech)
@@ -16,7 +16,9 @@ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
16
16
  from typing import Any, Dict, List, Optional, Tuple, Union
17
17
  from typing_extensions import Annotated
18
18
 
19
- from typing import Any
19
+ from pydantic import StrictBool, StrictStr
20
+ from typing import Any, Optional
21
+ from factpulse.models.facture_entrante import FactureEntrante
20
22
 
21
23
  from factpulse.api_client import ApiClient, RequestSerialized
22
24
  from factpulse.api_response import ApiResponse
@@ -36,6 +38,554 @@ class AFNORPDPPAApi:
36
38
  self.api_client = api_client
37
39
 
38
40
 
41
+ @validate_call
42
+ def get_afnor_credentials_api_v1_afnor_credentials_get(
43
+ self,
44
+ _request_timeout: Union[
45
+ None,
46
+ Annotated[StrictFloat, Field(gt=0)],
47
+ Tuple[
48
+ Annotated[StrictFloat, Field(gt=0)],
49
+ Annotated[StrictFloat, Field(gt=0)]
50
+ ]
51
+ ] = None,
52
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
53
+ _content_type: Optional[StrictStr] = None,
54
+ _headers: Optional[Dict[StrictStr, Any]] = None,
55
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
56
+ ) -> object:
57
+ """Récupérer les credentials AFNOR stockés
58
+
59
+ 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.
60
+
61
+ :param _request_timeout: timeout setting for this request. If one
62
+ number provided, it will be total request
63
+ timeout. It can also be a pair (tuple) of
64
+ (connection, read) timeouts.
65
+ :type _request_timeout: int, tuple(int, int), optional
66
+ :param _request_auth: set to override the auth_settings for an a single
67
+ request; this effectively ignores the
68
+ authentication in the spec for a single request.
69
+ :type _request_auth: dict, optional
70
+ :param _content_type: force content-type for the request.
71
+ :type _content_type: str, Optional
72
+ :param _headers: set to override the headers for a single
73
+ request; this effectively ignores the headers
74
+ in the spec for a single request.
75
+ :type _headers: dict, optional
76
+ :param _host_index: set to override the host_index for a single
77
+ request; this effectively ignores the host_index
78
+ in the spec for a single request.
79
+ :type _host_index: int, optional
80
+ :return: Returns the result object.
81
+ """ # noqa: E501
82
+
83
+ _param = self._get_afnor_credentials_api_v1_afnor_credentials_get_serialize(
84
+ _request_auth=_request_auth,
85
+ _content_type=_content_type,
86
+ _headers=_headers,
87
+ _host_index=_host_index
88
+ )
89
+
90
+ _response_types_map: Dict[str, Optional[str]] = {
91
+ '200': "object",
92
+ '400': None,
93
+ '401': None,
94
+ '404': None,
95
+ }
96
+ response_data = self.api_client.call_api(
97
+ *_param,
98
+ _request_timeout=_request_timeout
99
+ )
100
+ response_data.read()
101
+ return self.api_client.response_deserialize(
102
+ response_data=response_data,
103
+ response_types_map=_response_types_map,
104
+ ).data
105
+
106
+
107
+ @validate_call
108
+ def get_afnor_credentials_api_v1_afnor_credentials_get_with_http_info(
109
+ self,
110
+ _request_timeout: Union[
111
+ None,
112
+ Annotated[StrictFloat, Field(gt=0)],
113
+ Tuple[
114
+ Annotated[StrictFloat, Field(gt=0)],
115
+ Annotated[StrictFloat, Field(gt=0)]
116
+ ]
117
+ ] = None,
118
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
119
+ _content_type: Optional[StrictStr] = None,
120
+ _headers: Optional[Dict[StrictStr, Any]] = None,
121
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
122
+ ) -> ApiResponse[object]:
123
+ """Récupérer les credentials AFNOR stockés
124
+
125
+ 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.
126
+
127
+ :param _request_timeout: timeout setting for this request. If one
128
+ number provided, it will be total request
129
+ timeout. It can also be a pair (tuple) of
130
+ (connection, read) timeouts.
131
+ :type _request_timeout: int, tuple(int, int), optional
132
+ :param _request_auth: set to override the auth_settings for an a single
133
+ request; this effectively ignores the
134
+ authentication in the spec for a single request.
135
+ :type _request_auth: dict, optional
136
+ :param _content_type: force content-type for the request.
137
+ :type _content_type: str, Optional
138
+ :param _headers: set to override the headers for a single
139
+ request; this effectively ignores the headers
140
+ in the spec for a single request.
141
+ :type _headers: dict, optional
142
+ :param _host_index: set to override the host_index for a single
143
+ request; this effectively ignores the host_index
144
+ in the spec for a single request.
145
+ :type _host_index: int, optional
146
+ :return: Returns the result object.
147
+ """ # noqa: E501
148
+
149
+ _param = self._get_afnor_credentials_api_v1_afnor_credentials_get_serialize(
150
+ _request_auth=_request_auth,
151
+ _content_type=_content_type,
152
+ _headers=_headers,
153
+ _host_index=_host_index
154
+ )
155
+
156
+ _response_types_map: Dict[str, Optional[str]] = {
157
+ '200': "object",
158
+ '400': None,
159
+ '401': None,
160
+ '404': None,
161
+ }
162
+ response_data = self.api_client.call_api(
163
+ *_param,
164
+ _request_timeout=_request_timeout
165
+ )
166
+ response_data.read()
167
+ return self.api_client.response_deserialize(
168
+ response_data=response_data,
169
+ response_types_map=_response_types_map,
170
+ )
171
+
172
+
173
+ @validate_call
174
+ def get_afnor_credentials_api_v1_afnor_credentials_get_without_preload_content(
175
+ self,
176
+ _request_timeout: Union[
177
+ None,
178
+ Annotated[StrictFloat, Field(gt=0)],
179
+ Tuple[
180
+ Annotated[StrictFloat, Field(gt=0)],
181
+ Annotated[StrictFloat, Field(gt=0)]
182
+ ]
183
+ ] = None,
184
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
185
+ _content_type: Optional[StrictStr] = None,
186
+ _headers: Optional[Dict[StrictStr, Any]] = None,
187
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
188
+ ) -> RESTResponseType:
189
+ """Récupérer les credentials AFNOR stockés
190
+
191
+ 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.
192
+
193
+ :param _request_timeout: timeout setting for this request. If one
194
+ number provided, it will be total request
195
+ timeout. It can also be a pair (tuple) of
196
+ (connection, read) timeouts.
197
+ :type _request_timeout: int, tuple(int, int), optional
198
+ :param _request_auth: set to override the auth_settings for an a single
199
+ request; this effectively ignores the
200
+ authentication in the spec for a single request.
201
+ :type _request_auth: dict, optional
202
+ :param _content_type: force content-type for the request.
203
+ :type _content_type: str, Optional
204
+ :param _headers: set to override the headers for a single
205
+ request; this effectively ignores the headers
206
+ in the spec for a single request.
207
+ :type _headers: dict, optional
208
+ :param _host_index: set to override the host_index for a single
209
+ request; this effectively ignores the host_index
210
+ in the spec for a single request.
211
+ :type _host_index: int, optional
212
+ :return: Returns the result object.
213
+ """ # noqa: E501
214
+
215
+ _param = self._get_afnor_credentials_api_v1_afnor_credentials_get_serialize(
216
+ _request_auth=_request_auth,
217
+ _content_type=_content_type,
218
+ _headers=_headers,
219
+ _host_index=_host_index
220
+ )
221
+
222
+ _response_types_map: Dict[str, Optional[str]] = {
223
+ '200': "object",
224
+ '400': None,
225
+ '401': None,
226
+ '404': None,
227
+ }
228
+ response_data = self.api_client.call_api(
229
+ *_param,
230
+ _request_timeout=_request_timeout
231
+ )
232
+ return response_data.response
233
+
234
+
235
+ def _get_afnor_credentials_api_v1_afnor_credentials_get_serialize(
236
+ self,
237
+ _request_auth,
238
+ _content_type,
239
+ _headers,
240
+ _host_index,
241
+ ) -> RequestSerialized:
242
+
243
+ _host = None
244
+
245
+ _collection_formats: Dict[str, str] = {
246
+ }
247
+
248
+ _path_params: Dict[str, str] = {}
249
+ _query_params: List[Tuple[str, str]] = []
250
+ _header_params: Dict[str, Optional[str]] = _headers or {}
251
+ _form_params: List[Tuple[str, str]] = []
252
+ _files: Dict[
253
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
254
+ ] = {}
255
+ _body_params: Optional[bytes] = None
256
+
257
+ # process the path parameters
258
+ # process the query parameters
259
+ # process the header parameters
260
+ # process the form parameters
261
+ # process the body parameter
262
+
263
+
264
+ # set the HTTP header `Accept`
265
+ if 'Accept' not in _header_params:
266
+ _header_params['Accept'] = self.api_client.select_header_accept(
267
+ [
268
+ 'application/json'
269
+ ]
270
+ )
271
+
272
+
273
+ # authentication setting
274
+ _auth_settings: List[str] = [
275
+ 'HTTPBearer'
276
+ ]
277
+
278
+ return self.api_client.param_serialize(
279
+ method='GET',
280
+ resource_path='/api/v1/afnor/credentials',
281
+ path_params=_path_params,
282
+ query_params=_query_params,
283
+ header_params=_header_params,
284
+ body=_body_params,
285
+ post_params=_form_params,
286
+ files=_files,
287
+ auth_settings=_auth_settings,
288
+ collection_formats=_collection_formats,
289
+ _host=_host,
290
+ _request_auth=_request_auth
291
+ )
292
+
293
+
294
+
295
+
296
+ @validate_call
297
+ def get_flux_entrant_api_v1_afnor_flux_entrants_flow_id_get(
298
+ self,
299
+ flow_id: StrictStr,
300
+ include_document: Optional[StrictBool] = None,
301
+ _request_timeout: Union[
302
+ None,
303
+ Annotated[StrictFloat, Field(gt=0)],
304
+ Tuple[
305
+ Annotated[StrictFloat, Field(gt=0)],
306
+ Annotated[StrictFloat, Field(gt=0)]
307
+ ]
308
+ ] = None,
309
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
310
+ _content_type: Optional[StrictStr] = None,
311
+ _headers: Optional[Dict[StrictStr, Any]] = None,
312
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
313
+ ) -> FactureEntrante:
314
+ """Récupérer et extraire une facture entrante
315
+
316
+ 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.
317
+
318
+ :param flow_id: (required)
319
+ :type flow_id: str
320
+ :param include_document:
321
+ :type include_document: bool
322
+ :param _request_timeout: timeout setting for this request. If one
323
+ number provided, it will be total request
324
+ timeout. It can also be a pair (tuple) of
325
+ (connection, read) timeouts.
326
+ :type _request_timeout: int, tuple(int, int), optional
327
+ :param _request_auth: set to override the auth_settings for an a single
328
+ request; this effectively ignores the
329
+ authentication in the spec for a single request.
330
+ :type _request_auth: dict, optional
331
+ :param _content_type: force content-type for the request.
332
+ :type _content_type: str, Optional
333
+ :param _headers: set to override the headers for a single
334
+ request; this effectively ignores the headers
335
+ in the spec for a single request.
336
+ :type _headers: dict, optional
337
+ :param _host_index: set to override the host_index for a single
338
+ request; this effectively ignores the host_index
339
+ in the spec for a single request.
340
+ :type _host_index: int, optional
341
+ :return: Returns the result object.
342
+ """ # noqa: E501
343
+
344
+ _param = self._get_flux_entrant_api_v1_afnor_flux_entrants_flow_id_get_serialize(
345
+ flow_id=flow_id,
346
+ include_document=include_document,
347
+ _request_auth=_request_auth,
348
+ _content_type=_content_type,
349
+ _headers=_headers,
350
+ _host_index=_host_index
351
+ )
352
+
353
+ _response_types_map: Dict[str, Optional[str]] = {
354
+ '200': "FactureEntrante",
355
+ '400': None,
356
+ '401': None,
357
+ '404': None,
358
+ '503': None,
359
+ '422': "HTTPValidationError",
360
+ }
361
+ response_data = self.api_client.call_api(
362
+ *_param,
363
+ _request_timeout=_request_timeout
364
+ )
365
+ response_data.read()
366
+ return self.api_client.response_deserialize(
367
+ response_data=response_data,
368
+ response_types_map=_response_types_map,
369
+ ).data
370
+
371
+
372
+ @validate_call
373
+ def get_flux_entrant_api_v1_afnor_flux_entrants_flow_id_get_with_http_info(
374
+ self,
375
+ flow_id: StrictStr,
376
+ include_document: Optional[StrictBool] = None,
377
+ _request_timeout: Union[
378
+ None,
379
+ Annotated[StrictFloat, Field(gt=0)],
380
+ Tuple[
381
+ Annotated[StrictFloat, Field(gt=0)],
382
+ Annotated[StrictFloat, Field(gt=0)]
383
+ ]
384
+ ] = None,
385
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
386
+ _content_type: Optional[StrictStr] = None,
387
+ _headers: Optional[Dict[StrictStr, Any]] = None,
388
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
389
+ ) -> ApiResponse[FactureEntrante]:
390
+ """Récupérer et extraire une facture entrante
391
+
392
+ 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.
393
+
394
+ :param flow_id: (required)
395
+ :type flow_id: str
396
+ :param include_document:
397
+ :type include_document: bool
398
+ :param _request_timeout: timeout setting for this request. If one
399
+ number provided, it will be total request
400
+ timeout. It can also be a pair (tuple) of
401
+ (connection, read) timeouts.
402
+ :type _request_timeout: int, tuple(int, int), optional
403
+ :param _request_auth: set to override the auth_settings for an a single
404
+ request; this effectively ignores the
405
+ authentication in the spec for a single request.
406
+ :type _request_auth: dict, optional
407
+ :param _content_type: force content-type for the request.
408
+ :type _content_type: str, Optional
409
+ :param _headers: set to override the headers for a single
410
+ request; this effectively ignores the headers
411
+ in the spec for a single request.
412
+ :type _headers: dict, optional
413
+ :param _host_index: set to override the host_index for a single
414
+ request; this effectively ignores the host_index
415
+ in the spec for a single request.
416
+ :type _host_index: int, optional
417
+ :return: Returns the result object.
418
+ """ # noqa: E501
419
+
420
+ _param = self._get_flux_entrant_api_v1_afnor_flux_entrants_flow_id_get_serialize(
421
+ flow_id=flow_id,
422
+ include_document=include_document,
423
+ _request_auth=_request_auth,
424
+ _content_type=_content_type,
425
+ _headers=_headers,
426
+ _host_index=_host_index
427
+ )
428
+
429
+ _response_types_map: Dict[str, Optional[str]] = {
430
+ '200': "FactureEntrante",
431
+ '400': None,
432
+ '401': None,
433
+ '404': None,
434
+ '503': None,
435
+ '422': "HTTPValidationError",
436
+ }
437
+ response_data = self.api_client.call_api(
438
+ *_param,
439
+ _request_timeout=_request_timeout
440
+ )
441
+ response_data.read()
442
+ return self.api_client.response_deserialize(
443
+ response_data=response_data,
444
+ response_types_map=_response_types_map,
445
+ )
446
+
447
+
448
+ @validate_call
449
+ def get_flux_entrant_api_v1_afnor_flux_entrants_flow_id_get_without_preload_content(
450
+ self,
451
+ flow_id: StrictStr,
452
+ include_document: Optional[StrictBool] = None,
453
+ _request_timeout: Union[
454
+ None,
455
+ Annotated[StrictFloat, Field(gt=0)],
456
+ Tuple[
457
+ Annotated[StrictFloat, Field(gt=0)],
458
+ Annotated[StrictFloat, Field(gt=0)]
459
+ ]
460
+ ] = None,
461
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
462
+ _content_type: Optional[StrictStr] = None,
463
+ _headers: Optional[Dict[StrictStr, Any]] = None,
464
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
465
+ ) -> RESTResponseType:
466
+ """Récupérer et extraire une facture entrante
467
+
468
+ 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.
469
+
470
+ :param flow_id: (required)
471
+ :type flow_id: str
472
+ :param include_document:
473
+ :type include_document: bool
474
+ :param _request_timeout: timeout setting for this request. If one
475
+ number provided, it will be total request
476
+ timeout. It can also be a pair (tuple) of
477
+ (connection, read) timeouts.
478
+ :type _request_timeout: int, tuple(int, int), optional
479
+ :param _request_auth: set to override the auth_settings for an a single
480
+ request; this effectively ignores the
481
+ authentication in the spec for a single request.
482
+ :type _request_auth: dict, optional
483
+ :param _content_type: force content-type for the request.
484
+ :type _content_type: str, Optional
485
+ :param _headers: set to override the headers for a single
486
+ request; this effectively ignores the headers
487
+ in the spec for a single request.
488
+ :type _headers: dict, optional
489
+ :param _host_index: set to override the host_index for a single
490
+ request; this effectively ignores the host_index
491
+ in the spec for a single request.
492
+ :type _host_index: int, optional
493
+ :return: Returns the result object.
494
+ """ # noqa: E501
495
+
496
+ _param = self._get_flux_entrant_api_v1_afnor_flux_entrants_flow_id_get_serialize(
497
+ flow_id=flow_id,
498
+ include_document=include_document,
499
+ _request_auth=_request_auth,
500
+ _content_type=_content_type,
501
+ _headers=_headers,
502
+ _host_index=_host_index
503
+ )
504
+
505
+ _response_types_map: Dict[str, Optional[str]] = {
506
+ '200': "FactureEntrante",
507
+ '400': None,
508
+ '401': None,
509
+ '404': None,
510
+ '503': None,
511
+ '422': "HTTPValidationError",
512
+ }
513
+ response_data = self.api_client.call_api(
514
+ *_param,
515
+ _request_timeout=_request_timeout
516
+ )
517
+ return response_data.response
518
+
519
+
520
+ def _get_flux_entrant_api_v1_afnor_flux_entrants_flow_id_get_serialize(
521
+ self,
522
+ flow_id,
523
+ include_document,
524
+ _request_auth,
525
+ _content_type,
526
+ _headers,
527
+ _host_index,
528
+ ) -> RequestSerialized:
529
+
530
+ _host = None
531
+
532
+ _collection_formats: Dict[str, str] = {
533
+ }
534
+
535
+ _path_params: Dict[str, str] = {}
536
+ _query_params: List[Tuple[str, str]] = []
537
+ _header_params: Dict[str, Optional[str]] = _headers or {}
538
+ _form_params: List[Tuple[str, str]] = []
539
+ _files: Dict[
540
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
541
+ ] = {}
542
+ _body_params: Optional[bytes] = None
543
+
544
+ # process the path parameters
545
+ if flow_id is not None:
546
+ _path_params['flow_id'] = flow_id
547
+ # process the query parameters
548
+ if include_document is not None:
549
+
550
+ _query_params.append(('include_document', include_document))
551
+
552
+ # process the header parameters
553
+ # process the form parameters
554
+ # process the body parameter
555
+
556
+
557
+ # set the HTTP header `Accept`
558
+ if 'Accept' not in _header_params:
559
+ _header_params['Accept'] = self.api_client.select_header_accept(
560
+ [
561
+ 'application/json'
562
+ ]
563
+ )
564
+
565
+
566
+ # authentication setting
567
+ _auth_settings: List[str] = [
568
+ 'HTTPBearer'
569
+ ]
570
+
571
+ return self.api_client.param_serialize(
572
+ method='GET',
573
+ resource_path='/api/v1/afnor/flux-entrants/{flow_id}',
574
+ path_params=_path_params,
575
+ query_params=_query_params,
576
+ header_params=_header_params,
577
+ body=_body_params,
578
+ post_params=_form_params,
579
+ files=_files,
580
+ auth_settings=_auth_settings,
581
+ collection_formats=_collection_formats,
582
+ _host=_host,
583
+ _request_auth=_request_auth
584
+ )
585
+
586
+
587
+
588
+
39
589
  @validate_call
40
590
  def oauth_token_proxy_api_v1_afnor_oauth_token_post(
41
591
  self,