didit-sdk 2.25.0 → 2.27.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 +14 -0
- data/lib/didit/resources/aml.rb +5 -4
- data/lib/didit/resources/authentication_setup.rb +721 -0
- data/lib/didit/resources/investigator.rb +20 -0
- data/lib/didit/resources/networks.rb +54 -0
- data/lib/didit/resources/sessions.rb +8 -7
- data/lib/didit/resources/users.rb +66 -4
- data/lib/didit/resources.rb +6 -0
- data/lib/didit/types/account_components.rb +566 -0
- data/lib/didit/types/authentication_setup.rb +114 -0
- data/lib/didit/types/components.rb +139 -9
- data/lib/didit/types/investigator.rb +26 -0
- data/lib/didit/types/networks.rb +14 -0
- data/lib/didit/types.rb +94 -0
- data/lib/didit/version.rb +1 -1
- data/sig/didit/resources/authentication_setup.rbs +30 -0
- data/sig/didit/resources/investigator.rbs +1 -0
- data/sig/didit/resources/networks.rbs +1 -0
- data/sig/didit/resources/users.rbs +3 -1
- data/sig/didit/resources.rbs +1 -0
- data/sig/didit/types/account_components.rbs +538 -0
- data/sig/didit/types/authentication_setup.rbs +121 -0
- data/sig/didit/types/components.rbs +120 -0
- data/sig/didit/types/investigator.rbs +24 -0
- data/sig/didit/types/networks.rbs +15 -0
- data/sig/didit/types/users.rbs +2 -0
- metadata +5 -1
|
@@ -290,6 +290,26 @@ module Didit
|
|
|
290
290
|
)
|
|
291
291
|
end
|
|
292
292
|
|
|
293
|
+
# Investigator agent offer
|
|
294
|
+
#
|
|
295
|
+
# Whether to offer the Investigator agent to this application: its decisions taken by hand in the last 30 days,
|
|
296
|
+
# the average handling time, the people who stopped halfway and whether follow-ups are on. Read from the daily
|
|
297
|
+
# analytics, never from a scan of sessions. `show` is true when 20 or more decisions were taken by hand and the
|
|
298
|
+
# agent is not set up, or when follow-ups are off and 50 or more people stopped halfway.
|
|
299
|
+
#
|
|
300
|
+
# +GET /v3/investigator/offer/+
|
|
301
|
+
#
|
|
302
|
+
# @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
|
|
303
|
+
# @return [Didit::Types::InvestigatorRetrieveOfferResponse]
|
|
304
|
+
def retrieve_offer(request_options: nil)
|
|
305
|
+
@client.request(
|
|
306
|
+
:get,
|
|
307
|
+
"/v3/investigator/offer/",
|
|
308
|
+
response: Types::InvestigatorRetrieveOfferResponse,
|
|
309
|
+
request_options: request_options
|
|
310
|
+
)
|
|
311
|
+
end
|
|
312
|
+
|
|
293
313
|
# Investigator performance
|
|
294
314
|
#
|
|
295
315
|
# Agreement with your team, volume, time saved, confidence calibration, per-queue results, override reasons and
|
|
@@ -347,6 +347,60 @@ module Didit
|
|
|
347
347
|
)
|
|
348
348
|
end
|
|
349
349
|
|
|
350
|
+
# Search signals
|
|
351
|
+
#
|
|
352
|
+
# Check one value against every network of your organization before you open an investigation. Choose a
|
|
353
|
+
# `signal_type` and send its value: an address, a phone number, an email, a device fingerprint, a document
|
|
354
|
+
# number with its issuing state and type, or a face image. A `wallet_address` search takes the address and
|
|
355
|
+
# optionally its destination tag or memo in `tag`, and answers with the `wallet` object: accounts, payouts, the
|
|
356
|
+
# amount paid out and the payout dates. A wallet many accounts use is a shared service: it answers `match_count:
|
|
357
|
+
# 0` and no matches, with `is_shared_service: true`.
|
|
358
|
+
#
|
|
359
|
+
# Requires the `read:networks` permission. Searches are limited per organization: when the budget is spent the
|
|
360
|
+
# call answers `429`.
|
|
361
|
+
#
|
|
362
|
+
# +POST /v3/organization/{organization_id}/application/{application_id}/networks/signals/search/+
|
|
363
|
+
#
|
|
364
|
+
# @param signal_type [String]
|
|
365
|
+
# @param value [String] The value to search. Required for every type but `face`, which refuses it. For
|
|
366
|
+
# `wallet_address` it is the address.
|
|
367
|
+
# @param image [Pathname, IO, String, Didit::FilePart] A JPG, JPEG, PNG, WebP or TIFF image of at most 5 MB.
|
|
368
|
+
# `face` only, and required there. Send the request as `multipart/form-data`.
|
|
369
|
+
# @param issuing_state [String] `document_number` only, and required there.
|
|
370
|
+
# @param document_type [String] `document_number` only, and required there.
|
|
371
|
+
# @param region [String] `document_number` only, required for a regionally issued document.
|
|
372
|
+
# @param tag [String] The destination tag or memo of a wallet. `wallet_address` only, blank allowed. Any other
|
|
373
|
+
# type returns `400` `tag only applies to wallet_address searches.`
|
|
374
|
+
# @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
|
|
375
|
+
# @return [Didit::Types::NetworkSignalSearchResponse]
|
|
376
|
+
def search_signals(
|
|
377
|
+
signal_type:,
|
|
378
|
+
value: OMIT,
|
|
379
|
+
image: OMIT,
|
|
380
|
+
issuing_state: OMIT,
|
|
381
|
+
document_type: OMIT,
|
|
382
|
+
region: OMIT,
|
|
383
|
+
tag: OMIT,
|
|
384
|
+
request_options: nil
|
|
385
|
+
)
|
|
386
|
+
@client.request(
|
|
387
|
+
:post,
|
|
388
|
+
"/v3/organization/{organization_id}/application/{application_id}/networks/signals/search/",
|
|
389
|
+
body: {
|
|
390
|
+
"signal_type" => signal_type,
|
|
391
|
+
"value" => value,
|
|
392
|
+
"image" => image,
|
|
393
|
+
"issuing_state" => issuing_state,
|
|
394
|
+
"document_type" => document_type,
|
|
395
|
+
"region" => region,
|
|
396
|
+
"tag" => tag
|
|
397
|
+
},
|
|
398
|
+
scope: :application,
|
|
399
|
+
response: Types::NetworkSignalSearchResponse,
|
|
400
|
+
request_options: request_options
|
|
401
|
+
)
|
|
402
|
+
end
|
|
403
|
+
|
|
350
404
|
# The +networks.notes+ resource.
|
|
351
405
|
class Notes < Didit::Resource
|
|
352
406
|
# Add a private network note
|
|
@@ -1172,12 +1172,13 @@ module Didit
|
|
|
1172
1172
|
#
|
|
1173
1173
|
# List every completed ongoing-monitoring re-screen of a session's AML check, newest first by `completed_at`,
|
|
1174
1174
|
# including the runs where nothing changed: alerts, activity entries and webhooks fire only when a result moves,
|
|
1175
|
-
# so this history is the
|
|
1176
|
-
#
|
|
1177
|
-
#
|
|
1178
|
-
#
|
|
1179
|
-
#
|
|
1180
|
-
# time. A scoped API key needs
|
|
1175
|
+
# so this history is the record of the re-screens a clean subject had. The daily monitoring date is
|
|
1176
|
+
# `last_ongoing_screening_at` on the AML report. Works for KYC and KYB session IDs; pass `node_id` when the
|
|
1177
|
+
# session ran more than one AML step. Only ongoing-monitoring re-screens are listed (the first screening is part
|
|
1178
|
+
# of the session decision) and runs from before this history existed are not reconstructed, so a session without
|
|
1179
|
+
# ongoing monitoring returns an empty list. `count` is exact up to 100 and capped at 100 above that, so follow
|
|
1180
|
+
# `next` until it is `null`. Pass `month` to read one calendar month at a time. A scoped API key needs
|
|
1181
|
+
# `decisions: read`; see [Continuous AML
|
|
1181
1182
|
# monitoring](https://docs.didit.me/core-technology/aml-screening/continuous-monitoring-aml-screening).
|
|
1182
1183
|
#
|
|
1183
1184
|
# +GET /v3/session/{sessionId}/aml-screening-history/+
|
|
@@ -1770,7 +1771,7 @@ module Didit
|
|
|
1770
1771
|
#
|
|
1771
1772
|
# `review_status` is one of `Unreviewed`, `Confirmed Match`, `False Positive`, or `Inconclusive`. Reviewer
|
|
1772
1773
|
# decisions are preserved across ongoing-monitoring updates, so a hit you mark `False Positive` stays that way
|
|
1773
|
-
# when the provider
|
|
1774
|
+
# when the provider sends an update.
|
|
1774
1775
|
#
|
|
1775
1776
|
# A successful call fires a `data.updated` webhook and appends an activity entry (with actor attribution) to the
|
|
1776
1777
|
# session's review trail. For graph workflows with multiple AML checks, pass `node_id` to target a specific
|
|
@@ -231,11 +231,35 @@ module Didit
|
|
|
231
231
|
)
|
|
232
232
|
end
|
|
233
233
|
|
|
234
|
+
# Get a user lookup
|
|
235
|
+
#
|
|
236
|
+
# Read back a lookup made with [Look up users](#post-/v3/users/lookup/): the same counts and `not_found` list,
|
|
237
|
+
# plus the `identifiers` you submitted after blanks and duplicates were removed, in order. A lookup lives 24
|
|
238
|
+
# hours and belongs to the application that made it; an expired, unknown or other application's `lookup_id`
|
|
239
|
+
# returns `404` with `code: lookup_not_found`.
|
|
240
|
+
#
|
|
241
|
+
# +GET /v3/users/lookup/{lookup_id}/+
|
|
242
|
+
#
|
|
243
|
+
# @param lookup_id [String] The `lookup_id` returned by Look up users.
|
|
244
|
+
# @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
|
|
245
|
+
# @return [Didit::Types::UsersLookupDetail]
|
|
246
|
+
def get_lookup(lookup_id, request_options: nil)
|
|
247
|
+
@client.request(
|
|
248
|
+
:get,
|
|
249
|
+
"/v3/users/lookup/{lookup_id}/",
|
|
250
|
+
path_params: { "lookup_id" => lookup_id },
|
|
251
|
+
response: Types::UsersLookupDetail,
|
|
252
|
+
request_options: request_options
|
|
253
|
+
)
|
|
254
|
+
end
|
|
255
|
+
|
|
234
256
|
# List users
|
|
235
257
|
#
|
|
236
258
|
# List [users](/entities/users) Didit assembles from KYC sessions sharing the same `vendor_data` (free-form
|
|
237
|
-
# string, NOT a UUID), plus users created via the API. Paginated, ordered by `last_session_at` desc
|
|
238
|
-
#
|
|
259
|
+
# string, NOT a UUID), plus users created via the API. Paginated, ordered by `last_session_at` desc, or by the
|
|
260
|
+
# position in your list when `lookup` is set. Pass `lookup` to read only the users a list of identifiers
|
|
261
|
+
# resolved to (see [Look up users](#post-/v3/users/lookup/)). No other filter or search parameter is supported:
|
|
262
|
+
# fetch pages and filter client-side.
|
|
239
263
|
#
|
|
240
264
|
# +GET /v3/users/+
|
|
241
265
|
#
|
|
@@ -243,15 +267,20 @@ module Didit
|
|
|
243
267
|
# small for latency.
|
|
244
268
|
# @param offset [Integer] Zero-based offset of the first record to return. Prefer following the `next` URL from
|
|
245
269
|
# the previous page over computing this by hand.
|
|
270
|
+
# @param lookup [String] A `lookup_id` returned by `POST /v3/users/lookup/`. The list returns only the users
|
|
271
|
+
# that lookup matched, ordered by the position of their identifier in the list you submitted, paginated with
|
|
272
|
+
# `limit` and `offset`. An expired or unknown `lookup_id` returns `404` with `code: lookup_not_found`; submit
|
|
273
|
+
# the list again.
|
|
246
274
|
# @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
|
|
247
275
|
# @return [Didit::Page<Didit::Types::UserListItem>]
|
|
248
|
-
def list(limit: OMIT, offset: OMIT, request_options: nil)
|
|
276
|
+
def list(limit: OMIT, offset: OMIT, lookup: OMIT, request_options: nil)
|
|
249
277
|
@client.request(
|
|
250
278
|
:get,
|
|
251
279
|
"/v3/users/",
|
|
252
280
|
query: {
|
|
253
281
|
"limit" => limit,
|
|
254
|
-
"offset" => offset
|
|
282
|
+
"offset" => offset,
|
|
283
|
+
"lookup" => lookup
|
|
255
284
|
},
|
|
256
285
|
page: Types::UserListItem,
|
|
257
286
|
request_options: request_options
|
|
@@ -278,6 +307,39 @@ module Didit
|
|
|
278
307
|
)
|
|
279
308
|
end
|
|
280
309
|
|
|
310
|
+
# Look up users
|
|
311
|
+
#
|
|
312
|
+
# Resolve a list of up to 20,000 identifiers to the users of your application, in one call. Each identifier is
|
|
313
|
+
# matched, in this order, against `vendor_data` (exactly), the Didit user ID (a UUID), then a verified email
|
|
314
|
+
# (case-insensitive). An email can match several users, and all of them count. Blank entries are dropped and
|
|
315
|
+
# duplicates removed, keeping the first; 1 to 20,000 identifiers must remain, and a request sends at most
|
|
316
|
+
# 100,000 entries before that clean-up. The call only reads. It answers with a `lookup_id`, the counts and the
|
|
317
|
+
# identifiers that matched nobody, each with its 1-based `position` in the submitted list.
|
|
318
|
+
#
|
|
319
|
+
# Pass the `lookup_id` as `lookup` to [List users](#get-/v3/users/) to page through exactly the matched users,
|
|
320
|
+
# in the order you submitted them. The result is kept for 24 hours for your application only, then answers `404`
|
|
321
|
+
# with `code: lookup_not_found`.
|
|
322
|
+
#
|
|
323
|
+
# +POST /v3/users/lookup/+
|
|
324
|
+
#
|
|
325
|
+
# @param identifiers [Array<String>] Each entry is a `vendor_data` value, a Didit user ID or a verified email.
|
|
326
|
+
# Send at most 100,000 entries. Blank entries are dropped and duplicates removed, keeping the first, and at most
|
|
327
|
+
# 20,000 identifiers must remain. Either limit exceeded is a `400` with `code: too_many_identifiers`, and an
|
|
328
|
+
# empty list is a `400` too.
|
|
329
|
+
# @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
|
|
330
|
+
# @return [Didit::Types::UsersLookupResponse]
|
|
331
|
+
def lookup(identifiers:, request_options: nil)
|
|
332
|
+
@client.request(
|
|
333
|
+
:post,
|
|
334
|
+
"/v3/users/lookup/",
|
|
335
|
+
body: {
|
|
336
|
+
"identifiers" => identifiers
|
|
337
|
+
},
|
|
338
|
+
response: Types::UsersLookupResponse,
|
|
339
|
+
request_options: request_options
|
|
340
|
+
)
|
|
341
|
+
end
|
|
342
|
+
|
|
281
343
|
# Get user
|
|
282
344
|
#
|
|
283
345
|
# Fetch one [user](/entities/users) by `vendor_data` (exact match). Adds `metadata`, `comments`, and
|
data/lib/didit/resources.rb
CHANGED
|
@@ -10,6 +10,7 @@ module Didit
|
|
|
10
10
|
autoload :Aml, "didit/resources/aml"
|
|
11
11
|
autoload :AmlMonitoring, "didit/resources/aml_monitoring"
|
|
12
12
|
autoload :Analytics, "didit/resources/analytics"
|
|
13
|
+
autoload :AuthenticationSetup, "didit/resources/authentication_setup"
|
|
13
14
|
autoload :Bank, "didit/resources/bank"
|
|
14
15
|
autoload :Billing, "didit/resources/billing"
|
|
15
16
|
autoload :BiometricTemplates, "didit/resources/biometric_templates"
|
|
@@ -81,6 +82,11 @@ module Didit
|
|
|
81
82
|
@analytics ||= Resources::Analytics.new(self)
|
|
82
83
|
end
|
|
83
84
|
|
|
85
|
+
# @return [Didit::Resources::AuthenticationSetup]
|
|
86
|
+
def authentication_setup
|
|
87
|
+
@authentication_setup ||= Resources::AuthenticationSetup.new(self)
|
|
88
|
+
end
|
|
89
|
+
|
|
84
90
|
# @return [Didit::Resources::Bank]
|
|
85
91
|
def bank
|
|
86
92
|
@bank ||= Resources::Bank.new(self)
|