factpulse 1.0.3__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 (131) hide show
  1. factpulse/__init__.py +280 -0
  2. factpulse/api/__init__.py +13 -0
  3. factpulse/api/afnorpdppa_api.py +284 -0
  4. factpulse/api/afnorpdppa_directory_service_api.py +799 -0
  5. factpulse/api/afnorpdppa_flow_service_api.py +1075 -0
  6. factpulse/api/chorus_pro_api.py +4506 -0
  7. factpulse/api/processing_endpoints_unifis_api.py +592 -0
  8. factpulse/api/sant_api.py +281 -0
  9. factpulse/api/signature_lectronique_api.py +1358 -0
  10. factpulse/api/traitement_facture_api.py +3439 -0
  11. factpulse/api/utilisateur_api.py +282 -0
  12. factpulse/api_client.py +804 -0
  13. factpulse/api_response.py +21 -0
  14. factpulse/configuration.py +585 -0
  15. factpulse/exceptions.py +216 -0
  16. factpulse/models/__init__.py +124 -0
  17. factpulse/models/adresse_electronique.py +90 -0
  18. factpulse/models/adresse_postale.py +120 -0
  19. factpulse/models/body_ajouter_fichier_api_v1_chorus_pro_transverses_ajouter_fichier_post.py +104 -0
  20. factpulse/models/body_completer_facture_api_v1_chorus_pro_factures_completer_post.py +104 -0
  21. factpulse/models/body_lister_services_structure_api_v1_chorus_pro_structures_id_structure_cpp_services_get.py +102 -0
  22. factpulse/models/body_rechercher_factures_destinataire_api_v1_chorus_pro_factures_rechercher_destinataire_post.py +104 -0
  23. factpulse/models/body_rechercher_factures_fournisseur_api_v1_chorus_pro_factures_rechercher_fournisseur_post.py +104 -0
  24. factpulse/models/body_recycler_facture_api_v1_chorus_pro_factures_recycler_post.py +104 -0
  25. factpulse/models/body_telecharger_groupe_factures_api_v1_chorus_pro_factures_telecharger_groupe_post.py +104 -0
  26. factpulse/models/body_traiter_facture_recue_api_v1_chorus_pro_factures_traiter_facture_recue_post.py +104 -0
  27. factpulse/models/body_valideur_consulter_facture_api_v1_chorus_pro_factures_valideur_consulter_post.py +104 -0
  28. factpulse/models/body_valideur_rechercher_factures_api_v1_chorus_pro_factures_valideur_rechercher_post.py +104 -0
  29. factpulse/models/body_valideur_traiter_facture_api_v1_chorus_pro_factures_valideur_traiter_post.py +104 -0
  30. factpulse/models/cadre_de_facturation.py +102 -0
  31. factpulse/models/categorie_tva.py +44 -0
  32. factpulse/models/certificate_info_response.py +114 -0
  33. factpulse/models/chorus_pro_credentials.py +95 -0
  34. factpulse/models/code_cadre_facturation.py +39 -0
  35. factpulse/models/code_raison_reduction.py +42 -0
  36. factpulse/models/consulter_facture_request.py +98 -0
  37. factpulse/models/consulter_facture_response.py +142 -0
  38. factpulse/models/consulter_structure_request.py +100 -0
  39. factpulse/models/consulter_structure_response.py +142 -0
  40. factpulse/models/credentials_afnor.py +106 -0
  41. factpulse/models/credentials_chorus_pro.py +115 -0
  42. factpulse/models/destinataire.py +116 -0
  43. factpulse/models/destination.py +140 -0
  44. factpulse/models/destination_afnor.py +127 -0
  45. factpulse/models/destination_chorus_pro.py +108 -0
  46. factpulse/models/direction_flux.py +37 -0
  47. factpulse/models/donnees_facture_simplifiees.py +124 -0
  48. factpulse/models/facture_enrichie_info_input.py +123 -0
  49. factpulse/models/facture_enrichie_info_output.py +133 -0
  50. factpulse/models/facture_factur_x.py +173 -0
  51. factpulse/models/flux_resume.py +131 -0
  52. factpulse/models/format_sortie.py +37 -0
  53. factpulse/models/fournisseur.py +146 -0
  54. factpulse/models/generate_certificate_request.py +118 -0
  55. factpulse/models/generate_certificate_response.py +106 -0
  56. factpulse/models/http_validation_error.py +95 -0
  57. factpulse/models/information_signature_api.py +122 -0
  58. factpulse/models/ligne_de_poste.py +188 -0
  59. factpulse/models/ligne_de_poste_montant_remise_ht.py +145 -0
  60. factpulse/models/ligne_de_poste_montant_total_ligne_ht.py +145 -0
  61. factpulse/models/ligne_de_poste_taux_tva_manuel.py +145 -0
  62. factpulse/models/ligne_de_tva.py +118 -0
  63. factpulse/models/mode_depot.py +38 -0
  64. factpulse/models/mode_paiement.py +41 -0
  65. factpulse/models/montant_ht_total.py +139 -0
  66. factpulse/models/montant_total.py +138 -0
  67. factpulse/models/montant_total_acompte.py +145 -0
  68. factpulse/models/montant_total_montant_remise_globale_ttc.py +145 -0
  69. factpulse/models/montant_ttc_total.py +139 -0
  70. factpulse/models/montant_tva.py +139 -0
  71. factpulse/models/montantapayer.py +139 -0
  72. factpulse/models/montantbaseht.py +139 -0
  73. factpulse/models/montanthttotal.py +139 -0
  74. factpulse/models/montantttctotal.py +139 -0
  75. factpulse/models/montanttva.py +139 -0
  76. factpulse/models/montanttva1.py +139 -0
  77. factpulse/models/montantunitaireht.py +139 -0
  78. factpulse/models/obtenir_id_chorus_pro_request.py +100 -0
  79. factpulse/models/obtenir_id_chorus_pro_response.py +98 -0
  80. factpulse/models/options_processing.py +103 -0
  81. factpulse/models/parametres_signature.py +133 -0
  82. factpulse/models/parametres_structure.py +91 -0
  83. factpulse/models/pdf_factur_x_info.py +91 -0
  84. factpulse/models/pdp_credentials.py +93 -0
  85. factpulse/models/piece_jointe_complementaire.py +95 -0
  86. factpulse/models/profil_api.py +39 -0
  87. factpulse/models/profil_flux.py +38 -0
  88. factpulse/models/quantite.py +139 -0
  89. factpulse/models/quota_info.py +95 -0
  90. factpulse/models/rechercher_services_response.py +101 -0
  91. factpulse/models/rechercher_structure_request.py +119 -0
  92. factpulse/models/rechercher_structure_response.py +101 -0
  93. factpulse/models/references.py +124 -0
  94. factpulse/models/reponse_healthcheck_afnor.py +91 -0
  95. factpulse/models/reponse_recherche_flux.py +101 -0
  96. factpulse/models/reponse_soumission_flux.py +109 -0
  97. factpulse/models/reponse_tache.py +87 -0
  98. factpulse/models/reponse_validation_erreur.py +87 -0
  99. factpulse/models/reponse_validation_succes.py +87 -0
  100. factpulse/models/requete_recherche_flux.py +143 -0
  101. factpulse/models/requete_soumission_flux.py +123 -0
  102. factpulse/models/resultat_afnor.py +105 -0
  103. factpulse/models/resultat_chorus_pro.py +101 -0
  104. factpulse/models/resultat_validation_pdfapi.py +169 -0
  105. factpulse/models/scheme_id.py +40 -0
  106. factpulse/models/service_structure.py +93 -0
  107. factpulse/models/signature_info.py +101 -0
  108. factpulse/models/soumettre_facture_complete_request.py +116 -0
  109. factpulse/models/soumettre_facture_complete_response.py +145 -0
  110. factpulse/models/soumettre_facture_request.py +164 -0
  111. factpulse/models/soumettre_facture_response.py +103 -0
  112. factpulse/models/statut_acquittement.py +38 -0
  113. factpulse/models/statut_facture.py +96 -0
  114. factpulse/models/statut_tache.py +99 -0
  115. factpulse/models/structure_info.py +95 -0
  116. factpulse/models/syntaxe_flux.py +40 -0
  117. factpulse/models/tauxmanuel.py +139 -0
  118. factpulse/models/type_facture.py +37 -0
  119. factpulse/models/type_flux.py +40 -0
  120. factpulse/models/type_tva.py +39 -0
  121. factpulse/models/unite.py +41 -0
  122. factpulse/models/utilisateur.py +128 -0
  123. factpulse/models/validation_error.py +99 -0
  124. factpulse/models/validation_error_loc_inner.py +138 -0
  125. factpulse/py.typed +0 -0
  126. factpulse/rest.py +258 -0
  127. factpulse-1.0.3.dist-info/METADATA +164 -0
  128. factpulse-1.0.3.dist-info/RECORD +131 -0
  129. factpulse-1.0.3.dist-info/WHEEL +5 -0
  130. factpulse-1.0.3.dist-info/licenses/LICENSE +21 -0
  131. factpulse-1.0.3.dist-info/top_level.txt +1 -0
