restpki-ng-python-client 0.9.0__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.
Files changed (181) hide show
  1. restpki_ng_python_client/__init__.py +200 -0
  2. restpki_ng_python_client/api/__init__.py +17 -0
  3. restpki_ng_python_client/api/authentication_api.py +2041 -0
  4. restpki_ng_python_client/api/cades_signature_api.py +2376 -0
  5. restpki_ng_python_client/api/document_keys_api.py +1199 -0
  6. restpki_ng_python_client/api/documents_api.py +868 -0
  7. restpki_ng_python_client/api/pades_signature_api.py +1797 -0
  8. restpki_ng_python_client/api/pades_visual_positioning_presets_api.py +869 -0
  9. restpki_ng_python_client/api/pdf_api.py +334 -0
  10. restpki_ng_python_client/api/signature_api.py +624 -0
  11. restpki_ng_python_client/api/signature_inspection_api.py +337 -0
  12. restpki_ng_python_client/api/signature_sessions_api.py +891 -0
  13. restpki_ng_python_client/api/timestamp_api.py +654 -0
  14. restpki_ng_python_client/api/upload_api.py +1124 -0
  15. restpki_ng_python_client/api/xml_signature_api.py +1781 -0
  16. restpki_ng_python_client/api_client.py +741 -0
  17. restpki_ng_python_client/api_response.py +21 -0
  18. restpki_ng_python_client/configuration.py +426 -0
  19. restpki_ng_python_client/exceptions.py +166 -0
  20. restpki_ng_python_client/file_utils.py +122 -0
  21. restpki_ng_python_client/models/__init__.py +165 -0
  22. restpki_ng_python_client/models/allocate_document_key_batch_request.py +96 -0
  23. restpki_ng_python_client/models/allocate_document_key_request.py +93 -0
  24. restpki_ng_python_client/models/attribute_certificate_model.py +141 -0
  25. restpki_ng_python_client/models/audit_package_options.py +90 -0
  26. restpki_ng_python_client/models/authentication_failures.py +45 -0
  27. restpki_ng_python_client/models/authentication_get_response.py +92 -0
  28. restpki_ng_python_client/models/authentication_post_request.py +116 -0
  29. restpki_ng_python_client/models/authentication_post_response.py +98 -0
  30. restpki_ng_python_client/models/authentications_post_request.py +95 -0
  31. restpki_ng_python_client/models/authentications_post_response.py +114 -0
  32. restpki_ng_python_client/models/authentications_post_signed_bytes_request.py +99 -0
  33. restpki_ng_python_client/models/authentications_post_signed_bytes_response.py +98 -0
  34. restpki_ng_python_client/models/auto_positioning_horizontal_directions.py +45 -0
  35. restpki_ng_python_client/models/auto_positioning_vertical_directions.py +45 -0
  36. restpki_ng_python_client/models/blockchains.py +45 -0
  37. restpki_ng_python_client/models/cades_signature_model.py +123 -0
  38. restpki_ng_python_client/models/cades_signature_post_request_v1.py +137 -0
  39. restpki_ng_python_client/models/cades_signature_post_request_v2.py +152 -0
  40. restpki_ng_python_client/models/cades_signature_post_request_v3.py +149 -0
  41. restpki_ng_python_client/models/cades_signature_post_response.py +120 -0
  42. restpki_ng_python_client/models/cades_signature_post_signed_bytes_request.py +92 -0
  43. restpki_ng_python_client/models/cades_signature_post_signed_bytes_response.py +106 -0
  44. restpki_ng_python_client/models/cades_signer_model.py +159 -0
  45. restpki_ng_python_client/models/cades_timestamp_model.py +140 -0
  46. restpki_ng_python_client/models/certificate_model.py +197 -0
  47. restpki_ng_python_client/models/certificate_reference_model.py +99 -0
  48. restpki_ng_python_client/models/certificate_requirement.py +95 -0
  49. restpki_ng_python_client/models/certificate_requirement_types.py +45 -0
  50. restpki_ng_python_client/models/certificate_summary.py +142 -0
  51. restpki_ng_python_client/models/certified_attribute_model.py +94 -0
  52. restpki_ng_python_client/models/certified_attribute_types.py +44 -0
  53. restpki_ng_python_client/models/cms_content_types.py +50 -0
  54. restpki_ng_python_client/models/cms_signature_options.py +109 -0
  55. restpki_ng_python_client/models/color_model.py +98 -0
  56. restpki_ng_python_client/models/commitment_type_model.py +99 -0
  57. restpki_ng_python_client/models/complete_authentication_request.py +93 -0
  58. restpki_ng_python_client/models/complete_authentication_response.py +103 -0
  59. restpki_ng_python_client/models/complete_signature_request.py +95 -0
  60. restpki_ng_python_client/models/complete_signature_request_v2.py +91 -0
  61. restpki_ng_python_client/models/create_signature_session_request.py +161 -0
  62. restpki_ng_python_client/models/create_signature_session_response.py +95 -0
  63. restpki_ng_python_client/models/digest_algorithm_and_value_model.py +103 -0
  64. restpki_ng_python_client/models/digest_algorithms.py +49 -0
  65. restpki_ng_python_client/models/document_file_model.py +137 -0
  66. restpki_ng_python_client/models/document_key_model.py +100 -0
  67. restpki_ng_python_client/models/document_key_query_response.py +110 -0
  68. restpki_ng_python_client/models/document_key_summary.py +100 -0
  69. restpki_ng_python_client/models/document_model.py +150 -0
  70. restpki_ng_python_client/models/document_query_response.py +93 -0
  71. restpki_ng_python_client/models/document_status.py +47 -0
  72. restpki_ng_python_client/models/document_summary.py +128 -0
  73. restpki_ng_python_client/models/error_model_v2.py +120 -0
  74. restpki_ng_python_client/models/file_model.py +114 -0
  75. restpki_ng_python_client/models/file_reference_model.py +137 -0
  76. restpki_ng_python_client/models/full_xml_signature_post_request.py +136 -0
  77. restpki_ng_python_client/models/general_name_choices.py +52 -0
  78. restpki_ng_python_client/models/general_name_model.py +108 -0
  79. restpki_ng_python_client/models/holder_types.py +45 -0
  80. restpki_ng_python_client/models/inspect_signature_failures.py +44 -0
  81. restpki_ng_python_client/models/inspect_signature_request.py +127 -0
  82. restpki_ng_python_client/models/inspect_signature_response.py +131 -0
  83. restpki_ng_python_client/models/multipart_upload_begin_response.py +95 -0
  84. restpki_ng_python_client/models/multipart_upload_end_request.py +95 -0
  85. restpki_ng_python_client/models/name_model.py +205 -0
  86. restpki_ng_python_client/models/namespace_model.py +99 -0
  87. restpki_ng_python_client/models/open_cades_signature_request_model.py +147 -0
  88. restpki_ng_python_client/models/open_signature_request_model.py +145 -0
  89. restpki_ng_python_client/models/open_xml_signature_request_model.py +151 -0
  90. restpki_ng_python_client/models/other_name_model.py +107 -0
  91. restpki_ng_python_client/models/pades_certification_level.py +47 -0
  92. restpki_ng_python_client/models/pades_horizontal_align.py +46 -0
  93. restpki_ng_python_client/models/pades_measurement_units.py +45 -0
  94. restpki_ng_python_client/models/pades_page_optimization_model.py +98 -0
  95. restpki_ng_python_client/models/pades_signature_model.py +113 -0
  96. restpki_ng_python_client/models/pades_signature_post_request_v1.py +167 -0
  97. restpki_ng_python_client/models/pades_signature_post_request_v2.py +171 -0
  98. restpki_ng_python_client/models/pades_signature_post_response.py +120 -0
  99. restpki_ng_python_client/models/pades_signature_post_signed_bytes_request.py +92 -0
  100. restpki_ng_python_client/models/pades_signature_post_signed_bytes_response.py +106 -0
  101. restpki_ng_python_client/models/pades_signer_model.py +168 -0
  102. restpki_ng_python_client/models/pades_size_model.py +89 -0
  103. restpki_ng_python_client/models/pades_text_horizontal_align.py +45 -0
  104. restpki_ng_python_client/models/pades_vertical_align.py +46 -0
  105. restpki_ng_python_client/models/pades_visual_auto_positioning_model.py +106 -0
  106. restpki_ng_python_client/models/pades_visual_image_model.py +105 -0
  107. restpki_ng_python_client/models/pades_visual_positioning_model.py +109 -0
  108. restpki_ng_python_client/models/pades_visual_rectangle_model.py +127 -0
  109. restpki_ng_python_client/models/pades_visual_representation_model.py +103 -0
  110. restpki_ng_python_client/models/pades_visual_text_model.py +111 -0
  111. restpki_ng_python_client/models/page_orientations.py +46 -0
  112. restpki_ng_python_client/models/paper_sizes.py +56 -0
  113. restpki_ng_python_client/models/pdf_add_marks_request.py +117 -0
  114. restpki_ng_python_client/models/pdf_add_marks_response.py +91 -0
  115. restpki_ng_python_client/models/pdf_container_definition.py +208 -0
  116. restpki_ng_python_client/models/pdf_helper.py +43 -0
  117. restpki_ng_python_client/models/pdf_mark_element_model.py +230 -0
  118. restpki_ng_python_client/models/pdf_mark_element_type.py +46 -0
  119. restpki_ng_python_client/models/pdf_mark_image_model.py +98 -0
  120. restpki_ng_python_client/models/pdf_mark_model.py +168 -0
  121. restpki_ng_python_client/models/pdf_mark_page_options.py +47 -0
  122. restpki_ng_python_client/models/pdf_signature_options.py +101 -0
  123. restpki_ng_python_client/models/pdf_text_section_model.py +125 -0
  124. restpki_ng_python_client/models/pdf_text_style.py +46 -0
  125. restpki_ng_python_client/models/pki_brazil_certificate_model.py +159 -0
  126. restpki_ng_python_client/models/pki_brazil_certificate_types.py +54 -0
  127. restpki_ng_python_client/models/pki_italy_certificate_model.py +103 -0
  128. restpki_ng_python_client/models/pki_italy_certificate_types.py +46 -0
  129. restpki_ng_python_client/models/prepare_authentication_request.py +100 -0
  130. restpki_ng_python_client/models/prepare_authentication_response.py +99 -0
  131. restpki_ng_python_client/models/prepare_signature_failures.py +46 -0
  132. restpki_ng_python_client/models/prepare_signature_request.py +133 -0
  133. restpki_ng_python_client/models/prepare_signature_response.py +116 -0
  134. restpki_ng_python_client/models/resource_content_or_reference.py +107 -0
  135. restpki_ng_python_client/models/role_attribute_model.py +114 -0
  136. restpki_ng_python_client/models/session_completion_status.py +89 -0
  137. restpki_ng_python_client/models/signature_algorithm_and_value_model.py +106 -0
  138. restpki_ng_python_client/models/signature_algorithm_identifier.py +88 -0
  139. restpki_ng_python_client/models/signature_algorithms.py +48 -0
  140. restpki_ng_python_client/models/signature_b_stamp_model.py +135 -0
  141. restpki_ng_python_client/models/signature_policy_identifier_model.py +105 -0
  142. restpki_ng_python_client/models/signature_result_model.py +105 -0
  143. restpki_ng_python_client/models/signature_session_document_data.py +128 -0
  144. restpki_ng_python_client/models/signature_session_document_summary.py +138 -0
  145. restpki_ng_python_client/models/signature_session_model.py +126 -0
  146. restpki_ng_python_client/models/signature_session_status.py +49 -0
  147. restpki_ng_python_client/models/signature_types.py +46 -0
  148. restpki_ng_python_client/models/signer_b_stamp_model.py +132 -0
  149. restpki_ng_python_client/models/signer_model.py +187 -0
  150. restpki_ng_python_client/models/signer_summary.py +94 -0
  151. restpki_ng_python_client/models/timestamp_issue_response.py +99 -0
  152. restpki_ng_python_client/models/validation_item_model.py +111 -0
  153. restpki_ng_python_client/models/validation_item_types.py +91 -0
  154. restpki_ng_python_client/models/validation_results_model.py +131 -0
  155. restpki_ng_python_client/models/webhook_event_model.py +94 -0
  156. restpki_ng_python_client/models/webhook_event_types.py +44 -0
  157. restpki_ng_python_client/models/xml_attribute_model.py +107 -0
  158. restpki_ng_python_client/models/xml_element_location_model.py +111 -0
  159. restpki_ng_python_client/models/xml_element_model.py +115 -0
  160. restpki_ng_python_client/models/xml_element_signature_post_request.py +145 -0
  161. restpki_ng_python_client/models/xml_id_attribute_model.py +96 -0
  162. restpki_ng_python_client/models/xml_id_resolution_table_model.py +123 -0
  163. restpki_ng_python_client/models/xml_insertion_options.py +47 -0
  164. restpki_ng_python_client/models/xml_node_name_model.py +96 -0
  165. restpki_ng_python_client/models/xml_signature_model.py +154 -0
  166. restpki_ng_python_client/models/xml_signature_options.py +102 -0
  167. restpki_ng_python_client/models/xml_signature_post_response.py +120 -0
  168. restpki_ng_python_client/models/xml_signature_post_signed_bytes_request.py +92 -0
  169. restpki_ng_python_client/models/xml_signature_post_signed_bytes_response.py +106 -0
  170. restpki_ng_python_client/models/xml_signature_response_model.py +113 -0
  171. restpki_ng_python_client/models/xml_signature_types.py +47 -0
  172. restpki_ng_python_client/models/xml_signed_entity_types.py +46 -0
  173. restpki_ng_python_client/py.typed +0 -0
  174. restpki_ng_python_client/rest.py +231 -0
  175. restpki_ng_python_client/restpki_ng_client.py +458 -0
  176. restpki_ng_python_client/standard_signature_policies.py +24 -0
  177. restpki_ng_python_client/utils.py +80 -0
  178. restpki_ng_python_client-0.9.0.dist-info/METADATA +16 -0
  179. restpki_ng_python_client-0.9.0.dist-info/RECORD +181 -0
  180. restpki_ng_python_client-0.9.0.dist-info/WHEEL +5 -0
  181. restpki_ng_python_client-0.9.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,1797 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Rest PKI Core API
