Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .release.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"source": {
"repo_url": "https://github.com/onfido/onfido-openapi-spec",
"short_sha": "eb637c7",
"long_sha": "eb637c7ed2ff5a0d217bd6573cb5aed8b41401ab",
"version": "v5.7.0"
"short_sha": "84061b9",
"long_sha": "84061b9f49fb22c32125fa7bb7fe2f5c979b5e6a",
"version": "v6.0.0"
},
"release": "v5.7.0"
"release": "v6.0.0"
}
4 changes: 2 additions & 2 deletions onfido/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
""" # noqa: E501


__version__ = "5.7.0"
__version__ = "6.0.0"

# import apis into sdk package
from onfido.api.default_api import DefaultApi
Expand Down Expand Up @@ -58,7 +58,6 @@
from onfido.models.complete_task_data_builder import CompleteTaskDataBuilder
from onfido.models.country_codes import CountryCodes
from onfido.models.device_intelligence_breakdown import DeviceIntelligenceBreakdown
from onfido.models.device_intelligence_breakdown_breakdown import DeviceIntelligenceBreakdownBreakdown
from onfido.models.device_intelligence_breakdown_device import DeviceIntelligenceBreakdownDevice
from onfido.models.device_intelligence_breakdown_device_breakdown import DeviceIntelligenceBreakdownDeviceBreakdown
from onfido.models.device_intelligence_breakdown_properties import DeviceIntelligenceBreakdownProperties
Expand Down Expand Up @@ -114,6 +113,7 @@
from onfido.models.document_properties_driving_licence_information_item import DocumentPropertiesDrivingLicenceInformationItem
from onfido.models.document_properties_extracted_data import DocumentPropertiesExtractedData
from onfido.models.document_properties_nfc import DocumentPropertiesNfc
from onfido.models.document_properties_with_driving_licence_information import DocumentPropertiesWithDrivingLicenceInformation
from onfido.models.document_report import DocumentReport
from onfido.models.document_report_shared import DocumentReportShared
from onfido.models.document_response import DocumentResponse
Expand Down
52 changes: 35 additions & 17 deletions onfido/api/default_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from typing import Any, Dict, List, Optional, Tuple, Union
from typing_extensions import Annotated

from datetime import datetime
from datetime import date
from pydantic import Field, StrictBool, StrictBytes, StrictInt, StrictStr, field_validator
from typing import List, Optional, Tuple, Union
from typing_extensions import Annotated
Expand Down Expand Up @@ -17153,10 +17153,11 @@ def list_workflow_runs(
self,
page: Annotated[Optional[StrictInt], Field(description="The number of the page to be retrieved. If not specified, defaults to 1.")] = None,
status: Annotated[Optional[StrictStr], Field(description="A list of comma separated status values to filter the results. Possible values are 'processing', 'awaiting_input', 'approved', 'declined', 'review', 'abandoned' and 'error'.")] = None,
created_at_gt: Annotated[Optional[datetime], Field(description="A ISO-8601 date to filter results with a created date greater than (after) the one provided.")] = None,
created_at_lt: Annotated[Optional[datetime], Field(description="A ISO-8601 date to filter results with a created date less than (before) the one provided.")] = None,
created_at_gt: Annotated[Optional[date], Field(description="A ISO-8601 date to filter results with a created date greater than (after) the one provided.")] = None,
created_at_lt: Annotated[Optional[date], Field(description="A ISO-8601 date to filter results with a created date less than (before) the one provided.")] = None,
sort: Annotated[Optional[StrictStr], Field(description="A string with the value 'desc' or 'asc' that allows to sort the returned list by the completed datetime either descending or ascending, respectively. If not specified, defaults to 'desc'.")] = None,
applicant_id: Annotated[Optional[StrictStr], Field(description="the applicant's id.")] = None,
tags: Annotated[Optional[List[StrictStr]], Field(description="A list of tags to filter the results.")] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Expand All @@ -17179,13 +17180,15 @@ def list_workflow_runs(
:param status: A list of comma separated status values to filter the results. Possible values are 'processing', 'awaiting_input', 'approved', 'declined', 'review', 'abandoned' and 'error'.
:type status: str
:param created_at_gt: A ISO-8601 date to filter results with a created date greater than (after) the one provided.
:type created_at_gt: datetime
:type created_at_gt: date
:param created_at_lt: A ISO-8601 date to filter results with a created date less than (before) the one provided.
:type created_at_lt: datetime
:type created_at_lt: date
:param sort: A string with the value 'desc' or 'asc' that allows to sort the returned list by the completed datetime either descending or ascending, respectively. If not specified, defaults to 'desc'.
:type sort: str
:param applicant_id: the applicant's id.
:type applicant_id: str
:param tags: A list of tags to filter the results.
:type tags: List[str]
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
Expand Down Expand Up @@ -17215,6 +17218,7 @@ def list_workflow_runs(
created_at_lt=created_at_lt,
sort=sort,
applicant_id=applicant_id,
tags=tags,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
Expand All @@ -17240,10 +17244,11 @@ def list_workflow_runs_with_http_info(
self,
page: Annotated[Optional[StrictInt], Field(description="The number of the page to be retrieved. If not specified, defaults to 1.")] = None,
status: Annotated[Optional[StrictStr], Field(description="A list of comma separated status values to filter the results. Possible values are 'processing', 'awaiting_input', 'approved', 'declined', 'review', 'abandoned' and 'error'.")] = None,
created_at_gt: Annotated[Optional[datetime], Field(description="A ISO-8601 date to filter results with a created date greater than (after) the one provided.")] = None,
created_at_lt: Annotated[Optional[datetime], Field(description="A ISO-8601 date to filter results with a created date less than (before) the one provided.")] = None,
created_at_gt: Annotated[Optional[date], Field(description="A ISO-8601 date to filter results with a created date greater than (after) the one provided.")] = None,
created_at_lt: Annotated[Optional[date], Field(description="A ISO-8601 date to filter results with a created date less than (before) the one provided.")] = None,
sort: Annotated[Optional[StrictStr], Field(description="A string with the value 'desc' or 'asc' that allows to sort the returned list by the completed datetime either descending or ascending, respectively. If not specified, defaults to 'desc'.")] = None,
applicant_id: Annotated[Optional[StrictStr], Field(description="the applicant's id.")] = None,
tags: Annotated[Optional[List[StrictStr]], Field(description="A list of tags to filter the results.")] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Expand All @@ -17266,13 +17271,15 @@ def list_workflow_runs_with_http_info(
:param status: A list of comma separated status values to filter the results. Possible values are 'processing', 'awaiting_input', 'approved', 'declined', 'review', 'abandoned' and 'error'.
:type status: str
:param created_at_gt: A ISO-8601 date to filter results with a created date greater than (after) the one provided.
:type created_at_gt: datetime
:type created_at_gt: date
:param created_at_lt: A ISO-8601 date to filter results with a created date less than (before) the one provided.
:type created_at_lt: datetime
:type created_at_lt: date
:param sort: A string with the value 'desc' or 'asc' that allows to sort the returned list by the completed datetime either descending or ascending, respectively. If not specified, defaults to 'desc'.
:type sort: str
:param applicant_id: the applicant's id.
:type applicant_id: str
:param tags: A list of tags to filter the results.
:type tags: List[str]
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
Expand Down Expand Up @@ -17302,6 +17309,7 @@ def list_workflow_runs_with_http_info(
created_at_lt=created_at_lt,
sort=sort,
applicant_id=applicant_id,
tags=tags,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
Expand All @@ -17327,10 +17335,11 @@ def list_workflow_runs_without_preload_content(
self,
page: Annotated[Optional[StrictInt], Field(description="The number of the page to be retrieved. If not specified, defaults to 1.")] = None,
status: Annotated[Optional[StrictStr], Field(description="A list of comma separated status values to filter the results. Possible values are 'processing', 'awaiting_input', 'approved', 'declined', 'review', 'abandoned' and 'error'.")] = None,
created_at_gt: Annotated[Optional[datetime], Field(description="A ISO-8601 date to filter results with a created date greater than (after) the one provided.")] = None,
created_at_lt: Annotated[Optional[datetime], Field(description="A ISO-8601 date to filter results with a created date less than (before) the one provided.")] = None,
created_at_gt: Annotated[Optional[date], Field(description="A ISO-8601 date to filter results with a created date greater than (after) the one provided.")] = None,
created_at_lt: Annotated[Optional[date], Field(description="A ISO-8601 date to filter results with a created date less than (before) the one provided.")] = None,
sort: Annotated[Optional[StrictStr], Field(description="A string with the value 'desc' or 'asc' that allows to sort the returned list by the completed datetime either descending or ascending, respectively. If not specified, defaults to 'desc'.")] = None,
applicant_id: Annotated[Optional[StrictStr], Field(description="the applicant's id.")] = None,
tags: Annotated[Optional[List[StrictStr]], Field(description="A list of tags to filter the results.")] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Expand All @@ -17353,13 +17362,15 @@ def list_workflow_runs_without_preload_content(
:param status: A list of comma separated status values to filter the results. Possible values are 'processing', 'awaiting_input', 'approved', 'declined', 'review', 'abandoned' and 'error'.
:type status: str
:param created_at_gt: A ISO-8601 date to filter results with a created date greater than (after) the one provided.
:type created_at_gt: datetime
:type created_at_gt: date
:param created_at_lt: A ISO-8601 date to filter results with a created date less than (before) the one provided.
:type created_at_lt: datetime
:type created_at_lt: date
:param sort: A string with the value 'desc' or 'asc' that allows to sort the returned list by the completed datetime either descending or ascending, respectively. If not specified, defaults to 'desc'.
:type sort: str
:param applicant_id: the applicant's id.
:type applicant_id: str
:param tags: A list of tags to filter the results.
:type tags: List[str]
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
Expand Down Expand Up @@ -17389,6 +17400,7 @@ def list_workflow_runs_without_preload_content(
created_at_lt=created_at_lt,
sort=sort,
applicant_id=applicant_id,
tags=tags,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
Expand All @@ -17413,6 +17425,7 @@ def _list_workflow_runs_serialize(
created_at_lt,
sort,
applicant_id,
tags,
_request_auth,
_content_type,
_headers,
Expand All @@ -17422,6 +17435,7 @@ def _list_workflow_runs_serialize(
_host = None

_collection_formats: Dict[str, str] = {
'tags': 'csv',
}

_path_params: Dict[str, str] = {}
Expand All @@ -17444,25 +17458,25 @@ def _list_workflow_runs_serialize(
_query_params.append(('status', status))

if created_at_gt is not None:
if isinstance(created_at_gt, datetime):
if isinstance(created_at_gt, date):
_query_params.append(
(
'created_at_gt',
created_at_gt.strftime(
self.api_client.configuration.datetime_format
self.api_client.configuration.date_format
)
)
)
else:
_query_params.append(('created_at_gt', created_at_gt))

if created_at_lt is not None:
if isinstance(created_at_lt, datetime):
if isinstance(created_at_lt, date):
_query_params.append(
(
'created_at_lt',
created_at_lt.strftime(
self.api_client.configuration.datetime_format
self.api_client.configuration.date_format
)
)
)
Expand All @@ -17477,6 +17491,10 @@ def _list_workflow_runs_serialize(

_query_params.append(('applicant_id', applicant_id))

if tags is not None:

_query_params.append(('tags', tags))

# process the header parameters
# process the form parameters
# process the body parameter
Expand Down
2 changes: 1 addition & 1 deletion onfido/api_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def __init__(
self.default_headers[header_name] = header_value
self.cookie = cookie
# Set default User-Agent.
self.user_agent = 'onfido-python/5.7.0'
self.user_agent = 'onfido-python/6.0.0'
self.client_side_validation = configuration.client_side_validation

def __enter__(self):
Expand Down
2 changes: 1 addition & 1 deletion onfido/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ def to_debug_report(self) -> str:
"OS: {env}\n"\
"Python Version: {pyversion}\n"\
"Version of the API: v3.6\n"\
"SDK Package Version: 5.7.0".\
"SDK Package Version: 6.0.0".\
format(env=sys.platform, pyversion=sys.version)

def get_host_settings(self) -> List[HostSetting]:
Expand Down
2 changes: 1 addition & 1 deletion onfido/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
from onfido.models.complete_task_data_builder import CompleteTaskDataBuilder
from onfido.models.country_codes import CountryCodes
from onfido.models.device_intelligence_breakdown import DeviceIntelligenceBreakdown
from onfido.models.device_intelligence_breakdown_breakdown import DeviceIntelligenceBreakdownBreakdown
from onfido.models.device_intelligence_breakdown_device import DeviceIntelligenceBreakdownDevice
from onfido.models.device_intelligence_breakdown_device_breakdown import DeviceIntelligenceBreakdownDeviceBreakdown
from onfido.models.device_intelligence_breakdown_properties import DeviceIntelligenceBreakdownProperties
Expand Down Expand Up @@ -97,6 +96,7 @@
from onfido.models.document_properties_driving_licence_information_item import DocumentPropertiesDrivingLicenceInformationItem
from onfido.models.document_properties_extracted_data import DocumentPropertiesExtractedData
from onfido.models.document_properties_nfc import DocumentPropertiesNfc
from onfido.models.document_properties_with_driving_licence_information import DocumentPropertiesWithDrivingLicenceInformation
from onfido.models.document_report import DocumentReport
from onfido.models.document_report_shared import DocumentReportShared
from onfido.models.document_response import DocumentResponse
Expand Down
8 changes: 1 addition & 7 deletions onfido/models/device_intelligence_breakdown.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@

from pydantic import BaseModel, ConfigDict
from typing import Any, ClassVar, Dict, List, Optional
from onfido.models.device_intelligence_breakdown_breakdown import DeviceIntelligenceBreakdownBreakdown
from onfido.models.device_intelligence_breakdown_device import DeviceIntelligenceBreakdownDevice
from onfido.models.device_intelligence_breakdown_properties import DeviceIntelligenceBreakdownProperties
from typing import Optional, Set
Expand All @@ -30,10 +29,9 @@ class DeviceIntelligenceBreakdown(BaseModel):
DeviceIntelligenceBreakdown
""" # noqa: E501
device: Optional[DeviceIntelligenceBreakdownDevice] = None
breakdown: Optional[DeviceIntelligenceBreakdownBreakdown] = None
properties: Optional[DeviceIntelligenceBreakdownProperties] = None
additional_properties: Dict[str, Any] = {}
__properties: ClassVar[List[str]] = ["device", "breakdown", "properties"]
__properties: ClassVar[List[str]] = ["device", "properties"]

model_config = ConfigDict(
populate_by_name=True,
Expand Down Expand Up @@ -79,9 +77,6 @@ def to_dict(self) -> Dict[str, Any]:
# override the default output from pydantic by calling `to_dict()` of device
if self.device:
_dict['device'] = self.device.to_dict()
# override the default output from pydantic by calling `to_dict()` of breakdown
if self.breakdown:
_dict['breakdown'] = self.breakdown.to_dict()
# override the default output from pydantic by calling `to_dict()` of properties
if self.properties:
_dict['properties'] = self.properties.to_dict()
Expand All @@ -103,7 +98,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:

_obj = cls.model_validate({
"device": DeviceIntelligenceBreakdownDevice.from_dict(obj["device"]) if obj.get("device") is not None else None,
"breakdown": DeviceIntelligenceBreakdownBreakdown.from_dict(obj["breakdown"]) if obj.get("breakdown") is not None else None,
"properties": DeviceIntelligenceBreakdownProperties.from_dict(obj["properties"]) if obj.get("properties") is not None else None
})
# store additional fields in additional_properties
Expand Down
Loading