subnoto-api-client 2.0.6__py3-none-manylinux2014_x86_64.whl → 2.0.7__py3-none-manylinux2014_x86_64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. oak_session_py/oak_client.so +0 -0
  2. subnoto_api_client/generated/api/envelope/post_public_envelope_add_attachment.py +221 -0
  3. subnoto_api_client/generated/api/envelope/post_public_envelope_complete_document_upload.py +4 -8
  4. subnoto_api_client/generated/api/envelope/post_public_envelope_create.py +8 -12
  5. subnoto_api_client/generated/api/envelope/post_public_envelope_create_from_file.py +225 -0
  6. subnoto_api_client/generated/api/envelope/post_public_envelope_delete_attachment.py +218 -0
  7. subnoto_api_client/generated/models/__init__.py +86 -0
  8. subnoto_api_client/generated/models/post_public_envelope_add_attachment_body.py +129 -0
  9. subnoto_api_client/generated/models/post_public_envelope_add_attachment_response_200.py +66 -0
  10. subnoto_api_client/generated/models/post_public_envelope_add_attachment_response_400.py +98 -0
  11. subnoto_api_client/generated/models/post_public_envelope_add_attachment_response_400_error.py +86 -0
  12. subnoto_api_client/generated/models/post_public_envelope_add_attachment_response_400_error_code.py +12 -0
  13. subnoto_api_client/generated/models/post_public_envelope_add_attachment_response_401.py +98 -0
  14. subnoto_api_client/generated/models/post_public_envelope_add_attachment_response_401_error.py +86 -0
  15. subnoto_api_client/generated/models/post_public_envelope_add_attachment_response_401_error_code.py +9 -0
  16. subnoto_api_client/generated/models/post_public_envelope_add_attachment_response_403.py +98 -0
  17. subnoto_api_client/generated/models/post_public_envelope_add_attachment_response_403_error.py +86 -0
  18. subnoto_api_client/generated/models/post_public_envelope_add_attachment_response_403_error_code.py +9 -0
  19. subnoto_api_client/generated/models/post_public_envelope_add_attachment_response_500.py +98 -0
  20. subnoto_api_client/generated/models/post_public_envelope_add_attachment_response_500_error.py +86 -0
  21. subnoto_api_client/generated/models/post_public_envelope_add_attachment_response_500_error_code.py +8 -0
  22. subnoto_api_client/generated/models/post_public_envelope_add_blocks_body.py +3 -3
  23. subnoto_api_client/generated/models/post_public_envelope_add_recipients_body.py +3 -3
  24. subnoto_api_client/generated/models/post_public_envelope_create_body.py +1 -1
  25. subnoto_api_client/generated/models/post_public_envelope_create_from_file_body.py +117 -0
  26. subnoto_api_client/generated/models/post_public_envelope_create_from_file_response_200.py +66 -0
  27. subnoto_api_client/generated/models/post_public_envelope_create_from_file_response_400.py +98 -0
  28. subnoto_api_client/generated/models/post_public_envelope_create_from_file_response_400_error.py +86 -0
  29. subnoto_api_client/generated/models/post_public_envelope_create_from_file_response_400_error_code.py +15 -0
  30. subnoto_api_client/generated/models/post_public_envelope_create_from_file_response_401.py +98 -0
  31. subnoto_api_client/generated/models/post_public_envelope_create_from_file_response_401_error.py +86 -0
  32. subnoto_api_client/generated/models/post_public_envelope_create_from_file_response_401_error_code.py +9 -0
  33. subnoto_api_client/generated/models/post_public_envelope_create_from_file_response_403.py +98 -0
  34. subnoto_api_client/generated/models/post_public_envelope_create_from_file_response_403_error.py +86 -0
  35. subnoto_api_client/generated/models/post_public_envelope_create_from_file_response_403_error_code.py +9 -0
  36. subnoto_api_client/generated/models/post_public_envelope_create_from_file_response_500.py +98 -0
  37. subnoto_api_client/generated/models/post_public_envelope_create_from_file_response_500_error.py +86 -0
  38. subnoto_api_client/generated/models/post_public_envelope_create_from_file_response_500_error_code.py +8 -0
  39. subnoto_api_client/generated/models/post_public_envelope_create_from_template_body.py +3 -3
  40. subnoto_api_client/generated/models/post_public_envelope_create_response_200.py +2 -2
  41. subnoto_api_client/generated/models/post_public_envelope_create_response_200_presigned_s3_params.py +3 -3
  42. subnoto_api_client/generated/models/post_public_envelope_create_response_200_presigned_s3_params_fields.py +9 -9
  43. subnoto_api_client/generated/models/post_public_envelope_delete_attachment_body.py +92 -0
  44. subnoto_api_client/generated/models/post_public_envelope_delete_attachment_response_200.py +46 -0
  45. subnoto_api_client/generated/models/post_public_envelope_delete_attachment_response_400.py +98 -0
  46. subnoto_api_client/generated/models/post_public_envelope_delete_attachment_response_400_error.py +86 -0
  47. subnoto_api_client/generated/models/post_public_envelope_delete_attachment_response_400_error_code.py +12 -0
  48. subnoto_api_client/generated/models/post_public_envelope_delete_attachment_response_401.py +98 -0
  49. subnoto_api_client/generated/models/post_public_envelope_delete_attachment_response_401_error.py +86 -0
  50. subnoto_api_client/generated/models/post_public_envelope_delete_attachment_response_401_error_code.py +9 -0
  51. subnoto_api_client/generated/models/post_public_envelope_delete_attachment_response_403.py +98 -0
  52. subnoto_api_client/generated/models/post_public_envelope_delete_attachment_response_403_error.py +86 -0
  53. subnoto_api_client/generated/models/post_public_envelope_delete_attachment_response_403_error_code.py +9 -0
  54. subnoto_api_client/generated/models/post_public_envelope_delete_attachment_response_500.py +98 -0
  55. subnoto_api_client/generated/models/post_public_envelope_delete_attachment_response_500_error.py +86 -0
  56. subnoto_api_client/generated/models/post_public_envelope_delete_attachment_response_500_error_code.py +8 -0
  57. subnoto_api_client/generated/models/post_public_envelope_get_response_200.py +24 -0
  58. subnoto_api_client/generated/models/post_public_envelope_get_response_200_attachments_item.py +66 -0
  59. subnoto_api_client/generated/models/post_public_envelope_get_response_200_documents_item_blocks.py +6 -6
  60. subnoto_api_client/generated/models/post_public_template_list_response_200_templates_item.py +3 -3
  61. {subnoto_api_client-2.0.6.dist-info → subnoto_api_client-2.0.7.dist-info}/METADATA +1 -1
  62. {subnoto_api_client-2.0.6.dist-info → subnoto_api_client-2.0.7.dist-info}/RECORD +63 -17
  63. {subnoto_api_client-2.0.6.dist-info → subnoto_api_client-2.0.7.dist-info}/WHEEL +0 -0
