factpulse 2.0.37__py3-none-any.whl → 3.0.7__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.
- factpulse/__init__.py +265 -197
- factpulse/api/__init__.py +5 -4
- factpulse/api/afnorpdppa_api.py +34 -34
- factpulse/api/afnorpdppa_directory_service_api.py +59 -59
- factpulse/api/afnorpdppa_flow_service_api.py +23 -23
- factpulse/api/chorus_pro_api.py +211 -211
- factpulse/api/document_conversion_api.py +1506 -0
- factpulse/api/{sant_api.py → health_api.py} +22 -22
- factpulse/api/invoice_processing_api.py +3437 -0
- factpulse/api/{vrification_pdfxml_api.py → pdfxml_verification_api.py} +240 -240
- factpulse/api/{utilisateur_api.py → user_api.py} +17 -17
- factpulse/api_client.py +3 -3
- factpulse/configuration.py +3 -3
- factpulse/exceptions.py +2 -2
- factpulse/models/__init__.py +128 -95
- factpulse/models/acknowledgment_status.py +38 -0
- factpulse/models/additional_document.py +115 -0
- factpulse/models/afnor_credentials.py +106 -0
- factpulse/models/afnor_destination.py +127 -0
- factpulse/models/afnor_health_check_response.py +91 -0
- factpulse/models/afnor_result.py +105 -0
- factpulse/models/allowance_charge.py +147 -0
- factpulse/models/allowance_reason_code.py +42 -0
- factpulse/models/allowance_total_amount.py +145 -0
- factpulse/models/amount.py +139 -0
- factpulse/models/amount_due.py +139 -0
- factpulse/models/api_error.py +5 -5
- factpulse/models/async_task_status.py +97 -0
- factpulse/models/base_amount.py +145 -0
- factpulse/models/bounding_box_schema.py +10 -10
- factpulse/models/celery_status.py +40 -0
- factpulse/models/certificate_info_response.py +24 -24
- factpulse/models/charge_total_amount.py +145 -0
- factpulse/models/chorus_pro_destination.py +108 -0
- factpulse/models/chorus_pro_result.py +101 -0
- factpulse/models/contact.py +113 -0
- factpulse/models/convert_error_response.py +105 -0
- factpulse/models/convert_pending_input_response.py +114 -0
- factpulse/models/convert_resume_request.py +87 -0
- factpulse/models/convert_success_response.py +126 -0
- factpulse/models/convert_validation_failed_response.py +120 -0
- factpulse/models/delivery_party.py +121 -0
- factpulse/models/destination.py +27 -27
- factpulse/models/document_type_info.py +91 -0
- factpulse/models/electronic_address.py +90 -0
- factpulse/models/enriched_invoice_info.py +133 -0
- factpulse/models/error_level.py +2 -2
- factpulse/models/error_source.py +2 -2
- factpulse/models/extraction_info.py +93 -0
- factpulse/models/factur_x_invoice.py +320 -0
- factpulse/models/factur_x_profile.py +39 -0
- factpulse/models/factur_xpdf_info.py +91 -0
- factpulse/models/facture_electronique_rest_api_schemas_chorus_pro_chorus_pro_credentials.py +95 -0
- factpulse/models/facture_electronique_rest_api_schemas_processing_chorus_pro_credentials.py +115 -0
- factpulse/models/field_status.py +40 -0
- factpulse/models/file_info.py +94 -0
- factpulse/models/files_info.py +106 -0
- factpulse/models/flow_direction.py +37 -0
- factpulse/models/flow_profile.py +38 -0
- factpulse/models/flow_summary.py +131 -0
- factpulse/models/flow_syntax.py +40 -0
- factpulse/models/flow_type.py +40 -0
- factpulse/models/generate_certificate_request.py +26 -26
- factpulse/models/generate_certificate_response.py +15 -15
- factpulse/models/get_chorus_pro_id_request.py +100 -0
- factpulse/models/get_chorus_pro_id_response.py +98 -0
- factpulse/models/get_invoice_request.py +98 -0
- factpulse/models/get_invoice_response.py +142 -0
- factpulse/models/get_structure_request.py +100 -0
- factpulse/models/get_structure_response.py +142 -0
- factpulse/models/global_allowance_amount.py +139 -0
- factpulse/models/gross_unit_price.py +145 -0
- factpulse/models/http_validation_error.py +2 -2
- factpulse/models/incoming_invoice.py +196 -0
- factpulse/models/incoming_supplier.py +144 -0
- factpulse/models/invoice_format.py +38 -0
- factpulse/models/invoice_line.py +354 -0
- factpulse/models/invoice_line_allowance_amount.py +145 -0
- factpulse/models/invoice_note.py +94 -0
- factpulse/models/invoice_references.py +194 -0
- factpulse/models/invoice_status.py +96 -0
- factpulse/models/invoice_totals.py +177 -0
- factpulse/models/invoice_totals_prepayment.py +145 -0
- factpulse/models/invoice_type_code.py +51 -0
- factpulse/models/invoicing_framework.py +110 -0
- factpulse/models/invoicing_framework_code.py +39 -0
- factpulse/models/line_net_amount.py +145 -0
- factpulse/models/line_total_amount.py +145 -0
- factpulse/models/mandatory_note_schema.py +124 -0
- factpulse/models/manual_rate.py +139 -0
- factpulse/models/manual_vat_rate.py +139 -0
- factpulse/models/missing_field.py +107 -0
- factpulse/models/operation_nature.py +49 -0
- factpulse/models/output_format.py +37 -0
- factpulse/models/page_dimensions_schema.py +89 -0
- factpulse/models/payee.py +168 -0
- factpulse/models/payment_card.py +99 -0
- factpulse/models/payment_means.py +41 -0
- factpulse/models/pdf_validation_result_api.py +169 -0
- factpulse/models/pdp_credentials.py +15 -15
- factpulse/models/percentage.py +145 -0
- factpulse/models/postal_address.py +134 -0
- factpulse/models/price_allowance_amount.py +145 -0
- factpulse/models/price_basis_quantity.py +145 -0
- factpulse/models/processing_options.py +94 -0
- factpulse/models/product_characteristic.py +89 -0
- factpulse/models/product_classification.py +101 -0
- factpulse/models/quantity.py +139 -0
- factpulse/models/recipient.py +167 -0
- factpulse/models/rounding_amount.py +145 -0
- factpulse/models/scheme_id.py +10 -4
- factpulse/models/search_flow_request.py +143 -0
- factpulse/models/search_flow_response.py +101 -0
- factpulse/models/search_services_response.py +101 -0
- factpulse/models/search_structure_request.py +119 -0
- factpulse/models/search_structure_response.py +101 -0
- factpulse/models/signature_info.py +6 -6
- factpulse/models/signature_info_api.py +122 -0
- factpulse/models/signature_parameters.py +133 -0
- factpulse/models/simplified_invoice_data.py +124 -0
- factpulse/models/structure_info.py +14 -14
- factpulse/models/structure_parameters.py +91 -0
- factpulse/models/structure_service.py +93 -0
- factpulse/models/submission_mode.py +38 -0
- factpulse/models/submit_complete_invoice_request.py +116 -0
- factpulse/models/submit_complete_invoice_response.py +145 -0
- factpulse/models/submit_flow_request.py +123 -0
- factpulse/models/submit_flow_response.py +109 -0
- factpulse/models/submit_gross_amount.py +139 -0
- factpulse/models/submit_invoice_request.py +176 -0
- factpulse/models/submit_invoice_response.py +103 -0
- factpulse/models/submit_net_amount.py +139 -0
- factpulse/models/submit_vat_amount.py +139 -0
- factpulse/models/supplementary_attachment.py +95 -0
- factpulse/models/supplier.py +225 -0
- factpulse/models/task_response.py +87 -0
- factpulse/models/tax_representative.py +95 -0
- factpulse/models/taxable_amount.py +139 -0
- factpulse/models/total_gross_amount.py +139 -0
- factpulse/models/total_net_amount.py +139 -0
- factpulse/models/total_vat_amount.py +139 -0
- factpulse/models/unit_net_price.py +139 -0
- factpulse/models/unit_of_measure.py +41 -0
- factpulse/models/validation_error.py +2 -2
- factpulse/models/validation_error_detail.py +6 -6
- factpulse/models/validation_error_loc_inner.py +2 -2
- factpulse/models/validation_error_response.py +87 -0
- factpulse/models/validation_info.py +105 -0
- factpulse/models/validation_success_response.py +87 -0
- factpulse/models/vat_accounting_code.py +39 -0
- factpulse/models/vat_amount.py +139 -0
- factpulse/models/vat_category.py +44 -0
- factpulse/models/vat_line.py +140 -0
- factpulse/models/vat_point_date_code.py +38 -0
- factpulse/models/vat_rate.py +145 -0
- factpulse/models/verification_success_response.py +135 -0
- factpulse/models/verified_field_schema.py +129 -0
- factpulse/rest.py +2 -2
- factpulse-3.0.7.dist-info/METADATA +292 -0
- factpulse-3.0.7.dist-info/RECORD +168 -0
- factpulse_helpers/__init__.py +34 -34
- factpulse_helpers/client.py +1019 -795
- factpulse_helpers/exceptions.py +68 -68
- factpulse/api/traitement_facture_api.py +0 -3437
- factpulse/models/adresse_electronique.py +0 -90
- factpulse/models/adresse_postale.py +0 -120
- factpulse/models/cadre_de_facturation.py +0 -110
- factpulse/models/categorie_tva.py +0 -44
- factpulse/models/champ_verifie_schema.py +0 -129
- factpulse/models/chorus_pro_credentials.py +0 -95
- factpulse/models/code_cadre_facturation.py +0 -39
- factpulse/models/code_raison_reduction.py +0 -42
- factpulse/models/consulter_facture_request.py +0 -98
- factpulse/models/consulter_facture_response.py +0 -142
- factpulse/models/consulter_structure_request.py +0 -100
- factpulse/models/consulter_structure_response.py +0 -142
- factpulse/models/credentials_afnor.py +0 -106
- factpulse/models/credentials_chorus_pro.py +0 -115
- factpulse/models/destinataire.py +0 -130
- factpulse/models/destination_afnor.py +0 -127
- factpulse/models/destination_chorus_pro.py +0 -108
- factpulse/models/dimension_page_schema.py +0 -89
- factpulse/models/direction_flux.py +0 -37
- factpulse/models/donnees_facture_simplifiees.py +0 -124
- factpulse/models/facture_enrichie_info.py +0 -133
- factpulse/models/facture_entrante.py +0 -196
- factpulse/models/facture_factur_x.py +0 -183
- factpulse/models/flux_resume.py +0 -131
- factpulse/models/format_facture.py +0 -38
- factpulse/models/format_sortie.py +0 -37
- factpulse/models/fournisseur.py +0 -153
- factpulse/models/fournisseur_entrant.py +0 -144
- factpulse/models/information_signature_api.py +0 -122
- factpulse/models/ligne_de_poste.py +0 -183
- factpulse/models/ligne_de_poste_montant_remise_ht.py +0 -145
- factpulse/models/ligne_de_poste_taux_tva_manuel.py +0 -145
- factpulse/models/ligne_de_tva.py +0 -132
- factpulse/models/mode_depot.py +0 -38
- factpulse/models/mode_paiement.py +0 -41
- factpulse/models/montant_a_payer.py +0 -139
- factpulse/models/montant_base_ht.py +0 -139
- factpulse/models/montant_ht_total.py +0 -139
- factpulse/models/montant_remise_globale_ttc.py +0 -139
- factpulse/models/montant_total.py +0 -133
- factpulse/models/montant_total_acompte.py +0 -145
- factpulse/models/montant_total_ligne_ht.py +0 -139
- factpulse/models/montant_ttc_total.py +0 -139
- factpulse/models/montant_tva.py +0 -139
- factpulse/models/montant_tva_ligne.py +0 -139
- factpulse/models/montant_tva_total.py +0 -139
- factpulse/models/montant_unitaire_ht.py +0 -139
- factpulse/models/nature_operation.py +0 -49
- factpulse/models/note.py +0 -94
- factpulse/models/note_obligatoire_schema.py +0 -124
- factpulse/models/obtenir_id_chorus_pro_request.py +0 -100
- factpulse/models/obtenir_id_chorus_pro_response.py +0 -98
- factpulse/models/options_processing.py +0 -94
- factpulse/models/parametres_signature.py +0 -133
- factpulse/models/parametres_structure.py +0 -91
- factpulse/models/pdf_factur_x_info.py +0 -91
- factpulse/models/piece_jointe_complementaire.py +0 -95
- factpulse/models/profil_api.py +0 -39
- factpulse/models/profil_flux.py +0 -38
- factpulse/models/quantite.py +0 -139
- factpulse/models/rechercher_services_response.py +0 -101
- factpulse/models/rechercher_structure_request.py +0 -119
- factpulse/models/rechercher_structure_response.py +0 -101
- factpulse/models/references.py +0 -124
- factpulse/models/reponse_healthcheck_afnor.py +0 -91
- factpulse/models/reponse_recherche_flux.py +0 -101
- factpulse/models/reponse_soumission_flux.py +0 -109
- factpulse/models/reponse_tache.py +0 -87
- factpulse/models/reponse_validation_erreur.py +0 -87
- factpulse/models/reponse_validation_succes.py +0 -87
- factpulse/models/reponse_verification_succes.py +0 -135
- factpulse/models/requete_recherche_flux.py +0 -143
- factpulse/models/requete_soumission_flux.py +0 -123
- factpulse/models/resultat_afnor.py +0 -105
- factpulse/models/resultat_chorus_pro.py +0 -101
- factpulse/models/resultat_validation_pdfapi.py +0 -169
- factpulse/models/service_structure.py +0 -93
- factpulse/models/soumettre_facture_complete_request.py +0 -116
- factpulse/models/soumettre_facture_complete_response.py +0 -145
- factpulse/models/soumettre_facture_request.py +0 -176
- factpulse/models/soumettre_facture_response.py +0 -103
- factpulse/models/statut_acquittement.py +0 -38
- factpulse/models/statut_celery.py +0 -40
- factpulse/models/statut_champ_api.py +0 -40
- factpulse/models/statut_facture.py +0 -96
- factpulse/models/statut_tache.py +0 -97
- factpulse/models/syntaxe_flux.py +0 -40
- factpulse/models/tauxmanuel.py +0 -139
- factpulse/models/type_document.py +0 -40
- factpulse/models/type_facture.py +0 -37
- factpulse/models/type_flux.py +0 -40
- factpulse/models/type_tva.py +0 -39
- factpulse/models/unite.py +0 -41
- factpulse-2.0.37.dist-info/METADATA +0 -292
- factpulse-2.0.37.dist-info/RECORD +0 -134
- {factpulse-2.0.37.dist-info → factpulse-3.0.7.dist-info}/WHEEL +0 -0
- {factpulse-2.0.37.dist-info → factpulse-3.0.7.dist-info}/licenses/LICENSE +0 -0
- {factpulse-2.0.37.dist-info → factpulse-3.0.7.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,1506 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
FactPulse REST API
|
|
5
|
+
|
|
6
|
+
REST API for electronic invoicing in France: Factur-X, AFNOR PDP/PA, electronic signatures. ## 🎯 Main Features ### 📄 Factur-X Invoice Generation - **Formats**: XML only or PDF/A-3 with embedded XML - **Profiles**: MINIMUM, BASIC, EN16931, EXTENDED - **Standards**: EN 16931 (EU directive 2014/55), ISO 19005-3 (PDF/A-3), CII (UN/CEFACT) - **🆕 Simplified Format**: Generation from SIRET + auto-enrichment (Chorus Pro API + Business Search) ### ✅ Validation and Compliance - **XML Validation**: Schematron (45 to 210+ rules depending on profile) - **PDF Validation**: PDF/A-3, Factur-X XMP metadata, electronic signatures - **VeraPDF**: Strict PDF/A validation (146+ ISO 19005-3 rules) - **Asynchronous Processing**: Celery support for heavy validations (VeraPDF) ### 📡 AFNOR PDP/PA Integration (XP Z12-013) - **Flow Submission**: Send invoices to Partner Dematerialization Platforms - **Flow Search**: View submitted invoices - **Download**: Retrieve PDF/A-3 with XML - **Directory Service**: Company search (SIREN/SIRET) - **Multi-client**: Support for multiple PDP configs per user (stored credentials or zero-storage) ### ✍️ PDF Electronic Signature - **Standards**: PAdES-B-B, PAdES-B-T (RFC 3161 timestamping), PAdES-B-LT (long-term archival) - **eIDAS Levels**: SES (self-signed), AdES (commercial CA), QES (QTSP) - **Validation**: Cryptographic integrity and certificate verification - **Certificate Generation**: Self-signed X.509 certificates for testing ### 🔄 Asynchronous Processing - **Celery**: Asynchronous generation, validation and signing - **Polling**: Status tracking via `/tasks/{task_id}/status` - **No timeout**: Ideal for large files or heavy validations ## 🔒 Authentication All requests require a **JWT token** in the Authorization header: ``` Authorization: Bearer YOUR_JWT_TOKEN ``` ### How to obtain a JWT token? #### 🔑 Method 1: `/api/token/` API (Recommended) **URL:** `https://www.factpulse.fr/api/token/` This method is **recommended** for integration in your applications and CI/CD workflows. **Prerequisites:** Having set a password on your account **For users registered via email/password:** - You already have a password, use it directly **For users registered via OAuth (Google/GitHub):** - You must first set a password at: https://www.factpulse.fr/accounts/password/set/ - Once the password is created, you can use the API **Request example:** ```bash curl -X POST https://www.factpulse.fr/api/token/ \\ -H \"Content-Type: application/json\" \\ -d '{ \"username\": \"your_email@example.com\", \"password\": \"your_password\" }' ``` **Optional `client_uid` parameter:** To select credentials for a specific client (PA/PDP, Chorus Pro, signing certificates), add `client_uid`: ```bash curl -X POST https://www.factpulse.fr/api/token/ \\ -H \"Content-Type: application/json\" \\ -d '{ \"username\": \"your_email@example.com\", \"password\": \"your_password\", \"client_uid\": \"550e8400-e29b-41d4-a716-446655440000\" }' ``` The `client_uid` will be included in the JWT and allow the API to automatically use: - AFNOR/PDP credentials configured for this client - Chorus Pro credentials configured for this client - Electronic signature certificates configured for this client **Response:** ```json { \"access\": \"eyJ0eXAiOiJKV1QiLCJhbGc...\", // Access token (validity: 30 min) \"refresh\": \"eyJ0eXAiOiJKV1QiLCJhbGc...\" // Refresh token (validity: 7 days) } ``` **Advantages:** - ✅ Full automation (CI/CD, scripts) - ✅ Programmatic token management - ✅ Refresh token support for automatic access renewal - ✅ Easy integration in any language/tool #### 🖥️ Method 2: Dashboard Generation (Alternative) **URL:** https://www.factpulse.fr/dashboard/ This method is suitable for quick tests or occasional use via the graphical interface. **How it works:** - Log in to the dashboard - Use the \"Generate Test Token\" or \"Generate Production Token\" buttons - Works for **all** users (OAuth and email/password), without requiring a password **Token types:** - **Test Token**: 24h validity, 1000 calls/day quota (free) - **Production Token**: 7 days validity, quota based on your plan **Advantages:** - ✅ Quick for API testing - ✅ No password required - ✅ Simple visual interface **Disadvantages:** - ❌ Requires manual action - ❌ No refresh token - ❌ Less suited for automation ### 📚 Full Documentation For more information on authentication and API usage: 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, StrictBytes, StrictStr
|
|
20
|
+
from typing import Any, Dict, Optional, Tuple, Union
|
|
21
|
+
from typing_extensions import Annotated
|
|
22
|
+
from factpulse.models.convert_resume_request import ConvertResumeRequest
|
|
23
|
+
|
|
24
|
+
from factpulse.api_client import ApiClient, RequestSerialized
|
|
25
|
+
from factpulse.api_response import ApiResponse
|
|
26
|
+
from factpulse.rest import RESTResponseType
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
class DocumentConversionApi:
|
|
30
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
31
|
+
Ref: https://openapi-generator.tech
|
|
32
|
+
|
|
33
|
+
Do not edit the class manually.
|
|
34
|
+
"""
|
|
35
|
+
|
|
36
|
+
def __init__(self, api_client=None) -> None:
|
|
37
|
+
if api_client is None:
|
|
38
|
+
api_client = ApiClient.get_default()
|
|
39
|
+
self.api_client = api_client
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
@validate_call
|
|
43
|
+
def convert_document_api_v1_convert_post(
|
|
44
|
+
self,
|
|
45
|
+
file: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description="Document à convertir (PDF, DOCX, XLSX, JPG, PNG)")],
|
|
46
|
+
output: Annotated[Optional[StrictStr], Field(description="Format de sortie: pdf, xml, both")] = None,
|
|
47
|
+
callback_url: Optional[StrictStr] = None,
|
|
48
|
+
_request_timeout: Union[
|
|
49
|
+
None,
|
|
50
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
51
|
+
Tuple[
|
|
52
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
53
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
54
|
+
]
|
|
55
|
+
] = None,
|
|
56
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
57
|
+
_content_type: Optional[StrictStr] = None,
|
|
58
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
59
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
60
|
+
) -> ConvertSuccessResponse:
|
|
61
|
+
"""Convertir un document en Factur-X
|
|
62
|
+
|
|
63
|
+
Convertit un document (PDF, DOCX, XLSX, image) en Factur-X conforme. ## Workflow 1. **Upload** : Le document est envoyé en multipart/form-data 2. **Extraction OCR + Classification** : Mistral OCR extrait les données et classifie le document en un seul appel 3. **Enrichissement** : Les données sont enrichies via SIRENE (SIRET → raison sociale) 4. **Validation** : Les règles Schematron sont appliquées 5. **Génération** : Le Factur-X PDF/A-3 est généré ## Réponses possibles - **200** : Conversion réussie, fichiers disponibles - **202** : Données manquantes, complétion requise - **422** : Validation échouée, corrections nécessaires - **400** : Fichier invalide - **429** : Quota dépassé
|
|
64
|
+
|
|
65
|
+
:param file: Document à convertir (PDF, DOCX, XLSX, JPG, PNG) (required)
|
|
66
|
+
:type file: bytearray
|
|
67
|
+
:param output: Format de sortie: pdf, xml, both
|
|
68
|
+
:type output: str
|
|
69
|
+
:param callback_url:
|
|
70
|
+
:type callback_url: str
|
|
71
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
72
|
+
number provided, it will be total request
|
|
73
|
+
timeout. It can also be a pair (tuple) of
|
|
74
|
+
(connection, read) timeouts.
|
|
75
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
76
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
77
|
+
request; this effectively ignores the
|
|
78
|
+
authentication in the spec for a single request.
|
|
79
|
+
:type _request_auth: dict, optional
|
|
80
|
+
:param _content_type: force content-type for the request.
|
|
81
|
+
:type _content_type: str, Optional
|
|
82
|
+
:param _headers: set to override the headers for a single
|
|
83
|
+
request; this effectively ignores the headers
|
|
84
|
+
in the spec for a single request.
|
|
85
|
+
:type _headers: dict, optional
|
|
86
|
+
:param _host_index: set to override the host_index for a single
|
|
87
|
+
request; this effectively ignores the host_index
|
|
88
|
+
in the spec for a single request.
|
|
89
|
+
:type _host_index: int, optional
|
|
90
|
+
:return: Returns the result object.
|
|
91
|
+
""" # noqa: E501
|
|
92
|
+
|
|
93
|
+
_param = self._convert_document_api_v1_convert_post_serialize(
|
|
94
|
+
file=file,
|
|
95
|
+
output=output,
|
|
96
|
+
callback_url=callback_url,
|
|
97
|
+
_request_auth=_request_auth,
|
|
98
|
+
_content_type=_content_type,
|
|
99
|
+
_headers=_headers,
|
|
100
|
+
_host_index=_host_index
|
|
101
|
+
)
|
|
102
|
+
|
|
103
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
104
|
+
'200': "ConvertSuccessResponse",
|
|
105
|
+
'202': "ConvertPendingInputResponse",
|
|
106
|
+
'422': "ConvertValidationFailedResponse",
|
|
107
|
+
'400': "ConvertErrorResponse",
|
|
108
|
+
}
|
|
109
|
+
response_data = self.api_client.call_api(
|
|
110
|
+
*_param,
|
|
111
|
+
_request_timeout=_request_timeout
|
|
112
|
+
)
|
|
113
|
+
response_data.read()
|
|
114
|
+
return self.api_client.response_deserialize(
|
|
115
|
+
response_data=response_data,
|
|
116
|
+
response_types_map=_response_types_map,
|
|
117
|
+
).data
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
@validate_call
|
|
121
|
+
def convert_document_api_v1_convert_post_with_http_info(
|
|
122
|
+
self,
|
|
123
|
+
file: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description="Document à convertir (PDF, DOCX, XLSX, JPG, PNG)")],
|
|
124
|
+
output: Annotated[Optional[StrictStr], Field(description="Format de sortie: pdf, xml, both")] = None,
|
|
125
|
+
callback_url: Optional[StrictStr] = None,
|
|
126
|
+
_request_timeout: Union[
|
|
127
|
+
None,
|
|
128
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
129
|
+
Tuple[
|
|
130
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
131
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
132
|
+
]
|
|
133
|
+
] = None,
|
|
134
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
135
|
+
_content_type: Optional[StrictStr] = None,
|
|
136
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
137
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
138
|
+
) -> ApiResponse[ConvertSuccessResponse]:
|
|
139
|
+
"""Convertir un document en Factur-X
|
|
140
|
+
|
|
141
|
+
Convertit un document (PDF, DOCX, XLSX, image) en Factur-X conforme. ## Workflow 1. **Upload** : Le document est envoyé en multipart/form-data 2. **Extraction OCR + Classification** : Mistral OCR extrait les données et classifie le document en un seul appel 3. **Enrichissement** : Les données sont enrichies via SIRENE (SIRET → raison sociale) 4. **Validation** : Les règles Schematron sont appliquées 5. **Génération** : Le Factur-X PDF/A-3 est généré ## Réponses possibles - **200** : Conversion réussie, fichiers disponibles - **202** : Données manquantes, complétion requise - **422** : Validation échouée, corrections nécessaires - **400** : Fichier invalide - **429** : Quota dépassé
|
|
142
|
+
|
|
143
|
+
:param file: Document à convertir (PDF, DOCX, XLSX, JPG, PNG) (required)
|
|
144
|
+
:type file: bytearray
|
|
145
|
+
:param output: Format de sortie: pdf, xml, both
|
|
146
|
+
:type output: str
|
|
147
|
+
:param callback_url:
|
|
148
|
+
:type callback_url: str
|
|
149
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
150
|
+
number provided, it will be total request
|
|
151
|
+
timeout. It can also be a pair (tuple) of
|
|
152
|
+
(connection, read) timeouts.
|
|
153
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
154
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
155
|
+
request; this effectively ignores the
|
|
156
|
+
authentication in the spec for a single request.
|
|
157
|
+
:type _request_auth: dict, optional
|
|
158
|
+
:param _content_type: force content-type for the request.
|
|
159
|
+
:type _content_type: str, Optional
|
|
160
|
+
:param _headers: set to override the headers for a single
|
|
161
|
+
request; this effectively ignores the headers
|
|
162
|
+
in the spec for a single request.
|
|
163
|
+
:type _headers: dict, optional
|
|
164
|
+
:param _host_index: set to override the host_index for a single
|
|
165
|
+
request; this effectively ignores the host_index
|
|
166
|
+
in the spec for a single request.
|
|
167
|
+
:type _host_index: int, optional
|
|
168
|
+
:return: Returns the result object.
|
|
169
|
+
""" # noqa: E501
|
|
170
|
+
|
|
171
|
+
_param = self._convert_document_api_v1_convert_post_serialize(
|
|
172
|
+
file=file,
|
|
173
|
+
output=output,
|
|
174
|
+
callback_url=callback_url,
|
|
175
|
+
_request_auth=_request_auth,
|
|
176
|
+
_content_type=_content_type,
|
|
177
|
+
_headers=_headers,
|
|
178
|
+
_host_index=_host_index
|
|
179
|
+
)
|
|
180
|
+
|
|
181
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
182
|
+
'200': "ConvertSuccessResponse",
|
|
183
|
+
'202': "ConvertPendingInputResponse",
|
|
184
|
+
'422': "ConvertValidationFailedResponse",
|
|
185
|
+
'400': "ConvertErrorResponse",
|
|
186
|
+
}
|
|
187
|
+
response_data = self.api_client.call_api(
|
|
188
|
+
*_param,
|
|
189
|
+
_request_timeout=_request_timeout
|
|
190
|
+
)
|
|
191
|
+
response_data.read()
|
|
192
|
+
return self.api_client.response_deserialize(
|
|
193
|
+
response_data=response_data,
|
|
194
|
+
response_types_map=_response_types_map,
|
|
195
|
+
)
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
@validate_call
|
|
199
|
+
def convert_document_api_v1_convert_post_without_preload_content(
|
|
200
|
+
self,
|
|
201
|
+
file: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description="Document à convertir (PDF, DOCX, XLSX, JPG, PNG)")],
|
|
202
|
+
output: Annotated[Optional[StrictStr], Field(description="Format de sortie: pdf, xml, both")] = None,
|
|
203
|
+
callback_url: Optional[StrictStr] = None,
|
|
204
|
+
_request_timeout: Union[
|
|
205
|
+
None,
|
|
206
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
207
|
+
Tuple[
|
|
208
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
209
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
210
|
+
]
|
|
211
|
+
] = None,
|
|
212
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
213
|
+
_content_type: Optional[StrictStr] = None,
|
|
214
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
215
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
216
|
+
) -> RESTResponseType:
|
|
217
|
+
"""Convertir un document en Factur-X
|
|
218
|
+
|
|
219
|
+
Convertit un document (PDF, DOCX, XLSX, image) en Factur-X conforme. ## Workflow 1. **Upload** : Le document est envoyé en multipart/form-data 2. **Extraction OCR + Classification** : Mistral OCR extrait les données et classifie le document en un seul appel 3. **Enrichissement** : Les données sont enrichies via SIRENE (SIRET → raison sociale) 4. **Validation** : Les règles Schematron sont appliquées 5. **Génération** : Le Factur-X PDF/A-3 est généré ## Réponses possibles - **200** : Conversion réussie, fichiers disponibles - **202** : Données manquantes, complétion requise - **422** : Validation échouée, corrections nécessaires - **400** : Fichier invalide - **429** : Quota dépassé
|
|
220
|
+
|
|
221
|
+
:param file: Document à convertir (PDF, DOCX, XLSX, JPG, PNG) (required)
|
|
222
|
+
:type file: bytearray
|
|
223
|
+
:param output: Format de sortie: pdf, xml, both
|
|
224
|
+
:type output: str
|
|
225
|
+
:param callback_url:
|
|
226
|
+
:type callback_url: str
|
|
227
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
228
|
+
number provided, it will be total request
|
|
229
|
+
timeout. It can also be a pair (tuple) of
|
|
230
|
+
(connection, read) timeouts.
|
|
231
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
232
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
233
|
+
request; this effectively ignores the
|
|
234
|
+
authentication in the spec for a single request.
|
|
235
|
+
:type _request_auth: dict, optional
|
|
236
|
+
:param _content_type: force content-type for the request.
|
|
237
|
+
:type _content_type: str, Optional
|
|
238
|
+
:param _headers: set to override the headers for a single
|
|
239
|
+
request; this effectively ignores the headers
|
|
240
|
+
in the spec for a single request.
|
|
241
|
+
:type _headers: dict, optional
|
|
242
|
+
:param _host_index: set to override the host_index for a single
|
|
243
|
+
request; this effectively ignores the host_index
|
|
244
|
+
in the spec for a single request.
|
|
245
|
+
:type _host_index: int, optional
|
|
246
|
+
:return: Returns the result object.
|
|
247
|
+
""" # noqa: E501
|
|
248
|
+
|
|
249
|
+
_param = self._convert_document_api_v1_convert_post_serialize(
|
|
250
|
+
file=file,
|
|
251
|
+
output=output,
|
|
252
|
+
callback_url=callback_url,
|
|
253
|
+
_request_auth=_request_auth,
|
|
254
|
+
_content_type=_content_type,
|
|
255
|
+
_headers=_headers,
|
|
256
|
+
_host_index=_host_index
|
|
257
|
+
)
|
|
258
|
+
|
|
259
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
260
|
+
'200': "ConvertSuccessResponse",
|
|
261
|
+
'202': "ConvertPendingInputResponse",
|
|
262
|
+
'422': "ConvertValidationFailedResponse",
|
|
263
|
+
'400': "ConvertErrorResponse",
|
|
264
|
+
}
|
|
265
|
+
response_data = self.api_client.call_api(
|
|
266
|
+
*_param,
|
|
267
|
+
_request_timeout=_request_timeout
|
|
268
|
+
)
|
|
269
|
+
return response_data.response
|
|
270
|
+
|
|
271
|
+
|
|
272
|
+
def _convert_document_api_v1_convert_post_serialize(
|
|
273
|
+
self,
|
|
274
|
+
file,
|
|
275
|
+
output,
|
|
276
|
+
callback_url,
|
|
277
|
+
_request_auth,
|
|
278
|
+
_content_type,
|
|
279
|
+
_headers,
|
|
280
|
+
_host_index,
|
|
281
|
+
) -> RequestSerialized:
|
|
282
|
+
|
|
283
|
+
_host = None
|
|
284
|
+
|
|
285
|
+
_collection_formats: Dict[str, str] = {
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
_path_params: Dict[str, str] = {}
|
|
289
|
+
_query_params: List[Tuple[str, str]] = []
|
|
290
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
291
|
+
_form_params: List[Tuple[str, str]] = []
|
|
292
|
+
_files: Dict[
|
|
293
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
294
|
+
] = {}
|
|
295
|
+
_body_params: Optional[bytes] = None
|
|
296
|
+
|
|
297
|
+
# process the path parameters
|
|
298
|
+
# process the query parameters
|
|
299
|
+
# process the header parameters
|
|
300
|
+
# process the form parameters
|
|
301
|
+
if file is not None:
|
|
302
|
+
_files['file'] = file
|
|
303
|
+
if output is not None:
|
|
304
|
+
_form_params.append(('output', output))
|
|
305
|
+
if callback_url is not None:
|
|
306
|
+
_form_params.append(('callback_url', callback_url))
|
|
307
|
+
# process the body parameter
|
|
308
|
+
|
|
309
|
+
|
|
310
|
+
# set the HTTP header `Accept`
|
|
311
|
+
if 'Accept' not in _header_params:
|
|
312
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
313
|
+
[
|
|
314
|
+
'application/json'
|
|
315
|
+
]
|
|
316
|
+
)
|
|
317
|
+
|
|
318
|
+
# set the HTTP header `Content-Type`
|
|
319
|
+
if _content_type:
|
|
320
|
+
_header_params['Content-Type'] = _content_type
|
|
321
|
+
else:
|
|
322
|
+
_default_content_type = (
|
|
323
|
+
self.api_client.select_header_content_type(
|
|
324
|
+
[
|
|
325
|
+
'multipart/form-data'
|
|
326
|
+
]
|
|
327
|
+
)
|
|
328
|
+
)
|
|
329
|
+
if _default_content_type is not None:
|
|
330
|
+
_header_params['Content-Type'] = _default_content_type
|
|
331
|
+
|
|
332
|
+
# authentication setting
|
|
333
|
+
_auth_settings: List[str] = [
|
|
334
|
+
'HTTPBearer'
|
|
335
|
+
]
|
|
336
|
+
|
|
337
|
+
return self.api_client.param_serialize(
|
|
338
|
+
method='POST',
|
|
339
|
+
resource_path='/api/v1/convert',
|
|
340
|
+
path_params=_path_params,
|
|
341
|
+
query_params=_query_params,
|
|
342
|
+
header_params=_header_params,
|
|
343
|
+
body=_body_params,
|
|
344
|
+
post_params=_form_params,
|
|
345
|
+
files=_files,
|
|
346
|
+
auth_settings=_auth_settings,
|
|
347
|
+
collection_formats=_collection_formats,
|
|
348
|
+
_host=_host,
|
|
349
|
+
_request_auth=_request_auth
|
|
350
|
+
)
|
|
351
|
+
|
|
352
|
+
|
|
353
|
+
|
|
354
|
+
|
|
355
|
+
@validate_call
|
|
356
|
+
def convert_document_async_api_v1_convert_async_post(
|
|
357
|
+
self,
|
|
358
|
+
file: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description="Document à convertir (PDF, DOCX, XLSX, JPG, PNG)")],
|
|
359
|
+
output: Annotated[Optional[StrictStr], Field(description="Format de sortie: pdf, xml, both")] = None,
|
|
360
|
+
callback_url: Optional[StrictStr] = None,
|
|
361
|
+
_request_timeout: Union[
|
|
362
|
+
None,
|
|
363
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
364
|
+
Tuple[
|
|
365
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
366
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
367
|
+
]
|
|
368
|
+
] = None,
|
|
369
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
370
|
+
_content_type: Optional[StrictStr] = None,
|
|
371
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
372
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
373
|
+
) -> object:
|
|
374
|
+
"""Convertir un document en Factur-X (mode asynchrone)
|
|
375
|
+
|
|
376
|
+
Lance une conversion asynchrone via Celery. ## Workflow 1. **Upload** : Le document est envoyé en multipart/form-data 2. **Task Celery** : La tâche est mise en file d'attente 3. **Callback** : Notification par webhook à la fin ## Réponses possibles - **202** : Tâche acceptée, en cours de traitement - **400** : Fichier invalide
|
|
377
|
+
|
|
378
|
+
:param file: Document à convertir (PDF, DOCX, XLSX, JPG, PNG) (required)
|
|
379
|
+
:type file: bytearray
|
|
380
|
+
:param output: Format de sortie: pdf, xml, both
|
|
381
|
+
:type output: str
|
|
382
|
+
:param callback_url:
|
|
383
|
+
:type callback_url: str
|
|
384
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
385
|
+
number provided, it will be total request
|
|
386
|
+
timeout. It can also be a pair (tuple) of
|
|
387
|
+
(connection, read) timeouts.
|
|
388
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
389
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
390
|
+
request; this effectively ignores the
|
|
391
|
+
authentication in the spec for a single request.
|
|
392
|
+
:type _request_auth: dict, optional
|
|
393
|
+
:param _content_type: force content-type for the request.
|
|
394
|
+
:type _content_type: str, Optional
|
|
395
|
+
:param _headers: set to override the headers for a single
|
|
396
|
+
request; this effectively ignores the headers
|
|
397
|
+
in the spec for a single request.
|
|
398
|
+
:type _headers: dict, optional
|
|
399
|
+
:param _host_index: set to override the host_index for a single
|
|
400
|
+
request; this effectively ignores the host_index
|
|
401
|
+
in the spec for a single request.
|
|
402
|
+
:type _host_index: int, optional
|
|
403
|
+
:return: Returns the result object.
|
|
404
|
+
""" # noqa: E501
|
|
405
|
+
|
|
406
|
+
_param = self._convert_document_async_api_v1_convert_async_post_serialize(
|
|
407
|
+
file=file,
|
|
408
|
+
output=output,
|
|
409
|
+
callback_url=callback_url,
|
|
410
|
+
_request_auth=_request_auth,
|
|
411
|
+
_content_type=_content_type,
|
|
412
|
+
_headers=_headers,
|
|
413
|
+
_host_index=_host_index
|
|
414
|
+
)
|
|
415
|
+
|
|
416
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
417
|
+
'200': "object",
|
|
418
|
+
'202': None,
|
|
419
|
+
'400': None,
|
|
420
|
+
'422': "HTTPValidationError",
|
|
421
|
+
}
|
|
422
|
+
response_data = self.api_client.call_api(
|
|
423
|
+
*_param,
|
|
424
|
+
_request_timeout=_request_timeout
|
|
425
|
+
)
|
|
426
|
+
response_data.read()
|
|
427
|
+
return self.api_client.response_deserialize(
|
|
428
|
+
response_data=response_data,
|
|
429
|
+
response_types_map=_response_types_map,
|
|
430
|
+
).data
|
|
431
|
+
|
|
432
|
+
|
|
433
|
+
@validate_call
|
|
434
|
+
def convert_document_async_api_v1_convert_async_post_with_http_info(
|
|
435
|
+
self,
|
|
436
|
+
file: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description="Document à convertir (PDF, DOCX, XLSX, JPG, PNG)")],
|
|
437
|
+
output: Annotated[Optional[StrictStr], Field(description="Format de sortie: pdf, xml, both")] = None,
|
|
438
|
+
callback_url: Optional[StrictStr] = None,
|
|
439
|
+
_request_timeout: Union[
|
|
440
|
+
None,
|
|
441
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
442
|
+
Tuple[
|
|
443
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
444
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
445
|
+
]
|
|
446
|
+
] = None,
|
|
447
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
448
|
+
_content_type: Optional[StrictStr] = None,
|
|
449
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
450
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
451
|
+
) -> ApiResponse[object]:
|
|
452
|
+
"""Convertir un document en Factur-X (mode asynchrone)
|
|
453
|
+
|
|
454
|
+
Lance une conversion asynchrone via Celery. ## Workflow 1. **Upload** : Le document est envoyé en multipart/form-data 2. **Task Celery** : La tâche est mise en file d'attente 3. **Callback** : Notification par webhook à la fin ## Réponses possibles - **202** : Tâche acceptée, en cours de traitement - **400** : Fichier invalide
|
|
455
|
+
|
|
456
|
+
:param file: Document à convertir (PDF, DOCX, XLSX, JPG, PNG) (required)
|
|
457
|
+
:type file: bytearray
|
|
458
|
+
:param output: Format de sortie: pdf, xml, both
|
|
459
|
+
:type output: str
|
|
460
|
+
:param callback_url:
|
|
461
|
+
:type callback_url: str
|
|
462
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
463
|
+
number provided, it will be total request
|
|
464
|
+
timeout. It can also be a pair (tuple) of
|
|
465
|
+
(connection, read) timeouts.
|
|
466
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
467
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
468
|
+
request; this effectively ignores the
|
|
469
|
+
authentication in the spec for a single request.
|
|
470
|
+
:type _request_auth: dict, optional
|
|
471
|
+
:param _content_type: force content-type for the request.
|
|
472
|
+
:type _content_type: str, Optional
|
|
473
|
+
:param _headers: set to override the headers for a single
|
|
474
|
+
request; this effectively ignores the headers
|
|
475
|
+
in the spec for a single request.
|
|
476
|
+
:type _headers: dict, optional
|
|
477
|
+
:param _host_index: set to override the host_index for a single
|
|
478
|
+
request; this effectively ignores the host_index
|
|
479
|
+
in the spec for a single request.
|
|
480
|
+
:type _host_index: int, optional
|
|
481
|
+
:return: Returns the result object.
|
|
482
|
+
""" # noqa: E501
|
|
483
|
+
|
|
484
|
+
_param = self._convert_document_async_api_v1_convert_async_post_serialize(
|
|
485
|
+
file=file,
|
|
486
|
+
output=output,
|
|
487
|
+
callback_url=callback_url,
|
|
488
|
+
_request_auth=_request_auth,
|
|
489
|
+
_content_type=_content_type,
|
|
490
|
+
_headers=_headers,
|
|
491
|
+
_host_index=_host_index
|
|
492
|
+
)
|
|
493
|
+
|
|
494
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
495
|
+
'200': "object",
|
|
496
|
+
'202': None,
|
|
497
|
+
'400': None,
|
|
498
|
+
'422': "HTTPValidationError",
|
|
499
|
+
}
|
|
500
|
+
response_data = self.api_client.call_api(
|
|
501
|
+
*_param,
|
|
502
|
+
_request_timeout=_request_timeout
|
|
503
|
+
)
|
|
504
|
+
response_data.read()
|
|
505
|
+
return self.api_client.response_deserialize(
|
|
506
|
+
response_data=response_data,
|
|
507
|
+
response_types_map=_response_types_map,
|
|
508
|
+
)
|
|
509
|
+
|
|
510
|
+
|
|
511
|
+
@validate_call
|
|
512
|
+
def convert_document_async_api_v1_convert_async_post_without_preload_content(
|
|
513
|
+
self,
|
|
514
|
+
file: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description="Document à convertir (PDF, DOCX, XLSX, JPG, PNG)")],
|
|
515
|
+
output: Annotated[Optional[StrictStr], Field(description="Format de sortie: pdf, xml, both")] = None,
|
|
516
|
+
callback_url: Optional[StrictStr] = None,
|
|
517
|
+
_request_timeout: Union[
|
|
518
|
+
None,
|
|
519
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
520
|
+
Tuple[
|
|
521
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
522
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
523
|
+
]
|
|
524
|
+
] = None,
|
|
525
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
526
|
+
_content_type: Optional[StrictStr] = None,
|
|
527
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
528
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
529
|
+
) -> RESTResponseType:
|
|
530
|
+
"""Convertir un document en Factur-X (mode asynchrone)
|
|
531
|
+
|
|
532
|
+
Lance une conversion asynchrone via Celery. ## Workflow 1. **Upload** : Le document est envoyé en multipart/form-data 2. **Task Celery** : La tâche est mise en file d'attente 3. **Callback** : Notification par webhook à la fin ## Réponses possibles - **202** : Tâche acceptée, en cours de traitement - **400** : Fichier invalide
|
|
533
|
+
|
|
534
|
+
:param file: Document à convertir (PDF, DOCX, XLSX, JPG, PNG) (required)
|
|
535
|
+
:type file: bytearray
|
|
536
|
+
:param output: Format de sortie: pdf, xml, both
|
|
537
|
+
:type output: str
|
|
538
|
+
:param callback_url:
|
|
539
|
+
:type callback_url: str
|
|
540
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
541
|
+
number provided, it will be total request
|
|
542
|
+
timeout. It can also be a pair (tuple) of
|
|
543
|
+
(connection, read) timeouts.
|
|
544
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
545
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
546
|
+
request; this effectively ignores the
|
|
547
|
+
authentication in the spec for a single request.
|
|
548
|
+
:type _request_auth: dict, optional
|
|
549
|
+
:param _content_type: force content-type for the request.
|
|
550
|
+
:type _content_type: str, Optional
|
|
551
|
+
:param _headers: set to override the headers for a single
|
|
552
|
+
request; this effectively ignores the headers
|
|
553
|
+
in the spec for a single request.
|
|
554
|
+
:type _headers: dict, optional
|
|
555
|
+
:param _host_index: set to override the host_index for a single
|
|
556
|
+
request; this effectively ignores the host_index
|
|
557
|
+
in the spec for a single request.
|
|
558
|
+
:type _host_index: int, optional
|
|
559
|
+
:return: Returns the result object.
|
|
560
|
+
""" # noqa: E501
|
|
561
|
+
|
|
562
|
+
_param = self._convert_document_async_api_v1_convert_async_post_serialize(
|
|
563
|
+
file=file,
|
|
564
|
+
output=output,
|
|
565
|
+
callback_url=callback_url,
|
|
566
|
+
_request_auth=_request_auth,
|
|
567
|
+
_content_type=_content_type,
|
|
568
|
+
_headers=_headers,
|
|
569
|
+
_host_index=_host_index
|
|
570
|
+
)
|
|
571
|
+
|
|
572
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
573
|
+
'200': "object",
|
|
574
|
+
'202': None,
|
|
575
|
+
'400': None,
|
|
576
|
+
'422': "HTTPValidationError",
|
|
577
|
+
}
|
|
578
|
+
response_data = self.api_client.call_api(
|
|
579
|
+
*_param,
|
|
580
|
+
_request_timeout=_request_timeout
|
|
581
|
+
)
|
|
582
|
+
return response_data.response
|
|
583
|
+
|
|
584
|
+
|
|
585
|
+
def _convert_document_async_api_v1_convert_async_post_serialize(
|
|
586
|
+
self,
|
|
587
|
+
file,
|
|
588
|
+
output,
|
|
589
|
+
callback_url,
|
|
590
|
+
_request_auth,
|
|
591
|
+
_content_type,
|
|
592
|
+
_headers,
|
|
593
|
+
_host_index,
|
|
594
|
+
) -> RequestSerialized:
|
|
595
|
+
|
|
596
|
+
_host = None
|
|
597
|
+
|
|
598
|
+
_collection_formats: Dict[str, str] = {
|
|
599
|
+
}
|
|
600
|
+
|
|
601
|
+
_path_params: Dict[str, str] = {}
|
|
602
|
+
_query_params: List[Tuple[str, str]] = []
|
|
603
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
604
|
+
_form_params: List[Tuple[str, str]] = []
|
|
605
|
+
_files: Dict[
|
|
606
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
607
|
+
] = {}
|
|
608
|
+
_body_params: Optional[bytes] = None
|
|
609
|
+
|
|
610
|
+
# process the path parameters
|
|
611
|
+
# process the query parameters
|
|
612
|
+
# process the header parameters
|
|
613
|
+
# process the form parameters
|
|
614
|
+
if file is not None:
|
|
615
|
+
_files['file'] = file
|
|
616
|
+
if output is not None:
|
|
617
|
+
_form_params.append(('output', output))
|
|
618
|
+
if callback_url is not None:
|
|
619
|
+
_form_params.append(('callback_url', callback_url))
|
|
620
|
+
# process the body parameter
|
|
621
|
+
|
|
622
|
+
|
|
623
|
+
# set the HTTP header `Accept`
|
|
624
|
+
if 'Accept' not in _header_params:
|
|
625
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
626
|
+
[
|
|
627
|
+
'application/json'
|
|
628
|
+
]
|
|
629
|
+
)
|
|
630
|
+
|
|
631
|
+
# set the HTTP header `Content-Type`
|
|
632
|
+
if _content_type:
|
|
633
|
+
_header_params['Content-Type'] = _content_type
|
|
634
|
+
else:
|
|
635
|
+
_default_content_type = (
|
|
636
|
+
self.api_client.select_header_content_type(
|
|
637
|
+
[
|
|
638
|
+
'multipart/form-data'
|
|
639
|
+
]
|
|
640
|
+
)
|
|
641
|
+
)
|
|
642
|
+
if _default_content_type is not None:
|
|
643
|
+
_header_params['Content-Type'] = _default_content_type
|
|
644
|
+
|
|
645
|
+
# authentication setting
|
|
646
|
+
_auth_settings: List[str] = [
|
|
647
|
+
'HTTPBearer'
|
|
648
|
+
]
|
|
649
|
+
|
|
650
|
+
return self.api_client.param_serialize(
|
|
651
|
+
method='POST',
|
|
652
|
+
resource_path='/api/v1/convert/async',
|
|
653
|
+
path_params=_path_params,
|
|
654
|
+
query_params=_query_params,
|
|
655
|
+
header_params=_header_params,
|
|
656
|
+
body=_body_params,
|
|
657
|
+
post_params=_form_params,
|
|
658
|
+
files=_files,
|
|
659
|
+
auth_settings=_auth_settings,
|
|
660
|
+
collection_formats=_collection_formats,
|
|
661
|
+
_host=_host,
|
|
662
|
+
_request_auth=_request_auth
|
|
663
|
+
)
|
|
664
|
+
|
|
665
|
+
|
|
666
|
+
|
|
667
|
+
|
|
668
|
+
@validate_call
|
|
669
|
+
def download_file_api_v1_convert_conversion_id_download_filename_get(
|
|
670
|
+
self,
|
|
671
|
+
conversion_id: StrictStr,
|
|
672
|
+
filename: StrictStr,
|
|
673
|
+
_request_timeout: Union[
|
|
674
|
+
None,
|
|
675
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
676
|
+
Tuple[
|
|
677
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
678
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
679
|
+
]
|
|
680
|
+
] = None,
|
|
681
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
682
|
+
_content_type: Optional[StrictStr] = None,
|
|
683
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
684
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
685
|
+
) -> object:
|
|
686
|
+
"""Télécharger un fichier généré
|
|
687
|
+
|
|
688
|
+
Télécharge le fichier Factur-X PDF ou XML généré. ## Fichiers disponibles - `facturx.pdf` : PDF/A-3 avec XML embarqué - `facturx.xml` : XML CII seul (Cross Industry Invoice) Les fichiers sont disponibles pendant 24 heures après génération.
|
|
689
|
+
|
|
690
|
+
:param conversion_id: (required)
|
|
691
|
+
:type conversion_id: str
|
|
692
|
+
:param filename: (required)
|
|
693
|
+
:type filename: str
|
|
694
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
695
|
+
number provided, it will be total request
|
|
696
|
+
timeout. It can also be a pair (tuple) of
|
|
697
|
+
(connection, read) timeouts.
|
|
698
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
699
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
700
|
+
request; this effectively ignores the
|
|
701
|
+
authentication in the spec for a single request.
|
|
702
|
+
:type _request_auth: dict, optional
|
|
703
|
+
:param _content_type: force content-type for the request.
|
|
704
|
+
:type _content_type: str, Optional
|
|
705
|
+
:param _headers: set to override the headers for a single
|
|
706
|
+
request; this effectively ignores the headers
|
|
707
|
+
in the spec for a single request.
|
|
708
|
+
:type _headers: dict, optional
|
|
709
|
+
:param _host_index: set to override the host_index for a single
|
|
710
|
+
request; this effectively ignores the host_index
|
|
711
|
+
in the spec for a single request.
|
|
712
|
+
:type _host_index: int, optional
|
|
713
|
+
:return: Returns the result object.
|
|
714
|
+
""" # noqa: E501
|
|
715
|
+
|
|
716
|
+
_param = self._download_file_api_v1_convert_conversion_id_download_filename_get_serialize(
|
|
717
|
+
conversion_id=conversion_id,
|
|
718
|
+
filename=filename,
|
|
719
|
+
_request_auth=_request_auth,
|
|
720
|
+
_content_type=_content_type,
|
|
721
|
+
_headers=_headers,
|
|
722
|
+
_host_index=_host_index
|
|
723
|
+
)
|
|
724
|
+
|
|
725
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
726
|
+
'200': "object",
|
|
727
|
+
'404': None,
|
|
728
|
+
'422': "HTTPValidationError",
|
|
729
|
+
}
|
|
730
|
+
response_data = self.api_client.call_api(
|
|
731
|
+
*_param,
|
|
732
|
+
_request_timeout=_request_timeout
|
|
733
|
+
)
|
|
734
|
+
response_data.read()
|
|
735
|
+
return self.api_client.response_deserialize(
|
|
736
|
+
response_data=response_data,
|
|
737
|
+
response_types_map=_response_types_map,
|
|
738
|
+
).data
|
|
739
|
+
|
|
740
|
+
|
|
741
|
+
@validate_call
|
|
742
|
+
def download_file_api_v1_convert_conversion_id_download_filename_get_with_http_info(
|
|
743
|
+
self,
|
|
744
|
+
conversion_id: StrictStr,
|
|
745
|
+
filename: StrictStr,
|
|
746
|
+
_request_timeout: Union[
|
|
747
|
+
None,
|
|
748
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
749
|
+
Tuple[
|
|
750
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
751
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
752
|
+
]
|
|
753
|
+
] = None,
|
|
754
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
755
|
+
_content_type: Optional[StrictStr] = None,
|
|
756
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
757
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
758
|
+
) -> ApiResponse[object]:
|
|
759
|
+
"""Télécharger un fichier généré
|
|
760
|
+
|
|
761
|
+
Télécharge le fichier Factur-X PDF ou XML généré. ## Fichiers disponibles - `facturx.pdf` : PDF/A-3 avec XML embarqué - `facturx.xml` : XML CII seul (Cross Industry Invoice) Les fichiers sont disponibles pendant 24 heures après génération.
|
|
762
|
+
|
|
763
|
+
:param conversion_id: (required)
|
|
764
|
+
:type conversion_id: str
|
|
765
|
+
:param filename: (required)
|
|
766
|
+
:type filename: str
|
|
767
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
768
|
+
number provided, it will be total request
|
|
769
|
+
timeout. It can also be a pair (tuple) of
|
|
770
|
+
(connection, read) timeouts.
|
|
771
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
772
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
773
|
+
request; this effectively ignores the
|
|
774
|
+
authentication in the spec for a single request.
|
|
775
|
+
:type _request_auth: dict, optional
|
|
776
|
+
:param _content_type: force content-type for the request.
|
|
777
|
+
:type _content_type: str, Optional
|
|
778
|
+
:param _headers: set to override the headers for a single
|
|
779
|
+
request; this effectively ignores the headers
|
|
780
|
+
in the spec for a single request.
|
|
781
|
+
:type _headers: dict, optional
|
|
782
|
+
:param _host_index: set to override the host_index for a single
|
|
783
|
+
request; this effectively ignores the host_index
|
|
784
|
+
in the spec for a single request.
|
|
785
|
+
:type _host_index: int, optional
|
|
786
|
+
:return: Returns the result object.
|
|
787
|
+
""" # noqa: E501
|
|
788
|
+
|
|
789
|
+
_param = self._download_file_api_v1_convert_conversion_id_download_filename_get_serialize(
|
|
790
|
+
conversion_id=conversion_id,
|
|
791
|
+
filename=filename,
|
|
792
|
+
_request_auth=_request_auth,
|
|
793
|
+
_content_type=_content_type,
|
|
794
|
+
_headers=_headers,
|
|
795
|
+
_host_index=_host_index
|
|
796
|
+
)
|
|
797
|
+
|
|
798
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
799
|
+
'200': "object",
|
|
800
|
+
'404': None,
|
|
801
|
+
'422': "HTTPValidationError",
|
|
802
|
+
}
|
|
803
|
+
response_data = self.api_client.call_api(
|
|
804
|
+
*_param,
|
|
805
|
+
_request_timeout=_request_timeout
|
|
806
|
+
)
|
|
807
|
+
response_data.read()
|
|
808
|
+
return self.api_client.response_deserialize(
|
|
809
|
+
response_data=response_data,
|
|
810
|
+
response_types_map=_response_types_map,
|
|
811
|
+
)
|
|
812
|
+
|
|
813
|
+
|
|
814
|
+
@validate_call
|
|
815
|
+
def download_file_api_v1_convert_conversion_id_download_filename_get_without_preload_content(
|
|
816
|
+
self,
|
|
817
|
+
conversion_id: StrictStr,
|
|
818
|
+
filename: StrictStr,
|
|
819
|
+
_request_timeout: Union[
|
|
820
|
+
None,
|
|
821
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
822
|
+
Tuple[
|
|
823
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
824
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
825
|
+
]
|
|
826
|
+
] = None,
|
|
827
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
828
|
+
_content_type: Optional[StrictStr] = None,
|
|
829
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
830
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
831
|
+
) -> RESTResponseType:
|
|
832
|
+
"""Télécharger un fichier généré
|
|
833
|
+
|
|
834
|
+
Télécharge le fichier Factur-X PDF ou XML généré. ## Fichiers disponibles - `facturx.pdf` : PDF/A-3 avec XML embarqué - `facturx.xml` : XML CII seul (Cross Industry Invoice) Les fichiers sont disponibles pendant 24 heures après génération.
|
|
835
|
+
|
|
836
|
+
:param conversion_id: (required)
|
|
837
|
+
:type conversion_id: str
|
|
838
|
+
:param filename: (required)
|
|
839
|
+
:type filename: str
|
|
840
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
841
|
+
number provided, it will be total request
|
|
842
|
+
timeout. It can also be a pair (tuple) of
|
|
843
|
+
(connection, read) timeouts.
|
|
844
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
845
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
846
|
+
request; this effectively ignores the
|
|
847
|
+
authentication in the spec for a single request.
|
|
848
|
+
:type _request_auth: dict, optional
|
|
849
|
+
:param _content_type: force content-type for the request.
|
|
850
|
+
:type _content_type: str, Optional
|
|
851
|
+
:param _headers: set to override the headers for a single
|
|
852
|
+
request; this effectively ignores the headers
|
|
853
|
+
in the spec for a single request.
|
|
854
|
+
:type _headers: dict, optional
|
|
855
|
+
:param _host_index: set to override the host_index for a single
|
|
856
|
+
request; this effectively ignores the host_index
|
|
857
|
+
in the spec for a single request.
|
|
858
|
+
:type _host_index: int, optional
|
|
859
|
+
:return: Returns the result object.
|
|
860
|
+
""" # noqa: E501
|
|
861
|
+
|
|
862
|
+
_param = self._download_file_api_v1_convert_conversion_id_download_filename_get_serialize(
|
|
863
|
+
conversion_id=conversion_id,
|
|
864
|
+
filename=filename,
|
|
865
|
+
_request_auth=_request_auth,
|
|
866
|
+
_content_type=_content_type,
|
|
867
|
+
_headers=_headers,
|
|
868
|
+
_host_index=_host_index
|
|
869
|
+
)
|
|
870
|
+
|
|
871
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
872
|
+
'200': "object",
|
|
873
|
+
'404': None,
|
|
874
|
+
'422': "HTTPValidationError",
|
|
875
|
+
}
|
|
876
|
+
response_data = self.api_client.call_api(
|
|
877
|
+
*_param,
|
|
878
|
+
_request_timeout=_request_timeout
|
|
879
|
+
)
|
|
880
|
+
return response_data.response
|
|
881
|
+
|
|
882
|
+
|
|
883
|
+
def _download_file_api_v1_convert_conversion_id_download_filename_get_serialize(
|
|
884
|
+
self,
|
|
885
|
+
conversion_id,
|
|
886
|
+
filename,
|
|
887
|
+
_request_auth,
|
|
888
|
+
_content_type,
|
|
889
|
+
_headers,
|
|
890
|
+
_host_index,
|
|
891
|
+
) -> RequestSerialized:
|
|
892
|
+
|
|
893
|
+
_host = None
|
|
894
|
+
|
|
895
|
+
_collection_formats: Dict[str, str] = {
|
|
896
|
+
}
|
|
897
|
+
|
|
898
|
+
_path_params: Dict[str, str] = {}
|
|
899
|
+
_query_params: List[Tuple[str, str]] = []
|
|
900
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
901
|
+
_form_params: List[Tuple[str, str]] = []
|
|
902
|
+
_files: Dict[
|
|
903
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
904
|
+
] = {}
|
|
905
|
+
_body_params: Optional[bytes] = None
|
|
906
|
+
|
|
907
|
+
# process the path parameters
|
|
908
|
+
if conversion_id is not None:
|
|
909
|
+
_path_params['conversion_id'] = conversion_id
|
|
910
|
+
if filename is not None:
|
|
911
|
+
_path_params['filename'] = filename
|
|
912
|
+
# process the query parameters
|
|
913
|
+
# process the header parameters
|
|
914
|
+
# process the form parameters
|
|
915
|
+
# process the body parameter
|
|
916
|
+
|
|
917
|
+
|
|
918
|
+
# set the HTTP header `Accept`
|
|
919
|
+
if 'Accept' not in _header_params:
|
|
920
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
921
|
+
[
|
|
922
|
+
'application/json'
|
|
923
|
+
]
|
|
924
|
+
)
|
|
925
|
+
|
|
926
|
+
|
|
927
|
+
# authentication setting
|
|
928
|
+
_auth_settings: List[str] = [
|
|
929
|
+
'HTTPBearer'
|
|
930
|
+
]
|
|
931
|
+
|
|
932
|
+
return self.api_client.param_serialize(
|
|
933
|
+
method='GET',
|
|
934
|
+
resource_path='/api/v1/convert/{conversion_id}/download/{filename}',
|
|
935
|
+
path_params=_path_params,
|
|
936
|
+
query_params=_query_params,
|
|
937
|
+
header_params=_header_params,
|
|
938
|
+
body=_body_params,
|
|
939
|
+
post_params=_form_params,
|
|
940
|
+
files=_files,
|
|
941
|
+
auth_settings=_auth_settings,
|
|
942
|
+
collection_formats=_collection_formats,
|
|
943
|
+
_host=_host,
|
|
944
|
+
_request_auth=_request_auth
|
|
945
|
+
)
|
|
946
|
+
|
|
947
|
+
|
|
948
|
+
|
|
949
|
+
|
|
950
|
+
@validate_call
|
|
951
|
+
def get_conversion_status_api_v1_convert_conversion_id_status_get(
|
|
952
|
+
self,
|
|
953
|
+
conversion_id: StrictStr,
|
|
954
|
+
_request_timeout: Union[
|
|
955
|
+
None,
|
|
956
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
957
|
+
Tuple[
|
|
958
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
959
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
960
|
+
]
|
|
961
|
+
] = None,
|
|
962
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
963
|
+
_content_type: Optional[StrictStr] = None,
|
|
964
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
965
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
966
|
+
) -> Dict[str, object]:
|
|
967
|
+
"""Vérifier le statut d'une conversion
|
|
968
|
+
|
|
969
|
+
Retourne le statut actuel d'une conversion asynchrone.
|
|
970
|
+
|
|
971
|
+
:param conversion_id: (required)
|
|
972
|
+
:type conversion_id: str
|
|
973
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
974
|
+
number provided, it will be total request
|
|
975
|
+
timeout. It can also be a pair (tuple) of
|
|
976
|
+
(connection, read) timeouts.
|
|
977
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
978
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
979
|
+
request; this effectively ignores the
|
|
980
|
+
authentication in the spec for a single request.
|
|
981
|
+
:type _request_auth: dict, optional
|
|
982
|
+
:param _content_type: force content-type for the request.
|
|
983
|
+
:type _content_type: str, Optional
|
|
984
|
+
:param _headers: set to override the headers for a single
|
|
985
|
+
request; this effectively ignores the headers
|
|
986
|
+
in the spec for a single request.
|
|
987
|
+
:type _headers: dict, optional
|
|
988
|
+
:param _host_index: set to override the host_index for a single
|
|
989
|
+
request; this effectively ignores the host_index
|
|
990
|
+
in the spec for a single request.
|
|
991
|
+
:type _host_index: int, optional
|
|
992
|
+
:return: Returns the result object.
|
|
993
|
+
""" # noqa: E501
|
|
994
|
+
|
|
995
|
+
_param = self._get_conversion_status_api_v1_convert_conversion_id_status_get_serialize(
|
|
996
|
+
conversion_id=conversion_id,
|
|
997
|
+
_request_auth=_request_auth,
|
|
998
|
+
_content_type=_content_type,
|
|
999
|
+
_headers=_headers,
|
|
1000
|
+
_host_index=_host_index
|
|
1001
|
+
)
|
|
1002
|
+
|
|
1003
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1004
|
+
'200': "Dict[str, object]",
|
|
1005
|
+
'422': "HTTPValidationError",
|
|
1006
|
+
}
|
|
1007
|
+
response_data = self.api_client.call_api(
|
|
1008
|
+
*_param,
|
|
1009
|
+
_request_timeout=_request_timeout
|
|
1010
|
+
)
|
|
1011
|
+
response_data.read()
|
|
1012
|
+
return self.api_client.response_deserialize(
|
|
1013
|
+
response_data=response_data,
|
|
1014
|
+
response_types_map=_response_types_map,
|
|
1015
|
+
).data
|
|
1016
|
+
|
|
1017
|
+
|
|
1018
|
+
@validate_call
|
|
1019
|
+
def get_conversion_status_api_v1_convert_conversion_id_status_get_with_http_info(
|
|
1020
|
+
self,
|
|
1021
|
+
conversion_id: StrictStr,
|
|
1022
|
+
_request_timeout: Union[
|
|
1023
|
+
None,
|
|
1024
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1025
|
+
Tuple[
|
|
1026
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1027
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1028
|
+
]
|
|
1029
|
+
] = None,
|
|
1030
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1031
|
+
_content_type: Optional[StrictStr] = None,
|
|
1032
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1033
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1034
|
+
) -> ApiResponse[Dict[str, object]]:
|
|
1035
|
+
"""Vérifier le statut d'une conversion
|
|
1036
|
+
|
|
1037
|
+
Retourne le statut actuel d'une conversion asynchrone.
|
|
1038
|
+
|
|
1039
|
+
:param conversion_id: (required)
|
|
1040
|
+
:type conversion_id: str
|
|
1041
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1042
|
+
number provided, it will be total request
|
|
1043
|
+
timeout. It can also be a pair (tuple) of
|
|
1044
|
+
(connection, read) timeouts.
|
|
1045
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1046
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1047
|
+
request; this effectively ignores the
|
|
1048
|
+
authentication in the spec for a single request.
|
|
1049
|
+
:type _request_auth: dict, optional
|
|
1050
|
+
:param _content_type: force content-type for the request.
|
|
1051
|
+
:type _content_type: str, Optional
|
|
1052
|
+
:param _headers: set to override the headers for a single
|
|
1053
|
+
request; this effectively ignores the headers
|
|
1054
|
+
in the spec for a single request.
|
|
1055
|
+
:type _headers: dict, optional
|
|
1056
|
+
:param _host_index: set to override the host_index for a single
|
|
1057
|
+
request; this effectively ignores the host_index
|
|
1058
|
+
in the spec for a single request.
|
|
1059
|
+
:type _host_index: int, optional
|
|
1060
|
+
:return: Returns the result object.
|
|
1061
|
+
""" # noqa: E501
|
|
1062
|
+
|
|
1063
|
+
_param = self._get_conversion_status_api_v1_convert_conversion_id_status_get_serialize(
|
|
1064
|
+
conversion_id=conversion_id,
|
|
1065
|
+
_request_auth=_request_auth,
|
|
1066
|
+
_content_type=_content_type,
|
|
1067
|
+
_headers=_headers,
|
|
1068
|
+
_host_index=_host_index
|
|
1069
|
+
)
|
|
1070
|
+
|
|
1071
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1072
|
+
'200': "Dict[str, object]",
|
|
1073
|
+
'422': "HTTPValidationError",
|
|
1074
|
+
}
|
|
1075
|
+
response_data = self.api_client.call_api(
|
|
1076
|
+
*_param,
|
|
1077
|
+
_request_timeout=_request_timeout
|
|
1078
|
+
)
|
|
1079
|
+
response_data.read()
|
|
1080
|
+
return self.api_client.response_deserialize(
|
|
1081
|
+
response_data=response_data,
|
|
1082
|
+
response_types_map=_response_types_map,
|
|
1083
|
+
)
|
|
1084
|
+
|
|
1085
|
+
|
|
1086
|
+
@validate_call
|
|
1087
|
+
def get_conversion_status_api_v1_convert_conversion_id_status_get_without_preload_content(
|
|
1088
|
+
self,
|
|
1089
|
+
conversion_id: StrictStr,
|
|
1090
|
+
_request_timeout: Union[
|
|
1091
|
+
None,
|
|
1092
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1093
|
+
Tuple[
|
|
1094
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1095
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1096
|
+
]
|
|
1097
|
+
] = None,
|
|
1098
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1099
|
+
_content_type: Optional[StrictStr] = None,
|
|
1100
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1101
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1102
|
+
) -> RESTResponseType:
|
|
1103
|
+
"""Vérifier le statut d'une conversion
|
|
1104
|
+
|
|
1105
|
+
Retourne le statut actuel d'une conversion asynchrone.
|
|
1106
|
+
|
|
1107
|
+
:param conversion_id: (required)
|
|
1108
|
+
:type conversion_id: str
|
|
1109
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1110
|
+
number provided, it will be total request
|
|
1111
|
+
timeout. It can also be a pair (tuple) of
|
|
1112
|
+
(connection, read) timeouts.
|
|
1113
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1114
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1115
|
+
request; this effectively ignores the
|
|
1116
|
+
authentication in the spec for a single request.
|
|
1117
|
+
:type _request_auth: dict, optional
|
|
1118
|
+
:param _content_type: force content-type for the request.
|
|
1119
|
+
:type _content_type: str, Optional
|
|
1120
|
+
:param _headers: set to override the headers for a single
|
|
1121
|
+
request; this effectively ignores the headers
|
|
1122
|
+
in the spec for a single request.
|
|
1123
|
+
:type _headers: dict, optional
|
|
1124
|
+
:param _host_index: set to override the host_index for a single
|
|
1125
|
+
request; this effectively ignores the host_index
|
|
1126
|
+
in the spec for a single request.
|
|
1127
|
+
:type _host_index: int, optional
|
|
1128
|
+
:return: Returns the result object.
|
|
1129
|
+
""" # noqa: E501
|
|
1130
|
+
|
|
1131
|
+
_param = self._get_conversion_status_api_v1_convert_conversion_id_status_get_serialize(
|
|
1132
|
+
conversion_id=conversion_id,
|
|
1133
|
+
_request_auth=_request_auth,
|
|
1134
|
+
_content_type=_content_type,
|
|
1135
|
+
_headers=_headers,
|
|
1136
|
+
_host_index=_host_index
|
|
1137
|
+
)
|
|
1138
|
+
|
|
1139
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1140
|
+
'200': "Dict[str, object]",
|
|
1141
|
+
'422': "HTTPValidationError",
|
|
1142
|
+
}
|
|
1143
|
+
response_data = self.api_client.call_api(
|
|
1144
|
+
*_param,
|
|
1145
|
+
_request_timeout=_request_timeout
|
|
1146
|
+
)
|
|
1147
|
+
return response_data.response
|
|
1148
|
+
|
|
1149
|
+
|
|
1150
|
+
def _get_conversion_status_api_v1_convert_conversion_id_status_get_serialize(
|
|
1151
|
+
self,
|
|
1152
|
+
conversion_id,
|
|
1153
|
+
_request_auth,
|
|
1154
|
+
_content_type,
|
|
1155
|
+
_headers,
|
|
1156
|
+
_host_index,
|
|
1157
|
+
) -> RequestSerialized:
|
|
1158
|
+
|
|
1159
|
+
_host = None
|
|
1160
|
+
|
|
1161
|
+
_collection_formats: Dict[str, str] = {
|
|
1162
|
+
}
|
|
1163
|
+
|
|
1164
|
+
_path_params: Dict[str, str] = {}
|
|
1165
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1166
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1167
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1168
|
+
_files: Dict[
|
|
1169
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1170
|
+
] = {}
|
|
1171
|
+
_body_params: Optional[bytes] = None
|
|
1172
|
+
|
|
1173
|
+
# process the path parameters
|
|
1174
|
+
if conversion_id is not None:
|
|
1175
|
+
_path_params['conversion_id'] = conversion_id
|
|
1176
|
+
# process the query parameters
|
|
1177
|
+
# process the header parameters
|
|
1178
|
+
# process the form parameters
|
|
1179
|
+
# process the body parameter
|
|
1180
|
+
|
|
1181
|
+
|
|
1182
|
+
# set the HTTP header `Accept`
|
|
1183
|
+
if 'Accept' not in _header_params:
|
|
1184
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1185
|
+
[
|
|
1186
|
+
'application/json'
|
|
1187
|
+
]
|
|
1188
|
+
)
|
|
1189
|
+
|
|
1190
|
+
|
|
1191
|
+
# authentication setting
|
|
1192
|
+
_auth_settings: List[str] = [
|
|
1193
|
+
'HTTPBearer'
|
|
1194
|
+
]
|
|
1195
|
+
|
|
1196
|
+
return self.api_client.param_serialize(
|
|
1197
|
+
method='GET',
|
|
1198
|
+
resource_path='/api/v1/convert/{conversion_id}/status',
|
|
1199
|
+
path_params=_path_params,
|
|
1200
|
+
query_params=_query_params,
|
|
1201
|
+
header_params=_header_params,
|
|
1202
|
+
body=_body_params,
|
|
1203
|
+
post_params=_form_params,
|
|
1204
|
+
files=_files,
|
|
1205
|
+
auth_settings=_auth_settings,
|
|
1206
|
+
collection_formats=_collection_formats,
|
|
1207
|
+
_host=_host,
|
|
1208
|
+
_request_auth=_request_auth
|
|
1209
|
+
)
|
|
1210
|
+
|
|
1211
|
+
|
|
1212
|
+
|
|
1213
|
+
|
|
1214
|
+
@validate_call
|
|
1215
|
+
def resume_conversion_api_v1_convert_conversion_id_resume_post(
|
|
1216
|
+
self,
|
|
1217
|
+
conversion_id: StrictStr,
|
|
1218
|
+
convert_resume_request: ConvertResumeRequest,
|
|
1219
|
+
_request_timeout: Union[
|
|
1220
|
+
None,
|
|
1221
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1222
|
+
Tuple[
|
|
1223
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1224
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1225
|
+
]
|
|
1226
|
+
] = None,
|
|
1227
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1228
|
+
_content_type: Optional[StrictStr] = None,
|
|
1229
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1230
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1231
|
+
) -> ConvertSuccessResponse:
|
|
1232
|
+
"""Reprendre une conversion avec corrections
|
|
1233
|
+
|
|
1234
|
+
Reprend une conversion après complétion des données manquantes ou correction des erreurs. L'extraction OCR est conservée, les données sont mises à jour avec les corrections, puis une nouvelle validation Schematron est effectuée.
|
|
1235
|
+
|
|
1236
|
+
:param conversion_id: (required)
|
|
1237
|
+
:type conversion_id: str
|
|
1238
|
+
:param convert_resume_request: (required)
|
|
1239
|
+
:type convert_resume_request: ConvertResumeRequest
|
|
1240
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1241
|
+
number provided, it will be total request
|
|
1242
|
+
timeout. It can also be a pair (tuple) of
|
|
1243
|
+
(connection, read) timeouts.
|
|
1244
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1245
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1246
|
+
request; this effectively ignores the
|
|
1247
|
+
authentication in the spec for a single request.
|
|
1248
|
+
:type _request_auth: dict, optional
|
|
1249
|
+
:param _content_type: force content-type for the request.
|
|
1250
|
+
:type _content_type: str, Optional
|
|
1251
|
+
:param _headers: set to override the headers for a single
|
|
1252
|
+
request; this effectively ignores the headers
|
|
1253
|
+
in the spec for a single request.
|
|
1254
|
+
:type _headers: dict, optional
|
|
1255
|
+
:param _host_index: set to override the host_index for a single
|
|
1256
|
+
request; this effectively ignores the host_index
|
|
1257
|
+
in the spec for a single request.
|
|
1258
|
+
:type _host_index: int, optional
|
|
1259
|
+
:return: Returns the result object.
|
|
1260
|
+
""" # noqa: E501
|
|
1261
|
+
|
|
1262
|
+
_param = self._resume_conversion_api_v1_convert_conversion_id_resume_post_serialize(
|
|
1263
|
+
conversion_id=conversion_id,
|
|
1264
|
+
convert_resume_request=convert_resume_request,
|
|
1265
|
+
_request_auth=_request_auth,
|
|
1266
|
+
_content_type=_content_type,
|
|
1267
|
+
_headers=_headers,
|
|
1268
|
+
_host_index=_host_index
|
|
1269
|
+
)
|
|
1270
|
+
|
|
1271
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1272
|
+
'200': "ConvertSuccessResponse",
|
|
1273
|
+
'404': None,
|
|
1274
|
+
'422': "ConvertValidationFailedResponse",
|
|
1275
|
+
}
|
|
1276
|
+
response_data = self.api_client.call_api(
|
|
1277
|
+
*_param,
|
|
1278
|
+
_request_timeout=_request_timeout
|
|
1279
|
+
)
|
|
1280
|
+
response_data.read()
|
|
1281
|
+
return self.api_client.response_deserialize(
|
|
1282
|
+
response_data=response_data,
|
|
1283
|
+
response_types_map=_response_types_map,
|
|
1284
|
+
).data
|
|
1285
|
+
|
|
1286
|
+
|
|
1287
|
+
@validate_call
|
|
1288
|
+
def resume_conversion_api_v1_convert_conversion_id_resume_post_with_http_info(
|
|
1289
|
+
self,
|
|
1290
|
+
conversion_id: StrictStr,
|
|
1291
|
+
convert_resume_request: ConvertResumeRequest,
|
|
1292
|
+
_request_timeout: Union[
|
|
1293
|
+
None,
|
|
1294
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1295
|
+
Tuple[
|
|
1296
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1297
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1298
|
+
]
|
|
1299
|
+
] = None,
|
|
1300
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1301
|
+
_content_type: Optional[StrictStr] = None,
|
|
1302
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1303
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1304
|
+
) -> ApiResponse[ConvertSuccessResponse]:
|
|
1305
|
+
"""Reprendre une conversion avec corrections
|
|
1306
|
+
|
|
1307
|
+
Reprend une conversion après complétion des données manquantes ou correction des erreurs. L'extraction OCR est conservée, les données sont mises à jour avec les corrections, puis une nouvelle validation Schematron est effectuée.
|
|
1308
|
+
|
|
1309
|
+
:param conversion_id: (required)
|
|
1310
|
+
:type conversion_id: str
|
|
1311
|
+
:param convert_resume_request: (required)
|
|
1312
|
+
:type convert_resume_request: ConvertResumeRequest
|
|
1313
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1314
|
+
number provided, it will be total request
|
|
1315
|
+
timeout. It can also be a pair (tuple) of
|
|
1316
|
+
(connection, read) timeouts.
|
|
1317
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1318
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1319
|
+
request; this effectively ignores the
|
|
1320
|
+
authentication in the spec for a single request.
|
|
1321
|
+
:type _request_auth: dict, optional
|
|
1322
|
+
:param _content_type: force content-type for the request.
|
|
1323
|
+
:type _content_type: str, Optional
|
|
1324
|
+
:param _headers: set to override the headers for a single
|
|
1325
|
+
request; this effectively ignores the headers
|
|
1326
|
+
in the spec for a single request.
|
|
1327
|
+
:type _headers: dict, optional
|
|
1328
|
+
:param _host_index: set to override the host_index for a single
|
|
1329
|
+
request; this effectively ignores the host_index
|
|
1330
|
+
in the spec for a single request.
|
|
1331
|
+
:type _host_index: int, optional
|
|
1332
|
+
:return: Returns the result object.
|
|
1333
|
+
""" # noqa: E501
|
|
1334
|
+
|
|
1335
|
+
_param = self._resume_conversion_api_v1_convert_conversion_id_resume_post_serialize(
|
|
1336
|
+
conversion_id=conversion_id,
|
|
1337
|
+
convert_resume_request=convert_resume_request,
|
|
1338
|
+
_request_auth=_request_auth,
|
|
1339
|
+
_content_type=_content_type,
|
|
1340
|
+
_headers=_headers,
|
|
1341
|
+
_host_index=_host_index
|
|
1342
|
+
)
|
|
1343
|
+
|
|
1344
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1345
|
+
'200': "ConvertSuccessResponse",
|
|
1346
|
+
'404': None,
|
|
1347
|
+
'422': "ConvertValidationFailedResponse",
|
|
1348
|
+
}
|
|
1349
|
+
response_data = self.api_client.call_api(
|
|
1350
|
+
*_param,
|
|
1351
|
+
_request_timeout=_request_timeout
|
|
1352
|
+
)
|
|
1353
|
+
response_data.read()
|
|
1354
|
+
return self.api_client.response_deserialize(
|
|
1355
|
+
response_data=response_data,
|
|
1356
|
+
response_types_map=_response_types_map,
|
|
1357
|
+
)
|
|
1358
|
+
|
|
1359
|
+
|
|
1360
|
+
@validate_call
|
|
1361
|
+
def resume_conversion_api_v1_convert_conversion_id_resume_post_without_preload_content(
|
|
1362
|
+
self,
|
|
1363
|
+
conversion_id: StrictStr,
|
|
1364
|
+
convert_resume_request: ConvertResumeRequest,
|
|
1365
|
+
_request_timeout: Union[
|
|
1366
|
+
None,
|
|
1367
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1368
|
+
Tuple[
|
|
1369
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1370
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1371
|
+
]
|
|
1372
|
+
] = None,
|
|
1373
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1374
|
+
_content_type: Optional[StrictStr] = None,
|
|
1375
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1376
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1377
|
+
) -> RESTResponseType:
|
|
1378
|
+
"""Reprendre une conversion avec corrections
|
|
1379
|
+
|
|
1380
|
+
Reprend une conversion après complétion des données manquantes ou correction des erreurs. L'extraction OCR est conservée, les données sont mises à jour avec les corrections, puis une nouvelle validation Schematron est effectuée.
|
|
1381
|
+
|
|
1382
|
+
:param conversion_id: (required)
|
|
1383
|
+
:type conversion_id: str
|
|
1384
|
+
:param convert_resume_request: (required)
|
|
1385
|
+
:type convert_resume_request: ConvertResumeRequest
|
|
1386
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1387
|
+
number provided, it will be total request
|
|
1388
|
+
timeout. It can also be a pair (tuple) of
|
|
1389
|
+
(connection, read) timeouts.
|
|
1390
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1391
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1392
|
+
request; this effectively ignores the
|
|
1393
|
+
authentication in the spec for a single request.
|
|
1394
|
+
:type _request_auth: dict, optional
|
|
1395
|
+
:param _content_type: force content-type for the request.
|
|
1396
|
+
:type _content_type: str, Optional
|
|
1397
|
+
:param _headers: set to override the headers for a single
|
|
1398
|
+
request; this effectively ignores the headers
|
|
1399
|
+
in the spec for a single request.
|
|
1400
|
+
:type _headers: dict, optional
|
|
1401
|
+
:param _host_index: set to override the host_index for a single
|
|
1402
|
+
request; this effectively ignores the host_index
|
|
1403
|
+
in the spec for a single request.
|
|
1404
|
+
:type _host_index: int, optional
|
|
1405
|
+
:return: Returns the result object.
|
|
1406
|
+
""" # noqa: E501
|
|
1407
|
+
|
|
1408
|
+
_param = self._resume_conversion_api_v1_convert_conversion_id_resume_post_serialize(
|
|
1409
|
+
conversion_id=conversion_id,
|
|
1410
|
+
convert_resume_request=convert_resume_request,
|
|
1411
|
+
_request_auth=_request_auth,
|
|
1412
|
+
_content_type=_content_type,
|
|
1413
|
+
_headers=_headers,
|
|
1414
|
+
_host_index=_host_index
|
|
1415
|
+
)
|
|
1416
|
+
|
|
1417
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1418
|
+
'200': "ConvertSuccessResponse",
|
|
1419
|
+
'404': None,
|
|
1420
|
+
'422': "ConvertValidationFailedResponse",
|
|
1421
|
+
}
|
|
1422
|
+
response_data = self.api_client.call_api(
|
|
1423
|
+
*_param,
|
|
1424
|
+
_request_timeout=_request_timeout
|
|
1425
|
+
)
|
|
1426
|
+
return response_data.response
|
|
1427
|
+
|
|
1428
|
+
|
|
1429
|
+
def _resume_conversion_api_v1_convert_conversion_id_resume_post_serialize(
|
|
1430
|
+
self,
|
|
1431
|
+
conversion_id,
|
|
1432
|
+
convert_resume_request,
|
|
1433
|
+
_request_auth,
|
|
1434
|
+
_content_type,
|
|
1435
|
+
_headers,
|
|
1436
|
+
_host_index,
|
|
1437
|
+
) -> RequestSerialized:
|
|
1438
|
+
|
|
1439
|
+
_host = None
|
|
1440
|
+
|
|
1441
|
+
_collection_formats: Dict[str, str] = {
|
|
1442
|
+
}
|
|
1443
|
+
|
|
1444
|
+
_path_params: Dict[str, str] = {}
|
|
1445
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1446
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1447
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1448
|
+
_files: Dict[
|
|
1449
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1450
|
+
] = {}
|
|
1451
|
+
_body_params: Optional[bytes] = None
|
|
1452
|
+
|
|
1453
|
+
# process the path parameters
|
|
1454
|
+
if conversion_id is not None:
|
|
1455
|
+
_path_params['conversion_id'] = conversion_id
|
|
1456
|
+
# process the query parameters
|
|
1457
|
+
# process the header parameters
|
|
1458
|
+
# process the form parameters
|
|
1459
|
+
# process the body parameter
|
|
1460
|
+
if convert_resume_request is not None:
|
|
1461
|
+
_body_params = convert_resume_request
|
|
1462
|
+
|
|
1463
|
+
|
|
1464
|
+
# set the HTTP header `Accept`
|
|
1465
|
+
if 'Accept' not in _header_params:
|
|
1466
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1467
|
+
[
|
|
1468
|
+
'application/json'
|
|
1469
|
+
]
|
|
1470
|
+
)
|
|
1471
|
+
|
|
1472
|
+
# set the HTTP header `Content-Type`
|
|
1473
|
+
if _content_type:
|
|
1474
|
+
_header_params['Content-Type'] = _content_type
|
|
1475
|
+
else:
|
|
1476
|
+
_default_content_type = (
|
|
1477
|
+
self.api_client.select_header_content_type(
|
|
1478
|
+
[
|
|
1479
|
+
'application/json'
|
|
1480
|
+
]
|
|
1481
|
+
)
|
|
1482
|
+
)
|
|
1483
|
+
if _default_content_type is not None:
|
|
1484
|
+
_header_params['Content-Type'] = _default_content_type
|
|
1485
|
+
|
|
1486
|
+
# authentication setting
|
|
1487
|
+
_auth_settings: List[str] = [
|
|
1488
|
+
'HTTPBearer'
|
|
1489
|
+
]
|
|
1490
|
+
|
|
1491
|
+
return self.api_client.param_serialize(
|
|
1492
|
+
method='POST',
|
|
1493
|
+
resource_path='/api/v1/convert/{conversion_id}/resume',
|
|
1494
|
+
path_params=_path_params,
|
|
1495
|
+
query_params=_query_params,
|
|
1496
|
+
header_params=_header_params,
|
|
1497
|
+
body=_body_params,
|
|
1498
|
+
post_params=_form_params,
|
|
1499
|
+
files=_files,
|
|
1500
|
+
auth_settings=_auth_settings,
|
|
1501
|
+
collection_formats=_collection_formats,
|
|
1502
|
+
_host=_host,
|
|
1503
|
+
_request_auth=_request_auth
|
|
1504
|
+
)
|
|
1505
|
+
|
|
1506
|
+
|