Skip to content

Commit 295c124

Browse files
dvacca-onfidogithub-actions[bot]
authored andcommitted
Upgrade after onfido-openapi-spec change be823e7
1 parent de610dd commit 295c124

File tree

10 files changed

+46
-42
lines changed

10 files changed

+46
-42
lines changed

.release.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
22
"source": {
33
"repo_url": "https://github.com/onfido/onfido-openapi-spec",
4-
"short_sha": "54ce45f",
5-
"long_sha": "54ce45f2138f044cc5cb40f6904dc7bc1a675be6",
6-
"version": "v4.5.0"
4+
"short_sha": "be823e7",
5+
"long_sha": "be823e7815c93bfbfc3fb764c0548f57cb851fe9",
6+
"version": "v4.6.0"
77
},
8-
"release": "v4.5.0"
8+
"release": "v4.6.0"
99
}

README.md

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
The official Python library for integrating with the Onfido API.
44

5-
Documentation can be found at <https://documentation.onfido.com>.
5+
Documentation is available at <https://documentation.onfido.com>.
66

7-
This version uses Onfido API v3.6. Refer to our [API versioning guide](https://developers.onfido.com/guide/api-versioning-policy#client-libraries) for details of which client library versions use which versions of the API.
7+
This version uses Onfido API v3.6. Refer to our [API versioning guide](https://developers.onfido.com/guide/api-versioning-policy#client-libraries) for details. It explains which client library versions use which versions of the API.
88

99
[![PyPI version](https://badge.fury.io/py/onfido-python.svg)](https://badge.fury.io/py/onfido-python)
1010
![Build Status](https://github.com/onfido/onfido-python/actions/workflows/python.yml/badge.svg)
@@ -19,7 +19,7 @@ Python 3.7+
1919

2020
#### Pip
2121

22-
If the python package is hosted on a repository, you can install directly using:
22+
If the Python package is hosted on a repository, you can install it directly using:
2323

2424
```sh
2525
pip install onfido-python
@@ -68,7 +68,7 @@ with onfido.ApiClient(configuration) as api_client:
6868
...
6969
```
7070

71-
NB: by default, timeout values are set to 30 seconds.
71+
NB: by default, timeout values are set to 30 seconds. You can change the default timeout values by setting the `timeout` parameter in the `Configuration` object, as shown in the example above.
7272

7373
### Making a call to the API
7474

@@ -97,7 +97,7 @@ Specific exception types are defined into [exceptions.py](onfido/exceptions.py).
9797

9898
### Webhook event verification
9999

100-
Webhook events payload needs to be verified before it can be accessed. Library allows to easily decode the payload and verify its signature before returning it as an object for user convenience:
100+
Webhook events payload needs to be verified before it can be accessed. Verifying webhook payloads is crucial for security reasons, as it ensures that the payloads are indeed from Onfido and have not been tampered with. The library allows you to easily decode the payload and verify its signature before returning it as an object for user convenience:
101101

102102
```python
103103
try:
@@ -115,41 +115,43 @@ Webhook events payload needs to be verified before it can be accessed. Library a
115115

116116
#### Do not use additional properties
117117

118-
Retain from using `additional_properties` dictionary to access not defined properties to avoid breaking changes when these fields will appear.
118+
Except for accessing Task object's outputs, avoid using the `additional_properties` dictionary to access undefined properties to prevent breaking changes when these fields appear.
119119

120120
## Contributing
121121

122-
This library is automatically generated using [OpenAPI Generator](https://openapi-generator.tech) (version: 7.9.0); therefore all the contributions, except tests files, should target [Onfido OpenAPI specification repository](https://github.com/onfido/onfido-openapi-spec/tree/master) instead of this repository.
122+
This library is automatically generated using [OpenAPI Generator](https://openapi-generator.tech) (version: 7.9.0); therefore, all contributions (except test files) should target the [Onfido OpenAPI specification repository](https://github.com/onfido/onfido-openapi-spec/tree/master) instead of this repository. Please follow the contribution guidelines provided in the OpenAPI specification repository.
123123

124124
For contributions to the tests instead, please follow the steps below:
125125

126-
1. [Fork](https://github.com/onfido/onfido-python/fork) repository
126+
1. Fork the [repository](https://github.com/onfido/onfido-python/fork)
127127
2. Create your feature branch (`git checkout -b my-new-feature`)
128128
3. Make your changes
129-
4. Commit your changes (`git commit -am 'Add some feature'`)
129+
4. Commit your changes (`git commit -am 'Add detailed description of the feature'`)
130130
5. Push to the branch (`git push origin my-new-feature`)
131131
6. Create a new Pull Request
132132

133133
## Versioning policy
134134

135-
[Semantic Versioning](https://semver.org) policy is used for library versioning, following guidelines and limitations below:
135+
Versioning helps manage changes and ensures compatibility across different versions of the library.
136136

137-
- MAJOR versions (x.0.0) might:
137+
[Semantic Versioning](https://semver.org) policy is used for library versioning, following the guidelines and limitations outlined below:
138+
139+
- MAJOR versions (x.0.0) may:
138140
- target a new API version
139141
- include non-backward compatible change
140-
- MINOR versions (0.x.0) might:
142+
- MINOR versions (0.x.0) may:
141143
- add a new functionality, non-mandatory parameter or property
142144
- deprecate an old functionality
143145
- include non-backward compatible change to a functionality which is:
144146
- labelled as alpha or beta
145147
- completely broken and not usable
146-
- PATCH version (0.0.x) might:
148+
- PATCH version (0.0.x) will:
147149
- fix a bug
148150
- include backward compatible changes only
149151

150152
## More documentation
151153

152-
More documentation and code examples can be found at <https://documentation.onfido.com>.
154+
Additional documentation and code examples can be found at <https://documentation.onfido.com>.
153155

154156
## Support
155157

onfido/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
""" # noqa: E501
1515

1616

17-
__version__ = "4.5.0"
17+
__version__ = "4.6.0"
1818

1919
# import apis into sdk package
2020
from onfido.api.default_api import DefaultApi

onfido/api_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ def __init__(
9090
self.default_headers[header_name] = header_value
9191
self.cookie = cookie
9292
# Set default User-Agent.
93-
self.user_agent = 'onfido-python/4.5.0'
93+
self.user_agent = 'onfido-python/4.6.0'
9494
self.client_side_validation = configuration.client_side_validation
9595

9696
def __enter__(self):

onfido/configuration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ def to_debug_report(self):
394394
"OS: {env}\n"\
395395
"Python Version: {pyversion}\n"\
396396
"Version of the API: v3.6\n"\
397-
"SDK Package Version: 4.5.0".\
397+
"SDK Package Version: 4.6.0".\
398398
format(env=sys.platform, pyversion=sys.version)
399399

400400
def get_host_settings(self):

onfido/models/id_number.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ def type_validate_enum(cls, value):
3838
if value is None:
3939
return value
4040

41-
if value not in set(['ssn', 'social_insurance', 'tax_id', 'identity_card', 'driving_licence', 'share_code', 'voter_id', 'passport', 'other']):
42-
raise ValueError("must be one of enum values ('ssn', 'social_insurance', 'tax_id', 'identity_card', 'driving_licence', 'share_code', 'voter_id', 'passport', 'other')")
41+
if value not in set(['ssn', 'social_insurance', 'tax_id', 'identity_card', 'driving_license', 'driving_licence', 'share_code', 'voter_id', 'passport', 'other']):
42+
raise ValueError("must be one of enum values ('ssn', 'social_insurance', 'tax_id', 'identity_card', 'driving_license', 'driving_licence', 'share_code', 'voter_id', 'passport', 'other')")
4343
return value
4444

4545
model_config = ConfigDict(

onfido/models/webhook_event_payload_resource.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,9 @@ class WebhookEventPayloadResource(BaseModel):
4545
reasons: Optional[List[StrictStr]] = Field(default=None, description="The reasons the Workflow Run outcome was reached. Configurable when creating the Workflow Version.")
4646
link: Optional[WorkflowRunLink] = Field(default=None, description="Object for the configuration of the Workflow Run link.")
4747
error: Optional[WorkflowRunError] = Field(default=None, description="Error object that details why a Workflow Run is in Error status.")
48+
customer_user_id: Optional[Annotated[str, Field(strict=True, max_length=256)]] = Field(default=None, description="Customer-provided user identifier.")
4849
additional_properties: Dict[str, Any] = {}
49-
__properties: ClassVar[List[str]] = ["id", "applicant_id", "created_at", "updated_at", "dashboard_url", "workflow_id", "workflow_run_id", "workflow_version_id", "task_def_id", "task_def_version", "input", "output", "reasons", "link", "error"]
50+
__properties: ClassVar[List[str]] = ["id", "applicant_id", "created_at", "updated_at", "dashboard_url", "workflow_id", "workflow_run_id", "workflow_version_id", "task_def_id", "task_def_version", "input", "output", "reasons", "link", "error", "customer_user_id"]
5051

5152
@field_validator('task_def_id')
5253
def task_def_id_validate_regular_expression(cls, value):
@@ -146,7 +147,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
146147
"output": obj.get("output"),
147148
"reasons": obj.get("reasons"),
148149
"link": WorkflowRunLink.from_dict(obj["link"]) if obj.get("link") is not None else None,
149-
"error": WorkflowRunError.from_dict(obj["error"]) if obj.get("error") is not None else None
150+
"error": WorkflowRunError.from_dict(obj["error"]) if obj.get("error") is not None else None,
151+
"customer_user_id": obj.get("customer_user_id")
150152
})
151153
# store additional fields in additional_properties
152154
for _key in obj.keys():

poetry.lock

Lines changed: 15 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "onfido-python"
3-
version = "4.5.0"
3+
version = "4.6.0"
44
description = "Python library for the Onfido API"
55
authors = ["OpenAPI Generator Community <team@openapitools.org>"]
66
license = "MIT"

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
# prerequisite: setuptools
2222
# http://pypi.python.org/pypi/setuptools
2323
NAME = "onfido-python"
24-
VERSION = "4.5.0"
24+
VERSION = "4.6.0"
2525
PYTHON_REQUIRES = ">= 3.8"
2626
REQUIRES = [
2727
"urllib3 >= 1.25.3, < 3.0.0",

0 commit comments

Comments
 (0)