onfido-python 4.4.0__py3-none-any.whl → 4.6.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 CHANGED
@@ -14,7 +14,7 @@
14
14
  """ # noqa: E501
15
15
 
16
16
 
17
- __version__ = "4.4.0"
17
+ __version__ = "4.6.0"
18
18
 
19
19
  # import apis into sdk package
20
20
  from onfido.api.default_api import DefaultApi
onfido/api/default_api.py CHANGED
@@ -3847,6 +3847,271 @@ class DefaultApi:
3847
3847
 
3848
3848
 
3849
3849
 
3850
+ @validate_call
3851
+ def download_evidence_folder(
3852
+ self,
3853
+ workflow_run_id: Annotated[StrictStr, Field(description="Workflow Run ID")],
3854
+ _request_timeout: Union[
3855
+ None,
3856
+ Annotated[StrictFloat, Field(gt=0)],
3857
+ Tuple[
3858
+ Annotated[StrictFloat, Field(gt=0)],
3859
+ Annotated[StrictFloat, Field(gt=0)]
3860
+ ]
3861
+ ] = None,
3862
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3863
+ _content_type: Optional[StrictStr] = None,
3864
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3865
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3866
+ ) -> bytearray:
3867
+ """Retrieve Workflow Run Evidence Folder
3868
+
3869
+ Retrieves the evidence folder for the designated Workflow Run
3870
+
3871
+ :param workflow_run_id: Workflow Run ID (required)
3872
+ :type workflow_run_id: str
3873
+ :param _request_timeout: timeout setting for this request. If one
3874
+ number provided, it will be total request
3875
+ timeout. It can also be a pair (tuple) of
3876
+ (connection, read) timeouts.
3877
+ :type _request_timeout: int, tuple(int, int), optional
3878
+ :param _request_auth: set to override the auth_settings for an a single
3879
+ request; this effectively ignores the
3880
+ authentication in the spec for a single request.
3881
+ :type _request_auth: dict, optional
3882
+ :param _content_type: force content-type for the request.
3883
+ :type _content_type: str, Optional
3884
+ :param _headers: set to override the headers for a single
3885
+ request; this effectively ignores the headers
3886
+ in the spec for a single request.
3887
+ :type _headers: dict, optional
3888
+ :param _host_index: set to override the host_index for a single
3889
+ request; this effectively ignores the host_index
3890
+ in the spec for a single request.
3891
+ :type _host_index: int, optional
3892
+ :return: Returns the result object.
3893
+ """ # noqa: E501
3894
+
3895
+ _param = self._download_evidence_folder_serialize(
3896
+ workflow_run_id=workflow_run_id,
3897
+ _request_auth=_request_auth,
3898
+ _content_type=_content_type,
3899
+ _headers=_headers,
3900
+ _host_index=_host_index
3901
+ )
3902
+
3903
+ _response_types_map: Dict[str, Optional[str]] = {
3904
+ '302': None,
3905
+ '200': "bytearray",
3906
+ }
3907
+ response_data = self.api_client.call_api(
3908
+ *_param,
3909
+ _request_timeout=_request_timeout
3910
+ )
3911
+ response_data.read()
3912
+ return self.api_client.response_deserialize(
3913
+ response_data=response_data,
3914
+ response_types_map=_response_types_map,
3915
+ ).data
3916
+
3917
+
3918
+ @validate_call
3919
+ def download_evidence_folder_with_http_info(
3920
+ self,
3921
+ workflow_run_id: Annotated[StrictStr, Field(description="Workflow Run ID")],
3922
+ _request_timeout: Union[
3923
+ None,
3924
+ Annotated[StrictFloat, Field(gt=0)],
3925
+ Tuple[
3926
+ Annotated[StrictFloat, Field(gt=0)],
3927
+ Annotated[StrictFloat, Field(gt=0)]
3928
+ ]
3929
+ ] = None,
3930
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3931
+ _content_type: Optional[StrictStr] = None,
3932
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3933
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3934
+ ) -> ApiResponse[bytearray]:
3935
+ """Retrieve Workflow Run Evidence Folder
3936
+
3937
+ Retrieves the evidence folder for the designated Workflow Run
3938
+
3939
+ :param workflow_run_id: Workflow Run ID (required)
3940
+ :type workflow_run_id: str
3941
+ :param _request_timeout: timeout setting for this request. If one
3942
+ number provided, it will be total request
3943
+ timeout. It can also be a pair (tuple) of
3944
+ (connection, read) timeouts.
3945
+ :type _request_timeout: int, tuple(int, int), optional
3946
+ :param _request_auth: set to override the auth_settings for an a single
3947
+ request; this effectively ignores the
3948
+ authentication in the spec for a single request.
3949
+ :type _request_auth: dict, optional
3950
+ :param _content_type: force content-type for the request.
3951
+ :type _content_type: str, Optional
3952
+ :param _headers: set to override the headers for a single
3953
+ request; this effectively ignores the headers
3954
+ in the spec for a single request.
3955
+ :type _headers: dict, optional
3956
+ :param _host_index: set to override the host_index for a single
3957
+ request; this effectively ignores the host_index
3958
+ in the spec for a single request.
3959
+ :type _host_index: int, optional
3960
+ :return: Returns the result object.
3961
+ """ # noqa: E501
3962
+
3963
+ _param = self._download_evidence_folder_serialize(
3964
+ workflow_run_id=workflow_run_id,
3965
+ _request_auth=_request_auth,
3966
+ _content_type=_content_type,
3967
+ _headers=_headers,
3968
+ _host_index=_host_index
3969
+ )
3970
+
3971
+ _response_types_map: Dict[str, Optional[str]] = {
3972
+ '302': None,
3973
+ '200': "bytearray",
3974
+ }
3975
+ response_data = self.api_client.call_api(
3976
+ *_param,
3977
+ _request_timeout=_request_timeout
3978
+ )
3979
+ response_data.read()
3980
+ return self.api_client.response_deserialize(
3981
+ response_data=response_data,
3982
+ response_types_map=_response_types_map,
3983
+ )
3984
+
3985
+
3986
+ @validate_call
3987
+ def download_evidence_folder_without_preload_content(
3988
+ self,
3989
+ workflow_run_id: Annotated[StrictStr, Field(description="Workflow Run ID")],
3990
+ _request_timeout: Union[
3991
+ None,
3992
+ Annotated[StrictFloat, Field(gt=0)],
3993
+ Tuple[
3994
+ Annotated[StrictFloat, Field(gt=0)],
3995
+ Annotated[StrictFloat, Field(gt=0)]
3996
+ ]
3997
+ ] = None,
3998
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3999
+ _content_type: Optional[StrictStr] = None,
4000
+ _headers: Optional[Dict[StrictStr, Any]] = None,
4001
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
4002
+ ) -> RESTResponseType:
4003
+ """Retrieve Workflow Run Evidence Folder
4004
+
4005
+ Retrieves the evidence folder for the designated Workflow Run
4006
+
4007
+ :param workflow_run_id: Workflow Run ID (required)
4008
+ :type workflow_run_id: str
4009
+ :param _request_timeout: timeout setting for this request. If one
4010
+ number provided, it will be total request
4011
+ timeout. It can also be a pair (tuple) of
4012
+ (connection, read) timeouts.
4013
+ :type _request_timeout: int, tuple(int, int), optional
4014
+ :param _request_auth: set to override the auth_settings for an a single
4015
+ request; this effectively ignores the
4016
+ authentication in the spec for a single request.
4017
+ :type _request_auth: dict, optional
4018
+ :param _content_type: force content-type for the request.
4019
+ :type _content_type: str, Optional
4020
+ :param _headers: set to override the headers for a single
4021
+ request; this effectively ignores the headers
4022
+ in the spec for a single request.
4023
+ :type _headers: dict, optional
4024
+ :param _host_index: set to override the host_index for a single
4025
+ request; this effectively ignores the host_index
4026
+ in the spec for a single request.
4027
+ :type _host_index: int, optional
4028
+ :return: Returns the result object.
4029
+ """ # noqa: E501
4030
+
4031
+ _param = self._download_evidence_folder_serialize(
4032
+ workflow_run_id=workflow_run_id,
4033
+ _request_auth=_request_auth,
4034
+ _content_type=_content_type,
4035
+ _headers=_headers,
4036
+ _host_index=_host_index
4037
+ )
4038
+
4039
+ _response_types_map: Dict[str, Optional[str]] = {
4040
+ '302': None,
4041
+ '200': "bytearray",
4042
+ }
4043
+ response_data = self.api_client.call_api(
4044
+ *_param,
4045
+ _request_timeout=_request_timeout
4046
+ )
4047
+ return response_data.response
4048
+
4049
+
4050
+ def _download_evidence_folder_serialize(
4051
+ self,
4052
+ workflow_run_id,
4053
+ _request_auth,
4054
+ _content_type,
4055
+ _headers,
4056
+ _host_index,
4057
+ ) -> RequestSerialized:
4058
+
4059
+ _host = None
4060
+
4061
+ _collection_formats: Dict[str, str] = {
4062
+ }
4063
+
4064
+ _path_params: Dict[str, str] = {}
4065
+ _query_params: List[Tuple[str, str]] = []
4066
+ _header_params: Dict[str, Optional[str]] = _headers or {}
4067
+ _form_params: List[Tuple[str, str]] = []
4068
+ _files: Dict[
4069
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
4070
+ ] = {}
4071
+ _body_params: Optional[bytes] = None
4072
+
4073
+ # process the path parameters
4074
+ if workflow_run_id is not None:
4075
+ _path_params['workflow_run_id'] = workflow_run_id
4076
+ # process the query parameters
4077
+ # process the header parameters
4078
+ # process the form parameters
4079
+ # process the body parameter
4080
+
4081
+
4082
+ # set the HTTP header `Accept`
4083
+ if 'Accept' not in _header_params:
4084
+ _header_params['Accept'] = self.api_client.select_header_accept(
4085
+ [
4086
+ 'application/zip',
4087
+ 'application/json'
4088
+ ]
4089
+ )
4090
+
4091
+
4092
+ # authentication setting
4093
+ _auth_settings: List[str] = [
4094
+ 'Token'
4095
+ ]
4096
+
4097
+ return self.api_client.param_serialize(
4098
+ method='GET',
4099
+ resource_path='/workflow_runs/{workflow_run_id}/evidence_folder',
4100
+ path_params=_path_params,
4101
+ query_params=_query_params,
4102
+ header_params=_header_params,
4103
+ body=_body_params,
4104
+ post_params=_form_params,
4105
+ files=_files,
4106
+ auth_settings=_auth_settings,
4107
+ collection_formats=_collection_formats,
4108
+ _host=_host,
4109
+ _request_auth=_request_auth
4110
+ )
4111
+
4112
+
4113
+
4114
+
3850
4115
  @validate_call
3851
4116
  def download_id_photo(
3852
4117
  self,
onfido/api_client.py CHANGED
@@ -90,7 +90,7 @@ class ApiClient:
90
90
  self.default_headers[header_name] = header_value
91
91
  self.cookie = cookie
92
92
  # Set default User-Agent.
93
- self.user_agent = 'onfido-python/4.4.0'
93
+ self.user_agent = 'onfido-python/4.6.0'
94
94
  self.client_side_validation = configuration.client_side_validation
95
95
 
96
96
  def __enter__(self):
onfido/configuration.py CHANGED
@@ -394,7 +394,7 @@ conf = onfido.Configuration(
394
394
  "OS: {env}\n"\
395
395
  "Python Version: {pyversion}\n"\
396
396
  "Version of the API: v3.6\n"\
397
- "SDK Package Version: 4.4.0".\
397
+ "SDK Package Version: 4.6.0".\
398
398
  format(env=sys.platform, pyversion=sys.version)
399
399
 
400
400
  def get_host_settings(self):
@@ -38,8 +38,8 @@ class IdNumber(BaseModel):
38
38
  if value is None:
39
39
  return value
40
40
 
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')")
43
43
  return value
44
44
 
45
45
  model_config = ConfigDict(
@@ -45,8 +45,9 @@ class WebhookEventPayloadResource(BaseModel):
45
45
  reasons: Optional[List[StrictStr]] = Field(default=None, description="The reasons the Workflow Run outcome was reached. Configurable when creating the Workflow Version.")
46
46
  link: Optional[WorkflowRunLink] = Field(default=None, description="Object for the configuration of the Workflow Run link.")
47
47
  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.")
48
49
  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"]
50
51
 
51
52
  @field_validator('task_def_id')
52
53
  def task_def_id_validate_regular_expression(cls, value):
@@ -146,7 +147,8 @@ class WebhookEventPayloadResource(BaseModel):
146
147
  "output": obj.get("output"),
147
148
  "reasons": obj.get("reasons"),
148
149
  "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")
150
152
  })
151
153
  # store additional fields in additional_properties
152
154
  for _key in obj.keys():
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.2
2
2
  Name: onfido-python
3
- Version: 4.4.0
3
+ Version: 4.6.0
4
4
  Summary: Python library for the Onfido API
5
5
  Home-page:
6
6
  Author: OpenAPI Generator community
@@ -13,6 +13,14 @@ Requires-Dist: urllib3<3.0.0,>=1.25.3
13
13
  Requires-Dist: python-dateutil>=2.8.2
14
14
  Requires-Dist: pydantic>=2
15
15
  Requires-Dist: typing-extensions>=4.7.1
16
+ Dynamic: author
17
+ Dynamic: author-email
18
+ Dynamic: description
19
+ Dynamic: description-content-type
20
+ Dynamic: keywords
21
+ Dynamic: license
22
+ Dynamic: requires-dist
23
+ Dynamic: summary
16
24
 
17
25
  The Onfido API (v3.6)
18
26
 
@@ -1,13 +1,13 @@
1
- onfido/__init__.py,sha256=zcNjYI_unnb1qaR30pVOyiJkXHnzQfmK4F8QeBaK-uM,28658
2
- onfido/api_client.py,sha256=lql3mwRQBgxK4tLxD7ZaEDXgnn4cCqGadI_SLs-bwKg,27329
1
+ onfido/__init__.py,sha256=fHHWxi8IY7jZAxUSnK2vHrLOV_ADikvdqrCQY5GysII,28658
2
+ onfido/api_client.py,sha256=mV9VOHYwcCL3UpDJmLjrFLXuzZrHZ532a-7Sp5Sem9s,27329
3
3
  onfido/api_response.py,sha256=eMxw1mpmJcoGZ3gs9z6jM4oYoZ10Gjk333s9sKxGv7s,652
4
- onfido/configuration.py,sha256=SCZ792TldwRxNXWSzYNgQvtLohzYmfDQGr9f8iumZ2A,15012
4
+ onfido/configuration.py,sha256=ANsRZl6rruHhNHvO0NSgTBNhYZHaYttmKC4GspAT1PU,15012
5
5
  onfido/exceptions.py,sha256=5W4DJIPVwIzljxoedh5czPXOTBaq6CTTVD92h5ZyN88,5894
6
6
  onfido/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
7
  onfido/rest.py,sha256=kI5k8RQ6_BemD6Zx99dJDmr7zwA1mSrHLlba2WwwoMM,9419
8
8
  onfido/webhook_event_verifier.py,sha256=3BSbY5D8NTXDbxCX0POuyu5a09dEeWgmikrTe_pttkI,814
9
9
  onfido/api/__init__.py,sha256=hqeJm_GD67zukfFQ-H5PPPxYgZZ0DKOMPGTNRAjc3gw,94
10
- onfido/api/default_api.py,sha256=kWMykJ4nLgi4oYBgLXG88Lm38B6UhMzG1KixOkSJSag,696717
10
+ onfido/api/default_api.py,sha256=1wPurpTPujKLD24OgqZqZ_pTOz1a_PpQhsQqcyKcr5w,707122
11
11
  onfido/models/__init__.py,sha256=Zzg8rYhIMdXSQf5d5C2G15jnbnHWsMHwo0KCp2R5NqU,28006
12
12
  onfido/models/address.py,sha256=47oVzKVhn6Qxd24HMIuAQmVKgHPyfOnlFmBnthi2wOE,6812
13
13
  onfido/models/address_builder.py,sha256=SjuOn2_T7Yic2l7qhaxd-euaijx85BziRkunp5j292M,6840
@@ -157,7 +157,7 @@ onfido/models/facial_similarity_video_breakdown_visual_authenticity_breakdown_li
157
157
  onfido/models/facial_similarity_video_breakdown_visual_authenticity_breakdown_spoofing_detection.py,sha256=RRBNzE6u9YXQ8PmJxOa6kNdWineFm6EEg4qtPGTZcws,3974
158
158
  onfido/models/facial_similarity_video_properties.py,sha256=ICtG2ymOwHxDh0yLWeW5D8kvKBw8TJO752w3Vp9msBU,3400
159
159
  onfido/models/facial_similarity_video_report.py,sha256=3E9EtYOzfxpQ37PY6nhaj1A4pbC_dEkYuBTSu_m3fmw,8914
160
- onfido/models/id_number.py,sha256=iOfUgB49KpWxEf6HjEvvx3w2DHBGc-bXRYODzJQHA0Q,3913
160
+ onfido/models/id_number.py,sha256=-rSMPPNrhnEjKJXfgPuZj3PLeHtHRMuv04FNhfBfzA4,3951
161
161
  onfido/models/id_photo.py,sha256=MINVgfDRrOPPTZFyL-wYxQvmOHTXs9qKT3rbtMJksro,4085
162
162
  onfido/models/id_photo_response.py,sha256=MzNcewhNkp86SNn1JdTyy8yfhR-4m4tnWyIU2-3YA3s,4117
163
163
  onfido/models/id_photos_list.py,sha256=cng280Pm_0uVGfxHtJ1jGFDM4XXCRtsBJDxYnwbvw-8,3462
@@ -281,7 +281,7 @@ onfido/models/webhook_event.py,sha256=g5lobXwKJsA0J34puBVMcLbm7vcrVlZoFTuvRvCFE9
281
281
  onfido/models/webhook_event_object_status.py,sha256=4jEEia3Ecbji5bNaD4weG21BrgucVod3EKnEdKVJF6A,1267
282
282
  onfido/models/webhook_event_payload.py,sha256=aHlXjU0FX3F30zau9JBDkZqsZ2HgeBd_QXN19cNiRVo,4317
283
283
  onfido/models/webhook_event_payload_object.py,sha256=VbRajHlUahupevBm464VVuVWbYS4NrsXpEJFgC20KmU,3912
284
- onfido/models/webhook_event_payload_resource.py,sha256=sGoNAlIX4AjxfM_QN3IglsHOxT4KVpB1Ba2jTxUkxbo,7245
284
+ onfido/models/webhook_event_payload_resource.py,sha256=7kWajSY3e_1Pe7aT04z5AMIcPSKpdYBNkgJNR-07C1Q,7481
285
285
  onfido/models/webhook_event_resource_type.py,sha256=paadOwFMD8K8JCuBCAE3F_sWV-32HD3qhkabEl1Ae0E,967
286
286
  onfido/models/webhook_event_type.py,sha256=S863kbG9lmTrvxcRUTHpKA5Nng9-uD-naW7XP2nVbS4,1655
287
287
  onfido/models/webhook_resend.py,sha256=H_qpNUnh0y1FJQUy1B6ngY69iH7nHU9qjglRXLXKmPc,3478
@@ -299,8 +299,8 @@ onfido/models/workflow_run_request.py,sha256=IGCpkcvqn6kJ2L2nZeuBHNeANqcSUfvx0Ig
299
299
  onfido/models/workflow_run_response.py,sha256=Ze469zDUWxZMxqIxas6Sjts3EB21z7PhZTfuWgs0Thw,5080
300
300
  onfido/models/workflow_run_shared.py,sha256=WP9qLkf79iaJTeK-QxkwzB2MvR4atT3LdZZRmZopPp4,4857
301
301
  onfido/models/workflow_run_status.py,sha256=34P9aHn0FEAirtAo64ej00LH4h-3V36ShZG1XbS_hZo,884
302
- onfido_python-4.4.0.dist-info/LICENSE,sha256=SKY_O1OkFX8yNWFuVVfYTsXvN46jsgtff-xReserHw4,1073
303
- onfido_python-4.4.0.dist-info/METADATA,sha256=pBw-j-Pj_kS6IU_U3Wz_6RgeOD8w1PGuXKcvmzqy4Wc,486
304
- onfido_python-4.4.0.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
305
- onfido_python-4.4.0.dist-info/top_level.txt,sha256=NHu8xI4S4Avh7xUark3dpdk9atpIVgyf-ptjHXU0-Ns,7
306
- onfido_python-4.4.0.dist-info/RECORD,,
302
+ onfido_python-4.6.0.dist-info/LICENSE,sha256=SKY_O1OkFX8yNWFuVVfYTsXvN46jsgtff-xReserHw4,1073
303
+ onfido_python-4.6.0.dist-info/METADATA,sha256=k0vuk4kzUWkXBO3N3do_F2FlQPf5sN3wVmFcLQPIsbc,654
304
+ onfido_python-4.6.0.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
305
+ onfido_python-4.6.0.dist-info/top_level.txt,sha256=NHu8xI4S4Avh7xUark3dpdk9atpIVgyf-ptjHXU0-Ns,7
306
+ onfido_python-4.6.0.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (75.6.0)
2
+ Generator: setuptools (75.8.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5