factpulse/__init__.py ADDED
@@ -0,0 +1,280 @@
1
+ # coding: utf-8
2
+
3
+ # flake8: noqa
4
+
5
+ """
6
+ API REST FactPulse
7
+
8
+ 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/
9
+
10
+ The version of the OpenAPI document: 1.0.0
11
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
12
+
13
+ Do not edit the class manually.
14
+ """ # noqa: E501
15
+
16
+
17
+ __version__ = "1.0.3"
18
+
19
+ # Define package exports
20
+ __all__ = [
21
+ "AFNORPDPPAApi",
22
+ "AFNORPDPPADirectoryServiceApi",
23
+ "AFNORPDPPAFlowServiceApi",
24
+ "ChorusProApi",
25
+ "ProcessingEndpointsUnifisApi",
26
+ "SantApi",
27
+ "SignatureLectroniqueApi",
28
+ "TraitementFactureApi",
29
+ "UtilisateurApi",
30
+ "ApiResponse",
31
+ "ApiClient",
32
+ "Configuration",
33
+ "OpenApiException",
34
+ "ApiTypeError",
35
+ "ApiValueError",
36
+ "ApiKeyError",
37
+ "ApiAttributeError",
38
+ "ApiException",
39
+ "AdresseElectronique",
40
+ "AdressePostale",
41
+ "BodyAjouterFichierApiV1ChorusProTransversesAjouterFichierPost",
42
+ "BodyCompleterFactureApiV1ChorusProFacturesCompleterPost",
43
+ "BodyListerServicesStructureApiV1ChorusProStructuresIdStructureCppServicesGet",
44
+ "BodyRechercherFacturesDestinataireApiV1ChorusProFacturesRechercherDestinatairePost",
45
+ "BodyRechercherFacturesFournisseurApiV1ChorusProFacturesRechercherFournisseurPost",
46
+ "BodyRecyclerFactureApiV1ChorusProFacturesRecyclerPost",
47
+ "BodyTelechargerGroupeFacturesApiV1ChorusProFacturesTelechargerGroupePost",
48
+ "BodyTraiterFactureRecueApiV1ChorusProFacturesTraiterFactureRecuePost",
49
+ "BodyValideurConsulterFactureApiV1ChorusProFacturesValideurConsulterPost",
50
+ "BodyValideurRechercherFacturesApiV1ChorusProFacturesValideurRechercherPost",
51
+ "BodyValideurTraiterFactureApiV1ChorusProFacturesValideurTraiterPost",
52
+ "CadreDeFacturation",
53
+ "CategorieTVA",
54
+ "CertificateInfoResponse",
55
+ "ChorusProCredentials",
56
+ "CodeCadreFacturation",
57
+ "CodeRaisonReduction",
58
+ "ConsulterFactureRequest",
59
+ "ConsulterFactureResponse",
60
+ "ConsulterStructureRequest",
61
+ "ConsulterStructureResponse",
62
+ "CredentialsAFNOR",
63
+ "CredentialsChorusPro",
64
+ "Destinataire",
65
+ "Destination",
66
+ "DestinationAFNOR",
67
+ "DestinationChorusPro",
68
+ "DirectionFlux",
69
+ "DonneesFactureSimplifiees",
70
+ "FactureEnrichieInfoInput",
71
+ "FactureEnrichieInfoOutput",
72
+ "FactureFacturX",
73
+ "FluxResume",
74
+ "FormatSortie",
75
+ "Fournisseur",
76
+ "GenerateCertificateRequest",
77
+ "GenerateCertificateResponse",
78
+ "HTTPValidationError",
79
+ "InformationSignatureAPI",
80
+ "LigneDePoste",
81
+ "LigneDePosteMontantRemiseHt",
82
+ "LigneDePosteMontantTotalLigneHt",
83
+ "LigneDePosteTauxTvaManuel",
84
+ "LigneDeTVA",
85
+ "ModeDepot",
86
+ "ModePaiement",
87
+ "MontantHtTotal",
88
+ "MontantTotal",
89
+ "MontantTotalAcompte",
90
+ "MontantTotalMontantRemiseGlobaleTtc",
91
+ "MontantTtcTotal",
92
+ "MontantTva",
93
+ "Montantapayer",
94
+ "Montantbaseht",
95
+ "Montanthttotal",
96
+ "Montantttctotal",
97
+ "Montanttva",
98
+ "Montanttva1",
99
+ "Montantunitaireht",
100
+ "ObtenirIdChorusProRequest",
101
+ "ObtenirIdChorusProResponse",
102
+ "OptionsProcessing",
103
+ "PDFFacturXInfo",
104
+ "PDPCredentials",
105
+ "ParametresSignature",
106
+ "ParametresStructure",
107
+ "PieceJointeComplementaire",
108
+ "ProfilAPI",
109
+ "ProfilFlux",
110
+ "Quantite",
111
+ "QuotaInfo",
112
+ "RechercherServicesResponse",
113
+ "RechercherStructureRequest",
114
+ "RechercherStructureResponse",
115
+ "References",
116
+ "ReponseHealthcheckAFNOR",
117
+ "ReponseRechercheFlux",
118
+ "ReponseSoumissionFlux",
119
+ "ReponseTache",
120
+ "ReponseValidationErreur",
121
+ "ReponseValidationSucces",
122
+ "RequeteRechercheFlux",
123
+ "RequeteSoumissionFlux",
124
+ "ResultatAFNOR",
125
+ "ResultatChorusPro",
126
+ "ResultatValidationPDFAPI",
127
+ "SchemeID",
128
+ "ServiceStructure",
129
+ "SignatureInfo",
130
+ "SoumettreFactureCompleteRequest",
131
+ "SoumettreFactureCompleteResponse",
132
+ "SoumettreFactureRequest",
133
+ "SoumettreFactureResponse",
134
+ "StatutAcquittement",
135
+ "StatutFacture",
136
+ "StatutTache",
137
+ "StructureInfo",
138
+ "SyntaxeFlux",
139
+ "Tauxmanuel",
140
+ "TypeFacture",
141
+ "TypeFlux",
142
+ "TypeTVA",
143
+ "Unite",
144
+ "Utilisateur",
145
+ "ValidationError",
146
+ "ValidationErrorLocInner",
147
+ ]
148
+
149
+ # import apis into sdk package
150
+ from factpulse.api.afnorpdppa_api import AFNORPDPPAApi as AFNORPDPPAApi
151
+ from factpulse.api.afnorpdppa_directory_service_api import AFNORPDPPADirectoryServiceApi as AFNORPDPPADirectoryServiceApi
152
+ from factpulse.api.afnorpdppa_flow_service_api import AFNORPDPPAFlowServiceApi as AFNORPDPPAFlowServiceApi
153
+ from factpulse.api.chorus_pro_api import ChorusProApi as ChorusProApi
154
+ from factpulse.api.processing_endpoints_unifis_api import ProcessingEndpointsUnifisApi as ProcessingEndpointsUnifisApi
155
+ from factpulse.api.sant_api import SantApi as SantApi
156
+ from factpulse.api.signature_lectronique_api import SignatureLectroniqueApi as SignatureLectroniqueApi
157
+ from factpulse.api.traitement_facture_api import TraitementFactureApi as TraitementFactureApi
158
+ from factpulse.api.utilisateur_api import UtilisateurApi as UtilisateurApi
159
+
160
+ # import ApiClient
161
+ from factpulse.api_response import ApiResponse as ApiResponse
162
+ from factpulse.api_client import ApiClient as ApiClient
163
+ from factpulse.configuration import Configuration as Configuration
164
+ from factpulse.exceptions import OpenApiException as OpenApiException
165
+ from factpulse.exceptions import ApiTypeError as ApiTypeError
166
+ from factpulse.exceptions import ApiValueError as ApiValueError
167
+ from factpulse.exceptions import ApiKeyError as ApiKeyError
168
+ from factpulse.exceptions import ApiAttributeError as ApiAttributeError
169
+ from factpulse.exceptions import ApiException as ApiException
170
+
171
+ # import models into sdk package
172
+ from factpulse.models.adresse_electronique import AdresseElectronique as AdresseElectronique
173
+ from factpulse.models.adresse_postale import AdressePostale as AdressePostale
174
+ from factpulse.models.body_ajouter_fichier_api_v1_chorus_pro_transverses_ajouter_fichier_post import BodyAjouterFichierApiV1ChorusProTransversesAjouterFichierPost as BodyAjouterFichierApiV1ChorusProTransversesAjouterFichierPost
175
+ from factpulse.models.body_completer_facture_api_v1_chorus_pro_factures_completer_post import BodyCompleterFactureApiV1ChorusProFacturesCompleterPost as BodyCompleterFactureApiV1ChorusProFacturesCompleterPost
176
+ from factpulse.models.body_lister_services_structure_api_v1_chorus_pro_structures_id_structure_cpp_services_get import BodyListerServicesStructureApiV1ChorusProStructuresIdStructureCppServicesGet as BodyListerServicesStructureApiV1ChorusProStructuresIdStructureCppServicesGet
177
+ from factpulse.models.body_rechercher_factures_destinataire_api_v1_chorus_pro_factures_rechercher_destinataire_post import BodyRechercherFacturesDestinataireApiV1ChorusProFacturesRechercherDestinatairePost as BodyRechercherFacturesDestinataireApiV1ChorusProFacturesRechercherDestinatairePost
178
+ from factpulse.models.body_rechercher_factures_fournisseur_api_v1_chorus_pro_factures_rechercher_fournisseur_post import BodyRechercherFacturesFournisseurApiV1ChorusProFacturesRechercherFournisseurPost as BodyRechercherFacturesFournisseurApiV1ChorusProFacturesRechercherFournisseurPost
179
+ from factpulse.models.body_recycler_facture_api_v1_chorus_pro_factures_recycler_post import BodyRecyclerFactureApiV1ChorusProFacturesRecyclerPost as BodyRecyclerFactureApiV1ChorusProFacturesRecyclerPost
180
+ from factpulse.models.body_telecharger_groupe_factures_api_v1_chorus_pro_factures_telecharger_groupe_post import BodyTelechargerGroupeFacturesApiV1ChorusProFacturesTelechargerGroupePost as BodyTelechargerGroupeFacturesApiV1ChorusProFacturesTelechargerGroupePost
181
+ from factpulse.models.body_traiter_facture_recue_api_v1_chorus_pro_factures_traiter_facture_recue_post import BodyTraiterFactureRecueApiV1ChorusProFacturesTraiterFactureRecuePost as BodyTraiterFactureRecueApiV1ChorusProFacturesTraiterFactureRecuePost
182
+ from factpulse.models.body_valideur_consulter_facture_api_v1_chorus_pro_factures_valideur_consulter_post import BodyValideurConsulterFactureApiV1ChorusProFacturesValideurConsulterPost as BodyValideurConsulterFactureApiV1ChorusProFacturesValideurConsulterPost
183
+ from factpulse.models.body_valideur_rechercher_factures_api_v1_chorus_pro_factures_valideur_rechercher_post import BodyValideurRechercherFacturesApiV1ChorusProFacturesValideurRechercherPost as BodyValideurRechercherFacturesApiV1ChorusProFacturesValideurRechercherPost
184
+ from factpulse.models.body_valideur_traiter_facture_api_v1_chorus_pro_factures_valideur_traiter_post import BodyValideurTraiterFactureApiV1ChorusProFacturesValideurTraiterPost as BodyValideurTraiterFactureApiV1ChorusProFacturesValideurTraiterPost
185
+ from factpulse.models.cadre_de_facturation import CadreDeFacturation as CadreDeFacturation
186
+ from factpulse.models.categorie_tva import CategorieTVA as CategorieTVA
187
+ from factpulse.models.certificate_info_response import CertificateInfoResponse as CertificateInfoResponse
188
+ from factpulse.models.chorus_pro_credentials import ChorusProCredentials as ChorusProCredentials
189
+ from factpulse.models.code_cadre_facturation import CodeCadreFacturation as CodeCadreFacturation
190
+ from factpulse.models.code_raison_reduction import CodeRaisonReduction as CodeRaisonReduction
191
+ from factpulse.models.consulter_facture_request import ConsulterFactureRequest as ConsulterFactureRequest
192
+ from factpulse.models.consulter_facture_response import ConsulterFactureResponse as ConsulterFactureResponse
193
+ from factpulse.models.consulter_structure_request import ConsulterStructureRequest as ConsulterStructureRequest
194
+ from factpulse.models.consulter_structure_response import ConsulterStructureResponse as ConsulterStructureResponse
195
+ from factpulse.models.credentials_afnor import CredentialsAFNOR as CredentialsAFNOR
196
+ from factpulse.models.credentials_chorus_pro import CredentialsChorusPro as CredentialsChorusPro
197
+ from factpulse.models.destinataire import Destinataire as Destinataire
198
+ from factpulse.models.destination import Destination as Destination
199
+ from factpulse.models.destination_afnor import DestinationAFNOR as DestinationAFNOR
200
+ from factpulse.models.destination_chorus_pro import DestinationChorusPro as DestinationChorusPro
201
+ from factpulse.models.direction_flux import DirectionFlux as DirectionFlux
202
+ from factpulse.models.donnees_facture_simplifiees import DonneesFactureSimplifiees as DonneesFactureSimplifiees
203
+ from factpulse.models.facture_enrichie_info_input import FactureEnrichieInfoInput as FactureEnrichieInfoInput
204
+ from factpulse.models.facture_enrichie_info_output import FactureEnrichieInfoOutput as FactureEnrichieInfoOutput
205
+ from factpulse.models.facture_factur_x import FactureFacturX as FactureFacturX
206
+ from factpulse.models.flux_resume import FluxResume as FluxResume
207
+ from factpulse.models.format_sortie import FormatSortie as FormatSortie
208
+ from factpulse.models.fournisseur import Fournisseur as Fournisseur
209
+ from factpulse.models.generate_certificate_request import GenerateCertificateRequest as GenerateCertificateRequest
210
+ from factpulse.models.generate_certificate_response import GenerateCertificateResponse as GenerateCertificateResponse
211
+ from factpulse.models.http_validation_error import HTTPValidationError as HTTPValidationError
212
+ from factpulse.models.information_signature_api import InformationSignatureAPI as InformationSignatureAPI
213
+ from factpulse.models.ligne_de_poste import LigneDePoste as LigneDePoste
214
+ from factpulse.models.ligne_de_poste_montant_remise_ht import LigneDePosteMontantRemiseHt as LigneDePosteMontantRemiseHt
215
+ from factpulse.models.ligne_de_poste_montant_total_ligne_ht import LigneDePosteMontantTotalLigneHt as LigneDePosteMontantTotalLigneHt
216
+ from factpulse.models.ligne_de_poste_taux_tva_manuel import LigneDePosteTauxTvaManuel as LigneDePosteTauxTvaManuel
217
+ from factpulse.models.ligne_de_tva import LigneDeTVA as LigneDeTVA
218
+ from factpulse.models.mode_depot import ModeDepot as ModeDepot
219
+ from factpulse.models.mode_paiement import ModePaiement as ModePaiement
220
+ from factpulse.models.montant_ht_total import MontantHtTotal as MontantHtTotal
221
+ from factpulse.models.montant_total import MontantTotal as MontantTotal
222
+ from factpulse.models.montant_total_acompte import MontantTotalAcompte as MontantTotalAcompte
223
+ from factpulse.models.montant_total_montant_remise_globale_ttc import MontantTotalMontantRemiseGlobaleTtc as MontantTotalMontantRemiseGlobaleTtc
224
+ from factpulse.models.montant_ttc_total import MontantTtcTotal as MontantTtcTotal
225
+ from factpulse.models.montant_tva import MontantTva as MontantTva
226
+ from factpulse.models.montantapayer import Montantapayer as Montantapayer
227
+ from factpulse.models.montantbaseht import Montantbaseht as Montantbaseht
228
+ from factpulse.models.montanthttotal import Montanthttotal as Montanthttotal
229
+ from factpulse.models.montantttctotal import Montantttctotal as Montantttctotal
230
+ from factpulse.models.montanttva import Montanttva as Montanttva
231
+ from factpulse.models.montanttva1 import Montanttva1 as Montanttva1
232
+ from factpulse.models.montantunitaireht import Montantunitaireht as Montantunitaireht
233
+ from factpulse.models.obtenir_id_chorus_pro_request import ObtenirIdChorusProRequest as ObtenirIdChorusProRequest
234
+ from factpulse.models.obtenir_id_chorus_pro_response import ObtenirIdChorusProResponse as ObtenirIdChorusProResponse
235
+ from factpulse.models.options_processing import OptionsProcessing as OptionsProcessing
236
+ from factpulse.models.pdf_factur_x_info import PDFFacturXInfo as PDFFacturXInfo
237
+ from factpulse.models.pdp_credentials import PDPCredentials as PDPCredentials
238
+ from factpulse.models.parametres_signature import ParametresSignature as ParametresSignature
239
+ from factpulse.models.parametres_structure import ParametresStructure as ParametresStructure
240
+ from factpulse.models.piece_jointe_complementaire import PieceJointeComplementaire as PieceJointeComplementaire
241
+ from factpulse.models.profil_api import ProfilAPI as ProfilAPI
242
+ from factpulse.models.profil_flux import ProfilFlux as ProfilFlux
243
+ from factpulse.models.quantite import Quantite as Quantite
244
+ from factpulse.models.quota_info import QuotaInfo as QuotaInfo
245
+ from factpulse.models.rechercher_services_response import RechercherServicesResponse as RechercherServicesResponse
246
+ from factpulse.models.rechercher_structure_request import RechercherStructureRequest as RechercherStructureRequest
247
+ from factpulse.models.rechercher_structure_response import RechercherStructureResponse as RechercherStructureResponse
248
+ from factpulse.models.references import References as References
249
+ from factpulse.models.reponse_healthcheck_afnor import ReponseHealthcheckAFNOR as ReponseHealthcheckAFNOR
250
+ from factpulse.models.reponse_recherche_flux import ReponseRechercheFlux as ReponseRechercheFlux
251
+ from factpulse.models.reponse_soumission_flux import ReponseSoumissionFlux as ReponseSoumissionFlux
252
+ from factpulse.models.reponse_tache import ReponseTache as ReponseTache
253
+ from factpulse.models.reponse_validation_erreur import ReponseValidationErreur as ReponseValidationErreur
254
+ from factpulse.models.reponse_validation_succes import ReponseValidationSucces as ReponseValidationSucces
255
+ from factpulse.models.requete_recherche_flux import RequeteRechercheFlux as RequeteRechercheFlux
256
+ from factpulse.models.requete_soumission_flux import RequeteSoumissionFlux as RequeteSoumissionFlux
257
+ from factpulse.models.resultat_afnor import ResultatAFNOR as ResultatAFNOR
258
+ from factpulse.models.resultat_chorus_pro import ResultatChorusPro as ResultatChorusPro
259
+ from factpulse.models.resultat_validation_pdfapi import ResultatValidationPDFAPI as ResultatValidationPDFAPI
260
+ from factpulse.models.scheme_id import SchemeID as SchemeID
261
+ from factpulse.models.service_structure import ServiceStructure as ServiceStructure
262
+ from factpulse.models.signature_info import SignatureInfo as SignatureInfo
263
+ from factpulse.models.soumettre_facture_complete_request import SoumettreFactureCompleteRequest as SoumettreFactureCompleteRequest
264
+ from factpulse.models.soumettre_facture_complete_response import SoumettreFactureCompleteResponse as SoumettreFactureCompleteResponse
265
+ from factpulse.models.soumettre_facture_request import SoumettreFactureRequest as SoumettreFactureRequest
266
+ from factpulse.models.soumettre_facture_response import SoumettreFactureResponse as SoumettreFactureResponse
267
+ from factpulse.models.statut_acquittement import StatutAcquittement as StatutAcquittement
268
+ from factpulse.models.statut_facture import StatutFacture as StatutFacture
269
+ from factpulse.models.statut_tache import StatutTache as StatutTache
270
+ from factpulse.models.structure_info import StructureInfo as StructureInfo
271
+ from factpulse.models.syntaxe_flux import SyntaxeFlux as SyntaxeFlux
272
+ from factpulse.models.tauxmanuel import Tauxmanuel as Tauxmanuel
273
+ from factpulse.models.type_facture import TypeFacture as TypeFacture
274
+ from factpulse.models.type_flux import TypeFlux as TypeFlux
275
+ from factpulse.models.type_tva import TypeTVA as TypeTVA
276
+ from factpulse.models.unite import Unite as Unite
277
+ from factpulse.models.utilisateur import Utilisateur as Utilisateur
278
+ from factpulse.models.validation_error import ValidationError as ValidationError
279
+ from factpulse.models.validation_error_loc_inner import ValidationErrorLocInner as ValidationErrorLocInner
280
+
@@ -0,0 +1,13 @@
1
+ # flake8: noqa
2
+
3
+ # import apis into api package
4
+ from factpulse.api.afnorpdppa_api import AFNORPDPPAApi
5
+ from factpulse.api.afnorpdppa_directory_service_api import AFNORPDPPADirectoryServiceApi
6
+ from factpulse.api.afnorpdppa_flow_service_api import AFNORPDPPAFlowServiceApi
7
+ from factpulse.api.chorus_pro_api import ChorusProApi
8
+ from factpulse.api.processing_endpoints_unifis_api import ProcessingEndpointsUnifisApi
9
+ from factpulse.api.sant_api import SantApi
10
+ from factpulse.api.signature_lectronique_api import SignatureLectroniqueApi
11
+ from factpulse.api.traitement_facture_api import TraitementFactureApi
12
+ from factpulse.api.utilisateur_api import UtilisateurApi
13
+
@@ -0,0 +1,284 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ API REST FactPulse
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/
7
+
8
+ The version of the OpenAPI document: 1.0.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+ import warnings
15
+ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
16
+ from typing import Any, Dict, List, Optional, Tuple, Union
17
+ from typing_extensions import Annotated
18
+
19
+ from typing import Any
20
+
21
+ from factpulse.api_client import ApiClient, RequestSerialized
22
+ from factpulse.api_response import ApiResponse
23
+ from factpulse.rest import RESTResponseType
24
+
25
+
26
+ class AFNORPDPPAApi:
27
+ """NOTE: This class is auto generated by OpenAPI Generator
28
+ Ref: https://openapi-generator.tech
29
+
30
+ Do not edit the class manually.
31
+ """
32
+
33
+ def __init__(self, api_client=None) -> None:
34
+ if api_client is None:
35
+ api_client = ApiClient.get_default()
36
+ self.api_client = api_client
37
+
38
+
39
+ @validate_call
40
+ def oauth_token_proxy_api_v1_afnor_oauth_token_post(
41
+ self,
42
+ _request_timeout: Union[
43
+ None,
44
+ Annotated[StrictFloat, Field(gt=0)],
45
+ Tuple[
46
+ Annotated[StrictFloat, Field(gt=0)],
47
+ Annotated[StrictFloat, Field(gt=0)]
48
+ ]
49
+ ] = None,
50
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
51
+ _content_type: Optional[StrictStr] = None,
52
+ _headers: Optional[Dict[StrictStr, Any]] = None,
53
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
54
+ ) -> object:
55
+ """Endpoint OAuth2 pour authentification AFNOR
56
+
57
+ 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.
58
+
59
+ :param _request_timeout: timeout setting for this request. If one
60
+ number provided, it will be total request
61
+ timeout. It can also be a pair (tuple) of
62
+ (connection, read) timeouts.
63
+ :type _request_timeout: int, tuple(int, int), optional
64
+ :param _request_auth: set to override the auth_settings for an a single
65
+ request; this effectively ignores the
66
+ authentication in the spec for a single request.
67
+ :type _request_auth: dict, optional
68
+ :param _content_type: force content-type for the request.
69
+ :type _content_type: str, Optional
70
+ :param _headers: set to override the headers for a single
71
+ request; this effectively ignores the headers
72
+ in the spec for a single request.
73
+ :type _headers: dict, optional
74
+ :param _host_index: set to override the host_index for a single
75
+ request; this effectively ignores the host_index
76
+ in the spec for a single request.
77
+ :type _host_index: int, optional
78
+ :return: Returns the result object.
79
+ """ # noqa: E501
80
+
81
+ _param = self._oauth_token_proxy_api_v1_afnor_oauth_token_post_serialize(
82
+ _request_auth=_request_auth,
83
+ _content_type=_content_type,
84
+ _headers=_headers,
85
+ _host_index=_host_index
86
+ )
87
+
88
+ _response_types_map: Dict[str, Optional[str]] = {
89
+ '200': "object",
90
+ '401': None,
91
+ }
92
+ response_data = self.api_client.call_api(
93
+ *_param,
94
+ _request_timeout=_request_timeout
95
+ )
96
+ response_data.read()
97
+ return self.api_client.response_deserialize(
98
+ response_data=response_data,
99
+ response_types_map=_response_types_map,
100
+ ).data
101
+
102
+
103
+ @validate_call
104
+ def oauth_token_proxy_api_v1_afnor_oauth_token_post_with_http_info(
105
+ self,
106
+ _request_timeout: Union[
107
+ None,
108
+ Annotated[StrictFloat, Field(gt=0)],
109
+ Tuple[
110
+ Annotated[StrictFloat, Field(gt=0)],
111
+ Annotated[StrictFloat, Field(gt=0)]
112
+ ]
113
+ ] = None,
114
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
115
+ _content_type: Optional[StrictStr] = None,
116
+ _headers: Optional[Dict[StrictStr, Any]] = None,
117
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
118
+ ) -> ApiResponse[object]:
119
+ """Endpoint OAuth2 pour authentification AFNOR
120
+
121
+ 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.
122
+
123
+ :param _request_timeout: timeout setting for this request. If one
124
+ number provided, it will be total request
125
+ timeout. It can also be a pair (tuple) of
126
+ (connection, read) timeouts.
127
+ :type _request_timeout: int, tuple(int, int), optional
128
+ :param _request_auth: set to override the auth_settings for an a single
129
+ request; this effectively ignores the
130
+ authentication in the spec for a single request.
131
+ :type _request_auth: dict, optional
132
+ :param _content_type: force content-type for the request.
133
+ :type _content_type: str, Optional
134
+ :param _headers: set to override the headers for a single
135
+ request; this effectively ignores the headers
136
+ in the spec for a single request.
137
+ :type _headers: dict, optional
138
+ :param _host_index: set to override the host_index for a single
139
+ request; this effectively ignores the host_index
140
+ in the spec for a single request.
141
+ :type _host_index: int, optional
142
+ :return: Returns the result object.
143
+ """ # noqa: E501
144
+
145
+ _param = self._oauth_token_proxy_api_v1_afnor_oauth_token_post_serialize(
146
+ _request_auth=_request_auth,
147
+ _content_type=_content_type,
148
+ _headers=_headers,
149
+ _host_index=_host_index
150
+ )
151
+
152
+ _response_types_map: Dict[str, Optional[str]] = {
153
+ '200': "object",
154
+ '401': None,
155
+ }
156
+ response_data = self.api_client.call_api(
157
+ *_param,
158
+ _request_timeout=_request_timeout
159
+ )
160
+ response_data.read()
161
+ return self.api_client.response_deserialize(
162
+ response_data=response_data,
163
+ response_types_map=_response_types_map,
164
+ )
165
+
166
+
167
+ @validate_call
168
+ def oauth_token_proxy_api_v1_afnor_oauth_token_post_without_preload_content(
169
+ self,
170
+ _request_timeout: Union[
171
+ None,
172
+ Annotated[StrictFloat, Field(gt=0)],
173
+ Tuple[
174
+ Annotated[StrictFloat, Field(gt=0)],
175
+ Annotated[StrictFloat, Field(gt=0)]
176
+ ]
177
+ ] = None,
178
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
179
+ _content_type: Optional[StrictStr] = None,
180
+ _headers: Optional[Dict[StrictStr, Any]] = None,
181
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
182
+ ) -> RESTResponseType:
183
+ """Endpoint OAuth2 pour authentification AFNOR
184
+
185
+ 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.
186
+
187
+ :param _request_timeout: timeout setting for this request. If one
188
+ number provided, it will be total request
189
+ timeout. It can also be a pair (tuple) of
190
+ (connection, read) timeouts.
191
+ :type _request_timeout: int, tuple(int, int), optional
192
+ :param _request_auth: set to override the auth_settings for an a single
193
+ request; this effectively ignores the
194
+ authentication in the spec for a single request.
195
+ :type _request_auth: dict, optional
196
+ :param _content_type: force content-type for the request.
197
+ :type _content_type: str, Optional
198
+ :param _headers: set to override the headers for a single
199
+ request; this effectively ignores the headers
200
+ in the spec for a single request.
201
+ :type _headers: dict, optional
202
+ :param _host_index: set to override the host_index for a single
203
+ request; this effectively ignores the host_index
204
+ in the spec for a single request.
205
+ :type _host_index: int, optional
206
+ :return: Returns the result object.
207
+ """ # noqa: E501
208
+
209
+ _param = self._oauth_token_proxy_api_v1_afnor_oauth_token_post_serialize(
210
+ _request_auth=_request_auth,
211
+ _content_type=_content_type,
212
+ _headers=_headers,
213
+ _host_index=_host_index
214
+ )
215
+
216
+ _response_types_map: Dict[str, Optional[str]] = {
217
+ '200': "object",
218
+ '401': None,
219
+ }
220
+ response_data = self.api_client.call_api(
221
+ *_param,
222
+ _request_timeout=_request_timeout
223
+ )
224
+ return response_data.response
225
+
226
+
227
+ def _oauth_token_proxy_api_v1_afnor_oauth_token_post_serialize(
228
+ self,
229
+ _request_auth,
230
+ _content_type,
231
+ _headers,
232
+ _host_index,
233
+ ) -> RequestSerialized:
234
+
235
+ _host = None
236
+
237
+ _collection_formats: Dict[str, str] = {
238
+ }
239
+
240
+ _path_params: Dict[str, str] = {}
241
+ _query_params: List[Tuple[str, str]] = []
242
+ _header_params: Dict[str, Optional[str]] = _headers or {}
243
+ _form_params: List[Tuple[str, str]] = []
244
+ _files: Dict[
245
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
246
+ ] = {}
247
+ _body_params: Optional[bytes] = None
248
+
249
+ # process the path parameters
250
+ # process the query parameters
251
+ # process the header parameters
252
+ # process the form parameters
253
+ # process the body parameter
254
+
255
+
256
+ # set the HTTP header `Accept`
257
+ if 'Accept' not in _header_params:
258
+ _header_params['Accept'] = self.api_client.select_header_accept(
259
+ [
260
+ 'application/json'
261
+ ]
262
+ )
263
+
264
+
265
+ # authentication setting
266
+ _auth_settings: List[str] = [
267
+ ]
268
+
269
+ return self.api_client.param_serialize(
270
+ method='POST',
271
+ resource_path='/api/v1/afnor/oauth/token',
272
+ path_params=_path_params,
273
+ query_params=_query_params,
274
+ header_params=_header_params,
275
+ body=_body_params,
276
+ post_params=_form_params,
277
+ files=_files,
278
+ auth_settings=_auth_settings,
279
+ collection_formats=_collection_formats,
280
+ _host=_host,
281
+ _request_auth=_request_auth
282
+ )
283
+
284
+