5
+
6
+ <b><i>Para Português, <a href=\"https://docs.lacunasoftware.com/pt-br/articles/rest-pki/core/integration/get-started\">clique aqui</a></i></b> <p> <a href=\"https://docs.lacunasoftware.com/en-us/articles/rest-pki/core/\">Rest PKI Core</a> is an upcoming version of <a href=\"https://docs.lacunasoftware.com/en-us/articles/rest-pki/\">Rest PKI</a> that will have extended compatibility with environments and databases. </p> <p> In addition to Windows Server (which is already supported by Rest PKI), Rest PKI Core will also run on <b>Linux</b> (Debian- and RedHat-based distributions) and on <b>Docker</b>. As for database servers, in addition to SQL Server, <b>PostgreSQL</b> will also be supported. </p> <p> <b>Before getting started, see the integration overview on the <a href=\"https://docs.lacunasoftware.com/en-us/articles/rest-pki/core/integration/\">Integration Guide</a></b> </p> <p> For questions regarding the usage of this API, please reach us at <a href=\"https://lacuna.help/\">lacuna.help</a> </p> <h2>Parameters</h2> <p> You will need the following parameters: </p> <ul> <li><b>Endpoint</b>: address of the Rest PKI Core instance that will be used</li> <li><b>API Key</b>: authorization key for using the API</li> </ul> <p> The <span class=\"model\">endpoint</span> must be prefixed to all relative URLs mentioned here. As for the <span class=\"model\">API Key</span>, see how to use it below. </p> <h2>Authentication</h2> <p> The API key must be sent on the <span class=\"model\">X-Api-Key</span> header on each request: </p> <!-- unfortunately, class \"example microlight\" doesn't seem to work here --> <pre style=\"font-size: 12px; padding: 10px; border-radius: 4px; background: #41444e; font-weight: 600; color: #fff;\"> X-Api-Key: yourapp|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx </pre> <h2>HTTP Codes</h2> <p> The APIs will return the following HTTP codes: </p> <table> <thead> <tr> <th>Code</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><strong class=\"model-title\">200 (OK)</strong></td> <td>Request processed successfully. The response is different for each API, please refer to the operation's documentation</td> </tr> <tr> <td><strong class=\"model-title\">400 (Bad Request)</strong></td> <td>Syntax error. For instance, when a required field was not provided</td> </tr> <tr> <td><strong class=\"model-title\">401 (Unauthorized)</strong></td> <td>API key not provided or invalid</td> </tr> <tr> <td><strong class=\"model-title\">403 (Forbidden)</strong></td> <td>API key is valid, but the application has insufficient permissions to complete the requested operation</td> </tr> <tr> <td><strong class=\"model-title\">422 (Unprocessable Entity)</strong></td> <td>API error. The response body is an <a href=\"#model-ErrorModelV2\" class=\"model\">ErrorModelV2</a> </tr> <tr> <td><strong class=\"model-title\">500 (Internal Server Error)</strong></td> <td>An unexpected error occurred. The <span class=\"model\">exceptionCode</span> contained on the response body may be of help for our support team during diagnostic.</td> </tr> </tbody> </table> <h3>Error Codes</h3> <p> Some of the error codes returned in the <span class=\"model\">code</span> field of an <a href=\"#model-ErrorModelV2\" class=\"model\">ErrorModelV2</a> (body of responses with HTTP status code 422) are provided below*: </p> <table> <thead> <tr> <th>Code</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td class=\"model\">DocumentNotFound</td> <td>A referenced document was not found (check the document ID)</td> </tr> <tr> <td class=\"model\">SecurityContextNotFound</td> <td>A referenced security context was not found (check the security context ID)</td> </tr> <tr> <td class=\"model\">SignatureSessionNotFound</td> <td>A referenced signature session was not found (check the signature session ID)</td> </tr> <tr> <td class=\"model\">BadSignatureSessionOperation</td> <td>The operation is invalid for the current signature session or document status. For instance, trying to await the session's completion if it is still <span class=\"model\">Pending</span> results in this error</td> </tr> <tr> <td class=\"model\">BackgroundProcessing</td> <td>The operation cannot be completed at this time because the resource is being processed in background</td> </tr> <tr> <td class=\"model\">SignatureSessionTokenRequired</td> <td>The signature session token was not passed on the <span class=\"model\">X-Signature-Session-Token</span> request header</td> </tr> <tr> <td class=\"model\">BadSignatureSessionToken</td> <td>An invalid signature session token was passed on the <span class=\"model\">X-Signature-Session-Token</span> request header. Check your application for possible corruption of the session token, which may contain characters <span class=\"code\">-</span> (hyphen) and <span class=\"code\">_</span> (underscore)</td> </tr> <tr> <td class=\"model\">ExpiredSignatureSessionToken</td> <td>An expired signature session token was passed on the <span class=\"model\">X-Signature-Session-Token</span> request header. Signature session tokens are normally valid for 4 hours.</td> </tr> </tbody> </table> <p style=\"font-size: 0.9em\"> *The codes shown above are the most common error codes. Nonetheless, this list is not comprehensive. New codes may be added anytime without previous warning. </p> <h2>Culture / Internationalization (i18n)</h2> <p>The <span class=\"model\">Accept-Language</span> request header is observed by this API. The following cultures are supported:</p> <ul> <li><span class=\"code\">en-US</span> (or simply <span class=\"code\">en</span>)</li> <li><span class=\"code\">pt-BR</span> (or simply <span class=\"code\">pt</span>)</li> </ul> <p><i>Notice: error messages are not affected by this header and therefore should not be displayed to users, being better suited for logging.</i></p>
7
+
8
+ The version of the OpenAPI document: 2.1.2
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ import io
16
+ import warnings
17
+
18
+ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
19
+ from typing import Dict, List, Optional, Tuple, Union, Any
20
+
21
+ try:
22
+ from typing import Annotated
23
+ except ImportError:
24
+ from typing_extensions import Annotated
25
+
26
+ from pydantic import StrictStr
27
+
28
+ from typing import Optional
29
+
30
+ from restpki_ng_python_client.models.complete_signature_request import CompleteSignatureRequest
31
+ from restpki_ng_python_client.models.open_signature_request_model import OpenSignatureRequestModel
32
+ from restpki_ng_python_client.models.pades_signature_model import PadesSignatureModel
33
+ from restpki_ng_python_client.models.pades_signature_post_request_v1 import PadesSignaturePostRequestV1
34
+ from restpki_ng_python_client.models.pades_signature_post_request_v2 import PadesSignaturePostRequestV2
35
+ from restpki_ng_python_client.models.pades_signature_post_response import PadesSignaturePostResponse
36
+ from restpki_ng_python_client.models.pades_signature_post_signed_bytes_request import PadesSignaturePostSignedBytesRequest
37
+ from restpki_ng_python_client.models.pades_signature_post_signed_bytes_response import PadesSignaturePostSignedBytesResponse
38
+ from restpki_ng_python_client.models.signature_result_model import SignatureResultModel
39
+
40
+ from restpki_ng_python_client.api_client import ApiClient
41
+ from restpki_ng_python_client.api_response import ApiResponse
42
+ from restpki_ng_python_client.rest import RESTResponseType
43
+
44
+
45
+ class PadesSignatureApi:
46
+ """NOTE: This class is auto generated by OpenAPI Generator
47
+ Ref: https://openapi-generator.tech
48
+
49
+ Do not edit the class manually.
50
+ """
51
+
52
+ def __init__(self, api_client=None) -> None:
53
+ if api_client is None:
54
+ api_client = ApiClient.get_default()
55
+ self.api_client = api_client
56
+
57
+
58
+ @validate_call
59
+ def api_pades_signatures_open_post(
60
+ self,
61
+ open_signature_request_model: Optional[OpenSignatureRequestModel] = None,
62
+ _request_timeout: Union[
63
+ None,
64
+ Annotated[StrictFloat, Field(gt=0)],
65
+ Tuple[
66
+ Annotated[StrictFloat, Field(gt=0)],
67
+ Annotated[StrictFloat, Field(gt=0)]
68
+ ]
69
+ ] = None,
70
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
71
+ _content_type: Optional[StrictStr] = None,
72
+ _headers: Optional[Dict[StrictStr, Any]] = None,
73
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
74
+ ) -> PadesSignatureModel:
75
+ """api_pades_signatures_open_post
76
+
77
+
78
+ :param open_signature_request_model:
79
+ :type open_signature_request_model: OpenSignatureRequestModel
80
+ :param _request_timeout: timeout setting for this request. If one
81
+ number provided, it will be total request
82
+ timeout. It can also be a pair (tuple) of
83
+ (connection, read) timeouts.
84
+ :type _request_timeout: int, tuple(int, int), optional
85
+ :param _request_auth: set to override the auth_settings for an a single
86
+ request; this effectively ignores the
87
+ authentication in the spec for a single request.
88
+ :type _request_auth: dict, optional
89
+ :param _content_type: force content-type for the request.
90
+ :type _content_type: str, Optional
91
+ :param _headers: set to override the headers for a single
92
+ request; this effectively ignores the headers
93
+ in the spec for a single request.
94
+ :type _headers: dict, optional
95
+ :param _host_index: set to override the host_index for a single
96
+ request; this effectively ignores the host_index
97
+ in the spec for a single request.
98
+ :type _host_index: int, optional
99
+ :return: Returns the result object.
100
+ """ # noqa: E501
101
+
102
+ _param = self._api_pades_signatures_open_post_serialize(
103
+ open_signature_request_model=open_signature_request_model,
104
+ _request_auth=_request_auth,
105
+ _content_type=_content_type,
106
+ _headers=_headers,
107
+ _host_index=_host_index
108
+ )
109
+
110
+ _response_types_map: Dict[str, Optional[str]] = {
111
+ '200': "PadesSignatureModel",
112
+ '400': None,
113
+ '401': None,
114
+ '403': None,
115
+ '422': None
116
+
117
+ }
118
+ response_data = self.api_client.call_api(
119
+ *_param,
120
+ _request_timeout=_request_timeout
121
+ )
122
+ response_data.read()
123
+ return self.api_client.response_deserialize(
124
+ response_data=response_data,
125
+ response_types_map=_response_types_map,
126
+ ).data
127
+
128
+
129
+ @validate_call
130
+ def api_pades_signatures_open_post_with_http_info(
131
+ self,
132
+ open_signature_request_model: Optional[OpenSignatureRequestModel] = None,
133
+ _request_timeout: Union[
134
+ None,
135
+ Annotated[StrictFloat, Field(gt=0)],
136
+ Tuple[
137
+ Annotated[StrictFloat, Field(gt=0)],
138
+ Annotated[StrictFloat, Field(gt=0)]
139
+ ]
140
+ ] = None,
141
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
142
+ _content_type: Optional[StrictStr] = None,
143
+ _headers: Optional[Dict[StrictStr, Any]] = None,
144
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
145
+ ) -> ApiResponse[PadesSignatureModel]:
146
+ """api_pades_signatures_open_post
147
+
148
+
149
+ :param open_signature_request_model:
150
+ :type open_signature_request_model: OpenSignatureRequestModel
151
+ :param _request_timeout: timeout setting for this request. If one
152
+ number provided, it will be total request
153
+ timeout. It can also be a pair (tuple) of
154
+ (connection, read) timeouts.
155
+ :type _request_timeout: int, tuple(int, int), optional
156
+ :param _request_auth: set to override the auth_settings for an a single
157
+ request; this effectively ignores the
158
+ authentication in the spec for a single request.
159
+ :type _request_auth: dict, optional
160
+ :param _content_type: force content-type for the request.
161
+ :type _content_type: str, Optional
162
+ :param _headers: set to override the headers for a single
163
+ request; this effectively ignores the headers
164
+ in the spec for a single request.
165
+ :type _headers: dict, optional
166
+ :param _host_index: set to override the host_index for a single
167
+ request; this effectively ignores the host_index
168
+ in the spec for a single request.
169
+ :type _host_index: int, optional
170
+ :return: Returns the result object.
171
+ """ # noqa: E501
172
+
173
+ _param = self._api_pades_signatures_open_post_serialize(
174
+ open_signature_request_model=open_signature_request_model,
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': "PadesSignatureModel",
183
+ '400': None,
184
+ '401': None,
185
+ '403': None,
186
+ '422': None
187
+
188
+ }
189
+ response_data = self.api_client.call_api(
190
+ *_param,
191
+ _request_timeout=_request_timeout
192
+ )
193
+ response_data.read()
194
+ return self.api_client.response_deserialize(
195
+ response_data=response_data,
196
+ response_types_map=_response_types_map,
197
+ )
198
+
199
+
200
+ @validate_call
201
+ def api_pades_signatures_open_post_without_preload_content(
202
+ self,
203
+ open_signature_request_model: Optional[OpenSignatureRequestModel] = 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
+ """api_pades_signatures_open_post
218
+
219
+
220
+ :param open_signature_request_model:
221
+ :type open_signature_request_model: OpenSignatureRequestModel
222
+ :param _request_timeout: timeout setting for this request. If one
223
+ number provided, it will be total request
224
+ timeout. It can also be a pair (tuple) of
225
+ (connection, read) timeouts.
226
+ :type _request_timeout: int, tuple(int, int), optional
227
+ :param _request_auth: set to override the auth_settings for an a single
228
+ request; this effectively ignores the
229
+ authentication in the spec for a single request.
230
+ :type _request_auth: dict, optional
231
+ :param _content_type: force content-type for the request.
232
+ :type _content_type: str, Optional
233
+ :param _headers: set to override the headers for a single
234
+ request; this effectively ignores the headers
235
+ in the spec for a single request.
236
+ :type _headers: dict, optional
237
+ :param _host_index: set to override the host_index for a single
238
+ request; this effectively ignores the host_index
239
+ in the spec for a single request.
240
+ :type _host_index: int, optional
241
+ :return: Returns the result object.
242
+ """ # noqa: E501
243
+
244
+ _param = self._api_pades_signatures_open_post_serialize(
245
+ open_signature_request_model=open_signature_request_model,
246
+ _request_auth=_request_auth,
247
+ _content_type=_content_type,
248
+ _headers=_headers,
249
+ _host_index=_host_index
250
+ )
251
+
252
+ _response_types_map: Dict[str, Optional[str]] = {
253
+ '200': "PadesSignatureModel",
254
+ '400': None,
255
+ '401': None,
256
+ '403': None,
257
+ '422': None
258
+
259
+ }
260
+ response_data = self.api_client.call_api(
261
+ *_param,
262
+ _request_timeout=_request_timeout
263
+ )
264
+ return response_data.response
265
+
266
+
267
+ def _api_pades_signatures_open_post_serialize(
268
+ self,
269
+ open_signature_request_model,
270
+ _request_auth,
271
+ _content_type,
272
+ _headers,
273
+ _host_index,
274
+ ) -> Tuple:
275
+
276
+ _host = None
277
+
278
+ _collection_formats: Dict[str, str] = {
279
+
280
+ }
281
+
282
+ _path_params: Dict[str, str] = {}
283
+ _query_params: List[Tuple[str, str]] = []
284
+ _header_params: Dict[str, Optional[str]] = _headers or {}
285
+ _form_params: List[Tuple[str, str]] = []
286
+ _files: Dict[str, str] = {}
287
+ _body_params: Optional[bytes] = None
288
+
289
+ # process the path parameters
290
+ # process the query parameters
291
+ # process the header parameters
292
+ # process the form parameters
293
+ # process the body parameter
294
+ if open_signature_request_model is not None:
295
+ _body_params = open_signature_request_model
296
+
297
+
298
+ # set the HTTP header `Accept`
299
+ _header_params['Accept'] = self.api_client.select_header_accept(
300
+ [
301
+ 'text/plain',
302
+ 'application/json',
303
+ 'text/json'
304
+ ]
305
+ )
306
+
307
+ # set the HTTP header `Content-Type`
308
+ if _content_type:
309
+ _header_params['Content-Type'] = _content_type
310
+ else:
311
+ _default_content_type = (
312
+ self.api_client.select_header_content_type(
313
+ [
314
+ 'application/json-patch+json',
315
+ 'application/json',
316
+ 'text/json',
317
+ 'application/*+json'
318
+ ]
319
+ )
320
+ )
321
+ if _default_content_type is not None:
322
+ _header_params['Content-Type'] = _default_content_type
323
+
324
+ # authentication setting
325
+ _auth_settings: List[str] = [
326
+ ]
327
+
328
+ return self.api_client.param_serialize(
329
+ method='POST',
330
+ resource_path='/Api/PadesSignatures/Open',
331
+ path_params=_path_params,
332
+ query_params=_query_params,
333
+ header_params=_header_params,
334
+ body=_body_params,
335
+ post_params=_form_params,
336
+ files=_files,
337
+ auth_settings=_auth_settings,
338
+ collection_formats=_collection_formats,
339
+ _host=_host,
340
+ _request_auth=_request_auth
341
+ )
342
+
343
+
344
+
345
+
346
+ @validate_call
347
+ def api_pades_signatures_post(
348
+ self,
349
+ pades_signature_post_request_v1: Optional[PadesSignaturePostRequestV1] = None,
350
+ _request_timeout: Union[
351
+ None,
352
+ Annotated[StrictFloat, Field(gt=0)],
353
+ Tuple[
354
+ Annotated[StrictFloat, Field(gt=0)],
355
+ Annotated[StrictFloat, Field(gt=0)]
356
+ ]
357
+ ] = None,
358
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
359
+ _content_type: Optional[StrictStr] = None,
360
+ _headers: Optional[Dict[StrictStr, Any]] = None,
361
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
362
+ ) -> PadesSignaturePostResponse:
363
+ """api_pades_signatures_post
364
+
365
+
366
+ :param pades_signature_post_request_v1:
367
+ :type pades_signature_post_request_v1: PadesSignaturePostRequestV1
368
+ :param _request_timeout: timeout setting for this request. If one
369
+ number provided, it will be total request
370
+ timeout. It can also be a pair (tuple) of
371
+ (connection, read) timeouts.
372
+ :type _request_timeout: int, tuple(int, int), optional
373
+ :param _request_auth: set to override the auth_settings for an a single
374
+ request; this effectively ignores the
375
+ authentication in the spec for a single request.
376
+ :type _request_auth: dict, optional
377
+ :param _content_type: force content-type for the request.
378
+ :type _content_type: str, Optional
379
+ :param _headers: set to override the headers for a single
380
+ request; this effectively ignores the headers
381
+ in the spec for a single request.
382
+ :type _headers: dict, optional
383
+ :param _host_index: set to override the host_index for a single
384
+ request; this effectively ignores the host_index
385
+ in the spec for a single request.
386
+ :type _host_index: int, optional
387
+ :return: Returns the result object.
388
+ """ # noqa: E501
389
+
390
+ _param = self._api_pades_signatures_post_serialize(
391
+ pades_signature_post_request_v1=pades_signature_post_request_v1,
392
+ _request_auth=_request_auth,
393
+ _content_type=_content_type,
394
+ _headers=_headers,
395
+ _host_index=_host_index
396
+ )
397
+
398
+ _response_types_map: Dict[str, Optional[str]] = {
399
+ '201': "PadesSignaturePostResponse",
400
+ '400': None,
401
+ '401': None,
402
+ '403': None,
403
+ '422': None
404
+
405
+ }
406
+ response_data = self.api_client.call_api(
407
+ *_param,
408
+ _request_timeout=_request_timeout
409
+ )
410
+ response_data.read()
411
+ return self.api_client.response_deserialize(
412
+ response_data=response_data,
413
+ response_types_map=_response_types_map,
414
+ ).data
415
+
416
+
417
+ @validate_call
418
+ def api_pades_signatures_post_with_http_info(
419
+ self,
420
+ pades_signature_post_request_v1: Optional[PadesSignaturePostRequestV1] = None,
421
+ _request_timeout: Union[
422
+ None,
423
+ Annotated[StrictFloat, Field(gt=0)],
424
+ Tuple[
425
+ Annotated[StrictFloat, Field(gt=0)],
426
+ Annotated[StrictFloat, Field(gt=0)]
427
+ ]
428
+ ] = None,
429
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
430
+ _content_type: Optional[StrictStr] = None,
431
+ _headers: Optional[Dict[StrictStr, Any]] = None,
432
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
433
+ ) -> ApiResponse[PadesSignaturePostResponse]:
434
+ """api_pades_signatures_post
435
+
436
+
437
+ :param pades_signature_post_request_v1:
438
+ :type pades_signature_post_request_v1: PadesSignaturePostRequestV1
439
+ :param _request_timeout: timeout setting for this request. If one
440
+ number provided, it will be total request
441
+ timeout. It can also be a pair (tuple) of
442
+ (connection, read) timeouts.
443
+ :type _request_timeout: int, tuple(int, int), optional
444
+ :param _request_auth: set to override the auth_settings for an a single
445
+ request; this effectively ignores the
446
+ authentication in the spec for a single request.
447
+ :type _request_auth: dict, optional
448
+ :param _content_type: force content-type for the request.
449
+ :type _content_type: str, Optional
450
+ :param _headers: set to override the headers for a single
451
+ request; this effectively ignores the headers
452
+ in the spec for a single request.
453
+ :type _headers: dict, optional
454
+ :param _host_index: set to override the host_index for a single
455
+ request; this effectively ignores the host_index
456
+ in the spec for a single request.
457
+ :type _host_index: int, optional
458
+ :return: Returns the result object.
459
+ """ # noqa: E501
460
+
461
+ _param = self._api_pades_signatures_post_serialize(
462
+ pades_signature_post_request_v1=pades_signature_post_request_v1,
463
+ _request_auth=_request_auth,
464
+ _content_type=_content_type,
465
+ _headers=_headers,
466
+ _host_index=_host_index
467
+ )
468
+
469
+ _response_types_map: Dict[str, Optional[str]] = {
470
+ '201': "PadesSignaturePostResponse",
471
+ '400': None,
472
+ '401': None,
473
+ '403': None,
474
+ '422': None
475
+
476
+ }
477
+ response_data = self.api_client.call_api(
478
+ *_param,
479
+ _request_timeout=_request_timeout
480
+ )
481
+ response_data.read()
482
+ return self.api_client.response_deserialize(
483
+ response_data=response_data,
484
+ response_types_map=_response_types_map,
485
+ )
486
+
487
+
488
+ @validate_call
489
+ def api_pades_signatures_post_without_preload_content(
490
+ self,
491
+ pades_signature_post_request_v1: Optional[PadesSignaturePostRequestV1] = None,
492
+ _request_timeout: Union[
493
+ None,
494
+ Annotated[StrictFloat, Field(gt=0)],
495
+ Tuple[
496
+ Annotated[StrictFloat, Field(gt=0)],
497
+ Annotated[StrictFloat, Field(gt=0)]
498
+ ]
499
+ ] = None,
500
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
501
+ _content_type: Optional[StrictStr] = None,
502
+ _headers: Optional[Dict[StrictStr, Any]] = None,
503
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
504
+ ) -> RESTResponseType:
505
+ """api_pades_signatures_post
506
+
507
+
508
+ :param pades_signature_post_request_v1:
509
+ :type pades_signature_post_request_v1: PadesSignaturePostRequestV1
510
+ :param _request_timeout: timeout setting for this request. If one
511
+ number provided, it will be total request
512
+ timeout. It can also be a pair (tuple) of
513
+ (connection, read) timeouts.
514
+ :type _request_timeout: int, tuple(int, int), optional
515
+ :param _request_auth: set to override the auth_settings for an a single
516
+ request; this effectively ignores the
517
+ authentication in the spec for a single request.
518
+ :type _request_auth: dict, optional
519
+ :param _content_type: force content-type for the request.
520
+ :type _content_type: str, Optional
521
+ :param _headers: set to override the headers for a single
522
+ request; this effectively ignores the headers
523
+ in the spec for a single request.
524
+ :type _headers: dict, optional
525
+ :param _host_index: set to override the host_index for a single
526
+ request; this effectively ignores the host_index
527
+ in the spec for a single request.
528
+ :type _host_index: int, optional
529
+ :return: Returns the result object.
530
+ """ # noqa: E501
531
+
532
+ _param = self._api_pades_signatures_post_serialize(
533
+ pades_signature_post_request_v1=pades_signature_post_request_v1,
534
+ _request_auth=_request_auth,
535
+ _content_type=_content_type,
536
+ _headers=_headers,
537
+ _host_index=_host_index
538
+ )
539
+
540
+ _response_types_map: Dict[str, Optional[str]] = {
541
+ '201': "PadesSignaturePostResponse",
542
+ '400': None,
543
+ '401': None,
544
+ '403': None,
545
+ '422': None
546
+
547
+ }
548
+ response_data = self.api_client.call_api(
549
+ *_param,
550
+ _request_timeout=_request_timeout
551
+ )
552
+ return response_data.response
553
+
554
+
555
+ def _api_pades_signatures_post_serialize(
556
+ self,
557
+ pades_signature_post_request_v1,
558
+ _request_auth,
559
+ _content_type,
560
+ _headers,
561
+ _host_index,
562
+ ) -> Tuple:
563
+
564
+ _host = None
565
+
566
+ _collection_formats: Dict[str, str] = {
567
+
568
+ }
569
+
570
+ _path_params: Dict[str, str] = {}
571
+ _query_params: List[Tuple[str, str]] = []
572
+ _header_params: Dict[str, Optional[str]] = _headers or {}
573
+ _form_params: List[Tuple[str, str]] = []
574
+ _files: Dict[str, str] = {}
575
+ _body_params: Optional[bytes] = None
576
+
577
+ # process the path parameters
578
+ # process the query parameters
579
+ # process the header parameters
580
+ # process the form parameters
581
+ # process the body parameter
582
+ if pades_signature_post_request_v1 is not None:
583
+ _body_params = pades_signature_post_request_v1
584
+
585
+
586
+ # set the HTTP header `Accept`
587
+ _header_params['Accept'] = self.api_client.select_header_accept(
588
+ [
589
+ 'text/plain',
590
+ 'application/json',
591
+ 'text/json'
592
+ ]
593
+ )
594
+
595
+ # set the HTTP header `Content-Type`
596
+ if _content_type:
597
+ _header_params['Content-Type'] = _content_type
598
+ else:
599
+ _default_content_type = (
600
+ self.api_client.select_header_content_type(
601
+ [
602
+ 'application/json-patch+json',
603
+ 'application/json',
604
+ 'text/json',
605
+ 'application/*+json'
606
+ ]
607
+ )
608
+ )
609
+ if _default_content_type is not None:
610
+ _header_params['Content-Type'] = _default_content_type
611
+
612
+ # authentication setting
613
+ _auth_settings: List[str] = [
614
+ ]
615
+
616
+ return self.api_client.param_serialize(
617
+ method='POST',
618
+ resource_path='/Api/PadesSignatures',
619
+ path_params=_path_params,
620
+ query_params=_query_params,
621
+ header_params=_header_params,
622
+ body=_body_params,
623
+ post_params=_form_params,
624
+ files=_files,
625
+ auth_settings=_auth_settings,
626
+ collection_formats=_collection_formats,
627
+ _host=_host,
628
+ _request_auth=_request_auth
629
+ )
630
+
631
+
632
+
633
+
634
+ @validate_call
635
+ def api_pades_signatures_token_finalize_post(
636
+ self,
637
+ token: StrictStr,
638
+ _request_timeout: Union[
639
+ None,
640
+ Annotated[StrictFloat, Field(gt=0)],
641
+ Tuple[
642
+ Annotated[StrictFloat, Field(gt=0)],
643
+ Annotated[StrictFloat, Field(gt=0)]
644
+ ]
645
+ ] = None,
646
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
647
+ _content_type: Optional[StrictStr] = None,
648
+ _headers: Optional[Dict[StrictStr, Any]] = None,
649
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
650
+ ) -> PadesSignaturePostSignedBytesResponse:
651
+ """api_pades_signatures_token_finalize_post
652
+
653
+
654
+ :param token: (required)
655
+ :type token: str
656
+ :param _request_timeout: timeout setting for this request. If one
657
+ number provided, it will be total request
658
+ timeout. It can also be a pair (tuple) of
659
+ (connection, read) timeouts.
660
+ :type _request_timeout: int, tuple(int, int), optional
661
+ :param _request_auth: set to override the auth_settings for an a single
662
+ request; this effectively ignores the
663
+ authentication in the spec for a single request.
664
+ :type _request_auth: dict, optional
665
+ :param _content_type: force content-type for the request.
666
+ :type _content_type: str, Optional
667
+ :param _headers: set to override the headers for a single
668
+ request; this effectively ignores the headers
669
+ in the spec for a single request.
670
+ :type _headers: dict, optional
671
+ :param _host_index: set to override the host_index for a single
672
+ request; this effectively ignores the host_index
673
+ in the spec for a single request.
674
+ :type _host_index: int, optional
675
+ :return: Returns the result object.
676
+ """ # noqa: E501
677
+
678
+ _param = self._api_pades_signatures_token_finalize_post_serialize(
679
+ token=token,
680
+ _request_auth=_request_auth,
681
+ _content_type=_content_type,
682
+ _headers=_headers,
683
+ _host_index=_host_index
684
+ )
685
+
686
+ _response_types_map: Dict[str, Optional[str]] = {
687
+ '200': "PadesSignaturePostSignedBytesResponse",
688
+ '400': None,
689
+ '401': None,
690
+ '403': None,
691
+ '422': None
692
+
693
+ }
694
+ response_data = self.api_client.call_api(
695
+ *_param,
696
+ _request_timeout=_request_timeout
697
+ )
698
+ response_data.read()
699
+ return self.api_client.response_deserialize(
700
+ response_data=response_data,
701
+ response_types_map=_response_types_map,
702
+ ).data
703
+
704
+
705
+ @validate_call
706
+ def api_pades_signatures_token_finalize_post_with_http_info(
707
+ self,
708
+ token: StrictStr,
709
+ _request_timeout: Union[
710
+ None,
711
+ Annotated[StrictFloat, Field(gt=0)],
712
+ Tuple[
713
+ Annotated[StrictFloat, Field(gt=0)],
714
+ Annotated[StrictFloat, Field(gt=0)]
715
+ ]
716
+ ] = None,
717
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
718
+ _content_type: Optional[StrictStr] = None,
719
+ _headers: Optional[Dict[StrictStr, Any]] = None,
720
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
721
+ ) -> ApiResponse[PadesSignaturePostSignedBytesResponse]:
722
+ """api_pades_signatures_token_finalize_post
723
+
724
+
725
+ :param token: (required)
726
+ :type token: str
727
+ :param _request_timeout: timeout setting for this request. If one
728
+ number provided, it will be total request
729
+ timeout. It can also be a pair (tuple) of
730
+ (connection, read) timeouts.
731
+ :type _request_timeout: int, tuple(int, int), optional
732
+ :param _request_auth: set to override the auth_settings for an a single
733
+ request; this effectively ignores the
734
+ authentication in the spec for a single request.
735
+ :type _request_auth: dict, optional
736
+ :param _content_type: force content-type for the request.
737
+ :type _content_type: str, Optional
738
+ :param _headers: set to override the headers for a single
739
+ request; this effectively ignores the headers
740
+ in the spec for a single request.
741
+ :type _headers: dict, optional
742
+ :param _host_index: set to override the host_index for a single
743
+ request; this effectively ignores the host_index
744
+ in the spec for a single request.
745
+ :type _host_index: int, optional
746
+ :return: Returns the result object.
747
+ """ # noqa: E501
748
+
749
+ _param = self._api_pades_signatures_token_finalize_post_serialize(
750
+ token=token,
751
+ _request_auth=_request_auth,
752
+ _content_type=_content_type,
753
+ _headers=_headers,
754
+ _host_index=_host_index
755
+ )
756
+
757
+ _response_types_map: Dict[str, Optional[str]] = {
758
+ '200': "PadesSignaturePostSignedBytesResponse",
759
+ '400': None,
760
+ '401': None,
761
+ '403': None,
762
+ '422': None
763
+
764
+ }
765
+ response_data = self.api_client.call_api(
766
+ *_param,
767
+ _request_timeout=_request_timeout
768
+ )
769
+ response_data.read()
770
+ return self.api_client.response_deserialize(
771
+ response_data=response_data,
772
+ response_types_map=_response_types_map,
773
+ )
774
+
775
+
776
+ @validate_call
777
+ def api_pades_signatures_token_finalize_post_without_preload_content(
778
+ self,
779
+ token: StrictStr,
780
+ _request_timeout: Union[
781
+ None,
782
+ Annotated[StrictFloat, Field(gt=0)],
783
+ Tuple[
784
+ Annotated[StrictFloat, Field(gt=0)],
785
+ Annotated[StrictFloat, Field(gt=0)]
786
+ ]
787
+ ] = None,
788
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
789
+ _content_type: Optional[StrictStr] = None,
790
+ _headers: Optional[Dict[StrictStr, Any]] = None,
791
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
792
+ ) -> RESTResponseType:
793
+ """api_pades_signatures_token_finalize_post
794
+
795
+
796
+ :param token: (required)
797
+ :type token: str
798
+ :param _request_timeout: timeout setting for this request. If one
799
+ number provided, it will be total request
800
+ timeout. It can also be a pair (tuple) of
801
+ (connection, read) timeouts.
802
+ :type _request_timeout: int, tuple(int, int), optional
803
+ :param _request_auth: set to override the auth_settings for an a single
804
+ request; this effectively ignores the
805
+ authentication in the spec for a single request.
806
+ :type _request_auth: dict, optional
807
+ :param _content_type: force content-type for the request.
808
+ :type _content_type: str, Optional
809
+ :param _headers: set to override the headers for a single
810
+ request; this effectively ignores the headers
811
+ in the spec for a single request.
812
+ :type _headers: dict, optional
813
+ :param _host_index: set to override the host_index for a single
814
+ request; this effectively ignores the host_index
815
+ in the spec for a single request.
816
+ :type _host_index: int, optional
817
+ :return: Returns the result object.
818
+ """ # noqa: E501
819
+
820
+ _param = self._api_pades_signatures_token_finalize_post_serialize(
821
+ token=token,
822
+ _request_auth=_request_auth,
823
+ _content_type=_content_type,
824
+ _headers=_headers,
825
+ _host_index=_host_index
826
+ )
827
+
828
+ _response_types_map: Dict[str, Optional[str]] = {
829
+ '200': "PadesSignaturePostSignedBytesResponse",
830
+ '400': None,
831
+ '401': None,
832
+ '403': None,
833
+ '422': None
834
+
835
+ }
836
+ response_data = self.api_client.call_api(
837
+ *_param,
838
+ _request_timeout=_request_timeout
839
+ )
840
+ return response_data.response
841
+
842
+
843
+ def _api_pades_signatures_token_finalize_post_serialize(
844
+ self,
845
+ token,
846
+ _request_auth,
847
+ _content_type,
848
+ _headers,
849
+ _host_index,
850
+ ) -> Tuple:
851
+
852
+ _host = None
853
+
854
+ _collection_formats: Dict[str, str] = {
855
+
856
+ }
857
+
858
+ _path_params: Dict[str, str] = {}
859
+ _query_params: List[Tuple[str, str]] = []
860
+ _header_params: Dict[str, Optional[str]] = _headers or {}
861
+ _form_params: List[Tuple[str, str]] = []
862
+ _files: Dict[str, str] = {}
863
+ _body_params: Optional[bytes] = None
864
+
865
+ # process the path parameters
866
+ if token is not None:
867
+ _path_params['token'] = token
868
+ # process the query parameters
869
+ # process the header parameters
870
+ # process the form parameters
871
+ # process the body parameter
872
+
873
+
874
+ # set the HTTP header `Accept`
875
+ _header_params['Accept'] = self.api_client.select_header_accept(
876
+ [
877
+ 'text/plain',
878
+ 'application/json',
879
+ 'text/json'
880
+ ]
881
+ )
882
+
883
+
884
+ # authentication setting
885
+ _auth_settings: List[str] = [
886
+ ]
887
+
888
+ return self.api_client.param_serialize(
889
+ method='POST',
890
+ resource_path='/Api/PadesSignatures/{token}/Finalize',
891
+ path_params=_path_params,
892
+ query_params=_query_params,
893
+ header_params=_header_params,
894
+ body=_body_params,
895
+ post_params=_form_params,
896
+ files=_files,
897
+ auth_settings=_auth_settings,
898
+ collection_formats=_collection_formats,
899
+ _host=_host,
900
+ _request_auth=_request_auth
901
+ )
902
+
903
+
904
+
905
+
906
+ @validate_call
907
+ def api_pades_signatures_token_signed_bytes_post(
908
+ self,
909
+ token: StrictStr,
910
+ pades_signature_post_signed_bytes_request: Optional[PadesSignaturePostSignedBytesRequest] = None,
911
+ _request_timeout: Union[
912
+ None,
913
+ Annotated[StrictFloat, Field(gt=0)],
914
+ Tuple[
915
+ Annotated[StrictFloat, Field(gt=0)],
916
+ Annotated[StrictFloat, Field(gt=0)]
917
+ ]
918
+ ] = None,
919
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
920
+ _content_type: Optional[StrictStr] = None,
921
+ _headers: Optional[Dict[StrictStr, Any]] = None,
922
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
923
+ ) -> PadesSignaturePostSignedBytesResponse:
924
+ """api_pades_signatures_token_signed_bytes_post
925
+
926
+
927
+ :param token: (required)
928
+ :type token: str
929
+ :param pades_signature_post_signed_bytes_request:
930
+ :type pades_signature_post_signed_bytes_request: PadesSignaturePostSignedBytesRequest
931
+ :param _request_timeout: timeout setting for this request. If one
932
+ number provided, it will be total request
933
+ timeout. It can also be a pair (tuple) of
934
+ (connection, read) timeouts.
935
+ :type _request_timeout: int, tuple(int, int), optional
936
+ :param _request_auth: set to override the auth_settings for an a single
937
+ request; this effectively ignores the
938
+ authentication in the spec for a single request.
939
+ :type _request_auth: dict, optional
940
+ :param _content_type: force content-type for the request.
941
+ :type _content_type: str, Optional
942
+ :param _headers: set to override the headers for a single
943
+ request; this effectively ignores the headers
944
+ in the spec for a single request.
945
+ :type _headers: dict, optional
946
+ :param _host_index: set to override the host_index for a single
947
+ request; this effectively ignores the host_index
948
+ in the spec for a single request.
949
+ :type _host_index: int, optional
950
+ :return: Returns the result object.
951
+ """ # noqa: E501
952
+
953
+ _param = self._api_pades_signatures_token_signed_bytes_post_serialize(
954
+ token=token,
955
+ pades_signature_post_signed_bytes_request=pades_signature_post_signed_bytes_request,
956
+ _request_auth=_request_auth,
957
+ _content_type=_content_type,
958
+ _headers=_headers,
959
+ _host_index=_host_index
960
+ )
961
+
962
+ _response_types_map: Dict[str, Optional[str]] = {
963
+ '200': "PadesSignaturePostSignedBytesResponse",
964
+ '400': None,
965
+ '401': None,
966
+ '403': None,
967
+ '422': None
968
+
969
+ }
970
+ response_data = self.api_client.call_api(
971
+ *_param,
972
+ _request_timeout=_request_timeout
973
+ )
974
+ response_data.read()
975
+ return self.api_client.response_deserialize(
976
+ response_data=response_data,
977
+ response_types_map=_response_types_map,
978
+ ).data
979
+
980
+
981
+ @validate_call
982
+ def api_pades_signatures_token_signed_bytes_post_with_http_info(
983
+ self,
984
+ token: StrictStr,
985
+ pades_signature_post_signed_bytes_request: Optional[PadesSignaturePostSignedBytesRequest] = None,
986
+ _request_timeout: Union[
987
+ None,
988
+ Annotated[StrictFloat, Field(gt=0)],
989
+ Tuple[
990
+ Annotated[StrictFloat, Field(gt=0)],
991
+ Annotated[StrictFloat, Field(gt=0)]
992
+ ]
993
+ ] = None,
994
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
995
+ _content_type: Optional[StrictStr] = None,
996
+ _headers: Optional[Dict[StrictStr, Any]] = None,
997
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
998
+ ) -> ApiResponse[PadesSignaturePostSignedBytesResponse]:
999
+ """api_pades_signatures_token_signed_bytes_post
1000
+
1001
+
1002
+ :param token: (required)
1003
+ :type token: str
1004
+ :param pades_signature_post_signed_bytes_request:
1005
+ :type pades_signature_post_signed_bytes_request: PadesSignaturePostSignedBytesRequest
1006
+ :param _request_timeout: timeout setting for this request. If one
1007
+ number provided, it will be total request
1008
+ timeout. It can also be a pair (tuple) of
1009
+ (connection, read) timeouts.
1010
+ :type _request_timeout: int, tuple(int, int), optional
1011
+ :param _request_auth: set to override the auth_settings for an a single
1012
+ request; this effectively ignores the
1013
+ authentication in the spec for a single request.
1014
+ :type _request_auth: dict, optional
1015
+ :param _content_type: force content-type for the request.
1016
+ :type _content_type: str, Optional
1017
+ :param _headers: set to override the headers for a single
1018
+ request; this effectively ignores the headers
1019
+ in the spec for a single request.
1020
+ :type _headers: dict, optional
1021
+ :param _host_index: set to override the host_index for a single
1022
+ request; this effectively ignores the host_index
1023
+ in the spec for a single request.
1024
+ :type _host_index: int, optional
1025
+ :return: Returns the result object.
1026
+ """ # noqa: E501
1027
+
1028
+ _param = self._api_pades_signatures_token_signed_bytes_post_serialize(
1029
+ token=token,
1030
+ pades_signature_post_signed_bytes_request=pades_signature_post_signed_bytes_request,
1031
+ _request_auth=_request_auth,
1032
+ _content_type=_content_type,
1033
+ _headers=_headers,
1034
+ _host_index=_host_index
1035
+ )
1036
+
1037
+ _response_types_map: Dict[str, Optional[str]] = {
1038
+ '200': "PadesSignaturePostSignedBytesResponse",
1039
+ '400': None,
1040
+ '401': None,
1041
+ '403': None,
1042
+ '422': None
1043
+
1044
+ }
1045
+ response_data = self.api_client.call_api(
1046
+ *_param,
1047
+ _request_timeout=_request_timeout
1048
+ )
1049
+ response_data.read()
1050
+ return self.api_client.response_deserialize(
1051
+ response_data=response_data,
1052
+ response_types_map=_response_types_map,
1053
+ )
1054
+
1055
+
1056
+ @validate_call
1057
+ def api_pades_signatures_token_signed_bytes_post_without_preload_content(
1058
+ self,
1059
+ token: StrictStr,
1060
+ pades_signature_post_signed_bytes_request: Optional[PadesSignaturePostSignedBytesRequest] = None,
1061
+ _request_timeout: Union[
1062
+ None,
1063
+ Annotated[StrictFloat, Field(gt=0)],
1064
+ Tuple[
1065
+ Annotated[StrictFloat, Field(gt=0)],
1066
+ Annotated[StrictFloat, Field(gt=0)]
1067
+ ]
1068
+ ] = None,
1069
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1070
+ _content_type: Optional[StrictStr] = None,
1071
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1072
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1073
+ ) -> RESTResponseType:
1074
+ """api_pades_signatures_token_signed_bytes_post
1075
+
1076
+
1077
+ :param token: (required)
1078
+ :type token: str
1079
+ :param pades_signature_post_signed_bytes_request:
1080
+ :type pades_signature_post_signed_bytes_request: PadesSignaturePostSignedBytesRequest
1081
+ :param _request_timeout: timeout setting for this request. If one
1082
+ number provided, it will be total request
1083
+ timeout. It can also be a pair (tuple) of
1084
+ (connection, read) timeouts.
1085
+ :type _request_timeout: int, tuple(int, int), optional
1086
+ :param _request_auth: set to override the auth_settings for an a single
1087
+ request; this effectively ignores the
1088
+ authentication in the spec for a single request.
1089
+ :type _request_auth: dict, optional
1090
+ :param _content_type: force content-type for the request.
1091
+ :type _content_type: str, Optional
1092
+ :param _headers: set to override the headers for a single
1093
+ request; this effectively ignores the headers
1094
+ in the spec for a single request.
1095
+ :type _headers: dict, optional
1096
+ :param _host_index: set to override the host_index for a single
1097
+ request; this effectively ignores the host_index
1098
+ in the spec for a single request.
1099
+ :type _host_index: int, optional
1100
+ :return: Returns the result object.
1101
+ """ # noqa: E501
1102
+
1103
+ _param = self._api_pades_signatures_token_signed_bytes_post_serialize(
1104
+ token=token,
1105
+ pades_signature_post_signed_bytes_request=pades_signature_post_signed_bytes_request,
1106
+ _request_auth=_request_auth,
1107
+ _content_type=_content_type,
1108
+ _headers=_headers,
1109
+ _host_index=_host_index
1110
+ )
1111
+
1112
+ _response_types_map: Dict[str, Optional[str]] = {
1113
+ '200': "PadesSignaturePostSignedBytesResponse",
1114
+ '400': None,
1115
+ '401': None,
1116
+ '403': None,
1117
+ '422': None
1118
+
1119
+ }
1120
+ response_data = self.api_client.call_api(
1121
+ *_param,
1122
+ _request_timeout=_request_timeout
1123
+ )
1124
+ return response_data.response
1125
+
1126
+
1127
+ def _api_pades_signatures_token_signed_bytes_post_serialize(
1128
+ self,
1129
+ token,
1130
+ pades_signature_post_signed_bytes_request,
1131
+ _request_auth,
1132
+ _content_type,
1133
+ _headers,
1134
+ _host_index,
1135
+ ) -> Tuple:
1136
+
1137
+ _host = None
1138
+
1139
+ _collection_formats: Dict[str, str] = {
1140
+
1141
+ }
1142
+
1143
+ _path_params: Dict[str, str] = {}
1144
+ _query_params: List[Tuple[str, str]] = []
1145
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1146
+ _form_params: List[Tuple[str, str]] = []
1147
+ _files: Dict[str, str] = {}
1148
+ _body_params: Optional[bytes] = None
1149
+
1150
+ # process the path parameters
1151
+ if token is not None:
1152
+ _path_params['token'] = token
1153
+ # process the query parameters
1154
+ # process the header parameters
1155
+ # process the form parameters
1156
+ # process the body parameter
1157
+ if pades_signature_post_signed_bytes_request is not None:
1158
+ _body_params = pades_signature_post_signed_bytes_request
1159
+
1160
+
1161
+ # set the HTTP header `Accept`
1162
+ _header_params['Accept'] = self.api_client.select_header_accept(
1163
+ [
1164
+ 'text/plain',
1165
+ 'application/json',
1166
+ 'text/json'
1167
+ ]
1168
+ )
1169
+
1170
+ # set the HTTP header `Content-Type`
1171
+ if _content_type:
1172
+ _header_params['Content-Type'] = _content_type
1173
+ else:
1174
+ _default_content_type = (
1175
+ self.api_client.select_header_content_type(
1176
+ [
1177
+ 'application/json-patch+json',
1178
+ 'application/json',
1179
+ 'text/json',
1180
+ 'application/*+json'
1181
+ ]
1182
+ )
1183
+ )
1184
+ if _default_content_type is not None:
1185
+ _header_params['Content-Type'] = _default_content_type
1186
+
1187
+ # authentication setting
1188
+ _auth_settings: List[str] = [
1189
+ ]
1190
+
1191
+ return self.api_client.param_serialize(
1192
+ method='POST',
1193
+ resource_path='/Api/PadesSignatures/{token}/SignedBytes',
1194
+ path_params=_path_params,
1195
+ query_params=_query_params,
1196
+ header_params=_header_params,
1197
+ body=_body_params,
1198
+ post_params=_form_params,
1199
+ files=_files,
1200
+ auth_settings=_auth_settings,
1201
+ collection_formats=_collection_formats,
1202
+ _host=_host,
1203
+ _request_auth=_request_auth
1204
+ )
1205
+
1206
+
1207
+
1208
+
1209
+ @validate_call
1210
+ def api_v2_pades_signatures_post(
1211
+ self,
1212
+ pades_signature_post_request_v2: Optional[PadesSignaturePostRequestV2] = None,
1213
+ _request_timeout: Union[
1214
+ None,
1215
+ Annotated[StrictFloat, Field(gt=0)],
1216
+ Tuple[
1217
+ Annotated[StrictFloat, Field(gt=0)],
1218
+ Annotated[StrictFloat, Field(gt=0)]
1219
+ ]
1220
+ ] = None,
1221
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1222
+ _content_type: Optional[StrictStr] = None,
1223
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1224
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1225
+ ) -> PadesSignaturePostResponse:
1226
+ """api_v2_pades_signatures_post
1227
+
1228
+
1229
+ :param pades_signature_post_request_v2:
1230
+ :type pades_signature_post_request_v2: PadesSignaturePostRequestV2
1231
+ :param _request_timeout: timeout setting for this request. If one
1232
+ number provided, it will be total request
1233
+ timeout. It can also be a pair (tuple) of
1234
+ (connection, read) timeouts.
1235
+ :type _request_timeout: int, tuple(int, int), optional
1236
+ :param _request_auth: set to override the auth_settings for an a single
1237
+ request; this effectively ignores the
1238
+ authentication in the spec for a single request.
1239
+ :type _request_auth: dict, optional
1240
+ :param _content_type: force content-type for the request.
1241
+ :type _content_type: str, Optional
1242
+ :param _headers: set to override the headers for a single
1243
+ request; this effectively ignores the headers
1244
+ in the spec for a single request.
1245
+ :type _headers: dict, optional
1246
+ :param _host_index: set to override the host_index for a single
1247
+ request; this effectively ignores the host_index
1248
+ in the spec for a single request.
1249
+ :type _host_index: int, optional
1250
+ :return: Returns the result object.
1251
+ """ # noqa: E501
1252
+
1253
+ _param = self._api_v2_pades_signatures_post_serialize(
1254
+ pades_signature_post_request_v2=pades_signature_post_request_v2,
1255
+ _request_auth=_request_auth,
1256
+ _content_type=_content_type,
1257
+ _headers=_headers,
1258
+ _host_index=_host_index
1259
+ )
1260
+
1261
+ _response_types_map: Dict[str, Optional[str]] = {
1262
+ '201': "PadesSignaturePostResponse",
1263
+ '400': None,
1264
+ '401': None,
1265
+ '403': None,
1266
+ '422': None
1267
+
1268
+ }
1269
+ response_data = self.api_client.call_api(
1270
+ *_param,
1271
+ _request_timeout=_request_timeout
1272
+ )
1273
+ response_data.read()
1274
+ return self.api_client.response_deserialize(
1275
+ response_data=response_data,
1276
+ response_types_map=_response_types_map,
1277
+ ).data
1278
+
1279
+
1280
+ @validate_call
1281
+ def api_v2_pades_signatures_post_with_http_info(
1282
+ self,
1283
+ pades_signature_post_request_v2: Optional[PadesSignaturePostRequestV2] = None,
1284
+ _request_timeout: Union[
1285
+ None,
1286
+ Annotated[StrictFloat, Field(gt=0)],
1287
+ Tuple[
1288
+ Annotated[StrictFloat, Field(gt=0)],
1289
+ Annotated[StrictFloat, Field(gt=0)]
1290
+ ]
1291
+ ] = None,
1292
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1293
+ _content_type: Optional[StrictStr] = None,
1294
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1295
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1296
+ ) -> ApiResponse[PadesSignaturePostResponse]:
1297
+ """api_v2_pades_signatures_post
1298
+
1299
+
1300
+ :param pades_signature_post_request_v2:
1301
+ :type pades_signature_post_request_v2: PadesSignaturePostRequestV2
1302
+ :param _request_timeout: timeout setting for this request. If one
1303
+ number provided, it will be total request
1304
+ timeout. It can also be a pair (tuple) of
1305
+ (connection, read) timeouts.
1306
+ :type _request_timeout: int, tuple(int, int), optional
1307
+ :param _request_auth: set to override the auth_settings for an a single
1308
+ request; this effectively ignores the
1309
+ authentication in the spec for a single request.
1310
+ :type _request_auth: dict, optional
1311
+ :param _content_type: force content-type for the request.
1312
+ :type _content_type: str, Optional
1313
+ :param _headers: set to override the headers for a single
1314
+ request; this effectively ignores the headers
1315
+ in the spec for a single request.
1316
+ :type _headers: dict, optional
1317
+ :param _host_index: set to override the host_index for a single
1318
+ request; this effectively ignores the host_index
1319
+ in the spec for a single request.
1320
+ :type _host_index: int, optional
1321
+ :return: Returns the result object.
1322
+ """ # noqa: E501
1323
+
1324
+ _param = self._api_v2_pades_signatures_post_serialize(
1325
+ pades_signature_post_request_v2=pades_signature_post_request_v2,
1326
+ _request_auth=_request_auth,
1327
+ _content_type=_content_type,
1328
+ _headers=_headers,
1329
+ _host_index=_host_index
1330
+ )
1331
+
1332
+ _response_types_map: Dict[str, Optional[str]] = {
1333
+ '201': "PadesSignaturePostResponse",
1334
+ '400': None,
1335
+ '401': None,
1336
+ '403': None,
1337
+ '422': None
1338
+
1339
+ }
1340
+ response_data = self.api_client.call_api(
1341
+ *_param,
1342
+ _request_timeout=_request_timeout
1343
+ )
1344
+ response_data.read()
1345
+ return self.api_client.response_deserialize(
1346
+ response_data=response_data,
1347
+ response_types_map=_response_types_map,
1348
+ )
1349
+
1350
+
1351
+ @validate_call
1352
+ def api_v2_pades_signatures_post_without_preload_content(
1353
+ self,
1354
+ pades_signature_post_request_v2: Optional[PadesSignaturePostRequestV2] = None,
1355
+ _request_timeout: Union[
1356
+ None,
1357
+ Annotated[StrictFloat, Field(gt=0)],
1358
+ Tuple[
1359
+ Annotated[StrictFloat, Field(gt=0)],
1360
+ Annotated[StrictFloat, Field(gt=0)]
1361
+ ]
1362
+ ] = None,
1363
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1364
+ _content_type: Optional[StrictStr] = None,
1365
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1366
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1367
+ ) -> RESTResponseType:
1368
+ """api_v2_pades_signatures_post
1369
+
1370
+
1371
+ :param pades_signature_post_request_v2:
1372
+ :type pades_signature_post_request_v2: PadesSignaturePostRequestV2
1373
+ :param _request_timeout: timeout setting for this request. If one
1374
+ number provided, it will be total request
1375
+ timeout. It can also be a pair (tuple) of
1376
+ (connection, read) timeouts.
1377
+ :type _request_timeout: int, tuple(int, int), optional
1378
+ :param _request_auth: set to override the auth_settings for an a single
1379
+ request; this effectively ignores the
1380
+ authentication in the spec for a single request.
1381
+ :type _request_auth: dict, optional
1382
+ :param _content_type: force content-type for the request.
1383
+ :type _content_type: str, Optional
1384
+ :param _headers: set to override the headers for a single
1385
+ request; this effectively ignores the headers
1386
+ in the spec for a single request.
1387
+ :type _headers: dict, optional
1388
+ :param _host_index: set to override the host_index for a single
1389
+ request; this effectively ignores the host_index
1390
+ in the spec for a single request.
1391
+ :type _host_index: int, optional
1392
+ :return: Returns the result object.
1393
+ """ # noqa: E501
1394
+
1395
+ _param = self._api_v2_pades_signatures_post_serialize(
1396
+ pades_signature_post_request_v2=pades_signature_post_request_v2,
1397
+ _request_auth=_request_auth,
1398
+ _content_type=_content_type,
1399
+ _headers=_headers,
1400
+ _host_index=_host_index
1401
+ )
1402
+
1403
+ _response_types_map: Dict[str, Optional[str]] = {
1404
+ '201': "PadesSignaturePostResponse",
1405
+ '400': None,
1406
+ '401': None,
1407
+ '403': None,
1408
+ '422': None
1409
+
1410
+ }
1411
+ response_data = self.api_client.call_api(
1412
+ *_param,
1413
+ _request_timeout=_request_timeout
1414
+ )
1415
+ return response_data.response
1416
+
1417
+
1418
+ def _api_v2_pades_signatures_post_serialize(
1419
+ self,
1420
+ pades_signature_post_request_v2,
1421
+ _request_auth,
1422
+ _content_type,
1423
+ _headers,
1424
+ _host_index,
1425
+ ) -> Tuple:
1426
+
1427
+ _host = None
1428
+
1429
+ _collection_formats: Dict[str, str] = {
1430
+
1431
+ }
1432
+
1433
+ _path_params: Dict[str, str] = {}
1434
+ _query_params: List[Tuple[str, str]] = []
1435
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1436
+ _form_params: List[Tuple[str, str]] = []
1437
+ _files: Dict[str, str] = {}
1438
+ _body_params: Optional[bytes] = None
1439
+
1440
+ # process the path parameters
1441
+ # process the query parameters
1442
+ # process the header parameters
1443
+ # process the form parameters
1444
+ # process the body parameter
1445
+ if pades_signature_post_request_v2 is not None:
1446
+ _body_params = pades_signature_post_request_v2
1447
+
1448
+
1449
+ # set the HTTP header `Accept`
1450
+ _header_params['Accept'] = self.api_client.select_header_accept(
1451
+ [
1452
+ 'text/plain',
1453
+ 'application/json',
1454
+ 'text/json'
1455
+ ]
1456
+ )
1457
+
1458
+ # set the HTTP header `Content-Type`
1459
+ if _content_type:
1460
+ _header_params['Content-Type'] = _content_type
1461
+ else:
1462
+ _default_content_type = (
1463
+ self.api_client.select_header_content_type(
1464
+ [
1465
+ 'application/json-patch+json',
1466
+ 'application/json',
1467
+ 'text/json',
1468
+ 'application/*+json'
1469
+ ]
1470
+ )
1471
+ )
1472
+ if _default_content_type is not None:
1473
+ _header_params['Content-Type'] = _default_content_type
1474
+
1475
+ # authentication setting
1476
+ _auth_settings: List[str] = [
1477
+ ]
1478
+
1479
+ return self.api_client.param_serialize(
1480
+ method='POST',
1481
+ resource_path='/Api/v2/PadesSignatures',
1482
+ path_params=_path_params,
1483
+ query_params=_query_params,
1484
+ header_params=_header_params,
1485
+ body=_body_params,
1486
+ post_params=_form_params,
1487
+ files=_files,
1488
+ auth_settings=_auth_settings,
1489
+ collection_formats=_collection_formats,
1490
+ _host=_host,
1491
+ _request_auth=_request_auth
1492
+ )
1493
+
1494
+
1495
+
1496
+
1497
+ @validate_call
1498
+ def api_v2_pades_signatures_token_signed_bytes_post(
1499
+ self,
1500
+ token: StrictStr,
1501
+ complete_signature_request: Optional[CompleteSignatureRequest] = None,
1502
+ _request_timeout: Union[
1503
+ None,
1504
+ Annotated[StrictFloat, Field(gt=0)],
1505
+ Tuple[
1506
+ Annotated[StrictFloat, Field(gt=0)],
1507
+ Annotated[StrictFloat, Field(gt=0)]
1508
+ ]
1509
+ ] = None,
1510
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1511
+ _content_type: Optional[StrictStr] = None,
1512
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1513
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1514
+ ) -> SignatureResultModel:
1515
+ """api_v2_pades_signatures_token_signed_bytes_post
1516
+
1517
+
1518
+ :param token: (required)
1519
+ :type token: str
1520
+ :param complete_signature_request:
1521
+ :type complete_signature_request: CompleteSignatureRequest
1522
+ :param _request_timeout: timeout setting for this request. If one
1523
+ number provided, it will be total request
1524
+ timeout. It can also be a pair (tuple) of
1525
+ (connection, read) timeouts.
1526
+ :type _request_timeout: int, tuple(int, int), optional
1527
+ :param _request_auth: set to override the auth_settings for an a single
1528
+ request; this effectively ignores the
1529
+ authentication in the spec for a single request.
1530
+ :type _request_auth: dict, optional
1531
+ :param _content_type: force content-type for the request.
1532
+ :type _content_type: str, Optional
1533
+ :param _headers: set to override the headers for a single
1534
+ request; this effectively ignores the headers
1535
+ in the spec for a single request.
1536
+ :type _headers: dict, optional
1537
+ :param _host_index: set to override the host_index for a single
1538
+ request; this effectively ignores the host_index
1539
+ in the spec for a single request.
1540
+ :type _host_index: int, optional
1541
+ :return: Returns the result object.
1542
+ """ # noqa: E501
1543
+
1544
+ _param = self._api_v2_pades_signatures_token_signed_bytes_post_serialize(
1545
+ token=token,
1546
+ complete_signature_request=complete_signature_request,
1547
+ _request_auth=_request_auth,
1548
+ _content_type=_content_type,
1549
+ _headers=_headers,
1550
+ _host_index=_host_index
1551
+ )
1552
+
1553
+ _response_types_map: Dict[str, Optional[str]] = {
1554
+ '200': "SignatureResultModel",
1555
+ '400': None,
1556
+ '401': None,
1557
+ '403': None,
1558
+ '422': None
1559
+
1560
+ }
1561
+ response_data = self.api_client.call_api(
1562
+ *_param,
1563
+ _request_timeout=_request_timeout
1564
+ )
1565
+ response_data.read()
1566
+ return self.api_client.response_deserialize(
1567
+ response_data=response_data,
1568
+ response_types_map=_response_types_map,
1569
+ ).data
1570
+
1571
+
1572
+ @validate_call
1573
+ def api_v2_pades_signatures_token_signed_bytes_post_with_http_info(
1574
+ self,
1575
+ token: StrictStr,
1576
+ complete_signature_request: Optional[CompleteSignatureRequest] = None,
1577
+ _request_timeout: Union[
1578
+ None,
1579
+ Annotated[StrictFloat, Field(gt=0)],
1580
+ Tuple[
1581
+ Annotated[StrictFloat, Field(gt=0)],
1582
+ Annotated[StrictFloat, Field(gt=0)]
1583
+ ]
1584
+ ] = None,
1585
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1586
+ _content_type: Optional[StrictStr] = None,
1587
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1588
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1589
+ ) -> ApiResponse[SignatureResultModel]:
1590
+ """api_v2_pades_signatures_token_signed_bytes_post
1591
+
1592
+
1593
+ :param token: (required)
1594
+ :type token: str
1595
+ :param complete_signature_request:
1596
+ :type complete_signature_request: CompleteSignatureRequest
1597
+ :param _request_timeout: timeout setting for this request. If one
1598
+ number provided, it will be total request
1599
+ timeout. It can also be a pair (tuple) of
1600
+ (connection, read) timeouts.
1601
+ :type _request_timeout: int, tuple(int, int), optional
1602
+ :param _request_auth: set to override the auth_settings for an a single
1603
+ request; this effectively ignores the
1604
+ authentication in the spec for a single request.
1605
+ :type _request_auth: dict, optional
1606
+ :param _content_type: force content-type for the request.
1607
+ :type _content_type: str, Optional
1608
+ :param _headers: set to override the headers for a single
1609
+ request; this effectively ignores the headers
1610
+ in the spec for a single request.
1611
+ :type _headers: dict, optional
1612
+ :param _host_index: set to override the host_index for a single
1613
+ request; this effectively ignores the host_index
1614
+ in the spec for a single request.
1615
+ :type _host_index: int, optional
1616
+ :return: Returns the result object.
1617
+ """ # noqa: E501
1618
+
1619
+ _param = self._api_v2_pades_signatures_token_signed_bytes_post_serialize(
1620
+ token=token,
1621
+ complete_signature_request=complete_signature_request,
1622
+ _request_auth=_request_auth,
1623
+ _content_type=_content_type,
1624
+ _headers=_headers,
1625
+ _host_index=_host_index
1626
+ )
1627
+
1628
+ _response_types_map: Dict[str, Optional[str]] = {
1629
+ '200': "SignatureResultModel",
1630
+ '400': None,
1631
+ '401': None,
1632
+ '403': None,
1633
+ '422': None
1634
+
1635
+ }
1636
+ response_data = self.api_client.call_api(
1637
+ *_param,
1638
+ _request_timeout=_request_timeout
1639
+ )
1640
+ response_data.read()
1641
+ return self.api_client.response_deserialize(
1642
+ response_data=response_data,
1643
+ response_types_map=_response_types_map,
1644
+ )
1645
+
1646
+
1647
+ @validate_call
1648
+ def api_v2_pades_signatures_token_signed_bytes_post_without_preload_content(
1649
+ self,
1650
+ token: StrictStr,
1651
+ complete_signature_request: Optional[CompleteSignatureRequest] = None,
1652
+ _request_timeout: Union[
1653
+ None,
1654
+ Annotated[StrictFloat, Field(gt=0)],
1655
+ Tuple[
1656
+ Annotated[StrictFloat, Field(gt=0)],
1657
+ Annotated[StrictFloat, Field(gt=0)]
1658
+ ]
1659
+ ] = None,
1660
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1661
+ _content_type: Optional[StrictStr] = None,
1662
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1663
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1664
+ ) -> RESTResponseType:
1665
+ """api_v2_pades_signatures_token_signed_bytes_post
1666
+
1667
+
1668
+ :param token: (required)
1669
+ :type token: str
1670
+ :param complete_signature_request:
1671
+ :type complete_signature_request: CompleteSignatureRequest
1672
+ :param _request_timeout: timeout setting for this request. If one
1673
+ number provided, it will be total request
1674
+ timeout. It can also be a pair (tuple) of
1675
+ (connection, read) timeouts.
1676
+ :type _request_timeout: int, tuple(int, int), optional
1677
+ :param _request_auth: set to override the auth_settings for an a single
1678
+ request; this effectively ignores the
1679
+ authentication in the spec for a single request.
1680
+ :type _request_auth: dict, optional
1681
+ :param _content_type: force content-type for the request.
1682
+ :type _content_type: str, Optional
1683
+ :param _headers: set to override the headers for a single
1684
+ request; this effectively ignores the headers
1685
+ in the spec for a single request.
1686
+ :type _headers: dict, optional
1687
+ :param _host_index: set to override the host_index for a single
1688
+ request; this effectively ignores the host_index
1689
+ in the spec for a single request.
1690
+ :type _host_index: int, optional
1691
+ :return: Returns the result object.
1692
+ """ # noqa: E501
1693
+
1694
+ _param = self._api_v2_pades_signatures_token_signed_bytes_post_serialize(
1695
+ token=token,
1696
+ complete_signature_request=complete_signature_request,
1697
+ _request_auth=_request_auth,
1698
+ _content_type=_content_type,
1699
+ _headers=_headers,
1700
+ _host_index=_host_index
1701
+ )
1702
+
1703
+ _response_types_map: Dict[str, Optional[str]] = {
1704
+ '200': "SignatureResultModel",
1705
+ '400': None,
1706
+ '401': None,
1707
+ '403': None,
1708
+ '422': None
1709
+
1710
+ }
1711
+ response_data = self.api_client.call_api(
1712
+ *_param,
1713
+ _request_timeout=_request_timeout
1714
+ )
1715
+ return response_data.response
1716
+
1717
+
1718
+ def _api_v2_pades_signatures_token_signed_bytes_post_serialize(
1719
+ self,
1720
+ token,
1721
+ complete_signature_request,
1722
+ _request_auth,
1723
+ _content_type,
1724
+ _headers,
1725
+ _host_index,
1726
+ ) -> Tuple:
1727
+
1728
+ _host = None
1729
+
1730
+ _collection_formats: Dict[str, str] = {
1731
+
1732
+ }
1733
+
1734
+ _path_params: Dict[str, str] = {}
1735
+ _query_params: List[Tuple[str, str]] = []
1736
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1737
+ _form_params: List[Tuple[str, str]] = []
1738
+ _files: Dict[str, str] = {}
1739
+ _body_params: Optional[bytes] = None
1740
+
1741
+ # process the path parameters
1742
+ if token is not None:
1743
+ _path_params['token'] = token
1744
+ # process the query parameters
1745
+ # process the header parameters
1746
+ # process the form parameters
1747
+ # process the body parameter
1748
+ if complete_signature_request is not None:
1749
+ _body_params = complete_signature_request
1750
+
1751
+
1752
+ # set the HTTP header `Accept`
1753
+ _header_params['Accept'] = self.api_client.select_header_accept(
1754
+ [
1755
+ 'text/plain',
1756
+ 'application/json',
1757
+ 'text/json'
1758
+ ]
1759
+ )
1760
+
1761
+ # set the HTTP header `Content-Type`
1762
+ if _content_type:
1763
+ _header_params['Content-Type'] = _content_type
1764
+ else:
1765
+ _default_content_type = (
1766
+ self.api_client.select_header_content_type(
1767
+ [
1768
+ 'application/json-patch+json',
1769
+ 'application/json',
1770
+ 'text/json',
1771
+ 'application/*+json'
1772
+ ]
1773
+ )
1774
+ )
1775
+ if _default_content_type is not None:
1776
+ _header_params['Content-Type'] = _default_content_type
1777
+
1778
+ # authentication setting
1779
+ _auth_settings: List[str] = [
1780
+ ]
1781
+
1782
+ return self.api_client.param_serialize(
1783
+ method='POST',
1784
+ resource_path='/Api/v2/PadesSignatures/{token}/SignedBytes',
1785
+ path_params=_path_params,
1786
+ query_params=_query_params,
1787
+ header_params=_header_params,
1788
+ body=_body_params,
1789
+ post_params=_form_params,
1790
+ files=_files,
1791
+ auth_settings=_auth_settings,
1792
+ collection_formats=_collection_formats,
1793
+ _host=_host,
1794
+ _request_auth=_request_auth
1795
+ )
1796
+
1797
+