Binary file
@@ -0,0 +1,221 @@
1
+ from http import HTTPStatus
2
+ from typing import Any, cast
3
+
4
+ import httpx
5
+
6
+ from ...client import AuthenticatedClient, Client
7
+ from ...types import Response, UNSET
8
+ from ... import errors
9
+
10
+ from ...models.post_public_envelope_add_attachment_body import PostPublicEnvelopeAddAttachmentBody
11
+ from ...models.post_public_envelope_add_attachment_response_200 import PostPublicEnvelopeAddAttachmentResponse200
12
+ from ...models.post_public_envelope_add_attachment_response_400 import PostPublicEnvelopeAddAttachmentResponse400
13
+ from ...models.post_public_envelope_add_attachment_response_401 import PostPublicEnvelopeAddAttachmentResponse401
14
+ from ...models.post_public_envelope_add_attachment_response_403 import PostPublicEnvelopeAddAttachmentResponse403
15
+ from ...models.post_public_envelope_add_attachment_response_500 import PostPublicEnvelopeAddAttachmentResponse500
16
+ from typing import cast
17
+
18
+
19
+
20
+ def _get_kwargs(
21
+ *,
22
+ body: PostPublicEnvelopeAddAttachmentBody,
23
+
24
+ ) -> dict[str, Any]:
25
+ headers: dict[str, Any] = {}
26
+
27
+
28
+
29
+
30
+
31
+
32
+ _kwargs: dict[str, Any] = {
33
+ "method": "post",
34
+ "url": "/public/envelope/add-attachment",
35
+ }
36
+
37
+ _kwargs["files"] = body.to_multipart()
38
+
39
+
40
+
41
+ _kwargs["headers"] = headers
42
+ return _kwargs
43
+
44
+
45
+
46
+ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> PostPublicEnvelopeAddAttachmentResponse200 | PostPublicEnvelopeAddAttachmentResponse400 | PostPublicEnvelopeAddAttachmentResponse401 | PostPublicEnvelopeAddAttachmentResponse403 | PostPublicEnvelopeAddAttachmentResponse500 | None:
47
+ if response.status_code == 200:
48
+ response_200 = PostPublicEnvelopeAddAttachmentResponse200.from_dict(response.json())
49
+
50
+
51
+
52
+ return response_200
53
+
54
+ if response.status_code == 400:
55
+ response_400 = PostPublicEnvelopeAddAttachmentResponse400.from_dict(response.json())
56
+
57
+
58
+
59
+ return response_400
60
+
61
+ if response.status_code == 401:
62
+ response_401 = PostPublicEnvelopeAddAttachmentResponse401.from_dict(response.json())
63
+
64
+
65
+
66
+ return response_401
67
+
68
+ if response.status_code == 403:
69
+ response_403 = PostPublicEnvelopeAddAttachmentResponse403.from_dict(response.json())
70
+
71
+
72
+
73
+ return response_403
74
+
75
+ if response.status_code == 500:
76
+ response_500 = PostPublicEnvelopeAddAttachmentResponse500.from_dict(response.json())
77
+
78
+
79
+
80
+ return response_500
81
+
82
+ if client.raise_on_unexpected_status:
83
+ raise errors.UnexpectedStatus(response.status_code, response.content)
84
+ else:
85
+ return None
86
+
87
+
88
+ def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[PostPublicEnvelopeAddAttachmentResponse200 | PostPublicEnvelopeAddAttachmentResponse400 | PostPublicEnvelopeAddAttachmentResponse401 | PostPublicEnvelopeAddAttachmentResponse403 | PostPublicEnvelopeAddAttachmentResponse500]:
89
+ return Response(
90
+ status_code=HTTPStatus(response.status_code),
91
+ content=response.content,
92
+ headers=response.headers,
93
+ parsed=_parse_response(client=client, response=response),
94
+ )
95
+
96
+
97
+ def sync_detailed(
98
+ *,
99
+ client: AuthenticatedClient | Client,
100
+ body: PostPublicEnvelopeAddAttachmentBody,
101
+
102
+ ) -> Response[PostPublicEnvelopeAddAttachmentResponse200 | PostPublicEnvelopeAddAttachmentResponse400 | PostPublicEnvelopeAddAttachmentResponse401 | PostPublicEnvelopeAddAttachmentResponse403 | PostPublicEnvelopeAddAttachmentResponse500]:
103
+ """ add-attachment
104
+
105
+ Add a document attachment to an existing envelope. Accepts multipart/form-data with a PDF or Word
106
+ document file.
107
+
108
+ Args:
109
+ body (PostPublicEnvelopeAddAttachmentBody):
110
+
111
+ Raises:
112
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
113
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
114
+
115
+ Returns:
116
+ Response[PostPublicEnvelopeAddAttachmentResponse200 | PostPublicEnvelopeAddAttachmentResponse400 | PostPublicEnvelopeAddAttachmentResponse401 | PostPublicEnvelopeAddAttachmentResponse403 | PostPublicEnvelopeAddAttachmentResponse500]
117
+ """
118
+
119
+
120
+ kwargs = _get_kwargs(
121
+ body=body,
122
+
123
+ )
124
+
125
+ response = client.get_httpx_client().request(
126
+ **kwargs,
127
+ )
128
+
129
+ return _build_response(client=client, response=response)
130
+
131
+ def sync(
132
+ *,
133
+ client: AuthenticatedClient | Client,
134
+ body: PostPublicEnvelopeAddAttachmentBody,
135
+
136
+ ) -> PostPublicEnvelopeAddAttachmentResponse200 | PostPublicEnvelopeAddAttachmentResponse400 | PostPublicEnvelopeAddAttachmentResponse401 | PostPublicEnvelopeAddAttachmentResponse403 | PostPublicEnvelopeAddAttachmentResponse500 | None:
137
+ """ add-attachment
138
+
139
+ Add a document attachment to an existing envelope. Accepts multipart/form-data with a PDF or Word
140
+ document file.
141
+
142
+ Args:
143
+ body (PostPublicEnvelopeAddAttachmentBody):
144
+
145
+ Raises:
146
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
147
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
148
+
149
+ Returns:
150
+ PostPublicEnvelopeAddAttachmentResponse200 | PostPublicEnvelopeAddAttachmentResponse400 | PostPublicEnvelopeAddAttachmentResponse401 | PostPublicEnvelopeAddAttachmentResponse403 | PostPublicEnvelopeAddAttachmentResponse500
151
+ """
152
+
153
+
154
+ return sync_detailed(
155
+ client=client,
156
+ body=body,
157
+
158
+ ).parsed
159
+
160
+ async def asyncio_detailed(
161
+ *,
162
+ client: AuthenticatedClient | Client,
163
+ body: PostPublicEnvelopeAddAttachmentBody,
164
+
165
+ ) -> Response[PostPublicEnvelopeAddAttachmentResponse200 | PostPublicEnvelopeAddAttachmentResponse400 | PostPublicEnvelopeAddAttachmentResponse401 | PostPublicEnvelopeAddAttachmentResponse403 | PostPublicEnvelopeAddAttachmentResponse500]:
166
+ """ add-attachment
167
+
168
+ Add a document attachment to an existing envelope. Accepts multipart/form-data with a PDF or Word
169
+ document file.
170
+
171
+ Args:
172
+ body (PostPublicEnvelopeAddAttachmentBody):
173
+
174
+ Raises:
175
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
176
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
177
+
178
+ Returns:
179
+ Response[PostPublicEnvelopeAddAttachmentResponse200 | PostPublicEnvelopeAddAttachmentResponse400 | PostPublicEnvelopeAddAttachmentResponse401 | PostPublicEnvelopeAddAttachmentResponse403 | PostPublicEnvelopeAddAttachmentResponse500]
180
+ """
181
+
182
+
183
+ kwargs = _get_kwargs(
184
+ body=body,
185
+
186
+ )
187
+
188
+ response = await client.get_async_httpx_client().request(
189
+ **kwargs
190
+ )
191
+
192
+ return _build_response(client=client, response=response)
193
+
194
+ async def asyncio(
195
+ *,
196
+ client: AuthenticatedClient | Client,
197
+ body: PostPublicEnvelopeAddAttachmentBody,
198
+
199
+ ) -> PostPublicEnvelopeAddAttachmentResponse200 | PostPublicEnvelopeAddAttachmentResponse400 | PostPublicEnvelopeAddAttachmentResponse401 | PostPublicEnvelopeAddAttachmentResponse403 | PostPublicEnvelopeAddAttachmentResponse500 | None:
200
+ """ add-attachment
201
+
202
+ Add a document attachment to an existing envelope. Accepts multipart/form-data with a PDF or Word
203
+ document file.
204
+
205
+ Args:
206
+ body (PostPublicEnvelopeAddAttachmentBody):
207
+
208
+ Raises:
209
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
210
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
211
+
212
+ Returns:
213
+ PostPublicEnvelopeAddAttachmentResponse200 | PostPublicEnvelopeAddAttachmentResponse400 | PostPublicEnvelopeAddAttachmentResponse401 | PostPublicEnvelopeAddAttachmentResponse403 | PostPublicEnvelopeAddAttachmentResponse500
214
+ """
215
+
216
+
217
+ return (await asyncio_detailed(
218
+ client=client,
219
+ body=body,
220
+
221
+ )).parsed
@@ -103,8 +103,7 @@ def sync_detailed(
103
103
  ) -> Response[PostPublicEnvelopeCompleteDocumentUploadResponse200 | PostPublicEnvelopeCompleteDocumentUploadResponse400 | PostPublicEnvelopeCompleteDocumentUploadResponse401 | PostPublicEnvelopeCompleteDocumentUploadResponse403 | PostPublicEnvelopeCompleteDocumentUploadResponse500]:
104
104
  """ complete-document-upload
105
105
 
106
- Verify uploaded document exists on S3, validate as PDF, generate a small preview image, and persist
107
- it.
106
+ Verify uploaded document, validate as PDF, generate a small preview image, and persist it.
108
107
 
109
108
  Args:
110
109
  body (PostPublicEnvelopeCompleteDocumentUploadBody):
@@ -137,8 +136,7 @@ def sync(
137
136
  ) -> PostPublicEnvelopeCompleteDocumentUploadResponse200 | PostPublicEnvelopeCompleteDocumentUploadResponse400 | PostPublicEnvelopeCompleteDocumentUploadResponse401 | PostPublicEnvelopeCompleteDocumentUploadResponse403 | PostPublicEnvelopeCompleteDocumentUploadResponse500 | None:
138
137
  """ complete-document-upload
139
138
 
140
- Verify uploaded document exists on S3, validate as PDF, generate a small preview image, and persist
141
- it.
139
+ Verify uploaded document, validate as PDF, generate a small preview image, and persist it.
142
140
 
143
141
  Args:
144
142
  body (PostPublicEnvelopeCompleteDocumentUploadBody):
@@ -166,8 +164,7 @@ async def asyncio_detailed(
166
164
  ) -> Response[PostPublicEnvelopeCompleteDocumentUploadResponse200 | PostPublicEnvelopeCompleteDocumentUploadResponse400 | PostPublicEnvelopeCompleteDocumentUploadResponse401 | PostPublicEnvelopeCompleteDocumentUploadResponse403 | PostPublicEnvelopeCompleteDocumentUploadResponse500]:
