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
@@ -0,0 +1,799 @@
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 pydantic import StrictStr
20
+ from typing import Any
21
+
22
+ from factpulse.api_client import ApiClient, RequestSerialized
23
+ from factpulse.api_response import ApiResponse
24
+ from factpulse.rest import RESTResponseType
25
+
26
+
27
+ class AFNORPDPPADirectoryServiceApi:
28
+ """NOTE: This class is auto generated by OpenAPI Generator
29
+ Ref: https://openapi-generator.tech
30
+
31
+ Do not edit the class manually.
32
+ """
33
+
34
+ def __init__(self, api_client=None) -> None:
35
+ if api_client is None:
36
+ api_client = ApiClient.get_default()
37
+ self.api_client = api_client
38
+
39
+
40
+ @validate_call
41
+ def directory_healthcheck_proxy_api_v1_afnor_directory_v1_healthcheck_get(
42
+ self,
43
+ _request_timeout: Union[
44
+ None,
45
+ Annotated[StrictFloat, Field(gt=0)],
46
+ Tuple[
47
+ Annotated[StrictFloat, Field(gt=0)],
48
+ Annotated[StrictFloat, Field(gt=0)]
49
+ ]
50
+ ] = None,
51
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
52
+ _content_type: Optional[StrictStr] = None,
53
+ _headers: Optional[Dict[StrictStr, Any]] = None,
54
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
55
+ ) -> object:
56
+ """Healthcheck Directory Service
57
+
58
+ Vérifier la disponibilité du Directory Service
59
+
60
+ :param _request_timeout: timeout setting for this request. If one
61
+ number provided, it will be total request
62
+ timeout. It can also be a pair (tuple) of
63
+ (connection, read) timeouts.
64
+ :type _request_timeout: int, tuple(int, int), optional
65
+ :param _request_auth: set to override the auth_settings for an a single
66
+ request; this effectively ignores the
67
+ authentication in the spec for a single request.
68
+ :type _request_auth: dict, optional
69
+ :param _content_type: force content-type for the request.
70
+ :type _content_type: str, Optional
71
+ :param _headers: set to override the headers for a single
72
+ request; this effectively ignores the headers
73
+ in the spec for a single request.
74
+ :type _headers: dict, optional
75
+ :param _host_index: set to override the host_index for a single
76
+ request; this effectively ignores the host_index
77
+ in the spec for a single request.
78
+ :type _host_index: int, optional
79
+ :return: Returns the result object.
80
+ """ # noqa: E501
81
+
82
+ _param = self._directory_healthcheck_proxy_api_v1_afnor_directory_v1_healthcheck_get_serialize(
83
+ _request_auth=_request_auth,
84
+ _content_type=_content_type,
85
+ _headers=_headers,
86
+ _host_index=_host_index
87
+ )
88
+
89
+ _response_types_map: Dict[str, Optional[str]] = {
90
+ '200': "object",
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 directory_healthcheck_proxy_api_v1_afnor_directory_v1_healthcheck_get_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
+ """Healthcheck Directory Service
120
+
121
+ Vérifier la disponibilité du Directory Service
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._directory_healthcheck_proxy_api_v1_afnor_directory_v1_healthcheck_get_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
+ }
155
+ response_data = self.api_client.call_api(
156
+ *_param,
157
+ _request_timeout=_request_timeout
158
+ )
159
+ response_data.read()
160
+ return self.api_client.response_deserialize(
161
+ response_data=response_data,
162
+ response_types_map=_response_types_map,
163
+ )
164
+
165
+
166
+ @validate_call
167
+ def directory_healthcheck_proxy_api_v1_afnor_directory_v1_healthcheck_get_without_preload_content(
168
+ self,
169
+ _request_timeout: Union[
170
+ None,
171
+ Annotated[StrictFloat, Field(gt=0)],
172
+ Tuple[
173
+ Annotated[StrictFloat, Field(gt=0)],
174
+ Annotated[StrictFloat, Field(gt=0)]
175
+ ]
176
+ ] = None,
177
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
178
+ _content_type: Optional[StrictStr] = None,
179
+ _headers: Optional[Dict[StrictStr, Any]] = None,
180
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
181
+ ) -> RESTResponseType:
182
+ """Healthcheck Directory Service
183
+
184
+ Vérifier la disponibilité du Directory Service
185
+
186
+ :param _request_timeout: timeout setting for this request. If one
187
+ number provided, it will be total request
188
+ timeout. It can also be a pair (tuple) of
189
+ (connection, read) timeouts.
190
+ :type _request_timeout: int, tuple(int, int), optional
191
+ :param _request_auth: set to override the auth_settings for an a single
192
+ request; this effectively ignores the
193
+ authentication in the spec for a single request.
194
+ :type _request_auth: dict, optional
195
+ :param _content_type: force content-type for the request.
196
+ :type _content_type: str, Optional
197
+ :param _headers: set to override the headers for a single
198
+ request; this effectively ignores the headers
199
+ in the spec for a single request.
200
+ :type _headers: dict, optional
201
+ :param _host_index: set to override the host_index for a single
202
+ request; this effectively ignores the host_index
203
+ in the spec for a single request.
204
+ :type _host_index: int, optional
205
+ :return: Returns the result object.
206
+ """ # noqa: E501
207
+
208
+ _param = self._directory_healthcheck_proxy_api_v1_afnor_directory_v1_healthcheck_get_serialize(
209
+ _request_auth=_request_auth,
210
+ _content_type=_content_type,
211
+ _headers=_headers,
212
+ _host_index=_host_index
213
+ )
214
+
215
+ _response_types_map: Dict[str, Optional[str]] = {
216
+ '200': "object",
217
+ }
218
+ response_data = self.api_client.call_api(
219
+ *_param,
220
+ _request_timeout=_request_timeout
221
+ )
222
+ return response_data.response
223
+
224
+
225
+ def _directory_healthcheck_proxy_api_v1_afnor_directory_v1_healthcheck_get_serialize(
226
+ self,
227
+ _request_auth,
228
+ _content_type,
229
+ _headers,
230
+ _host_index,
231
+ ) -> RequestSerialized:
232
+
233
+ _host = None
234
+
235
+ _collection_formats: Dict[str, str] = {
236
+ }
237
+
238
+ _path_params: Dict[str, str] = {}
239
+ _query_params: List[Tuple[str, str]] = []
240
+ _header_params: Dict[str, Optional[str]] = _headers or {}
241
+ _form_params: List[Tuple[str, str]] = []
242
+ _files: Dict[
243
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
244
+ ] = {}
245
+ _body_params: Optional[bytes] = None
246
+
247
+ # process the path parameters
248
+ # process the query parameters
249
+ # process the header parameters
250
+ # process the form parameters
251
+ # process the body parameter
252
+
253
+
254
+ # set the HTTP header `Accept`
255
+ if 'Accept' not in _header_params:
256
+ _header_params['Accept'] = self.api_client.select_header_accept(
257
+ [
258
+ 'application/json'
259
+ ]
260
+ )
261
+
262
+
263
+ # authentication setting
264
+ _auth_settings: List[str] = [
265
+ ]
266
+
267
+ return self.api_client.param_serialize(
268
+ method='GET',
269
+ resource_path='/api/v1/afnor/directory/v1/healthcheck',
270
+ path_params=_path_params,
271
+ query_params=_query_params,
272
+ header_params=_header_params,
273
+ body=_body_params,
274
+ post_params=_form_params,
275
+ files=_files,
276
+ auth_settings=_auth_settings,
277
+ collection_formats=_collection_formats,
278
+ _host=_host,
279
+ _request_auth=_request_auth
280
+ )
281
+
282
+
283
+
284
+
285
+ @validate_call
286
+ def get_company_proxy_api_v1_afnor_directory_v1_companies_siren_get(
287
+ self,
288
+ siren: StrictStr,
289
+ _request_timeout: Union[
290
+ None,
291
+ Annotated[StrictFloat, Field(gt=0)],
292
+ Tuple[
293
+ Annotated[StrictFloat, Field(gt=0)],
294
+ Annotated[StrictFloat, Field(gt=0)]
295
+ ]
296
+ ] = None,
297
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
298
+ _content_type: Optional[StrictStr] = None,
299
+ _headers: Optional[Dict[StrictStr, Any]] = None,
300
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
301
+ ) -> object:
302
+ """Récupérer une entreprise
303
+
304
+ Récupérer les informations d'une entreprise par son SIREN
305
+
306
+ :param siren: (required)
307
+ :type siren: str
308
+ :param _request_timeout: timeout setting for this request. If one
309
+ number provided, it will be total request
310
+ timeout. It can also be a pair (tuple) of
311
+ (connection, read) timeouts.
312
+ :type _request_timeout: int, tuple(int, int), optional
313
+ :param _request_auth: set to override the auth_settings for an a single
314
+ request; this effectively ignores the
315
+ authentication in the spec for a single request.
316
+ :type _request_auth: dict, optional
317
+ :param _content_type: force content-type for the request.
318
+ :type _content_type: str, Optional
319
+ :param _headers: set to override the headers for a single
320
+ request; this effectively ignores the headers
321
+ in the spec for a single request.
322
+ :type _headers: dict, optional
323
+ :param _host_index: set to override the host_index for a single
324
+ request; this effectively ignores the host_index
325
+ in the spec for a single request.
326
+ :type _host_index: int, optional
327
+ :return: Returns the result object.
328
+ """ # noqa: E501
329
+
330
+ _param = self._get_company_proxy_api_v1_afnor_directory_v1_companies_siren_get_serialize(
331
+ siren=siren,
332
+ _request_auth=_request_auth,
333
+ _content_type=_content_type,
334
+ _headers=_headers,
335
+ _host_index=_host_index
336
+ )
337
+
338
+ _response_types_map: Dict[str, Optional[str]] = {
339
+ '200': "object",
340
+ '404': None,
341
+ '401': None,
342
+ '422': "HTTPValidationError",
343
+ }
344
+ response_data = self.api_client.call_api(
345
+ *_param,
346
+ _request_timeout=_request_timeout
347
+ )
348
+ response_data.read()
349
+ return self.api_client.response_deserialize(
350
+ response_data=response_data,
351
+ response_types_map=_response_types_map,
352
+ ).data
353
+
354
+
355
+ @validate_call
356
+ def get_company_proxy_api_v1_afnor_directory_v1_companies_siren_get_with_http_info(
357
+ self,
358
+ siren: StrictStr,
359
+ _request_timeout: Union[
360
+ None,
361
+ Annotated[StrictFloat, Field(gt=0)],
362
+ Tuple[
363
+ Annotated[StrictFloat, Field(gt=0)],
364
+ Annotated[StrictFloat, Field(gt=0)]
365
+ ]
366
+ ] = None,
367
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
368
+ _content_type: Optional[StrictStr] = None,
369
+ _headers: Optional[Dict[StrictStr, Any]] = None,
370
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
371
+ ) -> ApiResponse[object]:
372
+ """Récupérer une entreprise
373
+
374
+ Récupérer les informations d'une entreprise par son SIREN
375
+
376
+ :param siren: (required)
377
+ :type siren: str
378
+ :param _request_timeout: timeout setting for this request. If one
379
+ number provided, it will be total request
380
+ timeout. It can also be a pair (tuple) of
381
+ (connection, read) timeouts.
382
+ :type _request_timeout: int, tuple(int, int), optional
383
+ :param _request_auth: set to override the auth_settings for an a single
384
+ request; this effectively ignores the
385
+ authentication in the spec for a single request.
386
+ :type _request_auth: dict, optional
387
+ :param _content_type: force content-type for the request.
388
+ :type _content_type: str, Optional
389
+ :param _headers: set to override the headers for a single
390
+ request; this effectively ignores the headers
391
+ in the spec for a single request.
392
+ :type _headers: dict, optional
393
+ :param _host_index: set to override the host_index for a single
394
+ request; this effectively ignores the host_index
395
+ in the spec for a single request.
396
+ :type _host_index: int, optional
397
+ :return: Returns the result object.
398
+ """ # noqa: E501
399
+
400
+ _param = self._get_company_proxy_api_v1_afnor_directory_v1_companies_siren_get_serialize(
401
+ siren=siren,
402
+ _request_auth=_request_auth,
403
+ _content_type=_content_type,
404
+ _headers=_headers,
405
+ _host_index=_host_index
406
+ )
407
+
408
+ _response_types_map: Dict[str, Optional[str]] = {
409
+ '200': "object",
410
+ '404': None,
411
+ '401': None,
412
+ '422': "HTTPValidationError",
413
+ }
414
+ response_data = self.api_client.call_api(
415
+ *_param,
416
+ _request_timeout=_request_timeout
417
+ )
418
+ response_data.read()
419
+ return self.api_client.response_deserialize(
420
+ response_data=response_data,
421
+ response_types_map=_response_types_map,
422
+ )
423
+
424
+
425
+ @validate_call
426
+ def get_company_proxy_api_v1_afnor_directory_v1_companies_siren_get_without_preload_content(
427
+ self,
428
+ siren: StrictStr,
429
+ _request_timeout: Union[
430
+ None,
431
+ Annotated[StrictFloat, Field(gt=0)],
432
+ Tuple[
433
+ Annotated[StrictFloat, Field(gt=0)],
434
+ Annotated[StrictFloat, Field(gt=0)]
435
+ ]
436
+ ] = None,
437
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
438
+ _content_type: Optional[StrictStr] = None,
439
+ _headers: Optional[Dict[StrictStr, Any]] = None,
440
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
441
+ ) -> RESTResponseType:
442
+ """Récupérer une entreprise
443
+
444
+ Récupérer les informations d'une entreprise par son SIREN
445
+
446
+ :param siren: (required)
447
+ :type siren: str
448
+ :param _request_timeout: timeout setting for this request. If one
449
+ number provided, it will be total request
450
+ timeout. It can also be a pair (tuple) of
451
+ (connection, read) timeouts.
452
+ :type _request_timeout: int, tuple(int, int), optional
453
+ :param _request_auth: set to override the auth_settings for an a single
454
+ request; this effectively ignores the
455
+ authentication in the spec for a single request.
456
+ :type _request_auth: dict, optional
457
+ :param _content_type: force content-type for the request.
458
+ :type _content_type: str, Optional
459
+ :param _headers: set to override the headers for a single
460
+ request; this effectively ignores the headers
461
+ in the spec for a single request.
462
+ :type _headers: dict, optional
463
+ :param _host_index: set to override the host_index for a single
464
+ request; this effectively ignores the host_index
465
+ in the spec for a single request.
466
+ :type _host_index: int, optional
467
+ :return: Returns the result object.
468
+ """ # noqa: E501
469
+
470
+ _param = self._get_company_proxy_api_v1_afnor_directory_v1_companies_siren_get_serialize(
471
+ siren=siren,
472
+ _request_auth=_request_auth,
473
+ _content_type=_content_type,
474
+ _headers=_headers,
475
+ _host_index=_host_index
476
+ )
477
+
478
+ _response_types_map: Dict[str, Optional[str]] = {
479
+ '200': "object",
480
+ '404': None,
481
+ '401': None,
482
+ '422': "HTTPValidationError",
483
+ }
484
+ response_data = self.api_client.call_api(
485
+ *_param,
486
+ _request_timeout=_request_timeout
487
+ )
488
+ return response_data.response
489
+
490
+
491
+ def _get_company_proxy_api_v1_afnor_directory_v1_companies_siren_get_serialize(
492
+ self,
493
+ siren,
494
+ _request_auth,
495
+ _content_type,
496
+ _headers,
497
+ _host_index,
498
+ ) -> RequestSerialized:
499
+
500
+ _host = None
501
+
502
+ _collection_formats: Dict[str, str] = {
503
+ }
504
+
505
+ _path_params: Dict[str, str] = {}
506
+ _query_params: List[Tuple[str, str]] = []
507
+ _header_params: Dict[str, Optional[str]] = _headers or {}
508
+ _form_params: List[Tuple[str, str]] = []
509
+ _files: Dict[
510
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
511
+ ] = {}
512
+ _body_params: Optional[bytes] = None
513
+
514
+ # process the path parameters
515
+ if siren is not None:
516
+ _path_params['siren'] = siren
517
+ # process the query parameters
518
+ # process the header parameters
519
+ # process the form parameters
520
+ # process the body parameter
521
+
522
+
523
+ # set the HTTP header `Accept`
524
+ if 'Accept' not in _header_params:
525
+ _header_params['Accept'] = self.api_client.select_header_accept(
526
+ [
527
+ 'application/json'
528
+ ]
529
+ )
530
+
531
+
532
+ # authentication setting
533
+ _auth_settings: List[str] = [
534
+ ]
535
+
536
+ return self.api_client.param_serialize(
537
+ method='GET',
538
+ resource_path='/api/v1/afnor/directory/v1/companies/{siren}',
539
+ path_params=_path_params,
540
+ query_params=_query_params,
541
+ header_params=_header_params,
542
+ body=_body_params,
543
+ post_params=_form_params,
544
+ files=_files,
545
+ auth_settings=_auth_settings,
546
+ collection_formats=_collection_formats,
547
+ _host=_host,
548
+ _request_auth=_request_auth
549
+ )
550
+
551
+
552
+
553
+
554
+ @validate_call
555
+ def search_companies_proxy_api_v1_afnor_directory_v1_companies_search_post(
556
+ self,
557
+ _request_timeout: Union[
558
+ None,
559
+ Annotated[StrictFloat, Field(gt=0)],
560
+ Tuple[
561
+ Annotated[StrictFloat, Field(gt=0)],
562
+ Annotated[StrictFloat, Field(gt=0)]
563
+ ]
564
+ ] = None,
565
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
566
+ _content_type: Optional[StrictStr] = None,
567
+ _headers: Optional[Dict[StrictStr, Any]] = None,
568
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
569
+ ) -> object:
570
+ """Rechercher des entreprises
571
+
572
+ Rechercher des entreprises dans l'annuaire AFNOR
573
+
574
+ :param _request_timeout: timeout setting for this request. If one
575
+ number provided, it will be total request
576
+ timeout. It can also be a pair (tuple) of
577
+ (connection, read) timeouts.
578
+ :type _request_timeout: int, tuple(int, int), optional
579
+ :param _request_auth: set to override the auth_settings for an a single
580
+ request; this effectively ignores the
581
+ authentication in the spec for a single request.
582
+ :type _request_auth: dict, optional
583
+ :param _content_type: force content-type for the request.
584
+ :type _content_type: str, Optional
585
+ :param _headers: set to override the headers for a single
586
+ request; this effectively ignores the headers
587
+ in the spec for a single request.
588
+ :type _headers: dict, optional
589
+ :param _host_index: set to override the host_index for a single
590
+ request; this effectively ignores the host_index
591
+ in the spec for a single request.
592
+ :type _host_index: int, optional
593
+ :return: Returns the result object.
594
+ """ # noqa: E501
595
+
596
+ _param = self._search_companies_proxy_api_v1_afnor_directory_v1_companies_search_post_serialize(
597
+ _request_auth=_request_auth,
598
+ _content_type=_content_type,
599
+ _headers=_headers,
600
+ _host_index=_host_index
601
+ )
602
+
603
+ _response_types_map: Dict[str, Optional[str]] = {
604
+ '200': "object",
605
+ '401': None,
606
+ }
607
+ response_data = self.api_client.call_api(
608
+ *_param,
609
+ _request_timeout=_request_timeout
610
+ )
611
+ response_data.read()
612
+ return self.api_client.response_deserialize(
613
+ response_data=response_data,
614
+ response_types_map=_response_types_map,
615
+ ).data
616
+
617
+
618
+ @validate_call
619
+ def search_companies_proxy_api_v1_afnor_directory_v1_companies_search_post_with_http_info(
620
+ self,
621
+ _request_timeout: Union[
622
+ None,
623
+ Annotated[StrictFloat, Field(gt=0)],
624
+ Tuple[
625
+ Annotated[StrictFloat, Field(gt=0)],
626
+ Annotated[StrictFloat, Field(gt=0)]
627
+ ]
628
+ ] = None,
629
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
630
+ _content_type: Optional[StrictStr] = None,
631
+ _headers: Optional[Dict[StrictStr, Any]] = None,
632
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
633
+ ) -> ApiResponse[object]:
634
+ """Rechercher des entreprises
635
+
636
+ Rechercher des entreprises dans l'annuaire AFNOR
637
+
638
+ :param _request_timeout: timeout setting for this request. If one
639
+ number provided, it will be total request
640
+ timeout. It can also be a pair (tuple) of
641
+ (connection, read) timeouts.
642
+ :type _request_timeout: int, tuple(int, int), optional
643
+ :param _request_auth: set to override the auth_settings for an a single
644
+ request; this effectively ignores the
645
+ authentication in the spec for a single request.
646
+ :type _request_auth: dict, optional
647
+ :param _content_type: force content-type for the request.
648
+ :type _content_type: str, Optional
649
+ :param _headers: set to override the headers for a single
650
+ request; this effectively ignores the headers
651
+ in the spec for a single request.
652
+ :type _headers: dict, optional
653
+ :param _host_index: set to override the host_index for a single
654
+ request; this effectively ignores the host_index
655
+ in the spec for a single request.
656
+ :type _host_index: int, optional
657
+ :return: Returns the result object.
658
+ """ # noqa: E501
659
+
660
+ _param = self._search_companies_proxy_api_v1_afnor_directory_v1_companies_search_post_serialize(
661
+ _request_auth=_request_auth,
662
+ _content_type=_content_type,
663
+ _headers=_headers,
664
+ _host_index=_host_index
665
+ )
666
+
667
+ _response_types_map: Dict[str, Optional[str]] = {
668
+ '200': "object",
669
+ '401': None,
670
+ }
671
+ response_data = self.api_client.call_api(
672
+ *_param,
673
+ _request_timeout=_request_timeout
674
+ )
675
+ response_data.read()
676
+ return self.api_client.response_deserialize(
677
+ response_data=response_data,
678
+ response_types_map=_response_types_map,
679
+ )
680
+
681
+
682
+ @validate_call
683
+ def search_companies_proxy_api_v1_afnor_directory_v1_companies_search_post_without_preload_content(
684
+ self,
685
+ _request_timeout: Union[
686
+ None,
687
+ Annotated[StrictFloat, Field(gt=0)],
688
+ Tuple[
689
+ Annotated[StrictFloat, Field(gt=0)],
690
+ Annotated[StrictFloat, Field(gt=0)]
691
+ ]
692
+ ] = None,
693
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
694
+ _content_type: Optional[StrictStr] = None,
695
+ _headers: Optional[Dict[StrictStr, Any]] = None,
696
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
697
+ ) -> RESTResponseType:
698
+ """Rechercher des entreprises
699
+
700
+ Rechercher des entreprises dans l'annuaire AFNOR
701
+
702
+ :param _request_timeout: timeout setting for this request. If one
703
+ number provided, it will be total request
704
+ timeout. It can also be a pair (tuple) of
705
+ (connection, read) timeouts.
706
+ :type _request_timeout: int, tuple(int, int), optional
707
+ :param _request_auth: set to override the auth_settings for an a single
708
+ request; this effectively ignores the
709
+ authentication in the spec for a single request.
710
+ :type _request_auth: dict, optional
711
+ :param _content_type: force content-type for the request.
712
+ :type _content_type: str, Optional
713
+ :param _headers: set to override the headers for a single
714
+ request; this effectively ignores the headers
715
+ in the spec for a single request.
716
+ :type _headers: dict, optional
717
+ :param _host_index: set to override the host_index for a single
718
+ request; this effectively ignores the host_index
719
+ in the spec for a single request.
720
+ :type _host_index: int, optional
721
+ :return: Returns the result object.
722
+ """ # noqa: E501
723
+
724
+ _param = self._search_companies_proxy_api_v1_afnor_directory_v1_companies_search_post_serialize(
725
+ _request_auth=_request_auth,
726
+ _content_type=_content_type,
727
+ _headers=_headers,
728
+ _host_index=_host_index
729
+ )
730
+
731
+ _response_types_map: Dict[str, Optional[str]] = {
732
+ '200': "object",
733
+ '401': None,
734
+ }
735
+ response_data = self.api_client.call_api(
736
+ *_param,
737
+ _request_timeout=_request_timeout
738
+ )
739
+ return response_data.response
740
+
741
+
742
+ def _search_companies_proxy_api_v1_afnor_directory_v1_companies_search_post_serialize(
743
+ self,
744
+ _request_auth,
745
+ _content_type,
746
+ _headers,
747
+ _host_index,
748
+ ) -> RequestSerialized:
749
+
750
+ _host = None
751
+
752
+ _collection_formats: Dict[str, str] = {
753
+ }
754
+
755
+ _path_params: Dict[str, str] = {}
756
+ _query_params: List[Tuple[str, str]] = []
757
+ _header_params: Dict[str, Optional[str]] = _headers or {}
758
+ _form_params: List[Tuple[str, str]] = []
759
+ _files: Dict[
760
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
761
+ ] = {}
762
+ _body_params: Optional[bytes] = None
763
+
764
+ # process the path parameters
765
+ # process the query parameters
766
+ # process the header parameters
767
+ # process the form parameters
768
+ # process the body parameter
769
+
770
+
771
+ # set the HTTP header `Accept`
772
+ if 'Accept' not in _header_params:
773
+ _header_params['Accept'] = self.api_client.select_header_accept(
774
+ [
775
+ 'application/json'
776
+ ]
777
+ )
778
+
779
+
780
+ # authentication setting
781
+ _auth_settings: List[str] = [
782
+ ]
783
+
784
+ return self.api_client.param_serialize(
785
+ method='POST',
786
+ resource_path='/api/v1/afnor/directory/v1/companies/search',
787
+ path_params=_path_params,
788
+ query_params=_query_params,
789
+ header_params=_header_params,
790
+ body=_body_params,
791
+ post_params=_form_params,
792
+ files=_files,
793
+ auth_settings=_auth_settings,
794
+ collection_formats=_collection_formats,
795
+ _host=_host,
796
+ _request_auth=_request_auth
797
+ )
798
+
799
+