didit-sdk 1.0.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 +7 -0
- data/CHANGELOG.md +25 -0
- data/LICENSE +21 -0
- data/README.md +277 -0
- data/lib/didit/authentication/base64_url.rb +34 -0
- data/lib/didit/authentication/cache.rb +201 -0
- data/lib/didit/authentication/http.rb +150 -0
- data/lib/didit/authentication/issuer.rb +115 -0
- data/lib/didit/authentication/jws.rb +231 -0
- data/lib/didit/authentication/key_set.rb +89 -0
- data/lib/didit/authentication/pkce.rb +64 -0
- data/lib/didit/authentication/types.rb +175 -0
- data/lib/didit/authentication.rb +546 -0
- data/lib/didit/client.rb +211 -0
- data/lib/didit/errors.rb +153 -0
- data/lib/didit/file_part.rb +85 -0
- data/lib/didit/internal/config.rb +94 -0
- data/lib/didit/internal/errors.rb +83 -0
- data/lib/didit/internal/log.rb +41 -0
- data/lib/didit/internal/multipart.rb +60 -0
- data/lib/didit/internal/request.rb +322 -0
- data/lib/didit/internal/transport.rb +198 -0
- data/lib/didit/internal/util.rb +76 -0
- data/lib/didit/internal.rb +15 -0
- data/lib/didit/model.rb +199 -0
- data/lib/didit/page.rb +130 -0
- data/lib/didit/raw_response.rb +57 -0
- data/lib/didit/resource.rb +15 -0
- data/lib/didit/resources/account.rb +309 -0
- data/lib/didit/resources/address_validation.rb +73 -0
- data/lib/didit/resources/age_estimation.rb +110 -0
- data/lib/didit/resources/aml.rb +166 -0
- data/lib/didit/resources/aml_monitoring.rb +30 -0
- data/lib/didit/resources/analytics.rb +87 -0
- data/lib/didit/resources/bank.rb +65 -0
- data/lib/didit/resources/billing.rb +61 -0
- data/lib/didit/resources/biometric_templates.rb +234 -0
- data/lib/didit/resources/blocklist.rb +130 -0
- data/lib/didit/resources/business_sessions.rb +29 -0
- data/lib/didit/resources/businesses.rb +471 -0
- data/lib/didit/resources/cases.rb +2116 -0
- data/lib/didit/resources/customization.rb +153 -0
- data/lib/didit/resources/database_validation.rb +327 -0
- data/lib/didit/resources/document_ai.rb +145 -0
- data/lib/didit/resources/email.rb +254 -0
- data/lib/didit/resources/face_match.rb +103 -0
- data/lib/didit/resources/face_search.rb +103 -0
- data/lib/didit/resources/fraud_checks.rb +130 -0
- data/lib/didit/resources/id_verification.rb +163 -0
- data/lib/didit/resources/id_wallets.rb +1468 -0
- data/lib/didit/resources/investigator.rb +419 -0
- data/lib/didit/resources/ip.rb +68 -0
- data/lib/didit/resources/kyb.rb +256 -0
- data/lib/didit/resources/lists.rb +332 -0
- data/lib/didit/resources/monitoring_events.rb +466 -0
- data/lib/didit/resources/networks.rb +427 -0
- data/lib/didit/resources/passive_liveness.rb +103 -0
- data/lib/didit/resources/phone.rb +271 -0
- data/lib/didit/resources/pricing.rb +40 -0
- data/lib/didit/resources/proof_of_address.rb +167 -0
- data/lib/didit/resources/questionnaires.rb +170 -0
- data/lib/didit/resources/regulatory_reports.rb +314 -0
- data/lib/didit/resources/report_templates.rb +146 -0
- data/lib/didit/resources/sessions.rb +2820 -0
- data/lib/didit/resources/transactions.rb +981 -0
- data/lib/didit/resources/travel_rule.rb +1202 -0
- data/lib/didit/resources/users.rb +521 -0
- data/lib/didit/resources/wallet_screening.rb +190 -0
- data/lib/didit/resources/webhooks.rb +396 -0
- data/lib/didit/resources/workflows.rb +214 -0
- data/lib/didit/resources.rb +263 -0
- data/lib/didit/types/account.rb +11 -0
- data/lib/didit/types/account_components.rb +105 -0
- data/lib/didit/types/address_validation.rb +8 -0
- data/lib/didit/types/age_estimation.rb +89 -0
- data/lib/didit/types/aml.rb +193 -0
- data/lib/didit/types/aml_monitoring.rb +73 -0
- data/lib/didit/types/analytics.rb +62 -0
- data/lib/didit/types/bank.rb +8 -0
- data/lib/didit/types/billing.rb +18 -0
- data/lib/didit/types/biometric_templates.rb +292 -0
- data/lib/didit/types/blocklist.rb +31 -0
- data/lib/didit/types/businesses.rb +45 -0
- data/lib/didit/types/cases.rb +368 -0
- data/lib/didit/types/components.rb +12206 -0
- data/lib/didit/types/customization.rb +8 -0
- data/lib/didit/types/database_validation.rb +177 -0
- data/lib/didit/types/document_ai.rb +135 -0
- data/lib/didit/types/email.rb +116 -0
- data/lib/didit/types/face_match.rb +93 -0
- data/lib/didit/types/face_search.rb +129 -0
- data/lib/didit/types/fraud_checks.rb +8 -0
- data/lib/didit/types/id_verification.rb +231 -0
- data/lib/didit/types/id_wallets.rb +8 -0
- data/lib/didit/types/investigator.rb +221 -0
- data/lib/didit/types/ip.rb +8 -0
- data/lib/didit/types/kyb.rb +1391 -0
- data/lib/didit/types/lists.rb +111 -0
- data/lib/didit/types/monitoring_events.rb +235 -0
- data/lib/didit/types/networks.rb +120 -0
- data/lib/didit/types/passive_liveness.rb +95 -0
- data/lib/didit/types/phone.rb +69 -0
- data/lib/didit/types/proof_of_address.rb +166 -0
- data/lib/didit/types/questionnaires.rb +29 -0
- data/lib/didit/types/regulatory_reports.rb +100 -0
- data/lib/didit/types/report_templates.rb +41 -0
- data/lib/didit/types/sessions.rb +1441 -0
- data/lib/didit/types/transactions.rb +245 -0
- data/lib/didit/types/travel_rule.rb +168 -0
- data/lib/didit/types/users.rb +180 -0
- data/lib/didit/types/wallet_screening.rb +49 -0
- data/lib/didit/types/webhooks.rb +355 -0
- data/lib/didit/types/workflows.rb +32 -0
- data/lib/didit/types.rb +1681 -0
- data/lib/didit/version.rb +5 -0
- data/lib/didit/webhooks/canonical_json.rb +187 -0
- data/lib/didit/webhooks/client_methods.rb +23 -0
- data/lib/didit/webhooks/events.rb +221 -0
- data/lib/didit/webhooks/headers.rb +83 -0
- data/lib/didit/webhooks/verifier.rb +260 -0
- data/lib/didit/webhooks.rb +99 -0
- data/lib/didit-sdk.rb +4 -0
- data/lib/didit.rb +31 -0
- data/sig/didit/authentication/base64_url.rbs +10 -0
- data/sig/didit/authentication/cache.rbs +60 -0
- data/sig/didit/authentication/http.rbs +37 -0
- data/sig/didit/authentication/issuer.rbs +17 -0
- data/sig/didit/authentication/jws.rbs +41 -0
- data/sig/didit/authentication/jwt.rbs +14 -0
- data/sig/didit/authentication/key_set.rbs +25 -0
- data/sig/didit/authentication/pkce.rbs +20 -0
- data/sig/didit/authentication/types.rbs +114 -0
- data/sig/didit/authentication.rbs +81 -0
- data/sig/didit/client.rbs +61 -0
- data/sig/didit/errors.rbs +80 -0
- data/sig/didit/file_part.rbs +19 -0
- data/sig/didit/internal.rbs +199 -0
- data/sig/didit/model.rbs +42 -0
- data/sig/didit/page.rbs +34 -0
- data/sig/didit/raw_response.rbs +20 -0
- data/sig/didit/resource.rbs +8 -0
- data/sig/didit/resources/account.rbs +23 -0
- data/sig/didit/resources/address_validation.rbs +9 -0
- data/sig/didit/resources/age_estimation.rbs +9 -0
- data/sig/didit/resources/aml.rbs +10 -0
- data/sig/didit/resources/aml_monitoring.rbs +9 -0
- data/sig/didit/resources/analytics.rbs +9 -0
- data/sig/didit/resources/bank.rbs +9 -0
- data/sig/didit/resources/billing.rbs +10 -0
- data/sig/didit/resources/biometric_templates.rbs +13 -0
- data/sig/didit/resources/blocklist.rbs +11 -0
- data/sig/didit/resources/business_sessions.rbs +9 -0
- data/sig/didit/resources/businesses.rbs +22 -0
- data/sig/didit/resources/cases.rbs +103 -0
- data/sig/didit/resources/customization.rbs +10 -0
- data/sig/didit/resources/database_validation.rbs +9 -0
- data/sig/didit/resources/document_ai.rbs +9 -0
- data/sig/didit/resources/email.rbs +11 -0
- data/sig/didit/resources/face_match.rbs +9 -0
- data/sig/didit/resources/face_search.rbs +9 -0
- data/sig/didit/resources/fraud_checks.rbs +11 -0
- data/sig/didit/resources/id_verification.rbs +9 -0
- data/sig/didit/resources/id_wallets.rbs +37 -0
- data/sig/didit/resources/investigator.rbs +23 -0
- data/sig/didit/resources/ip.rbs +9 -0
- data/sig/didit/resources/kyb.rbs +12 -0
- data/sig/didit/resources/lists.rbs +20 -0
- data/sig/didit/resources/monitoring_events.rbs +16 -0
- data/sig/didit/resources/networks.rbs +25 -0
- data/sig/didit/resources/passive_liveness.rbs +9 -0
- data/sig/didit/resources/phone.rbs +11 -0
- data/sig/didit/resources/pricing.rbs +9 -0
- data/sig/didit/resources/proof_of_address.rbs +9 -0
- data/sig/didit/resources/questionnaires.rbs +13 -0
- data/sig/didit/resources/regulatory_reports.rbs +16 -0
- data/sig/didit/resources/report_templates.rbs +13 -0
- data/sig/didit/resources/sessions.rbs +78 -0
- data/sig/didit/resources/transactions.rbs +43 -0
- data/sig/didit/resources/travel_rule.rbs +62 -0
- data/sig/didit/resources/users.rbs +21 -0
- data/sig/didit/resources/wallet_screening.rbs +11 -0
- data/sig/didit/resources/webhooks.rbs +23 -0
- data/sig/didit/resources/workflows.rbs +13 -0
- data/sig/didit/resources.rbs +50 -0
- data/sig/didit/types/account.rbs +22 -0
- data/sig/didit/types/account_components.rbs +94 -0
- data/sig/didit/types/address_validation.rbs +7 -0
- data/sig/didit/types/age_estimation.rbs +80 -0
- data/sig/didit/types/aml.rbs +174 -0
- data/sig/didit/types/aml_monitoring.rbs +67 -0
- data/sig/didit/types/analytics.rbs +57 -0
- data/sig/didit/types/bank.rbs +9 -0
- data/sig/didit/types/billing.rbs +19 -0
- data/sig/didit/types/biometric_templates.rbs +268 -0
- data/sig/didit/types/blocklist.rbs +33 -0
- data/sig/didit/types/businesses.rbs +54 -0
- data/sig/didit/types/cases.rbs +414 -0
- data/sig/didit/types/components.rbs +10920 -0
- data/sig/didit/types/customization.rbs +7 -0
- data/sig/didit/types/database_validation.rbs +152 -0
- data/sig/didit/types/document_ai.rbs +123 -0
- data/sig/didit/types/email.rbs +112 -0
- data/sig/didit/types/face_match.rbs +86 -0
- data/sig/didit/types/face_search.rbs +112 -0
- data/sig/didit/types/fraud_checks.rbs +9 -0
- data/sig/didit/types/id_verification.rbs +196 -0
- data/sig/didit/types/id_wallets.rbs +55 -0
- data/sig/didit/types/investigator.rbs +212 -0
- data/sig/didit/types/ip.rbs +7 -0
- data/sig/didit/types/kyb.rbs +1254 -0
- data/sig/didit/types/lists.rbs +106 -0
- data/sig/didit/types/monitoring_events.rbs +234 -0
- data/sig/didit/types/networks.rbs +113 -0
- data/sig/didit/types/passive_liveness.rbs +87 -0
- data/sig/didit/types/phone.rbs +65 -0
- data/sig/didit/types/proof_of_address.rbs +144 -0
- data/sig/didit/types/questionnaires.rbs +30 -0
- data/sig/didit/types/regulatory_reports.rbs +101 -0
- data/sig/didit/types/report_templates.rbs +42 -0
- data/sig/didit/types/sessions.rbs +1349 -0
- data/sig/didit/types/transactions.rbs +273 -0
- data/sig/didit/types/travel_rule.rbs +188 -0
- data/sig/didit/types/users.rbs +181 -0
- data/sig/didit/types/wallet_screening.rbs +40 -0
- data/sig/didit/types/webhooks.rbs +311 -0
- data/sig/didit/types/workflows.rbs +30 -0
- data/sig/didit/webhooks/canonical_json.rbs +25 -0
- data/sig/didit/webhooks/client_methods.rbs +11 -0
- data/sig/didit/webhooks/events.rbs +125 -0
- data/sig/didit/webhooks/headers.rbs +22 -0
- data/sig/didit/webhooks/verifier.rbs +54 -0
- data/sig/didit/webhooks.rbs +37 -0
- data/sig/didit.rbs +20 -0
- metadata +300 -0
|
@@ -0,0 +1,427 @@
|
|
|
1
|
+
# Code generated by codegen from openapi/*.json. DO NOT EDIT.
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
module Didit
|
|
5
|
+
module Resources
|
|
6
|
+
# The +networks+ resource.
|
|
7
|
+
class Networks < Didit::Resource
|
|
8
|
+
# @return [Didit::Resources::Networks::Notes]
|
|
9
|
+
def notes
|
|
10
|
+
@notes ||= Notes.new(@client)
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
# Add a tag to a network
|
|
14
|
+
#
|
|
15
|
+
# Put one of your application's tags on the network. Returns the network detail, whose `tags` lists your
|
|
16
|
+
# application's tags on the network, with `201` when the tag was added and `200` when it was already on the
|
|
17
|
+
# network. A tag that belongs to another application, or does not exist, returns 404 `Tag not found.`. Requires
|
|
18
|
+
# a full-access API key, or `write:networks` for a console member.
|
|
19
|
+
#
|
|
20
|
+
# +POST /v3/organization/{organization_id}/application/{application_id}/networks/{network_uuid}/tags/add/+
|
|
21
|
+
#
|
|
22
|
+
# @param network_uuid [String] Network UUID.
|
|
23
|
+
# @param tag_uuid [String] UUID of one of your application's tags.
|
|
24
|
+
# @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
|
|
25
|
+
# @return [Didit::Types::NetworkDetailResponse]
|
|
26
|
+
def add_tag(network_uuid, tag_uuid:, request_options: nil)
|
|
27
|
+
@client.request(
|
|
28
|
+
:post,
|
|
29
|
+
"/v3/organization/{organization_id}/application/{application_id}/networks/{network_uuid}/tags/add/",
|
|
30
|
+
path_params: { "network_uuid" => network_uuid },
|
|
31
|
+
body: {
|
|
32
|
+
"tag_uuid" => tag_uuid
|
|
33
|
+
},
|
|
34
|
+
scope: :application,
|
|
35
|
+
response: Types::NetworkDetailResponse,
|
|
36
|
+
request_options: request_options
|
|
37
|
+
)
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
# Download a network evidence report
|
|
41
|
+
#
|
|
42
|
+
# Download a PDF of the current organization network, its observed account connections, signal references and
|
|
43
|
+
# review status. Requires read:networks. Global intelligence and private analyst notes are not included. Each
|
|
44
|
+
# account and signal list is capped at 500 entries and the report states when it is incomplete. The request does
|
|
45
|
+
# not change network status. Errors are returned as JSON.
|
|
46
|
+
#
|
|
47
|
+
# +GET /v3/organization/{organization_id}/application/{application_id}/networks/{network_uuid}/report/+
|
|
48
|
+
#
|
|
49
|
+
# @param network_uuid [String] Network UUID.
|
|
50
|
+
# @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
|
|
51
|
+
# @return [String, nil] the body bytes, or nil when a block receives the chunks
|
|
52
|
+
def download_report(network_uuid, request_options: nil, &block)
|
|
53
|
+
@client.request(
|
|
54
|
+
:get,
|
|
55
|
+
"/v3/organization/{organization_id}/application/{application_id}/networks/{network_uuid}/report/",
|
|
56
|
+
path_params: { "network_uuid" => network_uuid },
|
|
57
|
+
scope: :application,
|
|
58
|
+
response: :binary,
|
|
59
|
+
accept: "application/pdf, application/json",
|
|
60
|
+
request_options: request_options, &block
|
|
61
|
+
)
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
# List networks
|
|
65
|
+
#
|
|
66
|
+
# List fraud networks detected within this application's organization, highest risk first by default. By default
|
|
67
|
+
# dismissed networks are excluded; pass status to include them. Sandbox applications never have networks:
|
|
68
|
+
# clustering excludes sandbox data entirely. Every response carries the organization's `sharing_mode` and
|
|
69
|
+
# whether cross-organization signals apply to it (`cross_org_available`, `cross_org_unavailable_reason`). `kpis`
|
|
70
|
+
# aggregate the networks that match your filters and `counts` aggregate every network the application can see;
|
|
71
|
+
# pass `summary=false` to skip both when you only need the page. Requires a full-access API key, or
|
|
72
|
+
# `list:networks` for a console member.
|
|
73
|
+
#
|
|
74
|
+
# +GET /v3/organization/{organization_id}/application/{application_id}/networks/+
|
|
75
|
+
#
|
|
76
|
+
# @param status [String] Comma-separated statuses to include: active,in_review,resolved,dismissed. Omit to
|
|
77
|
+
# exclude dismissed.
|
|
78
|
+
# @param scope [String] `transactions` keeps networks whose members are all transaction parties; `identity`
|
|
79
|
+
# keeps every other network. Omit for both. It also narrows `counts.views` and `counts.facets`. Any other value
|
|
80
|
+
# returns 400.
|
|
81
|
+
# @param signal_type [String] Comma-separated signal types:
|
|
82
|
+
# ip_address,device,face,document_number,phone,email,address.
|
|
83
|
+
# @param pattern_type [String] Comma-separated pattern types, e.g. exact_same_device,same_email.
|
|
84
|
+
# @param risk_band [String] Comma-separated bands: low,medium,high.
|
|
85
|
+
# @param min_size [Integer] Minimum member count.
|
|
86
|
+
# @param max_size [Integer] Maximum member count.
|
|
87
|
+
# @param assignee [String] Comma-separated assignees: `unassigned`, member emails (matched case-insensitively),
|
|
88
|
+
# or `me` for the calling console member. A network matches any value. `me` needs a console member token: an API
|
|
89
|
+
# key gets 400 `{"assignee": ["\"me\" needs a user token; an API key has no assignee identity."]}`.
|
|
90
|
+
# @param priority [String] Comma-separated priorities: `low`, `medium`, `high`, or `none` for networks without a
|
|
91
|
+
# priority. Any other value returns 400 `{"priority": "Unknown priority: <values>."}`.
|
|
92
|
+
# @param risk_min [Integer] Minimum risk score, a whole number from 0 to 100. A value that is not a whole number
|
|
93
|
+
# returns 400 `{"risk_min": "Use a whole number from 0 to 100."}`.
|
|
94
|
+
# @param has_case [Boolean] `true` keeps the networks your application opened a case for, `false` the others.
|
|
95
|
+
# Any other value is ignored.
|
|
96
|
+
# @param date_from [Date, String] Lower bound on last_activity_at (ISO 8601 date or datetime).
|
|
97
|
+
# @param date_to [Date, String] Upper bound on first_activity_at (ISO 8601 date or datetime).
|
|
98
|
+
# @param q [String] Free-text search across network name, member names, the network_id (N-0001), and exact
|
|
99
|
+
# pattern_type tokens.
|
|
100
|
+
# @param ordering [String] One of risk_score, -risk_score, last_activity_at, -last_activity_at,
|
|
101
|
+
# first_activity_at, -first_activity_at, network_number, -network_number. Defaults to
|
|
102
|
+
# -risk_score,-last_activity_at.
|
|
103
|
+
# @param limit [Integer] Page size, 1-500. Defaults to 100.
|
|
104
|
+
# @param offset [Integer] Zero-based offset of the first record.
|
|
105
|
+
# @param summary [Boolean] `false` returns the page and its `count` only, without `kpis` and `counts`. Defaults
|
|
106
|
+
# to `true`. Any value other than `true` or `false` returns 400.
|
|
107
|
+
# @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
|
|
108
|
+
# @return [Didit::Page<Didit::Types::NetworkListItem>]
|
|
109
|
+
def list(
|
|
110
|
+
status: OMIT,
|
|
111
|
+
scope: OMIT,
|
|
112
|
+
signal_type: OMIT,
|
|
113
|
+
pattern_type: OMIT,
|
|
114
|
+
risk_band: OMIT,
|
|
115
|
+
min_size: OMIT,
|
|
116
|
+
max_size: OMIT,
|
|
117
|
+
assignee: OMIT,
|
|
118
|
+
priority: OMIT,
|
|
119
|
+
risk_min: OMIT,
|
|
120
|
+
has_case: OMIT,
|
|
121
|
+
date_from: OMIT,
|
|
122
|
+
date_to: OMIT,
|
|
123
|
+
q: OMIT,
|
|
124
|
+
ordering: OMIT,
|
|
125
|
+
limit: OMIT,
|
|
126
|
+
offset: OMIT,
|
|
127
|
+
summary: OMIT,
|
|
128
|
+
request_options: nil
|
|
129
|
+
)
|
|
130
|
+
@client.request(
|
|
131
|
+
:get,
|
|
132
|
+
"/v3/organization/{organization_id}/application/{application_id}/networks/",
|
|
133
|
+
query: {
|
|
134
|
+
"status" => status,
|
|
135
|
+
"scope" => scope,
|
|
136
|
+
"signal_type" => signal_type,
|
|
137
|
+
"pattern_type" => pattern_type,
|
|
138
|
+
"risk_band" => risk_band,
|
|
139
|
+
"min_size" => min_size,
|
|
140
|
+
"max_size" => max_size,
|
|
141
|
+
"assignee" => assignee,
|
|
142
|
+
"priority" => priority,
|
|
143
|
+
"risk_min" => risk_min,
|
|
144
|
+
"has_case" => has_case,
|
|
145
|
+
"date_from" => date_from,
|
|
146
|
+
"date_to" => date_to,
|
|
147
|
+
"q" => q,
|
|
148
|
+
"ordering" => ordering,
|
|
149
|
+
"limit" => limit,
|
|
150
|
+
"offset" => offset,
|
|
151
|
+
"summary" => summary
|
|
152
|
+
},
|
|
153
|
+
scope: :application,
|
|
154
|
+
page: Types::NetworkListItem,
|
|
155
|
+
request_options: request_options
|
|
156
|
+
)
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
# List network members
|
|
160
|
+
#
|
|
161
|
+
# List the subjects (vendor users, vendor businesses, or transaction parties) that belong to this network.
|
|
162
|
+
#
|
|
163
|
+
# +GET /v3/organization/{organization_id}/application/{application_id}/networks/{network_uuid}/members/+
|
|
164
|
+
#
|
|
165
|
+
# @param network_uuid [String] Network UUID.
|
|
166
|
+
# @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
|
|
167
|
+
# @return [Didit::Types::NetworksListMembersResponse]
|
|
168
|
+
def list_members(network_uuid, request_options: nil)
|
|
169
|
+
@client.request(
|
|
170
|
+
:get,
|
|
171
|
+
"/v3/organization/{organization_id}/application/{application_id}/networks/{network_uuid}/members/",
|
|
172
|
+
path_params: { "network_uuid" => network_uuid },
|
|
173
|
+
scope: :application,
|
|
174
|
+
response: Types::NetworksListMembersResponse,
|
|
175
|
+
request_options: request_options
|
|
176
|
+
)
|
|
177
|
+
end
|
|
178
|
+
|
|
179
|
+
# List network signals
|
|
180
|
+
#
|
|
181
|
+
# List the signals (shared device, IP, face, document number, phone, email, or address values) that link this
|
|
182
|
+
# network's members.
|
|
183
|
+
#
|
|
184
|
+
# +GET /v3/organization/{organization_id}/application/{application_id}/networks/{network_uuid}/signals/+
|
|
185
|
+
#
|
|
186
|
+
# @param network_uuid [String] Network UUID.
|
|
187
|
+
# @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
|
|
188
|
+
# @return [Didit::Types::NetworksListSignalsResponse]
|
|
189
|
+
def list_signals(network_uuid, request_options: nil)
|
|
190
|
+
@client.request(
|
|
191
|
+
:get,
|
|
192
|
+
"/v3/organization/{organization_id}/application/{application_id}/networks/{network_uuid}/signals/",
|
|
193
|
+
path_params: { "network_uuid" => network_uuid },
|
|
194
|
+
scope: :application,
|
|
195
|
+
response: Types::NetworksListSignalsResponse,
|
|
196
|
+
request_options: request_options
|
|
197
|
+
)
|
|
198
|
+
end
|
|
199
|
+
|
|
200
|
+
# Remove a tag from a network
|
|
201
|
+
#
|
|
202
|
+
# Remove one of your application's tags from the network. Returns the network detail. 404 when the tag is not on
|
|
203
|
+
# the network, or does not belong to your application. Requires a full-access API key, or `write:networks` for a
|
|
204
|
+
# console member.
|
|
205
|
+
#
|
|
206
|
+
# +POST /v3/organization/{organization_id}/application/{application_id}/networks/{network_uuid}/tags/remove/+
|
|
207
|
+
#
|
|
208
|
+
# @param network_uuid [String] Network UUID.
|
|
209
|
+
# @param tag_uuid [String] UUID of one of your application's tags.
|
|
210
|
+
# @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
|
|
211
|
+
# @return [Didit::Types::NetworkDetailResponse]
|
|
212
|
+
def remove_tag(network_uuid, tag_uuid:, request_options: nil)
|
|
213
|
+
@client.request(
|
|
214
|
+
:post,
|
|
215
|
+
"/v3/organization/{organization_id}/application/{application_id}/networks/{network_uuid}/tags/remove/",
|
|
216
|
+
path_params: { "network_uuid" => network_uuid },
|
|
217
|
+
body: {
|
|
218
|
+
"tag_uuid" => tag_uuid
|
|
219
|
+
},
|
|
220
|
+
scope: :application,
|
|
221
|
+
response: Types::NetworkDetailResponse,
|
|
222
|
+
request_options: request_options
|
|
223
|
+
)
|
|
224
|
+
end
|
|
225
|
+
|
|
226
|
+
# Get network
|
|
227
|
+
#
|
|
228
|
+
# Retrieve a single network's full detail: stats, fraud tags and risk signals, plus the organization's
|
|
229
|
+
# `sharing_mode` and cross-organization availability, your application's `tags` on the network, member
|
|
230
|
+
# `outcomes` and pattern scores (`patterns`). Requires a full-access API key, or `read:networks` for a console
|
|
231
|
+
# member.
|
|
232
|
+
#
|
|
233
|
+
# +GET /v3/organization/{organization_id}/application/{application_id}/networks/{network_uuid}/+
|
|
234
|
+
#
|
|
235
|
+
# @param network_uuid [String] Network UUID.
|
|
236
|
+
# @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
|
|
237
|
+
# @return [Didit::Types::NetworkDetailResponse]
|
|
238
|
+
def retrieve(network_uuid, request_options: nil)
|
|
239
|
+
@client.request(
|
|
240
|
+
:get,
|
|
241
|
+
"/v3/organization/{organization_id}/application/{application_id}/networks/{network_uuid}/",
|
|
242
|
+
path_params: { "network_uuid" => network_uuid },
|
|
243
|
+
scope: :application,
|
|
244
|
+
response: Types::NetworkDetailResponse,
|
|
245
|
+
request_options: request_options
|
|
246
|
+
)
|
|
247
|
+
end
|
|
248
|
+
|
|
249
|
+
# Get network graph
|
|
250
|
+
#
|
|
251
|
+
# Retrieve the network as a graph of subject nodes (vendor users, vendor businesses, transaction parties) and
|
|
252
|
+
# signal nodes (the shared device/IP/face/document/phone/email/address values linking them), with edges
|
|
253
|
+
# representing memberships.
|
|
254
|
+
#
|
|
255
|
+
# +GET /v3/organization/{organization_id}/application/{application_id}/networks/{network_uuid}/graph/+
|
|
256
|
+
#
|
|
257
|
+
# @param network_uuid [String] Network UUID.
|
|
258
|
+
# @param depth [String] Hops from the focus subject to include. Defaults to all (unbounded).
|
|
259
|
+
# @param focus_kind [String] Subject type to center the graph on. Must be supplied together with focus_id;
|
|
260
|
+
# defaults to an arbitrary member when depth is bounded and neither is supplied.
|
|
261
|
+
# @param focus_id [String] Subject UUID to center the graph on.
|
|
262
|
+
# @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
|
|
263
|
+
# @return [Didit::Types::NetworkGraph]
|
|
264
|
+
def retrieve_graph(network_uuid, depth: OMIT, focus_kind: OMIT, focus_id: OMIT, request_options: nil)
|
|
265
|
+
@client.request(
|
|
266
|
+
:get,
|
|
267
|
+
"/v3/organization/{organization_id}/application/{application_id}/networks/{network_uuid}/graph/",
|
|
268
|
+
path_params: { "network_uuid" => network_uuid },
|
|
269
|
+
query: {
|
|
270
|
+
"depth" => depth,
|
|
271
|
+
"focus_kind" => focus_kind,
|
|
272
|
+
"focus_id" => focus_id
|
|
273
|
+
},
|
|
274
|
+
scope: :application,
|
|
275
|
+
response: Types::NetworkGraph,
|
|
276
|
+
request_options: request_options
|
|
277
|
+
)
|
|
278
|
+
end
|
|
279
|
+
|
|
280
|
+
# Get network map
|
|
281
|
+
#
|
|
282
|
+
# Geographic points where this network's members' addresses/locations converge, sourced from the sessions,
|
|
283
|
+
# business sessions, and transactions backing its memberships.
|
|
284
|
+
#
|
|
285
|
+
# +GET /v3/organization/{organization_id}/application/{application_id}/networks/{network_uuid}/map/+
|
|
286
|
+
#
|
|
287
|
+
# @param network_uuid [String] Network UUID.
|
|
288
|
+
# @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
|
|
289
|
+
# @return [Didit::Types::NetworkMap]
|
|
290
|
+
def retrieve_map(network_uuid, request_options: nil)
|
|
291
|
+
@client.request(
|
|
292
|
+
:get,
|
|
293
|
+
"/v3/organization/{organization_id}/application/{application_id}/networks/{network_uuid}/map/",
|
|
294
|
+
path_params: { "network_uuid" => network_uuid },
|
|
295
|
+
scope: :application,
|
|
296
|
+
response: Types::NetworkMap,
|
|
297
|
+
request_options: request_options
|
|
298
|
+
)
|
|
299
|
+
end
|
|
300
|
+
|
|
301
|
+
# Get network timeline
|
|
302
|
+
#
|
|
303
|
+
# Without `contract`: the network's own events (detection, each signal's latest observation and its review),
|
|
304
|
+
# oldest first and not paginated. `limit`, `cursor` and `event_type` are ignored. With `contract=2`: the typed
|
|
305
|
+
# timeline, newest first and paginated by cursor. It adds what the member accounts did (verification attempts,
|
|
306
|
+
# transactions, sign-ins you post through the events API and the live rules they hit) and the cases opened for
|
|
307
|
+
# the network. `note_added` events are returned to console members only, never to an API key. Requires a
|
|
308
|
+
# full-access API key, or `read:networks` for a console member.
|
|
309
|
+
#
|
|
310
|
+
# +GET /v3/organization/{organization_id}/application/{application_id}/networks/{network_uuid}/timeline/+
|
|
311
|
+
#
|
|
312
|
+
# @param network_uuid [String] Network UUID.
|
|
313
|
+
# @param contract [String] `2` returns the typed timeline. Omit it for the default timeline. Any other value
|
|
314
|
+
# returns 400.
|
|
315
|
+
# @param limit [Integer] Typed timeline only. Events per page, 1 to 500. Defaults to 100.
|
|
316
|
+
# @param cursor [String] Typed timeline only. The previous page's `next_cursor`. An invalid or empty cursor
|
|
317
|
+
# returns 400.
|
|
318
|
+
# @param event_type [Array<String>] Typed timeline only. Event types to keep, repeated or comma-separated, at
|
|
319
|
+
# most 20 values. Defaults to every type.
|
|
320
|
+
# @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
|
|
321
|
+
# @return [Didit::Types::NetworksRetrieveTimelineResponse]
|
|
322
|
+
def retrieve_timeline(
|
|
323
|
+
network_uuid,
|
|
324
|
+
contract: OMIT,
|
|
325
|
+
limit: OMIT,
|
|
326
|
+
cursor: OMIT,
|
|
327
|
+
event_type: OMIT,
|
|
328
|
+
request_options: nil
|
|
329
|
+
)
|
|
330
|
+
@client.request(
|
|
331
|
+
:get,
|
|
332
|
+
"/v3/organization/{organization_id}/application/{application_id}/networks/{network_uuid}/timeline/",
|
|
333
|
+
path_params: { "network_uuid" => network_uuid },
|
|
334
|
+
query: {
|
|
335
|
+
"contract" => contract,
|
|
336
|
+
"limit" => limit,
|
|
337
|
+
"cursor" => cursor,
|
|
338
|
+
"event_type" => event_type
|
|
339
|
+
},
|
|
340
|
+
scope: :application,
|
|
341
|
+
response: Types::NetworksRetrieveTimelineResponse,
|
|
342
|
+
request_options: request_options
|
|
343
|
+
)
|
|
344
|
+
end
|
|
345
|
+
|
|
346
|
+
# The +networks.notes+ resource.
|
|
347
|
+
class Notes < Didit::Resource
|
|
348
|
+
# Add a private network note
|
|
349
|
+
#
|
|
350
|
+
# Requires a console user with write:networks. The author is assigned from the authenticated user. Supply a
|
|
351
|
+
# new random UUID client_reference for each note; retry the same body and reference after an uncertain
|
|
352
|
+
# response to avoid duplicates. Reusing a reference for another body, author or network returns 409. Notes
|
|
353
|
+
# follow the surviving investigation when networks merge.
|
|
354
|
+
#
|
|
355
|
+
# +POST /v3/organization/{organization_id}/application/{application_id}/networks/{network_uuid}/notes/+
|
|
356
|
+
#
|
|
357
|
+
# @param network_uuid [String] Network UUID.
|
|
358
|
+
# @param comment [String]
|
|
359
|
+
# @param client_reference [String]
|
|
360
|
+
# @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
|
|
361
|
+
# @return [Didit::Types::NetworkNote]
|
|
362
|
+
def create(network_uuid, comment:, client_reference:, request_options: nil)
|
|
363
|
+
@client.request(
|
|
364
|
+
:post,
|
|
365
|
+
"/v3/organization/{organization_id}/application/{application_id}/networks/{network_uuid}/notes/",
|
|
366
|
+
path_params: { "network_uuid" => network_uuid },
|
|
367
|
+
body: {
|
|
368
|
+
"comment" => comment,
|
|
369
|
+
"client_reference" => client_reference
|
|
370
|
+
},
|
|
371
|
+
scope: :application,
|
|
372
|
+
response: Types::NetworkNote,
|
|
373
|
+
request_options: request_options
|
|
374
|
+
)
|
|
375
|
+
end
|
|
376
|
+
|
|
377
|
+
# Delete your network note
|
|
378
|
+
#
|
|
379
|
+
# Requires write:networks and the authenticated author of the note. Deletion is irreversible. Connected
|
|
380
|
+
# account and verification data are unaffected.
|
|
381
|
+
#
|
|
382
|
+
# +DELETE /v3/organization/{organization_id}/application/{application_id}/networks/{network_uuid}/notes/{note_uuid}/+
|
|
383
|
+
#
|
|
384
|
+
# @param network_uuid [String] Network UUID.
|
|
385
|
+
# @param note_uuid [String]
|
|
386
|
+
# @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
|
|
387
|
+
# @return [nil]
|
|
388
|
+
def delete(network_uuid, note_uuid, request_options: nil)
|
|
389
|
+
@client.request(
|
|
390
|
+
:delete,
|
|
391
|
+
"/v3/organization/{organization_id}/application/{application_id}/networks/{network_uuid}/notes/{note_uuid}/",
|
|
392
|
+
path_params: { "network_uuid" => network_uuid, "note_uuid" => note_uuid },
|
|
393
|
+
scope: :application,
|
|
394
|
+
request_options: request_options
|
|
395
|
+
)
|
|
396
|
+
end
|
|
397
|
+
|
|
398
|
+
# List private network notes
|
|
399
|
+
#
|
|
400
|
+
# Console users with read:networks can read notes on a network visible to the application. Notes stay within
|
|
401
|
+
# the organization and are not contributed to shared intelligence. Newest notes appear first.
|
|
402
|
+
#
|
|
403
|
+
# +GET /v3/organization/{organization_id}/application/{application_id}/networks/{network_uuid}/notes/+
|
|
404
|
+
#
|
|
405
|
+
# @param network_uuid [String] Network UUID.
|
|
406
|
+
# @param limit [Integer]
|
|
407
|
+
# @param offset [Integer]
|
|
408
|
+
# @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
|
|
409
|
+
# @return [Didit::Page<Didit::Types::NetworkNote>]
|
|
410
|
+
def list(network_uuid, limit: OMIT, offset: OMIT, request_options: nil)
|
|
411
|
+
@client.request(
|
|
412
|
+
:get,
|
|
413
|
+
"/v3/organization/{organization_id}/application/{application_id}/networks/{network_uuid}/notes/",
|
|
414
|
+
path_params: { "network_uuid" => network_uuid },
|
|
415
|
+
query: {
|
|
416
|
+
"limit" => limit,
|
|
417
|
+
"offset" => offset
|
|
418
|
+
},
|
|
419
|
+
scope: :application,
|
|
420
|
+
page: Types::NetworkNote,
|
|
421
|
+
request_options: request_options
|
|
422
|
+
)
|
|
423
|
+
end
|
|
424
|
+
end
|
|
425
|
+
end
|
|
426
|
+
end
|
|
427
|
+
end
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
# Code generated by codegen from openapi/*.json. DO NOT EDIT.
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
module Didit
|
|
5
|
+
module Resources
|
|
6
|
+
# The +passive_liveness+ resource.
|
|
7
|
+
class PassiveLiveness < Didit::Resource
|
|
8
|
+
# Passive Liveness
|
|
9
|
+
#
|
|
10
|
+
# Detect presentation attacks - printed photos, screen replays, masks, deepfakes - from a single face image. No
|
|
11
|
+
# video, motion, or user interaction required.
|
|
12
|
+
#
|
|
13
|
+
# **How it works.** The image is analyzed by a biometric model; the largest detected face is evaluated and a
|
|
14
|
+
# liveness `score` (0-100) is computed. `status` is `Declined` when any `error`-severity warning fires:
|
|
15
|
+
# - `NO_FACE_DETECTED` - the liveness model found no face,
|
|
16
|
+
# - `LOW_LIVENESS_SCORE` - score at or below `face_liveness_score_decline_threshold` (default `30`),
|
|
17
|
+
# - `LIVENESS_FACE_ATTACK` - the model detected a presentation attack,
|
|
18
|
+
# - `FACE_IN_BLOCKLIST` / `POSSIBLE_FACE_IN_BLOCKLIST` - the face matches an entry on your face blocklist.
|
|
19
|
+
#
|
|
20
|
+
# `MULTIPLE_FACES_DETECTED` is a `warning`-severity signal (does not decline), and `DUPLICATED_FACE` /
|
|
21
|
+
# `POSSIBLE_DUPLICATED_FACE` are `information`-severity signals that the same face already appeared in another
|
|
22
|
+
# approved session (they never decline). `face_quality` and `face_luminance` (0-100, nullable) describe capture
|
|
23
|
+
# quality.
|
|
24
|
+
#
|
|
25
|
+
# **Blocklist and duplicate screening.** Runs on **every** call - with or without `save_api_request` - by
|
|
26
|
+
# matching the detected face against your application's face search index. Prior faces with the same
|
|
27
|
+
# `vendor_data` are excluded from the entire index search - so re-running liveness for the same user does not
|
|
28
|
+
# trigger `DUPLICATED_FACE`, and a blocklisted face originating from a session with the caller's own
|
|
29
|
+
# `vendor_data` is also NOT flagged (`FACE_IN_BLOCKLIST` screening is bypassed for same-`vendor_data` faces).
|
|
30
|
+
#
|
|
31
|
+
# **Billing.** Each `200` response consumes one Passive Liveness API credit (paid from your plan credit or
|
|
32
|
+
# top-up balance). Insufficient balance returns `403` before any image processing.
|
|
33
|
+
#
|
|
34
|
+
# **Session persistence and face enrollment (`save_api_request`, default `true`).** When `true`, the call is
|
|
35
|
+
# persisted as an API-type session (Business Console, `GET /v3/session/{sessionId}/decision/` via the returned
|
|
36
|
+
# `request_id`, `status.updated` webhook), the reference image and face crop are stored, and the detected face
|
|
37
|
+
# is **enrolled into your face search index** so later Face Search calls and duplicate checks can match it. When
|
|
38
|
+
# `false`, the call is one-shot: nothing is stored and the face is not enrolled (blocklist/duplicate screening
|
|
39
|
+
# still runs).
|
|
40
|
+
#
|
|
41
|
+
# **Sandbox.** Sandbox API keys skip all processing and billing: after request validation (malformed input still
|
|
42
|
+
# returns `400`), the endpoint returns a static `Approved` mock payload, no session is persisted, and no credits
|
|
43
|
+
# are consumed.
|
|
44
|
+
#
|
|
45
|
+
# **Authentication.** Send your application's API key in the `x-api-key` header. Missing or invalid credentials
|
|
46
|
+
# return `403` (`{"detail": "You do not have permission to perform this action."}`) - this API never returns
|
|
47
|
+
# `401`.
|
|
48
|
+
#
|
|
49
|
+
# **Rate limit.** Shared write budget of 300 requests/min per API key across all POST/PATCH/DELETE endpoints;
|
|
50
|
+
# exceeding it returns `429`.
|
|
51
|
+
#
|
|
52
|
+
# +POST /v3/passive-liveness/+
|
|
53
|
+
#
|
|
54
|
+
# @param user_image [Pathname, IO, String, Didit::FilePart] Front-facing face image (e.g. a selfie). Allowed
|
|
55
|
+
# extensions: `tiff`, `jpg`, `jpeg`, `png`, `webp`. Maximum upload size: **5 MB** (larger files are rejected
|
|
56
|
+
# with `400`). Images are automatically compressed to ~0.5 MB before processing, so very high resolutions do not
|
|
57
|
+
# improve accuracy. The image should contain a single subject - when several faces are present, the largest one
|
|
58
|
+
# is evaluated and a `MU...
|
|
59
|
+
# @param face_liveness_score_decline_threshold [Numeric] Liveness score threshold (0-100). A computed score **at
|
|
60
|
+
# or below** this value emits a `LOW_LIVENESS_SCORE` warning and sets `status` to `Declined`. Default `30`;
|
|
61
|
+
# raise it for a stricter anti-spoofing posture. Values outside 0-100 return `400`.
|
|
62
|
+
# @param rotate_image [Boolean] When `true`, the service tries 90-degree rotations of the input and uses the
|
|
63
|
+
# orientation that yields the best face detection. Useful when EXIF orientation is missing. Adds latency.
|
|
64
|
+
# @param save_api_request [Boolean] When `true` (default), persists the call as an API-type session, stores the
|
|
65
|
+
# face images, emits a `status.updated` webhook, and enrolls the detected face into your face search index. When
|
|
66
|
+
# `false`, the call is one-shot - nothing is stored and the face is not enrolled. Blocklist and duplicate
|
|
67
|
+
# screening run either way.
|
|
68
|
+
# @param vendor_data [String] Optional opaque identifier (your user id, email, UUID…) stored on the persisted
|
|
69
|
+
# session and echoed back. Also used to exclude prior sessions with the same `vendor_data` from the
|
|
70
|
+
# duplicate-face check, so re-verifying the same user does not raise `DUPLICATED_FACE`.
|
|
71
|
+
# @param metadata [Hash] Optional JSON object stored with the session (when `save_api_request=true`) and echoed
|
|
72
|
+
# back. In multipart requests, send it as a JSON-encoded string field - it is parsed into an object.
|
|
73
|
+
# @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
|
|
74
|
+
# @return [Didit::Types::PassiveLivenessCheckResponse]
|
|
75
|
+
def check(
|
|
76
|
+
user_image:,
|
|
77
|
+
face_liveness_score_decline_threshold: OMIT,
|
|
78
|
+
rotate_image: OMIT,
|
|
79
|
+
save_api_request: OMIT,
|
|
80
|
+
vendor_data: OMIT,
|
|
81
|
+
metadata: OMIT,
|
|
82
|
+
request_options: nil
|
|
83
|
+
)
|
|
84
|
+
@client.request(
|
|
85
|
+
:post,
|
|
86
|
+
"/v3/passive-liveness/",
|
|
87
|
+
body: {
|
|
88
|
+
"user_image" => user_image,
|
|
89
|
+
"face_liveness_score_decline_threshold" => face_liveness_score_decline_threshold,
|
|
90
|
+
"rotate_image" => rotate_image,
|
|
91
|
+
"save_api_request" => save_api_request,
|
|
92
|
+
"vendor_data" => vendor_data,
|
|
93
|
+
"metadata" => metadata
|
|
94
|
+
},
|
|
95
|
+
encoding: :multipart,
|
|
96
|
+
file_fields: %w[user_image],
|
|
97
|
+
response: Types::PassiveLivenessCheckResponse,
|
|
98
|
+
request_options: request_options
|
|
99
|
+
)
|
|
100
|
+
end
|
|
101
|
+
end
|
|
102
|
+
end
|
|
103
|
+
end
|