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,132 @@
|
|
|
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
|
+
import pprint
|
|
15
|
+
import re # noqa: F401
|
|
16
|
+
import json
|
|
17
|
+
|
|
18
|
+
from datetime import datetime
|
|
19
|
+
from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr
|
|
20
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
21
|
+
from typing import Any, Optional, Set
|
|
22
|
+
from typing_extensions import Self
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class BulkSendCreateResponse(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
Bulk send creation response
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
|
|
30
|
+
id: StrictStr
|
|
31
|
+
template_ids: List[StrictStr]
|
|
32
|
+
api_application_id: StrictStr | None = None
|
|
33
|
+
documents_count: StrictInt
|
|
34
|
+
created_at: datetime
|
|
35
|
+
user_id: StrictStr | None = None
|
|
36
|
+
status: StrictStr
|
|
37
|
+
additional_properties: Dict[str, Any] = {}
|
|
38
|
+
__properties: ClassVar[List[str]] = [
|
|
39
|
+
"id",
|
|
40
|
+
"template_ids",
|
|
41
|
+
"api_application_id",
|
|
42
|
+
"documents_count",
|
|
43
|
+
"created_at",
|
|
44
|
+
"user_id",
|
|
45
|
+
"status",
|
|
46
|
+
]
|
|
47
|
+
|
|
48
|
+
model_config = ConfigDict(
|
|
49
|
+
populate_by_name=True,
|
|
50
|
+
validate_assignment=True,
|
|
51
|
+
protected_namespaces=(),
|
|
52
|
+
)
|
|
53
|
+
|
|
54
|
+
def to_str(self) -> str:
|
|
55
|
+
"""Returns the string representation of the model using alias"""
|
|
56
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
57
|
+
|
|
58
|
+
def to_json(self) -> str:
|
|
59
|
+
"""Returns the JSON representation of the model using alias"""
|
|
60
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
61
|
+
return json.dumps(self.to_dict())
|
|
62
|
+
|
|
63
|
+
@classmethod
|
|
64
|
+
def from_json(cls, json_str: str) -> Self | None:
|
|
65
|
+
"""Create an instance of BulkSendCreateResponse from a JSON string"""
|
|
66
|
+
return cls.from_dict(json.loads(json_str))
|
|
67
|
+
|
|
68
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
69
|
+
"""Return the dictionary representation of the model using alias.
|
|
70
|
+
|
|
71
|
+
This has the following differences from calling pydantic's
|
|
72
|
+
`self.model_dump(by_alias=True)`:
|
|
73
|
+
|
|
74
|
+
* `None` is only added to the output dict for nullable fields that
|
|
75
|
+
were set at model initialization. Other fields with value `None`
|
|
76
|
+
are ignored.
|
|
77
|
+
* Fields in `self.additional_properties` are added to the output dict.
|
|
78
|
+
"""
|
|
79
|
+
excluded_fields: Set[str] = set(
|
|
80
|
+
[
|
|
81
|
+
"additional_properties",
|
|
82
|
+
]
|
|
83
|
+
)
|
|
84
|
+
|
|
85
|
+
_dict = self.model_dump(
|
|
86
|
+
by_alias=True,
|
|
87
|
+
exclude=excluded_fields,
|
|
88
|
+
exclude_none=True,
|
|
89
|
+
)
|
|
90
|
+
# puts key-value pairs in additional_properties in the top level
|
|
91
|
+
if self.additional_properties is not None:
|
|
92
|
+
for _key, _value in self.additional_properties.items():
|
|
93
|
+
_dict[_key] = _value
|
|
94
|
+
|
|
95
|
+
# set to None if api_application_id (nullable) is None
|
|
96
|
+
# and model_fields_set contains the field
|
|
97
|
+
if self.api_application_id is None and "api_application_id" in self.model_fields_set:
|
|
98
|
+
_dict["api_application_id"] = None
|
|
99
|
+
|
|
100
|
+
# set to None if user_id (nullable) is None
|
|
101
|
+
# and model_fields_set contains the field
|
|
102
|
+
if self.user_id is None and "user_id" in self.model_fields_set:
|
|
103
|
+
_dict["user_id"] = None
|
|
104
|
+
|
|
105
|
+
return _dict
|
|
106
|
+
|
|
107
|
+
@classmethod
|
|
108
|
+
def from_dict(cls, obj: Dict[str, Any] | None) -> Self | None:
|
|
109
|
+
"""Create an instance of BulkSendCreateResponse from a dict"""
|
|
110
|
+
if obj is None:
|
|
111
|
+
return None
|
|
112
|
+
|
|
113
|
+
if not isinstance(obj, dict):
|
|
114
|
+
return cls.model_validate(obj)
|
|
115
|
+
|
|
116
|
+
_obj = cls.model_validate(
|
|
117
|
+
{
|
|
118
|
+
"id": obj.get("id"),
|
|
119
|
+
"template_ids": obj.get("template_ids"),
|
|
120
|
+
"api_application_id": obj.get("api_application_id"),
|
|
121
|
+
"documents_count": obj.get("documents_count"),
|
|
122
|
+
"created_at": obj.get("created_at"),
|
|
123
|
+
"user_id": obj.get("user_id"),
|
|
124
|
+
"status": obj.get("status"),
|
|
125
|
+
}
|
|
126
|
+
)
|
|
127
|
+
# store additional fields in additional_properties
|
|
128
|
+
for _key in obj.keys():
|
|
129
|
+
if _key not in cls.__properties:
|
|
130
|
+
_obj.additional_properties[_key] = obj.get(_key)
|
|
131
|
+
|
|
132
|
+
return _obj
|
|
@@ -0,0 +1,100 @@
|
|
|
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
|
+
import pprint
|
|
15
|
+
import re # noqa: F401
|
|
16
|
+
import json
|
|
17
|
+
|
|
18
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
19
|
+
from typing import Any, ClassVar, Dict, List
|
|
20
|
+
from typing import Any, Optional, Set
|
|
21
|
+
from typing_extensions import Self
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
class BulkSendCsvRequest(BaseModel):
|
|
25
|
+
"""
|
|
26
|
+
BulkSendCsvRequest
|
|
27
|
+
""" # noqa: E501
|
|
28
|
+
|
|
29
|
+
template_ids: List[StrictStr] = Field(
|
|
30
|
+
description="Specify one or more templates to generate a single blank CSV file that will contain available columns for your recipient data. The template_ids[] parameter is an array of template IDs (e.g.,`/?template_ids[]=5a67dbd7-928a-4ea0-a7e2-e476a0eb045f&template_ids[]=d7315111-c671-4b15-8354-c9a19bbaefa0`). Each ID should be a separate parameter in the query string."
|
|
31
|
+
)
|
|
32
|
+
bulk_send_csv: StrictStr = Field(description="A RFC 4648 base64 string of the template CSV file to be validated.")
|
|
33
|
+
additional_properties: Dict[str, Any] = {}
|
|
34
|
+
__properties: ClassVar[List[str]] = ["template_ids", "bulk_send_csv"]
|
|
35
|
+
|
|
36
|
+
model_config = ConfigDict(
|
|
37
|
+
populate_by_name=True,
|
|
38
|
+
validate_assignment=True,
|
|
39
|
+
protected_namespaces=(),
|
|
40
|
+
)
|
|
41
|
+
|
|
42
|
+
def to_str(self) -> str:
|
|
43
|
+
"""Returns the string representation of the model using alias"""
|
|
44
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
45
|
+
|
|
46
|
+
def to_json(self) -> str:
|
|
47
|
+
"""Returns the JSON representation of the model using alias"""
|
|
48
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
49
|
+
return json.dumps(self.to_dict())
|
|
50
|
+
|
|
51
|
+
@classmethod
|
|
52
|
+
def from_json(cls, json_str: str) -> Self | None:
|
|
53
|
+
"""Create an instance of BulkSendCsvRequest from a JSON string"""
|
|
54
|
+
return cls.from_dict(json.loads(json_str))
|
|
55
|
+
|
|
56
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
57
|
+
"""Return the dictionary representation of the model using alias.
|
|
58
|
+
|
|
59
|
+
This has the following differences from calling pydantic's
|
|
60
|
+
`self.model_dump(by_alias=True)`:
|
|
61
|
+
|
|
62
|
+
* `None` is only added to the output dict for nullable fields that
|
|
63
|
+
were set at model initialization. Other fields with value `None`
|
|
64
|
+
are ignored.
|
|
65
|
+
* Fields in `self.additional_properties` are added to the output dict.
|
|
66
|
+
"""
|
|
67
|
+
excluded_fields: Set[str] = set(
|
|
68
|
+
[
|
|
69
|
+
"additional_properties",
|
|
70
|
+
]
|
|
71
|
+
)
|
|
72
|
+
|
|
73
|
+
_dict = self.model_dump(
|
|
74
|
+
by_alias=True,
|
|
75
|
+
exclude=excluded_fields,
|
|
76
|
+
exclude_none=True,
|
|
77
|
+
)
|
|
78
|
+
# puts key-value pairs in additional_properties in the top level
|
|
79
|
+
if self.additional_properties is not None:
|
|
80
|
+
for _key, _value in self.additional_properties.items():
|
|
81
|
+
_dict[_key] = _value
|
|
82
|
+
|
|
83
|
+
return _dict
|
|
84
|
+
|
|
85
|
+
@classmethod
|
|
86
|
+
def from_dict(cls, obj: Dict[str, Any] | None) -> Self | None:
|
|
87
|
+
"""Create an instance of BulkSendCsvRequest from a dict"""
|
|
88
|
+
if obj is None:
|
|
89
|
+
return None
|
|
90
|
+
|
|
91
|
+
if not isinstance(obj, dict):
|
|
92
|
+
return cls.model_validate(obj)
|
|
93
|
+
|
|
94
|
+
_obj = cls.model_validate({"template_ids": obj.get("template_ids"), "bulk_send_csv": obj.get("bulk_send_csv")})
|
|
95
|
+
# store additional fields in additional_properties
|
|
96
|
+
for _key in obj.keys():
|
|
97
|
+
if _key not in cls.__properties:
|
|
98
|
+
_obj.additional_properties[_key] = obj.get(_key)
|
|
99
|
+
|
|
100
|
+
return _obj
|
|
@@ -0,0 +1,97 @@
|
|
|
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
|
+
import pprint
|
|
15
|
+
import re # noqa: F401
|
|
16
|
+
import json
|
|
17
|
+
|
|
18
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictBytes, StrictStr
|
|
19
|
+
from typing import Any, ClassVar, Dict, List, Union
|
|
20
|
+
from typing import Any, Optional, Set
|
|
21
|
+
from typing_extensions import Self
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
class BulkSendCsvTemplateResponse(BaseModel):
|
|
25
|
+
"""
|
|
26
|
+
Base64-encoded CSV template
|
|
27
|
+
""" # noqa: E501
|
|
28
|
+
|
|
29
|
+
data: Union[StrictBytes, StrictStr] = Field(description="Base64-encoded CSV content")
|
|
30
|
+
additional_properties: Dict[str, Any] = {}
|
|
31
|
+
__properties: ClassVar[List[str]] = ["data"]
|
|
32
|
+
|
|
33
|
+
model_config = ConfigDict(
|
|
34
|
+
populate_by_name=True,
|
|
35
|
+
validate_assignment=True,
|
|
36
|
+
protected_namespaces=(),
|
|
37
|
+
)
|
|
38
|
+
|
|
39
|
+
def to_str(self) -> str:
|
|
40
|
+
"""Returns the string representation of the model using alias"""
|
|
41
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
42
|
+
|
|
43
|
+
def to_json(self) -> str:
|
|
44
|
+
"""Returns the JSON representation of the model using alias"""
|
|
45
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
46
|
+
return json.dumps(self.to_dict())
|
|
47
|
+
|
|
48
|
+
@classmethod
|
|
49
|
+
def from_json(cls, json_str: str) -> Self | None:
|
|
50
|
+
"""Create an instance of BulkSendCsvTemplateResponse from a JSON string"""
|
|
51
|
+
return cls.from_dict(json.loads(json_str))
|
|
52
|
+
|
|
53
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
54
|
+
"""Return the dictionary representation of the model using alias.
|
|
55
|
+
|
|
56
|
+
This has the following differences from calling pydantic's
|
|
57
|
+
`self.model_dump(by_alias=True)`:
|
|
58
|
+
|
|
59
|
+
* `None` is only added to the output dict for nullable fields that
|
|
60
|
+
were set at model initialization. Other fields with value `None`
|
|
61
|
+
are ignored.
|
|
62
|
+
* Fields in `self.additional_properties` are added to the output dict.
|
|
63
|
+
"""
|
|
64
|
+
excluded_fields: Set[str] = set(
|
|
65
|
+
[
|
|
66
|
+
"additional_properties",
|
|
67
|
+
]
|
|
68
|
+
)
|
|
69
|
+
|
|
70
|
+
_dict = self.model_dump(
|
|
71
|
+
by_alias=True,
|
|
72
|
+
exclude=excluded_fields,
|
|
73
|
+
exclude_none=True,
|
|
74
|
+
)
|
|
75
|
+
# puts key-value pairs in additional_properties in the top level
|
|
76
|
+
if self.additional_properties is not None:
|
|
77
|
+
for _key, _value in self.additional_properties.items():
|
|
78
|
+
_dict[_key] = _value
|
|
79
|
+
|
|
80
|
+
return _dict
|
|
81
|
+
|
|
82
|
+
@classmethod
|
|
83
|
+
def from_dict(cls, obj: Dict[str, Any] | None) -> Self | None:
|
|
84
|
+
"""Create an instance of BulkSendCsvTemplateResponse from a dict"""
|
|
85
|
+
if obj is None:
|
|
86
|
+
return None
|
|
87
|
+
|
|
88
|
+
if not isinstance(obj, dict):
|
|
89
|
+
return cls.model_validate(obj)
|
|
90
|
+
|
|
91
|
+
_obj = cls.model_validate({"data": obj.get("data")})
|
|
92
|
+
# store additional fields in additional_properties
|
|
93
|
+
for _key in obj.keys():
|
|
94
|
+
if _key not in cls.__properties:
|
|
95
|
+
_obj.additional_properties[_key] = obj.get(_key)
|
|
96
|
+
|
|
97
|
+
return _obj
|
|
@@ -0,0 +1,167 @@
|
|
|
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
|
+
import pprint
|
|
15
|
+
import re # noqa: F401
|
|
16
|
+
import json
|
|
17
|
+
|
|
18
|
+
from datetime import datetime
|
|
19
|
+
from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr
|
|
20
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
21
|
+
from signwell_sdk.models.document_response import DocumentResponse
|
|
22
|
+
from typing import Any, Optional, Set
|
|
23
|
+
from typing_extensions import Self
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
class BulkSendDocumentsResponse(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
Paginated list of documents in a bulk send
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
|
|
31
|
+
id: StrictStr
|
|
32
|
+
name: StrictStr | None = None
|
|
33
|
+
api_application_id: StrictStr | None = None
|
|
34
|
+
created_at: datetime | None = None
|
|
35
|
+
user_id: StrictStr | None = None
|
|
36
|
+
status: StrictStr | None = None
|
|
37
|
+
documents: List[DocumentResponse]
|
|
38
|
+
current_page: StrictInt
|
|
39
|
+
next_page: StrictInt | None = None
|
|
40
|
+
previous_page: StrictInt | None = None
|
|
41
|
+
total_count: StrictInt
|
|
42
|
+
total_pages: StrictInt
|
|
43
|
+
additional_properties: Dict[str, Any] = {}
|
|
44
|
+
__properties: ClassVar[List[str]] = [
|
|
45
|
+
"id",
|
|
46
|
+
"name",
|
|
47
|
+
"api_application_id",
|
|
48
|
+
"created_at",
|
|
49
|
+
"user_id",
|
|
50
|
+
"status",
|
|
51
|
+
"documents",
|
|
52
|
+
"current_page",
|
|
53
|
+
"next_page",
|
|
54
|
+
"previous_page",
|
|
55
|
+
"total_count",
|
|
56
|
+
"total_pages",
|
|
57
|
+
]
|
|
58
|
+
|
|
59
|
+
model_config = ConfigDict(
|
|
60
|
+
populate_by_name=True,
|
|
61
|
+
validate_assignment=True,
|
|
62
|
+
protected_namespaces=(),
|
|
63
|
+
)
|
|
64
|
+
|
|
65
|
+
def to_str(self) -> str:
|
|
66
|
+
"""Returns the string representation of the model using alias"""
|
|
67
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
68
|
+
|
|
69
|
+
def to_json(self) -> str:
|
|
70
|
+
"""Returns the JSON representation of the model using alias"""
|
|
71
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
72
|
+
return json.dumps(self.to_dict())
|
|
73
|
+
|
|
74
|
+
@classmethod
|
|
75
|
+
def from_json(cls, json_str: str) -> Self | None:
|
|
76
|
+
"""Create an instance of BulkSendDocumentsResponse from a JSON string"""
|
|
77
|
+
return cls.from_dict(json.loads(json_str))
|
|
78
|
+
|
|
79
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
80
|
+
"""Return the dictionary representation of the model using alias.
|
|
81
|
+
|
|
82
|
+
This has the following differences from calling pydantic's
|
|
83
|
+
`self.model_dump(by_alias=True)`:
|
|
84
|
+
|
|
85
|
+
* `None` is only added to the output dict for nullable fields that
|
|
86
|
+
were set at model initialization. Other fields with value `None`
|
|
87
|
+
are ignored.
|
|
88
|
+
* Fields in `self.additional_properties` are added to the output dict.
|
|
89
|
+
"""
|
|
90
|
+
excluded_fields: Set[str] = set(
|
|
91
|
+
[
|
|
92
|
+
"additional_properties",
|
|
93
|
+
]
|
|
94
|
+
)
|
|
95
|
+
|
|
96
|
+
_dict = self.model_dump(
|
|
97
|
+
by_alias=True,
|
|
98
|
+
exclude=excluded_fields,
|
|
99
|
+
exclude_none=True,
|
|
100
|
+
)
|
|
101
|
+
# override the default output from pydantic by calling `to_dict()` of each item in documents (list)
|
|
102
|
+
_items_documents: list[Any] = []
|
|
103
|
+
if self.documents:
|
|
104
|
+
for _item_documents in self.documents:
|
|
105
|
+
if _item_documents:
|
|
106
|
+
_items_documents.append(_item_documents.to_dict())
|
|
107
|
+
_dict["documents"] = _items_documents
|
|
108
|
+
# puts key-value pairs in additional_properties in the top level
|
|
109
|
+
if self.additional_properties is not None:
|
|
110
|
+
for _key, _value in self.additional_properties.items():
|
|
111
|
+
_dict[_key] = _value
|
|
112
|
+
|
|
113
|
+
# set to None if api_application_id (nullable) is None
|
|
114
|
+
# and model_fields_set contains the field
|
|
115
|
+
if self.api_application_id is None and "api_application_id" in self.model_fields_set:
|
|
116
|
+
_dict["api_application_id"] = None
|
|
117
|
+
|
|
118
|
+
# set to None if user_id (nullable) is None
|
|
119
|
+
# and model_fields_set contains the field
|
|
120
|
+
if self.user_id is None and "user_id" in self.model_fields_set:
|
|
121
|
+
_dict["user_id"] = None
|
|
122
|
+
|
|
123
|
+
# set to None if next_page (nullable) is None
|
|
124
|
+
# and model_fields_set contains the field
|
|
125
|
+
if self.next_page is None and "next_page" in self.model_fields_set:
|
|
126
|
+
_dict["next_page"] = None
|
|
127
|
+
|
|
128
|
+
# set to None if previous_page (nullable) is None
|
|
129
|
+
# and model_fields_set contains the field
|
|
130
|
+
if self.previous_page is None and "previous_page" in self.model_fields_set:
|
|
131
|
+
_dict["previous_page"] = None
|
|
132
|
+
|
|
133
|
+
return _dict
|
|
134
|
+
|
|
135
|
+
@classmethod
|
|
136
|
+
def from_dict(cls, obj: Dict[str, Any] | None) -> Self | None:
|
|
137
|
+
"""Create an instance of BulkSendDocumentsResponse from a dict"""
|
|
138
|
+
if obj is None:
|
|
139
|
+
return None
|
|
140
|
+
|
|
141
|
+
if not isinstance(obj, dict):
|
|
142
|
+
return cls.model_validate(obj)
|
|
143
|
+
|
|
144
|
+
_obj = cls.model_validate(
|
|
145
|
+
{
|
|
146
|
+
"id": obj.get("id"),
|
|
147
|
+
"name": obj.get("name"),
|
|
148
|
+
"api_application_id": obj.get("api_application_id"),
|
|
149
|
+
"created_at": obj.get("created_at"),
|
|
150
|
+
"user_id": obj.get("user_id"),
|
|
151
|
+
"status": obj.get("status"),
|
|
152
|
+
"documents": [DocumentResponse.from_dict(_item) for _item in obj["documents"]]
|
|
153
|
+
if obj.get("documents") is not None
|
|
154
|
+
else None,
|
|
155
|
+
"current_page": obj.get("current_page"),
|
|
156
|
+
"next_page": obj.get("next_page"),
|
|
157
|
+
"previous_page": obj.get("previous_page"),
|
|
158
|
+
"total_count": obj.get("total_count"),
|
|
159
|
+
"total_pages": obj.get("total_pages"),
|
|
160
|
+
}
|
|
161
|
+
)
|
|
162
|
+
# store additional fields in additional_properties
|
|
163
|
+
for _key in obj.keys():
|
|
164
|
+
if _key not in cls.__properties:
|
|
165
|
+
_obj.additional_properties[_key] = obj.get(_key)
|
|
166
|
+
|
|
167
|
+
return _obj
|
|
@@ -0,0 +1,141 @@
|
|
|
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
|
+
import pprint
|
|
15
|
+
import re # noqa: F401
|
|
16
|
+
import json
|
|
17
|
+
|
|
18
|
+
from datetime import datetime
|
|
19
|
+
from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr
|
|
20
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
21
|
+
from typing import Any, Optional, Set
|
|
22
|
+
from typing_extensions import Self
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class BulkSendListItem(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
Bulk send summary in list responses
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
|
|
30
|
+
id: StrictStr
|
|
31
|
+
name: StrictStr
|
|
32
|
+
api_application_id: StrictStr | None = None
|
|
33
|
+
documents_count: StrictInt
|
|
34
|
+
documents_completed: StrictInt
|
|
35
|
+
documents_not_completed: StrictInt
|
|
36
|
+
created_at: datetime
|
|
37
|
+
user_id: StrictStr | None = None
|
|
38
|
+
status: StrictStr
|
|
39
|
+
template_ids: List[StrictStr]
|
|
40
|
+
additional_properties: Dict[str, Any] = {}
|
|
41
|
+
__properties: ClassVar[List[str]] = [
|
|
42
|
+
"id",
|
|
43
|
+
"name",
|
|
44
|
+
"api_application_id",
|
|
45
|
+
"documents_count",
|
|
46
|
+
"documents_completed",
|
|
47
|
+
"documents_not_completed",
|
|
48
|
+
"created_at",
|
|
49
|
+
"user_id",
|
|
50
|
+
"status",
|
|
51
|
+
"template_ids",
|
|
52
|
+
]
|
|
53
|
+
|
|
54
|
+
model_config = ConfigDict(
|
|
55
|
+
populate_by_name=True,
|
|
56
|
+
validate_assignment=True,
|
|
57
|
+
protected_namespaces=(),
|
|
58
|
+
)
|
|
59
|
+
|
|
60
|
+
def to_str(self) -> str:
|
|
61
|
+
"""Returns the string representation of the model using alias"""
|
|
62
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
63
|
+
|
|
64
|
+
def to_json(self) -> str:
|
|
65
|
+
"""Returns the JSON representation of the model using alias"""
|
|
66
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
67
|
+
return json.dumps(self.to_dict())
|
|
68
|
+
|
|
69
|
+
@classmethod
|
|
70
|
+
def from_json(cls, json_str: str) -> Self | None:
|
|
71
|
+
"""Create an instance of BulkSendListItem from a JSON string"""
|
|
72
|
+
return cls.from_dict(json.loads(json_str))
|
|
73
|
+
|
|
74
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
75
|
+
"""Return the dictionary representation of the model using alias.
|
|
76
|
+
|
|
77
|
+
This has the following differences from calling pydantic's
|
|
78
|
+
`self.model_dump(by_alias=True)`:
|
|
79
|
+
|
|
80
|
+
* `None` is only added to the output dict for nullable fields that
|
|
81
|
+
were set at model initialization. Other fields with value `None`
|
|
82
|
+
are ignored.
|
|
83
|
+
* Fields in `self.additional_properties` are added to the output dict.
|
|
84
|
+
"""
|
|
85
|
+
excluded_fields: Set[str] = set(
|
|
86
|
+
[
|
|
87
|
+
"additional_properties",
|
|
88
|
+
]
|
|
89
|
+
)
|
|
90
|
+
|
|
91
|
+
_dict = self.model_dump(
|
|
92
|
+
by_alias=True,
|
|
93
|
+
exclude=excluded_fields,
|
|
94
|
+
exclude_none=True,
|
|
95
|
+
)
|
|
96
|
+
# puts key-value pairs in additional_properties in the top level
|
|
97
|
+
if self.additional_properties is not None:
|
|
98
|
+
for _key, _value in self.additional_properties.items():
|
|
99
|
+
_dict[_key] = _value
|
|
100
|
+
|
|
101
|
+
# set to None if api_application_id (nullable) is None
|
|
102
|
+
# and model_fields_set contains the field
|
|
103
|
+
if self.api_application_id is None and "api_application_id" in self.model_fields_set:
|
|
104
|
+
_dict["api_application_id"] = None
|
|
105
|
+
|
|
106
|
+
# set to None if user_id (nullable) is None
|
|
107
|
+
# and model_fields_set contains the field
|
|
108
|
+
if self.user_id is None and "user_id" in self.model_fields_set:
|
|
109
|
+
_dict["user_id"] = None
|
|
110
|
+
|
|
111
|
+
return _dict
|
|
112
|
+
|
|
113
|
+
@classmethod
|
|
114
|
+
def from_dict(cls, obj: Dict[str, Any] | None) -> Self | None:
|
|
115
|
+
"""Create an instance of BulkSendListItem from a dict"""
|
|
116
|
+
if obj is None:
|
|
117
|
+
return None
|
|
118
|
+
|
|
119
|
+
if not isinstance(obj, dict):
|
|
120
|
+
return cls.model_validate(obj)
|
|
121
|
+
|
|
122
|
+
_obj = cls.model_validate(
|
|
123
|
+
{
|
|
124
|
+
"id": obj.get("id"),
|
|
125
|
+
"name": obj.get("name"),
|
|
126
|
+
"api_application_id": obj.get("api_application_id"),
|
|
127
|
+
"documents_count": obj.get("documents_count"),
|
|
128
|
+
"documents_completed": obj.get("documents_completed"),
|
|
129
|
+
"documents_not_completed": obj.get("documents_not_completed"),
|
|
130
|
+
"created_at": obj.get("created_at"),
|
|
131
|
+
"user_id": obj.get("user_id"),
|
|
132
|
+
"status": obj.get("status"),
|
|
133
|
+
"template_ids": obj.get("template_ids"),
|
|
134
|
+
}
|
|
135
|
+
)
|
|
136
|
+
# store additional fields in additional_properties
|
|
137
|
+
for _key in obj.keys():
|
|
138
|
+
if _key not in cls.__properties:
|
|
139
|
+
_obj.additional_properties[_key] = obj.get(_key)
|
|
140
|
+
|
|
141
|
+
return _obj
|