onfido-python 3.5.0__py3-none-any.whl → 4.0.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.
- onfido/__init__.py +10 -5
- onfido/api/default_api.py +611 -416
- onfido/api_client.py +38 -11
- onfido/configuration.py +14 -3
- onfido/models/__init__.py +9 -4
- onfido/models/addresses_list.py +3 -3
- onfido/models/applicant.py +3 -3
- onfido/models/applicant_builder.py +12 -8
- onfido/models/{consents_builder.py → applicant_consent_builder.py} +11 -6
- onfido/models/applicant_consent_name.py +38 -0
- onfido/models/applicant_request.py +10 -6
- onfido/models/applicant_shared.py +3 -3
- onfido/models/applicant_updater.py +12 -8
- onfido/models/applicants_list.py +3 -3
- onfido/models/check.py +10 -13
- onfido/models/check_builder.py +3 -1
- onfido/models/check_response.py +7 -13
- onfido/models/check_shared.py +4 -2
- onfido/models/check_status.py +41 -0
- onfido/models/checks_list.py +3 -3
- onfido/models/device_intelligence_breakdown_properties_device.py +1 -9
- onfido/models/device_intelligence_breakdown_properties_ip.py +2 -8
- onfido/models/device_intelligence_report.py +3 -3
- onfido/models/document.py +2 -1
- onfido/models/document_properties.py +6 -6
- onfido/models/document_report.py +3 -3
- onfido/models/document_shared.py +2 -1
- onfido/models/document_types.py +5 -0
- onfido/models/document_video_report.py +3 -3
- onfido/models/document_video_with_address_information_report.py +3 -3
- onfido/models/document_with_address_information_report.py +3 -3
- onfido/models/document_with_driver_verification_report.py +3 -3
- onfido/models/document_with_driver_verification_report_all_of_properties.py +9 -9
- onfido/models/document_with_driving_licence_information_report.py +3 -3
- onfido/models/documents_list.py +3 -3
- onfido/models/facial_similarity_motion_report.py +3 -3
- onfido/models/facial_similarity_photo_fully_auto_report.py +3 -3
- onfido/models/facial_similarity_photo_report.py +3 -3
- onfido/models/facial_similarity_video_report.py +3 -3
- onfido/models/id_photos_list.py +3 -3
- onfido/models/identity_enhanced_properties.py +3 -3
- onfido/models/identity_enhanced_report.py +3 -3
- onfido/models/india_pan_report.py +3 -3
- onfido/models/known_faces_properties.py +3 -3
- onfido/models/known_faces_report.py +3 -3
- onfido/models/live_photos_list.py +3 -3
- onfido/models/live_videos_list.py +3 -3
- onfido/models/motion_captures_list.py +3 -3
- onfido/models/proof_of_address_report.py +3 -3
- onfido/models/repeat_attempts_list.py +3 -3
- onfido/models/report_shared.py +3 -3
- onfido/models/reports_list.py +3 -3
- onfido/models/task_item.py +11 -2
- onfido/models/us_driving_licence_report.py +3 -3
- onfido/models/watchlist_aml_report.py +3 -3
- onfido/models/watchlist_enhanced_properties.py +3 -3
- onfido/models/watchlist_enhanced_properties_records_inner.py +18 -18
- onfido/models/watchlist_enhanced_report.py +3 -3
- onfido/models/watchlist_monitor_matches_list.py +3 -3
- onfido/models/watchlist_monitors_list.py +3 -3
- onfido/models/watchlist_peps_only_report.py +3 -3
- onfido/models/watchlist_sanctions_only_report.py +3 -3
- onfido/models/watchlist_standard_report.py +3 -3
- onfido/models/webhook_event_object_status.py +54 -0
- onfido/models/webhook_event_payload.py +9 -4
- onfido/models/webhook_event_payload_object.py +2 -1
- onfido/models/webhook_event_payload_resource.py +158 -0
- onfido/models/webhook_event_resource_type.py +41 -0
- onfido/models/webhook_resend.py +3 -3
- onfido/models/webhooks_list.py +3 -3
- onfido/models/workflow_run.py +9 -18
- onfido/models/workflow_run_builder.py +3 -3
- onfido/models/{workflow_run_response_error.py → workflow_run_error.py} +4 -4
- onfido/models/{workflow_run_shared_link.py → workflow_run_link.py} +24 -4
- onfido/models/workflow_run_response.py +6 -15
- onfido/models/workflow_run_shared.py +3 -3
- onfido/models/workflow_run_status.py +43 -0
- onfido/rest.py +1 -1
- {onfido_python-3.5.0.dist-info → onfido_python-4.0.0.dist-info}/METADATA +3 -3
- {onfido_python-3.5.0.dist-info → onfido_python-4.0.0.dist-info}/RECORD +83 -78
- {onfido_python-3.5.0.dist-info → onfido_python-4.0.0.dist-info}/WHEEL +1 -1
- onfido/models/consent_item.py +0 -109
- {onfido_python-3.5.0.dist-info → onfido_python-4.0.0.dist-info}/LICENSE +0 -0
- {onfido_python-3.5.0.dist-info → onfido_python-4.0.0.dist-info}/top_level.txt +0 -0
onfido/models/workflow_run.py
CHANGED
|
@@ -18,11 +18,12 @@ import re # noqa: F401
|
|
|
18
18
|
import json
|
|
19
19
|
|
|
20
20
|
from datetime import datetime
|
|
21
|
-
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
|
|
22
22
|
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
23
|
from typing_extensions import Annotated
|
|
24
|
-
from onfido.models.
|
|
25
|
-
from onfido.models.
|
|
24
|
+
from onfido.models.workflow_run_error import WorkflowRunError
|
|
25
|
+
from onfido.models.workflow_run_link import WorkflowRunLink
|
|
26
|
+
from onfido.models.workflow_run_status import WorkflowRunStatus
|
|
26
27
|
from typing import Optional, Set
|
|
27
28
|
from typing_extensions import Self
|
|
28
29
|
|
|
@@ -34,30 +35,20 @@ class WorkflowRun(BaseModel):
|
|
|
34
35
|
workflow_id: StrictStr = Field(description="The unique identifier for the Workflow.")
|
|
35
36
|
tags: Optional[Annotated[List[Annotated[str, Field(min_length=1, strict=True, max_length=128)]], Field(max_length=30)]] = Field(default=None, description="Tags or labels assigned to the workflow run.")
|
|
36
37
|
customer_user_id: Optional[Annotated[str, Field(strict=True, max_length=256)]] = Field(default=None, description="Customer-provided user identifier.")
|
|
37
|
-
link: Optional[
|
|
38
|
+
link: Optional[WorkflowRunLink] = Field(default=None, description="Object for the configuration of the Workflow Run link.")
|
|
38
39
|
created_at: Optional[datetime] = Field(default=None, description="The date and time when the Workflow Run was created.")
|
|
39
40
|
updated_at: Optional[datetime] = Field(default=None, description="The date and time when the Workflow Run was last updated.")
|
|
40
41
|
id: StrictStr = Field(description="The unique identifier for the Workflow Run.")
|
|
41
42
|
workflow_version_id: Optional[StrictInt] = Field(default=None, description="The identifier for the Workflow version.")
|
|
42
43
|
dashboard_url: Optional[StrictStr] = Field(default=None, description="The URL for viewing the Workflow Run results on your Onfido Dashboard.")
|
|
43
|
-
status: Optional[
|
|
44
|
+
status: Optional[WorkflowRunStatus] = Field(default=None, description="The status of the Workflow Run.")
|
|
44
45
|
output: Optional[Dict[str, Any]] = Field(default=None, description="Output object contains all of the properties configured on the Workflow version.")
|
|
45
46
|
reasons: Optional[List[StrictStr]] = Field(default=None, description="The reasons the Workflow Run outcome was reached. Configurable when creating the Workflow version.")
|
|
46
|
-
error: Optional[
|
|
47
|
+
error: Optional[WorkflowRunError] = Field(default=None, description="Error object. Only set when the Workflow Run status is 'error'.")
|
|
47
48
|
sdk_token: Optional[StrictStr] = Field(default=None, description="Client token to use when loading this workflow run in the Onfido SDK.")
|
|
48
49
|
additional_properties: Dict[str, Any] = {}
|
|
49
50
|
__properties: ClassVar[List[str]] = ["applicant_id", "workflow_id", "tags", "customer_user_id", "link", "created_at", "updated_at", "id", "workflow_version_id", "dashboard_url", "status", "output", "reasons", "error", "sdk_token"]
|
|
50
51
|
|
|
51
|
-
@field_validator('status')
|
|
52
|
-
def status_validate_enum(cls, value):
|
|
53
|
-
"""Validates the enum"""
|
|
54
|
-
if value is None:
|
|
55
|
-
return value
|
|
56
|
-
|
|
57
|
-
if value not in set(['awaiting_input', 'processing', 'abandoned', 'error', 'approved', 'review', 'declined']):
|
|
58
|
-
raise ValueError("must be one of enum values ('awaiting_input', 'processing', 'abandoned', 'error', 'approved', 'review', 'declined')")
|
|
59
|
-
return value
|
|
60
|
-
|
|
61
52
|
model_config = ConfigDict(
|
|
62
53
|
populate_by_name=True,
|
|
63
54
|
validate_assignment=True,
|
|
@@ -136,7 +127,7 @@ class WorkflowRun(BaseModel):
|
|
|
136
127
|
"workflow_id": obj.get("workflow_id"),
|
|
137
128
|
"tags": obj.get("tags"),
|
|
138
129
|
"customer_user_id": obj.get("customer_user_id"),
|
|
139
|
-
"link":
|
|
130
|
+
"link": WorkflowRunLink.from_dict(obj["link"]) if obj.get("link") is not None else None,
|
|
140
131
|
"created_at": obj.get("created_at"),
|
|
141
132
|
"updated_at": obj.get("updated_at"),
|
|
142
133
|
"id": obj.get("id"),
|
|
@@ -145,7 +136,7 @@ class WorkflowRun(BaseModel):
|
|
|
145
136
|
"status": obj.get("status"),
|
|
146
137
|
"output": obj.get("output"),
|
|
147
138
|
"reasons": obj.get("reasons"),
|
|
148
|
-
"error":
|
|
139
|
+
"error": WorkflowRunError.from_dict(obj["error"]) if obj.get("error") is not None else None,
|
|
149
140
|
"sdk_token": obj.get("sdk_token")
|
|
150
141
|
})
|
|
151
142
|
# store additional fields in additional_properties
|
|
@@ -21,7 +21,7 @@ from datetime import datetime
|
|
|
21
21
|
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
22
22
|
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
23
|
from typing_extensions import Annotated
|
|
24
|
-
from onfido.models.
|
|
24
|
+
from onfido.models.workflow_run_link import WorkflowRunLink
|
|
25
25
|
from typing import Optional, Set
|
|
26
26
|
from typing_extensions import Self
|
|
27
27
|
|
|
@@ -33,7 +33,7 @@ class WorkflowRunBuilder(BaseModel):
|
|
|
33
33
|
workflow_id: StrictStr = Field(description="The unique identifier for the Workflow.")
|
|
34
34
|
tags: Optional[Annotated[List[Annotated[str, Field(min_length=1, strict=True, max_length=128)]], Field(max_length=30)]] = Field(default=None, description="Tags or labels assigned to the workflow run.")
|
|
35
35
|
customer_user_id: Optional[Annotated[str, Field(strict=True, max_length=256)]] = Field(default=None, description="Customer-provided user identifier.")
|
|
36
|
-
link: Optional[
|
|
36
|
+
link: Optional[WorkflowRunLink] = Field(default=None, description="Object for the configuration of the Workflow Run link.")
|
|
37
37
|
created_at: Optional[datetime] = Field(default=None, description="The date and time when the Workflow Run was created.")
|
|
38
38
|
updated_at: Optional[datetime] = Field(default=None, description="The date and time when the Workflow Run was last updated.")
|
|
39
39
|
custom_data: Optional[Dict[str, Any]] = Field(default=None, description="Object with Custom Input Data to be used in the Workflow Run.")
|
|
@@ -110,7 +110,7 @@ class WorkflowRunBuilder(BaseModel):
|
|
|
110
110
|
"workflow_id": obj.get("workflow_id"),
|
|
111
111
|
"tags": obj.get("tags"),
|
|
112
112
|
"customer_user_id": obj.get("customer_user_id"),
|
|
113
|
-
"link":
|
|
113
|
+
"link": WorkflowRunLink.from_dict(obj["link"]) if obj.get("link") is not None else None,
|
|
114
114
|
"created_at": obj.get("created_at"),
|
|
115
115
|
"updated_at": obj.get("updated_at"),
|
|
116
116
|
"custom_data": obj.get("custom_data")
|
|
@@ -22,9 +22,9 @@ from typing import Any, ClassVar, Dict, List, Optional
|
|
|
22
22
|
from typing import Optional, Set
|
|
23
23
|
from typing_extensions import Self
|
|
24
24
|
|
|
25
|
-
class
|
|
25
|
+
class WorkflowRunError(BaseModel):
|
|
26
26
|
"""
|
|
27
|
-
|
|
27
|
+
WorkflowRunError
|
|
28
28
|
""" # noqa: E501
|
|
29
29
|
type: Optional[StrictStr] = Field(default=None, description="The type of error.")
|
|
30
30
|
message: Optional[StrictStr] = Field(default=None, description="A textual description of the error.")
|
|
@@ -49,7 +49,7 @@ class WorkflowRunResponseError(BaseModel):
|
|
|
49
49
|
|
|
50
50
|
@classmethod
|
|
51
51
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
52
|
-
"""Create an instance of
|
|
52
|
+
"""Create an instance of WorkflowRunError from a JSON string"""
|
|
53
53
|
return cls.from_dict(json.loads(json_str))
|
|
54
54
|
|
|
55
55
|
def to_dict(self) -> Dict[str, Any]:
|
|
@@ -81,7 +81,7 @@ class WorkflowRunResponseError(BaseModel):
|
|
|
81
81
|
|
|
82
82
|
@classmethod
|
|
83
83
|
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
84
|
-
"""Create an instance of
|
|
84
|
+
"""Create an instance of WorkflowRunError from a dict"""
|
|
85
85
|
if obj is None:
|
|
86
86
|
return None
|
|
87
87
|
|
|
@@ -23,9 +23,9 @@ from typing import Any, ClassVar, Dict, List, Optional
|
|
|
23
23
|
from typing import Optional, Set
|
|
24
24
|
from typing_extensions import Self
|
|
25
25
|
|
|
26
|
-
class
|
|
26
|
+
class WorkflowRunLink(BaseModel):
|
|
27
27
|
"""
|
|
28
|
-
|
|
28
|
+
WorkflowRunLink
|
|
29
29
|
""" # noqa: E501
|
|
30
30
|
url: Optional[StrictStr] = Field(default=None, description="Link to access the Workflow Run without the need to integrate with Onfido's SDKs.")
|
|
31
31
|
completed_redirect_url: Optional[StrictStr] = Field(default=None, description="When the interactive section of the Workflow Run has completed successfully, the user will be redirected to this URL instead of seeing the default Onfido 'thank you' page.")
|
|
@@ -63,7 +63,7 @@ class WorkflowRunSharedLink(BaseModel):
|
|
|
63
63
|
|
|
64
64
|
@classmethod
|
|
65
65
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
66
|
-
"""Create an instance of
|
|
66
|
+
"""Create an instance of WorkflowRunLink from a JSON string"""
|
|
67
67
|
return cls.from_dict(json.loads(json_str))
|
|
68
68
|
|
|
69
69
|
def to_dict(self) -> Dict[str, Any]:
|
|
@@ -91,11 +91,31 @@ class WorkflowRunSharedLink(BaseModel):
|
|
|
91
91
|
for _key, _value in self.additional_properties.items():
|
|
92
92
|
_dict[_key] = _value
|
|
93
93
|
|
|
94
|
+
# set to None if completed_redirect_url (nullable) is None
|
|
95
|
+
# and model_fields_set contains the field
|
|
96
|
+
if self.completed_redirect_url is None and "completed_redirect_url" in self.model_fields_set:
|
|
97
|
+
_dict['completed_redirect_url'] = None
|
|
98
|
+
|
|
99
|
+
# set to None if expired_redirect_url (nullable) is None
|
|
100
|
+
# and model_fields_set contains the field
|
|
101
|
+
if self.expired_redirect_url is None and "expired_redirect_url" in self.model_fields_set:
|
|
102
|
+
_dict['expired_redirect_url'] = None
|
|
103
|
+
|
|
104
|
+
# set to None if expires_at (nullable) is None
|
|
105
|
+
# and model_fields_set contains the field
|
|
106
|
+
if self.expires_at is None and "expires_at" in self.model_fields_set:
|
|
107
|
+
_dict['expires_at'] = None
|
|
108
|
+
|
|
109
|
+
# set to None if language (nullable) is None
|
|
110
|
+
# and model_fields_set contains the field
|
|
111
|
+
if self.language is None and "language" in self.model_fields_set:
|
|
112
|
+
_dict['language'] = None
|
|
113
|
+
|
|
94
114
|
return _dict
|
|
95
115
|
|
|
96
116
|
@classmethod
|
|
97
117
|
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
98
|
-
"""Create an instance of
|
|
118
|
+
"""Create an instance of WorkflowRunLink from a dict"""
|
|
99
119
|
if obj is None:
|
|
100
120
|
return None
|
|
101
121
|
|
|
@@ -17,9 +17,10 @@ import pprint
|
|
|
17
17
|
import re # noqa: F401
|
|
18
18
|
import json
|
|
19
19
|
|
|
20
|
-
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
|
|
21
21
|
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
-
from onfido.models.
|
|
22
|
+
from onfido.models.workflow_run_error import WorkflowRunError
|
|
23
|
+
from onfido.models.workflow_run_status import WorkflowRunStatus
|
|
23
24
|
from typing import Optional, Set
|
|
24
25
|
from typing_extensions import Self
|
|
25
26
|
|
|
@@ -30,24 +31,14 @@ class WorkflowRunResponse(BaseModel):
|
|
|
30
31
|
id: StrictStr = Field(description="The unique identifier for the Workflow Run.")
|
|
31
32
|
workflow_version_id: Optional[StrictInt] = Field(default=None, description="The identifier for the Workflow version.")
|
|
32
33
|
dashboard_url: Optional[StrictStr] = Field(default=None, description="The URL for viewing the Workflow Run results on your Onfido Dashboard.")
|
|
33
|
-
status: Optional[
|
|
34
|
+
status: Optional[WorkflowRunStatus] = Field(default=None, description="The status of the Workflow Run.")
|
|
34
35
|
output: Optional[Dict[str, Any]] = Field(default=None, description="Output object contains all of the properties configured on the Workflow version.")
|
|
35
36
|
reasons: Optional[List[StrictStr]] = Field(default=None, description="The reasons the Workflow Run outcome was reached. Configurable when creating the Workflow version.")
|
|
36
|
-
error: Optional[
|
|
37
|
+
error: Optional[WorkflowRunError] = Field(default=None, description="Error object. Only set when the Workflow Run status is 'error'.")
|
|
37
38
|
sdk_token: Optional[StrictStr] = Field(default=None, description="Client token to use when loading this workflow run in the Onfido SDK.")
|
|
38
39
|
additional_properties: Dict[str, Any] = {}
|
|
39
40
|
__properties: ClassVar[List[str]] = ["id", "workflow_version_id", "dashboard_url", "status", "output", "reasons", "error", "sdk_token"]
|
|
40
41
|
|
|
41
|
-
@field_validator('status')
|
|
42
|
-
def status_validate_enum(cls, value):
|
|
43
|
-
"""Validates the enum"""
|
|
44
|
-
if value is None:
|
|
45
|
-
return value
|
|
46
|
-
|
|
47
|
-
if value not in set(['awaiting_input', 'processing', 'abandoned', 'error', 'approved', 'review', 'declined']):
|
|
48
|
-
raise ValueError("must be one of enum values ('awaiting_input', 'processing', 'abandoned', 'error', 'approved', 'review', 'declined')")
|
|
49
|
-
return value
|
|
50
|
-
|
|
51
42
|
model_config = ConfigDict(
|
|
52
43
|
populate_by_name=True,
|
|
53
44
|
validate_assignment=True,
|
|
@@ -120,7 +111,7 @@ class WorkflowRunResponse(BaseModel):
|
|
|
120
111
|
"status": obj.get("status"),
|
|
121
112
|
"output": obj.get("output"),
|
|
122
113
|
"reasons": obj.get("reasons"),
|
|
123
|
-
"error":
|
|
114
|
+
"error": WorkflowRunError.from_dict(obj["error"]) if obj.get("error") is not None else None,
|
|
124
115
|
"sdk_token": obj.get("sdk_token")
|
|
125
116
|
})
|
|
126
117
|
# store additional fields in additional_properties
|
|
@@ -21,7 +21,7 @@ from datetime import datetime
|
|
|
21
21
|
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
22
22
|
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
23
|
from typing_extensions import Annotated
|
|
24
|
-
from onfido.models.
|
|
24
|
+
from onfido.models.workflow_run_link import WorkflowRunLink
|
|
25
25
|
from typing import Optional, Set
|
|
26
26
|
from typing_extensions import Self
|
|
27
27
|
|
|
@@ -33,7 +33,7 @@ class WorkflowRunShared(BaseModel):
|
|
|
33
33
|
workflow_id: StrictStr = Field(description="The unique identifier for the Workflow.")
|
|
34
34
|
tags: Optional[Annotated[List[Annotated[str, Field(min_length=1, strict=True, max_length=128)]], Field(max_length=30)]] = Field(default=None, description="Tags or labels assigned to the workflow run.")
|
|
35
35
|
customer_user_id: Optional[Annotated[str, Field(strict=True, max_length=256)]] = Field(default=None, description="Customer-provided user identifier.")
|
|
36
|
-
link: Optional[
|
|
36
|
+
link: Optional[WorkflowRunLink] = Field(default=None, description="Object for the configuration of the Workflow Run link.")
|
|
37
37
|
created_at: Optional[datetime] = Field(default=None, description="The date and time when the Workflow Run was created.")
|
|
38
38
|
updated_at: Optional[datetime] = Field(default=None, description="The date and time when the Workflow Run was last updated.")
|
|
39
39
|
additional_properties: Dict[str, Any] = {}
|
|
@@ -109,7 +109,7 @@ class WorkflowRunShared(BaseModel):
|
|
|
109
109
|
"workflow_id": obj.get("workflow_id"),
|
|
110
110
|
"tags": obj.get("tags"),
|
|
111
111
|
"customer_user_id": obj.get("customer_user_id"),
|
|
112
|
-
"link":
|
|
112
|
+
"link": WorkflowRunLink.from_dict(obj["link"]) if obj.get("link") is not None else None,
|
|
113
113
|
"created_at": obj.get("created_at"),
|
|
114
114
|
"updated_at": obj.get("updated_at")
|
|
115
115
|
})
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Onfido API v3.6
|
|
5
|
+
|
|
6
|
+
The Onfido API (v3.6)
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: v3.6
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import json
|
|
17
|
+
from enum import Enum
|
|
18
|
+
from typing_extensions import Self
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class WorkflowRunStatus(str, Enum):
|
|
22
|
+
"""
|
|
23
|
+
WorkflowRunStatus
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
"""
|
|
27
|
+
allowed enum values
|
|
28
|
+
"""
|
|
29
|
+
PROCESSING = 'processing'
|
|
30
|
+
AWAITING_INPUT = 'awaiting_input'
|
|
31
|
+
AWAITING_CLIENT_INPUT = 'awaiting_client_input'
|
|
32
|
+
APPROVED = 'approved'
|
|
33
|
+
DECLINED = 'declined'
|
|
34
|
+
REVIEW = 'review'
|
|
35
|
+
ABANDONED = 'abandoned'
|
|
36
|
+
ERROR = 'error'
|
|
37
|
+
|
|
38
|
+
@classmethod
|
|
39
|
+
def from_json(cls, json_str: str) -> Self:
|
|
40
|
+
"""Create an instance of WorkflowRunStatus from a JSON string"""
|
|
41
|
+
return cls(json.loads(json_str))
|
|
42
|
+
|
|
43
|
+
|
onfido/rest.py
CHANGED
|
@@ -226,7 +226,7 @@ class RESTClientObject:
|
|
|
226
226
|
headers=headers,
|
|
227
227
|
preload_content=False
|
|
228
228
|
)
|
|
229
|
-
elif headers['Content-Type']
|
|
229
|
+
elif headers['Content-Type'].startswith('text/') and isinstance(body, bool):
|
|
230
230
|
request_body = "true" if body else "false"
|
|
231
231
|
r = self.pool_manager.request(
|
|
232
232
|
method,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: onfido-python
|
|
3
|
-
Version:
|
|
3
|
+
Version: 4.0.0
|
|
4
4
|
Summary: Python library for the Onfido API
|
|
5
5
|
Home-page:
|
|
6
6
|
Author: OpenAPI Generator community
|
|
@@ -9,8 +9,8 @@ License: MIT
|
|
|
9
9
|
Keywords: OpenAPI,OpenAPI-Generator,onfido,identity
|
|
10
10
|
Description-Content-Type: text/markdown
|
|
11
11
|
License-File: LICENSE
|
|
12
|
-
Requires-Dist: urllib3 <
|
|
13
|
-
Requires-Dist: python-dateutil
|
|
12
|
+
Requires-Dist: urllib3 <3.0.0,>=1.25.3
|
|
13
|
+
Requires-Dist: python-dateutil >=2.8.2
|
|
14
14
|
Requires-Dist: pydantic >=2
|
|
15
15
|
Requires-Dist: typing-extensions >=4.7.1
|
|
16
16
|
|