factpulse 1.0.6__py3-none-any.whl → 2.0.2__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.
- factpulse/__init__.py +17 -23
- factpulse/api/__init__.py +0 -2
- factpulse/api/afnorpdppa_directory_service_api.py +4293 -64
- factpulse/api_client.py +1 -1
- factpulse/configuration.py +1 -1
- factpulse/exceptions.py +5 -2
- factpulse/models/__init__.py +8 -9
- factpulse/models/ligne_de_poste.py +6 -6
- factpulse/models/ligne_de_tva.py +6 -6
- factpulse/models/{montantapayer.py → montant_a_payer.py} +4 -4
- factpulse/models/{montantbaseht.py → montant_base_ht.py} +4 -4
- factpulse/models/montant_ht_total.py +3 -3
- factpulse/models/{montantttctotal.py → montant_ht_total1.py} +8 -8
- factpulse/models/{montant_total_montant_remise_globale_ttc.py → montant_remise_globale_ttc.py} +5 -5
- factpulse/models/montant_total.py +15 -15
- factpulse/models/{ligne_de_poste_montant_total_ligne_ht.py → montant_total_ligne_ht.py} +5 -5
- factpulse/models/montant_ttc_total.py +3 -3
- factpulse/models/{montanttva.py → montant_ttc_total1.py} +8 -8
- factpulse/models/montant_tva.py +3 -3
- factpulse/models/{montanttva1.py → montant_tva1.py} +4 -4
- factpulse/models/{montantunitaireht.py → montant_unitaire_ht.py} +4 -4
- factpulse/models/options_processing.py +4 -13
- factpulse/models/soumettre_facture_request.py +18 -6
- factpulse/models/statut_tache.py +2 -5
- {factpulse-1.0.6.dist-info → factpulse-2.0.2.dist-info}/METADATA +2 -2
- {factpulse-1.0.6.dist-info → factpulse-2.0.2.dist-info}/RECORD +29 -32
- factpulse/api/processing_endpoints_unifis_api.py +0 -592
- factpulse/api/signature_lectronique_api.py +0 -1358
- factpulse/models/montanthttotal.py +0 -139
- {factpulse-1.0.6.dist-info → factpulse-2.0.2.dist-info}/WHEEL +0 -0
- {factpulse-1.0.6.dist-info → factpulse-2.0.2.dist-info}/licenses/LICENSE +0 -0
- {factpulse-1.0.6.dist-info → factpulse-2.0.2.dist-info}/top_level.txt +0 -0
|
@@ -1,1358 +0,0 @@
|
|
|
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 Field, StrictBool, StrictBytes, StrictStr
|
|
20
|
-
from typing import Any, Optional, Tuple, Union
|
|
21
|
-
from typing_extensions import Annotated
|
|
22
|
-
from factpulse.models.generate_certificate_request import GenerateCertificateRequest
|
|
23
|
-
from factpulse.models.generate_certificate_response import GenerateCertificateResponse
|
|
24
|
-
|
|
25
|
-
from factpulse.api_client import ApiClient, RequestSerialized
|
|
26
|
-
from factpulse.api_response import ApiResponse
|
|
27
|
-
from factpulse.rest import RESTResponseType
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
class SignatureLectroniqueApi:
|
|
31
|
-
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
32
|
-
Ref: https://openapi-generator.tech
|
|
33
|
-
|
|
34
|
-
Do not edit the class manually.
|
|
35
|
-
"""
|
|
36
|
-
|
|
37
|
-
def __init__(self, api_client=None) -> None:
|
|
38
|
-
if api_client is None:
|
|
39
|
-
api_client = ApiClient.get_default()
|
|
40
|
-
self.api_client = api_client
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
@validate_call
|
|
44
|
-
def generer_certificat_test_api_v1_traitement_generer_certificat_test_post(
|
|
45
|
-
self,
|
|
46
|
-
generate_certificate_request: GenerateCertificateRequest,
|
|
47
|
-
_request_timeout: Union[
|
|
48
|
-
None,
|
|
49
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
50
|
-
Tuple[
|
|
51
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
52
|
-
Annotated[StrictFloat, Field(gt=0)]
|
|
53
|
-
]
|
|
54
|
-
] = None,
|
|
55
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
56
|
-
_content_type: Optional[StrictStr] = None,
|
|
57
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
58
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
59
|
-
) -> GenerateCertificateResponse:
|
|
60
|
-
"""Générer un certificat X.509 auto-signé de test
|
|
61
|
-
|
|
62
|
-
Génère un certificat X.509 auto-signé pour les tests de signature électronique PDF. **⚠️ ATTENTION : Certificat de TEST uniquement !** Ce certificat est : - ✅ Adapté pour tests et développement - ✅ Compatible signature PDF (PAdES) - ✅ Conforme eIDAS niveau **SES** (Simple Electronic Signature) - ❌ **JAMAIS utilisable en production** - ❌ **Non reconnu** par les navigateurs et lecteurs PDF - ❌ **Aucune valeur juridique** ## Niveaux eIDAS - **SES** (Simple) : Certificat auto-signé ← Généré par cet endpoint - **AdES** (Advanced) : Certificat CA commerciale (Let's Encrypt, etc.) - **QES** (Qualified) : Certificat qualifié PSCO (CertEurope, Universign, etc.) ## Utilisation Une fois généré, le certificat peut être : 1. **Enregistré dans Django** (recommandé) : - Django Admin > Certificats de signature - Upload `certificat_pem` et `cle_privee_pem` 2. **Utilisé directement** : - Signer un PDF avec `/signer-pdf` - Le certificat sera automatiquement utilisé ## Exemple d'appel ```bash curl -X POST \"https://www.factpulse.fr/api/facturation/generer-certificat-test\" \\ -H \"Authorization: Bearer eyJ0eXAi...\" \\ -H \"Content-Type: application/json\" \\ -d '{ \"cn\": \"Test Client XYZ\", \"organisation\": \"Client XYZ SARL\", \"email\": \"contact@xyz.fr\", \"duree_jours\": 365 }' ``` ## Cas d'usage - Tests de signature PDF en développement - POC de signature électronique - Formation et démos - Tests d'intégration automatisés ## Conformité technique Certificat généré avec : - Clé RSA 2048 ou 4096 bits - Algorithme SHA-256 - Extensions Key Usage : `digitalSignature`, `contentCommitment` (non-repudiation) - Extensions Extended Key Usage : `codeSigning`, `emailProtection` - Validité : 1 jour à 10 ans (configurable) - Format : PEM (certificat et clé) - Optionnel : PKCS#12 (.p12)
|
|
63
|
-
|
|
64
|
-
:param generate_certificate_request: (required)
|
|
65
|
-
:type generate_certificate_request: GenerateCertificateRequest
|
|
66
|
-
:param _request_timeout: timeout setting for this request. If one
|
|
67
|
-
number provided, it will be total request
|
|
68
|
-
timeout. It can also be a pair (tuple) of
|
|
69
|
-
(connection, read) timeouts.
|
|
70
|
-
:type _request_timeout: int, tuple(int, int), optional
|
|
71
|
-
:param _request_auth: set to override the auth_settings for an a single
|
|
72
|
-
request; this effectively ignores the
|
|
73
|
-
authentication in the spec for a single request.
|
|
74
|
-
:type _request_auth: dict, optional
|
|
75
|
-
:param _content_type: force content-type for the request.
|
|
76
|
-
:type _content_type: str, Optional
|
|
77
|
-
:param _headers: set to override the headers for a single
|
|
78
|
-
request; this effectively ignores the headers
|
|
79
|
-
in the spec for a single request.
|
|
80
|
-
:type _headers: dict, optional
|
|
81
|
-
:param _host_index: set to override the host_index for a single
|
|
82
|
-
request; this effectively ignores the host_index
|
|
83
|
-
in the spec for a single request.
|
|
84
|
-
:type _host_index: int, optional
|
|
85
|
-
:return: Returns the result object.
|
|
86
|
-
""" # noqa: E501
|
|
87
|
-
|
|
88
|
-
_param = self._generer_certificat_test_api_v1_traitement_generer_certificat_test_post_serialize(
|
|
89
|
-
generate_certificate_request=generate_certificate_request,
|
|
90
|
-
_request_auth=_request_auth,
|
|
91
|
-
_content_type=_content_type,
|
|
92
|
-
_headers=_headers,
|
|
93
|
-
_host_index=_host_index
|
|
94
|
-
)
|
|
95
|
-
|
|
96
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
|
97
|
-
'200': "GenerateCertificateResponse",
|
|
98
|
-
'400': None,
|
|
99
|
-
'500': None,
|
|
100
|
-
'422': "HTTPValidationError",
|
|
101
|
-
}
|
|
102
|
-
response_data = self.api_client.call_api(
|
|
103
|
-
*_param,
|
|
104
|
-
_request_timeout=_request_timeout
|
|
105
|
-
)
|
|
106
|
-
response_data.read()
|
|
107
|
-
return self.api_client.response_deserialize(
|
|
108
|
-
response_data=response_data,
|
|
109
|
-
response_types_map=_response_types_map,
|
|
110
|
-
).data
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
@validate_call
|
|
114
|
-
def generer_certificat_test_api_v1_traitement_generer_certificat_test_post_with_http_info(
|
|
115
|
-
self,
|
|
116
|
-
generate_certificate_request: GenerateCertificateRequest,
|
|
117
|
-
_request_timeout: Union[
|
|
118
|
-
None,
|
|
119
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
120
|
-
Tuple[
|
|
121
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
122
|
-
Annotated[StrictFloat, Field(gt=0)]
|
|
123
|
-
]
|
|
124
|
-
] = None,
|
|
125
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
126
|
-
_content_type: Optional[StrictStr] = None,
|
|
127
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
128
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
129
|
-
) -> ApiResponse[GenerateCertificateResponse]:
|
|
130
|
-
"""Générer un certificat X.509 auto-signé de test
|
|
131
|
-
|
|
132
|
-
Génère un certificat X.509 auto-signé pour les tests de signature électronique PDF. **⚠️ ATTENTION : Certificat de TEST uniquement !** Ce certificat est : - ✅ Adapté pour tests et développement - ✅ Compatible signature PDF (PAdES) - ✅ Conforme eIDAS niveau **SES** (Simple Electronic Signature) - ❌ **JAMAIS utilisable en production** - ❌ **Non reconnu** par les navigateurs et lecteurs PDF - ❌ **Aucune valeur juridique** ## Niveaux eIDAS - **SES** (Simple) : Certificat auto-signé ← Généré par cet endpoint - **AdES** (Advanced) : Certificat CA commerciale (Let's Encrypt, etc.) - **QES** (Qualified) : Certificat qualifié PSCO (CertEurope, Universign, etc.) ## Utilisation Une fois généré, le certificat peut être : 1. **Enregistré dans Django** (recommandé) : - Django Admin > Certificats de signature - Upload `certificat_pem` et `cle_privee_pem` 2. **Utilisé directement** : - Signer un PDF avec `/signer-pdf` - Le certificat sera automatiquement utilisé ## Exemple d'appel ```bash curl -X POST \"https://www.factpulse.fr/api/facturation/generer-certificat-test\" \\ -H \"Authorization: Bearer eyJ0eXAi...\" \\ -H \"Content-Type: application/json\" \\ -d '{ \"cn\": \"Test Client XYZ\", \"organisation\": \"Client XYZ SARL\", \"email\": \"contact@xyz.fr\", \"duree_jours\": 365 }' ``` ## Cas d'usage - Tests de signature PDF en développement - POC de signature électronique - Formation et démos - Tests d'intégration automatisés ## Conformité technique Certificat généré avec : - Clé RSA 2048 ou 4096 bits - Algorithme SHA-256 - Extensions Key Usage : `digitalSignature`, `contentCommitment` (non-repudiation) - Extensions Extended Key Usage : `codeSigning`, `emailProtection` - Validité : 1 jour à 10 ans (configurable) - Format : PEM (certificat et clé) - Optionnel : PKCS#12 (.p12)
|
|
133
|
-
|
|
134
|
-
:param generate_certificate_request: (required)
|
|
135
|
-
:type generate_certificate_request: GenerateCertificateRequest
|
|
136
|
-
:param _request_timeout: timeout setting for this request. If one
|
|
137
|
-
number provided, it will be total request
|
|
138
|
-
timeout. It can also be a pair (tuple) of
|
|
139
|
-
(connection, read) timeouts.
|
|
140
|
-
:type _request_timeout: int, tuple(int, int), optional
|
|
141
|
-
:param _request_auth: set to override the auth_settings for an a single
|
|
142
|
-
request; this effectively ignores the
|
|
143
|
-
authentication in the spec for a single request.
|
|
144
|
-
:type _request_auth: dict, optional
|
|
145
|
-
:param _content_type: force content-type for the request.
|
|
146
|
-
:type _content_type: str, Optional
|
|
147
|
-
:param _headers: set to override the headers for a single
|
|
148
|
-
request; this effectively ignores the headers
|
|
149
|
-
in the spec for a single request.
|
|
150
|
-
:type _headers: dict, optional
|
|
151
|
-
:param _host_index: set to override the host_index for a single
|
|
152
|
-
request; this effectively ignores the host_index
|
|
153
|
-
in the spec for a single request.
|
|
154
|
-
:type _host_index: int, optional
|
|
155
|
-
:return: Returns the result object.
|
|
156
|
-
""" # noqa: E501
|
|
157
|
-
|
|
158
|
-
_param = self._generer_certificat_test_api_v1_traitement_generer_certificat_test_post_serialize(
|
|
159
|
-
generate_certificate_request=generate_certificate_request,
|
|
160
|
-
_request_auth=_request_auth,
|
|
161
|
-
_content_type=_content_type,
|
|
162
|
-
_headers=_headers,
|
|
163
|
-
_host_index=_host_index
|
|
164
|
-
)
|
|
165
|
-
|
|
166
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
|
167
|
-
'200': "GenerateCertificateResponse",
|
|
168
|
-
'400': None,
|
|
169
|
-
'500': None,
|
|
170
|
-
'422': "HTTPValidationError",
|
|
171
|
-
}
|
|
172
|
-
response_data = self.api_client.call_api(
|
|
173
|
-
*_param,
|
|
174
|
-
_request_timeout=_request_timeout
|
|
175
|
-
)
|
|
176
|
-
response_data.read()
|
|
177
|
-
return self.api_client.response_deserialize(
|
|
178
|
-
response_data=response_data,
|
|
179
|
-
response_types_map=_response_types_map,
|
|
180
|
-
)
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
@validate_call
|
|
184
|
-
def generer_certificat_test_api_v1_traitement_generer_certificat_test_post_without_preload_content(
|
|
185
|
-
self,
|
|
186
|
-
generate_certificate_request: GenerateCertificateRequest,
|
|
187
|
-
_request_timeout: Union[
|
|
188
|
-
None,
|
|
189
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
190
|
-
Tuple[
|
|
191
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
192
|
-
Annotated[StrictFloat, Field(gt=0)]
|
|
193
|
-
]
|
|
194
|
-
] = None,
|
|
195
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
196
|
-
_content_type: Optional[StrictStr] = None,
|
|
197
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
198
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
199
|
-
) -> RESTResponseType:
|
|
200
|
-
"""Générer un certificat X.509 auto-signé de test
|
|
201
|
-
|
|
202
|
-
Génère un certificat X.509 auto-signé pour les tests de signature électronique PDF. **⚠️ ATTENTION : Certificat de TEST uniquement !** Ce certificat est : - ✅ Adapté pour tests et développement - ✅ Compatible signature PDF (PAdES) - ✅ Conforme eIDAS niveau **SES** (Simple Electronic Signature) - ❌ **JAMAIS utilisable en production** - ❌ **Non reconnu** par les navigateurs et lecteurs PDF - ❌ **Aucune valeur juridique** ## Niveaux eIDAS - **SES** (Simple) : Certificat auto-signé ← Généré par cet endpoint - **AdES** (Advanced) : Certificat CA commerciale (Let's Encrypt, etc.) - **QES** (Qualified) : Certificat qualifié PSCO (CertEurope, Universign, etc.) ## Utilisation Une fois généré, le certificat peut être : 1. **Enregistré dans Django** (recommandé) : - Django Admin > Certificats de signature - Upload `certificat_pem` et `cle_privee_pem` 2. **Utilisé directement** : - Signer un PDF avec `/signer-pdf` - Le certificat sera automatiquement utilisé ## Exemple d'appel ```bash curl -X POST \"https://www.factpulse.fr/api/facturation/generer-certificat-test\" \\ -H \"Authorization: Bearer eyJ0eXAi...\" \\ -H \"Content-Type: application/json\" \\ -d '{ \"cn\": \"Test Client XYZ\", \"organisation\": \"Client XYZ SARL\", \"email\": \"contact@xyz.fr\", \"duree_jours\": 365 }' ``` ## Cas d'usage - Tests de signature PDF en développement - POC de signature électronique - Formation et démos - Tests d'intégration automatisés ## Conformité technique Certificat généré avec : - Clé RSA 2048 ou 4096 bits - Algorithme SHA-256 - Extensions Key Usage : `digitalSignature`, `contentCommitment` (non-repudiation) - Extensions Extended Key Usage : `codeSigning`, `emailProtection` - Validité : 1 jour à 10 ans (configurable) - Format : PEM (certificat et clé) - Optionnel : PKCS#12 (.p12)
|
|
203
|
-
|
|
204
|
-
:param generate_certificate_request: (required)
|
|
205
|
-
:type generate_certificate_request: GenerateCertificateRequest
|
|
206
|
-
:param _request_timeout: timeout setting for this request. If one
|
|
207
|
-
number provided, it will be total request
|
|
208
|
-
timeout. It can also be a pair (tuple) of
|
|
209
|
-
(connection, read) timeouts.
|
|
210
|
-
:type _request_timeout: int, tuple(int, int), optional
|
|
211
|
-
:param _request_auth: set to override the auth_settings for an a single
|
|
212
|
-
request; this effectively ignores the
|
|
213
|
-
authentication in the spec for a single request.
|
|
214
|
-
:type _request_auth: dict, optional
|
|
215
|
-
:param _content_type: force content-type for the request.
|
|
216
|
-
:type _content_type: str, Optional
|
|
217
|
-
:param _headers: set to override the headers for a single
|
|
218
|
-
request; this effectively ignores the headers
|
|
219
|
-
in the spec for a single request.
|
|
220
|
-
:type _headers: dict, optional
|
|
221
|
-
:param _host_index: set to override the host_index for a single
|
|
222
|
-
request; this effectively ignores the host_index
|
|
223
|
-
in the spec for a single request.
|
|
224
|
-
:type _host_index: int, optional
|
|
225
|
-
:return: Returns the result object.
|
|
226
|
-
""" # noqa: E501
|
|
227
|
-
|
|
228
|
-
_param = self._generer_certificat_test_api_v1_traitement_generer_certificat_test_post_serialize(
|
|
229
|
-
generate_certificate_request=generate_certificate_request,
|
|
230
|
-
_request_auth=_request_auth,
|
|
231
|
-
_content_type=_content_type,
|
|
232
|
-
_headers=_headers,
|
|
233
|
-
_host_index=_host_index
|
|
234
|
-
)
|
|
235
|
-
|
|
236
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
|
237
|
-
'200': "GenerateCertificateResponse",
|
|
238
|
-
'400': None,
|
|
239
|
-
'500': None,
|
|
240
|
-
'422': "HTTPValidationError",
|
|
241
|
-
}
|
|
242
|
-
response_data = self.api_client.call_api(
|
|
243
|
-
*_param,
|
|
244
|
-
_request_timeout=_request_timeout
|
|
245
|
-
)
|
|
246
|
-
return response_data.response
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
def _generer_certificat_test_api_v1_traitement_generer_certificat_test_post_serialize(
|
|
250
|
-
self,
|
|
251
|
-
generate_certificate_request,
|
|
252
|
-
_request_auth,
|
|
253
|
-
_content_type,
|
|
254
|
-
_headers,
|
|
255
|
-
_host_index,
|
|
256
|
-
) -> RequestSerialized:
|
|
257
|
-
|
|
258
|
-
_host = None
|
|
259
|
-
|
|
260
|
-
_collection_formats: Dict[str, str] = {
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
_path_params: Dict[str, str] = {}
|
|
264
|
-
_query_params: List[Tuple[str, str]] = []
|
|
265
|
-
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
266
|
-
_form_params: List[Tuple[str, str]] = []
|
|
267
|
-
_files: Dict[
|
|
268
|
-
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
269
|
-
] = {}
|
|
270
|
-
_body_params: Optional[bytes] = None
|
|
271
|
-
|
|
272
|
-
# process the path parameters
|
|
273
|
-
# process the query parameters
|
|
274
|
-
# process the header parameters
|
|
275
|
-
# process the form parameters
|
|
276
|
-
# process the body parameter
|
|
277
|
-
if generate_certificate_request is not None:
|
|
278
|
-
_body_params = generate_certificate_request
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
# set the HTTP header `Accept`
|
|
282
|
-
if 'Accept' not in _header_params:
|
|
283
|
-
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
284
|
-
[
|
|
285
|
-
'application/json'
|
|
286
|
-
]
|
|
287
|
-
)
|
|
288
|
-
|
|
289
|
-
# set the HTTP header `Content-Type`
|
|
290
|
-
if _content_type:
|
|
291
|
-
_header_params['Content-Type'] = _content_type
|
|
292
|
-
else:
|
|
293
|
-
_default_content_type = (
|
|
294
|
-
self.api_client.select_header_content_type(
|
|
295
|
-
[
|
|
296
|
-
'application/json'
|
|
297
|
-
]
|
|
298
|
-
)
|
|
299
|
-
)
|
|
300
|
-
if _default_content_type is not None:
|
|
301
|
-
_header_params['Content-Type'] = _default_content_type
|
|
302
|
-
|
|
303
|
-
# authentication setting
|
|
304
|
-
_auth_settings: List[str] = [
|
|
305
|
-
'HTTPBearer'
|
|
306
|
-
]
|
|
307
|
-
|
|
308
|
-
return self.api_client.param_serialize(
|
|
309
|
-
method='POST',
|
|
310
|
-
resource_path='/api/v1/traitement/generer-certificat-test',
|
|
311
|
-
path_params=_path_params,
|
|
312
|
-
query_params=_query_params,
|
|
313
|
-
header_params=_header_params,
|
|
314
|
-
body=_body_params,
|
|
315
|
-
post_params=_form_params,
|
|
316
|
-
files=_files,
|
|
317
|
-
auth_settings=_auth_settings,
|
|
318
|
-
collection_formats=_collection_formats,
|
|
319
|
-
_host=_host,
|
|
320
|
-
_request_auth=_request_auth
|
|
321
|
-
)
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
@validate_call
|
|
327
|
-
def signer_pdf_api_v1_traitement_signer_pdf_post(
|
|
328
|
-
self,
|
|
329
|
-
fichier_pdf: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description="Fichier PDF à signer (sera traité puis retourné signé en base64)")],
|
|
330
|
-
raison: Optional[StrictStr] = None,
|
|
331
|
-
localisation: Optional[StrictStr] = None,
|
|
332
|
-
contact: Optional[StrictStr] = None,
|
|
333
|
-
field_name: Annotated[Optional[StrictStr], Field(description="Nom du champ de signature PDF")] = None,
|
|
334
|
-
use_pades_lt: Annotated[Optional[StrictBool], Field(description="Activer PAdES-B-LT (archivage long terme avec données de validation embarquées). NÉCESSITE un certificat avec accès OCSP/CRL.")] = None,
|
|
335
|
-
use_timestamp: Annotated[Optional[StrictBool], Field(description="Activer l'horodatage RFC 3161 avec FreeTSA (PAdES-B-T)")] = None,
|
|
336
|
-
_request_timeout: Union[
|
|
337
|
-
None,
|
|
338
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
339
|
-
Tuple[
|
|
340
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
341
|
-
Annotated[StrictFloat, Field(gt=0)]
|
|
342
|
-
]
|
|
343
|
-
] = None,
|
|
344
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
345
|
-
_content_type: Optional[StrictStr] = None,
|
|
346
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
347
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
348
|
-
) -> object:
|
|
349
|
-
"""Signer un PDF avec le certificat du client (PAdES-B-LT)
|
|
350
|
-
|
|
351
|
-
Signe un PDF uploadé avec le certificat électronique configuré pour le client (via client_uid du JWT). **Standards supportés** : PAdES-B-B, PAdES-B-T (horodatage), PAdES-B-LT (archivage long terme). **Niveaux eIDAS** : SES (auto-signé), AdES (CA commerciale), QES (PSCO - hors scope). **⚠️ Disclaimer légal** : Les signatures générées sont des cachets électroniques au sens du règlement eIDAS. Le niveau de validité juridique dépend du certificat utilisé (SES/AdES/QES). FactPulse ne fournit pas de certificats qualifiés QES - vous devez obtenir un certificat auprès d'un PSCO (Prestataire de Services de Confiance qualifié) pour une validité juridique maximale.
|
|
352
|
-
|
|
353
|
-
:param fichier_pdf: Fichier PDF à signer (sera traité puis retourné signé en base64) (required)
|
|
354
|
-
:type fichier_pdf: bytearray
|
|
355
|
-
:param raison:
|
|
356
|
-
:type raison: str
|
|
357
|
-
:param localisation:
|
|
358
|
-
:type localisation: str
|
|
359
|
-
:param contact:
|
|
360
|
-
:type contact: str
|
|
361
|
-
:param field_name: Nom du champ de signature PDF
|
|
362
|
-
:type field_name: str
|
|
363
|
-
:param use_pades_lt: Activer PAdES-B-LT (archivage long terme avec données de validation embarquées). NÉCESSITE un certificat avec accès OCSP/CRL.
|
|
364
|
-
:type use_pades_lt: bool
|
|
365
|
-
:param use_timestamp: Activer l'horodatage RFC 3161 avec FreeTSA (PAdES-B-T)
|
|
366
|
-
:type use_timestamp: bool
|
|
367
|
-
:param _request_timeout: timeout setting for this request. If one
|
|
368
|
-
number provided, it will be total request
|
|
369
|
-
timeout. It can also be a pair (tuple) of
|
|
370
|
-
(connection, read) timeouts.
|
|
371
|
-
:type _request_timeout: int, tuple(int, int), optional
|
|
372
|
-
:param _request_auth: set to override the auth_settings for an a single
|
|
373
|
-
request; this effectively ignores the
|
|
374
|
-
authentication in the spec for a single request.
|
|
375
|
-
:type _request_auth: dict, optional
|
|
376
|
-
:param _content_type: force content-type for the request.
|
|
377
|
-
:type _content_type: str, Optional
|
|
378
|
-
:param _headers: set to override the headers for a single
|
|
379
|
-
request; this effectively ignores the headers
|
|
380
|
-
in the spec for a single request.
|
|
381
|
-
:type _headers: dict, optional
|
|
382
|
-
:param _host_index: set to override the host_index for a single
|
|
383
|
-
request; this effectively ignores the host_index
|
|
384
|
-
in the spec for a single request.
|
|
385
|
-
:type _host_index: int, optional
|
|
386
|
-
:return: Returns the result object.
|
|
387
|
-
""" # noqa: E501
|
|
388
|
-
|
|
389
|
-
_param = self._signer_pdf_api_v1_traitement_signer_pdf_post_serialize(
|
|
390
|
-
fichier_pdf=fichier_pdf,
|
|
391
|
-
raison=raison,
|
|
392
|
-
localisation=localisation,
|
|
393
|
-
contact=contact,
|
|
394
|
-
field_name=field_name,
|
|
395
|
-
use_pades_lt=use_pades_lt,
|
|
396
|
-
use_timestamp=use_timestamp,
|
|
397
|
-
_request_auth=_request_auth,
|
|
398
|
-
_content_type=_content_type,
|
|
399
|
-
_headers=_headers,
|
|
400
|
-
_host_index=_host_index
|
|
401
|
-
)
|
|
402
|
-
|
|
403
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
|
404
|
-
'200': "object",
|
|
405
|
-
'400': None,
|
|
406
|
-
'404': None,
|
|
407
|
-
'401': None,
|
|
408
|
-
'503': None,
|
|
409
|
-
'422': "HTTPValidationError",
|
|
410
|
-
}
|
|
411
|
-
response_data = self.api_client.call_api(
|
|
412
|
-
*_param,
|
|
413
|
-
_request_timeout=_request_timeout
|
|
414
|
-
)
|
|
415
|
-
response_data.read()
|
|
416
|
-
return self.api_client.response_deserialize(
|
|
417
|
-
response_data=response_data,
|
|
418
|
-
response_types_map=_response_types_map,
|
|
419
|
-
).data
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
@validate_call
|
|
423
|
-
def signer_pdf_api_v1_traitement_signer_pdf_post_with_http_info(
|
|
424
|
-
self,
|
|
425
|
-
fichier_pdf: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description="Fichier PDF à signer (sera traité puis retourné signé en base64)")],
|
|
426
|
-
raison: Optional[StrictStr] = None,
|
|
427
|
-
localisation: Optional[StrictStr] = None,
|
|
428
|
-
contact: Optional[StrictStr] = None,
|
|
429
|
-
field_name: Annotated[Optional[StrictStr], Field(description="Nom du champ de signature PDF")] = None,
|
|
430
|
-
use_pades_lt: Annotated[Optional[StrictBool], Field(description="Activer PAdES-B-LT (archivage long terme avec données de validation embarquées). NÉCESSITE un certificat avec accès OCSP/CRL.")] = None,
|
|
431
|
-
use_timestamp: Annotated[Optional[StrictBool], Field(description="Activer l'horodatage RFC 3161 avec FreeTSA (PAdES-B-T)")] = None,
|
|
432
|
-
_request_timeout: Union[
|
|
433
|
-
None,
|
|
434
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
435
|
-
Tuple[
|
|
436
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
437
|
-
Annotated[StrictFloat, Field(gt=0)]
|
|
438
|
-
]
|
|
439
|
-
] = None,
|
|
440
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
441
|
-
_content_type: Optional[StrictStr] = None,
|
|
442
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
443
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
444
|
-
) -> ApiResponse[object]:
|
|
445
|
-
"""Signer un PDF avec le certificat du client (PAdES-B-LT)
|
|
446
|
-
|
|
447
|
-
Signe un PDF uploadé avec le certificat électronique configuré pour le client (via client_uid du JWT). **Standards supportés** : PAdES-B-B, PAdES-B-T (horodatage), PAdES-B-LT (archivage long terme). **Niveaux eIDAS** : SES (auto-signé), AdES (CA commerciale), QES (PSCO - hors scope). **⚠️ Disclaimer légal** : Les signatures générées sont des cachets électroniques au sens du règlement eIDAS. Le niveau de validité juridique dépend du certificat utilisé (SES/AdES/QES). FactPulse ne fournit pas de certificats qualifiés QES - vous devez obtenir un certificat auprès d'un PSCO (Prestataire de Services de Confiance qualifié) pour une validité juridique maximale.
|
|
448
|
-
|
|
449
|
-
:param fichier_pdf: Fichier PDF à signer (sera traité puis retourné signé en base64) (required)
|
|
450
|
-
:type fichier_pdf: bytearray
|
|
451
|
-
:param raison:
|
|
452
|
-
:type raison: str
|
|
453
|
-
:param localisation:
|
|
454
|
-
:type localisation: str
|
|
455
|
-
:param contact:
|
|
456
|
-
:type contact: str
|
|
457
|
-
:param field_name: Nom du champ de signature PDF
|
|
458
|
-
:type field_name: str
|
|
459
|
-
:param use_pades_lt: Activer PAdES-B-LT (archivage long terme avec données de validation embarquées). NÉCESSITE un certificat avec accès OCSP/CRL.
|
|
460
|
-
:type use_pades_lt: bool
|
|
461
|
-
:param use_timestamp: Activer l'horodatage RFC 3161 avec FreeTSA (PAdES-B-T)
|
|
462
|
-
:type use_timestamp: bool
|
|
463
|
-
:param _request_timeout: timeout setting for this request. If one
|
|
464
|
-
number provided, it will be total request
|
|
465
|
-
timeout. It can also be a pair (tuple) of
|
|
466
|
-
(connection, read) timeouts.
|
|
467
|
-
:type _request_timeout: int, tuple(int, int), optional
|
|
468
|
-
:param _request_auth: set to override the auth_settings for an a single
|
|
469
|
-
request; this effectively ignores the
|
|
470
|
-
authentication in the spec for a single request.
|
|
471
|
-
:type _request_auth: dict, optional
|
|
472
|
-
:param _content_type: force content-type for the request.
|
|
473
|
-
:type _content_type: str, Optional
|
|
474
|
-
:param _headers: set to override the headers for a single
|
|
475
|
-
request; this effectively ignores the headers
|
|
476
|
-
in the spec for a single request.
|
|
477
|
-
:type _headers: dict, optional
|
|
478
|
-
:param _host_index: set to override the host_index for a single
|
|
479
|
-
request; this effectively ignores the host_index
|
|
480
|
-
in the spec for a single request.
|
|
481
|
-
:type _host_index: int, optional
|
|
482
|
-
:return: Returns the result object.
|
|
483
|
-
""" # noqa: E501
|
|
484
|
-
|
|
485
|
-
_param = self._signer_pdf_api_v1_traitement_signer_pdf_post_serialize(
|
|
486
|
-
fichier_pdf=fichier_pdf,
|
|
487
|
-
raison=raison,
|
|
488
|
-
localisation=localisation,
|
|
489
|
-
contact=contact,
|
|
490
|
-
field_name=field_name,
|
|
491
|
-
use_pades_lt=use_pades_lt,
|
|
492
|
-
use_timestamp=use_timestamp,
|
|
493
|
-
_request_auth=_request_auth,
|
|
494
|
-
_content_type=_content_type,
|
|
495
|
-
_headers=_headers,
|
|
496
|
-
_host_index=_host_index
|
|
497
|
-
)
|
|
498
|
-
|
|
499
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
|
500
|
-
'200': "object",
|
|
501
|
-
'400': None,
|
|
502
|
-
'404': None,
|
|
503
|
-
'401': None,
|
|
504
|
-
'503': None,
|
|
505
|
-
'422': "HTTPValidationError",
|
|
506
|
-
}
|
|
507
|
-
response_data = self.api_client.call_api(
|
|
508
|
-
*_param,
|
|
509
|
-
_request_timeout=_request_timeout
|
|
510
|
-
)
|
|
511
|
-
response_data.read()
|
|
512
|
-
return self.api_client.response_deserialize(
|
|
513
|
-
response_data=response_data,
|
|
514
|
-
response_types_map=_response_types_map,
|
|
515
|
-
)
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
@validate_call
|
|
519
|
-
def signer_pdf_api_v1_traitement_signer_pdf_post_without_preload_content(
|
|
520
|
-
self,
|
|
521
|
-
fichier_pdf: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description="Fichier PDF à signer (sera traité puis retourné signé en base64)")],
|
|
522
|
-
raison: Optional[StrictStr] = None,
|
|
523
|
-
localisation: Optional[StrictStr] = None,
|
|
524
|
-
contact: Optional[StrictStr] = None,
|
|
525
|
-
field_name: Annotated[Optional[StrictStr], Field(description="Nom du champ de signature PDF")] = None,
|
|
526
|
-
use_pades_lt: Annotated[Optional[StrictBool], Field(description="Activer PAdES-B-LT (archivage long terme avec données de validation embarquées). NÉCESSITE un certificat avec accès OCSP/CRL.")] = None,
|
|
527
|
-
use_timestamp: Annotated[Optional[StrictBool], Field(description="Activer l'horodatage RFC 3161 avec FreeTSA (PAdES-B-T)")] = None,
|
|
528
|
-
_request_timeout: Union[
|
|
529
|
-
None,
|
|
530
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
531
|
-
Tuple[
|
|
532
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
533
|
-
Annotated[StrictFloat, Field(gt=0)]
|
|
534
|
-
]
|
|
535
|
-
] = None,
|
|
536
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
537
|
-
_content_type: Optional[StrictStr] = None,
|
|
538
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
539
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
540
|
-
) -> RESTResponseType:
|
|
541
|
-
"""Signer un PDF avec le certificat du client (PAdES-B-LT)
|
|
542
|
-
|
|
543
|
-
Signe un PDF uploadé avec le certificat électronique configuré pour le client (via client_uid du JWT). **Standards supportés** : PAdES-B-B, PAdES-B-T (horodatage), PAdES-B-LT (archivage long terme). **Niveaux eIDAS** : SES (auto-signé), AdES (CA commerciale), QES (PSCO - hors scope). **⚠️ Disclaimer légal** : Les signatures générées sont des cachets électroniques au sens du règlement eIDAS. Le niveau de validité juridique dépend du certificat utilisé (SES/AdES/QES). FactPulse ne fournit pas de certificats qualifiés QES - vous devez obtenir un certificat auprès d'un PSCO (Prestataire de Services de Confiance qualifié) pour une validité juridique maximale.
|
|
544
|
-
|
|
545
|
-
:param fichier_pdf: Fichier PDF à signer (sera traité puis retourné signé en base64) (required)
|
|
546
|
-
:type fichier_pdf: bytearray
|
|
547
|
-
:param raison:
|
|
548
|
-
:type raison: str
|
|
549
|
-
:param localisation:
|
|
550
|
-
:type localisation: str
|
|
551
|
-
:param contact:
|
|
552
|
-
:type contact: str
|
|
553
|
-
:param field_name: Nom du champ de signature PDF
|
|
554
|
-
:type field_name: str
|
|
555
|
-
:param use_pades_lt: Activer PAdES-B-LT (archivage long terme avec données de validation embarquées). NÉCESSITE un certificat avec accès OCSP/CRL.
|
|
556
|
-
:type use_pades_lt: bool
|
|
557
|
-
:param use_timestamp: Activer l'horodatage RFC 3161 avec FreeTSA (PAdES-B-T)
|
|
558
|
-
:type use_timestamp: bool
|
|
559
|
-
:param _request_timeout: timeout setting for this request. If one
|
|
560
|
-
number provided, it will be total request
|
|
561
|
-
timeout. It can also be a pair (tuple) of
|
|
562
|
-
(connection, read) timeouts.
|
|
563
|
-
:type _request_timeout: int, tuple(int, int), optional
|
|
564
|
-
:param _request_auth: set to override the auth_settings for an a single
|
|
565
|
-
request; this effectively ignores the
|
|
566
|
-
authentication in the spec for a single request.
|
|
567
|
-
:type _request_auth: dict, optional
|
|
568
|
-
:param _content_type: force content-type for the request.
|
|
569
|
-
:type _content_type: str, Optional
|
|
570
|
-
:param _headers: set to override the headers for a single
|
|
571
|
-
request; this effectively ignores the headers
|
|
572
|
-
in the spec for a single request.
|
|
573
|
-
:type _headers: dict, optional
|
|
574
|
-
:param _host_index: set to override the host_index for a single
|
|
575
|
-
request; this effectively ignores the host_index
|
|
576
|
-
in the spec for a single request.
|
|
577
|
-
:type _host_index: int, optional
|
|
578
|
-
:return: Returns the result object.
|
|
579
|
-
""" # noqa: E501
|
|
580
|
-
|
|
581
|
-
_param = self._signer_pdf_api_v1_traitement_signer_pdf_post_serialize(
|
|
582
|
-
fichier_pdf=fichier_pdf,
|
|
583
|
-
raison=raison,
|
|
584
|
-
localisation=localisation,
|
|
585
|
-
contact=contact,
|
|
586
|
-
field_name=field_name,
|
|
587
|
-
use_pades_lt=use_pades_lt,
|
|
588
|
-
use_timestamp=use_timestamp,
|
|
589
|
-
_request_auth=_request_auth,
|
|
590
|
-
_content_type=_content_type,
|
|
591
|
-
_headers=_headers,
|
|
592
|
-
_host_index=_host_index
|
|
593
|
-
)
|
|
594
|
-
|
|
595
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
|
596
|
-
'200': "object",
|
|
597
|
-
'400': None,
|
|
598
|
-
'404': None,
|
|
599
|
-
'401': None,
|
|
600
|
-
'503': None,
|
|
601
|
-
'422': "HTTPValidationError",
|
|
602
|
-
}
|
|
603
|
-
response_data = self.api_client.call_api(
|
|
604
|
-
*_param,
|
|
605
|
-
_request_timeout=_request_timeout
|
|
606
|
-
)
|
|
607
|
-
return response_data.response
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
def _signer_pdf_api_v1_traitement_signer_pdf_post_serialize(
|
|
611
|
-
self,
|
|
612
|
-
fichier_pdf,
|
|
613
|
-
raison,
|
|
614
|
-
localisation,
|
|
615
|
-
contact,
|
|
616
|
-
field_name,
|
|
617
|
-
use_pades_lt,
|
|
618
|
-
use_timestamp,
|
|
619
|
-
_request_auth,
|
|
620
|
-
_content_type,
|
|
621
|
-
_headers,
|
|
622
|
-
_host_index,
|
|
623
|
-
) -> RequestSerialized:
|
|
624
|
-
|
|
625
|
-
_host = None
|
|
626
|
-
|
|
627
|
-
_collection_formats: Dict[str, str] = {
|
|
628
|
-
}
|
|
629
|
-
|
|
630
|
-
_path_params: Dict[str, str] = {}
|
|
631
|
-
_query_params: List[Tuple[str, str]] = []
|
|
632
|
-
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
633
|
-
_form_params: List[Tuple[str, str]] = []
|
|
634
|
-
_files: Dict[
|
|
635
|
-
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
636
|
-
] = {}
|
|
637
|
-
_body_params: Optional[bytes] = None
|
|
638
|
-
|
|
639
|
-
# process the path parameters
|
|
640
|
-
# process the query parameters
|
|
641
|
-
# process the header parameters
|
|
642
|
-
# process the form parameters
|
|
643
|
-
if fichier_pdf is not None:
|
|
644
|
-
_files['fichier_pdf'] = fichier_pdf
|
|
645
|
-
if raison is not None:
|
|
646
|
-
_form_params.append(('raison', raison))
|
|
647
|
-
if localisation is not None:
|
|
648
|
-
_form_params.append(('localisation', localisation))
|
|
649
|
-
if contact is not None:
|
|
650
|
-
_form_params.append(('contact', contact))
|
|
651
|
-
if field_name is not None:
|
|
652
|
-
_form_params.append(('field_name', field_name))
|
|
653
|
-
if use_pades_lt is not None:
|
|
654
|
-
_form_params.append(('use_pades_lt', use_pades_lt))
|
|
655
|
-
if use_timestamp is not None:
|
|
656
|
-
_form_params.append(('use_timestamp', use_timestamp))
|
|
657
|
-
# process the body parameter
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
# set the HTTP header `Accept`
|
|
661
|
-
if 'Accept' not in _header_params:
|
|
662
|
-
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
663
|
-
[
|
|
664
|
-
'application/json'
|
|
665
|
-
]
|
|
666
|
-
)
|
|
667
|
-
|
|
668
|
-
# set the HTTP header `Content-Type`
|
|
669
|
-
if _content_type:
|
|
670
|
-
_header_params['Content-Type'] = _content_type
|
|
671
|
-
else:
|
|
672
|
-
_default_content_type = (
|
|
673
|
-
self.api_client.select_header_content_type(
|
|
674
|
-
[
|
|
675
|
-
'multipart/form-data'
|
|
676
|
-
]
|
|
677
|
-
)
|
|
678
|
-
)
|
|
679
|
-
if _default_content_type is not None:
|
|
680
|
-
_header_params['Content-Type'] = _default_content_type
|
|
681
|
-
|
|
682
|
-
# authentication setting
|
|
683
|
-
_auth_settings: List[str] = [
|
|
684
|
-
'HTTPBearer'
|
|
685
|
-
]
|
|
686
|
-
|
|
687
|
-
return self.api_client.param_serialize(
|
|
688
|
-
method='POST',
|
|
689
|
-
resource_path='/api/v1/traitement/signer-pdf',
|
|
690
|
-
path_params=_path_params,
|
|
691
|
-
query_params=_query_params,
|
|
692
|
-
header_params=_header_params,
|
|
693
|
-
body=_body_params,
|
|
694
|
-
post_params=_form_params,
|
|
695
|
-
files=_files,
|
|
696
|
-
auth_settings=_auth_settings,
|
|
697
|
-
collection_formats=_collection_formats,
|
|
698
|
-
_host=_host,
|
|
699
|
-
_request_auth=_request_auth
|
|
700
|
-
)
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
@validate_call
|
|
706
|
-
def signer_pdf_async_api_v1_traitement_signer_pdf_async_post(
|
|
707
|
-
self,
|
|
708
|
-
fichier_pdf: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description="Fichier PDF à signer (traité de manière asynchrone)")],
|
|
709
|
-
raison: Optional[StrictStr] = None,
|
|
710
|
-
localisation: Optional[StrictStr] = None,
|
|
711
|
-
contact: Optional[StrictStr] = None,
|
|
712
|
-
field_name: Annotated[Optional[StrictStr], Field(description="Nom du champ de signature PDF")] = None,
|
|
713
|
-
use_pades_lt: Annotated[Optional[StrictBool], Field(description="Activer PAdES-B-LT (archivage long terme avec données de validation embarquées). NÉCESSITE un certificat avec accès OCSP/CRL.")] = None,
|
|
714
|
-
use_timestamp: Annotated[Optional[StrictBool], Field(description="Activer l'horodatage RFC 3161 avec FreeTSA (PAdES-B-T)")] = None,
|
|
715
|
-
_request_timeout: Union[
|
|
716
|
-
None,
|
|
717
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
718
|
-
Tuple[
|
|
719
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
720
|
-
Annotated[StrictFloat, Field(gt=0)]
|
|
721
|
-
]
|
|
722
|
-
] = None,
|
|
723
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
724
|
-
_content_type: Optional[StrictStr] = None,
|
|
725
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
726
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
727
|
-
) -> object:
|
|
728
|
-
"""Signer un PDF de manière asynchrone (Celery)
|
|
729
|
-
|
|
730
|
-
Signe un PDF uploadé de manière asynchrone via une tâche Celery. **Différence avec /signer-pdf** : - `/signer-pdf` : Signature synchrone (blocage jusqu'à la fin) - `/signer-pdf-async` : Signature asynchrone (retourne immédiatement un task_id) **Avantages de l'async** : - Pas de timeout pour les gros fichiers - Pas de blocage du worker FastAPI - Possibilité de suivre la progression via le task_id - Idéal pour les traitements par lot **Standards supportés** : PAdES-B-B, PAdES-B-T (horodatage), PAdES-B-LT (archivage long terme). **⚠️ Disclaimer légal** : Identique à /signer-pdf (voir documentation de cet endpoint).
|
|
731
|
-
|
|
732
|
-
:param fichier_pdf: Fichier PDF à signer (traité de manière asynchrone) (required)
|
|
733
|
-
:type fichier_pdf: bytearray
|
|
734
|
-
:param raison:
|
|
735
|
-
:type raison: str
|
|
736
|
-
:param localisation:
|
|
737
|
-
:type localisation: str
|
|
738
|
-
:param contact:
|
|
739
|
-
:type contact: str
|
|
740
|
-
:param field_name: Nom du champ de signature PDF
|
|
741
|
-
:type field_name: str
|
|
742
|
-
:param use_pades_lt: Activer PAdES-B-LT (archivage long terme avec données de validation embarquées). NÉCESSITE un certificat avec accès OCSP/CRL.
|
|
743
|
-
:type use_pades_lt: bool
|
|
744
|
-
:param use_timestamp: Activer l'horodatage RFC 3161 avec FreeTSA (PAdES-B-T)
|
|
745
|
-
:type use_timestamp: bool
|
|
746
|
-
:param _request_timeout: timeout setting for this request. If one
|
|
747
|
-
number provided, it will be total request
|
|
748
|
-
timeout. It can also be a pair (tuple) of
|
|
749
|
-
(connection, read) timeouts.
|
|
750
|
-
:type _request_timeout: int, tuple(int, int), optional
|
|
751
|
-
:param _request_auth: set to override the auth_settings for an a single
|
|
752
|
-
request; this effectively ignores the
|
|
753
|
-
authentication in the spec for a single request.
|
|
754
|
-
:type _request_auth: dict, optional
|
|
755
|
-
:param _content_type: force content-type for the request.
|
|
756
|
-
:type _content_type: str, Optional
|
|
757
|
-
:param _headers: set to override the headers for a single
|
|
758
|
-
request; this effectively ignores the headers
|
|
759
|
-
in the spec for a single request.
|
|
760
|
-
:type _headers: dict, optional
|
|
761
|
-
:param _host_index: set to override the host_index for a single
|
|
762
|
-
request; this effectively ignores the host_index
|
|
763
|
-
in the spec for a single request.
|
|
764
|
-
:type _host_index: int, optional
|
|
765
|
-
:return: Returns the result object.
|
|
766
|
-
""" # noqa: E501
|
|
767
|
-
|
|
768
|
-
_param = self._signer_pdf_async_api_v1_traitement_signer_pdf_async_post_serialize(
|
|
769
|
-
fichier_pdf=fichier_pdf,
|
|
770
|
-
raison=raison,
|
|
771
|
-
localisation=localisation,
|
|
772
|
-
contact=contact,
|
|
773
|
-
field_name=field_name,
|
|
774
|
-
use_pades_lt=use_pades_lt,
|
|
775
|
-
use_timestamp=use_timestamp,
|
|
776
|
-
_request_auth=_request_auth,
|
|
777
|
-
_content_type=_content_type,
|
|
778
|
-
_headers=_headers,
|
|
779
|
-
_host_index=_host_index
|
|
780
|
-
)
|
|
781
|
-
|
|
782
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
|
783
|
-
'200': "object",
|
|
784
|
-
'202': None,
|
|
785
|
-
'400': None,
|
|
786
|
-
'401': None,
|
|
787
|
-
'422': "HTTPValidationError",
|
|
788
|
-
}
|
|
789
|
-
response_data = self.api_client.call_api(
|
|
790
|
-
*_param,
|
|
791
|
-
_request_timeout=_request_timeout
|
|
792
|
-
)
|
|
793
|
-
response_data.read()
|
|
794
|
-
return self.api_client.response_deserialize(
|
|
795
|
-
response_data=response_data,
|
|
796
|
-
response_types_map=_response_types_map,
|
|
797
|
-
).data
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
@validate_call
|
|
801
|
-
def signer_pdf_async_api_v1_traitement_signer_pdf_async_post_with_http_info(
|
|
802
|
-
self,
|
|
803
|
-
fichier_pdf: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description="Fichier PDF à signer (traité de manière asynchrone)")],
|
|
804
|
-
raison: Optional[StrictStr] = None,
|
|
805
|
-
localisation: Optional[StrictStr] = None,
|
|
806
|
-
contact: Optional[StrictStr] = None,
|
|
807
|
-
field_name: Annotated[Optional[StrictStr], Field(description="Nom du champ de signature PDF")] = None,
|
|
808
|
-
use_pades_lt: Annotated[Optional[StrictBool], Field(description="Activer PAdES-B-LT (archivage long terme avec données de validation embarquées). NÉCESSITE un certificat avec accès OCSP/CRL.")] = None,
|
|
809
|
-
use_timestamp: Annotated[Optional[StrictBool], Field(description="Activer l'horodatage RFC 3161 avec FreeTSA (PAdES-B-T)")] = None,
|
|
810
|
-
_request_timeout: Union[
|
|
811
|
-
None,
|
|
812
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
813
|
-
Tuple[
|
|
814
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
815
|
-
Annotated[StrictFloat, Field(gt=0)]
|
|
816
|
-
]
|
|
817
|
-
] = None,
|
|
818
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
819
|
-
_content_type: Optional[StrictStr] = None,
|
|
820
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
821
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
822
|
-
) -> ApiResponse[object]:
|
|
823
|
-
"""Signer un PDF de manière asynchrone (Celery)
|
|
824
|
-
|
|
825
|
-
Signe un PDF uploadé de manière asynchrone via une tâche Celery. **Différence avec /signer-pdf** : - `/signer-pdf` : Signature synchrone (blocage jusqu'à la fin) - `/signer-pdf-async` : Signature asynchrone (retourne immédiatement un task_id) **Avantages de l'async** : - Pas de timeout pour les gros fichiers - Pas de blocage du worker FastAPI - Possibilité de suivre la progression via le task_id - Idéal pour les traitements par lot **Standards supportés** : PAdES-B-B, PAdES-B-T (horodatage), PAdES-B-LT (archivage long terme). **⚠️ Disclaimer légal** : Identique à /signer-pdf (voir documentation de cet endpoint).
|
|
826
|
-
|
|
827
|
-
:param fichier_pdf: Fichier PDF à signer (traité de manière asynchrone) (required)
|
|
828
|
-
:type fichier_pdf: bytearray
|
|
829
|
-
:param raison:
|
|
830
|
-
:type raison: str
|
|
831
|
-
:param localisation:
|
|
832
|
-
:type localisation: str
|
|
833
|
-
:param contact:
|
|
834
|
-
:type contact: str
|
|
835
|
-
:param field_name: Nom du champ de signature PDF
|
|
836
|
-
:type field_name: str
|
|
837
|
-
:param use_pades_lt: Activer PAdES-B-LT (archivage long terme avec données de validation embarquées). NÉCESSITE un certificat avec accès OCSP/CRL.
|
|
838
|
-
:type use_pades_lt: bool
|
|
839
|
-
:param use_timestamp: Activer l'horodatage RFC 3161 avec FreeTSA (PAdES-B-T)
|
|
840
|
-
:type use_timestamp: bool
|
|
841
|
-
:param _request_timeout: timeout setting for this request. If one
|
|
842
|
-
number provided, it will be total request
|
|
843
|
-
timeout. It can also be a pair (tuple) of
|
|
844
|
-
(connection, read) timeouts.
|
|
845
|
-
:type _request_timeout: int, tuple(int, int), optional
|
|
846
|
-
:param _request_auth: set to override the auth_settings for an a single
|
|
847
|
-
request; this effectively ignores the
|
|
848
|
-
authentication in the spec for a single request.
|
|
849
|
-
:type _request_auth: dict, optional
|
|
850
|
-
:param _content_type: force content-type for the request.
|
|
851
|
-
:type _content_type: str, Optional
|
|
852
|
-
:param _headers: set to override the headers for a single
|
|
853
|
-
request; this effectively ignores the headers
|
|
854
|
-
in the spec for a single request.
|
|
855
|
-
:type _headers: dict, optional
|
|
856
|
-
:param _host_index: set to override the host_index for a single
|
|
857
|
-
request; this effectively ignores the host_index
|
|
858
|
-
in the spec for a single request.
|
|
859
|
-
:type _host_index: int, optional
|
|
860
|
-
:return: Returns the result object.
|
|
861
|
-
""" # noqa: E501
|
|
862
|
-
|
|
863
|
-
_param = self._signer_pdf_async_api_v1_traitement_signer_pdf_async_post_serialize(
|
|
864
|
-
fichier_pdf=fichier_pdf,
|
|
865
|
-
raison=raison,
|
|
866
|
-
localisation=localisation,
|
|
867
|
-
contact=contact,
|
|
868
|
-
field_name=field_name,
|
|
869
|
-
use_pades_lt=use_pades_lt,
|
|
870
|
-
use_timestamp=use_timestamp,
|
|
871
|
-
_request_auth=_request_auth,
|
|
872
|
-
_content_type=_content_type,
|
|
873
|
-
_headers=_headers,
|
|
874
|
-
_host_index=_host_index
|
|
875
|
-
)
|
|
876
|
-
|
|
877
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
|
878
|
-
'200': "object",
|
|
879
|
-
'202': None,
|
|
880
|
-
'400': None,
|
|
881
|
-
'401': None,
|
|
882
|
-
'422': "HTTPValidationError",
|
|
883
|
-
}
|
|
884
|
-
response_data = self.api_client.call_api(
|
|
885
|
-
*_param,
|
|
886
|
-
_request_timeout=_request_timeout
|
|
887
|
-
)
|
|
888
|
-
response_data.read()
|
|
889
|
-
return self.api_client.response_deserialize(
|
|
890
|
-
response_data=response_data,
|
|
891
|
-
response_types_map=_response_types_map,
|
|
892
|
-
)
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
@validate_call
|
|
896
|
-
def signer_pdf_async_api_v1_traitement_signer_pdf_async_post_without_preload_content(
|
|
897
|
-
self,
|
|
898
|
-
fichier_pdf: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description="Fichier PDF à signer (traité de manière asynchrone)")],
|
|
899
|
-
raison: Optional[StrictStr] = None,
|
|
900
|
-
localisation: Optional[StrictStr] = None,
|
|
901
|
-
contact: Optional[StrictStr] = None,
|
|
902
|
-
field_name: Annotated[Optional[StrictStr], Field(description="Nom du champ de signature PDF")] = None,
|
|
903
|
-
use_pades_lt: Annotated[Optional[StrictBool], Field(description="Activer PAdES-B-LT (archivage long terme avec données de validation embarquées). NÉCESSITE un certificat avec accès OCSP/CRL.")] = None,
|
|
904
|
-
use_timestamp: Annotated[Optional[StrictBool], Field(description="Activer l'horodatage RFC 3161 avec FreeTSA (PAdES-B-T)")] = None,
|
|
905
|
-
_request_timeout: Union[
|
|
906
|
-
None,
|
|
907
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
908
|
-
Tuple[
|
|
909
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
910
|
-
Annotated[StrictFloat, Field(gt=0)]
|
|
911
|
-
]
|
|
912
|
-
] = None,
|
|
913
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
914
|
-
_content_type: Optional[StrictStr] = None,
|
|
915
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
916
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
917
|
-
) -> RESTResponseType:
|
|
918
|
-
"""Signer un PDF de manière asynchrone (Celery)
|
|
919
|
-
|
|
920
|
-
Signe un PDF uploadé de manière asynchrone via une tâche Celery. **Différence avec /signer-pdf** : - `/signer-pdf` : Signature synchrone (blocage jusqu'à la fin) - `/signer-pdf-async` : Signature asynchrone (retourne immédiatement un task_id) **Avantages de l'async** : - Pas de timeout pour les gros fichiers - Pas de blocage du worker FastAPI - Possibilité de suivre la progression via le task_id - Idéal pour les traitements par lot **Standards supportés** : PAdES-B-B, PAdES-B-T (horodatage), PAdES-B-LT (archivage long terme). **⚠️ Disclaimer légal** : Identique à /signer-pdf (voir documentation de cet endpoint).
|
|
921
|
-
|
|
922
|
-
:param fichier_pdf: Fichier PDF à signer (traité de manière asynchrone) (required)
|
|
923
|
-
:type fichier_pdf: bytearray
|
|
924
|
-
:param raison:
|
|
925
|
-
:type raison: str
|
|
926
|
-
:param localisation:
|
|
927
|
-
:type localisation: str
|
|
928
|
-
:param contact:
|
|
929
|
-
:type contact: str
|
|
930
|
-
:param field_name: Nom du champ de signature PDF
|
|
931
|
-
:type field_name: str
|
|
932
|
-
:param use_pades_lt: Activer PAdES-B-LT (archivage long terme avec données de validation embarquées). NÉCESSITE un certificat avec accès OCSP/CRL.
|
|
933
|
-
:type use_pades_lt: bool
|
|
934
|
-
:param use_timestamp: Activer l'horodatage RFC 3161 avec FreeTSA (PAdES-B-T)
|
|
935
|
-
:type use_timestamp: bool
|
|
936
|
-
:param _request_timeout: timeout setting for this request. If one
|
|
937
|
-
number provided, it will be total request
|
|
938
|
-
timeout. It can also be a pair (tuple) of
|
|
939
|
-
(connection, read) timeouts.
|
|
940
|
-
:type _request_timeout: int, tuple(int, int), optional
|
|
941
|
-
:param _request_auth: set to override the auth_settings for an a single
|
|
942
|
-
request; this effectively ignores the
|
|
943
|
-
authentication in the spec for a single request.
|
|
944
|
-
:type _request_auth: dict, optional
|
|
945
|
-
:param _content_type: force content-type for the request.
|
|
946
|
-
:type _content_type: str, Optional
|
|
947
|
-
:param _headers: set to override the headers for a single
|
|
948
|
-
request; this effectively ignores the headers
|
|
949
|
-
in the spec for a single request.
|
|
950
|
-
:type _headers: dict, optional
|
|
951
|
-
:param _host_index: set to override the host_index for a single
|
|
952
|
-
request; this effectively ignores the host_index
|
|
953
|
-
in the spec for a single request.
|
|
954
|
-
:type _host_index: int, optional
|
|
955
|
-
:return: Returns the result object.
|
|
956
|
-
""" # noqa: E501
|
|
957
|
-
|
|
958
|
-
_param = self._signer_pdf_async_api_v1_traitement_signer_pdf_async_post_serialize(
|
|
959
|
-
fichier_pdf=fichier_pdf,
|
|
960
|
-
raison=raison,
|
|
961
|
-
localisation=localisation,
|
|
962
|
-
contact=contact,
|
|
963
|
-
field_name=field_name,
|
|
964
|
-
use_pades_lt=use_pades_lt,
|
|
965
|
-
use_timestamp=use_timestamp,
|
|
966
|
-
_request_auth=_request_auth,
|
|
967
|
-
_content_type=_content_type,
|
|
968
|
-
_headers=_headers,
|
|
969
|
-
_host_index=_host_index
|
|
970
|
-
)
|
|
971
|
-
|
|
972
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
|
973
|
-
'200': "object",
|
|
974
|
-
'202': None,
|
|
975
|
-
'400': None,
|
|
976
|
-
'401': None,
|
|
977
|
-
'422': "HTTPValidationError",
|
|
978
|
-
}
|
|
979
|
-
response_data = self.api_client.call_api(
|
|
980
|
-
*_param,
|
|
981
|
-
_request_timeout=_request_timeout
|
|
982
|
-
)
|
|
983
|
-
return response_data.response
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
def _signer_pdf_async_api_v1_traitement_signer_pdf_async_post_serialize(
|
|
987
|
-
self,
|
|
988
|
-
fichier_pdf,
|
|
989
|
-
raison,
|
|
990
|
-
localisation,
|
|
991
|
-
contact,
|
|
992
|
-
field_name,
|
|
993
|
-
use_pades_lt,
|
|
994
|
-
use_timestamp,
|
|
995
|
-
_request_auth,
|
|
996
|
-
_content_type,
|
|
997
|
-
_headers,
|
|
998
|
-
_host_index,
|
|
999
|
-
) -> RequestSerialized:
|
|
1000
|
-
|
|
1001
|
-
_host = None
|
|
1002
|
-
|
|
1003
|
-
_collection_formats: Dict[str, str] = {
|
|
1004
|
-
}
|
|
1005
|
-
|
|
1006
|
-
_path_params: Dict[str, str] = {}
|
|
1007
|
-
_query_params: List[Tuple[str, str]] = []
|
|
1008
|
-
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1009
|
-
_form_params: List[Tuple[str, str]] = []
|
|
1010
|
-
_files: Dict[
|
|
1011
|
-
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1012
|
-
] = {}
|
|
1013
|
-
_body_params: Optional[bytes] = None
|
|
1014
|
-
|
|
1015
|
-
# process the path parameters
|
|
1016
|
-
# process the query parameters
|
|
1017
|
-
# process the header parameters
|
|
1018
|
-
# process the form parameters
|
|
1019
|
-
if fichier_pdf is not None:
|
|
1020
|
-
_files['fichier_pdf'] = fichier_pdf
|
|
1021
|
-
if raison is not None:
|
|
1022
|
-
_form_params.append(('raison', raison))
|
|
1023
|
-
if localisation is not None:
|
|
1024
|
-
_form_params.append(('localisation', localisation))
|
|
1025
|
-
if contact is not None:
|
|
1026
|
-
_form_params.append(('contact', contact))
|
|
1027
|
-
if field_name is not None:
|
|
1028
|
-
_form_params.append(('field_name', field_name))
|
|
1029
|
-
if use_pades_lt is not None:
|
|
1030
|
-
_form_params.append(('use_pades_lt', use_pades_lt))
|
|
1031
|
-
if use_timestamp is not None:
|
|
1032
|
-
_form_params.append(('use_timestamp', use_timestamp))
|
|
1033
|
-
# process the body parameter
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
# set the HTTP header `Accept`
|
|
1037
|
-
if 'Accept' not in _header_params:
|
|
1038
|
-
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1039
|
-
[
|
|
1040
|
-
'application/json'
|
|
1041
|
-
]
|
|
1042
|
-
)
|
|
1043
|
-
|
|
1044
|
-
# set the HTTP header `Content-Type`
|
|
1045
|
-
if _content_type:
|
|
1046
|
-
_header_params['Content-Type'] = _content_type
|
|
1047
|
-
else:
|
|
1048
|
-
_default_content_type = (
|
|
1049
|
-
self.api_client.select_header_content_type(
|
|
1050
|
-
[
|
|
1051
|
-
'multipart/form-data'
|
|
1052
|
-
]
|
|
1053
|
-
)
|
|
1054
|
-
)
|
|
1055
|
-
if _default_content_type is not None:
|
|
1056
|
-
_header_params['Content-Type'] = _default_content_type
|
|
1057
|
-
|
|
1058
|
-
# authentication setting
|
|
1059
|
-
_auth_settings: List[str] = [
|
|
1060
|
-
'HTTPBearer'
|
|
1061
|
-
]
|
|
1062
|
-
|
|
1063
|
-
return self.api_client.param_serialize(
|
|
1064
|
-
method='POST',
|
|
1065
|
-
resource_path='/api/v1/traitement/signer-pdf-async',
|
|
1066
|
-
path_params=_path_params,
|
|
1067
|
-
query_params=_query_params,
|
|
1068
|
-
header_params=_header_params,
|
|
1069
|
-
body=_body_params,
|
|
1070
|
-
post_params=_form_params,
|
|
1071
|
-
files=_files,
|
|
1072
|
-
auth_settings=_auth_settings,
|
|
1073
|
-
collection_formats=_collection_formats,
|
|
1074
|
-
_host=_host,
|
|
1075
|
-
_request_auth=_request_auth
|
|
1076
|
-
)
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
@validate_call
|
|
1082
|
-
def valider_signature_pdf_endpoint_api_v1_traitement_valider_signature_pdf_post(
|
|
1083
|
-
self,
|
|
1084
|
-
fichier_pdf: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description="Fichier PDF à valider (sera analysé pour détecter et valider les signatures)")],
|
|
1085
|
-
_request_timeout: Union[
|
|
1086
|
-
None,
|
|
1087
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
1088
|
-
Tuple[
|
|
1089
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
1090
|
-
Annotated[StrictFloat, Field(gt=0)]
|
|
1091
|
-
]
|
|
1092
|
-
] = None,
|
|
1093
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1094
|
-
_content_type: Optional[StrictStr] = None,
|
|
1095
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1096
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1097
|
-
) -> object:
|
|
1098
|
-
"""Valider les signatures électroniques d'un PDF
|
|
1099
|
-
|
|
1100
|
-
Valide les signatures électroniques présentes dans un PDF uploadé. **Vérifications effectuées** : - Présence de signatures - Intégrité du document (non modifié depuis signature) - Validité des certificats - Chaîne de confiance (si disponible) - Présence d'horodatage (PAdES-B-T) - Données de validation (PAdES-B-LT) **Standards supportés** : PAdES-B-B, PAdES-B-T, PAdES-B-LT, ISO 32000-2. **⚠️ Note** : Cette validation est technique (intégrité cryptographique). La validité juridique dépend du niveau eIDAS du certificat (SES/AdES/QES) et du contexte d'utilisation.
|
|
1101
|
-
|
|
1102
|
-
:param fichier_pdf: Fichier PDF à valider (sera analysé pour détecter et valider les signatures) (required)
|
|
1103
|
-
:type fichier_pdf: bytearray
|
|
1104
|
-
:param _request_timeout: timeout setting for this request. If one
|
|
1105
|
-
number provided, it will be total request
|
|
1106
|
-
timeout. It can also be a pair (tuple) of
|
|
1107
|
-
(connection, read) timeouts.
|
|
1108
|
-
:type _request_timeout: int, tuple(int, int), optional
|
|
1109
|
-
:param _request_auth: set to override the auth_settings for an a single
|
|
1110
|
-
request; this effectively ignores the
|
|
1111
|
-
authentication in the spec for a single request.
|
|
1112
|
-
:type _request_auth: dict, optional
|
|
1113
|
-
:param _content_type: force content-type for the request.
|
|
1114
|
-
:type _content_type: str, Optional
|
|
1115
|
-
:param _headers: set to override the headers for a single
|
|
1116
|
-
request; this effectively ignores the headers
|
|
1117
|
-
in the spec for a single request.
|
|
1118
|
-
:type _headers: dict, optional
|
|
1119
|
-
:param _host_index: set to override the host_index for a single
|
|
1120
|
-
request; this effectively ignores the host_index
|
|
1121
|
-
in the spec for a single request.
|
|
1122
|
-
:type _host_index: int, optional
|
|
1123
|
-
:return: Returns the result object.
|
|
1124
|
-
""" # noqa: E501
|
|
1125
|
-
|
|
1126
|
-
_param = self._valider_signature_pdf_endpoint_api_v1_traitement_valider_signature_pdf_post_serialize(
|
|
1127
|
-
fichier_pdf=fichier_pdf,
|
|
1128
|
-
_request_auth=_request_auth,
|
|
1129
|
-
_content_type=_content_type,
|
|
1130
|
-
_headers=_headers,
|
|
1131
|
-
_host_index=_host_index
|
|
1132
|
-
)
|
|
1133
|
-
|
|
1134
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
|
1135
|
-
'200': "object",
|
|
1136
|
-
'400': None,
|
|
1137
|
-
'422': "HTTPValidationError",
|
|
1138
|
-
}
|
|
1139
|
-
response_data = self.api_client.call_api(
|
|
1140
|
-
*_param,
|
|
1141
|
-
_request_timeout=_request_timeout
|
|
1142
|
-
)
|
|
1143
|
-
response_data.read()
|
|
1144
|
-
return self.api_client.response_deserialize(
|
|
1145
|
-
response_data=response_data,
|
|
1146
|
-
response_types_map=_response_types_map,
|
|
1147
|
-
).data
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
@validate_call
|
|
1151
|
-
def valider_signature_pdf_endpoint_api_v1_traitement_valider_signature_pdf_post_with_http_info(
|
|
1152
|
-
self,
|
|
1153
|
-
fichier_pdf: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description="Fichier PDF à valider (sera analysé pour détecter et valider les signatures)")],
|
|
1154
|
-
_request_timeout: Union[
|
|
1155
|
-
None,
|
|
1156
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
1157
|
-
Tuple[
|
|
1158
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
1159
|
-
Annotated[StrictFloat, Field(gt=0)]
|
|
1160
|
-
]
|
|
1161
|
-
] = None,
|
|
1162
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1163
|
-
_content_type: Optional[StrictStr] = None,
|
|
1164
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1165
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1166
|
-
) -> ApiResponse[object]:
|
|
1167
|
-
"""Valider les signatures électroniques d'un PDF
|
|
1168
|
-
|
|
1169
|
-
Valide les signatures électroniques présentes dans un PDF uploadé. **Vérifications effectuées** : - Présence de signatures - Intégrité du document (non modifié depuis signature) - Validité des certificats - Chaîne de confiance (si disponible) - Présence d'horodatage (PAdES-B-T) - Données de validation (PAdES-B-LT) **Standards supportés** : PAdES-B-B, PAdES-B-T, PAdES-B-LT, ISO 32000-2. **⚠️ Note** : Cette validation est technique (intégrité cryptographique). La validité juridique dépend du niveau eIDAS du certificat (SES/AdES/QES) et du contexte d'utilisation.
|
|
1170
|
-
|
|
1171
|
-
:param fichier_pdf: Fichier PDF à valider (sera analysé pour détecter et valider les signatures) (required)
|
|
1172
|
-
:type fichier_pdf: bytearray
|
|
1173
|
-
:param _request_timeout: timeout setting for this request. If one
|
|
1174
|
-
number provided, it will be total request
|
|
1175
|
-
timeout. It can also be a pair (tuple) of
|
|
1176
|
-
(connection, read) timeouts.
|
|
1177
|
-
:type _request_timeout: int, tuple(int, int), optional
|
|
1178
|
-
:param _request_auth: set to override the auth_settings for an a single
|
|
1179
|
-
request; this effectively ignores the
|
|
1180
|
-
authentication in the spec for a single request.
|
|
1181
|
-
:type _request_auth: dict, optional
|
|
1182
|
-
:param _content_type: force content-type for the request.
|
|
1183
|
-
:type _content_type: str, Optional
|
|
1184
|
-
:param _headers: set to override the headers for a single
|
|
1185
|
-
request; this effectively ignores the headers
|
|
1186
|
-
in the spec for a single request.
|
|
1187
|
-
:type _headers: dict, optional
|
|
1188
|
-
:param _host_index: set to override the host_index for a single
|
|
1189
|
-
request; this effectively ignores the host_index
|
|
1190
|
-
in the spec for a single request.
|
|
1191
|
-
:type _host_index: int, optional
|
|
1192
|
-
:return: Returns the result object.
|
|
1193
|
-
""" # noqa: E501
|
|
1194
|
-
|
|
1195
|
-
_param = self._valider_signature_pdf_endpoint_api_v1_traitement_valider_signature_pdf_post_serialize(
|
|
1196
|
-
fichier_pdf=fichier_pdf,
|
|
1197
|
-
_request_auth=_request_auth,
|
|
1198
|
-
_content_type=_content_type,
|
|
1199
|
-
_headers=_headers,
|
|
1200
|
-
_host_index=_host_index
|
|
1201
|
-
)
|
|
1202
|
-
|
|
1203
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
|
1204
|
-
'200': "object",
|
|
1205
|
-
'400': None,
|
|
1206
|
-
'422': "HTTPValidationError",
|
|
1207
|
-
}
|
|
1208
|
-
response_data = self.api_client.call_api(
|
|
1209
|
-
*_param,
|
|
1210
|
-
_request_timeout=_request_timeout
|
|
1211
|
-
)
|
|
1212
|
-
response_data.read()
|
|
1213
|
-
return self.api_client.response_deserialize(
|
|
1214
|
-
response_data=response_data,
|
|
1215
|
-
response_types_map=_response_types_map,
|
|
1216
|
-
)
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
@validate_call
|
|
1220
|
-
def valider_signature_pdf_endpoint_api_v1_traitement_valider_signature_pdf_post_without_preload_content(
|
|
1221
|
-
self,
|
|
1222
|
-
fichier_pdf: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description="Fichier PDF à valider (sera analysé pour détecter et valider les signatures)")],
|
|
1223
|
-
_request_timeout: Union[
|
|
1224
|
-
None,
|
|
1225
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
1226
|
-
Tuple[
|
|
1227
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
1228
|
-
Annotated[StrictFloat, Field(gt=0)]
|
|
1229
|
-
]
|
|
1230
|
-
] = None,
|
|
1231
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1232
|
-
_content_type: Optional[StrictStr] = None,
|
|
1233
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1234
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1235
|
-
) -> RESTResponseType:
|
|
1236
|
-
"""Valider les signatures électroniques d'un PDF
|
|
1237
|
-
|
|
1238
|
-
Valide les signatures électroniques présentes dans un PDF uploadé. **Vérifications effectuées** : - Présence de signatures - Intégrité du document (non modifié depuis signature) - Validité des certificats - Chaîne de confiance (si disponible) - Présence d'horodatage (PAdES-B-T) - Données de validation (PAdES-B-LT) **Standards supportés** : PAdES-B-B, PAdES-B-T, PAdES-B-LT, ISO 32000-2. **⚠️ Note** : Cette validation est technique (intégrité cryptographique). La validité juridique dépend du niveau eIDAS du certificat (SES/AdES/QES) et du contexte d'utilisation.
|
|
1239
|
-
|
|
1240
|
-
:param fichier_pdf: Fichier PDF à valider (sera analysé pour détecter et valider les signatures) (required)
|
|
1241
|
-
:type fichier_pdf: bytearray
|
|
1242
|
-
:param _request_timeout: timeout setting for this request. If one
|
|
1243
|
-
number provided, it will be total request
|
|
1244
|
-
timeout. It can also be a pair (tuple) of
|
|
1245
|
-
(connection, read) timeouts.
|
|
1246
|
-
:type _request_timeout: int, tuple(int, int), optional
|
|
1247
|
-
:param _request_auth: set to override the auth_settings for an a single
|
|
1248
|
-
request; this effectively ignores the
|
|
1249
|
-
authentication in the spec for a single request.
|
|
1250
|
-
:type _request_auth: dict, optional
|
|
1251
|
-
:param _content_type: force content-type for the request.
|
|
1252
|
-
:type _content_type: str, Optional
|
|
1253
|
-
:param _headers: set to override the headers for a single
|
|
1254
|
-
request; this effectively ignores the headers
|
|
1255
|
-
in the spec for a single request.
|
|
1256
|
-
:type _headers: dict, optional
|
|
1257
|
-
:param _host_index: set to override the host_index for a single
|
|
1258
|
-
request; this effectively ignores the host_index
|
|
1259
|
-
in the spec for a single request.
|
|
1260
|
-
:type _host_index: int, optional
|
|
1261
|
-
:return: Returns the result object.
|
|
1262
|
-
""" # noqa: E501
|
|
1263
|
-
|
|
1264
|
-
_param = self._valider_signature_pdf_endpoint_api_v1_traitement_valider_signature_pdf_post_serialize(
|
|
1265
|
-
fichier_pdf=fichier_pdf,
|
|
1266
|
-
_request_auth=_request_auth,
|
|
1267
|
-
_content_type=_content_type,
|
|
1268
|
-
_headers=_headers,
|
|
1269
|
-
_host_index=_host_index
|
|
1270
|
-
)
|
|
1271
|
-
|
|
1272
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
|
1273
|
-
'200': "object",
|
|
1274
|
-
'400': None,
|
|
1275
|
-
'422': "HTTPValidationError",
|
|
1276
|
-
}
|
|
1277
|
-
response_data = self.api_client.call_api(
|
|
1278
|
-
*_param,
|
|
1279
|
-
_request_timeout=_request_timeout
|
|
1280
|
-
)
|
|
1281
|
-
return response_data.response
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
def _valider_signature_pdf_endpoint_api_v1_traitement_valider_signature_pdf_post_serialize(
|
|
1285
|
-
self,
|
|
1286
|
-
fichier_pdf,
|
|
1287
|
-
_request_auth,
|
|
1288
|
-
_content_type,
|
|
1289
|
-
_headers,
|
|
1290
|
-
_host_index,
|
|
1291
|
-
) -> RequestSerialized:
|
|
1292
|
-
|
|
1293
|
-
_host = None
|
|
1294
|
-
|
|
1295
|
-
_collection_formats: Dict[str, str] = {
|
|
1296
|
-
}
|
|
1297
|
-
|
|
1298
|
-
_path_params: Dict[str, str] = {}
|
|
1299
|
-
_query_params: List[Tuple[str, str]] = []
|
|
1300
|
-
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1301
|
-
_form_params: List[Tuple[str, str]] = []
|
|
1302
|
-
_files: Dict[
|
|
1303
|
-
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1304
|
-
] = {}
|
|
1305
|
-
_body_params: Optional[bytes] = None
|
|
1306
|
-
|
|
1307
|
-
# process the path parameters
|
|
1308
|
-
# process the query parameters
|
|
1309
|
-
# process the header parameters
|
|
1310
|
-
# process the form parameters
|
|
1311
|
-
if fichier_pdf is not None:
|
|
1312
|
-
_files['fichier_pdf'] = fichier_pdf
|
|
1313
|
-
# process the body parameter
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
# set the HTTP header `Accept`
|
|
1317
|
-
if 'Accept' not in _header_params:
|
|
1318
|
-
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1319
|
-
[
|
|
1320
|
-
'application/json'
|
|
1321
|
-
]
|
|
1322
|
-
)
|
|
1323
|
-
|
|
1324
|
-
# set the HTTP header `Content-Type`
|
|
1325
|
-
if _content_type:
|
|
1326
|
-
_header_params['Content-Type'] = _content_type
|
|
1327
|
-
else:
|
|
1328
|
-
_default_content_type = (
|
|
1329
|
-
self.api_client.select_header_content_type(
|
|
1330
|
-
[
|
|
1331
|
-
'multipart/form-data'
|
|
1332
|
-
]
|
|
1333
|
-
)
|
|
1334
|
-
)
|
|
1335
|
-
if _default_content_type is not None:
|
|
1336
|
-
_header_params['Content-Type'] = _default_content_type
|
|
1337
|
-
|
|
1338
|
-
# authentication setting
|
|
1339
|
-
_auth_settings: List[str] = [
|
|
1340
|
-
'HTTPBearer'
|
|
1341
|
-
]
|
|
1342
|
-
|
|
1343
|
-
return self.api_client.param_serialize(
|
|
1344
|
-
method='POST',
|
|
1345
|
-
resource_path='/api/v1/traitement/valider-signature-pdf',
|
|
1346
|
-
path_params=_path_params,
|
|
1347
|
-
query_params=_query_params,
|
|
1348
|
-
header_params=_header_params,
|
|
1349
|
-
body=_body_params,
|
|
1350
|
-
post_params=_form_params,
|
|
1351
|
-
files=_files,
|
|
1352
|
-
auth_settings=_auth_settings,
|
|
1353
|
-
collection_formats=_collection_formats,
|
|
1354
|
-
_host=_host,
|
|
1355
|
-
_request_auth=_request_auth
|
|
1356
|
-
)
|
|
1357
|
-
|
|
1358
|
-
|