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.
- restpki_ng_python_client/__init__.py +200 -0
- restpki_ng_python_client/api/__init__.py +17 -0
- restpki_ng_python_client/api/authentication_api.py +2041 -0
- restpki_ng_python_client/api/cades_signature_api.py +2376 -0
- restpki_ng_python_client/api/document_keys_api.py +1199 -0
- restpki_ng_python_client/api/documents_api.py +868 -0
- restpki_ng_python_client/api/pades_signature_api.py +1797 -0
- restpki_ng_python_client/api/pades_visual_positioning_presets_api.py +869 -0
- restpki_ng_python_client/api/pdf_api.py +334 -0
- restpki_ng_python_client/api/signature_api.py +624 -0
- restpki_ng_python_client/api/signature_inspection_api.py +337 -0
- restpki_ng_python_client/api/signature_sessions_api.py +891 -0
- restpki_ng_python_client/api/timestamp_api.py +654 -0
- restpki_ng_python_client/api/upload_api.py +1124 -0
- restpki_ng_python_client/api/xml_signature_api.py +1781 -0
- restpki_ng_python_client/api_client.py +741 -0
- restpki_ng_python_client/api_response.py +21 -0
- restpki_ng_python_client/configuration.py +426 -0
- restpki_ng_python_client/exceptions.py +166 -0
- restpki_ng_python_client/file_utils.py +122 -0
- restpki_ng_python_client/models/__init__.py +165 -0
- restpki_ng_python_client/models/allocate_document_key_batch_request.py +96 -0
- restpki_ng_python_client/models/allocate_document_key_request.py +93 -0
- restpki_ng_python_client/models/attribute_certificate_model.py +141 -0
- restpki_ng_python_client/models/audit_package_options.py +90 -0
- restpki_ng_python_client/models/authentication_failures.py +45 -0
- restpki_ng_python_client/models/authentication_get_response.py +92 -0
- restpki_ng_python_client/models/authentication_post_request.py +116 -0
- restpki_ng_python_client/models/authentication_post_response.py +98 -0
- restpki_ng_python_client/models/authentications_post_request.py +95 -0
- restpki_ng_python_client/models/authentications_post_response.py +114 -0
- restpki_ng_python_client/models/authentications_post_signed_bytes_request.py +99 -0
- restpki_ng_python_client/models/authentications_post_signed_bytes_response.py +98 -0
- restpki_ng_python_client/models/auto_positioning_horizontal_directions.py +45 -0
- restpki_ng_python_client/models/auto_positioning_vertical_directions.py +45 -0
- restpki_ng_python_client/models/blockchains.py +45 -0
- restpki_ng_python_client/models/cades_signature_model.py +123 -0
- restpki_ng_python_client/models/cades_signature_post_request_v1.py +137 -0
- restpki_ng_python_client/models/cades_signature_post_request_v2.py +152 -0
- restpki_ng_python_client/models/cades_signature_post_request_v3.py +149 -0
- restpki_ng_python_client/models/cades_signature_post_response.py +120 -0
- restpki_ng_python_client/models/cades_signature_post_signed_bytes_request.py +92 -0
- restpki_ng_python_client/models/cades_signature_post_signed_bytes_response.py +106 -0
- restpki_ng_python_client/models/cades_signer_model.py +159 -0
- restpki_ng_python_client/models/cades_timestamp_model.py +140 -0
- restpki_ng_python_client/models/certificate_model.py +197 -0
- restpki_ng_python_client/models/certificate_reference_model.py +99 -0
- restpki_ng_python_client/models/certificate_requirement.py +95 -0
- restpki_ng_python_client/models/certificate_requirement_types.py +45 -0
- restpki_ng_python_client/models/certificate_summary.py +142 -0
- restpki_ng_python_client/models/certified_attribute_model.py +94 -0
- restpki_ng_python_client/models/certified_attribute_types.py +44 -0
- restpki_ng_python_client/models/cms_content_types.py +50 -0
- restpki_ng_python_client/models/cms_signature_options.py +109 -0
- restpki_ng_python_client/models/color_model.py +98 -0
- restpki_ng_python_client/models/commitment_type_model.py +99 -0
- restpki_ng_python_client/models/complete_authentication_request.py +93 -0
- restpki_ng_python_client/models/complete_authentication_response.py +103 -0
- restpki_ng_python_client/models/complete_signature_request.py +95 -0
- restpki_ng_python_client/models/complete_signature_request_v2.py +91 -0
- restpki_ng_python_client/models/create_signature_session_request.py +161 -0
- restpki_ng_python_client/models/create_signature_session_response.py +95 -0
- restpki_ng_python_client/models/digest_algorithm_and_value_model.py +103 -0
- restpki_ng_python_client/models/digest_algorithms.py +49 -0
- restpki_ng_python_client/models/document_file_model.py +137 -0
- restpki_ng_python_client/models/document_key_model.py +100 -0
- restpki_ng_python_client/models/document_key_query_response.py +110 -0
- restpki_ng_python_client/models/document_key_summary.py +100 -0
- restpki_ng_python_client/models/document_model.py +150 -0
- restpki_ng_python_client/models/document_query_response.py +93 -0
- restpki_ng_python_client/models/document_status.py +47 -0
- restpki_ng_python_client/models/document_summary.py +128 -0
- restpki_ng_python_client/models/error_model_v2.py +120 -0
- restpki_ng_python_client/models/file_model.py +114 -0
- restpki_ng_python_client/models/file_reference_model.py +137 -0
- restpki_ng_python_client/models/full_xml_signature_post_request.py +136 -0
- restpki_ng_python_client/models/general_name_choices.py +52 -0
- restpki_ng_python_client/models/general_name_model.py +108 -0
- restpki_ng_python_client/models/holder_types.py +45 -0
- restpki_ng_python_client/models/inspect_signature_failures.py +44 -0
- restpki_ng_python_client/models/inspect_signature_request.py +127 -0
- restpki_ng_python_client/models/inspect_signature_response.py +131 -0
- restpki_ng_python_client/models/multipart_upload_begin_response.py +95 -0
- restpki_ng_python_client/models/multipart_upload_end_request.py +95 -0
- restpki_ng_python_client/models/name_model.py +205 -0
- restpki_ng_python_client/models/namespace_model.py +99 -0
- restpki_ng_python_client/models/open_cades_signature_request_model.py +147 -0
- restpki_ng_python_client/models/open_signature_request_model.py +145 -0
- restpki_ng_python_client/models/open_xml_signature_request_model.py +151 -0
- restpki_ng_python_client/models/other_name_model.py +107 -0
- restpki_ng_python_client/models/pades_certification_level.py +47 -0
- restpki_ng_python_client/models/pades_horizontal_align.py +46 -0
- restpki_ng_python_client/models/pades_measurement_units.py +45 -0
- restpki_ng_python_client/models/pades_page_optimization_model.py +98 -0
- restpki_ng_python_client/models/pades_signature_model.py +113 -0
- restpki_ng_python_client/models/pades_signature_post_request_v1.py +167 -0
- restpki_ng_python_client/models/pades_signature_post_request_v2.py +171 -0
- restpki_ng_python_client/models/pades_signature_post_response.py +120 -0
- restpki_ng_python_client/models/pades_signature_post_signed_bytes_request.py +92 -0
- restpki_ng_python_client/models/pades_signature_post_signed_bytes_response.py +106 -0
- restpki_ng_python_client/models/pades_signer_model.py +168 -0
- restpki_ng_python_client/models/pades_size_model.py +89 -0
- restpki_ng_python_client/models/pades_text_horizontal_align.py +45 -0
- restpki_ng_python_client/models/pades_vertical_align.py +46 -0
- restpki_ng_python_client/models/pades_visual_auto_positioning_model.py +106 -0
- restpki_ng_python_client/models/pades_visual_image_model.py +105 -0
- restpki_ng_python_client/models/pades_visual_positioning_model.py +109 -0
- restpki_ng_python_client/models/pades_visual_rectangle_model.py +127 -0
- restpki_ng_python_client/models/pades_visual_representation_model.py +103 -0
- restpki_ng_python_client/models/pades_visual_text_model.py +111 -0
- restpki_ng_python_client/models/page_orientations.py +46 -0
- restpki_ng_python_client/models/paper_sizes.py +56 -0
- restpki_ng_python_client/models/pdf_add_marks_request.py +117 -0
- restpki_ng_python_client/models/pdf_add_marks_response.py +91 -0
- restpki_ng_python_client/models/pdf_container_definition.py +208 -0
- restpki_ng_python_client/models/pdf_helper.py +43 -0
- restpki_ng_python_client/models/pdf_mark_element_model.py +230 -0
- restpki_ng_python_client/models/pdf_mark_element_type.py +46 -0
- restpki_ng_python_client/models/pdf_mark_image_model.py +98 -0
- restpki_ng_python_client/models/pdf_mark_model.py +168 -0
- restpki_ng_python_client/models/pdf_mark_page_options.py +47 -0
- restpki_ng_python_client/models/pdf_signature_options.py +101 -0
- restpki_ng_python_client/models/pdf_text_section_model.py +125 -0
- restpki_ng_python_client/models/pdf_text_style.py +46 -0
- restpki_ng_python_client/models/pki_brazil_certificate_model.py +159 -0
- restpki_ng_python_client/models/pki_brazil_certificate_types.py +54 -0
- restpki_ng_python_client/models/pki_italy_certificate_model.py +103 -0
- restpki_ng_python_client/models/pki_italy_certificate_types.py +46 -0
- restpki_ng_python_client/models/prepare_authentication_request.py +100 -0
- restpki_ng_python_client/models/prepare_authentication_response.py +99 -0
- restpki_ng_python_client/models/prepare_signature_failures.py +46 -0
- restpki_ng_python_client/models/prepare_signature_request.py +133 -0
- restpki_ng_python_client/models/prepare_signature_response.py +116 -0
- restpki_ng_python_client/models/resource_content_or_reference.py +107 -0
- restpki_ng_python_client/models/role_attribute_model.py +114 -0
- restpki_ng_python_client/models/session_completion_status.py +89 -0
- restpki_ng_python_client/models/signature_algorithm_and_value_model.py +106 -0
- restpki_ng_python_client/models/signature_algorithm_identifier.py +88 -0
- restpki_ng_python_client/models/signature_algorithms.py +48 -0
- restpki_ng_python_client/models/signature_b_stamp_model.py +135 -0
- restpki_ng_python_client/models/signature_policy_identifier_model.py +105 -0
- restpki_ng_python_client/models/signature_result_model.py +105 -0
- restpki_ng_python_client/models/signature_session_document_data.py +128 -0
- restpki_ng_python_client/models/signature_session_document_summary.py +138 -0
- restpki_ng_python_client/models/signature_session_model.py +126 -0
- restpki_ng_python_client/models/signature_session_status.py +49 -0
- restpki_ng_python_client/models/signature_types.py +46 -0
- restpki_ng_python_client/models/signer_b_stamp_model.py +132 -0
- restpki_ng_python_client/models/signer_model.py +187 -0
- restpki_ng_python_client/models/signer_summary.py +94 -0
- restpki_ng_python_client/models/timestamp_issue_response.py +99 -0
- restpki_ng_python_client/models/validation_item_model.py +111 -0
- restpki_ng_python_client/models/validation_item_types.py +91 -0
- restpki_ng_python_client/models/validation_results_model.py +131 -0
- restpki_ng_python_client/models/webhook_event_model.py +94 -0
- restpki_ng_python_client/models/webhook_event_types.py +44 -0
- restpki_ng_python_client/models/xml_attribute_model.py +107 -0
- restpki_ng_python_client/models/xml_element_location_model.py +111 -0
- restpki_ng_python_client/models/xml_element_model.py +115 -0
- restpki_ng_python_client/models/xml_element_signature_post_request.py +145 -0
- restpki_ng_python_client/models/xml_id_attribute_model.py +96 -0
- restpki_ng_python_client/models/xml_id_resolution_table_model.py +123 -0
- restpki_ng_python_client/models/xml_insertion_options.py +47 -0
- restpki_ng_python_client/models/xml_node_name_model.py +96 -0
- restpki_ng_python_client/models/xml_signature_model.py +154 -0
- restpki_ng_python_client/models/xml_signature_options.py +102 -0
- restpki_ng_python_client/models/xml_signature_post_response.py +120 -0
- restpki_ng_python_client/models/xml_signature_post_signed_bytes_request.py +92 -0
- restpki_ng_python_client/models/xml_signature_post_signed_bytes_response.py +106 -0
- restpki_ng_python_client/models/xml_signature_response_model.py +113 -0
- restpki_ng_python_client/models/xml_signature_types.py +47 -0
- restpki_ng_python_client/models/xml_signed_entity_types.py +46 -0
- restpki_ng_python_client/py.typed +0 -0
- restpki_ng_python_client/rest.py +231 -0
- restpki_ng_python_client/restpki_ng_client.py +458 -0
- restpki_ng_python_client/standard_signature_policies.py +24 -0
- restpki_ng_python_client/utils.py +80 -0
- restpki_ng_python_client-0.9.0.dist-info/METADATA +16 -0
- restpki_ng_python_client-0.9.0.dist-info/RECORD +181 -0
- restpki_ng_python_client-0.9.0.dist-info/WHEEL +5 -0
- restpki_ng_python_client-0.9.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,334 @@
|
|
|
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 typing import Optional
|
|
27
|
+
|
|
28
|
+
from restpki_ng_python_client.models.pdf_add_marks_request import PdfAddMarksRequest
|
|
29
|
+
from restpki_ng_python_client.models.pdf_add_marks_response import PdfAddMarksResponse
|
|
30
|
+
|
|
31
|
+
from restpki_ng_python_client.api_client import ApiClient
|
|
32
|
+
from restpki_ng_python_client.api_response import ApiResponse
|
|
33
|
+
from restpki_ng_python_client.rest import RESTResponseType
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
class PdfApi:
|
|
37
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
38
|
+
Ref: https://openapi-generator.tech
|
|
39
|
+
|
|
40
|
+
Do not edit the class manually.
|
|
41
|
+
"""
|
|
42
|
+
|
|
43
|
+
def __init__(self, api_client=None) -> None:
|
|
44
|
+
if api_client is None:
|
|
45
|
+
api_client = ApiClient.get_default()
|
|
46
|
+
self.api_client = api_client
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
@validate_call
|
|
50
|
+
def api_pdf_add_marks_post(
|
|
51
|
+
self,
|
|
52
|
+
pdf_add_marks_request: Optional[PdfAddMarksRequest] = None,
|
|
53
|
+
_request_timeout: Union[
|
|
54
|
+
None,
|
|
55
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
56
|
+
Tuple[
|
|
57
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
58
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
59
|
+
]
|
|
60
|
+
] = None,
|
|
61
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
62
|
+
_content_type: Optional[StrictStr] = None,
|
|
63
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
64
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
65
|
+
) -> PdfAddMarksResponse:
|
|
66
|
+
"""api_pdf_add_marks_post
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
:param pdf_add_marks_request:
|
|
70
|
+
:type pdf_add_marks_request: PdfAddMarksRequest
|
|
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._api_pdf_add_marks_post_serialize(
|
|
94
|
+
pdf_add_marks_request=pdf_add_marks_request,
|
|
95
|
+
_request_auth=_request_auth,
|
|
96
|
+
_content_type=_content_type,
|
|
97
|
+
_headers=_headers,
|
|
98
|
+
_host_index=_host_index
|
|
99
|
+
)
|
|
100
|
+
|
|
101
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
102
|
+
'200': "PdfAddMarksResponse",
|
|
103
|
+
'400': None,
|
|
104
|
+
'401': None,
|
|
105
|
+
'403': None,
|
|
106
|
+
'422': None
|
|
107
|
+
|
|
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 api_pdf_add_marks_post_with_http_info(
|
|
122
|
+
self,
|
|
123
|
+
pdf_add_marks_request: Optional[PdfAddMarksRequest] = None,
|
|
124
|
+
_request_timeout: Union[
|
|
125
|
+
None,
|
|
126
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
127
|
+
Tuple[
|
|
128
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
129
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
130
|
+
]
|
|
131
|
+
] = None,
|
|
132
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
133
|
+
_content_type: Optional[StrictStr] = None,
|
|
134
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
135
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
136
|
+
) -> ApiResponse[PdfAddMarksResponse]:
|
|
137
|
+
"""api_pdf_add_marks_post
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
:param pdf_add_marks_request:
|
|
141
|
+
:type pdf_add_marks_request: PdfAddMarksRequest
|
|
142
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
143
|
+
number provided, it will be total request
|
|
144
|
+
timeout. It can also be a pair (tuple) of
|
|
145
|
+
(connection, read) timeouts.
|
|
146
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
147
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
148
|
+
request; this effectively ignores the
|
|
149
|
+
authentication in the spec for a single request.
|
|
150
|
+
:type _request_auth: dict, optional
|
|
151
|
+
:param _content_type: force content-type for the request.
|
|
152
|
+
:type _content_type: str, Optional
|
|
153
|
+
:param _headers: set to override the headers for a single
|
|
154
|
+
request; this effectively ignores the headers
|
|
155
|
+
in the spec for a single request.
|
|
156
|
+
:type _headers: dict, optional
|
|
157
|
+
:param _host_index: set to override the host_index for a single
|
|
158
|
+
request; this effectively ignores the host_index
|
|
159
|
+
in the spec for a single request.
|
|
160
|
+
:type _host_index: int, optional
|
|
161
|
+
:return: Returns the result object.
|
|
162
|
+
""" # noqa: E501
|
|
163
|
+
|
|
164
|
+
_param = self._api_pdf_add_marks_post_serialize(
|
|
165
|
+
pdf_add_marks_request=pdf_add_marks_request,
|
|
166
|
+
_request_auth=_request_auth,
|
|
167
|
+
_content_type=_content_type,
|
|
168
|
+
_headers=_headers,
|
|
169
|
+
_host_index=_host_index
|
|
170
|
+
)
|
|
171
|
+
|
|
172
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
173
|
+
'200': "PdfAddMarksResponse",
|
|
174
|
+
'400': None,
|
|
175
|
+
'401': None,
|
|
176
|
+
'403': None,
|
|
177
|
+
'422': None
|
|
178
|
+
|
|
179
|
+
}
|
|
180
|
+
response_data = self.api_client.call_api(
|
|
181
|
+
*_param,
|
|
182
|
+
_request_timeout=_request_timeout
|
|
183
|
+
)
|
|
184
|
+
response_data.read()
|
|
185
|
+
return self.api_client.response_deserialize(
|
|
186
|
+
response_data=response_data,
|
|
187
|
+
response_types_map=_response_types_map,
|
|
188
|
+
)
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
@validate_call
|
|
192
|
+
def api_pdf_add_marks_post_without_preload_content(
|
|
193
|
+
self,
|
|
194
|
+
pdf_add_marks_request: Optional[PdfAddMarksRequest] = None,
|
|
195
|
+
_request_timeout: Union[
|
|
196
|
+
None,
|
|
197
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
198
|
+
Tuple[
|
|
199
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
200
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
201
|
+
]
|
|
202
|
+
] = None,
|
|
203
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
204
|
+
_content_type: Optional[StrictStr] = None,
|
|
205
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
206
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
207
|
+
) -> RESTResponseType:
|
|
208
|
+
"""api_pdf_add_marks_post
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
:param pdf_add_marks_request:
|
|
212
|
+
:type pdf_add_marks_request: PdfAddMarksRequest
|
|
213
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
214
|
+
number provided, it will be total request
|
|
215
|
+
timeout. It can also be a pair (tuple) of
|
|
216
|
+
(connection, read) timeouts.
|
|
217
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
218
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
219
|
+
request; this effectively ignores the
|
|
220
|
+
authentication in the spec for a single request.
|
|
221
|
+
:type _request_auth: dict, optional
|
|
222
|
+
:param _content_type: force content-type for the request.
|
|
223
|
+
:type _content_type: str, Optional
|
|
224
|
+
:param _headers: set to override the headers for a single
|
|
225
|
+
request; this effectively ignores the headers
|
|
226
|
+
in the spec for a single request.
|
|
227
|
+
:type _headers: dict, optional
|
|
228
|
+
:param _host_index: set to override the host_index for a single
|
|
229
|
+
request; this effectively ignores the host_index
|
|
230
|
+
in the spec for a single request.
|
|
231
|
+
:type _host_index: int, optional
|
|
232
|
+
:return: Returns the result object.
|
|
233
|
+
""" # noqa: E501
|
|
234
|
+
|
|
235
|
+
_param = self._api_pdf_add_marks_post_serialize(
|
|
236
|
+
pdf_add_marks_request=pdf_add_marks_request,
|
|
237
|
+
_request_auth=_request_auth,
|
|
238
|
+
_content_type=_content_type,
|
|
239
|
+
_headers=_headers,
|
|
240
|
+
_host_index=_host_index
|
|
241
|
+
)
|
|
242
|
+
|
|
243
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
244
|
+
'200': "PdfAddMarksResponse",
|
|
245
|
+
'400': None,
|
|
246
|
+
'401': None,
|
|
247
|
+
'403': None,
|
|
248
|
+
'422': None
|
|
249
|
+
|
|
250
|
+
}
|
|
251
|
+
response_data = self.api_client.call_api(
|
|
252
|
+
*_param,
|
|
253
|
+
_request_timeout=_request_timeout
|
|
254
|
+
)
|
|
255
|
+
return response_data.response
|
|
256
|
+
|
|
257
|
+
|
|
258
|
+
def _api_pdf_add_marks_post_serialize(
|
|
259
|
+
self,
|
|
260
|
+
pdf_add_marks_request,
|
|
261
|
+
_request_auth,
|
|
262
|
+
_content_type,
|
|
263
|
+
_headers,
|
|
264
|
+
_host_index,
|
|
265
|
+
) -> Tuple:
|
|
266
|
+
|
|
267
|
+
_host = None
|
|
268
|
+
|
|
269
|
+
_collection_formats: Dict[str, str] = {
|
|
270
|
+
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
_path_params: Dict[str, str] = {}
|
|
274
|
+
_query_params: List[Tuple[str, str]] = []
|
|
275
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
276
|
+
_form_params: List[Tuple[str, str]] = []
|
|
277
|
+
_files: Dict[str, str] = {}
|
|
278
|
+
_body_params: Optional[bytes] = None
|
|
279
|
+
|
|
280
|
+
# process the path parameters
|
|
281
|
+
# process the query parameters
|
|
282
|
+
# process the header parameters
|
|
283
|
+
# process the form parameters
|
|
284
|
+
# process the body parameter
|
|
285
|
+
if pdf_add_marks_request is not None:
|
|
286
|
+
_body_params = pdf_add_marks_request
|
|
287
|
+
|
|
288
|
+
|
|
289
|
+
# set the HTTP header `Accept`
|
|
290
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
291
|
+
[
|
|
292
|
+
'text/plain',
|
|
293
|
+
'application/json',
|
|
294
|
+
'text/json'
|
|
295
|
+
]
|
|
296
|
+
)
|
|
297
|
+
|
|
298
|
+
# set the HTTP header `Content-Type`
|
|
299
|
+
if _content_type:
|
|
300
|
+
_header_params['Content-Type'] = _content_type
|
|
301
|
+
else:
|
|
302
|
+
_default_content_type = (
|
|
303
|
+
self.api_client.select_header_content_type(
|
|
304
|
+
[
|
|
305
|
+
'application/json-patch+json',
|
|
306
|
+
'application/json',
|
|
307
|
+
'text/json',
|
|
308
|
+
'application/*+json'
|
|
309
|
+
]
|
|
310
|
+
)
|
|
311
|
+
)
|
|
312
|
+
if _default_content_type is not None:
|
|
313
|
+
_header_params['Content-Type'] = _default_content_type
|
|
314
|
+
|
|
315
|
+
# authentication setting
|
|
316
|
+
_auth_settings: List[str] = [
|
|
317
|
+
]
|
|
318
|
+
|
|
319
|
+
return self.api_client.param_serialize(
|
|
320
|
+
method='POST',
|
|
321
|
+
resource_path='/Api/Pdf/AddMarks',
|
|
322
|
+
path_params=_path_params,
|
|
323
|
+
query_params=_query_params,
|
|
324
|
+
header_params=_header_params,
|
|
325
|
+
body=_body_params,
|
|
326
|
+
post_params=_form_params,
|
|
327
|
+
files=_files,
|
|
328
|
+
auth_settings=_auth_settings,
|
|
329
|
+
collection_formats=_collection_formats,
|
|
330
|
+
_host=_host,
|
|
331
|
+
_request_auth=_request_auth
|
|
332
|
+
)
|
|
333
|
+
|
|
334
|
+
|