167
165
  """ complete-document-upload
168
166
 
169
- Verify uploaded document exists on S3, validate as PDF, generate a small preview image, and persist
170
- it.
167
+ Verify uploaded document, validate as PDF, generate a small preview image, and persist it.
171
168
 
172
169
  Args:
173
170
  body (PostPublicEnvelopeCompleteDocumentUploadBody):
@@ -200,8 +197,7 @@ async def asyncio(
200
197
  ) -> PostPublicEnvelopeCompleteDocumentUploadResponse200 | PostPublicEnvelopeCompleteDocumentUploadResponse400 | PostPublicEnvelopeCompleteDocumentUploadResponse401 | PostPublicEnvelopeCompleteDocumentUploadResponse403 | PostPublicEnvelopeCompleteDocumentUploadResponse500 | None:
201
198
  """ complete-document-upload
202
199
 
203
- Verify uploaded document exists on S3, validate as PDF, generate a small preview image, and persist
204
- it.
200
+ Verify uploaded document, validate as PDF, generate a small preview image, and persist it.
205
201
 
206
202
  Args:
207
203
  body (PostPublicEnvelopeCompleteDocumentUploadBody):
@@ -104,9 +104,8 @@ def sync_detailed(
104
104
  """ create
105
105
 
106
106
  Create an envelope and the first document placeholder. Optionally accepts a small file directly (max
107
- 10 MB) in the request body. If a file is provided, it will be encrypted and uploaded to S3, and pre-
108
- signed S3 parameters will not be returned. Otherwise, returns pre-signed S3 parameters for document
109
- upload.
107
+ 10 MB) in the request body. If a file is provided, it will be processed and uploaded directly.
108
+ Otherwise, returns upload parameters for document upload.
110
109
 
111
110
  Args:
112
111
  body (PostPublicEnvelopeCreateBody):
@@ -140,9 +139,8 @@ def sync(
140
139
  """ create
141
140
 
142
141
  Create an envelope and the first document placeholder. Optionally accepts a small file directly (max
143
- 10 MB) in the request body. If a file is provided, it will be encrypted and uploaded to S3, and pre-
144
- signed S3 parameters will not be returned. Otherwise, returns pre-signed S3 parameters for document
145
- upload.
142
+ 10 MB) in the request body. If a file is provided, it will be processed and uploaded directly.
143
+ Otherwise, returns upload parameters for document upload.
146
144
 
