onfido 6.2.0 → 6.3.0
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/README.md +1 -1
- data/lib/onfido/api/default_api.rb +413 -0
- data/lib/onfido/api_client.rb +6 -2
- data/lib/onfido/models/biometric_token.rb +265 -0
- data/lib/onfido/models/biometric_token_data.rb +317 -0
- data/lib/onfido/models/biometric_token_response.rb +237 -0
- data/lib/onfido/models/biometric_token_updater.rb +262 -0
- data/lib/onfido/models/biometric_tokens_response.rb +239 -0
- data/lib/onfido/models/document_types.rb +3 -1
- data/lib/onfido/models/invalidated_biometric_token_response.rb +237 -0
- data/lib/onfido/models/invalidated_biometric_token_summary.rb +238 -0
- data/lib/onfido/models/invalidated_biometric_token_summary_deleted_items.rb +239 -0
- data/lib/onfido/models/invalidated_biometric_tokens_response.rb +237 -0
- data/lib/onfido/models/updated_biometric_token_response.rb +237 -0
- data/lib/onfido/models/watchlist_mesh_added_mentions.rb +247 -0
- data/lib/onfido/models/watchlist_mesh_alert_risk.rb +323 -0
- data/lib/onfido/models/watchlist_mesh_alert_risk1.rb +316 -0
- data/lib/onfido/models/watchlist_mesh_associate.rb +231 -0
- data/lib/onfido/models/watchlist_mesh_date_value.rb +231 -0
- data/lib/onfido/models/watchlist_mesh_field.rb +241 -0
- data/lib/onfido/models/watchlist_mesh_image.rb +231 -0
- data/lib/onfido/models/watchlist_mesh_lists.rb +309 -0
- data/lib/onfido/models/watchlist_mesh_media.rb +261 -0
- data/lib/onfido/models/watchlist_mesh_name.rb +231 -0
- data/lib/onfido/models/watchlist_mesh_pep.rb +369 -0
- data/lib/onfido/models/watchlist_mesh_person.rb +283 -0
- data/lib/onfido/models/watchlist_mesh_profile.rb +273 -0
- data/lib/onfido/models/watchlist_mesh_risk_decision.rb +43 -0
- data/lib/onfido/models/watchlist_mesh_risk_detail.rb +255 -0
- data/lib/onfido/models/watchlist_mesh_risk_indicators.rb +271 -0
- data/lib/onfido/models/watchlist_mesh_sanctions.rb +309 -0
- data/lib/onfido/models/webhook.rb +11 -1
- data/lib/onfido/models/webhook_builder.rb +11 -1
- data/lib/onfido/models/webhook_create.rb +11 -1
- data/lib/onfido/models/webhook_response.rb +11 -1
- data/lib/onfido/models/webhook_update.rb +11 -1
- data/lib/onfido/models/webhook_updater.rb +11 -1
- data/lib/onfido/version.rb +1 -1
- data/lib/onfido.rb +27 -0
- data/spec/integrations/biometric_token_spec.rb +122 -0
- data/spec/integrations/document_spec.rb +8 -1
- data/spec/integrations/media/nfc_data.json +11768 -0
- data/spec/integrations/watchlist_alert_risk_spec.rb +66 -0
- data/spec/shared_contexts/with_document.rb +0 -1
- data/spec/spec_helper.rb +6 -7
- metadata +55 -22
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require_relative '../shared_contexts/with_workflow_run'
|
|
4
|
+
|
|
5
|
+
describe Onfido::WatchlistMeshAlertRisk do
|
|
6
|
+
describe 'Watchlist alert risks' do
|
|
7
|
+
include_context 'with workflow run'
|
|
8
|
+
|
|
9
|
+
let(:workflow_id) { '18effbfe-73c3-4680-ae43-e1c474767ff4' }
|
|
10
|
+
let(:default_applicant_body) do
|
|
11
|
+
{
|
|
12
|
+
'first_name' => 'Donald',
|
|
13
|
+
'last_name' => 'Consider',
|
|
14
|
+
'dob' => '1990-01-01',
|
|
15
|
+
'address' => {
|
|
16
|
+
'country' => 'PRT',
|
|
17
|
+
'town' => 'Town',
|
|
18
|
+
'street' => 'Street',
|
|
19
|
+
'building_number' => '12',
|
|
20
|
+
'postcode' => '12345',
|
|
21
|
+
},
|
|
22
|
+
}
|
|
23
|
+
end
|
|
24
|
+
let(:workflow_run_builder) do
|
|
25
|
+
Onfido::WorkflowRunBuilder.new(
|
|
26
|
+
applicant_id: applicant_id,
|
|
27
|
+
workflow_id: workflow_id,
|
|
28
|
+
custom_data: {
|
|
29
|
+
national_id: {
|
|
30
|
+
type: 'passport',
|
|
31
|
+
value: 'P1234567',
|
|
32
|
+
},
|
|
33
|
+
nationality: 'PRT',
|
|
34
|
+
},
|
|
35
|
+
)
|
|
36
|
+
end
|
|
37
|
+
let(:watchlist_task) do
|
|
38
|
+
task = onfido_api.list_tasks(workflow_run_id).find do |workflow_task|
|
|
39
|
+
workflow_task.task_def_id == 'query_watchlists_complyadvantage_mesh'
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
expect(task).not_to be_nil
|
|
43
|
+
|
|
44
|
+
repeat_request_until_task_output_changes(30, 2) do
|
|
45
|
+
onfido_api.find_task(workflow_run_id, task.id)
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
let(:alert_id) do
|
|
49
|
+
properties = watchlist_task.output[:properties]
|
|
50
|
+
|
|
51
|
+
expect(properties[:alert_identifier]).not_to be_nil
|
|
52
|
+
properties[:alert_identifier]
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
it 'retrieves paginated risks for a sandbox alert' do
|
|
56
|
+
risks = onfido_api.list_watchlist_mesh_alert_risks(alert_id, page: 1, per_page: 1)
|
|
57
|
+
|
|
58
|
+
expect(risks).not_to be_empty
|
|
59
|
+
expect(risks.size).to be <= 1
|
|
60
|
+
expect(risks.first).to be_an_instance_of(Onfido::WatchlistMeshAlertRisk)
|
|
61
|
+
expect(risks.first.identifier).not_to be_nil
|
|
62
|
+
expect(risks.first.decision).not_to be_nil
|
|
63
|
+
expect(risks.first.detail).not_to be_nil
|
|
64
|
+
end
|
|
65
|
+
end
|
|
66
|
+
end
|
|
@@ -11,7 +11,6 @@ RSpec.shared_context 'with document', shared_context: :metadata do
|
|
|
11
11
|
let(:document) { onfido_api.upload_document(Onfido::DocumentTypes::PASSPORT, applicant_id, document_file) }
|
|
12
12
|
let!(:document_id) { document.id }
|
|
13
13
|
|
|
14
|
-
let(:nfc_face_id) { 'cc2dc25f-2df6-4f8f-a5aa-60f49cef9b3c' }
|
|
15
14
|
|
|
16
15
|
let(:inexistent_document_id) { '00000000-0000-0000-0000-000000000000' }
|
|
17
16
|
end
|
data/spec/spec_helper.rb
CHANGED
|
@@ -112,16 +112,15 @@ def repeat_request_until_http_code_changes(max_retries = 15,
|
|
|
112
112
|
# interval --> how many seconds to wait until the next retry
|
|
113
113
|
# proc --> code containing the request
|
|
114
114
|
|
|
115
|
-
|
|
116
|
-
|
|
115
|
+
last_error = nil
|
|
116
|
+
(max_retries + 1).times do
|
|
117
117
|
begin
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
118
|
+
return proc.call
|
|
119
|
+
rescue Onfido::ApiError => e
|
|
120
|
+
last_error = e
|
|
121
121
|
sleep(interval)
|
|
122
|
-
iteration += 1
|
|
123
122
|
end
|
|
124
123
|
end
|
|
125
124
|
|
|
126
|
-
|
|
125
|
+
raise last_error
|
|
127
126
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: onfido
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 6.
|
|
4
|
+
version: 6.3.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- OpenAPI-Generator
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
11
|
+
date: 2026-11-06 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: faraday
|
|
@@ -154,6 +154,11 @@ files:
|
|
|
154
154
|
- lib/onfido/models/applicant_update.rb
|
|
155
155
|
- lib/onfido/models/applicant_updater.rb
|
|
156
156
|
- lib/onfido/models/applicants_list.rb
|
|
157
|
+
- lib/onfido/models/biometric_token.rb
|
|
158
|
+
- lib/onfido/models/biometric_token_data.rb
|
|
159
|
+
- lib/onfido/models/biometric_token_response.rb
|
|
160
|
+
- lib/onfido/models/biometric_token_updater.rb
|
|
161
|
+
- lib/onfido/models/biometric_tokens_response.rb
|
|
157
162
|
- lib/onfido/models/check.rb
|
|
158
163
|
- lib/onfido/models/check_builder.rb
|
|
159
164
|
- lib/onfido/models/check_request.rb
|
|
@@ -322,6 +327,10 @@ files:
|
|
|
322
327
|
- lib/onfido/models/india_pan_report_all_of_breakdown_device_breakdown_pan_valid.rb
|
|
323
328
|
- lib/onfido/models/india_pan_report_all_of_properties.rb
|
|
324
329
|
- lib/onfido/models/india_pan_report_all_of_properties_device.rb
|
|
330
|
+
- lib/onfido/models/invalidated_biometric_token_response.rb
|
|
331
|
+
- lib/onfido/models/invalidated_biometric_token_summary.rb
|
|
332
|
+
- lib/onfido/models/invalidated_biometric_token_summary_deleted_items.rb
|
|
333
|
+
- lib/onfido/models/invalidated_biometric_tokens_response.rb
|
|
325
334
|
- lib/onfido/models/known_faces_breakdown.rb
|
|
326
335
|
- lib/onfido/models/known_faces_breakdown_image_integrity.rb
|
|
327
336
|
- lib/onfido/models/known_faces_breakdown_previously_seen_faces.rb
|
|
@@ -376,6 +385,7 @@ files:
|
|
|
376
385
|
- lib/onfido/models/task.rb
|
|
377
386
|
- lib/onfido/models/task_item.rb
|
|
378
387
|
- lib/onfido/models/timeline_file_reference.rb
|
|
388
|
+
- lib/onfido/models/updated_biometric_token_response.rb
|
|
379
389
|
- lib/onfido/models/us_driving_licence_breakdown.rb
|
|
380
390
|
- lib/onfido/models/us_driving_licence_breakdown_address.rb
|
|
381
391
|
- lib/onfido/models/us_driving_licence_breakdown_address_breakdown.rb
|
|
@@ -405,6 +415,23 @@ files:
|
|
|
405
415
|
- lib/onfido/models/watchlist_enhanced_properties_records_inner_event_inner_source.rb
|
|
406
416
|
- lib/onfido/models/watchlist_enhanced_properties_records_inner_source_inner.rb
|
|
407
417
|
- lib/onfido/models/watchlist_enhanced_report.rb
|
|
418
|
+
- lib/onfido/models/watchlist_mesh_added_mentions.rb
|
|
419
|
+
- lib/onfido/models/watchlist_mesh_alert_risk.rb
|
|
420
|
+
- lib/onfido/models/watchlist_mesh_alert_risk1.rb
|
|
421
|
+
- lib/onfido/models/watchlist_mesh_associate.rb
|
|
422
|
+
- lib/onfido/models/watchlist_mesh_date_value.rb
|
|
423
|
+
- lib/onfido/models/watchlist_mesh_field.rb
|
|
424
|
+
- lib/onfido/models/watchlist_mesh_image.rb
|
|
425
|
+
- lib/onfido/models/watchlist_mesh_lists.rb
|
|
426
|
+
- lib/onfido/models/watchlist_mesh_media.rb
|
|
427
|
+
- lib/onfido/models/watchlist_mesh_name.rb
|
|
428
|
+
- lib/onfido/models/watchlist_mesh_pep.rb
|
|
429
|
+
- lib/onfido/models/watchlist_mesh_person.rb
|
|
430
|
+
- lib/onfido/models/watchlist_mesh_profile.rb
|
|
431
|
+
- lib/onfido/models/watchlist_mesh_risk_decision.rb
|
|
432
|
+
- lib/onfido/models/watchlist_mesh_risk_detail.rb
|
|
433
|
+
- lib/onfido/models/watchlist_mesh_risk_indicators.rb
|
|
434
|
+
- lib/onfido/models/watchlist_mesh_sanctions.rb
|
|
408
435
|
- lib/onfido/models/watchlist_monitor.rb
|
|
409
436
|
- lib/onfido/models/watchlist_monitor_builder.rb
|
|
410
437
|
- lib/onfido/models/watchlist_monitor_match.rb
|
|
@@ -451,12 +478,14 @@ files:
|
|
|
451
478
|
- spec/integrations/address_picker_spec.rb
|
|
452
479
|
- spec/integrations/advanced_electronic_signature_spec.rb
|
|
453
480
|
- spec/integrations/applicant_spec.rb
|
|
481
|
+
- spec/integrations/biometric_token_spec.rb
|
|
454
482
|
- spec/integrations/check_spec.rb
|
|
455
483
|
- spec/integrations/document_spec.rb
|
|
456
484
|
- spec/integrations/extraction_spec.rb
|
|
457
485
|
- spec/integrations/id_photo_spec.rb
|
|
458
486
|
- spec/integrations/live_photo_spec.rb
|
|
459
487
|
- spec/integrations/live_video_spec.rb
|
|
488
|
+
- spec/integrations/media/nfc_data.json
|
|
460
489
|
- spec/integrations/media/sample_driving_licence.png
|
|
461
490
|
- spec/integrations/media/sample_photo.png
|
|
462
491
|
- spec/integrations/media/sample_signing_document.pdf
|
|
@@ -468,6 +497,7 @@ files:
|
|
|
468
497
|
- spec/integrations/sdk_token_spec.rb
|
|
469
498
|
- spec/integrations/signing_document_spec.rb
|
|
470
499
|
- spec/integrations/tasks_spec.rb
|
|
500
|
+
- spec/integrations/watchlist_alert_risk_spec.rb
|
|
471
501
|
- spec/integrations/watchlist_monitor_spec.rb
|
|
472
502
|
- spec/integrations/webhook_spec.rb
|
|
473
503
|
- spec/integrations/workflow_run_output_spec.rb
|
|
@@ -509,39 +539,42 @@ specification_version: 4
|
|
|
509
539
|
summary: The official Ruby library for integrating with the Onfido API.
|
|
510
540
|
test_files:
|
|
511
541
|
- spec/classic_webhook_event_verifier_spec.rb
|
|
512
|
-
- spec/integrations/id_photo_spec.rb
|
|
513
|
-
- spec/integrations/media/sample_signing_document.pdf
|
|
514
|
-
- spec/integrations/media/sample_photo.png
|
|
515
|
-
- spec/integrations/media/sample_driving_licence.png
|
|
516
|
-
- spec/integrations/webhook_spec.rb
|
|
517
|
-
- spec/integrations/address_picker_spec.rb
|
|
518
542
|
- spec/integrations/signing_document_spec.rb
|
|
519
|
-
- spec/integrations/extraction_spec.rb
|
|
520
543
|
- spec/integrations/document_spec.rb
|
|
521
|
-
- spec/integrations/
|
|
522
|
-
- spec/integrations/motion_capture_spec.rb
|
|
544
|
+
- spec/integrations/extraction_spec.rb
|
|
523
545
|
- spec/integrations/passkey_spec.rb
|
|
524
|
-
- spec/integrations/
|
|
525
|
-
- spec/integrations/
|
|
546
|
+
- spec/integrations/workflow_run_spec.rb
|
|
547
|
+
- spec/integrations/sdk_token_spec.rb
|
|
548
|
+
- spec/integrations/address_picker_spec.rb
|
|
549
|
+
- spec/integrations/webhook_spec.rb
|
|
526
550
|
- spec/integrations/tasks_spec.rb
|
|
527
|
-
- spec/integrations/
|
|
551
|
+
- spec/integrations/workflow_run_output_spec.rb
|
|
552
|
+
- spec/integrations/media/nfc_data.json
|
|
553
|
+
- spec/integrations/media/sample_photo.png
|
|
554
|
+
- spec/integrations/media/sample_signing_document.pdf
|
|
555
|
+
- spec/integrations/media/sample_driving_licence.png
|
|
528
556
|
- spec/integrations/check_spec.rb
|
|
529
|
-
- spec/integrations/report_spec.rb
|
|
530
|
-
- spec/integrations/applicant_spec.rb
|
|
531
|
-
- spec/integrations/live_video_spec.rb
|
|
532
557
|
- spec/integrations/qualified_electronic_signature_spec.rb
|
|
533
|
-
- spec/integrations/
|
|
558
|
+
- spec/integrations/watchlist_alert_risk_spec.rb
|
|
559
|
+
- spec/integrations/live_video_spec.rb
|
|
560
|
+
- spec/integrations/advanced_electronic_signature_spec.rb
|
|
534
561
|
- spec/integrations/live_photo_spec.rb
|
|
562
|
+
- spec/integrations/report_spec.rb
|
|
563
|
+
- spec/integrations/motion_capture_spec.rb
|
|
564
|
+
- spec/integrations/id_photo_spec.rb
|
|
565
|
+
- spec/integrations/biometric_token_spec.rb
|
|
566
|
+
- spec/integrations/applicant_spec.rb
|
|
535
567
|
- spec/integrations/report_schema_spec.rb
|
|
568
|
+
- spec/integrations/watchlist_monitor_spec.rb
|
|
536
569
|
- spec/media/studio_webhook_event_with_list_in_output.json
|
|
537
570
|
- spec/media/studio_webhook_event_with_object_in_output.json
|
|
538
|
-
- spec/shared_contexts/with_signing_document.rb
|
|
539
|
-
- spec/shared_contexts/with_applicant.rb
|
|
540
571
|
- spec/shared_contexts/with_document.rb
|
|
541
|
-
- spec/shared_contexts/
|
|
572
|
+
- spec/shared_contexts/with_onfido.rb
|
|
542
573
|
- spec/shared_contexts/with_check.rb
|
|
574
|
+
- spec/shared_contexts/with_workflow_run.rb
|
|
575
|
+
- spec/shared_contexts/with_signing_document.rb
|
|
576
|
+
- spec/shared_contexts/with_applicant.rb
|
|
543
577
|
- spec/shared_contexts/with_live_photo.rb
|
|
544
|
-
- spec/shared_contexts/with_onfido.rb
|
|
545
578
|
- spec/shared_examples/file_examples.rb
|
|
546
579
|
- spec/spec_helper.rb
|
|
547
580
|
- spec/studio_webhook_event_verifier_spec.rb
|