onfido-python 2.10.1__py3-none-any.whl → 3.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.
- onfido/__init__.py +311 -2
- onfido/api/__init__.py +5 -0
- onfido/api/default_api.py +17207 -0
- onfido/api_client.py +770 -0
- onfido/api_response.py +21 -0
- onfido/configuration.py +460 -0
- onfido/exceptions.py +184 -77
- onfido/models/__init__.py +291 -0
- onfido/models/address.py +169 -0
- onfido/models/address_builder.py +169 -0
- onfido/models/address_shared.py +169 -0
- onfido/models/addresses_list.py +108 -0
- onfido/models/applicant.py +162 -0
- onfido/models/applicant_builder.py +152 -0
- onfido/models/applicant_create.py +117 -0
- onfido/models/applicant_request.py +116 -0
- onfido/models/applicant_response.py +146 -0
- onfido/models/applicant_shared.py +115 -0
- onfido/models/applicant_update.py +123 -0
- onfido/models/applicant_updater.py +158 -0
- onfido/models/applicants_list.py +108 -0
- onfido/models/check.py +147 -0
- onfido/models/check_builder.py +127 -0
- onfido/models/check_request.py +119 -0
- onfido/models/check_response.py +137 -0
- onfido/models/check_shared.py +108 -0
- onfido/models/checks_list.py +108 -0
- onfido/models/complete_task_builder.py +104 -0
- onfido/models/complete_task_data_builder.py +143 -0
- onfido/models/consent_item.py +109 -0
- onfido/models/consents_builder.py +98 -0
- onfido/models/country_codes.py +285 -0
- onfido/models/device_intelligence_breakdown.py +110 -0
- onfido/models/device_intelligence_breakdown_breakdown.py +104 -0
- onfido/models/device_intelligence_breakdown_breakdown_device.py +104 -0
- onfido/models/device_intelligence_breakdown_breakdown_device_breakdown.py +114 -0
- onfido/models/device_intelligence_breakdown_properties.py +116 -0
- onfido/models/device_intelligence_breakdown_properties_device.py +189 -0
- onfido/models/device_intelligence_breakdown_properties_geolocation.py +105 -0
- onfido/models/device_intelligence_breakdown_properties_ip.py +106 -0
- onfido/models/device_intelligence_report.py +135 -0
- onfido/models/document.py +142 -0
- onfido/models/document_breakdown.py +152 -0
- onfido/models/document_breakdown_age_validation.py +106 -0
- onfido/models/document_breakdown_age_validation_breakdown.py +104 -0
- onfido/models/document_breakdown_compromised_document.py +106 -0
- onfido/models/document_breakdown_compromised_document_breakdown.py +109 -0
- onfido/models/document_breakdown_data_comparison.py +106 -0
- onfido/models/document_breakdown_data_comparison_breakdown.py +139 -0
- onfido/models/document_breakdown_data_comparison_breakdown_issuing_country.py +102 -0
- onfido/models/document_breakdown_data_consistency.py +106 -0
- onfido/models/document_breakdown_data_consistency_breakdown.py +149 -0
- onfido/models/document_breakdown_data_validation.py +106 -0
- onfido/models/document_breakdown_data_validation_breakdown.py +136 -0
- onfido/models/document_breakdown_data_validation_breakdown_document_expiration.py +102 -0
- onfido/models/document_breakdown_data_validation_breakdown_expiry_date.py +102 -0
- onfido/models/document_breakdown_image_integrity.py +106 -0
- onfido/models/document_breakdown_image_integrity_breakdown.py +122 -0
- onfido/models/document_breakdown_image_integrity_breakdown_colour_picture.py +102 -0
- onfido/models/document_breakdown_image_integrity_breakdown_conclusive_document_quality.py +106 -0
- onfido/models/document_breakdown_image_integrity_breakdown_image_quality.py +106 -0
- onfido/models/document_breakdown_image_integrity_breakdown_supported_document.py +102 -0
- onfido/models/document_breakdown_issuing_authority.py +106 -0
- onfido/models/document_breakdown_issuing_authority_breakdown.py +110 -0
- onfido/models/document_breakdown_issuing_authority_breakdown_nfc_active_authentication.py +102 -0
- onfido/models/document_breakdown_issuing_authority_breakdown_nfc_passive_authentication.py +102 -0
- onfido/models/document_breakdown_police_record.py +100 -0
- onfido/models/document_breakdown_visual_authenticity.py +106 -0
- onfido/models/document_breakdown_visual_authenticity_breakdown.py +146 -0
- onfido/models/document_breakdown_visual_authenticity_breakdown_digital_tampering.py +102 -0
- onfido/models/document_breakdown_visual_authenticity_breakdown_face_detection.py +102 -0
- onfido/models/document_breakdown_visual_authenticity_breakdown_fonts.py +102 -0
- onfido/models/document_breakdown_visual_authenticity_breakdown_original_document_present.py +106 -0
- onfido/models/document_breakdown_visual_authenticity_breakdown_other.py +102 -0
- onfido/models/document_breakdown_visual_authenticity_breakdown_picture_face_integrity.py +102 -0
- onfido/models/document_breakdown_visual_authenticity_breakdown_security_features.py +102 -0
- onfido/models/document_breakdown_visual_authenticity_breakdown_template.py +102 -0
- onfido/models/document_cdq_reasons.py +114 -0
- onfido/models/document_iq_reasons.py +118 -0
- onfido/models/document_odp_reasons.py +106 -0
- onfido/models/document_properties.py +191 -0
- onfido/models/document_properties_address_lines.py +110 -0
- onfido/models/document_properties_barcode_inner.py +135 -0
- onfido/models/document_properties_document_classification.py +104 -0
- onfido/models/document_properties_document_numbers_inner.py +102 -0
- onfido/models/document_properties_driving_licence_information.py +107 -0
- onfido/models/document_properties_extracted_data.py +141 -0
- onfido/models/document_properties_nfc.py +125 -0
- onfido/models/document_report.py +141 -0
- onfido/models/document_response.py +111 -0
- onfido/models/document_shared.py +129 -0
- onfido/models/document_types.py +60 -0
- onfido/models/document_video_report.py +141 -0
- onfido/models/document_video_with_address_information_report.py +141 -0
- onfido/models/document_with_address_information_report.py +141 -0
- onfido/models/document_with_driver_verification_report.py +141 -0
- onfido/models/document_with_driver_verification_report_all_of_properties.py +215 -0
- onfido/models/document_with_driver_verification_report_all_of_properties_all_of_passenger_vehicle.py +105 -0
- onfido/models/document_with_driver_verification_report_all_of_properties_all_of_vehicle_class_details_inner.py +107 -0
- onfido/models/document_with_driving_licence_information_report.py +141 -0
- onfido/models/documents_list.py +108 -0
- onfido/models/error.py +104 -0
- onfido/models/error1.py +106 -0
- onfido/models/error_properties.py +104 -0
- onfido/models/error_properties1.py +102 -0
- onfido/models/extract_request.py +100 -0
- onfido/models/extraction.py +112 -0
- onfido/models/extraction_document_classification.py +120 -0
- onfido/models/extraction_extracted_data.py +176 -0
- onfido/models/facial_similarity_motion_breakdown.py +116 -0
- onfido/models/facial_similarity_motion_breakdown_face_comparison.py +106 -0
- onfido/models/facial_similarity_motion_breakdown_image_integrity.py +106 -0
- onfido/models/facial_similarity_motion_breakdown_image_integrity_breakdown.py +110 -0
- onfido/models/facial_similarity_motion_breakdown_image_integrity_breakdown_face_detected.py +102 -0
- onfido/models/facial_similarity_motion_breakdown_image_integrity_breakdown_source_integrity.py +106 -0
- onfido/models/facial_similarity_motion_breakdown_visual_authenticity.py +106 -0
- onfido/models/facial_similarity_motion_breakdown_visual_authenticity_breakdown.py +110 -0
- onfido/models/facial_similarity_motion_breakdown_visual_authenticity_breakdown_spoofing_detection.py +106 -0
- onfido/models/facial_similarity_motion_properties.py +100 -0
- onfido/models/facial_similarity_motion_report.py +141 -0
- onfido/models/facial_similarity_photo_breakdown.py +116 -0
- onfido/models/facial_similarity_photo_breakdown_face_comparison.py +106 -0
- onfido/models/facial_similarity_photo_breakdown_face_comparison_breakdown.py +104 -0
- onfido/models/facial_similarity_photo_breakdown_face_comparison_breakdown_face_match.py +106 -0
- onfido/models/facial_similarity_photo_breakdown_face_comparison_breakdown_face_match_properties.py +102 -0
- onfido/models/facial_similarity_photo_breakdown_image_integrity.py +106 -0
- onfido/models/facial_similarity_photo_breakdown_image_integrity_breakdown.py +110 -0
- onfido/models/facial_similarity_photo_breakdown_image_integrity_breakdown_face_detected.py +102 -0
- onfido/models/facial_similarity_photo_breakdown_image_integrity_breakdown_source_integrity.py +106 -0
- onfido/models/facial_similarity_photo_breakdown_visual_authenticity.py +106 -0
- onfido/models/facial_similarity_photo_breakdown_visual_authenticity_breakdown.py +104 -0
- onfido/models/facial_similarity_photo_breakdown_visual_authenticity_breakdown_spoofing_detection.py +106 -0
- onfido/models/facial_similarity_photo_breakdown_visual_authenticity_breakdown_spoofing_detection_properties.py +100 -0
- onfido/models/facial_similarity_photo_fully_auto_breakdown.py +116 -0
- onfido/models/facial_similarity_photo_fully_auto_breakdown_image_integrity.py +106 -0
- onfido/models/facial_similarity_photo_fully_auto_breakdown_image_integrity_breakdown.py +110 -0
- onfido/models/facial_similarity_photo_fully_auto_breakdown_image_integrity_breakdown_source_integrity.py +106 -0
- onfido/models/facial_similarity_photo_fully_auto_properties.py +100 -0
- onfido/models/facial_similarity_photo_fully_auto_report.py +141 -0
- onfido/models/facial_similarity_photo_properties.py +100 -0
- onfido/models/facial_similarity_photo_report.py +141 -0
- onfido/models/facial_similarity_video_breakdown.py +116 -0
- onfido/models/facial_similarity_video_breakdown_face_comparison.py +106 -0
- onfido/models/facial_similarity_video_breakdown_image_integrity.py +106 -0
- onfido/models/facial_similarity_video_breakdown_image_integrity_breakdown.py +110 -0
- onfido/models/facial_similarity_video_breakdown_image_integrity_breakdown_face_detected.py +102 -0
- onfido/models/facial_similarity_video_breakdown_image_integrity_breakdown_source_integrity.py +106 -0
- onfido/models/facial_similarity_video_breakdown_visual_authenticity.py +106 -0
- onfido/models/facial_similarity_video_breakdown_visual_authenticity_breakdown.py +110 -0
- onfido/models/facial_similarity_video_breakdown_visual_authenticity_breakdown_liveness_detected.py +102 -0
- onfido/models/facial_similarity_video_breakdown_visual_authenticity_breakdown_spoofing_detection.py +106 -0
- onfido/models/facial_similarity_video_properties.py +100 -0
- onfido/models/facial_similarity_video_report.py +141 -0
- onfido/models/id_number.py +114 -0
- onfido/models/id_photo.py +113 -0
- onfido/models/id_photo_response.py +113 -0
- onfido/models/id_photos_list.py +108 -0
- onfido/models/identity_enhanced_breakdown.py +122 -0
- onfido/models/identity_enhanced_breakdown_address.py +106 -0
- onfido/models/identity_enhanced_breakdown_address_breakdown.py +116 -0
- onfido/models/identity_enhanced_breakdown_address_breakdown_credit_agencies.py +106 -0
- onfido/models/identity_enhanced_breakdown_address_breakdown_credit_agencies_properties.py +100 -0
- onfido/models/identity_enhanced_breakdown_address_breakdown_telephone_database.py +102 -0
- onfido/models/identity_enhanced_breakdown_address_breakdown_voting_register.py +102 -0
- onfido/models/identity_enhanced_breakdown_date_of_birth.py +106 -0
- onfido/models/identity_enhanced_breakdown_date_of_birth_breakdown.py +110 -0
- onfido/models/identity_enhanced_breakdown_date_of_birth_breakdown_credit_agencies.py +102 -0
- onfido/models/identity_enhanced_breakdown_date_of_birth_breakdown_voting_register.py +102 -0
- onfido/models/identity_enhanced_breakdown_mortality.py +100 -0
- onfido/models/identity_enhanced_breakdown_sources.py +106 -0
- onfido/models/identity_enhanced_breakdown_sources_breakdown.py +104 -0
- onfido/models/identity_enhanced_breakdown_sources_breakdown_total_sources.py +106 -0
- onfido/models/identity_enhanced_breakdown_sources_breakdown_total_sources_properties.py +100 -0
- onfido/models/identity_enhanced_properties.py +110 -0
- onfido/models/identity_enhanced_properties_matched_addresses_inner.py +102 -0
- onfido/models/identity_enhanced_report.py +141 -0
- onfido/models/india_pan_report.py +141 -0
- onfido/models/india_pan_report_all_of_breakdown.py +104 -0
- onfido/models/india_pan_report_all_of_breakdown_device.py +104 -0
- onfido/models/india_pan_report_all_of_breakdown_device_breakdown.py +109 -0
- onfido/models/india_pan_report_all_of_breakdown_device_breakdown_pan_valid.py +100 -0
- onfido/models/india_pan_report_all_of_properties.py +104 -0
- onfido/models/india_pan_report_all_of_properties_device.py +102 -0
- onfido/models/known_faces_breakdown.py +110 -0
- onfido/models/known_faces_breakdown_image_integrity.py +100 -0
- onfido/models/known_faces_breakdown_previously_seen_faces.py +100 -0
- onfido/models/known_faces_properties.py +108 -0
- onfido/models/known_faces_properties_matches_inner.py +108 -0
- onfido/models/known_faces_report.py +141 -0
- onfido/models/live_photo.py +113 -0
- onfido/models/live_photo_response.py +113 -0
- onfido/models/live_photos_list.py +108 -0
- onfido/models/live_video.py +115 -0
- onfido/models/live_videos_list.py +108 -0
- onfido/models/location.py +103 -0
- onfido/models/location_builder.py +103 -0
- onfido/models/location_shared.py +103 -0
- onfido/models/motion_capture.py +113 -0
- onfido/models/motion_captures_list.py +108 -0
- onfido/models/photo_auto_reasons.py +108 -0
- onfido/models/photo_reasons.py +108 -0
- onfido/models/proof_of_address_breakdown.py +116 -0
- onfido/models/proof_of_address_breakdown_data_comparison.py +106 -0
- onfido/models/proof_of_address_breakdown_data_comparison_breakdown.py +114 -0
- onfido/models/proof_of_address_breakdown_document_classification.py +106 -0
- onfido/models/proof_of_address_breakdown_document_classification_breakdown.py +104 -0
- onfido/models/proof_of_address_breakdown_image_integrity.py +106 -0
- onfido/models/proof_of_address_breakdown_image_integrity_breakdown.py +104 -0
- onfido/models/proof_of_address_properties.py +125 -0
- onfido/models/proof_of_address_report.py +141 -0
- onfido/models/repeat_attempts_list.py +117 -0
- onfido/models/repeat_attempts_list_repeat_attempts_inner.py +143 -0
- onfido/models/report.py +621 -0
- onfido/models/report_document.py +100 -0
- onfido/models/report_name.py +56 -0
- onfido/models/report_result.py +38 -0
- onfido/models/report_shared.py +129 -0
- onfido/models/report_status.py +40 -0
- onfido/models/report_sub_result.py +39 -0
- onfido/models/reports_list.py +108 -0
- onfido/models/results_feedback.py +116 -0
- onfido/models/sdk_token.py +100 -0
- onfido/models/sdk_token_builder.py +106 -0
- onfido/models/sdk_token_request.py +106 -0
- onfido/models/sdk_token_response.py +100 -0
- onfido/models/task.py +146 -0
- onfido/models/task_item.py +128 -0
- onfido/models/timeline_file_reference.py +102 -0
- onfido/models/us_driving_licence_breakdown.py +116 -0
- onfido/models/us_driving_licence_breakdown_address.py +106 -0
- onfido/models/us_driving_licence_breakdown_address_breakdown.py +129 -0
- onfido/models/us_driving_licence_breakdown_document.py +106 -0
- onfido/models/us_driving_licence_breakdown_document_breakdown.py +119 -0
- onfido/models/us_driving_licence_breakdown_personal.py +106 -0
- onfido/models/us_driving_licence_breakdown_personal_breakdown.py +164 -0
- onfido/models/us_driving_licence_builder.py +185 -0
- onfido/models/us_driving_licence_report.py +141 -0
- onfido/models/us_driving_licence_shared.py +185 -0
- onfido/models/video_reasons.py +106 -0
- onfido/models/watchlist_aml_breakdown.py +122 -0
- onfido/models/watchlist_aml_breakdown_adverse_media.py +100 -0
- onfido/models/watchlist_aml_breakdown_legal_and_regulatory_warnings.py +100 -0
- onfido/models/watchlist_aml_breakdown_politically_exposed_person.py +100 -0
- onfido/models/watchlist_aml_breakdown_sanction.py +100 -0
- onfido/models/watchlist_aml_properties.py +100 -0
- onfido/models/watchlist_aml_report.py +141 -0
- onfido/models/watchlist_enhanced_breakdown.py +122 -0
- onfido/models/watchlist_enhanced_properties.py +100 -0
- onfido/models/watchlist_enhanced_report.py +141 -0
- onfido/models/watchlist_monitor.py +120 -0
- onfido/models/watchlist_monitor_builder.py +111 -0
- onfido/models/watchlist_monitor_match.py +102 -0
- onfido/models/watchlist_monitor_matches_list.py +108 -0
- onfido/models/watchlist_monitor_matches_updater.py +102 -0
- onfido/models/watchlist_monitor_response.py +107 -0
- onfido/models/watchlist_monitor_shared.py +111 -0
- onfido/models/watchlist_monitors_list.py +108 -0
- onfido/models/watchlist_peps_only_report.py +141 -0
- onfido/models/watchlist_sanctions_only_report.py +141 -0
- onfido/models/watchlist_standard_breakdown.py +116 -0
- onfido/models/watchlist_standard_properties.py +100 -0
- onfido/models/watchlist_standard_report.py +141 -0
- onfido/models/webhook.py +115 -0
- onfido/models/webhook_builder.py +109 -0
- onfido/models/webhook_create.py +100 -0
- onfido/models/webhook_event.py +104 -0
- onfido/models/webhook_event_payload.py +111 -0
- onfido/models/webhook_event_payload_object.py +107 -0
- onfido/models/webhook_event_type.py +52 -0
- onfido/models/webhook_resend.py +108 -0
- onfido/models/webhook_response.py +106 -0
- onfido/models/webhook_shared.py +107 -0
- onfido/models/webhook_update.py +100 -0
- onfido/models/webhook_updater.py +109 -0
- onfido/models/webhooks_list.py +108 -0
- onfido/models/webhooks_resend_item.py +103 -0
- onfido/models/workflow_run.py +149 -0
- onfido/models/workflow_run_builder.py +123 -0
- onfido/models/workflow_run_request.py +100 -0
- onfido/models/workflow_run_response.py +126 -0
- onfido/models/workflow_run_response_error.py +102 -0
- onfido/models/workflow_run_shared.py +121 -0
- onfido/models/workflow_run_shared_link.py +119 -0
- onfido/py.typed +0 -0
- onfido/rest.py +258 -0
- onfido/webhook_event_verifier.py +7 -3
- {onfido_python-2.10.1.dist-info → onfido_python-3.1.0.dist-info}/LICENSE +1 -1
- onfido_python-3.1.0.dist-info/METADATA +18 -0
- onfido_python-3.1.0.dist-info/RECORD +291 -0
- {onfido_python-2.10.1.dist-info → onfido_python-3.1.0.dist-info}/WHEEL +2 -1
- onfido_python-3.1.0.dist-info/top_level.txt +1 -0
- onfido/aio_resource.py +0 -131
- onfido/mimetype.py +0 -5
- onfido/onfido.py +0 -71
- onfido/onfido_download.py +0 -11
- onfido/regions.py +0 -11
- onfido/resource.py +0 -88
- onfido/resources/address_picker.py +0 -6
- onfido/resources/applicants.py +0 -23
- onfido/resources/checks.py +0 -19
- onfido/resources/documents.py +0 -16
- onfido/resources/extraction.py +0 -6
- onfido/resources/live_photos.py +0 -17
- onfido/resources/live_videos.py +0 -16
- onfido/resources/motion_captures.py +0 -16
- onfido/resources/reports.py +0 -16
- onfido/resources/sdk_tokens.py +0 -5
- onfido/resources/watchlist_monitors.py +0 -16
- onfido/resources/webhooks.py +0 -18
- onfido/resources/workflow_runs.py +0 -17
- onfido/resources_aio/address_picker.py +0 -6
- onfido/resources_aio/applicants.py +0 -23
- onfido/resources_aio/checks.py +0 -19
- onfido/resources_aio/documents.py +0 -16
- onfido/resources_aio/extraction.py +0 -6
- onfido/resources_aio/live_photos.py +0 -17
- onfido/resources_aio/live_videos.py +0 -16
- onfido/resources_aio/motion_captures.py +0 -16
- onfido/resources_aio/reports.py +0 -16
- onfido/resources_aio/sdk_tokens.py +0 -6
- onfido/resources_aio/watchlist_monitors.py +0 -16
- onfido/resources_aio/webhooks.py +0 -18
- onfido/resources_aio/workflow_runs.py +0 -17
- onfido/utils.py +0 -22
- onfido_python-2.10.1.dist-info/METADATA +0 -181
- onfido_python-2.10.1.dist-info/RECORD +0 -40
onfido/resources_aio/reports.py
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
from ..aio_resource import Resource
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
class Reports(Resource):
|
|
5
|
-
def find(self, report_id: str):
|
|
6
|
-
return self._get(f"reports/{report_id}")
|
|
7
|
-
|
|
8
|
-
def all(self, check_id: str):
|
|
9
|
-
payload = {"check_id": check_id}
|
|
10
|
-
return self._get("reports/", payload=payload)
|
|
11
|
-
|
|
12
|
-
def resume(self, report_id: str):
|
|
13
|
-
return self._post(f"reports/{report_id}/resume")
|
|
14
|
-
|
|
15
|
-
def cancel(self, report_id: str):
|
|
16
|
-
return self._post(f"reports/{report_id}/cancel")
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
from ..aio_resource import Resource
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
class WatchlistMonitors(Resource):
|
|
5
|
-
def create(self, request_body: dict):
|
|
6
|
-
return self._post("watchlist_monitors/", **request_body)
|
|
7
|
-
|
|
8
|
-
def find(self, monitor_id: str):
|
|
9
|
-
return self._get(f"watchlist_monitors/{monitor_id}")
|
|
10
|
-
|
|
11
|
-
def all(self, applicant_id: str):
|
|
12
|
-
payload = {"applicant_id": applicant_id}
|
|
13
|
-
return self._get("watchlist_monitors/", payload=payload)
|
|
14
|
-
|
|
15
|
-
def delete(self, monitor_id: str):
|
|
16
|
-
return self._delete_request(f"watchlist_monitors/{monitor_id}")
|
onfido/resources_aio/webhooks.py
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
from ..aio_resource import Resource
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
class Webhooks(Resource):
|
|
5
|
-
def create(self, request_body: dict):
|
|
6
|
-
return self._post("webhooks", **request_body)
|
|
7
|
-
|
|
8
|
-
def all(self):
|
|
9
|
-
return self._get("webhooks")
|
|
10
|
-
|
|
11
|
-
def find(self, webhook_id: str):
|
|
12
|
-
return self._get(f"webhooks/{webhook_id}")
|
|
13
|
-
|
|
14
|
-
def edit(self, webhook_id: str, request_body: dict):
|
|
15
|
-
return self._put(f"webhooks/{webhook_id}", request_body)
|
|
16
|
-
|
|
17
|
-
def delete(self, webhook_id: str):
|
|
18
|
-
return self._delete_request(f"webhooks/{webhook_id}")
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
from ..aio_resource import Resource
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
class WorkflowRuns(Resource):
|
|
5
|
-
def create(self, request_body: dict):
|
|
6
|
-
return self._post("workflow_runs/", **request_body)
|
|
7
|
-
|
|
8
|
-
def all(self, **user_payload: dict):
|
|
9
|
-
payload = {"page": 1, "sort": "desc"}
|
|
10
|
-
payload.update(user_payload)
|
|
11
|
-
return self._get("workflow_runs", payload=payload)
|
|
12
|
-
|
|
13
|
-
def find(self, workflow_run_id: str):
|
|
14
|
-
return self._get(f"workflow_runs/{workflow_run_id}")
|
|
15
|
-
|
|
16
|
-
def evidence(self, workflow_run_id: str):
|
|
17
|
-
return self._download_request(f"workflow_runs/{workflow_run_id}/signed_evidence_file")
|
onfido/utils.py
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
def form_data_converter(data):
|
|
3
|
-
""" Flat nested dictionary and stringify booleans for form-data """
|
|
4
|
-
|
|
5
|
-
def _converter(data, result, prefix=''):
|
|
6
|
-
if isinstance(data, dict):
|
|
7
|
-
for k, v in data.items():
|
|
8
|
-
pref = '{}[{}]'.format(prefix,k) if prefix else k
|
|
9
|
-
_converter(v, result, pref)
|
|
10
|
-
elif isinstance(data, bool):
|
|
11
|
-
result[prefix] = str(data).lower()
|
|
12
|
-
else:
|
|
13
|
-
result[prefix] = data
|
|
14
|
-
|
|
15
|
-
# If no dict or booleans among values, no conversion needed
|
|
16
|
-
if not any(isinstance(item, dict) or isinstance (item, bool) for item in data.values()):
|
|
17
|
-
return data
|
|
18
|
-
|
|
19
|
-
result = {}
|
|
20
|
-
_converter(data, result)
|
|
21
|
-
|
|
22
|
-
return result
|
|
@@ -1,181 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.1
|
|
2
|
-
Name: onfido-python
|
|
3
|
-
Version: 2.10.1
|
|
4
|
-
Summary: The official wrapper for the Onfido API
|
|
5
|
-
Home-page: https://github.com/onfido/onfido-python
|
|
6
|
-
License: MIT
|
|
7
|
-
Keywords: onfido,identity
|
|
8
|
-
Author: Ben Ahmady
|
|
9
|
-
Author-email: ben.ahmady@onfido.com
|
|
10
|
-
Requires-Python: >=3.7,<4
|
|
11
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
12
|
-
Classifier: Programming Language :: Python :: 3
|
|
13
|
-
Classifier: Programming Language :: Python :: 3.7
|
|
14
|
-
Classifier: Programming Language :: Python :: 3.8
|
|
15
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
16
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
17
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
18
|
-
Classifier: Programming Language :: Python :: 3.12
|
|
19
|
-
Requires-Dist: aiohttp (>=3.8.5,<4.0.0)
|
|
20
|
-
Requires-Dist: importlib-metadata (>=0.12) ; python_version < "3.8"
|
|
21
|
-
Requires-Dist: requests (>=2.24.0,<3.0.0)
|
|
22
|
-
Project-URL: Onfido API documentation, https://documentation.onfido.com
|
|
23
|
-
Description-Content-Type: text/markdown
|
|
24
|
-
|
|
25
|
-
# Onfido Python Client Library
|
|
26
|
-
|
|
27
|
-
[onfido-python on PyPI](https://pypi.org/project/onfido-python/)
|
|
28
|
-
|
|
29
|
-
The official wrapper for Onfido's API. Refer to the full [API documentation](https://documentation.onfido.com) for details of expected requests and responses for all resources.
|
|
30
|
-
|
|
31
|
-
[](https://badge.fury.io/py/onfido-python)
|
|
32
|
-
|
|
33
|
-
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.
|
|
34
|
-
|
|
35
|
-
This project supersedes the automatically generated [api-python-client](https://github.com/onfido/api-python-client) library (`onfido` in PyPI).
|
|
36
|
-
|
|
37
|
-
## Installation
|
|
38
|
-
|
|
39
|
-
`pip install onfido-python`
|
|
40
|
-
|
|
41
|
-
:warning: Having the old `onfido` package installed at the same time will cause errors.
|
|
42
|
-
|
|
43
|
-
## Getting started
|
|
44
|
-
|
|
45
|
-
Make API calls by using an instance of the `Api` class and providing your API
|
|
46
|
-
token:
|
|
47
|
-
|
|
48
|
-
```python
|
|
49
|
-
import onfido
|
|
50
|
-
|
|
51
|
-
api = onfido.Api("<YOUR_API_TOKEN>")
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
### Regions
|
|
55
|
-
|
|
56
|
-
Set the region in the API instance using the `region` parameter, which takes a value from the `Region` enum (currently `Region.EU`, `Region.US` or `Region.CA`).
|
|
57
|
-
|
|
58
|
-
For example, to specify the EU region:
|
|
59
|
-
|
|
60
|
-
```python
|
|
61
|
-
import onfido
|
|
62
|
-
from onfido.regions import Region
|
|
63
|
-
|
|
64
|
-
api = onfido.Api("<YOUR_API_TOKEN>", region=Region.EU)
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
`region` does not take a default parameter. Failure to pass a correct region will raise an `OnfidoRegionError`.
|
|
68
|
-
|
|
69
|
-
See https://documentation.onfido.com/#regions for more information about our supported regions at a given time.
|
|
70
|
-
|
|
71
|
-
### Timeouts
|
|
72
|
-
|
|
73
|
-
You can optionally set a global timeout for all requests in the API
|
|
74
|
-
constructor. This takes a floating number input and each whole integer
|
|
75
|
-
increment corresponds to a second.
|
|
76
|
-
|
|
77
|
-
For example, to set a timeout of 1 second:
|
|
78
|
-
|
|
79
|
-
```python
|
|
80
|
-
api = onfido.Api("<YOUR_API_TOKEN>", timeout=1)
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
The default value for `timeout` is `None`, meaning no timeout will be set on
|
|
84
|
-
the client side.
|
|
85
|
-
|
|
86
|
-
## Response format
|
|
87
|
-
|
|
88
|
-
The Python library will return JSON requests directly from the API. Each request corresponds to a resource.
|
|
89
|
-
|
|
90
|
-
All resources share the same interface when making API calls. For example, use `.create` to create a resource, `.find` to find one, and `.all` to fetch all resources.
|
|
91
|
-
|
|
92
|
-
For example, to create an applicant:
|
|
93
|
-
|
|
94
|
-
```python
|
|
95
|
-
applicant_details = {
|
|
96
|
-
'first_name': 'Jane',
|
|
97
|
-
'last_name': 'Doe',
|
|
98
|
-
'dob': '1984-01-01',
|
|
99
|
-
'address': {
|
|
100
|
-
'street': 'Second Street',
|
|
101
|
-
'town': 'London',
|
|
102
|
-
'postcode': 'S2 2DF',
|
|
103
|
-
'country': 'GBR'
|
|
104
|
-
},
|
|
105
|
-
'location': {
|
|
106
|
-
'ip_address': '127.0.0.1',
|
|
107
|
-
'country_of_residence': 'GBR'
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
api.applicant.create(applicant_details)
|
|
112
|
-
```
|
|
113
|
-
|
|
114
|
-
```python
|
|
115
|
-
{
|
|
116
|
-
'id': '<APPLICANT_ID>',
|
|
117
|
-
'created_at': '2019-10-09T16:52:42Z',
|
|
118
|
-
'sandbox': True,
|
|
119
|
-
'first_name': 'Jane',
|
|
120
|
-
'last_name': 'Doe',
|
|
121
|
-
'email': None,
|
|
122
|
-
'dob': '1990-01-01',
|
|
123
|
-
'delete_at': None,
|
|
124
|
-
'href': '/v3.1/applicants/<APPLICANT_ID>',
|
|
125
|
-
'id_numbers': [],
|
|
126
|
-
'address': {
|
|
127
|
-
'flat_number': None,
|
|
128
|
-
'building_number': None,
|
|
129
|
-
'building_name': None,
|
|
130
|
-
'street': 'Second Street',
|
|
131
|
-
'sub_street': None,
|
|
132
|
-
'town': 'London',
|
|
133
|
-
'state': None,
|
|
134
|
-
'postcode': 'S2 2DF',
|
|
135
|
-
'country': 'GBR',
|
|
136
|
-
'line1': None,
|
|
137
|
-
'line2': None,
|
|
138
|
-
'line3': None
|
|
139
|
-
},
|
|
140
|
-
'phone_number': None,
|
|
141
|
-
'location': {
|
|
142
|
-
'ip_address': '127.0.0.1',
|
|
143
|
-
'country_of_residence': 'GBR'
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
```
|
|
147
|
-
|
|
148
|
-
See https://documentation.onfido.com/#request,-response-format for more
|
|
149
|
-
information.
|
|
150
|
-
|
|
151
|
-
### Resources
|
|
152
|
-
|
|
153
|
-
Resource information and code examples can be found at https://documentation.onfido.com/.
|
|
154
|
-
|
|
155
|
-
### Error Handling
|
|
156
|
-
|
|
157
|
-
- `OnfidoServerError` is raised whenever Onfido returns a `5xx` response
|
|
158
|
-
- `OnfidoRequestError` is raised whenever Onfido returns a `4xx` response
|
|
159
|
-
- `OnfidoInvalidSignatureError` is raised whenever a signature from the header is not equal to the expected signature you compute for it
|
|
160
|
-
- `OnfidoTimeoutError` is raised if a timeout occurs
|
|
161
|
-
- `OnfidoConnectionError` is raised whenever any other network error occurs
|
|
162
|
-
- `OnfidoUnknownError` is raised whenever something unexpected happens
|
|
163
|
-
|
|
164
|
-
## Contributing
|
|
165
|
-
|
|
166
|
-
1. Fork it ( https://github.com/onfido/onfido-python/fork )
|
|
167
|
-
2. Create your feature branch (`git checkout -b my-new-feature`)
|
|
168
|
-
3. Run the tests (`poetry run pytest tests/test_my_new_feature.py`)
|
|
169
|
-
4. Commit your changes (`git commit -am 'Add some feature'`)
|
|
170
|
-
5. Push to the branch (`git push origin my-new-feature`)
|
|
171
|
-
6. Create a new Pull Request
|
|
172
|
-
|
|
173
|
-
## Support
|
|
174
|
-
|
|
175
|
-
Should you encounter any technical issues during integration, please contact Onfido’s Customer Support team
|
|
176
|
-
via [email](mailto:support@onfido.com), including the word ISSUE: at the start of the subject line.
|
|
177
|
-
|
|
178
|
-
Alternatively, you can search the support documentation available via the customer experience
|
|
179
|
-
portal, [public.support.onfido.com](http://public.support.onfido.com).
|
|
180
|
-
|
|
181
|
-
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
onfido/__init__.py,sha256=4nFD3WP9Z5BsM3b5DKCvmC6MbXV-Ur9I4QCfeUJi1g0,53
|
|
2
|
-
onfido/aio_resource.py,sha256=Jw4rhfeMnX-GoUBsx7mEGzj6H4Bbr6pSyPs9PzQlcL4,4619
|
|
3
|
-
onfido/exceptions.py,sha256=uZc8ru5_imXJ5ub6JhH7TMqZHftRxUG28XHVA-VlHJY,2131
|
|
4
|
-
onfido/mimetype.py,sha256=ur3ruKmSAdSAR56fPsf1sc6dPVGYpS6XaovtCo4G79U,120
|
|
5
|
-
onfido/onfido.py,sha256=wV2FZaU5xq_IoBG6U5Y3FezfWX_i-KjcOgZ8NTkafnQ,4342
|
|
6
|
-
onfido/onfido_download.py,sha256=SwniRZRPkYCRaor-v3i2hxTtYEXCBEThSMJsJuPXzWc,373
|
|
7
|
-
onfido/regions.py,sha256=mqQXNrFSCVbs44AmrY47i1ELQ9FLWEnVoKslZpPGqOk,240
|
|
8
|
-
onfido/resource.py,sha256=-vSaqCf4FyCrFZozyJ0R_AStH09doYFx8gHzvs331P0,2872
|
|
9
|
-
onfido/resources/address_picker.py,sha256=pAnCZOKdBmUPAJSNovIAZ9m9zvBPoUZPdp4Afp-Kp0Y,159
|
|
10
|
-
onfido/resources/applicants.py,sha256=sKme7cqow0Bb-ZSqiCPyBfo4AzJ-5QNOaR25jBhKwJE,788
|
|
11
|
-
onfido/resources/checks.py,sha256=wrTin76DYjZWPawElvrSuiFB4L6HalaoqMoPV0V-E4o,567
|
|
12
|
-
onfido/resources/documents.py,sha256=36OaWp6eP1EH3nclckNXIR7-23ceYq9e_-DRy3qRe4U,539
|
|
13
|
-
onfido/resources/extraction.py,sha256=06x23caGc5VlZ2j_U2ZolAjTOIK4BRQzLRCTnu6Z8e4,170
|
|
14
|
-
onfido/resources/live_photos.py,sha256=qhM6znXdSz0Lmihj3v3bFYxgYLRInINq-5nKBtNywzk,594
|
|
15
|
-
onfido/resources/live_videos.py,sha256=23QkONOTi3JI_IhEO5nuH4ksJyy78xdN8BOzLNU3rRs,551
|
|
16
|
-
onfido/resources/motion_captures.py,sha256=2_KJQGrOSrY42JBZkv0669rbQ9cbErcAnloTres1NFM,595
|
|
17
|
-
onfido/resources/reports.py,sha256=mGXUpAZXHOQOzPxVLAYOXDPVkAVjW8Wq1GFoza721eo,455
|
|
18
|
-
onfido/resources/sdk_tokens.py,sha256=Pm51FtUU9BwM5fzFFyK8iXO4Emdh_3xHUTQ_hh-1_88,151
|
|
19
|
-
onfido/resources/watchlist_monitors.py,sha256=2MZERAIZzIbPz07gUd0h96bK49SxCtQfNdHmegPm7wY,531
|
|
20
|
-
onfido/resources/webhooks.py,sha256=c9OG1IisTd4vCwm9-rVOXoZyRi11P0d938bGWSVkDUM,514
|
|
21
|
-
onfido/resources/workflow_runs.py,sha256=KsWzz7d81kgjVEE9nNVzxva6htpepp2dmZa5BEzQGe8,596
|
|
22
|
-
onfido/resources_aio/address_picker.py,sha256=81_xXJGHCSoTt2ERdpJDehmcFdIl1kQmdlqAUyYjLPY,164
|
|
23
|
-
onfido/resources_aio/applicants.py,sha256=Dv23RabSLsnYJyanwq54MPpKB3wLaUigmEen-4g6nCA,813
|
|
24
|
-
onfido/resources_aio/checks.py,sha256=7sbzNjSo931Xw9laK82zTVc03VTcIH0vJXp-FGYf2EY,583
|
|
25
|
-
onfido/resources_aio/documents.py,sha256=0y4U_NjY4lS9mEP8Yac1jDKtleQOeevqEqzepi7TjpU,547
|
|
26
|
-
onfido/resources_aio/extraction.py,sha256=b3KS2TaWkGsYgQbPKEpwiqpIZz_mNs-WxpKjV8UfCkg,174
|
|
27
|
-
onfido/resources_aio/live_photos.py,sha256=1ibWlQ_B5lCe3zEfHfTCyY0gvUavW0Nmdz4KBHJzTBM,602
|
|
28
|
-
onfido/resources_aio/live_videos.py,sha256=pFb2qWK7e1T8ZjJltgQEJCtEXqvkL3VIPxFLpIrBTOU,560
|
|
29
|
-
onfido/resources_aio/motion_captures.py,sha256=l57_qPrw4zyOEe1opZfHRoFTEqI15acgauHsPPAdmpE,604
|
|
30
|
-
onfido/resources_aio/reports.py,sha256=dC5feKsV2N8c-Wd32J8uJxT2V6ot3R7nkVdPV2zx0D4,470
|
|
31
|
-
onfido/resources_aio/sdk_tokens.py,sha256=p-FVyyI3ts-HuPZ7_qjXXUTw1-JVjrrKfgnU8tIH0WQ,157
|
|
32
|
-
onfido/resources_aio/watchlist_monitors.py,sha256=6DVW_f58e_CUvSEQBMG_pl8w8AfZNasTXr0_WO3hMyQ,544
|
|
33
|
-
onfido/resources_aio/webhooks.py,sha256=hrYvFBrweN79B06TtVvG87PzpXV3bwsRpHmx3KCWe7o,531
|
|
34
|
-
onfido/resources_aio/workflow_runs.py,sha256=sZ5yyMvBXYRmWYL50_41R1M5g_T-Xm0GkKu1yrm4Ci0,600
|
|
35
|
-
onfido/utils.py,sha256=n-Z2D4GGgr2UmOpTFCKsIdgL9QaNMUuzVmGx7ZI8j4U,708
|
|
36
|
-
onfido/webhook_event_verifier.py,sha256=YgN5P_Jw7N7WIi0lSZwB1dlaRTsge9-CyYF4YA1pQtA,771
|
|
37
|
-
onfido_python-2.10.1.dist-info/LICENSE,sha256=xFvlQb3_cMWstMRPgUCbYrHPv1AmTUC8_lnmTLKJfa0,1073
|
|
38
|
-
onfido_python-2.10.1.dist-info/METADATA,sha256=NCT9G2Dl65dgemoWqgfplbg2oOyHIIyGYbqWDvYYiz4,5774
|
|
39
|
-
onfido_python-2.10.1.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
|
|
40
|
-
onfido_python-2.10.1.dist-info/RECORD,,
|