147
145
  Args:
148
146
  body (PostPublicEnvelopeCreateBody):
@@ -171,9 +169,8 @@ async def asyncio_detailed(
171
169
  """ create
172
170
 
173
171
  Create an envelope and the first document placeholder. Optionally accepts a small file directly (max
174
- 10 MB) in the request body. If a file is provided, it will be encrypted and uploaded to S3, and pre-
175
- signed S3 parameters will not be returned. Otherwise, returns pre-signed S3 parameters for document
176
- upload.
172
+ 10 MB) in the request body. If a file is provided, it will be processed and uploaded directly.
173
+ Otherwise, returns upload parameters for document upload.
177
174
 
178
175
  Args:
179
176
  body (PostPublicEnvelopeCreateBody):
@@ -207,9 +204,8 @@ async def asyncio(
207
204
  """ create
208
205
 
209
206
  Create an envelope and the first document placeholder. Optionally accepts a small file directly (max
210
- 10 MB) in the request body. If a file is provided, it will be encrypted and uploaded to S3, and pre-
211
- signed S3 parameters will not be returned. Otherwise, returns pre-signed S3 parameters for document
212
- upload.
207
+ 10 MB) in the request body. If a file is provided, it will be processed and uploaded directly.
208
+ Otherwise, returns upload parameters for document upload.
213
209
 
