signwell-sdk-python 0.1.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.
- signwell_sdk/__init__.py +287 -0
- signwell_sdk/api/__init__.py +10 -0
- signwell_sdk/api/api_application_api.py +481 -0
- signwell_sdk/api/bulk_send_api.py +1589 -0
- signwell_sdk/api/document_api.py +2425 -0
- signwell_sdk/api/me_api.py +246 -0
- signwell_sdk/api/regional_api.py +345 -0
- signwell_sdk/api/template_api.py +1298 -0
- signwell_sdk/api/webhooks_api.py +710 -0
- signwell_sdk/api_client.py +747 -0
- signwell_sdk/api_response.py +20 -0
- signwell_sdk/configuration.py +599 -0
- signwell_sdk/embedded.py +385 -0
- signwell_sdk/exceptions.py +314 -0
- signwell_sdk/models/__init__.py +114 -0
- signwell_sdk/models/account_info_response.py +143 -0
- signwell_sdk/models/account_info_response_active_users_inner.py +107 -0
- signwell_sdk/models/account_info_response_preferences.py +147 -0
- signwell_sdk/models/additional_fields_inner_inner.py +274 -0
- signwell_sdk/models/additional_fields_inner_inner_value.py +189 -0
- signwell_sdk/models/additional_files_inner.py +103 -0
- signwell_sdk/models/api_application_response.py +137 -0
- signwell_sdk/models/api_application_response_owner.py +107 -0
- signwell_sdk/models/api_application_response_preferences.py +135 -0
- signwell_sdk/models/attachment_request_info.py +99 -0
- signwell_sdk/models/attachment_requests_inner.py +110 -0
- signwell_sdk/models/bulk_send_create_response.py +132 -0
- signwell_sdk/models/bulk_send_csv_request.py +100 -0
- signwell_sdk/models/bulk_send_csv_template_response.py +97 -0
- signwell_sdk/models/bulk_send_documents_response.py +167 -0
- signwell_sdk/models/bulk_send_list_item.py +141 -0
- signwell_sdk/models/bulk_send_list_response.py +138 -0
- signwell_sdk/models/bulk_send_response.py +151 -0
- signwell_sdk/models/bulk_send_response_templates_inner.py +98 -0
- signwell_sdk/models/bulk_send_validate_csv_response.py +129 -0
- signwell_sdk/models/checkbox_group_info.py +138 -0
- signwell_sdk/models/checkbox_groups_inner.py +136 -0
- signwell_sdk/models/checkbox_validation.py +35 -0
- signwell_sdk/models/completed_pdf_response.py +177 -0
- signwell_sdk/models/completed_pdf_url_response.py +97 -0
- signwell_sdk/models/copied_contact_info.py +99 -0
- signwell_sdk/models/copied_contacts_inner.py +98 -0
- signwell_sdk/models/copied_placeholders_inner.py +111 -0
- signwell_sdk/models/create_bulk_send_request.py +155 -0
- signwell_sdk/models/create_webhook_request.py +100 -0
- signwell_sdk/models/date_format.py +36 -0
- signwell_sdk/models/detailed_option.py +105 -0
- signwell_sdk/models/document_from_template_request.py +377 -0
- signwell_sdk/models/document_from_template_response.py +353 -0
- signwell_sdk/models/document_from_template_response_fields_inner_inner.py +270 -0
- signwell_sdk/models/document_from_template_response_fields_inner_inner_recipient.py +99 -0
- signwell_sdk/models/document_from_template_response_recipients_inner.py +206 -0
- signwell_sdk/models/document_list_response.py +138 -0
- signwell_sdk/models/document_request.py +350 -0
- signwell_sdk/models/document_response.py +357 -0
- signwell_sdk/models/document_response_attachment_requests_inner.py +101 -0
- signwell_sdk/models/document_response_fields_inner_inner.py +268 -0
- signwell_sdk/models/document_response_fields_inner_inner_options_inner.py +101 -0
- signwell_sdk/models/document_response_fields_inner_inner_recipient.py +98 -0
- signwell_sdk/models/document_response_fields_inner_inner_value.py +195 -0
- signwell_sdk/models/document_response_recipients_inner.py +208 -0
- signwell_sdk/models/document_template_list_response.py +138 -0
- signwell_sdk/models/document_template_request.py +307 -0
- signwell_sdk/models/document_template_response.py +323 -0
- signwell_sdk/models/document_template_response_copied_placeholders_inner.py +131 -0
- signwell_sdk/models/document_template_response_placeholders_inner.py +144 -0
- signwell_sdk/models/document_template_update_request.py +208 -0
- signwell_sdk/models/dropdown_option.py +153 -0
- signwell_sdk/models/error_response.py +107 -0
- signwell_sdk/models/error_response_meta.py +101 -0
- signwell_sdk/models/field_type.py +46 -0
- signwell_sdk/models/fields_inner_inner.py +268 -0
- signwell_sdk/models/file_format.py +33 -0
- signwell_sdk/models/file_info.py +98 -0
- signwell_sdk/models/files_inner.py +103 -0
- signwell_sdk/models/label_info.py +98 -0
- signwell_sdk/models/label_request.py +97 -0
- signwell_sdk/models/label_response.py +98 -0
- signwell_sdk/models/me_response.py +130 -0
- signwell_sdk/models/me_response_contact.py +147 -0
- signwell_sdk/models/me_response_user.py +117 -0
- signwell_sdk/models/me_response_user_preferences.py +105 -0
- signwell_sdk/models/nom151_certificate_response.py +107 -0
- signwell_sdk/models/nom151_certificate_response_nom151.py +125 -0
- signwell_sdk/models/nom151_url_response.py +97 -0
- signwell_sdk/models/pagination_meta.py +119 -0
- signwell_sdk/models/placeholders_inner.py +115 -0
- signwell_sdk/models/rate_limit_error_response.py +97 -0
- signwell_sdk/models/recipients_inner.py +141 -0
- signwell_sdk/models/reminder_recipients_inner.py +100 -0
- signwell_sdk/models/send_reminder_request.py +114 -0
- signwell_sdk/models/template_attachment_requests_inner.py +110 -0
- signwell_sdk/models/template_checkbox_groups_inner.py +136 -0
- signwell_sdk/models/template_field_values_inner.py +109 -0
- signwell_sdk/models/template_field_values_inner_value.py +189 -0
- signwell_sdk/models/template_fields_inner_inner.py +266 -0
- signwell_sdk/models/template_recipients_inner.py +146 -0
- signwell_sdk/models/text_validation.py +42 -0
- signwell_sdk/models/update_document_and_send_request.py +234 -0
- signwell_sdk/models/update_recipients_map_inner.py +118 -0
- signwell_sdk/models/update_recipients_request.py +111 -0
- signwell_sdk/models/validation_error_response.py +99 -0
- signwell_sdk/models/webhook_response.py +110 -0
- signwell_sdk/py.typed +0 -0
- signwell_sdk/rest.py +209 -0
- signwell_sdk/webhook.py +214 -0
- signwell_sdk_python-0.1.0.dist-info/METADATA +177 -0
- signwell_sdk_python-0.1.0.dist-info/RECORD +110 -0
- signwell_sdk_python-0.1.0.dist-info/WHEEL +4 -0
- signwell_sdk_python-0.1.0.dist-info/licenses/LICENSE +21 -0
|
@@ -0,0 +1,2425 @@
|
|
|
1
|
+
"""
|
|
2
|
+
SignWell Developer API
|
|
3
|
+
|
|
4
|
+
API for creating, managing, and tracking electronic signature workflows.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: v1
|
|
7
|
+
Contact: support@signwell.com
|
|
8
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
9
|
+
|
|
10
|
+
Do not edit the class manually.
|
|
11
|
+
""" # noqa: E501
|
|
12
|
+
|
|
13
|
+
from __future__ import annotations
|
|
14
|
+
|
|
15
|
+
import warnings
|
|
16
|
+
from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt, StrictBool
|
|
17
|
+
from typing import Any, Dict, List, Optional, Tuple, Union
|
|
18
|
+
from typing_extensions import Annotated
|
|
19
|
+
from collections.abc import Iterator
|
|
20
|
+
from signwell_sdk.models.completed_pdf_response import CompletedPdfResponse
|
|
21
|
+
from signwell_sdk.models.document_from_template_request import DocumentFromTemplateRequest
|
|
22
|
+
from signwell_sdk.models.document_from_template_response import DocumentFromTemplateResponse
|
|
23
|
+
from signwell_sdk.models.document_list_response import DocumentListResponse
|
|
24
|
+
from signwell_sdk.models.document_request import DocumentRequest
|
|
25
|
+
from signwell_sdk.models.document_response import DocumentResponse
|
|
26
|
+
from signwell_sdk.models.file_format import FileFormat
|
|
27
|
+
from signwell_sdk.models.send_reminder_request import SendReminderRequest
|
|
28
|
+
from signwell_sdk.models.update_document_and_send_request import UpdateDocumentAndSendRequest
|
|
29
|
+
from signwell_sdk.models.update_recipients_request import UpdateRecipientsRequest
|
|
30
|
+
from signwell_sdk.models.completed_pdf_url_response import CompletedPdfUrlResponse
|
|
31
|
+
from signwell_sdk.api_client import ApiClient, RequestSerialized
|
|
32
|
+
from signwell_sdk.api_response import ApiResponse
|
|
33
|
+
from signwell_sdk.rest import RESTResponseType
|
|
34
|
+
|
|
35
|
+
import time
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
class WaitForCompletionTimeoutError(TimeoutError):
|
|
39
|
+
def __init__(self, message: str, last_document: DocumentResponse | None = None) -> None:
|
|
40
|
+
super().__init__(message)
|
|
41
|
+
self.last_document = last_document
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
class DocumentApi:
|
|
45
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
46
|
+
Ref: https://openapi-generator.tech
|
|
47
|
+
|
|
48
|
+
Do not edit the class manually.
|
|
49
|
+
"""
|
|
50
|
+
|
|
51
|
+
def __init__(self, api_client=None) -> None:
|
|
52
|
+
if api_client is None:
|
|
53
|
+
api_client = ApiClient.get_default()
|
|
54
|
+
self.api_client = api_client
|
|
55
|
+
|
|
56
|
+
@validate_call
|
|
57
|
+
def create_document(
|
|
58
|
+
self,
|
|
59
|
+
document_request: DocumentRequest,
|
|
60
|
+
_request_timeout: Union[
|
|
61
|
+
None,
|
|
62
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
63
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
64
|
+
] = None,
|
|
65
|
+
_request_auth: Dict[StrictStr, Any] | None = None,
|
|
66
|
+
_content_type: StrictStr | None = None,
|
|
67
|
+
_headers: Dict[StrictStr, Any] | None = None,
|
|
68
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
69
|
+
) -> DocumentResponse:
|
|
70
|
+
"""Create Document
|
|
71
|
+
|
|
72
|
+
Creates and optionally sends a new document for signing. If `draft` is set to true the document will not be sent.
|
|
73
|
+
|
|
74
|
+
:param document_request: (required)
|
|
75
|
+
:type document_request: DocumentRequest
|
|
76
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
77
|
+
number provided, it will be total request
|
|
78
|
+
timeout. It can also be a pair (tuple) of
|
|
79
|
+
(connection, read) timeouts.
|
|
80
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
81
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
82
|
+
request; this effectively ignores the
|
|
83
|
+
authentication in the spec for a single request.
|
|
84
|
+
:type _request_auth: dict, optional
|
|
85
|
+
:param _content_type: force content-type for the request.
|
|
86
|
+
:type _content_type: str, Optional
|
|
87
|
+
:param _headers: set to override the headers for a single
|
|
88
|
+
request; this effectively ignores the headers
|
|
89
|
+
in the spec for a single request.
|
|
90
|
+
:type _headers: dict, optional
|
|
91
|
+
:param _host_index: set to override the host_index for a single
|
|
92
|
+
request; this effectively ignores the host_index
|
|
93
|
+
in the spec for a single request.
|
|
94
|
+
:type _host_index: int, optional
|
|
95
|
+
:return: Returns the result object.
|
|
96
|
+
""" # noqa: E501
|
|
97
|
+
|
|
98
|
+
_param = self._create_document_serialize(
|
|
99
|
+
document_request=document_request,
|
|
100
|
+
_request_auth=_request_auth,
|
|
101
|
+
_content_type=_content_type,
|
|
102
|
+
_headers=_headers,
|
|
103
|
+
_host_index=_host_index,
|
|
104
|
+
)
|
|
105
|
+
|
|
106
|
+
_response_types_map: Dict[str, str | None] = {
|
|
107
|
+
"201": "DocumentResponse",
|
|
108
|
+
"400": "ValidationErrorResponse",
|
|
109
|
+
"422": "ValidationErrorResponse",
|
|
110
|
+
"429": "RateLimitErrorResponse",
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
114
|
+
response_data.read()
|
|
115
|
+
return self.api_client.response_deserialize(
|
|
116
|
+
response_data=response_data,
|
|
117
|
+
response_types_map=_response_types_map,
|
|
118
|
+
).data
|
|
119
|
+
|
|
120
|
+
@validate_call
|
|
121
|
+
def create_document_with_http_info(
|
|
122
|
+
self,
|
|
123
|
+
document_request: DocumentRequest,
|
|
124
|
+
_request_timeout: Union[
|
|
125
|
+
None,
|
|
126
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
127
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
128
|
+
] = None,
|
|
129
|
+
_request_auth: Dict[StrictStr, Any] | None = None,
|
|
130
|
+
_content_type: StrictStr | None = None,
|
|
131
|
+
_headers: Dict[StrictStr, Any] | None = None,
|
|
132
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
133
|
+
) -> ApiResponse[DocumentResponse]:
|
|
134
|
+
"""Create Document
|
|
135
|
+
|
|
136
|
+
Creates and optionally sends a new document for signing. If `draft` is set to true the document will not be sent.
|
|
137
|
+
|
|
138
|
+
:param document_request: (required)
|
|
139
|
+
:type document_request: DocumentRequest
|
|
140
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
141
|
+
number provided, it will be total request
|
|
142
|
+
timeout. It can also be a pair (tuple) of
|
|
143
|
+
(connection, read) timeouts.
|
|
144
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
145
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
146
|
+
request; this effectively ignores the
|
|
147
|
+
authentication in the spec for a single request.
|
|
148
|
+
:type _request_auth: dict, optional
|
|
149
|
+
:param _content_type: force content-type for the request.
|
|
150
|
+
:type _content_type: str, Optional
|
|
151
|
+
:param _headers: set to override the headers for a single
|
|
152
|
+
request; this effectively ignores the headers
|
|
153
|
+
in the spec for a single request.
|
|
154
|
+
:type _headers: dict, optional
|
|
155
|
+
:param _host_index: set to override the host_index for a single
|
|
156
|
+
request; this effectively ignores the host_index
|
|
157
|
+
in the spec for a single request.
|
|
158
|
+
:type _host_index: int, optional
|
|
159
|
+
:return: Returns the result object.
|
|
160
|
+
""" # noqa: E501
|
|
161
|
+
|
|
162
|
+
_param = self._create_document_serialize(
|
|
163
|
+
document_request=document_request,
|
|
164
|
+
_request_auth=_request_auth,
|
|
165
|
+
_content_type=_content_type,
|
|
166
|
+
_headers=_headers,
|
|
167
|
+
_host_index=_host_index,
|
|
168
|
+
)
|
|
169
|
+
|
|
170
|
+
_response_types_map: Dict[str, str | None] = {
|
|
171
|
+
"201": "DocumentResponse",
|
|
172
|
+
"400": "ValidationErrorResponse",
|
|
173
|
+
"422": "ValidationErrorResponse",
|
|
174
|
+
"429": "RateLimitErrorResponse",
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
178
|
+
response_data.read()
|
|
179
|
+
return self.api_client.response_deserialize(
|
|
180
|
+
response_data=response_data,
|
|
181
|
+
response_types_map=_response_types_map,
|
|
182
|
+
)
|
|
183
|
+
|
|
184
|
+
@validate_call
|
|
185
|
+
def create_document_without_preload_content(
|
|
186
|
+
self,
|
|
187
|
+
document_request: DocumentRequest,
|
|
188
|
+
_request_timeout: Union[
|
|
189
|
+
None,
|
|
190
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
191
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
192
|
+
] = None,
|
|
193
|
+
_request_auth: Dict[StrictStr, Any] | None = None,
|
|
194
|
+
_content_type: StrictStr | None = None,
|
|
195
|
+
_headers: Dict[StrictStr, Any] | None = None,
|
|
196
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
197
|
+
) -> RESTResponseType:
|
|
198
|
+
"""Create Document
|
|
199
|
+
|
|
200
|
+
Creates and optionally sends a new document for signing. If `draft` is set to true the document will not be sent.
|
|
201
|
+
|
|
202
|
+
:param document_request: (required)
|
|
203
|
+
:type document_request: DocumentRequest
|
|
204
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
205
|
+
number provided, it will be total request
|
|
206
|
+
timeout. It can also be a pair (tuple) of
|
|
207
|
+
(connection, read) timeouts.
|
|
208
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
209
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
210
|
+
request; this effectively ignores the
|
|
211
|
+
authentication in the spec for a single request.
|
|
212
|
+
:type _request_auth: dict, optional
|
|
213
|
+
:param _content_type: force content-type for the request.
|
|
214
|
+
:type _content_type: str, Optional
|
|
215
|
+
:param _headers: set to override the headers for a single
|
|
216
|
+
request; this effectively ignores the headers
|
|
217
|
+
in the spec for a single request.
|
|
218
|
+
:type _headers: dict, optional
|
|
219
|
+
:param _host_index: set to override the host_index for a single
|
|
220
|
+
request; this effectively ignores the host_index
|
|
221
|
+
in the spec for a single request.
|
|
222
|
+
:type _host_index: int, optional
|
|
223
|
+
:return: Returns the result object.
|
|
224
|
+
""" # noqa: E501
|
|
225
|
+
|
|
226
|
+
_param = self._create_document_serialize(
|
|
227
|
+
document_request=document_request,
|
|
228
|
+
_request_auth=_request_auth,
|
|
229
|
+
_content_type=_content_type,
|
|
230
|
+
_headers=_headers,
|
|
231
|
+
_host_index=_host_index,
|
|
232
|
+
)
|
|
233
|
+
|
|
234
|
+
_response_types_map: Dict[str, str | None] = {
|
|
235
|
+
"201": "DocumentResponse",
|
|
236
|
+
"400": "ValidationErrorResponse",
|
|
237
|
+
"422": "ValidationErrorResponse",
|
|
238
|
+
"429": "RateLimitErrorResponse",
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
242
|
+
return response_data.response
|
|
243
|
+
|
|
244
|
+
def _create_document_serialize(
|
|
245
|
+
self,
|
|
246
|
+
document_request,
|
|
247
|
+
_request_auth,
|
|
248
|
+
_content_type,
|
|
249
|
+
_headers,
|
|
250
|
+
_host_index,
|
|
251
|
+
) -> RequestSerialized:
|
|
252
|
+
|
|
253
|
+
_host = None
|
|
254
|
+
|
|
255
|
+
_collection_formats: Dict[str, str] = {}
|
|
256
|
+
|
|
257
|
+
_path_params: Dict[str, str] = {}
|
|
258
|
+
_query_params: List[Tuple[str, str]] = []
|
|
259
|
+
_header_params: Dict[str, str | None] = _headers or {}
|
|
260
|
+
_form_params: List[Tuple[str, str]] = []
|
|
261
|
+
_files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {}
|
|
262
|
+
_body_params: bytes | None = None
|
|
263
|
+
|
|
264
|
+
# process the path parameters
|
|
265
|
+
# process the query parameters
|
|
266
|
+
# process the header parameters
|
|
267
|
+
# process the form parameters
|
|
268
|
+
# process the body parameter
|
|
269
|
+
if document_request is not None:
|
|
270
|
+
_body_params = document_request
|
|
271
|
+
|
|
272
|
+
# set the HTTP header `Accept`
|
|
273
|
+
if "Accept" not in _header_params:
|
|
274
|
+
_header_params["Accept"] = self.api_client.select_header_accept(["application/json"])
|
|
275
|
+
|
|
276
|
+
# set the HTTP header `Content-Type`
|
|
277
|
+
if _content_type:
|
|
278
|
+
_header_params["Content-Type"] = _content_type
|
|
279
|
+
else:
|
|
280
|
+
_default_content_type = self.api_client.select_header_content_type(["application/json"])
|
|
281
|
+
if _default_content_type is not None:
|
|
282
|
+
_header_params["Content-Type"] = _default_content_type
|
|
283
|
+
|
|
284
|
+
# authentication setting
|
|
285
|
+
_auth_settings: List[str] = ["api_key"]
|
|
286
|
+
|
|
287
|
+
return self.api_client.param_serialize(
|
|
288
|
+
method="POST",
|
|
289
|
+
resource_path="/api/v1/documents",
|
|
290
|
+
path_params=_path_params,
|
|
291
|
+
query_params=_query_params,
|
|
292
|
+
header_params=_header_params,
|
|
293
|
+
body=_body_params,
|
|
294
|
+
post_params=_form_params,
|
|
295
|
+
files=_files,
|
|
296
|
+
auth_settings=_auth_settings,
|
|
297
|
+
collection_formats=_collection_formats,
|
|
298
|
+
_host=_host,
|
|
299
|
+
_request_auth=_request_auth,
|
|
300
|
+
)
|
|
301
|
+
|
|
302
|
+
@validate_call
|
|
303
|
+
def create_document_from_template(
|
|
304
|
+
self,
|
|
305
|
+
document_from_template_request: DocumentFromTemplateRequest,
|
|
306
|
+
_request_timeout: Union[
|
|
307
|
+
None,
|
|
308
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
309
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
310
|
+
] = None,
|
|
311
|
+
_request_auth: Dict[StrictStr, Any] | None = None,
|
|
312
|
+
_content_type: StrictStr | None = None,
|
|
313
|
+
_headers: Dict[StrictStr, Any] | None = None,
|
|
314
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
315
|
+
) -> DocumentFromTemplateResponse:
|
|
316
|
+
"""Create Document from Template
|
|
317
|
+
|
|
318
|
+
Creates and optionally sends a new document for signing. If `draft` is set to true the document will not be sent.
|
|
319
|
+
|
|
320
|
+
:param document_from_template_request: (required)
|
|
321
|
+
:type document_from_template_request: DocumentFromTemplateRequest
|
|
322
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
323
|
+
number provided, it will be total request
|
|
324
|
+
timeout. It can also be a pair (tuple) of
|
|
325
|
+
(connection, read) timeouts.
|
|
326
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
327
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
328
|
+
request; this effectively ignores the
|
|
329
|
+
authentication in the spec for a single request.
|
|
330
|
+
:type _request_auth: dict, optional
|
|
331
|
+
:param _content_type: force content-type for the request.
|
|
332
|
+
:type _content_type: str, Optional
|
|
333
|
+
:param _headers: set to override the headers for a single
|
|
334
|
+
request; this effectively ignores the headers
|
|
335
|
+
in the spec for a single request.
|
|
336
|
+
:type _headers: dict, optional
|
|
337
|
+
:param _host_index: set to override the host_index for a single
|
|
338
|
+
request; this effectively ignores the host_index
|
|
339
|
+
in the spec for a single request.
|
|
340
|
+
:type _host_index: int, optional
|
|
341
|
+
:return: Returns the result object.
|
|
342
|
+
""" # noqa: E501
|
|
343
|
+
|
|
344
|
+
_param = self._create_document_from_template_serialize(
|
|
345
|
+
document_from_template_request=document_from_template_request,
|
|
346
|
+
_request_auth=_request_auth,
|
|
347
|
+
_content_type=_content_type,
|
|
348
|
+
_headers=_headers,
|
|
349
|
+
_host_index=_host_index,
|
|
350
|
+
)
|
|
351
|
+
|
|
352
|
+
_response_types_map: Dict[str, str | None] = {
|
|
353
|
+
"201": "DocumentFromTemplateResponse",
|
|
354
|
+
"400": "ValidationErrorResponse",
|
|
355
|
+
"422": "ValidationErrorResponse",
|
|
356
|
+
"429": "RateLimitErrorResponse",
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
360
|
+
response_data.read()
|
|
361
|
+
return self.api_client.response_deserialize(
|
|
362
|
+
response_data=response_data,
|
|
363
|
+
response_types_map=_response_types_map,
|
|
364
|
+
).data
|
|
365
|
+
|
|
366
|
+
@validate_call
|
|
367
|
+
def create_document_from_template_with_http_info(
|
|
368
|
+
self,
|
|
369
|
+
document_from_template_request: DocumentFromTemplateRequest,
|
|
370
|
+
_request_timeout: Union[
|
|
371
|
+
None,
|
|
372
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
373
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
374
|
+
] = None,
|
|
375
|
+
_request_auth: Dict[StrictStr, Any] | None = None,
|
|
376
|
+
_content_type: StrictStr | None = None,
|
|
377
|
+
_headers: Dict[StrictStr, Any] | None = None,
|
|
378
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
379
|
+
) -> ApiResponse[DocumentFromTemplateResponse]:
|
|
380
|
+
"""Create Document from Template
|
|
381
|
+
|
|
382
|
+
Creates and optionally sends a new document for signing. If `draft` is set to true the document will not be sent.
|
|
383
|
+
|
|
384
|
+
:param document_from_template_request: (required)
|
|
385
|
+
:type document_from_template_request: DocumentFromTemplateRequest
|
|
386
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
387
|
+
number provided, it will be total request
|
|
388
|
+
timeout. It can also be a pair (tuple) of
|
|
389
|
+
(connection, read) timeouts.
|
|
390
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
391
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
392
|
+
request; this effectively ignores the
|
|
393
|
+
authentication in the spec for a single request.
|
|
394
|
+
:type _request_auth: dict, optional
|
|
395
|
+
:param _content_type: force content-type for the request.
|
|
396
|
+
:type _content_type: str, Optional
|
|
397
|
+
:param _headers: set to override the headers for a single
|
|
398
|
+
request; this effectively ignores the headers
|
|
399
|
+
in the spec for a single request.
|
|
400
|
+
:type _headers: dict, optional
|
|
401
|
+
:param _host_index: set to override the host_index for a single
|
|
402
|
+
request; this effectively ignores the host_index
|
|
403
|
+
in the spec for a single request.
|
|
404
|
+
:type _host_index: int, optional
|
|
405
|
+
:return: Returns the result object.
|
|
406
|
+
""" # noqa: E501
|
|
407
|
+
|
|
408
|
+
_param = self._create_document_from_template_serialize(
|
|
409
|
+
document_from_template_request=document_from_template_request,
|
|
410
|
+
_request_auth=_request_auth,
|
|
411
|
+
_content_type=_content_type,
|
|
412
|
+
_headers=_headers,
|
|
413
|
+
_host_index=_host_index,
|
|
414
|
+
)
|
|
415
|
+
|
|
416
|
+
_response_types_map: Dict[str, str | None] = {
|
|
417
|
+
"201": "DocumentFromTemplateResponse",
|
|
418
|
+
"400": "ValidationErrorResponse",
|
|
419
|
+
"422": "ValidationErrorResponse",
|
|
420
|
+
"429": "RateLimitErrorResponse",
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
424
|
+
response_data.read()
|
|
425
|
+
return self.api_client.response_deserialize(
|
|
426
|
+
response_data=response_data,
|
|
427
|
+
response_types_map=_response_types_map,
|
|
428
|
+
)
|
|
429
|
+
|
|
430
|
+
@validate_call
|
|
431
|
+
def create_document_from_template_without_preload_content(
|
|
432
|
+
self,
|
|
433
|
+
document_from_template_request: DocumentFromTemplateRequest,
|
|
434
|
+
_request_timeout: Union[
|
|
435
|
+
None,
|
|
436
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
437
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
438
|
+
] = None,
|
|
439
|
+
_request_auth: Dict[StrictStr, Any] | None = None,
|
|
440
|
+
_content_type: StrictStr | None = None,
|
|
441
|
+
_headers: Dict[StrictStr, Any] | None = None,
|
|
442
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
443
|
+
) -> RESTResponseType:
|
|
444
|
+
"""Create Document from Template
|
|
445
|
+
|
|
446
|
+
Creates and optionally sends a new document for signing. If `draft` is set to true the document will not be sent.
|
|
447
|
+
|
|
448
|
+
:param document_from_template_request: (required)
|
|
449
|
+
:type document_from_template_request: DocumentFromTemplateRequest
|
|
450
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
451
|
+
number provided, it will be total request
|
|
452
|
+
timeout. It can also be a pair (tuple) of
|
|
453
|
+
(connection, read) timeouts.
|
|
454
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
455
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
456
|
+
request; this effectively ignores the
|
|
457
|
+
authentication in the spec for a single request.
|
|
458
|
+
:type _request_auth: dict, optional
|
|
459
|
+
:param _content_type: force content-type for the request.
|
|
460
|
+
:type _content_type: str, Optional
|
|
461
|
+
:param _headers: set to override the headers for a single
|
|
462
|
+
request; this effectively ignores the headers
|
|
463
|
+
in the spec for a single request.
|
|
464
|
+
:type _headers: dict, optional
|
|
465
|
+
:param _host_index: set to override the host_index for a single
|
|
466
|
+
request; this effectively ignores the host_index
|
|
467
|
+
in the spec for a single request.
|
|
468
|
+
:type _host_index: int, optional
|
|
469
|
+
:return: Returns the result object.
|
|
470
|
+
""" # noqa: E501
|
|
471
|
+
|
|
472
|
+
_param = self._create_document_from_template_serialize(
|
|
473
|
+
document_from_template_request=document_from_template_request,
|
|
474
|
+
_request_auth=_request_auth,
|
|
475
|
+
_content_type=_content_type,
|
|
476
|
+
_headers=_headers,
|
|
477
|
+
_host_index=_host_index,
|
|
478
|
+
)
|
|
479
|
+
|
|
480
|
+
_response_types_map: Dict[str, str | None] = {
|
|
481
|
+
"201": "DocumentFromTemplateResponse",
|
|
482
|
+
"400": "ValidationErrorResponse",
|
|
483
|
+
"422": "ValidationErrorResponse",
|
|
484
|
+
"429": "RateLimitErrorResponse",
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
488
|
+
return response_data.response
|
|
489
|
+
|
|
490
|
+
def _create_document_from_template_serialize(
|
|
491
|
+
self,
|
|
492
|
+
document_from_template_request,
|
|
493
|
+
_request_auth,
|
|
494
|
+
_content_type,
|
|
495
|
+
_headers,
|
|
496
|
+
_host_index,
|
|
497
|
+
) -> RequestSerialized:
|
|
498
|
+
|
|
499
|
+
_host = None
|
|
500
|
+
|
|
501
|
+
_collection_formats: Dict[str, str] = {}
|
|
502
|
+
|
|
503
|
+
_path_params: Dict[str, str] = {}
|
|
504
|
+
_query_params: List[Tuple[str, str]] = []
|
|
505
|
+
_header_params: Dict[str, str | None] = _headers or {}
|
|
506
|
+
_form_params: List[Tuple[str, str]] = []
|
|
507
|
+
_files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {}
|
|
508
|
+
_body_params: bytes | None = None
|
|
509
|
+
|
|
510
|
+
# process the path parameters
|
|
511
|
+
# process the query parameters
|
|
512
|
+
# process the header parameters
|
|
513
|
+
# process the form parameters
|
|
514
|
+
# process the body parameter
|
|
515
|
+
if document_from_template_request is not None:
|
|
516
|
+
_body_params = document_from_template_request
|
|
517
|
+
|
|
518
|
+
# set the HTTP header `Accept`
|
|
519
|
+
if "Accept" not in _header_params:
|
|
520
|
+
_header_params["Accept"] = self.api_client.select_header_accept(["application/json"])
|
|
521
|
+
|
|
522
|
+
# set the HTTP header `Content-Type`
|
|
523
|
+
if _content_type:
|
|
524
|
+
_header_params["Content-Type"] = _content_type
|
|
525
|
+
else:
|
|
526
|
+
_default_content_type = self.api_client.select_header_content_type(["application/json"])
|
|
527
|
+
if _default_content_type is not None:
|
|
528
|
+
_header_params["Content-Type"] = _default_content_type
|
|
529
|
+
|
|
530
|
+
# authentication setting
|
|
531
|
+
_auth_settings: List[str] = ["api_key"]
|
|
532
|
+
|
|
533
|
+
return self.api_client.param_serialize(
|
|
534
|
+
method="POST",
|
|
535
|
+
resource_path="/api/v1/document_templates/documents",
|
|
536
|
+
path_params=_path_params,
|
|
537
|
+
query_params=_query_params,
|
|
538
|
+
header_params=_header_params,
|
|
539
|
+
body=_body_params,
|
|
540
|
+
post_params=_form_params,
|
|
541
|
+
files=_files,
|
|
542
|
+
auth_settings=_auth_settings,
|
|
543
|
+
collection_formats=_collection_formats,
|
|
544
|
+
_host=_host,
|
|
545
|
+
_request_auth=_request_auth,
|
|
546
|
+
)
|
|
547
|
+
|
|
548
|
+
@validate_call
|
|
549
|
+
def delete_document(
|
|
550
|
+
self,
|
|
551
|
+
id: Annotated[str, Field(min_length=1, strict=True)],
|
|
552
|
+
_request_timeout: Union[
|
|
553
|
+
None,
|
|
554
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
555
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
556
|
+
] = None,
|
|
557
|
+
_request_auth: Dict[StrictStr, Any] | None = None,
|
|
558
|
+
_content_type: StrictStr | None = None,
|
|
559
|
+
_headers: Dict[StrictStr, Any] | None = None,
|
|
560
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
561
|
+
) -> None:
|
|
562
|
+
"""Delete Document
|
|
563
|
+
|
|
564
|
+
Deletes a document. Deleting a document will also cancel document signing (if in progress). Supply the unique document ID from either a Create Document request or document page URL.
|
|
565
|
+
|
|
566
|
+
:param id: (required)
|
|
567
|
+
:type id: str
|
|
568
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
569
|
+
number provided, it will be total request
|
|
570
|
+
timeout. It can also be a pair (tuple) of
|
|
571
|
+
(connection, read) timeouts.
|
|
572
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
573
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
574
|
+
request; this effectively ignores the
|
|
575
|
+
authentication in the spec for a single request.
|
|
576
|
+
:type _request_auth: dict, optional
|
|
577
|
+
:param _content_type: force content-type for the request.
|
|
578
|
+
:type _content_type: str, Optional
|
|
579
|
+
:param _headers: set to override the headers for a single
|
|
580
|
+
request; this effectively ignores the headers
|
|
581
|
+
in the spec for a single request.
|
|
582
|
+
:type _headers: dict, optional
|
|
583
|
+
:param _host_index: set to override the host_index for a single
|
|
584
|
+
request; this effectively ignores the host_index
|
|
585
|
+
in the spec for a single request.
|
|
586
|
+
:type _host_index: int, optional
|
|
587
|
+
:return: Returns the result object.
|
|
588
|
+
""" # noqa: E501
|
|
589
|
+
|
|
590
|
+
_param = self._delete_document_serialize(
|
|
591
|
+
id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index
|
|
592
|
+
)
|
|
593
|
+
|
|
594
|
+
_response_types_map: Dict[str, str | None] = {
|
|
595
|
+
"204": None,
|
|
596
|
+
"404": "ErrorResponse",
|
|
597
|
+
"429": "RateLimitErrorResponse",
|
|
598
|
+
}
|
|
599
|
+
|
|
600
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
601
|
+
response_data.read()
|
|
602
|
+
return self.api_client.response_deserialize(
|
|
603
|
+
response_data=response_data,
|
|
604
|
+
response_types_map=_response_types_map,
|
|
605
|
+
).data
|
|
606
|
+
|
|
607
|
+
@validate_call
|
|
608
|
+
def delete_document_with_http_info(
|
|
609
|
+
self,
|
|
610
|
+
id: Annotated[str, Field(min_length=1, strict=True)],
|
|
611
|
+
_request_timeout: Union[
|
|
612
|
+
None,
|
|
613
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
614
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
615
|
+
] = None,
|
|
616
|
+
_request_auth: Dict[StrictStr, Any] | None = None,
|
|
617
|
+
_content_type: StrictStr | None = None,
|
|
618
|
+
_headers: Dict[StrictStr, Any] | None = None,
|
|
619
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
620
|
+
) -> ApiResponse[None]:
|
|
621
|
+
"""Delete Document
|
|
622
|
+
|
|
623
|
+
Deletes a document. Deleting a document will also cancel document signing (if in progress). Supply the unique document ID from either a Create Document request or document page URL.
|
|
624
|
+
|
|
625
|
+
:param id: (required)
|
|
626
|
+
:type id: str
|
|
627
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
628
|
+
number provided, it will be total request
|
|
629
|
+
timeout. It can also be a pair (tuple) of
|
|
630
|
+
(connection, read) timeouts.
|
|
631
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
632
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
633
|
+
request; this effectively ignores the
|
|
634
|
+
authentication in the spec for a single request.
|
|
635
|
+
:type _request_auth: dict, optional
|
|
636
|
+
:param _content_type: force content-type for the request.
|
|
637
|
+
:type _content_type: str, Optional
|
|
638
|
+
:param _headers: set to override the headers for a single
|
|
639
|
+
request; this effectively ignores the headers
|
|
640
|
+
in the spec for a single request.
|
|
641
|
+
:type _headers: dict, optional
|
|
642
|
+
:param _host_index: set to override the host_index for a single
|
|
643
|
+
request; this effectively ignores the host_index
|
|
644
|
+
in the spec for a single request.
|
|
645
|
+
:type _host_index: int, optional
|
|
646
|
+
:return: Returns the result object.
|
|
647
|
+
""" # noqa: E501
|
|
648
|
+
|
|
649
|
+
_param = self._delete_document_serialize(
|
|
650
|
+
id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index
|
|
651
|
+
)
|
|
652
|
+
|
|
653
|
+
_response_types_map: Dict[str, str | None] = {
|
|
654
|
+
"204": None,
|
|
655
|
+
"404": "ErrorResponse",
|
|
656
|
+
"429": "RateLimitErrorResponse",
|
|
657
|
+
}
|
|
658
|
+
|
|
659
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
660
|
+
response_data.read()
|
|
661
|
+
return self.api_client.response_deserialize(
|
|
662
|
+
response_data=response_data,
|
|
663
|
+
response_types_map=_response_types_map,
|
|
664
|
+
)
|
|
665
|
+
|
|
666
|
+
@validate_call
|
|
667
|
+
def delete_document_without_preload_content(
|
|
668
|
+
self,
|
|
669
|
+
id: Annotated[str, Field(min_length=1, strict=True)],
|
|
670
|
+
_request_timeout: Union[
|
|
671
|
+
None,
|
|
672
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
673
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
674
|
+
] = None,
|
|
675
|
+
_request_auth: Dict[StrictStr, Any] | None = None,
|
|
676
|
+
_content_type: StrictStr | None = None,
|
|
677
|
+
_headers: Dict[StrictStr, Any] | None = None,
|
|
678
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
679
|
+
) -> RESTResponseType:
|
|
680
|
+
"""Delete Document
|
|
681
|
+
|
|
682
|
+
Deletes a document. Deleting a document will also cancel document signing (if in progress). Supply the unique document ID from either a Create Document request or document page URL.
|
|
683
|
+
|
|
684
|
+
:param id: (required)
|
|
685
|
+
:type id: str
|
|
686
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
687
|
+
number provided, it will be total request
|
|
688
|
+
timeout. It can also be a pair (tuple) of
|
|
689
|
+
(connection, read) timeouts.
|
|
690
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
691
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
692
|
+
request; this effectively ignores the
|
|
693
|
+
authentication in the spec for a single request.
|
|
694
|
+
:type _request_auth: dict, optional
|
|
695
|
+
:param _content_type: force content-type for the request.
|
|
696
|
+
:type _content_type: str, Optional
|
|
697
|
+
:param _headers: set to override the headers for a single
|
|
698
|
+
request; this effectively ignores the headers
|
|
699
|
+
in the spec for a single request.
|
|
700
|
+
:type _headers: dict, optional
|
|
701
|
+
:param _host_index: set to override the host_index for a single
|
|
702
|
+
request; this effectively ignores the host_index
|
|
703
|
+
in the spec for a single request.
|
|
704
|
+
:type _host_index: int, optional
|
|
705
|
+
:return: Returns the result object.
|
|
706
|
+
""" # noqa: E501
|
|
707
|
+
|
|
708
|
+
_param = self._delete_document_serialize(
|
|
709
|
+
id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index
|
|
710
|
+
)
|
|
711
|
+
|
|
712
|
+
_response_types_map: Dict[str, str | None] = {
|
|
713
|
+
"204": None,
|
|
714
|
+
"404": "ErrorResponse",
|
|
715
|
+
"429": "RateLimitErrorResponse",
|
|
716
|
+
}
|
|
717
|
+
|
|
718
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
719
|
+
return response_data.response
|
|
720
|
+
|
|
721
|
+
def _delete_document_serialize(
|
|
722
|
+
self,
|
|
723
|
+
id,
|
|
724
|
+
_request_auth,
|
|
725
|
+
_content_type,
|
|
726
|
+
_headers,
|
|
727
|
+
_host_index,
|
|
728
|
+
) -> RequestSerialized:
|
|
729
|
+
|
|
730
|
+
_host = None
|
|
731
|
+
|
|
732
|
+
_collection_formats: Dict[str, str] = {}
|
|
733
|
+
|
|
734
|
+
_path_params: Dict[str, str] = {}
|
|
735
|
+
_query_params: List[Tuple[str, str]] = []
|
|
736
|
+
_header_params: Dict[str, str | None] = _headers or {}
|
|
737
|
+
_form_params: List[Tuple[str, str]] = []
|
|
738
|
+
_files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {}
|
|
739
|
+
_body_params: bytes | None = None
|
|
740
|
+
|
|
741
|
+
# process the path parameters
|
|
742
|
+
if id is not None:
|
|
743
|
+
_path_params["id"] = id
|
|
744
|
+
# process the query parameters
|
|
745
|
+
# process the header parameters
|
|
746
|
+
# process the form parameters
|
|
747
|
+
# process the body parameter
|
|
748
|
+
|
|
749
|
+
# set the HTTP header `Accept`
|
|
750
|
+
if "Accept" not in _header_params:
|
|
751
|
+
_header_params["Accept"] = self.api_client.select_header_accept(["application/json"])
|
|
752
|
+
|
|
753
|
+
# authentication setting
|
|
754
|
+
_auth_settings: List[str] = ["api_key"]
|
|
755
|
+
|
|
756
|
+
return self.api_client.param_serialize(
|
|
757
|
+
method="DELETE",
|
|
758
|
+
resource_path="/api/v1/documents/{id}",
|
|
759
|
+
path_params=_path_params,
|
|
760
|
+
query_params=_query_params,
|
|
761
|
+
header_params=_header_params,
|
|
762
|
+
body=_body_params,
|
|
763
|
+
post_params=_form_params,
|
|
764
|
+
files=_files,
|
|
765
|
+
auth_settings=_auth_settings,
|
|
766
|
+
collection_formats=_collection_formats,
|
|
767
|
+
_host=_host,
|
|
768
|
+
_request_auth=_request_auth,
|
|
769
|
+
)
|
|
770
|
+
|
|
771
|
+
@validate_call
|
|
772
|
+
def get_completed_pdf(
|
|
773
|
+
self,
|
|
774
|
+
id: Annotated[str, Field(min_length=1, strict=True)],
|
|
775
|
+
url_only: StrictBool | None = None,
|
|
776
|
+
audit_page: StrictBool | None = None,
|
|
777
|
+
file_format: FileFormat | None = None,
|
|
778
|
+
_request_timeout: Union[
|
|
779
|
+
None,
|
|
780
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
781
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
782
|
+
] = None,
|
|
783
|
+
_request_auth: Dict[StrictStr, Any] | None = None,
|
|
784
|
+
_content_type: StrictStr | None = None,
|
|
785
|
+
_headers: Dict[StrictStr, Any] | None = None,
|
|
786
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
787
|
+
) -> bytes | CompletedPdfUrlResponse:
|
|
788
|
+
"""Completed PDF
|
|
789
|
+
|
|
790
|
+
Gets a completed document PDF or ZIP file. Supply the unique document ID from either a document creation request or document page URL.
|
|
791
|
+
|
|
792
|
+
:param id: (required)
|
|
793
|
+
:type id: str
|
|
794
|
+
:param url_only:
|
|
795
|
+
:type url_only: bool
|
|
796
|
+
:param audit_page:
|
|
797
|
+
:type audit_page: bool
|
|
798
|
+
:param file_format:
|
|
799
|
+
:type file_format: FileFormat
|
|
800
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
801
|
+
number provided, it will be total request
|
|
802
|
+
timeout. It can also be a pair (tuple) of
|
|
803
|
+
(connection, read) timeouts.
|
|
804
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
805
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
806
|
+
request; this effectively ignores the
|
|
807
|
+
authentication in the spec for a single request.
|
|
808
|
+
:type _request_auth: dict, optional
|
|
809
|
+
:param _content_type: force content-type for the request.
|
|
810
|
+
:type _content_type: str, Optional
|
|
811
|
+
:param _headers: set to override the headers for a single
|
|
812
|
+
request; this effectively ignores the headers
|
|
813
|
+
in the spec for a single request.
|
|
814
|
+
:type _headers: dict, optional
|
|
815
|
+
:param _host_index: set to override the host_index for a single
|
|
816
|
+
request; this effectively ignores the host_index
|
|
817
|
+
in the spec for a single request.
|
|
818
|
+
:type _host_index: int, optional
|
|
819
|
+
:return: Returns the result object.
|
|
820
|
+
""" # noqa: E501
|
|
821
|
+
|
|
822
|
+
_param = self._get_completed_pdf_serialize(
|
|
823
|
+
id=id,
|
|
824
|
+
url_only=url_only,
|
|
825
|
+
audit_page=audit_page,
|
|
826
|
+
file_format=file_format,
|
|
827
|
+
_request_auth=_request_auth,
|
|
828
|
+
_content_type=_content_type,
|
|
829
|
+
_headers=_headers,
|
|
830
|
+
_host_index=_host_index,
|
|
831
|
+
)
|
|
832
|
+
if url_only is True:
|
|
833
|
+
_return_type = "CompletedPdfUrlResponse"
|
|
834
|
+
else:
|
|
835
|
+
_return_type = "bytes"
|
|
836
|
+
|
|
837
|
+
_response_types_map: Dict[str, str | None] = {
|
|
838
|
+
"200": "CompletedPdfResponse",
|
|
839
|
+
"404": "ErrorResponse",
|
|
840
|
+
"429": "RateLimitErrorResponse",
|
|
841
|
+
}
|
|
842
|
+
_response_types_map["200"] = _return_type
|
|
843
|
+
|
|
844
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
845
|
+
response_data.read()
|
|
846
|
+
return self.api_client.response_deserialize(
|
|
847
|
+
response_data=response_data,
|
|
848
|
+
response_types_map=_response_types_map,
|
|
849
|
+
).data
|
|
850
|
+
|
|
851
|
+
@validate_call
|
|
852
|
+
def get_completed_pdf_with_http_info(
|
|
853
|
+
self,
|
|
854
|
+
id: Annotated[str, Field(min_length=1, strict=True)],
|
|
855
|
+
url_only: StrictBool | None = None,
|
|
856
|
+
audit_page: StrictBool | None = None,
|
|
857
|
+
file_format: FileFormat | None = None,
|
|
858
|
+
_request_timeout: Union[
|
|
859
|
+
None,
|
|
860
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
861
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
862
|
+
] = None,
|
|
863
|
+
_request_auth: Dict[StrictStr, Any] | None = None,
|
|
864
|
+
_content_type: StrictStr | None = None,
|
|
865
|
+
_headers: Dict[StrictStr, Any] | None = None,
|
|
866
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
867
|
+
) -> ApiResponse[bytes | CompletedPdfUrlResponse]:
|
|
868
|
+
"""Completed PDF
|
|
869
|
+
|
|
870
|
+
Gets a completed document PDF or ZIP file. Supply the unique document ID from either a document creation request or document page URL.
|
|
871
|
+
|
|
872
|
+
:param id: (required)
|
|
873
|
+
:type id: str
|
|
874
|
+
:param url_only:
|
|
875
|
+
:type url_only: bool
|
|
876
|
+
:param audit_page:
|
|
877
|
+
:type audit_page: bool
|
|
878
|
+
:param file_format:
|
|
879
|
+
:type file_format: FileFormat
|
|
880
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
881
|
+
number provided, it will be total request
|
|
882
|
+
timeout. It can also be a pair (tuple) of
|
|
883
|
+
(connection, read) timeouts.
|
|
884
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
885
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
886
|
+
request; this effectively ignores the
|
|
887
|
+
authentication in the spec for a single request.
|
|
888
|
+
:type _request_auth: dict, optional
|
|
889
|
+
:param _content_type: force content-type for the request.
|
|
890
|
+
:type _content_type: str, Optional
|
|
891
|
+
:param _headers: set to override the headers for a single
|
|
892
|
+
request; this effectively ignores the headers
|
|
893
|
+
in the spec for a single request.
|
|
894
|
+
:type _headers: dict, optional
|
|
895
|
+
:param _host_index: set to override the host_index for a single
|
|
896
|
+
request; this effectively ignores the host_index
|
|
897
|
+
in the spec for a single request.
|
|
898
|
+
:type _host_index: int, optional
|
|
899
|
+
:return: Returns the result object.
|
|
900
|
+
""" # noqa: E501
|
|
901
|
+
|
|
902
|
+
_param = self._get_completed_pdf_serialize(
|
|
903
|
+
id=id,
|
|
904
|
+
url_only=url_only,
|
|
905
|
+
audit_page=audit_page,
|
|
906
|
+
file_format=file_format,
|
|
907
|
+
_request_auth=_request_auth,
|
|
908
|
+
_content_type=_content_type,
|
|
909
|
+
_headers=_headers,
|
|
910
|
+
_host_index=_host_index,
|
|
911
|
+
)
|
|
912
|
+
if url_only is True:
|
|
913
|
+
_return_type = "CompletedPdfUrlResponse"
|
|
914
|
+
else:
|
|
915
|
+
_return_type = "bytes"
|
|
916
|
+
|
|
917
|
+
_response_types_map: Dict[str, str | None] = {
|
|
918
|
+
"200": "CompletedPdfResponse",
|
|
919
|
+
"404": "ErrorResponse",
|
|
920
|
+
"429": "RateLimitErrorResponse",
|
|
921
|
+
}
|
|
922
|
+
_response_types_map["200"] = _return_type
|
|
923
|
+
|
|
924
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
925
|
+
response_data.read()
|
|
926
|
+
return self.api_client.response_deserialize(
|
|
927
|
+
response_data=response_data,
|
|
928
|
+
response_types_map=_response_types_map,
|
|
929
|
+
)
|
|
930
|
+
|
|
931
|
+
@validate_call
|
|
932
|
+
def get_completed_pdf_without_preload_content(
|
|
933
|
+
self,
|
|
934
|
+
id: Annotated[str, Field(min_length=1, strict=True)],
|
|
935
|
+
url_only: StrictBool | None = None,
|
|
936
|
+
audit_page: StrictBool | None = None,
|
|
937
|
+
file_format: FileFormat | None = None,
|
|
938
|
+
_request_timeout: Union[
|
|
939
|
+
None,
|
|
940
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
941
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
942
|
+
] = None,
|
|
943
|
+
_request_auth: Dict[StrictStr, Any] | None = None,
|
|
944
|
+
_content_type: StrictStr | None = None,
|
|
945
|
+
_headers: Dict[StrictStr, Any] | None = None,
|
|
946
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
947
|
+
) -> RESTResponseType:
|
|
948
|
+
"""Completed PDF
|
|
949
|
+
|
|
950
|
+
Gets a completed document PDF or ZIP file. Supply the unique document ID from either a document creation request or document page URL.
|
|
951
|
+
|
|
952
|
+
:param id: (required)
|
|
953
|
+
:type id: str
|
|
954
|
+
:param url_only:
|
|
955
|
+
:type url_only: bool
|
|
956
|
+
:param audit_page:
|
|
957
|
+
:type audit_page: bool
|
|
958
|
+
:param file_format:
|
|
959
|
+
:type file_format: FileFormat
|
|
960
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
961
|
+
number provided, it will be total request
|
|
962
|
+
timeout. It can also be a pair (tuple) of
|
|
963
|
+
(connection, read) timeouts.
|
|
964
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
965
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
966
|
+
request; this effectively ignores the
|
|
967
|
+
authentication in the spec for a single request.
|
|
968
|
+
:type _request_auth: dict, optional
|
|
969
|
+
:param _content_type: force content-type for the request.
|
|
970
|
+
:type _content_type: str, Optional
|
|
971
|
+
:param _headers: set to override the headers for a single
|
|
972
|
+
request; this effectively ignores the headers
|
|
973
|
+
in the spec for a single request.
|
|
974
|
+
:type _headers: dict, optional
|
|
975
|
+
:param _host_index: set to override the host_index for a single
|
|
976
|
+
request; this effectively ignores the host_index
|
|
977
|
+
in the spec for a single request.
|
|
978
|
+
:type _host_index: int, optional
|
|
979
|
+
:return: Returns the result object.
|
|
980
|
+
""" # noqa: E501
|
|
981
|
+
|
|
982
|
+
_param = self._get_completed_pdf_serialize(
|
|
983
|
+
id=id,
|
|
984
|
+
url_only=url_only,
|
|
985
|
+
audit_page=audit_page,
|
|
986
|
+
file_format=file_format,
|
|
987
|
+
_request_auth=_request_auth,
|
|
988
|
+
_content_type=_content_type,
|
|
989
|
+
_headers=_headers,
|
|
990
|
+
_host_index=_host_index,
|
|
991
|
+
)
|
|
992
|
+
if url_only is True:
|
|
993
|
+
_return_type = "CompletedPdfUrlResponse"
|
|
994
|
+
else:
|
|
995
|
+
_return_type = "bytes"
|
|
996
|
+
|
|
997
|
+
_response_types_map: Dict[str, str | None] = {
|
|
998
|
+
"200": "CompletedPdfResponse",
|
|
999
|
+
"404": "ErrorResponse",
|
|
1000
|
+
"429": "RateLimitErrorResponse",
|
|
1001
|
+
}
|
|
1002
|
+
_response_types_map["200"] = _return_type
|
|
1003
|
+
|
|
1004
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
1005
|
+
return response_data.response
|
|
1006
|
+
|
|
1007
|
+
def _get_completed_pdf_serialize(
|
|
1008
|
+
self,
|
|
1009
|
+
id,
|
|
1010
|
+
url_only,
|
|
1011
|
+
audit_page,
|
|
1012
|
+
file_format,
|
|
1013
|
+
_request_auth,
|
|
1014
|
+
_content_type,
|
|
1015
|
+
_headers,
|
|
1016
|
+
_host_index,
|
|
1017
|
+
) -> RequestSerialized:
|
|
1018
|
+
|
|
1019
|
+
_host = None
|
|
1020
|
+
|
|
1021
|
+
_collection_formats: Dict[str, str] = {}
|
|
1022
|
+
|
|
1023
|
+
_path_params: Dict[str, str] = {}
|
|
1024
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1025
|
+
_header_params: Dict[str, str | None] = _headers or {}
|
|
1026
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1027
|
+
_files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {}
|
|
1028
|
+
_body_params: bytes | None = None
|
|
1029
|
+
|
|
1030
|
+
# process the path parameters
|
|
1031
|
+
if id is not None:
|
|
1032
|
+
_path_params["id"] = id
|
|
1033
|
+
# process the query parameters
|
|
1034
|
+
if url_only is not None:
|
|
1035
|
+
_query_params.append(("url_only", url_only))
|
|
1036
|
+
|
|
1037
|
+
if audit_page is not None:
|
|
1038
|
+
_query_params.append(("audit_page", audit_page))
|
|
1039
|
+
|
|
1040
|
+
if file_format is not None:
|
|
1041
|
+
_query_params.append(("file_format", file_format.value))
|
|
1042
|
+
|
|
1043
|
+
# process the header parameters
|
|
1044
|
+
# process the form parameters
|
|
1045
|
+
# process the body parameter
|
|
1046
|
+
|
|
1047
|
+
# set the HTTP header `Accept`
|
|
1048
|
+
if "Accept" not in _header_params:
|
|
1049
|
+
if url_only is True:
|
|
1050
|
+
_header_params["Accept"] = "application/json"
|
|
1051
|
+
else:
|
|
1052
|
+
_header_params["Accept"] = "application/octet-stream"
|
|
1053
|
+
|
|
1054
|
+
# authentication setting
|
|
1055
|
+
_auth_settings: List[str] = ["api_key"]
|
|
1056
|
+
|
|
1057
|
+
return self.api_client.param_serialize(
|
|
1058
|
+
method="GET",
|
|
1059
|
+
resource_path="/api/v1/documents/{id}/completed_pdf",
|
|
1060
|
+
path_params=_path_params,
|
|
1061
|
+
query_params=_query_params,
|
|
1062
|
+
header_params=_header_params,
|
|
1063
|
+
body=_body_params,
|
|
1064
|
+
post_params=_form_params,
|
|
1065
|
+
files=_files,
|
|
1066
|
+
auth_settings=_auth_settings,
|
|
1067
|
+
collection_formats=_collection_formats,
|
|
1068
|
+
_host=_host,
|
|
1069
|
+
_request_auth=_request_auth,
|
|
1070
|
+
)
|
|
1071
|
+
|
|
1072
|
+
@validate_call
|
|
1073
|
+
def get_document(
|
|
1074
|
+
self,
|
|
1075
|
+
id: Annotated[str, Field(min_length=1, strict=True)],
|
|
1076
|
+
_request_timeout: Union[
|
|
1077
|
+
None,
|
|
1078
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1079
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
1080
|
+
] = None,
|
|
1081
|
+
_request_auth: Dict[StrictStr, Any] | None = None,
|
|
1082
|
+
_content_type: StrictStr | None = None,
|
|
1083
|
+
_headers: Dict[StrictStr, Any] | None = None,
|
|
1084
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1085
|
+
) -> DocumentResponse:
|
|
1086
|
+
"""Get Document
|
|
1087
|
+
|
|
1088
|
+
Returns a document and all associated document data. Supply the unique document ID from either a document creation request or Document page URL.
|
|
1089
|
+
|
|
1090
|
+
:param id: (required)
|
|
1091
|
+
:type id: str
|
|
1092
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1093
|
+
number provided, it will be total request
|
|
1094
|
+
timeout. It can also be a pair (tuple) of
|
|
1095
|
+
(connection, read) timeouts.
|
|
1096
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1097
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1098
|
+
request; this effectively ignores the
|
|
1099
|
+
authentication in the spec for a single request.
|
|
1100
|
+
:type _request_auth: dict, optional
|
|
1101
|
+
:param _content_type: force content-type for the request.
|
|
1102
|
+
:type _content_type: str, Optional
|
|
1103
|
+
:param _headers: set to override the headers for a single
|
|
1104
|
+
request; this effectively ignores the headers
|
|
1105
|
+
in the spec for a single request.
|
|
1106
|
+
:type _headers: dict, optional
|
|
1107
|
+
:param _host_index: set to override the host_index for a single
|
|
1108
|
+
request; this effectively ignores the host_index
|
|
1109
|
+
in the spec for a single request.
|
|
1110
|
+
:type _host_index: int, optional
|
|
1111
|
+
:return: Returns the result object.
|
|
1112
|
+
""" # noqa: E501
|
|
1113
|
+
|
|
1114
|
+
_param = self._get_document_serialize(
|
|
1115
|
+
id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index
|
|
1116
|
+
)
|
|
1117
|
+
|
|
1118
|
+
_response_types_map: Dict[str, str | None] = {
|
|
1119
|
+
"200": "DocumentResponse",
|
|
1120
|
+
"404": "ErrorResponse",
|
|
1121
|
+
"429": "RateLimitErrorResponse",
|
|
1122
|
+
}
|
|
1123
|
+
|
|
1124
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
1125
|
+
response_data.read()
|
|
1126
|
+
return self.api_client.response_deserialize(
|
|
1127
|
+
response_data=response_data,
|
|
1128
|
+
response_types_map=_response_types_map,
|
|
1129
|
+
).data
|
|
1130
|
+
|
|
1131
|
+
@validate_call
|
|
1132
|
+
def get_document_with_http_info(
|
|
1133
|
+
self,
|
|
1134
|
+
id: Annotated[str, Field(min_length=1, strict=True)],
|
|
1135
|
+
_request_timeout: Union[
|
|
1136
|
+
None,
|
|
1137
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1138
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
1139
|
+
] = None,
|
|
1140
|
+
_request_auth: Dict[StrictStr, Any] | None = None,
|
|
1141
|
+
_content_type: StrictStr | None = None,
|
|
1142
|
+
_headers: Dict[StrictStr, Any] | None = None,
|
|
1143
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1144
|
+
) -> ApiResponse[DocumentResponse]:
|
|
1145
|
+
"""Get Document
|
|
1146
|
+
|
|
1147
|
+
Returns a document and all associated document data. Supply the unique document ID from either a document creation request or Document page URL.
|
|
1148
|
+
|
|
1149
|
+
:param id: (required)
|
|
1150
|
+
:type id: str
|
|
1151
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1152
|
+
number provided, it will be total request
|
|
1153
|
+
timeout. It can also be a pair (tuple) of
|
|
1154
|
+
(connection, read) timeouts.
|
|
1155
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1156
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1157
|
+
request; this effectively ignores the
|
|
1158
|
+
authentication in the spec for a single request.
|
|
1159
|
+
:type _request_auth: dict, optional
|
|
1160
|
+
:param _content_type: force content-type for the request.
|
|
1161
|
+
:type _content_type: str, Optional
|
|
1162
|
+
:param _headers: set to override the headers for a single
|
|
1163
|
+
request; this effectively ignores the headers
|
|
1164
|
+
in the spec for a single request.
|
|
1165
|
+
:type _headers: dict, optional
|
|
1166
|
+
:param _host_index: set to override the host_index for a single
|
|
1167
|
+
request; this effectively ignores the host_index
|
|
1168
|
+
in the spec for a single request.
|
|
1169
|
+
:type _host_index: int, optional
|
|
1170
|
+
:return: Returns the result object.
|
|
1171
|
+
""" # noqa: E501
|
|
1172
|
+
|
|
1173
|
+
_param = self._get_document_serialize(
|
|
1174
|
+
id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index
|
|
1175
|
+
)
|
|
1176
|
+
|
|
1177
|
+
_response_types_map: Dict[str, str | None] = {
|
|
1178
|
+
"200": "DocumentResponse",
|
|
1179
|
+
"404": "ErrorResponse",
|
|
1180
|
+
"429": "RateLimitErrorResponse",
|
|
1181
|
+
}
|
|
1182
|
+
|
|
1183
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
1184
|
+
response_data.read()
|
|
1185
|
+
return self.api_client.response_deserialize(
|
|
1186
|
+
response_data=response_data,
|
|
1187
|
+
response_types_map=_response_types_map,
|
|
1188
|
+
)
|
|
1189
|
+
|
|
1190
|
+
@validate_call
|
|
1191
|
+
def get_document_without_preload_content(
|
|
1192
|
+
self,
|
|
1193
|
+
id: Annotated[str, Field(min_length=1, strict=True)],
|
|
1194
|
+
_request_timeout: Union[
|
|
1195
|
+
None,
|
|
1196
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1197
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
1198
|
+
] = None,
|
|
1199
|
+
_request_auth: Dict[StrictStr, Any] | None = None,
|
|
1200
|
+
_content_type: StrictStr | None = None,
|
|
1201
|
+
_headers: Dict[StrictStr, Any] | None = None,
|
|
1202
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1203
|
+
) -> RESTResponseType:
|
|
1204
|
+
"""Get Document
|
|
1205
|
+
|
|
1206
|
+
Returns a document and all associated document data. Supply the unique document ID from either a document creation request or Document page URL.
|
|
1207
|
+
|
|
1208
|
+
:param id: (required)
|
|
1209
|
+
:type id: str
|
|
1210
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1211
|
+
number provided, it will be total request
|
|
1212
|
+
timeout. It can also be a pair (tuple) of
|
|
1213
|
+
(connection, read) timeouts.
|
|
1214
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1215
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1216
|
+
request; this effectively ignores the
|
|
1217
|
+
authentication in the spec for a single request.
|
|
1218
|
+
:type _request_auth: dict, optional
|
|
1219
|
+
:param _content_type: force content-type for the request.
|
|
1220
|
+
:type _content_type: str, Optional
|
|
1221
|
+
:param _headers: set to override the headers for a single
|
|
1222
|
+
request; this effectively ignores the headers
|
|
1223
|
+
in the spec for a single request.
|
|
1224
|
+
:type _headers: dict, optional
|
|
1225
|
+
:param _host_index: set to override the host_index for a single
|
|
1226
|
+
request; this effectively ignores the host_index
|
|
1227
|
+
in the spec for a single request.
|
|
1228
|
+
:type _host_index: int, optional
|
|
1229
|
+
:return: Returns the result object.
|
|
1230
|
+
""" # noqa: E501
|
|
1231
|
+
|
|
1232
|
+
_param = self._get_document_serialize(
|
|
1233
|
+
id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index
|
|
1234
|
+
)
|
|
1235
|
+
|
|
1236
|
+
_response_types_map: Dict[str, str | None] = {
|
|
1237
|
+
"200": "DocumentResponse",
|
|
1238
|
+
"404": "ErrorResponse",
|
|
1239
|
+
"429": "RateLimitErrorResponse",
|
|
1240
|
+
}
|
|
1241
|
+
|
|
1242
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
1243
|
+
return response_data.response
|
|
1244
|
+
|
|
1245
|
+
def _get_document_serialize(
|
|
1246
|
+
self,
|
|
1247
|
+
id,
|
|
1248
|
+
_request_auth,
|
|
1249
|
+
_content_type,
|
|
1250
|
+
_headers,
|
|
1251
|
+
_host_index,
|
|
1252
|
+
) -> RequestSerialized:
|
|
1253
|
+
|
|
1254
|
+
_host = None
|
|
1255
|
+
|
|
1256
|
+
_collection_formats: Dict[str, str] = {}
|
|
1257
|
+
|
|
1258
|
+
_path_params: Dict[str, str] = {}
|
|
1259
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1260
|
+
_header_params: Dict[str, str | None] = _headers or {}
|
|
1261
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1262
|
+
_files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {}
|
|
1263
|
+
_body_params: bytes | None = None
|
|
1264
|
+
|
|
1265
|
+
# process the path parameters
|
|
1266
|
+
if id is not None:
|
|
1267
|
+
_path_params["id"] = id
|
|
1268
|
+
# process the query parameters
|
|
1269
|
+
# process the header parameters
|
|
1270
|
+
# process the form parameters
|
|
1271
|
+
# process the body parameter
|
|
1272
|
+
|
|
1273
|
+
# set the HTTP header `Accept`
|
|
1274
|
+
if "Accept" not in _header_params:
|
|
1275
|
+
_header_params["Accept"] = self.api_client.select_header_accept(["application/json"])
|
|
1276
|
+
|
|
1277
|
+
# authentication setting
|
|
1278
|
+
_auth_settings: List[str] = ["api_key"]
|
|
1279
|
+
|
|
1280
|
+
return self.api_client.param_serialize(
|
|
1281
|
+
method="GET",
|
|
1282
|
+
resource_path="/api/v1/documents/{id}",
|
|
1283
|
+
path_params=_path_params,
|
|
1284
|
+
query_params=_query_params,
|
|
1285
|
+
header_params=_header_params,
|
|
1286
|
+
body=_body_params,
|
|
1287
|
+
post_params=_form_params,
|
|
1288
|
+
files=_files,
|
|
1289
|
+
auth_settings=_auth_settings,
|
|
1290
|
+
collection_formats=_collection_formats,
|
|
1291
|
+
_host=_host,
|
|
1292
|
+
_request_auth=_request_auth,
|
|
1293
|
+
)
|
|
1294
|
+
|
|
1295
|
+
@validate_call
|
|
1296
|
+
def list_documents(
|
|
1297
|
+
self,
|
|
1298
|
+
page: Annotated[int, Field(strict=True, ge=1)] | None = None,
|
|
1299
|
+
limit: Annotated[int, Field(le=50, strict=True, ge=1)] | None = None,
|
|
1300
|
+
query: Annotated[
|
|
1301
|
+
Annotated[str, Field(min_length=1, strict=True)] | None,
|
|
1302
|
+
Field(
|
|
1303
|
+
description='Raw API filter query. Use AND between filters, for example: "name:Classic AND status:completed".'
|
|
1304
|
+
),
|
|
1305
|
+
] = None,
|
|
1306
|
+
_request_timeout: Union[
|
|
1307
|
+
None,
|
|
1308
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1309
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
1310
|
+
] = None,
|
|
1311
|
+
_request_auth: Dict[StrictStr, Any] | None = None,
|
|
1312
|
+
_content_type: StrictStr | None = None,
|
|
1313
|
+
_headers: Dict[StrictStr, Any] | None = None,
|
|
1314
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1315
|
+
) -> DocumentListResponse:
|
|
1316
|
+
"""List Documents
|
|
1317
|
+
|
|
1318
|
+
Returns a paginated list of documents for the authenticated account.
|
|
1319
|
+
|
|
1320
|
+
:param page:
|
|
1321
|
+
:type page: int
|
|
1322
|
+
:param limit:
|
|
1323
|
+
:type limit: int
|
|
1324
|
+
:param query: Raw API filter query. Use AND between filters, for example: \"name:Classic AND status:completed\".
|
|
1325
|
+
:type query: str
|
|
1326
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1327
|
+
number provided, it will be total request
|
|
1328
|
+
timeout. It can also be a pair (tuple) of
|
|
1329
|
+
(connection, read) timeouts.
|
|
1330
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1331
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1332
|
+
request; this effectively ignores the
|
|
1333
|
+
authentication in the spec for a single request.
|
|
1334
|
+
:type _request_auth: dict, optional
|
|
1335
|
+
:param _content_type: force content-type for the request.
|
|
1336
|
+
:type _content_type: str, Optional
|
|
1337
|
+
:param _headers: set to override the headers for a single
|
|
1338
|
+
request; this effectively ignores the headers
|
|
1339
|
+
in the spec for a single request.
|
|
1340
|
+
:type _headers: dict, optional
|
|
1341
|
+
:param _host_index: set to override the host_index for a single
|
|
1342
|
+
request; this effectively ignores the host_index
|
|
1343
|
+
in the spec for a single request.
|
|
1344
|
+
:type _host_index: int, optional
|
|
1345
|
+
:return: Returns the result object.
|
|
1346
|
+
""" # noqa: E501
|
|
1347
|
+
|
|
1348
|
+
_param = self._list_documents_serialize(
|
|
1349
|
+
page=page,
|
|
1350
|
+
limit=limit,
|
|
1351
|
+
query=query,
|
|
1352
|
+
_request_auth=_request_auth,
|
|
1353
|
+
_content_type=_content_type,
|
|
1354
|
+
_headers=_headers,
|
|
1355
|
+
_host_index=_host_index,
|
|
1356
|
+
)
|
|
1357
|
+
|
|
1358
|
+
_response_types_map: Dict[str, str | None] = {
|
|
1359
|
+
"200": "DocumentListResponse",
|
|
1360
|
+
"401": "ErrorResponse",
|
|
1361
|
+
"429": "RateLimitErrorResponse",
|
|
1362
|
+
}
|
|
1363
|
+
|
|
1364
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
1365
|
+
response_data.read()
|
|
1366
|
+
return self.api_client.response_deserialize(
|
|
1367
|
+
response_data=response_data,
|
|
1368
|
+
response_types_map=_response_types_map,
|
|
1369
|
+
).data
|
|
1370
|
+
|
|
1371
|
+
@validate_call
|
|
1372
|
+
def list_documents_with_http_info(
|
|
1373
|
+
self,
|
|
1374
|
+
page: Annotated[int, Field(strict=True, ge=1)] | None = None,
|
|
1375
|
+
limit: Annotated[int, Field(le=50, strict=True, ge=1)] | None = None,
|
|
1376
|
+
query: Annotated[
|
|
1377
|
+
Annotated[str, Field(min_length=1, strict=True)] | None,
|
|
1378
|
+
Field(
|
|
1379
|
+
description='Raw API filter query. Use AND between filters, for example: "name:Classic AND status:completed".'
|
|
1380
|
+
),
|
|
1381
|
+
] = None,
|
|
1382
|
+
_request_timeout: Union[
|
|
1383
|
+
None,
|
|
1384
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1385
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
1386
|
+
] = None,
|
|
1387
|
+
_request_auth: Dict[StrictStr, Any] | None = None,
|
|
1388
|
+
_content_type: StrictStr | None = None,
|
|
1389
|
+
_headers: Dict[StrictStr, Any] | None = None,
|
|
1390
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1391
|
+
) -> ApiResponse[DocumentListResponse]:
|
|
1392
|
+
"""List Documents
|
|
1393
|
+
|
|
1394
|
+
Returns a paginated list of documents for the authenticated account.
|
|
1395
|
+
|
|
1396
|
+
:param page:
|
|
1397
|
+
:type page: int
|
|
1398
|
+
:param limit:
|
|
1399
|
+
:type limit: int
|
|
1400
|
+
:param query: Raw API filter query. Use AND between filters, for example: \"name:Classic AND status:completed\".
|
|
1401
|
+
:type query: str
|
|
1402
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1403
|
+
number provided, it will be total request
|
|
1404
|
+
timeout. It can also be a pair (tuple) of
|
|
1405
|
+
(connection, read) timeouts.
|
|
1406
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1407
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1408
|
+
request; this effectively ignores the
|
|
1409
|
+
authentication in the spec for a single request.
|
|
1410
|
+
:type _request_auth: dict, optional
|
|
1411
|
+
:param _content_type: force content-type for the request.
|
|
1412
|
+
:type _content_type: str, Optional
|
|
1413
|
+
:param _headers: set to override the headers for a single
|
|
1414
|
+
request; this effectively ignores the headers
|
|
1415
|
+
in the spec for a single request.
|
|
1416
|
+
:type _headers: dict, optional
|
|
1417
|
+
:param _host_index: set to override the host_index for a single
|
|
1418
|
+
request; this effectively ignores the host_index
|
|
1419
|
+
in the spec for a single request.
|
|
1420
|
+
:type _host_index: int, optional
|
|
1421
|
+
:return: Returns the result object.
|
|
1422
|
+
""" # noqa: E501
|
|
1423
|
+
|
|
1424
|
+
_param = self._list_documents_serialize(
|
|
1425
|
+
page=page,
|
|
1426
|
+
limit=limit,
|
|
1427
|
+
query=query,
|
|
1428
|
+
_request_auth=_request_auth,
|
|
1429
|
+
_content_type=_content_type,
|
|
1430
|
+
_headers=_headers,
|
|
1431
|
+
_host_index=_host_index,
|
|
1432
|
+
)
|
|
1433
|
+
|
|
1434
|
+
_response_types_map: Dict[str, str | None] = {
|
|
1435
|
+
"200": "DocumentListResponse",
|
|
1436
|
+
"401": "ErrorResponse",
|
|
1437
|
+
"429": "RateLimitErrorResponse",
|
|
1438
|
+
}
|
|
1439
|
+
|
|
1440
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
1441
|
+
response_data.read()
|
|
1442
|
+
return self.api_client.response_deserialize(
|
|
1443
|
+
response_data=response_data,
|
|
1444
|
+
response_types_map=_response_types_map,
|
|
1445
|
+
)
|
|
1446
|
+
|
|
1447
|
+
@validate_call
|
|
1448
|
+
def list_documents_without_preload_content(
|
|
1449
|
+
self,
|
|
1450
|
+
page: Annotated[int, Field(strict=True, ge=1)] | None = None,
|
|
1451
|
+
limit: Annotated[int, Field(le=50, strict=True, ge=1)] | None = None,
|
|
1452
|
+
query: Annotated[
|
|
1453
|
+
Annotated[str, Field(min_length=1, strict=True)] | None,
|
|
1454
|
+
Field(
|
|
1455
|
+
description='Raw API filter query. Use AND between filters, for example: "name:Classic AND status:completed".'
|
|
1456
|
+
),
|
|
1457
|
+
] = None,
|
|
1458
|
+
_request_timeout: Union[
|
|
1459
|
+
None,
|
|
1460
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1461
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
1462
|
+
] = None,
|
|
1463
|
+
_request_auth: Dict[StrictStr, Any] | None = None,
|
|
1464
|
+
_content_type: StrictStr | None = None,
|
|
1465
|
+
_headers: Dict[StrictStr, Any] | None = None,
|
|
1466
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1467
|
+
) -> RESTResponseType:
|
|
1468
|
+
"""List Documents
|
|
1469
|
+
|
|
1470
|
+
Returns a paginated list of documents for the authenticated account.
|
|
1471
|
+
|
|
1472
|
+
:param page:
|
|
1473
|
+
:type page: int
|
|
1474
|
+
:param limit:
|
|
1475
|
+
:type limit: int
|
|
1476
|
+
:param query: Raw API filter query. Use AND between filters, for example: \"name:Classic AND status:completed\".
|
|
1477
|
+
:type query: str
|
|
1478
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1479
|
+
number provided, it will be total request
|
|
1480
|
+
timeout. It can also be a pair (tuple) of
|
|
1481
|
+
(connection, read) timeouts.
|
|
1482
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1483
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1484
|
+
request; this effectively ignores the
|
|
1485
|
+
authentication in the spec for a single request.
|
|
1486
|
+
:type _request_auth: dict, optional
|
|
1487
|
+
:param _content_type: force content-type for the request.
|
|
1488
|
+
:type _content_type: str, Optional
|
|
1489
|
+
:param _headers: set to override the headers for a single
|
|
1490
|
+
request; this effectively ignores the headers
|
|
1491
|
+
in the spec for a single request.
|
|
1492
|
+
:type _headers: dict, optional
|
|
1493
|
+
:param _host_index: set to override the host_index for a single
|
|
1494
|
+
request; this effectively ignores the host_index
|
|
1495
|
+
in the spec for a single request.
|
|
1496
|
+
:type _host_index: int, optional
|
|
1497
|
+
:return: Returns the result object.
|
|
1498
|
+
""" # noqa: E501
|
|
1499
|
+
|
|
1500
|
+
_param = self._list_documents_serialize(
|
|
1501
|
+
page=page,
|
|
1502
|
+
limit=limit,
|
|
1503
|
+
query=query,
|
|
1504
|
+
_request_auth=_request_auth,
|
|
1505
|
+
_content_type=_content_type,
|
|
1506
|
+
_headers=_headers,
|
|
1507
|
+
_host_index=_host_index,
|
|
1508
|
+
)
|
|
1509
|
+
|
|
1510
|
+
_response_types_map: Dict[str, str | None] = {
|
|
1511
|
+
"200": "DocumentListResponse",
|
|
1512
|
+
"401": "ErrorResponse",
|
|
1513
|
+
"429": "RateLimitErrorResponse",
|
|
1514
|
+
}
|
|
1515
|
+
|
|
1516
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
1517
|
+
return response_data.response
|
|
1518
|
+
|
|
1519
|
+
def _list_documents_serialize(
|
|
1520
|
+
self,
|
|
1521
|
+
page,
|
|
1522
|
+
limit,
|
|
1523
|
+
query,
|
|
1524
|
+
_request_auth,
|
|
1525
|
+
_content_type,
|
|
1526
|
+
_headers,
|
|
1527
|
+
_host_index,
|
|
1528
|
+
) -> RequestSerialized:
|
|
1529
|
+
|
|
1530
|
+
_host = None
|
|
1531
|
+
|
|
1532
|
+
_collection_formats: Dict[str, str] = {}
|
|
1533
|
+
|
|
1534
|
+
_path_params: Dict[str, str] = {}
|
|
1535
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1536
|
+
_header_params: Dict[str, str | None] = _headers or {}
|
|
1537
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1538
|
+
_files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {}
|
|
1539
|
+
_body_params: bytes | None = None
|
|
1540
|
+
|
|
1541
|
+
# process the path parameters
|
|
1542
|
+
# process the query parameters
|
|
1543
|
+
if page is not None:
|
|
1544
|
+
_query_params.append(("page", page))
|
|
1545
|
+
|
|
1546
|
+
if limit is not None:
|
|
1547
|
+
_query_params.append(("limit", limit))
|
|
1548
|
+
|
|
1549
|
+
if query is not None:
|
|
1550
|
+
_query_params.append(("query", query))
|
|
1551
|
+
|
|
1552
|
+
# process the header parameters
|
|
1553
|
+
# process the form parameters
|
|
1554
|
+
# process the body parameter
|
|
1555
|
+
|
|
1556
|
+
# set the HTTP header `Accept`
|
|
1557
|
+
if "Accept" not in _header_params:
|
|
1558
|
+
_header_params["Accept"] = self.api_client.select_header_accept(["application/json"])
|
|
1559
|
+
|
|
1560
|
+
# authentication setting
|
|
1561
|
+
_auth_settings: List[str] = ["api_key"]
|
|
1562
|
+
|
|
1563
|
+
return self.api_client.param_serialize(
|
|
1564
|
+
method="GET",
|
|
1565
|
+
resource_path="/api/v1/documents",
|
|
1566
|
+
path_params=_path_params,
|
|
1567
|
+
query_params=_query_params,
|
|
1568
|
+
header_params=_header_params,
|
|
1569
|
+
body=_body_params,
|
|
1570
|
+
post_params=_form_params,
|
|
1571
|
+
files=_files,
|
|
1572
|
+
auth_settings=_auth_settings,
|
|
1573
|
+
collection_formats=_collection_formats,
|
|
1574
|
+
_host=_host,
|
|
1575
|
+
_request_auth=_request_auth,
|
|
1576
|
+
)
|
|
1577
|
+
|
|
1578
|
+
@validate_call
|
|
1579
|
+
def send_document(
|
|
1580
|
+
self,
|
|
1581
|
+
id: Annotated[str, Field(min_length=1, strict=True)],
|
|
1582
|
+
update_document_and_send_request: UpdateDocumentAndSendRequest,
|
|
1583
|
+
_request_timeout: Union[
|
|
1584
|
+
None,
|
|
1585
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1586
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
1587
|
+
] = None,
|
|
1588
|
+
_request_auth: Dict[StrictStr, Any] | None = None,
|
|
1589
|
+
_content_type: StrictStr | None = None,
|
|
1590
|
+
_headers: Dict[StrictStr, Any] | None = None,
|
|
1591
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1592
|
+
) -> DocumentResponse:
|
|
1593
|
+
"""Update and Send Document
|
|
1594
|
+
|
|
1595
|
+
Updates a draft document and sends it to be signed by recipients.
|
|
1596
|
+
|
|
1597
|
+
:param id: (required)
|
|
1598
|
+
:type id: str
|
|
1599
|
+
:param update_document_and_send_request: (required)
|
|
1600
|
+
:type update_document_and_send_request: UpdateDocumentAndSendRequest
|
|
1601
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1602
|
+
number provided, it will be total request
|
|
1603
|
+
timeout. It can also be a pair (tuple) of
|
|
1604
|
+
(connection, read) timeouts.
|
|
1605
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1606
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1607
|
+
request; this effectively ignores the
|
|
1608
|
+
authentication in the spec for a single request.
|
|
1609
|
+
:type _request_auth: dict, optional
|
|
1610
|
+
:param _content_type: force content-type for the request.
|
|
1611
|
+
:type _content_type: str, Optional
|
|
1612
|
+
:param _headers: set to override the headers for a single
|
|
1613
|
+
request; this effectively ignores the headers
|
|
1614
|
+
in the spec for a single request.
|
|
1615
|
+
:type _headers: dict, optional
|
|
1616
|
+
:param _host_index: set to override the host_index for a single
|
|
1617
|
+
request; this effectively ignores the host_index
|
|
1618
|
+
in the spec for a single request.
|
|
1619
|
+
:type _host_index: int, optional
|
|
1620
|
+
:return: Returns the result object.
|
|
1621
|
+
""" # noqa: E501
|
|
1622
|
+
|
|
1623
|
+
_param = self._send_document_serialize(
|
|
1624
|
+
id=id,
|
|
1625
|
+
update_document_and_send_request=update_document_and_send_request,
|
|
1626
|
+
_request_auth=_request_auth,
|
|
1627
|
+
_content_type=_content_type,
|
|
1628
|
+
_headers=_headers,
|
|
1629
|
+
_host_index=_host_index,
|
|
1630
|
+
)
|
|
1631
|
+
|
|
1632
|
+
_response_types_map: Dict[str, str | None] = {
|
|
1633
|
+
"201": "DocumentResponse",
|
|
1634
|
+
"422": "ValidationErrorResponse",
|
|
1635
|
+
"429": "RateLimitErrorResponse",
|
|
1636
|
+
}
|
|
1637
|
+
|
|
1638
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
1639
|
+
response_data.read()
|
|
1640
|
+
return self.api_client.response_deserialize(
|
|
1641
|
+
response_data=response_data,
|
|
1642
|
+
response_types_map=_response_types_map,
|
|
1643
|
+
).data
|
|
1644
|
+
|
|
1645
|
+
@validate_call
|
|
1646
|
+
def send_document_with_http_info(
|
|
1647
|
+
self,
|
|
1648
|
+
id: Annotated[str, Field(min_length=1, strict=True)],
|
|
1649
|
+
update_document_and_send_request: UpdateDocumentAndSendRequest,
|
|
1650
|
+
_request_timeout: Union[
|
|
1651
|
+
None,
|
|
1652
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1653
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
1654
|
+
] = None,
|
|
1655
|
+
_request_auth: Dict[StrictStr, Any] | None = None,
|
|
1656
|
+
_content_type: StrictStr | None = None,
|
|
1657
|
+
_headers: Dict[StrictStr, Any] | None = None,
|
|
1658
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1659
|
+
) -> ApiResponse[DocumentResponse]:
|
|
1660
|
+
"""Update and Send Document
|
|
1661
|
+
|
|
1662
|
+
Updates a draft document and sends it to be signed by recipients.
|
|
1663
|
+
|
|
1664
|
+
:param id: (required)
|
|
1665
|
+
:type id: str
|
|
1666
|
+
:param update_document_and_send_request: (required)
|
|
1667
|
+
:type update_document_and_send_request: UpdateDocumentAndSendRequest
|
|
1668
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1669
|
+
number provided, it will be total request
|
|
1670
|
+
timeout. It can also be a pair (tuple) of
|
|
1671
|
+
(connection, read) timeouts.
|
|
1672
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1673
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1674
|
+
request; this effectively ignores the
|
|
1675
|
+
authentication in the spec for a single request.
|
|
1676
|
+
:type _request_auth: dict, optional
|
|
1677
|
+
:param _content_type: force content-type for the request.
|
|
1678
|
+
:type _content_type: str, Optional
|
|
1679
|
+
:param _headers: set to override the headers for a single
|
|
1680
|
+
request; this effectively ignores the headers
|
|
1681
|
+
in the spec for a single request.
|
|
1682
|
+
:type _headers: dict, optional
|
|
1683
|
+
:param _host_index: set to override the host_index for a single
|
|
1684
|
+
request; this effectively ignores the host_index
|
|
1685
|
+
in the spec for a single request.
|
|
1686
|
+
:type _host_index: int, optional
|
|
1687
|
+
:return: Returns the result object.
|
|
1688
|
+
""" # noqa: E501
|
|
1689
|
+
|
|
1690
|
+
_param = self._send_document_serialize(
|
|
1691
|
+
id=id,
|
|
1692
|
+
update_document_and_send_request=update_document_and_send_request,
|
|
1693
|
+
_request_auth=_request_auth,
|
|
1694
|
+
_content_type=_content_type,
|
|
1695
|
+
_headers=_headers,
|
|
1696
|
+
_host_index=_host_index,
|
|
1697
|
+
)
|
|
1698
|
+
|
|
1699
|
+
_response_types_map: Dict[str, str | None] = {
|
|
1700
|
+
"201": "DocumentResponse",
|
|
1701
|
+
"422": "ValidationErrorResponse",
|
|
1702
|
+
"429": "RateLimitErrorResponse",
|
|
1703
|
+
}
|
|
1704
|
+
|
|
1705
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
1706
|
+
response_data.read()
|
|
1707
|
+
return self.api_client.response_deserialize(
|
|
1708
|
+
response_data=response_data,
|
|
1709
|
+
response_types_map=_response_types_map,
|
|
1710
|
+
)
|
|
1711
|
+
|
|
1712
|
+
@validate_call
|
|
1713
|
+
def send_document_without_preload_content(
|
|
1714
|
+
self,
|
|
1715
|
+
id: Annotated[str, Field(min_length=1, strict=True)],
|
|
1716
|
+
update_document_and_send_request: UpdateDocumentAndSendRequest,
|
|
1717
|
+
_request_timeout: Union[
|
|
1718
|
+
None,
|
|
1719
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1720
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
1721
|
+
] = None,
|
|
1722
|
+
_request_auth: Dict[StrictStr, Any] | None = None,
|
|
1723
|
+
_content_type: StrictStr | None = None,
|
|
1724
|
+
_headers: Dict[StrictStr, Any] | None = None,
|
|
1725
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1726
|
+
) -> RESTResponseType:
|
|
1727
|
+
"""Update and Send Document
|
|
1728
|
+
|
|
1729
|
+
Updates a draft document and sends it to be signed by recipients.
|
|
1730
|
+
|
|
1731
|
+
:param id: (required)
|
|
1732
|
+
:type id: str
|
|
1733
|
+
:param update_document_and_send_request: (required)
|
|
1734
|
+
:type update_document_and_send_request: UpdateDocumentAndSendRequest
|
|
1735
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1736
|
+
number provided, it will be total request
|
|
1737
|
+
timeout. It can also be a pair (tuple) of
|
|
1738
|
+
(connection, read) timeouts.
|
|
1739
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1740
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1741
|
+
request; this effectively ignores the
|
|
1742
|
+
authentication in the spec for a single request.
|
|
1743
|
+
:type _request_auth: dict, optional
|
|
1744
|
+
:param _content_type: force content-type for the request.
|
|
1745
|
+
:type _content_type: str, Optional
|
|
1746
|
+
:param _headers: set to override the headers for a single
|
|
1747
|
+
request; this effectively ignores the headers
|
|
1748
|
+
in the spec for a single request.
|
|
1749
|
+
:type _headers: dict, optional
|
|
1750
|
+
:param _host_index: set to override the host_index for a single
|
|
1751
|
+
request; this effectively ignores the host_index
|
|
1752
|
+
in the spec for a single request.
|
|
1753
|
+
:type _host_index: int, optional
|
|
1754
|
+
:return: Returns the result object.
|
|
1755
|
+
""" # noqa: E501
|
|
1756
|
+
|
|
1757
|
+
_param = self._send_document_serialize(
|
|
1758
|
+
id=id,
|
|
1759
|
+
update_document_and_send_request=update_document_and_send_request,
|
|
1760
|
+
_request_auth=_request_auth,
|
|
1761
|
+
_content_type=_content_type,
|
|
1762
|
+
_headers=_headers,
|
|
1763
|
+
_host_index=_host_index,
|
|
1764
|
+
)
|
|
1765
|
+
|
|
1766
|
+
_response_types_map: Dict[str, str | None] = {
|
|
1767
|
+
"201": "DocumentResponse",
|
|
1768
|
+
"422": "ValidationErrorResponse",
|
|
1769
|
+
"429": "RateLimitErrorResponse",
|
|
1770
|
+
}
|
|
1771
|
+
|
|
1772
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
1773
|
+
return response_data.response
|
|
1774
|
+
|
|
1775
|
+
def _send_document_serialize(
|
|
1776
|
+
self,
|
|
1777
|
+
id,
|
|
1778
|
+
update_document_and_send_request,
|
|
1779
|
+
_request_auth,
|
|
1780
|
+
_content_type,
|
|
1781
|
+
_headers,
|
|
1782
|
+
_host_index,
|
|
1783
|
+
) -> RequestSerialized:
|
|
1784
|
+
|
|
1785
|
+
_host = None
|
|
1786
|
+
|
|
1787
|
+
_collection_formats: Dict[str, str] = {}
|
|
1788
|
+
|
|
1789
|
+
_path_params: Dict[str, str] = {}
|
|
1790
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1791
|
+
_header_params: Dict[str, str | None] = _headers or {}
|
|
1792
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1793
|
+
_files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {}
|
|
1794
|
+
_body_params: bytes | None = None
|
|
1795
|
+
|
|
1796
|
+
# process the path parameters
|
|
1797
|
+
if id is not None:
|
|
1798
|
+
_path_params["id"] = id
|
|
1799
|
+
# process the query parameters
|
|
1800
|
+
# process the header parameters
|
|
1801
|
+
# process the form parameters
|
|
1802
|
+
# process the body parameter
|
|
1803
|
+
if update_document_and_send_request is not None:
|
|
1804
|
+
_body_params = update_document_and_send_request
|
|
1805
|
+
|
|
1806
|
+
# set the HTTP header `Accept`
|
|
1807
|
+
if "Accept" not in _header_params:
|
|
1808
|
+
_header_params["Accept"] = self.api_client.select_header_accept(["application/json"])
|
|
1809
|
+
|
|
1810
|
+
# set the HTTP header `Content-Type`
|
|
1811
|
+
if _content_type:
|
|
1812
|
+
_header_params["Content-Type"] = _content_type
|
|
1813
|
+
else:
|
|
1814
|
+
_default_content_type = self.api_client.select_header_content_type(["application/json"])
|
|
1815
|
+
if _default_content_type is not None:
|
|
1816
|
+
_header_params["Content-Type"] = _default_content_type
|
|
1817
|
+
|
|
1818
|
+
# authentication setting
|
|
1819
|
+
_auth_settings: List[str] = ["api_key"]
|
|
1820
|
+
|
|
1821
|
+
return self.api_client.param_serialize(
|
|
1822
|
+
method="POST",
|
|
1823
|
+
resource_path="/api/v1/documents/{id}/send",
|
|
1824
|
+
path_params=_path_params,
|
|
1825
|
+
query_params=_query_params,
|
|
1826
|
+
header_params=_header_params,
|
|
1827
|
+
body=_body_params,
|
|
1828
|
+
post_params=_form_params,
|
|
1829
|
+
files=_files,
|
|
1830
|
+
auth_settings=_auth_settings,
|
|
1831
|
+
collection_formats=_collection_formats,
|
|
1832
|
+
_host=_host,
|
|
1833
|
+
_request_auth=_request_auth,
|
|
1834
|
+
)
|
|
1835
|
+
|
|
1836
|
+
@validate_call
|
|
1837
|
+
def send_reminder(
|
|
1838
|
+
self,
|
|
1839
|
+
id: Annotated[str, Field(min_length=1, strict=True)],
|
|
1840
|
+
send_reminder_request: SendReminderRequest,
|
|
1841
|
+
_request_timeout: Union[
|
|
1842
|
+
None,
|
|
1843
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1844
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
1845
|
+
] = None,
|
|
1846
|
+
_request_auth: Dict[StrictStr, Any] | None = None,
|
|
1847
|
+
_content_type: StrictStr | None = None,
|
|
1848
|
+
_headers: Dict[StrictStr, Any] | None = None,
|
|
1849
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1850
|
+
) -> None:
|
|
1851
|
+
"""Send Reminder
|
|
1852
|
+
|
|
1853
|
+
Sends a reminder email to recipients that have not signed yet.
|
|
1854
|
+
|
|
1855
|
+
:param id: (required)
|
|
1856
|
+
:type id: str
|
|
1857
|
+
:param send_reminder_request: (required)
|
|
1858
|
+
:type send_reminder_request: SendReminderRequest
|
|
1859
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1860
|
+
number provided, it will be total request
|
|
1861
|
+
timeout. It can also be a pair (tuple) of
|
|
1862
|
+
(connection, read) timeouts.
|
|
1863
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1864
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1865
|
+
request; this effectively ignores the
|
|
1866
|
+
authentication in the spec for a single request.
|
|
1867
|
+
:type _request_auth: dict, optional
|
|
1868
|
+
:param _content_type: force content-type for the request.
|
|
1869
|
+
:type _content_type: str, Optional
|
|
1870
|
+
:param _headers: set to override the headers for a single
|
|
1871
|
+
request; this effectively ignores the headers
|
|
1872
|
+
in the spec for a single request.
|
|
1873
|
+
:type _headers: dict, optional
|
|
1874
|
+
:param _host_index: set to override the host_index for a single
|
|
1875
|
+
request; this effectively ignores the host_index
|
|
1876
|
+
in the spec for a single request.
|
|
1877
|
+
:type _host_index: int, optional
|
|
1878
|
+
:return: Returns the result object.
|
|
1879
|
+
""" # noqa: E501
|
|
1880
|
+
|
|
1881
|
+
_param = self._send_reminder_serialize(
|
|
1882
|
+
id=id,
|
|
1883
|
+
send_reminder_request=send_reminder_request,
|
|
1884
|
+
_request_auth=_request_auth,
|
|
1885
|
+
_content_type=_content_type,
|
|
1886
|
+
_headers=_headers,
|
|
1887
|
+
_host_index=_host_index,
|
|
1888
|
+
)
|
|
1889
|
+
|
|
1890
|
+
_response_types_map: Dict[str, str | None] = {
|
|
1891
|
+
"201": None,
|
|
1892
|
+
"422": "ValidationErrorResponse",
|
|
1893
|
+
"404": "ErrorResponse",
|
|
1894
|
+
"429": "RateLimitErrorResponse",
|
|
1895
|
+
}
|
|
1896
|
+
|
|
1897
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
1898
|
+
response_data.read()
|
|
1899
|
+
return self.api_client.response_deserialize(
|
|
1900
|
+
response_data=response_data,
|
|
1901
|
+
response_types_map=_response_types_map,
|
|
1902
|
+
).data
|
|
1903
|
+
|
|
1904
|
+
@validate_call
|
|
1905
|
+
def send_reminder_with_http_info(
|
|
1906
|
+
self,
|
|
1907
|
+
id: Annotated[str, Field(min_length=1, strict=True)],
|
|
1908
|
+
send_reminder_request: SendReminderRequest,
|
|
1909
|
+
_request_timeout: Union[
|
|
1910
|
+
None,
|
|
1911
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1912
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
1913
|
+
] = None,
|
|
1914
|
+
_request_auth: Dict[StrictStr, Any] | None = None,
|
|
1915
|
+
_content_type: StrictStr | None = None,
|
|
1916
|
+
_headers: Dict[StrictStr, Any] | None = None,
|
|
1917
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1918
|
+
) -> ApiResponse[None]:
|
|
1919
|
+
"""Send Reminder
|
|
1920
|
+
|
|
1921
|
+
Sends a reminder email to recipients that have not signed yet.
|
|
1922
|
+
|
|
1923
|
+
:param id: (required)
|
|
1924
|
+
:type id: str
|
|
1925
|
+
:param send_reminder_request: (required)
|
|
1926
|
+
:type send_reminder_request: SendReminderRequest
|
|
1927
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1928
|
+
number provided, it will be total request
|
|
1929
|
+
timeout. It can also be a pair (tuple) of
|
|
1930
|
+
(connection, read) timeouts.
|
|
1931
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1932
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1933
|
+
request; this effectively ignores the
|
|
1934
|
+
authentication in the spec for a single request.
|
|
1935
|
+
:type _request_auth: dict, optional
|
|
1936
|
+
:param _content_type: force content-type for the request.
|
|
1937
|
+
:type _content_type: str, Optional
|
|
1938
|
+
:param _headers: set to override the headers for a single
|
|
1939
|
+
request; this effectively ignores the headers
|
|
1940
|
+
in the spec for a single request.
|
|
1941
|
+
:type _headers: dict, optional
|
|
1942
|
+
:param _host_index: set to override the host_index for a single
|
|
1943
|
+
request; this effectively ignores the host_index
|
|
1944
|
+
in the spec for a single request.
|
|
1945
|
+
:type _host_index: int, optional
|
|
1946
|
+
:return: Returns the result object.
|
|
1947
|
+
""" # noqa: E501
|
|
1948
|
+
|
|
1949
|
+
_param = self._send_reminder_serialize(
|
|
1950
|
+
id=id,
|
|
1951
|
+
send_reminder_request=send_reminder_request,
|
|
1952
|
+
_request_auth=_request_auth,
|
|
1953
|
+
_content_type=_content_type,
|
|
1954
|
+
_headers=_headers,
|
|
1955
|
+
_host_index=_host_index,
|
|
1956
|
+
)
|
|
1957
|
+
|
|
1958
|
+
_response_types_map: Dict[str, str | None] = {
|
|
1959
|
+
"201": None,
|
|
1960
|
+
"422": "ValidationErrorResponse",
|
|
1961
|
+
"404": "ErrorResponse",
|
|
1962
|
+
"429": "RateLimitErrorResponse",
|
|
1963
|
+
}
|
|
1964
|
+
|
|
1965
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
1966
|
+
response_data.read()
|
|
1967
|
+
return self.api_client.response_deserialize(
|
|
1968
|
+
response_data=response_data,
|
|
1969
|
+
response_types_map=_response_types_map,
|
|
1970
|
+
)
|
|
1971
|
+
|
|
1972
|
+
@validate_call
|
|
1973
|
+
def send_reminder_without_preload_content(
|
|
1974
|
+
self,
|
|
1975
|
+
id: Annotated[str, Field(min_length=1, strict=True)],
|
|
1976
|
+
send_reminder_request: SendReminderRequest,
|
|
1977
|
+
_request_timeout: Union[
|
|
1978
|
+
None,
|
|
1979
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1980
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
1981
|
+
] = None,
|
|
1982
|
+
_request_auth: Dict[StrictStr, Any] | None = None,
|
|
1983
|
+
_content_type: StrictStr | None = None,
|
|
1984
|
+
_headers: Dict[StrictStr, Any] | None = None,
|
|
1985
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1986
|
+
) -> RESTResponseType:
|
|
1987
|
+
"""Send Reminder
|
|
1988
|
+
|
|
1989
|
+
Sends a reminder email to recipients that have not signed yet.
|
|
1990
|
+
|
|
1991
|
+
:param id: (required)
|
|
1992
|
+
:type id: str
|
|
1993
|
+
:param send_reminder_request: (required)
|
|
1994
|
+
:type send_reminder_request: SendReminderRequest
|
|
1995
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1996
|
+
number provided, it will be total request
|
|
1997
|
+
timeout. It can also be a pair (tuple) of
|
|
1998
|
+
(connection, read) timeouts.
|
|
1999
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2000
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2001
|
+
request; this effectively ignores the
|
|
2002
|
+
authentication in the spec for a single request.
|
|
2003
|
+
:type _request_auth: dict, optional
|
|
2004
|
+
:param _content_type: force content-type for the request.
|
|
2005
|
+
:type _content_type: str, Optional
|
|
2006
|
+
:param _headers: set to override the headers for a single
|
|
2007
|
+
request; this effectively ignores the headers
|
|
2008
|
+
in the spec for a single request.
|
|
2009
|
+
:type _headers: dict, optional
|
|
2010
|
+
:param _host_index: set to override the host_index for a single
|
|
2011
|
+
request; this effectively ignores the host_index
|
|
2012
|
+
in the spec for a single request.
|
|
2013
|
+
:type _host_index: int, optional
|
|
2014
|
+
:return: Returns the result object.
|
|
2015
|
+
""" # noqa: E501
|
|
2016
|
+
|
|
2017
|
+
_param = self._send_reminder_serialize(
|
|
2018
|
+
id=id,
|
|
2019
|
+
send_reminder_request=send_reminder_request,
|
|
2020
|
+
_request_auth=_request_auth,
|
|
2021
|
+
_content_type=_content_type,
|
|
2022
|
+
_headers=_headers,
|
|
2023
|
+
_host_index=_host_index,
|
|
2024
|
+
)
|
|
2025
|
+
|
|
2026
|
+
_response_types_map: Dict[str, str | None] = {
|
|
2027
|
+
"201": None,
|
|
2028
|
+
"422": "ValidationErrorResponse",
|
|
2029
|
+
"404": "ErrorResponse",
|
|
2030
|
+
"429": "RateLimitErrorResponse",
|
|
2031
|
+
}
|
|
2032
|
+
|
|
2033
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
2034
|
+
return response_data.response
|
|
2035
|
+
|
|
2036
|
+
def _send_reminder_serialize(
|
|
2037
|
+
self,
|
|
2038
|
+
id,
|
|
2039
|
+
send_reminder_request,
|
|
2040
|
+
_request_auth,
|
|
2041
|
+
_content_type,
|
|
2042
|
+
_headers,
|
|
2043
|
+
_host_index,
|
|
2044
|
+
) -> RequestSerialized:
|
|
2045
|
+
|
|
2046
|
+
_host = None
|
|
2047
|
+
|
|
2048
|
+
_collection_formats: Dict[str, str] = {}
|
|
2049
|
+
|
|
2050
|
+
_path_params: Dict[str, str] = {}
|
|
2051
|
+
_query_params: List[Tuple[str, str]] = []
|
|
2052
|
+
_header_params: Dict[str, str | None] = _headers or {}
|
|
2053
|
+
_form_params: List[Tuple[str, str]] = []
|
|
2054
|
+
_files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {}
|
|
2055
|
+
_body_params: bytes | None = None
|
|
2056
|
+
|
|
2057
|
+
# process the path parameters
|
|
2058
|
+
if id is not None:
|
|
2059
|
+
_path_params["id"] = id
|
|
2060
|
+
# process the query parameters
|
|
2061
|
+
# process the header parameters
|
|
2062
|
+
# process the form parameters
|
|
2063
|
+
# process the body parameter
|
|
2064
|
+
if send_reminder_request is not None:
|
|
2065
|
+
_body_params = send_reminder_request
|
|
2066
|
+
|
|
2067
|
+
# set the HTTP header `Accept`
|
|
2068
|
+
if "Accept" not in _header_params:
|
|
2069
|
+
_header_params["Accept"] = self.api_client.select_header_accept(["application/json"])
|
|
2070
|
+
|
|
2071
|
+
# set the HTTP header `Content-Type`
|
|
2072
|
+
if _content_type:
|
|
2073
|
+
_header_params["Content-Type"] = _content_type
|
|
2074
|
+
else:
|
|
2075
|
+
_default_content_type = self.api_client.select_header_content_type(["application/json"])
|
|
2076
|
+
if _default_content_type is not None:
|
|
2077
|
+
_header_params["Content-Type"] = _default_content_type
|
|
2078
|
+
|
|
2079
|
+
# authentication setting
|
|
2080
|
+
_auth_settings: List[str] = ["api_key"]
|
|
2081
|
+
|
|
2082
|
+
return self.api_client.param_serialize(
|
|
2083
|
+
method="POST",
|
|
2084
|
+
resource_path="/api/v1/documents/{id}/remind",
|
|
2085
|
+
path_params=_path_params,
|
|
2086
|
+
query_params=_query_params,
|
|
2087
|
+
header_params=_header_params,
|
|
2088
|
+
body=_body_params,
|
|
2089
|
+
post_params=_form_params,
|
|
2090
|
+
files=_files,
|
|
2091
|
+
auth_settings=_auth_settings,
|
|
2092
|
+
collection_formats=_collection_formats,
|
|
2093
|
+
_host=_host,
|
|
2094
|
+
_request_auth=_request_auth,
|
|
2095
|
+
)
|
|
2096
|
+
|
|
2097
|
+
@validate_call
|
|
2098
|
+
def update_recipients(
|
|
2099
|
+
self,
|
|
2100
|
+
id: Annotated[str, Field(min_length=1, strict=True)],
|
|
2101
|
+
update_recipients_request: UpdateRecipientsRequest,
|
|
2102
|
+
_request_timeout: Union[
|
|
2103
|
+
None,
|
|
2104
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2105
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
2106
|
+
] = None,
|
|
2107
|
+
_request_auth: Dict[StrictStr, Any] | None = None,
|
|
2108
|
+
_content_type: StrictStr | None = None,
|
|
2109
|
+
_headers: Dict[StrictStr, Any] | None = None,
|
|
2110
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2111
|
+
) -> DocumentResponse:
|
|
2112
|
+
"""Update Recipients
|
|
2113
|
+
|
|
2114
|
+
Updates one or more recipients on a document that has already been sent. Only recipients who have not started signing may be updated. Recipient IDs must be retrieved from the Get Document response. Allowed document statuses: sent, viewed, pending, bounced. For non-embedded documents, updated recipients will receive a new notification email. For embedded signing documents, email behavior follows each recipient's send_email setting.
|
|
2115
|
+
|
|
2116
|
+
:param id: (required)
|
|
2117
|
+
:type id: str
|
|
2118
|
+
:param update_recipients_request: (required)
|
|
2119
|
+
:type update_recipients_request: UpdateRecipientsRequest
|
|
2120
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2121
|
+
number provided, it will be total request
|
|
2122
|
+
timeout. It can also be a pair (tuple) of
|
|
2123
|
+
(connection, read) timeouts.
|
|
2124
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2125
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2126
|
+
request; this effectively ignores the
|
|
2127
|
+
authentication in the spec for a single request.
|
|
2128
|
+
:type _request_auth: dict, optional
|
|
2129
|
+
:param _content_type: force content-type for the request.
|
|
2130
|
+
:type _content_type: str, Optional
|
|
2131
|
+
:param _headers: set to override the headers for a single
|
|
2132
|
+
request; this effectively ignores the headers
|
|
2133
|
+
in the spec for a single request.
|
|
2134
|
+
:type _headers: dict, optional
|
|
2135
|
+
:param _host_index: set to override the host_index for a single
|
|
2136
|
+
request; this effectively ignores the host_index
|
|
2137
|
+
in the spec for a single request.
|
|
2138
|
+
:type _host_index: int, optional
|
|
2139
|
+
:return: Returns the result object.
|
|
2140
|
+
""" # noqa: E501
|
|
2141
|
+
|
|
2142
|
+
_param = self._update_recipients_serialize(
|
|
2143
|
+
id=id,
|
|
2144
|
+
update_recipients_request=update_recipients_request,
|
|
2145
|
+
_request_auth=_request_auth,
|
|
2146
|
+
_content_type=_content_type,
|
|
2147
|
+
_headers=_headers,
|
|
2148
|
+
_host_index=_host_index,
|
|
2149
|
+
)
|
|
2150
|
+
|
|
2151
|
+
_response_types_map: Dict[str, str | None] = {
|
|
2152
|
+
"200": "DocumentResponse",
|
|
2153
|
+
"409": None,
|
|
2154
|
+
"400": None,
|
|
2155
|
+
"422": None,
|
|
2156
|
+
"404": None,
|
|
2157
|
+
"429": "RateLimitErrorResponse",
|
|
2158
|
+
}
|
|
2159
|
+
|
|
2160
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
2161
|
+
response_data.read()
|
|
2162
|
+
return self.api_client.response_deserialize(
|
|
2163
|
+
response_data=response_data,
|
|
2164
|
+
response_types_map=_response_types_map,
|
|
2165
|
+
).data
|
|
2166
|
+
|
|
2167
|
+
@validate_call
|
|
2168
|
+
def update_recipients_with_http_info(
|
|
2169
|
+
self,
|
|
2170
|
+
id: Annotated[str, Field(min_length=1, strict=True)],
|
|
2171
|
+
update_recipients_request: UpdateRecipientsRequest,
|
|
2172
|
+
_request_timeout: Union[
|
|
2173
|
+
None,
|
|
2174
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2175
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
2176
|
+
] = None,
|
|
2177
|
+
_request_auth: Dict[StrictStr, Any] | None = None,
|
|
2178
|
+
_content_type: StrictStr | None = None,
|
|
2179
|
+
_headers: Dict[StrictStr, Any] | None = None,
|
|
2180
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2181
|
+
) -> ApiResponse[DocumentResponse]:
|
|
2182
|
+
"""Update Recipients
|
|
2183
|
+
|
|
2184
|
+
Updates one or more recipients on a document that has already been sent. Only recipients who have not started signing may be updated. Recipient IDs must be retrieved from the Get Document response. Allowed document statuses: sent, viewed, pending, bounced. For non-embedded documents, updated recipients will receive a new notification email. For embedded signing documents, email behavior follows each recipient's send_email setting.
|
|
2185
|
+
|
|
2186
|
+
:param id: (required)
|
|
2187
|
+
:type id: str
|
|
2188
|
+
:param update_recipients_request: (required)
|
|
2189
|
+
:type update_recipients_request: UpdateRecipientsRequest
|
|
2190
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2191
|
+
number provided, it will be total request
|
|
2192
|
+
timeout. It can also be a pair (tuple) of
|
|
2193
|
+
(connection, read) timeouts.
|
|
2194
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2195
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2196
|
+
request; this effectively ignores the
|
|
2197
|
+
authentication in the spec for a single request.
|
|
2198
|
+
:type _request_auth: dict, optional
|
|
2199
|
+
:param _content_type: force content-type for the request.
|
|
2200
|
+
:type _content_type: str, Optional
|
|
2201
|
+
:param _headers: set to override the headers for a single
|
|
2202
|
+
request; this effectively ignores the headers
|
|
2203
|
+
in the spec for a single request.
|
|
2204
|
+
:type _headers: dict, optional
|
|
2205
|
+
:param _host_index: set to override the host_index for a single
|
|
2206
|
+
request; this effectively ignores the host_index
|
|
2207
|
+
in the spec for a single request.
|
|
2208
|
+
:type _host_index: int, optional
|
|
2209
|
+
:return: Returns the result object.
|
|
2210
|
+
""" # noqa: E501
|
|
2211
|
+
|
|
2212
|
+
_param = self._update_recipients_serialize(
|
|
2213
|
+
id=id,
|
|
2214
|
+
update_recipients_request=update_recipients_request,
|
|
2215
|
+
_request_auth=_request_auth,
|
|
2216
|
+
_content_type=_content_type,
|
|
2217
|
+
_headers=_headers,
|
|
2218
|
+
_host_index=_host_index,
|
|
2219
|
+
)
|
|
2220
|
+
|
|
2221
|
+
_response_types_map: Dict[str, str | None] = {
|
|
2222
|
+
"200": "DocumentResponse",
|
|
2223
|
+
"409": None,
|
|
2224
|
+
"400": None,
|
|
2225
|
+
"422": None,
|
|
2226
|
+
"404": None,
|
|
2227
|
+
"429": "RateLimitErrorResponse",
|
|
2228
|
+
}
|
|
2229
|
+
|
|
2230
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
2231
|
+
response_data.read()
|
|
2232
|
+
return self.api_client.response_deserialize(
|
|
2233
|
+
response_data=response_data,
|
|
2234
|
+
response_types_map=_response_types_map,
|
|
2235
|
+
)
|
|
2236
|
+
|
|
2237
|
+
@validate_call
|
|
2238
|
+
def update_recipients_without_preload_content(
|
|
2239
|
+
self,
|
|
2240
|
+
id: Annotated[str, Field(min_length=1, strict=True)],
|
|
2241
|
+
update_recipients_request: UpdateRecipientsRequest,
|
|
2242
|
+
_request_timeout: Union[
|
|
2243
|
+
None,
|
|
2244
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2245
|
+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
|
|
2246
|
+
] = None,
|
|
2247
|
+
_request_auth: Dict[StrictStr, Any] | None = None,
|
|
2248
|
+
_content_type: StrictStr | None = None,
|
|
2249
|
+
_headers: Dict[StrictStr, Any] | None = None,
|
|
2250
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2251
|
+
) -> RESTResponseType:
|
|
2252
|
+
"""Update Recipients
|
|
2253
|
+
|
|
2254
|
+
Updates one or more recipients on a document that has already been sent. Only recipients who have not started signing may be updated. Recipient IDs must be retrieved from the Get Document response. Allowed document statuses: sent, viewed, pending, bounced. For non-embedded documents, updated recipients will receive a new notification email. For embedded signing documents, email behavior follows each recipient's send_email setting.
|
|
2255
|
+
|
|
2256
|
+
:param id: (required)
|
|
2257
|
+
:type id: str
|
|
2258
|
+
:param update_recipients_request: (required)
|
|
2259
|
+
:type update_recipients_request: UpdateRecipientsRequest
|
|
2260
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2261
|
+
number provided, it will be total request
|
|
2262
|
+
timeout. It can also be a pair (tuple) of
|
|
2263
|
+
(connection, read) timeouts.
|
|
2264
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2265
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2266
|
+
request; this effectively ignores the
|
|
2267
|
+
authentication in the spec for a single request.
|
|
2268
|
+
:type _request_auth: dict, optional
|
|
2269
|
+
:param _content_type: force content-type for the request.
|
|
2270
|
+
:type _content_type: str, Optional
|
|
2271
|
+
:param _headers: set to override the headers for a single
|
|
2272
|
+
request; this effectively ignores the headers
|
|
2273
|
+
in the spec for a single request.
|
|
2274
|
+
:type _headers: dict, optional
|
|
2275
|
+
:param _host_index: set to override the host_index for a single
|
|
2276
|
+
request; this effectively ignores the host_index
|
|
2277
|
+
in the spec for a single request.
|
|
2278
|
+
:type _host_index: int, optional
|
|
2279
|
+
:return: Returns the result object.
|
|
2280
|
+
""" # noqa: E501
|
|
2281
|
+
|
|
2282
|
+
_param = self._update_recipients_serialize(
|
|
2283
|
+
id=id,
|
|
2284
|
+
update_recipients_request=update_recipients_request,
|
|
2285
|
+
_request_auth=_request_auth,
|
|
2286
|
+
_content_type=_content_type,
|
|
2287
|
+
_headers=_headers,
|
|
2288
|
+
_host_index=_host_index,
|
|
2289
|
+
)
|
|
2290
|
+
|
|
2291
|
+
_response_types_map: Dict[str, str | None] = {
|
|
2292
|
+
"200": "DocumentResponse",
|
|
2293
|
+
"409": None,
|
|
2294
|
+
"400": None,
|
|
2295
|
+
"422": None,
|
|
2296
|
+
"404": None,
|
|
2297
|
+
"429": "RateLimitErrorResponse",
|
|
2298
|
+
}
|
|
2299
|
+
|
|
2300
|
+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
|
|
2301
|
+
return response_data.response
|
|
2302
|
+
|
|
2303
|
+
def _update_recipients_serialize(
|
|
2304
|
+
self,
|
|
2305
|
+
id,
|
|
2306
|
+
update_recipients_request,
|
|
2307
|
+
_request_auth,
|
|
2308
|
+
_content_type,
|
|
2309
|
+
_headers,
|
|
2310
|
+
_host_index,
|
|
2311
|
+
) -> RequestSerialized:
|
|
2312
|
+
|
|
2313
|
+
_host = None
|
|
2314
|
+
|
|
2315
|
+
_collection_formats: Dict[str, str] = {}
|
|
2316
|
+
|
|
2317
|
+
_path_params: Dict[str, str] = {}
|
|
2318
|
+
_query_params: List[Tuple[str, str]] = []
|
|
2319
|
+
_header_params: Dict[str, str | None] = _headers or {}
|
|
2320
|
+
_form_params: List[Tuple[str, str]] = []
|
|
2321
|
+
_files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {}
|
|
2322
|
+
_body_params: bytes | None = None
|
|
2323
|
+
|
|
2324
|
+
# process the path parameters
|
|
2325
|
+
if id is not None:
|
|
2326
|
+
_path_params["id"] = id
|
|
2327
|
+
# process the query parameters
|
|
2328
|
+
# process the header parameters
|
|
2329
|
+
# process the form parameters
|
|
2330
|
+
# process the body parameter
|
|
2331
|
+
if update_recipients_request is not None:
|
|
2332
|
+
_body_params = update_recipients_request
|
|
2333
|
+
|
|
2334
|
+
# set the HTTP header `Accept`
|
|
2335
|
+
if "Accept" not in _header_params:
|
|
2336
|
+
_header_params["Accept"] = self.api_client.select_header_accept(["application/json"])
|
|
2337
|
+
|
|
2338
|
+
# set the HTTP header `Content-Type`
|
|
2339
|
+
if _content_type:
|
|
2340
|
+
_header_params["Content-Type"] = _content_type
|
|
2341
|
+
else:
|
|
2342
|
+
_default_content_type = self.api_client.select_header_content_type(["application/json"])
|
|
2343
|
+
if _default_content_type is not None:
|
|
2344
|
+
_header_params["Content-Type"] = _default_content_type
|
|
2345
|
+
|
|
2346
|
+
# authentication setting
|
|
2347
|
+
_auth_settings: List[str] = ["api_key"]
|
|
2348
|
+
|
|
2349
|
+
return self.api_client.param_serialize(
|
|
2350
|
+
method="PATCH",
|
|
2351
|
+
resource_path="/api/v1/documents/{id}/recipients",
|
|
2352
|
+
path_params=_path_params,
|
|
2353
|
+
query_params=_query_params,
|
|
2354
|
+
header_params=_header_params,
|
|
2355
|
+
body=_body_params,
|
|
2356
|
+
post_params=_form_params,
|
|
2357
|
+
files=_files,
|
|
2358
|
+
auth_settings=_auth_settings,
|
|
2359
|
+
collection_formats=_collection_formats,
|
|
2360
|
+
_host=_host,
|
|
2361
|
+
_request_auth=_request_auth,
|
|
2362
|
+
)
|
|
2363
|
+
|
|
2364
|
+
def wait_for_completion(
|
|
2365
|
+
self,
|
|
2366
|
+
id: str,
|
|
2367
|
+
*,
|
|
2368
|
+
interval: float = 2.0,
|
|
2369
|
+
timeout: float = 120.0,
|
|
2370
|
+
max_attempts: int | None = None,
|
|
2371
|
+
terminal_statuses: tuple[str, ...] | None = None,
|
|
2372
|
+
**kwargs: Any,
|
|
2373
|
+
) -> DocumentResponse:
|
|
2374
|
+
terminal = terminal_statuses or (
|
|
2375
|
+
"Completed",
|
|
2376
|
+
"Manually completed",
|
|
2377
|
+
"Declined",
|
|
2378
|
+
"Canceled",
|
|
2379
|
+
"Bounced",
|
|
2380
|
+
"Blocked",
|
|
2381
|
+
"Error",
|
|
2382
|
+
"Expired",
|
|
2383
|
+
)
|
|
2384
|
+
started_at = time.monotonic()
|
|
2385
|
+
attempts = 0
|
|
2386
|
+
last_document: DocumentResponse | None = None
|
|
2387
|
+
|
|
2388
|
+
while True:
|
|
2389
|
+
last_document = self.get_document(id, **kwargs)
|
|
2390
|
+
status = getattr(last_document, "status", None)
|
|
2391
|
+
if isinstance(status, str) and status in terminal:
|
|
2392
|
+
return last_document
|
|
2393
|
+
|
|
2394
|
+
attempts += 1
|
|
2395
|
+
if (max_attempts is not None and attempts >= max_attempts) or time.monotonic() - started_at >= timeout:
|
|
2396
|
+
raise WaitForCompletionTimeoutError("Timed out waiting for document completion.", last_document)
|
|
2397
|
+
|
|
2398
|
+
time.sleep(max(0.0, interval))
|
|
2399
|
+
|
|
2400
|
+
def iterate_document_pages(
|
|
2401
|
+
self,
|
|
2402
|
+
page: int | None = 1,
|
|
2403
|
+
limit: int | None = 50,
|
|
2404
|
+
query: str | None = None,
|
|
2405
|
+
**kwargs: Any,
|
|
2406
|
+
) -> Iterator[DocumentListResponse]:
|
|
2407
|
+
next_page: int | None = page or 1
|
|
2408
|
+
while next_page is not None:
|
|
2409
|
+
response = self.list_documents(page=next_page, limit=limit, query=query, **kwargs)
|
|
2410
|
+
yield response
|
|
2411
|
+
next_page = getattr(response, "next_page", None)
|
|
2412
|
+
|
|
2413
|
+
def iterate_documents(
|
|
2414
|
+
self,
|
|
2415
|
+
page: int | None = 1,
|
|
2416
|
+
limit: int | None = 50,
|
|
2417
|
+
query: str | None = None,
|
|
2418
|
+
**kwargs: Any,
|
|
2419
|
+
) -> Iterator[Any]:
|
|
2420
|
+
for page_response in self.iterate_document_pages(page=page, limit=limit, query=query, **kwargs):
|
|
2421
|
+
yield from getattr(page_response, "documents", None) or []
|
|
2422
|
+
|
|
2423
|
+
def update_document(self, *args: Any, **kwargs: Any) -> Any:
|
|
2424
|
+
"""Alias for send_document."""
|
|
2425
|
+
return self.send_document(*args, **kwargs)
|