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,214 @@
|
|
|
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 +workflows+ resource.
|
|
7
|
+
class Workflows < Didit::Resource
|
|
8
|
+
# Create workflow
|
|
9
|
+
#
|
|
10
|
+
# Create a simple workflow. Send `features` in execution order (ordering rules apply); defaults to `published`
|
|
11
|
+
# v1. The body accepts ONLY the fields listed in `SimpleWorkflowRequest` - any other key (including
|
|
12
|
+
# `workflow_type`) is rejected with a 400. Not idempotent - each call creates a new workflow. Maximum 50
|
|
13
|
+
# workflows per application.
|
|
14
|
+
#
|
|
15
|
+
# +POST /v3/workflows/+
|
|
16
|
+
#
|
|
17
|
+
# @param features [Array<Hash>] Verification features in execution order. The API links each item to the next
|
|
18
|
+
# one and adds one final status node automatically.
|
|
19
|
+
# @param workflow_label [String] Display name for the workflow (max 50 characters). Defaults to `"ID
|
|
20
|
+
# Verification"` when omitted - always set it so workflows stay distinguishable.
|
|
21
|
+
# @param is_default [Boolean] Set this workflow as the default for new sessions.
|
|
22
|
+
# @param status [String] Omit this field to create a published workflow ready for sessions. Use `draft` only
|
|
23
|
+
# when you want to save without publishing.
|
|
24
|
+
# @param is_white_label_enabled [Boolean] Enable white-label customization for sessions created with this
|
|
25
|
+
# workflow.
|
|
26
|
+
# @param is_desktop_allowed [Boolean] Allow the verification flow to run on desktop browsers.
|
|
27
|
+
# @param max_retry_attempts [Integer] Maximum retry attempts allowed after a declined verification. `0` blocks
|
|
28
|
+
# the user after the first decline.
|
|
29
|
+
# @param retry_window_days [Integer, nil] Rolling window in days used to count retries. `null` enforces an
|
|
30
|
+
# all-time limit.
|
|
31
|
+
# @param face_liveness_max_attempts [Integer] Maximum liveness submissions per session. Default 3: one initial
|
|
32
|
+
# attempt plus two retries. This value is also copied into generated liveness and age-estimation workflow nodes
|
|
33
|
+
# unless the feature-level config overrides it.
|
|
34
|
+
# @param face_match_max_attempts [Integer] Maximum face-match submissions per session. Default 3: one initial
|
|
35
|
+
# attempt plus two retries. This value is also copied into generated face-match workflow nodes unless the
|
|
36
|
+
# feature-level config overrides it.
|
|
37
|
+
# @param session_expiration_time [Integer] Seconds before an unfinished session expires. Minimum 1 hour (3600),
|
|
38
|
+
# maximum 4 weeks (2419200).
|
|
39
|
+
# @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
|
|
40
|
+
# @return [Didit::Types::WorkflowDetail]
|
|
41
|
+
def create(
|
|
42
|
+
features:,
|
|
43
|
+
workflow_label: OMIT,
|
|
44
|
+
is_default: OMIT,
|
|
45
|
+
status: OMIT,
|
|
46
|
+
is_white_label_enabled: OMIT,
|
|
47
|
+
is_desktop_allowed: OMIT,
|
|
48
|
+
max_retry_attempts: OMIT,
|
|
49
|
+
retry_window_days: OMIT,
|
|
50
|
+
face_liveness_max_attempts: OMIT,
|
|
51
|
+
face_match_max_attempts: OMIT,
|
|
52
|
+
session_expiration_time: OMIT,
|
|
53
|
+
request_options: nil
|
|
54
|
+
)
|
|
55
|
+
@client.request(
|
|
56
|
+
:post,
|
|
57
|
+
"/v3/workflows/",
|
|
58
|
+
body: {
|
|
59
|
+
"features" => features,
|
|
60
|
+
"workflow_label" => workflow_label,
|
|
61
|
+
"is_default" => is_default,
|
|
62
|
+
"status" => status,
|
|
63
|
+
"is_white_label_enabled" => is_white_label_enabled,
|
|
64
|
+
"is_desktop_allowed" => is_desktop_allowed,
|
|
65
|
+
"max_retry_attempts" => max_retry_attempts,
|
|
66
|
+
"retry_window_days" => retry_window_days,
|
|
67
|
+
"face_liveness_max_attempts" => face_liveness_max_attempts,
|
|
68
|
+
"face_match_max_attempts" => face_match_max_attempts,
|
|
69
|
+
"session_expiration_time" => session_expiration_time
|
|
70
|
+
},
|
|
71
|
+
response: Types::WorkflowDetail,
|
|
72
|
+
request_options: request_options
|
|
73
|
+
)
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
# Delete workflow
|
|
77
|
+
#
|
|
78
|
+
# Permanently delete one workflow version (no undo). Existing sessions keep their verification results but their
|
|
79
|
+
# workflow reference is cleared; other versions in the same `workflow_id` group are not deleted.
|
|
80
|
+
#
|
|
81
|
+
# +DELETE /v3/workflows/{settings_uuid}/+
|
|
82
|
+
#
|
|
83
|
+
# @param settings_uuid [String] Per-version UUID of the workflow to delete.
|
|
84
|
+
# @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
|
|
85
|
+
# @return [nil]
|
|
86
|
+
def delete(settings_uuid, request_options: nil)
|
|
87
|
+
@client.request(
|
|
88
|
+
:delete,
|
|
89
|
+
"/v3/workflows/{settings_uuid}/",
|
|
90
|
+
path_params: { "settings_uuid" => settings_uuid },
|
|
91
|
+
request_options: request_options
|
|
92
|
+
)
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
# List workflows
|
|
96
|
+
#
|
|
97
|
+
# List your workflows, newest first, in a limit/offset pagination envelope (`{count, next, previous, results}`,
|
|
98
|
+
# default page size 50). Each row is one version; `workflow_id` is the stable group ID and new sessions use the
|
|
99
|
+
# latest `published` version.
|
|
100
|
+
#
|
|
101
|
+
# +GET /v3/workflows/+
|
|
102
|
+
#
|
|
103
|
+
# @param limit [Integer] Page size (number of workflows per page).
|
|
104
|
+
# @param offset [Integer] Number of rows to skip before the first returned workflow.
|
|
105
|
+
# @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
|
|
106
|
+
# @return [Didit::Page<Didit::Types::WorkflowListItem>]
|
|
107
|
+
def list(limit: OMIT, offset: OMIT, request_options: nil)
|
|
108
|
+
@client.request(
|
|
109
|
+
:get,
|
|
110
|
+
"/v3/workflows/",
|
|
111
|
+
query: {
|
|
112
|
+
"limit" => limit,
|
|
113
|
+
"offset" => offset
|
|
114
|
+
},
|
|
115
|
+
page: Types::WorkflowListItem,
|
|
116
|
+
request_options: request_options
|
|
117
|
+
)
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
# Get workflow
|
|
121
|
+
#
|
|
122
|
+
# Fetch full configuration for one workflow version by `settings_uuid`: feature toggles, thresholds, allowed
|
|
123
|
+
# documents, graph, retry policy, callbacks, and pricing.
|
|
124
|
+
#
|
|
125
|
+
# +GET /v3/workflows/{settings_uuid}/+
|
|
126
|
+
#
|
|
127
|
+
# @param settings_uuid [String] Per-version UUID of the workflow (the `uuid` value returned by the list
|
|
128
|
+
# endpoint). Each version of a workflow has its own `settings_uuid`.
|
|
129
|
+
# @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
|
|
130
|
+
# @return [Didit::Types::WorkflowDetail]
|
|
131
|
+
def retrieve(settings_uuid, request_options: nil)
|
|
132
|
+
@client.request(
|
|
133
|
+
:get,
|
|
134
|
+
"/v3/workflows/{settings_uuid}/",
|
|
135
|
+
path_params: { "settings_uuid" => settings_uuid },
|
|
136
|
+
response: Types::WorkflowDetail,
|
|
137
|
+
request_options: request_options
|
|
138
|
+
)
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
# Update workflow
|
|
142
|
+
#
|
|
143
|
+
# Update a workflow. Versioning depends on the `status` field you send and the current state of the version: (1)
|
|
144
|
+
# no `status` on a **published** version → the published version is updated in place (same `uuid`, same
|
|
145
|
+
# `version`); (2) no `status` on a **draft** → the draft is updated and immediately published; (3) `status:
|
|
146
|
+
# "published"` on a **published** version → a NEW published version is created under the same `workflow_id` (new
|
|
147
|
+
# `uuid`, `version` + 1) and returned, and any existing draft in the group is deleted; (4) `status: "draft"`
|
|
148
|
+
# keeps a draft as a draft (autosave) but is rejected with 400 on a published version (`"Cannot revert a
|
|
149
|
+
# published version to draft."`). The body accepts the same strict field whitelist as create - unknown keys are
|
|
150
|
+
# rejected with 400.
|
|
151
|
+
#
|
|
152
|
+
# +PATCH /v3/workflows/{settings_uuid}/+
|
|
153
|
+
#
|
|
154
|
+
# @param settings_uuid [String] Per-version UUID of the workflow to update.
|
|
155
|
+
# @param workflow_label [String] Display name for the workflow (max 50 characters).
|
|
156
|
+
# @param is_default [Boolean] Set this workflow as the default for new sessions.
|
|
157
|
+
# @param status [String] Controls versioning. Omit to update the current version in place (drafts auto-publish).
|
|
158
|
+
# `published` on an already-published version creates and returns a NEW version. `draft` is only valid while the
|
|
159
|
+
# version is still a draft.
|
|
160
|
+
# @param features [Array<Hash>] If provided, this replaces the full feature order and configuration.
|
|
161
|
+
# @param is_white_label_enabled [Boolean] Enable white-label customization for sessions created with this
|
|
162
|
+
# workflow.
|
|
163
|
+
# @param is_desktop_allowed [Boolean] Allow the verification flow to run on desktop browsers.
|
|
164
|
+
# @param max_retry_attempts [Integer] Maximum retry attempts allowed after a declined verification. `0` blocks
|
|
165
|
+
# the user after the first decline.
|
|
166
|
+
# @param retry_window_days [Integer, nil] Rolling window in days used to count retries. `null` enforces an
|
|
167
|
+
# all-time limit.
|
|
168
|
+
# @param face_liveness_max_attempts [Integer] Maximum liveness submissions per session. This value is also
|
|
169
|
+
# copied into generated liveness and age-estimation workflow nodes unless the feature-level config overrides it.
|
|
170
|
+
# @param face_match_max_attempts [Integer] Maximum face-match submissions per session. This value is also copied
|
|
171
|
+
# into generated face-match workflow nodes unless the feature-level config overrides it.
|
|
172
|
+
# @param session_expiration_time [Integer] Seconds before an unfinished session expires. Minimum 1 hour (3600),
|
|
173
|
+
# maximum 4 weeks (2419200).
|
|
174
|
+
# @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
|
|
175
|
+
# @return [Didit::Types::WorkflowDetail]
|
|
176
|
+
def update(
|
|
177
|
+
settings_uuid,
|
|
178
|
+
workflow_label: OMIT,
|
|
179
|
+
is_default: OMIT,
|
|
180
|
+
status: OMIT,
|
|
181
|
+
features: OMIT,
|
|
182
|
+
is_white_label_enabled: OMIT,
|
|
183
|
+
is_desktop_allowed: OMIT,
|
|
184
|
+
max_retry_attempts: OMIT,
|
|
185
|
+
retry_window_days: OMIT,
|
|
186
|
+
face_liveness_max_attempts: OMIT,
|
|
187
|
+
face_match_max_attempts: OMIT,
|
|
188
|
+
session_expiration_time: OMIT,
|
|
189
|
+
request_options: nil
|
|
190
|
+
)
|
|
191
|
+
@client.request(
|
|
192
|
+
:patch,
|
|
193
|
+
"/v3/workflows/{settings_uuid}/",
|
|
194
|
+
path_params: { "settings_uuid" => settings_uuid },
|
|
195
|
+
body: {
|
|
196
|
+
"workflow_label" => workflow_label,
|
|
197
|
+
"is_default" => is_default,
|
|
198
|
+
"status" => status,
|
|
199
|
+
"features" => features,
|
|
200
|
+
"is_white_label_enabled" => is_white_label_enabled,
|
|
201
|
+
"is_desktop_allowed" => is_desktop_allowed,
|
|
202
|
+
"max_retry_attempts" => max_retry_attempts,
|
|
203
|
+
"retry_window_days" => retry_window_days,
|
|
204
|
+
"face_liveness_max_attempts" => face_liveness_max_attempts,
|
|
205
|
+
"face_match_max_attempts" => face_match_max_attempts,
|
|
206
|
+
"session_expiration_time" => session_expiration_time
|
|
207
|
+
},
|
|
208
|
+
response: Types::WorkflowDetail,
|
|
209
|
+
request_options: request_options
|
|
210
|
+
)
|
|
211
|
+
end
|
|
212
|
+
end
|
|
213
|
+
end
|
|
214
|
+
end
|
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
# Code generated by codegen from openapi/*.json. DO NOT EDIT.
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
module Didit
|
|
5
|
+
# One class per API resource, one method per operation (docs/DESIGN.md section 4).
|
|
6
|
+
module Resources
|
|
7
|
+
autoload :Account, "didit/resources/account"
|
|
8
|
+
autoload :AddressValidation, "didit/resources/address_validation"
|
|
9
|
+
autoload :AgeEstimation, "didit/resources/age_estimation"
|
|
10
|
+
autoload :Aml, "didit/resources/aml"
|
|
11
|
+
autoload :AmlMonitoring, "didit/resources/aml_monitoring"
|
|
12
|
+
autoload :Analytics, "didit/resources/analytics"
|
|
13
|
+
autoload :Bank, "didit/resources/bank"
|
|
14
|
+
autoload :Billing, "didit/resources/billing"
|
|
15
|
+
autoload :BiometricTemplates, "didit/resources/biometric_templates"
|
|
16
|
+
autoload :Blocklist, "didit/resources/blocklist"
|
|
17
|
+
autoload :BusinessSessions, "didit/resources/business_sessions"
|
|
18
|
+
autoload :Businesses, "didit/resources/businesses"
|
|
19
|
+
autoload :Cases, "didit/resources/cases"
|
|
20
|
+
autoload :Customization, "didit/resources/customization"
|
|
21
|
+
autoload :DatabaseValidation, "didit/resources/database_validation"
|
|
22
|
+
autoload :DocumentAi, "didit/resources/document_ai"
|
|
23
|
+
autoload :Email, "didit/resources/email"
|
|
24
|
+
autoload :FaceMatch, "didit/resources/face_match"
|
|
25
|
+
autoload :FaceSearch, "didit/resources/face_search"
|
|
26
|
+
autoload :FraudChecks, "didit/resources/fraud_checks"
|
|
27
|
+
autoload :IdVerification, "didit/resources/id_verification"
|
|
28
|
+
autoload :IdWallets, "didit/resources/id_wallets"
|
|
29
|
+
autoload :Investigator, "didit/resources/investigator"
|
|
30
|
+
autoload :Ip, "didit/resources/ip"
|
|
31
|
+
autoload :Kyb, "didit/resources/kyb"
|
|
32
|
+
autoload :Lists, "didit/resources/lists"
|
|
33
|
+
autoload :MonitoringEvents, "didit/resources/monitoring_events"
|
|
34
|
+
autoload :Networks, "didit/resources/networks"
|
|
35
|
+
autoload :PassiveLiveness, "didit/resources/passive_liveness"
|
|
36
|
+
autoload :Phone, "didit/resources/phone"
|
|
37
|
+
autoload :Pricing, "didit/resources/pricing"
|
|
38
|
+
autoload :ProofOfAddress, "didit/resources/proof_of_address"
|
|
39
|
+
autoload :Questionnaires, "didit/resources/questionnaires"
|
|
40
|
+
autoload :RegulatoryReports, "didit/resources/regulatory_reports"
|
|
41
|
+
autoload :ReportTemplates, "didit/resources/report_templates"
|
|
42
|
+
autoload :Sessions, "didit/resources/sessions"
|
|
43
|
+
autoload :Transactions, "didit/resources/transactions"
|
|
44
|
+
autoload :TravelRule, "didit/resources/travel_rule"
|
|
45
|
+
autoload :Users, "didit/resources/users"
|
|
46
|
+
autoload :WalletScreening, "didit/resources/wallet_screening"
|
|
47
|
+
autoload :Webhooks, "didit/resources/webhooks"
|
|
48
|
+
autoload :Workflows, "didit/resources/workflows"
|
|
49
|
+
|
|
50
|
+
# The top-level resources of Didit::Client.
|
|
51
|
+
module ClientMethods
|
|
52
|
+
# @return [Didit::Resources::Account]
|
|
53
|
+
def account
|
|
54
|
+
@account ||= Resources::Account.new(self)
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# @return [Didit::Resources::AddressValidation]
|
|
58
|
+
def address_validation
|
|
59
|
+
@address_validation ||= Resources::AddressValidation.new(self)
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
# @return [Didit::Resources::AgeEstimation]
|
|
63
|
+
def age_estimation
|
|
64
|
+
@age_estimation ||= Resources::AgeEstimation.new(self)
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
# @return [Didit::Resources::Aml]
|
|
68
|
+
def aml
|
|
69
|
+
@aml ||= Resources::Aml.new(self)
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
# @return [Didit::Resources::AmlMonitoring]
|
|
73
|
+
def aml_monitoring
|
|
74
|
+
@aml_monitoring ||= Resources::AmlMonitoring.new(self)
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
# @return [Didit::Resources::Analytics]
|
|
78
|
+
def analytics
|
|
79
|
+
@analytics ||= Resources::Analytics.new(self)
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
# @return [Didit::Resources::Bank]
|
|
83
|
+
def bank
|
|
84
|
+
@bank ||= Resources::Bank.new(self)
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
# @return [Didit::Resources::Billing]
|
|
88
|
+
def billing
|
|
89
|
+
@billing ||= Resources::Billing.new(self)
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
# @return [Didit::Resources::BiometricTemplates]
|
|
93
|
+
def biometric_templates
|
|
94
|
+
@biometric_templates ||= Resources::BiometricTemplates.new(self)
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
# @return [Didit::Resources::Blocklist]
|
|
98
|
+
def blocklist
|
|
99
|
+
@blocklist ||= Resources::Blocklist.new(self)
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
# @return [Didit::Resources::BusinessSessions]
|
|
103
|
+
def business_sessions
|
|
104
|
+
@business_sessions ||= Resources::BusinessSessions.new(self)
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
# @return [Didit::Resources::Businesses]
|
|
108
|
+
def businesses
|
|
109
|
+
@businesses ||= Resources::Businesses.new(self)
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
# @return [Didit::Resources::Cases]
|
|
113
|
+
def cases
|
|
114
|
+
@cases ||= Resources::Cases.new(self)
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
# @return [Didit::Resources::Customization]
|
|
118
|
+
def customization
|
|
119
|
+
@customization ||= Resources::Customization.new(self)
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
# @return [Didit::Resources::DatabaseValidation]
|
|
123
|
+
def database_validation
|
|
124
|
+
@database_validation ||= Resources::DatabaseValidation.new(self)
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
# @return [Didit::Resources::DocumentAi]
|
|
128
|
+
def document_ai
|
|
129
|
+
@document_ai ||= Resources::DocumentAi.new(self)
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
# @return [Didit::Resources::Email]
|
|
133
|
+
def email
|
|
134
|
+
@email ||= Resources::Email.new(self)
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
# @return [Didit::Resources::FaceMatch]
|
|
138
|
+
def face_match
|
|
139
|
+
@face_match ||= Resources::FaceMatch.new(self)
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
# @return [Didit::Resources::FaceSearch]
|
|
143
|
+
def face_search
|
|
144
|
+
@face_search ||= Resources::FaceSearch.new(self)
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
# @return [Didit::Resources::FraudChecks]
|
|
148
|
+
def fraud_checks
|
|
149
|
+
@fraud_checks ||= Resources::FraudChecks.new(self)
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
# @return [Didit::Resources::IdVerification]
|
|
153
|
+
def id_verification
|
|
154
|
+
@id_verification ||= Resources::IdVerification.new(self)
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
# @return [Didit::Resources::IdWallets]
|
|
158
|
+
def id_wallets
|
|
159
|
+
@id_wallets ||= Resources::IdWallets.new(self)
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
# @return [Didit::Resources::Investigator]
|
|
163
|
+
def investigator
|
|
164
|
+
@investigator ||= Resources::Investigator.new(self)
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
# @return [Didit::Resources::Ip]
|
|
168
|
+
def ip
|
|
169
|
+
@ip ||= Resources::Ip.new(self)
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
# @return [Didit::Resources::Kyb]
|
|
173
|
+
def kyb
|
|
174
|
+
@kyb ||= Resources::Kyb.new(self)
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
# @return [Didit::Resources::Lists]
|
|
178
|
+
def lists
|
|
179
|
+
@lists ||= Resources::Lists.new(self)
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
# @return [Didit::Resources::MonitoringEvents]
|
|
183
|
+
def monitoring_events
|
|
184
|
+
@monitoring_events ||= Resources::MonitoringEvents.new(self)
|
|
185
|
+
end
|
|
186
|
+
|
|
187
|
+
# @return [Didit::Resources::Networks]
|
|
188
|
+
def networks
|
|
189
|
+
@networks ||= Resources::Networks.new(self)
|
|
190
|
+
end
|
|
191
|
+
|
|
192
|
+
# @return [Didit::Resources::PassiveLiveness]
|
|
193
|
+
def passive_liveness
|
|
194
|
+
@passive_liveness ||= Resources::PassiveLiveness.new(self)
|
|
195
|
+
end
|
|
196
|
+
|
|
197
|
+
# @return [Didit::Resources::Phone]
|
|
198
|
+
def phone
|
|
199
|
+
@phone ||= Resources::Phone.new(self)
|
|
200
|
+
end
|
|
201
|
+
|
|
202
|
+
# @return [Didit::Resources::Pricing]
|
|
203
|
+
def pricing
|
|
204
|
+
@pricing ||= Resources::Pricing.new(self)
|
|
205
|
+
end
|
|
206
|
+
|
|
207
|
+
# @return [Didit::Resources::ProofOfAddress]
|
|
208
|
+
def proof_of_address
|
|
209
|
+
@proof_of_address ||= Resources::ProofOfAddress.new(self)
|
|
210
|
+
end
|
|
211
|
+
|
|
212
|
+
# @return [Didit::Resources::Questionnaires]
|
|
213
|
+
def questionnaires
|
|
214
|
+
@questionnaires ||= Resources::Questionnaires.new(self)
|
|
215
|
+
end
|
|
216
|
+
|
|
217
|
+
# @return [Didit::Resources::RegulatoryReports]
|
|
218
|
+
def regulatory_reports
|
|
219
|
+
@regulatory_reports ||= Resources::RegulatoryReports.new(self)
|
|
220
|
+
end
|
|
221
|
+
|
|
222
|
+
# @return [Didit::Resources::ReportTemplates]
|
|
223
|
+
def report_templates
|
|
224
|
+
@report_templates ||= Resources::ReportTemplates.new(self)
|
|
225
|
+
end
|
|
226
|
+
|
|
227
|
+
# @return [Didit::Resources::Sessions]
|
|
228
|
+
def sessions
|
|
229
|
+
@sessions ||= Resources::Sessions.new(self)
|
|
230
|
+
end
|
|
231
|
+
|
|
232
|
+
# @return [Didit::Resources::Transactions]
|
|
233
|
+
def transactions
|
|
234
|
+
@transactions ||= Resources::Transactions.new(self)
|
|
235
|
+
end
|
|
236
|
+
|
|
237
|
+
# @return [Didit::Resources::TravelRule]
|
|
238
|
+
def travel_rule
|
|
239
|
+
@travel_rule ||= Resources::TravelRule.new(self)
|
|
240
|
+
end
|
|
241
|
+
|
|
242
|
+
# @return [Didit::Resources::Users]
|
|
243
|
+
def users
|
|
244
|
+
@users ||= Resources::Users.new(self)
|
|
245
|
+
end
|
|
246
|
+
|
|
247
|
+
# @return [Didit::Resources::WalletScreening]
|
|
248
|
+
def wallet_screening
|
|
249
|
+
@wallet_screening ||= Resources::WalletScreening.new(self)
|
|
250
|
+
end
|
|
251
|
+
|
|
252
|
+
# @return [Didit::Resources::Webhooks]
|
|
253
|
+
def webhooks
|
|
254
|
+
@webhooks ||= Resources::Webhooks.new(self)
|
|
255
|
+
end
|
|
256
|
+
|
|
257
|
+
# @return [Didit::Resources::Workflows]
|
|
258
|
+
def workflows
|
|
259
|
+
@workflows ||= Resources::Workflows.new(self)
|
|
260
|
+
end
|
|
261
|
+
end
|
|
262
|
+
end
|
|
263
|
+
end
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Code generated by codegen from openapi/*.json. DO NOT EDIT.
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
module Didit
|
|
5
|
+
module Types
|
|
6
|
+
class AccountResendOtpResponse < Didit::Model
|
|
7
|
+
field :message, "message", :string
|
|
8
|
+
field :email, "email", :string
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
end
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
# Code generated by codegen from openapi/*.json. DO NOT EDIT.
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
module Didit
|
|
5
|
+
module Types
|
|
6
|
+
# `identity` (Identity verification), `transactions` (Transaction monitoring) or `authentication`
|
|
7
|
+
# (Authentication).
|
|
8
|
+
module ApplicationProductProduct
|
|
9
|
+
IDENTITY = "identity"
|
|
10
|
+
TRANSACTIONS = "transactions"
|
|
11
|
+
AUTHENTICATION = "authentication"
|
|
12
|
+
|
|
13
|
+
VALUES = [IDENTITY, TRANSACTIONS, AUTHENTICATION].freeze
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
# Whether the product is on for this application. `early_access` applies only to `authentication`, which Didit
|
|
17
|
+
# turns on for you.
|
|
18
|
+
module ApplicationProductStatus
|
|
19
|
+
ENABLED = "enabled"
|
|
20
|
+
EARLY_ACCESS = "early_access"
|
|
21
|
+
DISABLED = "disabled"
|
|
22
|
+
|
|
23
|
+
VALUES = [ENABLED, EARLY_ACCESS, DISABLED].freeze
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
# Full application record. `uuid`, `client_id`, and `api_key` never change after creation.
|
|
27
|
+
class Application < Didit::Model
|
|
28
|
+
field :uuid, "uuid", :string
|
|
29
|
+
field :name, "name", :string
|
|
30
|
+
field :client_id, "client_id", :string
|
|
31
|
+
field :api_key, "api_key", :string
|
|
32
|
+
field :website_url, "website_url", :string
|
|
33
|
+
field :redirect_uris, "redirect_uris", [:array, :string]
|
|
34
|
+
field :terms_url, "terms_url", :string
|
|
35
|
+
field :privacy_url, "privacy_url", :string
|
|
36
|
+
field :description, "description", :string
|
|
37
|
+
field :created_at, "created_at", :datetime
|
|
38
|
+
field :products, "products", [:array, "ApplicationProduct"]
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
# Minimal application shape returned inline by `POST /programmatic/verify-email/`. Persist the `api_key`
|
|
42
|
+
# immediately.
|
|
43
|
+
class ApplicationCredentialsSummary < Didit::Model
|
|
44
|
+
field :uuid, "uuid", :string
|
|
45
|
+
field :name, "name", :string
|
|
46
|
+
field :client_id, "client_id", :string
|
|
47
|
+
field :api_key, "api_key", :string
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# One product of an application and its state. Read-only: the application endpoints return it and ignore it in a
|
|
51
|
+
# request body.
|
|
52
|
+
class ApplicationProduct < Didit::Model
|
|
53
|
+
field :product, "product", :string
|
|
54
|
+
field :status, "status", :string
|
|
55
|
+
field :modules, "modules", [:map, :boolean]
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
class LoginResponse < Didit::Model
|
|
59
|
+
field :access_token, "access_token", :string
|
|
60
|
+
field :refresh_token, "refresh_token", :string
|
|
61
|
+
field :expires_in, "expires_in", :integer
|
|
62
|
+
field :message, "message", :string
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
class Organization < Didit::Model
|
|
66
|
+
field :uuid, "uuid", :string
|
|
67
|
+
field :name, "name", :string
|
|
68
|
+
field :contact_email, "contact_email", :string
|
|
69
|
+
field :created_at, "created_at", :datetime
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
# Minimal organization shape returned inline by `POST /programmatic/verify-email/`.
|
|
73
|
+
class OrganizationSummary < Didit::Model
|
|
74
|
+
field :uuid, "uuid", :string
|
|
75
|
+
field :name, "name", :string
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
class PaginatedApplicationList < Didit::Model
|
|
79
|
+
field :count, "count", :integer
|
|
80
|
+
field :next, "next", :string
|
|
81
|
+
field :previous, "previous", :string
|
|
82
|
+
field :results, "results", [:array, "Application"]
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
class PaginatedOrganizationList < Didit::Model
|
|
86
|
+
field :count, "count", :integer
|
|
87
|
+
field :next, "next", :string
|
|
88
|
+
field :previous, "previous", :string
|
|
89
|
+
field :results, "results", [:array, "Organization"]
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
class RegisterResponse < Didit::Model
|
|
93
|
+
field :message, "message", :string
|
|
94
|
+
field :email, "email", :string
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
class VerifyEmailResponse < Didit::Model
|
|
98
|
+
field :access_token, "access_token", :string
|
|
99
|
+
field :refresh_token, "refresh_token", :string
|
|
100
|
+
field :expires_in, "expires_in", :integer
|
|
101
|
+
field :organization, "organization", "OrganizationSummary"
|
|
102
|
+
field :application, "application", "ApplicationCredentialsSummary"
|
|
103
|
+
end
|
|
104
|
+
end
|
|
105
|
+
end
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
# Code generated by codegen from openapi/*.json. DO NOT EDIT.
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
module Didit
|
|
5
|
+
module Types
|
|
6
|
+
# Liveness method. Always `PASSIVE` on this endpoint (single-image, no user challenge).
|
|
7
|
+
module AgeEstimationEstimateResponseAgeEstimationMethod
|
|
8
|
+
PASSIVE = "PASSIVE"
|
|
9
|
+
|
|
10
|
+
VALUES = [PASSIVE].freeze
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
# `Approved` when no warnings were raised; `Declined` otherwise (every warning this endpoint produces declines).
|
|
14
|
+
module AgeEstimationEstimateResponseAgeEstimationStatus
|
|
15
|
+
APPROVED = "Approved"
|
|
16
|
+
DECLINED = "Declined"
|
|
17
|
+
|
|
18
|
+
VALUES = [APPROVED, DECLINED].freeze
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
# Feature that raised the warning. Always `LIVENESS` on this endpoint.
|
|
22
|
+
module AgeEstimationEstimateResponseAgeEstimationWarningsFeature
|
|
23
|
+
LIVENESS = "LIVENESS"
|
|
24
|
+
|
|
25
|
+
VALUES = [LIVENESS].freeze
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
# Severity. Every warning this endpoint produces is an `error` and sets `status` to `Declined`.
|
|
29
|
+
module AgeEstimationEstimateResponseAgeEstimationWarningsLogType
|
|
30
|
+
ERROR = "error"
|
|
31
|
+
|
|
32
|
+
VALUES = [ERROR].freeze
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# Machine-readable risk code. `NO_FACE_DETECTED` - the liveness model found no face; `LOW_LIVENESS_SCORE` -
|
|
36
|
+
# liveness `score` at or below `face_liveness_score_decline_threshold`; `LIVENESS_FACE_ATTACK` - a presentation
|
|
37
|
+
# attack (photo/screen/mask) was detected; `AGE_NOT_DETECTED` - no face age could be estimated;
|
|
38
|
+
# `AGE_BELOW_MINIMUM` - estimated age below `age_estimation_decline_threshold`. `NO_FACE_DETECTED` and
|
|
39
|
+
# `LOW_LIVENESS_SCORE` are mutually exclusive - when no face is found only `NO_FACE_DETECTED` is emitted.
|
|
40
|
+
module AgeEstimationEstimateResponseAgeEstimationWarningsRisk
|
|
41
|
+
NO_FACE_DETECTED = "NO_FACE_DETECTED"
|
|
42
|
+
LOW_LIVENESS_SCORE = "LOW_LIVENESS_SCORE"
|
|
43
|
+
LIVENESS_FACE_ATTACK = "LIVENESS_FACE_ATTACK"
|
|
44
|
+
AGE_NOT_DETECTED = "AGE_NOT_DETECTED"
|
|
45
|
+
AGE_BELOW_MINIMUM = "AGE_BELOW_MINIMUM"
|
|
46
|
+
|
|
47
|
+
VALUES = [NO_FACE_DETECTED, LOW_LIVENESS_SCORE, LIVENESS_FACE_ATTACK, AGE_NOT_DETECTED, AGE_BELOW_MINIMUM].freeze
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
class AgeEstimationEstimateResponse < Didit::Model
|
|
51
|
+
field :request_id, "request_id", :string
|
|
52
|
+
field :age_estimation, "age_estimation", "AgeEstimationEstimateResponseAgeEstimation"
|
|
53
|
+
field :vendor_data, "vendor_data", :string
|
|
54
|
+
field :metadata, "metadata", :any
|
|
55
|
+
field :created_at, "created_at", :datetime
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
class AgeEstimationEstimateResponseAgeEstimation < Didit::Model
|
|
59
|
+
field :status, "status", :string
|
|
60
|
+
field :method_, "method", :string
|
|
61
|
+
field :score, "score", :float
|
|
62
|
+
field :user_image, "user_image", "AgeEstimationEstimateResponseAgeEstimationUserImage"
|
|
63
|
+
field :age_estimation, "age_estimation", :float
|
|
64
|
+
field :warnings, "warnings", [:array, "AgeEstimationEstimateResponseAgeEstimationWarnings"]
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
# Face-detection results for the analyzed image.
|
|
68
|
+
class AgeEstimationEstimateResponseAgeEstimationUserImage < Didit::Model
|
|
69
|
+
field :entities, "entities", [:array, "AgeEstimationEstimateResponseAgeEstimationUserImageEntities"]
|
|
70
|
+
field :best_angle, "best_angle", :integer
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
class AgeEstimationEstimateResponseAgeEstimationUserImageEntities < Didit::Model
|
|
74
|
+
field :age, "age", :float
|
|
75
|
+
field :bbox, "bbox", [:array, :integer]
|
|
76
|
+
field :confidence, "confidence", :float
|
|
77
|
+
field :gender, "gender", :string
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
class AgeEstimationEstimateResponseAgeEstimationWarnings < Didit::Model
|
|
81
|
+
field :risk, "risk", :string
|
|
82
|
+
field :feature, "feature", :string
|
|
83
|
+
field :additional_data, "additional_data", :any
|
|
84
|
+
field :log_type, "log_type", :string
|
|
85
|
+
field :short_description, "short_description", :string
|
|
86
|
+
field :long_description, "long_description", :string
|
|
87
|
+
end
|
|
88
|
+
end
|
|
89
|
+
end
|