214
210
  Args:
215
211
  body (PostPublicEnvelopeCreateBody):
@@ -0,0 +1,225 @@
1
+ from http import HTTPStatus
2
+ from typing import Any, cast
3
+
4
+ import httpx
5
+
6
+ from ...client import AuthenticatedClient, Client
7
+ from ...types import Response, UNSET
8
+ from ... import errors
9
+
10
+ from ...models.post_public_envelope_create_from_file_body import PostPublicEnvelopeCreateFromFileBody
11
+ from ...models.post_public_envelope_create_from_file_response_200 import PostPublicEnvelopeCreateFromFileResponse200
12
+ from ...models.post_public_envelope_create_from_file_response_400 import PostPublicEnvelopeCreateFromFileResponse400
13
+ from ...models.post_public_envelope_create_from_file_response_401 import PostPublicEnvelopeCreateFromFileResponse401
14
+ from ...models.post_public_envelope_create_from_file_response_403 import PostPublicEnvelopeCreateFromFileResponse403
15
+ from ...models.post_public_envelope_create_from_file_response_500 import PostPublicEnvelopeCreateFromFileResponse500
16
+ from typing import cast
17
+
18
+
19
+
20
+ def _get_kwargs(
21
+ *,
22
+ body: PostPublicEnvelopeCreateFromFileBody,
23
+
24
+ ) -> dict[str, Any]:
25
+ headers: dict[str, Any] = {}
26
+
27
+
28
+
29
+
30
+
31
+
32
+ _kwargs: dict[str, Any] = {
33
+ "method": "post",
34
+ "url": "/public/envelope/create-from-file",
35
+ }
36
+
37
+ _kwargs["files"] = body.to_multipart()
38
+
39
+
40
+
41
+ _kwargs["headers"] = headers
42
+ return _kwargs
43
+
44
+
45
+
46
+ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> PostPublicEnvelopeCreateFromFileResponse200 | PostPublicEnvelopeCreateFromFileResponse400 | PostPublicEnvelopeCreateFromFileResponse401 | PostPublicEnvelopeCreateFromFileResponse403 | PostPublicEnvelopeCreateFromFileResponse500 | None:
47
+ if response.status_code == 200:
48
+ response_200 = PostPublicEnvelopeCreateFromFileResponse200.from_dict(response.json())
49
+
50
+
51
+
52
+ return response_200
53
+
54
+ if response.status_code == 400:
55
+ response_400 = PostPublicEnvelopeCreateFromFileResponse400.from_dict(response.json())
56
+
57
+
58
+
59
+ return response_400
60
+
61
+ if response.status_code == 401:
62
+ response_401 = PostPublicEnvelopeCreateFromFileResponse401.from_dict(response.json())
63
+
64
+
65
+
66
+ return response_401
67
+
68
+ if response.status_code == 403:
69
+ response_403 = PostPublicEnvelopeCreateFromFileResponse403.from_dict(response.json())
70
+
71
+
72
+
73
+ return response_403
74
+
75
+ if response.status_code == 500:
76
+ response_500 = PostPublicEnvelopeCreateFromFileResponse500.from_dict(response.json())
77
+
78
+
79
+
80
+ return response_500
81
+
82
+ if client.raise_on_unexpected_status:
83
+ raise errors.UnexpectedStatus(response.status_code, response.content)
84
+ else:
85
+ return None
86
+
87
+
88
+ def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[PostPublicEnvelopeCreateFromFileResponse200 | PostPublicEnvelopeCreateFromFileResponse400 | PostPublicEnvelopeCreateFromFileResponse401 | PostPublicEnvelopeCreateFromFileResponse403 | PostPublicEnvelopeCreateFromFileResponse500]:
89
+ return Response(
90
+ status_code=HTTPStatus(response.status_code),
91
+ content=response.content,
92
+ headers=response.headers,
93
+ parsed=_parse_response(client=client, response=response),
94
+ )
95
+
96
+
97
+ def sync_detailed(
98
+ *,
99
+ client: AuthenticatedClient | Client,
100
+ body: PostPublicEnvelopeCreateFromFileBody,
101
+
102
+ ) -> Response[PostPublicEnvelopeCreateFromFileResponse200 | PostPublicEnvelopeCreateFromFileResponse400 | PostPublicEnvelopeCreateFromFileResponse401 | PostPublicEnvelopeCreateFromFileResponse403 | PostPublicEnvelopeCreateFromFileResponse500]:
103
+ """ create-from-file
104
+
105
+ Create an envelope and the first document placeholder with a file upload. Accepts multipart/form-
106
+ data with a PDF or Word document file (max 50 MB). DOCX files are converted to PDF. The file is
107
+ processed and uploaded directly.
108
+
109
+ Args:
110
+ body (PostPublicEnvelopeCreateFromFileBody):
111
+
112
+ Raises:
113
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
114
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
115
+
116
+ Returns:
117
+ Response[PostPublicEnvelopeCreateFromFileResponse200 | PostPublicEnvelopeCreateFromFileResponse400 | PostPublicEnvelopeCreateFromFileResponse401 | PostPublicEnvelopeCreateFromFileResponse403 | PostPublicEnvelopeCreateFromFileResponse500]
118
+ """
119
+
120
+
121
+ kwargs = _get_kwargs(
122
+ body=body,
123
+
124
+ )
125
+
126
+ response = client.get_httpx_client().request(
127
+ **kwargs,
128
+ )
129
+
130
+ return _build_response(client=client, response=response)
131
+
132
+ def sync(
133
+ *,
134
+ client: AuthenticatedClient | Client,
135
+ body: PostPublicEnvelopeCreateFromFileBody,
136
+
137
+ ) -> PostPublicEnvelopeCreateFromFileResponse200 | PostPublicEnvelopeCreateFromFileResponse400 | PostPublicEnvelopeCreateFromFileResponse401 | PostPublicEnvelopeCreateFromFileResponse403 | PostPublicEnvelopeCreateFromFileResponse500 | None:
138
+ """ create-from-file
139
+
140
+ Create an envelope and the first document placeholder with a file upload. Accepts multipart/form-
141
+ data with a PDF or Word document file (max 50 MB). DOCX files are converted to PDF. The file is
142
+ processed and uploaded directly.
143
+
144
+ Args:
145
+ body (PostPublicEnvelopeCreateFromFileBody):
146
+
147
+ Raises:
148
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
149
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
150
+
151
+ Returns:
152
+ PostPublicEnvelopeCreateFromFileResponse200 | PostPublicEnvelopeCreateFromFileResponse400 | PostPublicEnvelopeCreateFromFileResponse401 | PostPublicEnvelopeCreateFromFileResponse403 | PostPublicEnvelopeCreateFromFileResponse500
153
+ """
154
+
155
+
156
+ return sync_detailed(
157
+ client=client,
158
+ body=body,
159
+
160
+ ).parsed
161
+
162
+ async def asyncio_detailed(
163
+ *,
164
+ client: AuthenticatedClient | Client,
165
+ body: PostPublicEnvelopeCreateFromFileBody,
166
+
167
+ ) -> Response[PostPublicEnvelopeCreateFromFileResponse200 | PostPublicEnvelopeCreateFromFileResponse400 | PostPublicEnvelopeCreateFromFileResponse401 | PostPublicEnvelopeCreateFromFileResponse403 | PostPublicEnvelopeCreateFromFileResponse500]:
168
+ """ create-from-file
169
+
170
+ Create an envelope and the first document placeholder with a file upload. Accepts multipart/form-
171
+ data with a PDF or Word document file (max 50 MB). DOCX files are converted to PDF. The file is
172
+ processed and uploaded directly.
173
+
174
+ Args:
175
+ body (PostPublicEnvelopeCreateFromFileBody):
176
+
177
+ Raises:
178
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
179
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
180
+
181
+ Returns:
182
+ Response[PostPublicEnvelopeCreateFromFileResponse200 | PostPublicEnvelopeCreateFromFileResponse400 | PostPublicEnvelopeCreateFromFileResponse401 | PostPublicEnvelopeCreateFromFileResponse403 | PostPublicEnvelopeCreateFromFileResponse500]
183
+ """
184
+
185
+
186
+ kwargs = _get_kwargs(
187
+ body=body,
188
+
189
+ )
190
+
191
+ response = await client.get_async_httpx_client().request(
192
+ **kwargs
193
+ )
194
+
195
+ return _build_response(client=client, response=response)
196
+
197
+ async def asyncio(
198
+ *,
199
+ client: AuthenticatedClient | Client,
200
+ body: PostPublicEnvelopeCreateFromFileBody,
201
+
202
+ ) -> PostPublicEnvelopeCreateFromFileResponse200 | PostPublicEnvelopeCreateFromFileResponse400 | PostPublicEnvelopeCreateFromFileResponse401 | PostPublicEnvelopeCreateFromFileResponse403 | PostPublicEnvelopeCreateFromFileResponse500 | None:
203
+ """ create-from-file
204
+
205
+ Create an envelope and the first document placeholder with a file upload. Accepts multipart/form-
206
+ data with a PDF or Word document file (max 50 MB). DOCX files are converted to PDF. The file is
207
+ processed and uploaded directly.
208
+
209
+ Args:
210
+ body (PostPublicEnvelopeCreateFromFileBody):
211
+
212
+ Raises:
213
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
214
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
215
+
216
+ Returns:
217
+ PostPublicEnvelopeCreateFromFileResponse200 | PostPublicEnvelopeCreateFromFileResponse400 | PostPublicEnvelopeCreateFromFileResponse401 | PostPublicEnvelopeCreateFromFileResponse403 | PostPublicEnvelopeCreateFromFileResponse500
218
+ """
219
+
220
+
221
+ return (await asyncio_detailed(
222
+ client=client,
223
+ body=body,
224
+
225
+ )).parsed