didit-sdk 2.10.0 → 2.11.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 91dfc52c94f0698aad6f12342bd12180000e699343916c8db5bb00b007520a21
4
- data.tar.gz: bef44c28c0cce4098811b9f315f7df7ceb97009ad433cf6304b2a4aacdcf4638
3
+ metadata.gz: c25cb467ffdc9235af3e6f724703223f127c76da7ad008139d922764d2182dd3
4
+ data.tar.gz: 1e9bd3ec03b421bc80b8f6fb71566e7b6b42bb63ba59ce4af742f73eab4f10c6
5
5
  SHA512:
6
- metadata.gz: f6f565b512d52999ef1dd881ed4e9854448a5e53f365803c4a9ff2c4aad2ce2ee36b9fc9d8bd4a01d28293b40e093f148d36d3e342473f3a27b1920dc4b5306f
7
- data.tar.gz: 75d30c35704784925b9248b6ab89ab199258808d06def529de1c6d883b16d658f820224c0073618a76d20575e605220cf81ffef7cbf53858d99108875901b00a
6
+ metadata.gz: 3f9d2e4c631cc28590475cb713fa56e92dafa80b32b504ba2505e1de88658d5b4916265ace38cc65b30d5ba91bb4abf6d8c0f967cb373b37d16d6ce0248a85b6
7
+ data.tar.gz: 8a5e7c0ef5169cdf7fd53c99105a08f9e6a24a296aad8091e85e365b89d3b68e65b463131a3242699d350edff65246fd7a9355263136eb589f151b5f60c4a51d
data/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # Changelog
2
2
 
3
+ ## [2.11.0](https://github.com/didit-protocol/sdk-ruby/compare/v2.10.0...v2.11.0) (2026-11-11)
4
+
5
+
6
+ ### Features
7
+
8
+ * **spec:** sync API spec 2026-11-11 ([8583597](https://github.com/didit-protocol/sdk-ruby/commit/85835972757c41b3b5064740c5b70d8da5633404))
9
+ * **spec:** sync API spec 2026-11-11 ([cc2310f](https://github.com/didit-protocol/sdk-ruby/commit/cc2310fc48ddd062481703c4760227fe31105105))
10
+ * **spec:** sync API spec 2026-11-11 ([dd254dc](https://github.com/didit-protocol/sdk-ruby/commit/dd254dc3c4d46b601b6e64669f452216fc3a1115))
11
+ * **spec:** sync API spec 2026-11-11 ([7c675d5](https://github.com/didit-protocol/sdk-ruby/commit/7c675d5ed4adbdb6443bb765bdd2fb164004a907))
12
+ * **spec:** sync API spec 2026-11-11 ([4e1b076](https://github.com/didit-protocol/sdk-ruby/commit/4e1b07650dfc74f5ad69dfb7668051e76af0c31d))
13
+
3
14
  ## [2.10.0](https://github.com/didit-protocol/sdk-ruby/compare/v2.9.0...v2.10.0) (2026-11-11)
4
15
 
5
16
 
data/README.md CHANGED
@@ -199,7 +199,7 @@ Webhooks `transaction.created`, `transaction.status.updated` and `travel_rule.st
199
199
 
200
200
  ## Authentication
201
201
 
202
- Didit Authentication gives your application an OpenID Connect issuer for your users. The `Didit::Authentication` module is for your backend: it verifies the tokens your frontend sends, exchanges codes, refreshes tokens, checks sessions and creates step-up verifications. It never uses the API key.
202
+ Didit Authentication gives your application an OpenID Connect issuer for your users. The `Didit::Authentication` module is for your backend: it verifies the tokens your frontend sends, exchanges codes, refreshes tokens, checks sessions, creates step-up verifications and approves or denies agent access requests. It never uses the API key.
203
203
 
204
204
  ```ruby
205
205
  auth = Didit::Authentication.new("https://acme.auth.didit.me", client_id: ENV["DIDIT_APPLICATION_ID"])
@@ -218,6 +218,11 @@ auth.get_session(access_token) # instant revocation c
218
218
  auth.revoke_session(access_token)
219
219
  step_up = auth.create_step_up(access_token, action: "payout", amount: "250.00", currency: "EUR", return_to: url)
220
220
  auth.retrieve_step_up(access_token, step_up.id).approved? # act only on status "approved"
221
+
222
+ options = auth.create_agent_approval_options(access_token, challenge: agent_challenge).options # WebAuthn options for the browser
223
+ consent = auth.submit_agent_consent(access_token, challenge: agent_challenge, decision: "approve", assertion: assertion,
224
+ scopes: ["read"], organization_ids: [org_id], lifetime: 86_400)
225
+ consent.approved? ? consent.code : consent.denied? # the agent request secret (challenge) is never logged
221
226
  ```
222
227
 
223
228
  Discovery and keys are fetched on first use and cached as the issuer's `Cache-Control` says; an unknown key id triggers at most one refetch per minute.
@@ -0,0 +1,76 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Didit
4
+ class Authentication
5
+ # Builds and checks the body of +POST agents/consent/+, and names the strings of it that
6
+ # must never reach an error message: the challenge and the assertion's response members.
7
+ #
8
+ # @api private
9
+ module AgentConsentRequest
10
+ CONSENT_PATH = "/agents/consent/"
11
+ OPTIONS_PATH = "/agents/consent/passkey/"
12
+ UUID = /\A[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\z/i
13
+ LIFETIMES = [86_400, 604_800, 2_592_000].freeze
14
+ DECISIONS = %w[approve deny].freeze
15
+ # The assertion members that are secrets.
16
+ ASSERTION_SECRETS = %w[clientDataJSON authenticatorData signature userHandle].freeze
17
+
18
+ # @return [Array(Hash, Array<String>)] the JSON body and its secret strings
19
+ # @raise [Didit::ConfigurationError]
20
+ def self.build(challenge, decision, assertion, scopes, extras = {})
21
+ decision = decision.to_s
22
+ unless DECISIONS.include?(decision)
23
+ raise ConfigurationError, "decision must be \"approve\" or \"deny\", got #{decision.inspect}."
24
+ end
25
+
26
+ # @type var body: Hash[String, untyped]
27
+ body = { "challenge" => challenge, "decision" => decision }
28
+ secrets = [challenge]
29
+ unless assertion.nil?
30
+ body["assertion"] = checked_assertion(assertion)
31
+ secrets.concat(assertion_secrets(assertion))
32
+ end
33
+ body["scopes"] = checked_scopes(scopes) unless scopes.nil?
34
+ organization_ids = extras[:organization_ids]
35
+ lifetime = extras[:lifetime]
36
+ body["organization_ids"] = checked_organization_ids(organization_ids) unless organization_ids.nil?
37
+ body["lifetime"] = checked_lifetime(lifetime) unless lifetime.nil?
38
+ [body, secrets]
39
+ end
40
+
41
+ def self.checked_organization_ids(ids)
42
+ valid = ids.is_a?(Array) && ids.size <= 100 && ids.all? { |id| id.is_a?(String) && UUID.match?(id) }
43
+ return ids if valid
44
+
45
+ raise ConfigurationError, "organization_ids must be an array of at most 100 UUID strings."
46
+ end
47
+
48
+ def self.checked_lifetime(lifetime)
49
+ return lifetime if LIFETIMES.include?(lifetime)
50
+
51
+ raise ConfigurationError, "lifetime must be one of #{LIFETIMES.join(", ")} (seconds), got #{lifetime.inspect}."
52
+ end
53
+
54
+ def self.checked_assertion(assertion)
55
+ return assertion if assertion.is_a?(Hash)
56
+
57
+ raise ConfigurationError, "assertion must be a Hash (the JSON-serialised WebAuthn assertion)."
58
+ end
59
+
60
+ def self.checked_scopes(scopes)
61
+ return scopes if scopes.is_a?(Array) && !scopes.empty? && scopes.all? { |s| s.is_a?(String) && !s.empty? }
62
+
63
+ raise ConfigurationError, "scopes must be a non-empty array of strings such as [\"read\", \"act\"]."
64
+ end
65
+
66
+ def self.assertion_secrets(assertion)
67
+ response = assertion["response"] || assertion[:response]
68
+ return [] unless response.is_a?(Hash)
69
+
70
+ response.filter_map do |key, value|
71
+ value if ASSERTION_SECRETS.include?(key.to_s) && value.is_a?(String) && !value.empty?
72
+ end
73
+ end
74
+ end
75
+ end
76
+ end
@@ -171,5 +171,63 @@ module Didit
171
171
  status == "approved"
172
172
  end
173
173
  end
174
+
175
+ # +POST agents/consent/+: the outcome of an approval or a denial. The API's answer
176
+ # has no shared discriminator: an approval carries +code+, +redirect_uri+ and +state+,
177
+ # a denial only +status+ "denied". It never carries an access or refresh token.
178
+ # {#inspect} leaves the code out; never log it.
179
+ class AgentConsent < Model
180
+ # The single-use agent authorization code (valid 60 seconds), on approval.
181
+ field :code, "code", :string
182
+ # The registered redirect URI of the agent request, on approval.
183
+ field :redirect_uri, "redirect_uri", :string
184
+ # The state of the agent request, on approval.
185
+ field :state, "state", :string
186
+ # "denied", on denial.
187
+ field :status, "status", :string
188
+
189
+ # True when the person approved: the response carries a code.
190
+ def approved?
191
+ !code.nil?
192
+ end
193
+
194
+ # True when the person denied: status "denied".
195
+ def denied?
196
+ status == "denied"
197
+ end
198
+
199
+ def inspect
200
+ shown = raw_data.to_h { |key, value| [key, key == "code" && value ? "[redacted]" : value] }
201
+ "#<#{self.class.name} #{shown.inspect}>"
202
+ end
203
+ alias to_s inspect
204
+ end
205
+
206
+ # One passkey the approving person may use, in {AgentWebAuthnOptions#allow_credentials}.
207
+ class AgentCredentialDescriptor < Model
208
+ # Base64url credential id.
209
+ field :id, "id", :string
210
+ # "public-key"
211
+ field :type, "type", :string
212
+ end
213
+
214
+ # WebAuthn request options: pass them as +publicKey+ to +navigator.credentials.get()+
215
+ # after decoding the binary fields.
216
+ class AgentWebAuthnOptions < Model
217
+ # Base64url challenge, bound to this approval and valid for less than 300 seconds.
218
+ field :challenge, "challenge", :string
219
+ # Sent by the API as +rpId+.
220
+ field :rp_id, "rpId", :string
221
+ # Browser timeout in milliseconds.
222
+ field :timeout, "timeout", :integer
223
+ # "required"
224
+ field :user_verification, "userVerification", :string
225
+ field :allow_credentials, "allowCredentials", [:array, AgentCredentialDescriptor]
226
+ end
227
+
228
+ # +POST agents/consent/passkey/+: the WebAuthn options for approving with a passkey.
229
+ class AgentApprovalOptions < Model
230
+ field :options, "options", AgentWebAuthnOptions
231
+ end
174
232
  end
175
233
  end
@@ -13,6 +13,7 @@ require_relative "authentication/jws"
13
13
  require_relative "authentication/key_set"
14
14
  require_relative "authentication/cache"
15
15
  require_relative "authentication/http"
16
+ require_relative "authentication/agent_consent_request"
16
17
 
17
18
  module Didit
18
19
  # Didit Authentication for your backend (docs/DESIGN.md section 10): verify the
@@ -31,7 +32,7 @@ module Didit
31
32
  # sends your Didit API key. The discovery document and the issuer's keys are
32
33
  # fetched on first use and cached; one instance per process is the intended use
33
34
  # and it is thread safe. Requests are never retried.
34
- class Authentication
35
+ class Authentication # rubocop:disable Metrics/ClassLength -- one class holds the whole public surface (DESIGN.md 10)
35
36
  DEFAULT_TIMEOUT = 10
36
37
  DEFAULT_LEEWAY = 60
37
38
  DISCOVERY_PATH = "/.well-known/openid-configuration"
@@ -258,6 +259,47 @@ module Didit
258
259
  StepUp.new(send_object(bearer_call("GET", issuer_uri(path), access_token)))
259
260
  end
260
261
 
262
+ # Approves or denies a pending agent request for the signed-in person (+POST agents/consent/+).
263
+ #
264
+ # +challenge+ is the pending agent request secret: never log it. +decision+ is
265
+ # "approve" or "deny". When the application requires a human, an approval needs a fresh
266
+ # +assertion+: the JSON-serialised result of +navigator.credentials.get()+ made with the
267
+ # options of {#create_agent_approval_options} (a Hash; binary fields base64url encoded),
268
+ # otherwise the issuer answers HTTP 403 +passkey_required+. A denial needs none.
269
+ # +scopes+ narrows the requested scopes ("read", "act"); omitted means all of them.
270
+ # +organization_ids+ (up to 100 UUID strings) are the organizations the person grants; omitted means
271
+ # none. +lifetime+ is the grant lifetime in seconds (86400, 604800 or 2592000), limited by the
272
+ # application policy; omitted means the policy lifetime.
273
+ # Never retried. Neither outcome carries an access or refresh token.
274
+ #
275
+ # @param decision [String, Symbol] "approve" or "deny"
276
+ # @param assertion [Hash, nil]
277
+ # @param scopes [Array<String>, nil]
278
+ # @return [AgentConsent] {AgentConsent#approved?} carries +code+, +redirect_uri+ and +state+;
279
+ # {AgentConsent#denied?} carries +status+ "denied"
280
+ # @raise [Didit::BadRequestError] +invalid_grant+ for an unknown or expired challenge
281
+ # @raise [Didit::PermissionDeniedError] +passkey_required+ for an approval without a valid assertion
282
+ def submit_agent_consent(access_token, challenge:, decision:, assertion: nil, scopes: nil, organization_ids: nil,
283
+ lifetime: nil)
284
+ body, secrets = AgentConsentRequest.build(required_text(challenge, "challenge"), decision, assertion, scopes,
285
+ { organization_ids: organization_ids, lifetime: lifetime })
286
+ AgentConsent.new(agent_request(AgentConsentRequest::CONSENT_PATH, access_token, body, secrets))
287
+ end
288
+
289
+ # The WebAuthn request options for approving a pending agent request with a passkey
290
+ # (+POST agents/consent/passkey/+). Hand +options+ to +navigator.credentials.get()+ in
291
+ # the person's browser, then pass the JSON-serialised result to {#submit_agent_consent}.
292
+ # +challenge+ is the pending agent request secret, not the WebAuthn challenge: never
293
+ # log it. Never retried.
294
+ #
295
+ # @return [AgentApprovalOptions]
296
+ def create_agent_approval_options(access_token, challenge:)
297
+ challenge = required_text(challenge, "challenge")
298
+ AgentApprovalOptions.new(
299
+ agent_request(AgentConsentRequest::OPTIONS_PATH, access_token, { "challenge" => challenge }, [challenge])
300
+ )
301
+ end
302
+
261
303
  # The issuer's discovery document, fetched and cached like the keys. For debugging.
262
304
  #
263
305
  # @return [Hash] frozen
@@ -446,12 +488,16 @@ module Didit
446
488
  TokenResponse.new(send_object(call))
447
489
  end
448
490
 
449
- def bearer_call(http_method, uri, access_token, json: nil)
491
+ def bearer_call(http_method, uri, access_token, json: nil, secrets: [])
450
492
  token = required_text(access_token, "access_token")
451
493
  # Sent in a header: printable ASCII only, so it can never split or extend the request.
452
494
  raise ConfigurationError, "access_token contains invalid characters." if token.b.match?(/[^\x21-\x7e]/n)
453
495
 
454
- Http::Call.new(http_method, uri, bearer: token, json: json, secrets: [token])
496
+ Http::Call.new(http_method, uri, bearer: token, json: json, secrets: [token, *secrets])
497
+ end
498
+
499
+ def agent_request(path, access_token, body, secrets)
500
+ send_object(bearer_call("POST", issuer_uri(path), access_token, json: body, secrets: secrets))
455
501
  end
456
502
 
457
503
  def send_object(call)
@@ -139,6 +139,11 @@ module Didit
139
139
  # Union by default; it can't be changed afterwards). The response includes `api_key`; persist it now
140
140
  # (recoverable via GET). Requires owner/admin JWT.
141
141
  #
142
+ # Set initiate_login_uri to your HTTPS sign-in page on the exact website_url hostname, or an empty string to
143
+ # disable admin-sent sign-in links. Changing website_url also revalidates the saved sign-in URI. Invalid
144
+ # values return 400 with an initiate_login_uri field error; hostname and URI policy failures use
145
+ # https_url_on_registered_website_required.
146
+ #
142
147
  # +POST /organizations/me/{org_id}/applications/+
143
148
  #
144
149
  # @param org_id [String] UUID of the organization. Look it up with `GET /organizations/me/`.
@@ -152,6 +157,11 @@ module Didit
152
157
  # the application is created. `eu` is the European Union (Ireland), the default. `au` (Australia, Sydney),
153
158
  # `mx` (Mexico) and `ae` (United Arab Emirates) are coming soon: a request that names them answers 400 `This
154
159
  # data location is not available yet.` An organization's Sandbox application is always in the European Union.
160
+ # @param initiate_login_uri [String] Application sign-in URL for an admin-sent sign-in link. Optional; an
161
+ # empty string disables sending. A nonempty value must use HTTPS and the exact hostname of website_url
162
+ # (subdomains must match), with no userinfo, query, fragment or whitespace and no port other than 443. The
163
+ # server also revalidates the saved URI when website_url changes; update or clear initiate_login_uri in the
164
+ # same PATCH if need...
155
165
  # @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
156
166
  # @return [Didit::Types::Application]
157
167
  def create(
@@ -163,6 +173,7 @@ module Didit
163
173
  privacy_url: OMIT,
164
174
  description: OMIT,
165
175
  data_location: OMIT,
176
+ initiate_login_uri: OMIT,
166
177
  request_options: nil
167
178
  )
168
179
  @client.request(
@@ -176,7 +187,8 @@ module Didit
176
187
  "terms_url" => terms_url,
177
188
  "privacy_url" => privacy_url,
178
189
  "description" => description,
179
- "data_location" => data_location
190
+ "data_location" => data_location,
191
+ "initiate_login_uri" => initiate_login_uri
180
192
  },
181
193
  auth: :account_token,
182
194
  api: :account,
@@ -244,6 +256,11 @@ module Didit
244
256
  # application is created, except once on the live application created with your organization, while it is
245
257
  # unused (see the request body). Requires owner/admin JWT.
246
258
  #
259
+ # Set initiate_login_uri to your HTTPS sign-in page on the exact website_url hostname, or an empty string to
260
+ # disable admin-sent sign-in links. Changing website_url also revalidates the saved sign-in URI. Invalid
261
+ # values return 400 with an initiate_login_uri field error; hostname and URI policy failures use
262
+ # https_url_on_registered_website_required.
263
+ #
247
264
  # +PATCH /organizations/me/{org_id}/applications/{app_id}/+
248
265
  #
249
266
  # @param org_id [String] UUID of the organization that owns the application.
@@ -258,6 +275,11 @@ module Didit
258
275
  # the application is created. `eu` is the European Union (Ireland), the default. `au` (Australia, Sydney),
259
276
  # `mx` (Mexico) and `ae` (United Arab Emirates) are coming soon: a request that names them answers 400 `This
260
277
  # data location is not available yet.` An organization's Sandbox application is always in the European Union.
278
+ # @param initiate_login_uri [String] Application sign-in URL for an admin-sent sign-in link. Optional; an
279
+ # empty string disables sending. A nonempty value must use HTTPS and the exact hostname of website_url
280
+ # (subdomains must match), with no userinfo, query, fragment or whitespace and no port other than 443. The
281
+ # server also revalidates the saved URI when website_url changes; update or clear initiate_login_uri in the
282
+ # same PATCH if need...
261
283
  # @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
262
284
  # @return [Didit::Types::Application]
263
285
  def update(
@@ -270,6 +292,7 @@ module Didit
270
292
  privacy_url: OMIT,
271
293
  description: OMIT,
272
294
  data_location: OMIT,
295
+ initiate_login_uri: OMIT,
273
296
  request_options: nil
274
297
  )
275
298
  @client.request(
@@ -283,7 +306,8 @@ module Didit
283
306
  "terms_url" => terms_url,
284
307
  "privacy_url" => privacy_url,
285
308
  "description" => description,
286
- "data_location" => data_location
309
+ "data_location" => data_location,
310
+ "initiate_login_uri" => initiate_login_uri
287
311
  },
288
312
  auth: :account_token,
289
313
  api: :account,
@@ -0,0 +1,33 @@
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 +sandbox+ resource.
7
+ class Sandbox < Didit::Resource
8
+ # List sandbox scenarios and Test VASP metadata
9
+ #
10
+ # Read the sandbox catalog Didit serves for testing. Authenticate with your application's API key or access
11
+ # token; a sandbox session's `Session-Token` also reads it, narrowed to the scenarios that session's workflow
12
+ # can produce. `scenarios`, `magic_values`, `risk_cases`, `sample_identity` and `delivery_conventions` describe
13
+ # the mocked session outcomes and the values that trigger them. `travel_rule` is the Didit Test VASP: its
14
+ # identity, the `routes` it answers over, and each scenario's own `route`. Every Test VASP exchange runs in
15
+ # process inside Didit, so `TEST_VASP` is not a live network or email transport and no real VASP is contacted.
16
+ # Pick a Travel Rule scenario by its beneficiary wallet address or by a beneficiary name of the form `Didit Test
17
+ # VASP <suffix>`. See [Travel Rule sandbox testing](/transaction-monitoring/travel-rule-sandbox).
18
+ #
19
+ # +GET /v1/sandbox/scenarios/+
20
+ #
21
+ # @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
22
+ # @return [Didit::Types::SandboxScenarioCatalog]
23
+ def list_scenarios(request_options: nil)
24
+ @client.request(
25
+ :get,
26
+ "/v1/sandbox/scenarios/",
27
+ response: Types::SandboxScenarioCatalog,
28
+ request_options: request_options
29
+ )
30
+ end
31
+ end
32
+ end
33
+ end
@@ -430,6 +430,10 @@ module Didit
430
430
  # @param legal_name [String]
431
431
  # @param lei [String]
432
432
  # @param jurisdiction [String]
433
+ # @param vasp_jurisdiction [String] Your VASP profile's own jurisdiction, up to 3 characters (for example `GB`
434
+ # or `USA`), shown to other Didit customers in the VASP directory. Independent of `jurisdiction`, which sets the
435
+ # regulatory regime Didit stamps on your transfers. Send an empty string to clear it; the directory then shows
436
+ # `jurisdiction`.
433
437
  # @param name_matching_strictness [String] `CONTAINS` accepts one name whose words all appear in the other.
434
438
  # @param confirmation_timeout_hours [Integer]
435
439
  # @param timeout_outcome [String]
@@ -472,6 +476,7 @@ module Didit
472
476
  legal_name: OMIT,
473
477
  lei: OMIT,
474
478
  jurisdiction: OMIT,
479
+ vasp_jurisdiction: OMIT,
475
480
  name_matching_strictness: OMIT,
476
481
  confirmation_timeout_hours: OMIT,
477
482
  timeout_outcome: OMIT,
@@ -501,6 +506,7 @@ module Didit
501
506
  "legal_name" => legal_name,
502
507
  "lei" => lei,
503
508
  "jurisdiction" => jurisdiction,
509
+ "vasp_jurisdiction" => vasp_jurisdiction,
504
510
  "name_matching_strictness" => name_matching_strictness,
505
511
  "confirmation_timeout_hours" => confirmation_timeout_hours,
506
512
  "timeout_outcome" => timeout_outcome,
@@ -39,6 +39,7 @@ module Didit
39
39
  autoload :Questionnaires, "didit/resources/questionnaires"
40
40
  autoload :RegulatoryReports, "didit/resources/regulatory_reports"
41
41
  autoload :ReportTemplates, "didit/resources/report_templates"
42
+ autoload :Sandbox, "didit/resources/sandbox"
42
43
  autoload :Sessions, "didit/resources/sessions"
43
44
  autoload :Transactions, "didit/resources/transactions"
44
45
  autoload :TravelRule, "didit/resources/travel_rule"
@@ -224,6 +225,11 @@ module Didit
224
225
  @report_templates ||= Resources::ReportTemplates.new(self)
225
226
  end
226
227
 
228
+ # @return [Didit::Resources::Sandbox]
229
+ def sandbox
230
+ @sandbox ||= Resources::Sandbox.new(self)
231
+ end
232
+
227
233
  # @return [Didit::Resources::Sessions]
228
234
  def sessions
229
235
  @sessions ||= Resources::Sessions.new(self)
@@ -75,6 +75,7 @@ module Didit
75
75
  field :data_location, "data_location", :string
76
76
  field :products, "products", [:array, "ApplicationProduct"]
77
77
  field :mode, "mode", :string
78
+ field :initiate_login_uri, "initiate_login_uri", :string
78
79
  end
79
80
 
80
81
  # Minimal application shape returned inline by `POST /programmatic/verify-email/`. Persist the `api_key`
@@ -2821,6 +2821,33 @@ module Didit
2821
2821
  VALUES = [EQUALS, IN, CONTAINS].freeze
2822
2822
  end
2823
2823
 
2824
+ # The session status the scenario settles on.
2825
+ module SandboxScenarioDefaultStatus
2826
+ APPROVED = "Approved"
2827
+ DECLINED = "Declined"
2828
+ IN_REVIEW = "In Review"
2829
+
2830
+ VALUES = [APPROVED, DECLINED, IN_REVIEW].freeze
2831
+ end
2832
+
2833
+ # The picker group the scenario is listed under.
2834
+ module SandboxScenarioGroup
2835
+ ID_DOCUMENT = "id_document"
2836
+ SELFIE = "selfie"
2837
+ PHONE_EMAIL = "phone_email"
2838
+ ADDRESS = "address"
2839
+ QUESTIONNAIRE = "questionnaire"
2840
+ DATABASE = "database"
2841
+ AML = "aml"
2842
+ BANK = "bank"
2843
+ LOCATION = "location"
2844
+ SIGNATURE = "signature"
2845
+ COMPANY = "company"
2846
+ OTHER = "other"
2847
+
2848
+ VALUES = [ID_DOCUMENT, SELFIE, PHONE_EMAIL, ADDRESS, QUESTIONNAIRE, DATABASE, AML, BANK, LOCATION, SIGNATURE, COMPANY, OTHER].freeze
2849
+ end
2850
+
2824
2851
  # The session's status before the simulation.
2825
2852
  module SandboxSimulateResponsePreviousStatus
2826
2853
  NOT_STARTED = "Not Started"
@@ -2848,6 +2875,71 @@ module Didit
2848
2875
  VALUES = [APPROVED, DECLINED, IN_REVIEW, EXPIRED, ABANDONED].freeze
2849
2876
  end
2850
2877
 
2878
+ # The scenario used when no trigger names one.
2879
+ module SandboxTestVaspDefaultScenario
2880
+ ACCEPT = "accept"
2881
+ DECLINE = "decline"
2882
+ NAME_MISMATCH = "name_mismatch"
2883
+ NOT_REACHABLE = "not_reachable"
2884
+ TIMEOUT = "timeout"
2885
+ SELF_HOSTED = "self_hosted"
2886
+
2887
+ VALUES = [ACCEPT, DECLINE, NAME_MISMATCH, NOT_REACHABLE, TIMEOUT, SELF_HOSTED].freeze
2888
+ end
2889
+
2890
+ # Known values of an open enum: the API may send others.
2891
+ module SandboxTestVaspInboundScenarios
2892
+ ACCEPT = "accept"
2893
+ NAME_MISMATCH = "name_mismatch"
2894
+
2895
+ VALUES = [ACCEPT, NAME_MISMATCH].freeze
2896
+ end
2897
+
2898
+ # Known values of an open enum: the API may send others.
2899
+ module SandboxTestVaspRoutes
2900
+ TEST_VASP = "TEST_VASP"
2901
+
2902
+ VALUES = [TEST_VASP].freeze
2903
+ end
2904
+
2905
+ # The rail this scenario answers over. It is always `TEST_VASP`, which runs in process inside Didit.
2906
+ module SandboxTestVaspScenarioRoute
2907
+ TEST_VASP = "TEST_VASP"
2908
+
2909
+ VALUES = [TEST_VASP].freeze
2910
+ end
2911
+
2912
+ # Scenario slug.
2913
+ module SandboxTestVaspScenarioSlug
2914
+ ACCEPT = "accept"
2915
+ DECLINE = "decline"
2916
+ NAME_MISMATCH = "name_mismatch"
2917
+ NOT_REACHABLE = "not_reachable"
2918
+ TIMEOUT = "timeout"
2919
+ SELF_HOSTED = "self_hosted"
2920
+
2921
+ VALUES = [ACCEPT, DECLINE, NAME_MISMATCH, NOT_REACHABLE, TIMEOUT, SELF_HOSTED].freeze
2922
+ end
2923
+
2924
+ # The status the exchange ends at.
2925
+ module SandboxTestVaspScenarioTravelRuleStatus
2926
+ AWAITING_COUNTERPARTY = "AWAITING_COUNTERPARTY"
2927
+ ON_HOLD = "ON_HOLD"
2928
+ COMPLETED = "COMPLETED"
2929
+ FINISHED = "FINISHED"
2930
+ CANCELLED = "CANCELLED"
2931
+ EXPIRED = "EXPIRED"
2932
+ COUNTERPARTY_MISMATCHED_DATA = "COUNTERPARTY_MISMATCHED_DATA"
2933
+ COUNTERPARTY_VASP_NOT_FOUND = "COUNTERPARTY_VASP_NOT_FOUND"
2934
+ COUNTERPARTY_VASP_NOT_REACHABLE = "COUNTERPARTY_VASP_NOT_REACHABLE"
2935
+ UNCONFIRMED_OWNERSHIP = "UNCONFIRMED_OWNERSHIP"
2936
+ COUNTERPARTY_VASP_GENERAL_DECLINE = "COUNTERPARTY_VASP_GENERAL_DECLINE"
2937
+ NOT_ENOUGH_COUNTERPARTY_DATA = "NOT_ENOUGH_COUNTERPARTY_DATA"
2938
+ NOT_APPLICABLE = "NOT_APPLICABLE"
2939
+
2940
+ VALUES = [AWAITING_COUNTERPARTY, ON_HOLD, COMPLETED, FINISHED, CANCELLED, EXPIRED, COUNTERPARTY_MISMATCHED_DATA, COUNTERPARTY_VASP_NOT_FOUND, COUNTERPARTY_VASP_NOT_REACHABLE, UNCONFIRMED_OWNERSHIP, COUNTERPARTY_VASP_GENERAL_DECLINE, NOT_ENOUGH_COUNTERPARTY_DATA, NOT_APPLICABLE].freeze
2941
+ end
2942
+
2851
2943
  # `BIOMETRIC_CONSENT_DECLINED` when a recorded decline ended the session, otherwise `null`.
2852
2944
  module SessionDecisionBiometricConsentDeclineReason
2853
2945
  BIOMETRIC_CONSENT_DECLINED = "BIOMETRIC_CONSENT_DECLINED"
@@ -9681,6 +9773,89 @@ module Didit
9681
9773
  field :value, "value", :any
9682
9774
  end
9683
9775
 
9776
+ class SandboxDeliveryConventions < Didit::Model
9777
+ field :email_optin, "email_optin", "SandboxDeliveryConventionsEmailOptin"
9778
+ field :phone_otp_code, "phone_otp_code", "SandboxOtpConvention"
9779
+ field :email_otp_code, "email_otp_code", "SandboxOtpConvention"
9780
+ end
9781
+
9782
+ class SandboxDeliveryConventionsEmailOptin < Didit::Model
9783
+ field :description, "description", :string
9784
+ field :patterns, "patterns", [:array, "SandboxDeliveryConventionsEmailOptinPatterns"]
9785
+ end
9786
+
9787
+ class SandboxDeliveryConventionsEmailOptinPatterns < Didit::Model
9788
+ field :pattern, "pattern", :string
9789
+ field :example, "example", :string
9790
+ end
9791
+
9792
+ class SandboxMagicValue < Didit::Model
9793
+ field :risk, "risk", :string
9794
+ field :feature, "feature", :string
9795
+ field :input_field, "input_field", :string
9796
+ field :magic_value, "magic_value", :string
9797
+ field :description, "description", :string
9798
+ end
9799
+
9800
+ class SandboxOtpConvention < Didit::Model
9801
+ field :description, "description", :string
9802
+ field :value, "value", :string
9803
+ end
9804
+
9805
+ class SandboxRiskCase < Didit::Model
9806
+ field :risk, "risk", :string
9807
+ field :feature, "feature", :string
9808
+ field :status_path, "status_path", :string
9809
+ field :default_status, "default_status", :string
9810
+ end
9811
+
9812
+ class SandboxSampleDocument < Didit::Model
9813
+ field :sandbox_sample, "sandbox_sample", :string
9814
+ field :document_name, "document_name", :string
9815
+ field :is_default, "is_default", :boolean
9816
+ field :first_name, "first_name", :string
9817
+ field :last_name, "last_name", :string
9818
+ field :date_of_birth, "date_of_birth", :string
9819
+ field :gender, "gender", :string
9820
+ field :nationality, "nationality", :string
9821
+ field :id_country, "id_country", :string
9822
+ field :identification_number, "identification_number", :string
9823
+ end
9824
+
9825
+ class SandboxSampleIdentity < Didit::Model
9826
+ field :date_of_birth, "date_of_birth", :string
9827
+ field :date_of_issue, "date_of_issue", :string
9828
+ field :date_of_expiry, "date_of_expiry", :string
9829
+ field :documents, "documents", [:array, "SandboxSampleDocument"]
9830
+ end
9831
+
9832
+ class SandboxScenario < Didit::Model
9833
+ field :slug, "slug", :string
9834
+ field :title, "title", :string
9835
+ field :description, "description", :string
9836
+ field :default_status, "default_status", :string
9837
+ field :steps, "steps", [:array, :string]
9838
+ field :group, "group", :string
9839
+ field :magic_inputs, "magic_inputs", [:map, :string]
9840
+ field :warnings, "warnings", [:array, "SandboxScenarioWarning"]
9841
+ end
9842
+
9843
+ class SandboxScenarioCatalog < Didit::Model
9844
+ field :scenarios, "scenarios", [:array, "SandboxScenario"]
9845
+ field :magic_values, "magic_values", [:array, "SandboxMagicValue"]
9846
+ field :risk_cases, "risk_cases", [:array, "SandboxRiskCase"]
9847
+ field :sample_identity, "sample_identity", "SandboxSampleIdentity"
9848
+ field :delivery_conventions, "delivery_conventions", "SandboxDeliveryConventions"
9849
+ field :travel_rule, "travel_rule", "SandboxTestVasp"
9850
+ end
9851
+
9852
+ class SandboxScenarioWarning < Didit::Model
9853
+ field :risk, "risk", :string
9854
+ field :feature, "feature", :string
9855
+ field :input_field, "input_field", :string
9856
+ field :magic_value, "magic_value", :string
9857
+ end
9858
+
9684
9859
  class SandboxSimulateResponse < Didit::Model
9685
9860
  field :session_id, "session_id", :string
9686
9861
  field :previous_status, "previous_status", :string
@@ -9690,6 +9865,33 @@ module Didit
9690
9865
  field :send_webhooks, "send_webhooks", :boolean
9691
9866
  end
9692
9867
 
9868
+ class SandboxTestVasp < Didit::Model
9869
+ field :legal_name, "legal_name", :string
9870
+ field :lei, "lei", :string
9871
+ field :jurisdiction, "jurisdiction", :string
9872
+ field :compliance_email, "compliance_email", :string
9873
+ field :travel_address, "travel_address", :string
9874
+ field :network_codes, "network_codes", [:map, :string]
9875
+ field :routes, "routes", [:array, :string]
9876
+ field :chain, "chain", :string
9877
+ field :timeout_window_seconds, "timeout_window_seconds", :integer
9878
+ field :default_scenario, "default_scenario", :string
9879
+ field :inbound_scenarios, "inbound_scenarios", [:array, :string]
9880
+ field :scenarios, "scenarios", [:array, "SandboxTestVaspScenario"]
9881
+ end
9882
+
9883
+ class SandboxTestVaspScenario < Didit::Model
9884
+ field :slug, "slug", :string
9885
+ field :route, "route", :string
9886
+ field :title, "title", :string
9887
+ field :description, "description", :string
9888
+ field :beneficiary_name, "beneficiary_name", :string
9889
+ field :beneficiary_wallet_address, "beneficiary_wallet_address", :string
9890
+ field :chain, "chain", :string
9891
+ field :travel_rule_status, "travel_rule_status", :string
9892
+ field :answers, "answers", :boolean
9893
+ end
9894
+
9693
9895
  class SessionDecision < Didit::Model
9694
9896
  field :session_id, "session_id", :string
9695
9897
  field :session_kind, "session_kind", :string
@@ -12493,6 +12695,7 @@ module Didit
12493
12695
  class TravelRuleSettingsDetail < Didit::Model
12494
12696
  field :is_enabled, "is_enabled", :boolean
12495
12697
  field :jurisdiction, "jurisdiction", :string
12698
+ field :vasp_jurisdiction, "vasp_jurisdiction", :string
12496
12699
  field :name_matching_strictness, "name_matching_strictness", :string
12497
12700
  field :confirmation_timeout_hours, "confirmation_timeout_hours", :integer
12498
12701
  field :timeout_outcome, "timeout_outcome", :string
@@ -12626,6 +12829,8 @@ module Didit
12626
12829
  field :originator_wallet_type, "originator_wallet_type", :string
12627
12830
  field :beneficiary_wallet_type, "beneficiary_wallet_type", :string
12628
12831
  field :matched_transaction_id, "matched_transaction_id", :string
12832
+ field :scenario, "scenario", :string
12833
+ field :webhooks_count, "webhooks_count", :integer
12629
12834
  field :deadline_at, "deadline_at", :datetime
12630
12835
  field :created_at, "created_at", :datetime
12631
12836
  end
data/lib/didit/types.rb CHANGED
@@ -994,9 +994,30 @@ module Didit
994
994
  autoload :RoutingPublicationPolicyDraftResponse, "didit/types/components"
995
995
  autoload :RoutingPublicationPolicyRevision, "didit/types/components"
996
996
  autoload :RoutingPublicationRoutingCondition, "didit/types/components"
997
+ autoload :SandboxDeliveryConventions, "didit/types/components"
998
+ autoload :SandboxDeliveryConventionsEmailOptin, "didit/types/components"
999
+ autoload :SandboxDeliveryConventionsEmailOptinPatterns, "didit/types/components"
1000
+ autoload :SandboxMagicValue, "didit/types/components"
1001
+ autoload :SandboxOtpConvention, "didit/types/components"
1002
+ autoload :SandboxRiskCase, "didit/types/components"
1003
+ autoload :SandboxSampleDocument, "didit/types/components"
1004
+ autoload :SandboxSampleIdentity, "didit/types/components"
1005
+ autoload :SandboxScenario, "didit/types/components"
1006
+ autoload :SandboxScenarioCatalog, "didit/types/components"
1007
+ autoload :SandboxScenarioDefaultStatus, "didit/types/components"
1008
+ autoload :SandboxScenarioGroup, "didit/types/components"
1009
+ autoload :SandboxScenarioWarning, "didit/types/components"
997
1010
  autoload :SandboxSimulateResponse, "didit/types/components"
998
1011
  autoload :SandboxSimulateResponsePreviousStatus, "didit/types/components"
999
1012
  autoload :SandboxSimulateResponseStatus, "didit/types/components"
1013
+ autoload :SandboxTestVasp, "didit/types/components"
1014
+ autoload :SandboxTestVaspDefaultScenario, "didit/types/components"
1015
+ autoload :SandboxTestVaspInboundScenarios, "didit/types/components"
1016
+ autoload :SandboxTestVaspRoutes, "didit/types/components"
1017
+ autoload :SandboxTestVaspScenario, "didit/types/components"
1018
+ autoload :SandboxTestVaspScenarioRoute, "didit/types/components"
1019
+ autoload :SandboxTestVaspScenarioSlug, "didit/types/components"
1020
+ autoload :SandboxTestVaspScenarioTravelRuleStatus, "didit/types/components"
1000
1021
  autoload :SessionDecision, "didit/types/components"
1001
1022
  autoload :SessionDecisionAssignee, "didit/types/components"
1002
1023
  autoload :SessionDecisionBiometricConsent, "didit/types/components"
data/lib/didit/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Didit
4
- VERSION = "2.10.0" # x-release-please-version
4
+ VERSION = "2.11.0" # x-release-please-version
5
5
  end
@@ -0,0 +1,19 @@
1
+ module Didit
2
+ class Authentication
3
+ module AgentConsentRequest
4
+ CONSENT_PATH: String
5
+ OPTIONS_PATH: String
6
+ UUID: Regexp
7
+ LIFETIMES: Array[Integer]
8
+ DECISIONS: Array[String]
9
+ ASSERTION_SECRETS: Array[String]
10
+
11
+ def self.build: (String challenge, untyped decision, untyped assertion, untyped scopes, ?Hash[Symbol, untyped] extras) -> [Hash[String, untyped], Array[String]]
12
+ def self.checked_assertion: (untyped assertion) -> Hash[untyped, untyped]
13
+ def self.checked_organization_ids: (untyped ids) -> Array[String]
14
+ def self.checked_lifetime: (untyped lifetime) -> Integer
15
+ def self.checked_scopes: (untyped scopes) -> Array[String]
16
+ def self.assertion_secrets: (Hash[untyped, untyped] assertion) -> Array[String]
17
+ end
18
+ end
19
+ end
@@ -110,5 +110,31 @@ module Didit
110
110
  def expires_in: () -> Integer?
111
111
  def approved?: () -> bool
112
112
  end
113
+
114
+ class AgentConsent < Didit::Model
115
+ def code: () -> String?
116
+ def redirect_uri: () -> String?
117
+ def state: () -> String?
118
+ def status: () -> String?
119
+ def approved?: () -> bool
120
+ def denied?: () -> bool
121
+ end
122
+
123
+ class AgentCredentialDescriptor < Didit::Model
124
+ def id: () -> String?
125
+ def type: () -> String?
126
+ end
127
+
128
+ class AgentWebAuthnOptions < Didit::Model
129
+ def challenge: () -> String?
130
+ def rp_id: () -> String?
131
+ def timeout: () -> Integer?
132
+ def user_verification: () -> String?
133
+ def allow_credentials: () -> Array[AgentCredentialDescriptor]?
134
+ end
135
+
136
+ class AgentApprovalOptions < Didit::Model
137
+ def options: () -> AgentWebAuthnOptions?
138
+ end
113
139
  end
114
140
  end
@@ -45,6 +45,10 @@ module Didit
45
45
  def create_step_up: (String access_token, action: String, ?amount: amount?, ?currency: String?,
46
46
  ?return_to: String?) -> StepUp
47
47
  def retrieve_step_up: (String access_token, String step_up_id) -> StepUp
48
+ def submit_agent_consent: (String access_token, challenge: String, decision: String | Symbol,
49
+ ?assertion: Hash[untyped, untyped]?, ?scopes: Array[String]?,
50
+ ?organization_ids: Array[String]?, ?lifetime: Integer?) -> AgentConsent
51
+ def create_agent_approval_options: (String access_token, challenge: String) -> AgentApprovalOptions
48
52
  def discovery: () -> Hash[String, untyped]
49
53
  def jwks: () -> Hash[String, untyped]
50
54
  def close: () -> nil
@@ -67,7 +71,9 @@ module Didit
67
71
  def endpoint_uri: (untyped value) -> URI::HTTP?
68
72
  def token_request: (Hash[String, String] form, Array[String] secrets) -> TokenResponse
69
73
  def bearer_call: (String http_method, URI::Generic uri, untyped access_token,
70
- ?json: Hash[String, untyped]?) -> Http::Call
74
+ ?json: Hash[String, untyped]?,
75
+ ?secrets: Array[String]) -> Http::Call
76
+ def agent_request: (String path, String access_token, Hash[String, untyped] body, Array[String] secrets) -> Hash[String, untyped]
71
77
  def send_object: (Http::Call call) -> Hash[String, untyped]
72
78
  def issuer_uri: (String path) -> URI::Generic
73
79
  def required_text: (untyped value, String name) -> String
@@ -10,10 +10,10 @@ module Didit
10
10
  def resend_otp: (email: String, password: String, ?request_options: Didit::request_options?) -> Didit::Types::AccountResendOtpResponse
11
11
  def verify_email: (email: String, code: String, ?request_options: Didit::request_options?) -> Didit::Types::VerifyEmailResponse
12
12
  class Applications < Didit::Resource
13
- def create: (String org_id, ?name: String, ?website_url: String, ?redirect_uris: Array[String], ?terms_url: String, ?privacy_url: String, ?description: String, ?data_location: String, ?request_options: Didit::request_options?) -> Didit::Types::Application
13
+ def create: (String org_id, ?name: String, ?website_url: String, ?redirect_uris: Array[String], ?terms_url: String, ?privacy_url: String, ?description: String, ?data_location: String, ?initiate_login_uri: String, ?request_options: Didit::request_options?) -> Didit::Types::Application
14
14
  def list: (String org_id, ?limit: Integer, ?offset: Integer, ?request_options: Didit::request_options?) -> Didit::Page[Didit::Types::Application]
15
15
  def retrieve: (String org_id, String app_id, ?request_options: Didit::request_options?) -> Didit::Types::Application
16
- def update: (String org_id, String app_id, ?name: String, ?website_url: String, ?redirect_uris: Array[String], ?terms_url: String, ?privacy_url: String, ?description: String, ?data_location: String, ?request_options: Didit::request_options?) -> Didit::Types::Application
16
+ def update: (String org_id, String app_id, ?name: String, ?website_url: String, ?redirect_uris: Array[String], ?terms_url: String, ?privacy_url: String, ?description: String, ?data_location: String, ?initiate_login_uri: String, ?request_options: Didit::request_options?) -> Didit::Types::Application
17
17
  end
18
18
  class Organizations < Didit::Resource
19
19
  def list: (?limit: Integer, ?offset: Integer, ?request_options: Didit::request_options?) -> Didit::Page[Didit::Types::Organization]
@@ -0,0 +1,9 @@
1
+ # Code generated by codegen from openapi/*.json. DO NOT EDIT.
2
+
3
+ module Didit
4
+ module Resources
5
+ class Sandbox < Didit::Resource
6
+ def list_scenarios: (?request_options: Didit::request_options?) -> Didit::Types::SandboxScenarioCatalog
7
+ end
8
+ end
9
+ end
@@ -22,7 +22,7 @@ module Didit
22
22
  def screen_vasp: (String vasp_id, ?refresh: bool, ?request_options: Didit::request_options?) -> Didit::Types::TravelRuleCounterpartyScreeningResult
23
23
  def send_compliance_email_confirmation: (?request_options: Didit::request_options?) -> Didit::Types::TravelRuleSendComplianceEmailConfirmationResponse
24
24
  def send_vasp_questionnaire: (String vasp_id, ?sent_to: String, ?request_options: Didit::request_options?) -> Didit::Types::TravelRuleCounterpartyQuestionnaire
25
- def update_settings: (?is_enabled: bool, ?legal_name: String, ?lei: String, ?jurisdiction: String, ?name_matching_strictness: String, ?confirmation_timeout_hours: Integer, ?timeout_outcome: String, ?compliance_email: String, ?is_discoverable: bool, ?threshold_amount: String, ?ownership_validation_mode: String, ?simplified_validation_threshold: String, ?data_sharing_fields: Didit::Types::travel_rule_data_sharing_fields, ?matching_rules: Didit::Types::travel_rule_matching_rules, ?inbound_auto_accept: bool, ?allow_self_declaration: bool, ?allow_screenshot_proof: bool, ?auto_wallet_verification: bool, ?vasp_attribution_enabled: bool, ?counterparty_screening_enabled: bool, ?sunrise_policy: String, ?non_responsive_policy: String, ?disabled_networks: Array[String], ?request_options: Didit::request_options?) -> Didit::Types::TravelRuleSettingsDetail
25
+ def update_settings: (?is_enabled: bool, ?legal_name: String, ?lei: String, ?jurisdiction: String, ?vasp_jurisdiction: String, ?name_matching_strictness: String, ?confirmation_timeout_hours: Integer, ?timeout_outcome: String, ?compliance_email: String, ?is_discoverable: bool, ?threshold_amount: String, ?ownership_validation_mode: String, ?simplified_validation_threshold: String, ?data_sharing_fields: Didit::Types::travel_rule_data_sharing_fields, ?matching_rules: Didit::Types::travel_rule_matching_rules, ?inbound_auto_accept: bool, ?allow_self_declaration: bool, ?allow_screenshot_proof: bool, ?auto_wallet_verification: bool, ?vasp_attribution_enabled: bool, ?counterparty_screening_enabled: bool, ?sunrise_policy: String, ?non_responsive_policy: String, ?disabled_networks: Array[String], ?request_options: Didit::request_options?) -> Didit::Types::TravelRuleSettingsDetail
26
26
  def update_vasp_decision: (String vasp_id, decision: String, ?reason: String, ?request_options: Didit::request_options?) -> Didit::Types::TravelRuleCounterpartyDecisionResponse
27
27
  class CounterpartyContacts < Didit::Resource
28
28
  def create: (counterparty: String, email: String, ?name: String, ?request_options: Didit::request_options?) -> Didit::Types::TravelRuleCounterpartyContact
@@ -38,6 +38,7 @@ module Didit
38
38
  def questionnaires: () -> Didit::Resources::Questionnaires
39
39
  def regulatory_reports: () -> Didit::Resources::RegulatoryReports
40
40
  def report_templates: () -> Didit::Resources::ReportTemplates
41
+ def sandbox: () -> Didit::Resources::Sandbox
41
42
  def sessions: () -> Didit::Resources::Sessions
42
43
  def transactions: () -> Didit::Resources::Transactions
43
44
  def travel_rule: () -> Didit::Resources::TravelRule
@@ -7,9 +7,9 @@ module Didit
7
7
  def email: () -> String
8
8
  end
9
9
 
10
- type account_applications_create_params = { ?name: String, ?website_url: String, ?redirect_uris: Array[String], ?terms_url: String, ?privacy_url: String, ?description: String, ?data_location: String }
10
+ type account_applications_create_params = { ?name: String, ?website_url: String, ?redirect_uris: Array[String], ?terms_url: String, ?privacy_url: String, ?description: String, ?data_location: String, ?initiate_login_uri: String }
11
11
 
12
- type account_applications_update_params = { ?name: String, ?website_url: String, ?redirect_uris: Array[String], ?terms_url: String, ?privacy_url: String, ?description: String, ?data_location: String }
12
+ type account_applications_update_params = { ?name: String, ?website_url: String, ?redirect_uris: Array[String], ?terms_url: String, ?privacy_url: String, ?description: String, ?data_location: String, ?initiate_login_uri: String }
13
13
 
14
14
  type account_login_params = { email: String, password: String }
15
15
 
@@ -55,6 +55,7 @@ module Didit
55
55
  def data_location: () -> String?
56
56
  def products: () -> Array[Didit::Types::ApplicationProduct]?
57
57
  def mode: () -> String?
58
+ def initiate_login_uri: () -> String?
58
59
  end
59
60
 
60
61
  class ApplicationCredentialsSummary < Didit::Model
@@ -2349,6 +2349,31 @@ module Didit
2349
2349
  VALUES: Array[String]
2350
2350
  end
2351
2351
 
2352
+ module SandboxScenarioDefaultStatus
2353
+ APPROVED: String
2354
+ DECLINED: String
2355
+ IN_REVIEW: String
2356
+
2357
+ VALUES: Array[String]
2358
+ end
2359
+
2360
+ module SandboxScenarioGroup
2361
+ ID_DOCUMENT: String
2362
+ SELFIE: String
2363
+ PHONE_EMAIL: String
2364
+ ADDRESS: String
2365
+ QUESTIONNAIRE: String
2366
+ DATABASE: String
2367
+ AML: String
2368
+ BANK: String
2369
+ LOCATION: String
2370
+ SIGNATURE: String
2371
+ COMPANY: String
2372
+ OTHER: String
2373
+
2374
+ VALUES: Array[String]
2375
+ end
2376
+
2352
2377
  module SandboxSimulateResponsePreviousStatus
2353
2378
  NOT_STARTED: String
2354
2379
  IN_PROGRESS: String
@@ -2374,6 +2399,65 @@ module Didit
2374
2399
  VALUES: Array[String]
2375
2400
  end
2376
2401
 
2402
+ module SandboxTestVaspDefaultScenario
2403
+ ACCEPT: String
2404
+ DECLINE: String
2405
+ NAME_MISMATCH: String
2406
+ NOT_REACHABLE: String
2407
+ TIMEOUT: String
2408
+ SELF_HOSTED: String
2409
+
2410
+ VALUES: Array[String]
2411
+ end
2412
+
2413
+ module SandboxTestVaspInboundScenarios
2414
+ ACCEPT: String
2415
+ NAME_MISMATCH: String
2416
+
2417
+ VALUES: Array[String]
2418
+ end
2419
+
2420
+ module SandboxTestVaspRoutes
2421
+ TEST_VASP: String
2422
+
2423
+ VALUES: Array[String]
2424
+ end
2425
+
2426
+ module SandboxTestVaspScenarioRoute
2427
+ TEST_VASP: String
2428
+
2429
+ VALUES: Array[String]
2430
+ end
2431
+
2432
+ module SandboxTestVaspScenarioSlug
2433
+ ACCEPT: String
2434
+ DECLINE: String
2435
+ NAME_MISMATCH: String
2436
+ NOT_REACHABLE: String
2437
+ TIMEOUT: String
2438
+ SELF_HOSTED: String
2439
+
2440
+ VALUES: Array[String]
2441
+ end
2442
+
2443
+ module SandboxTestVaspScenarioTravelRuleStatus
2444
+ AWAITING_COUNTERPARTY: String
2445
+ ON_HOLD: String
2446
+ COMPLETED: String
2447
+ FINISHED: String
2448
+ CANCELLED: String
2449
+ EXPIRED: String
2450
+ COUNTERPARTY_MISMATCHED_DATA: String
2451
+ COUNTERPARTY_VASP_NOT_FOUND: String
2452
+ COUNTERPARTY_VASP_NOT_REACHABLE: String
2453
+ UNCONFIRMED_OWNERSHIP: String
2454
+ COUNTERPARTY_VASP_GENERAL_DECLINE: String
2455
+ NOT_ENOUGH_COUNTERPARTY_DATA: String
2456
+ NOT_APPLICABLE: String
2457
+
2458
+ VALUES: Array[String]
2459
+ end
2460
+
2377
2461
  module SessionDecisionBiometricConsentDeclineReason
2378
2462
  BIOMETRIC_CONSENT_DECLINED: String
2379
2463
 
@@ -8464,6 +8548,89 @@ module Didit
8464
8548
  def value: () -> untyped
8465
8549
  end
8466
8550
 
8551
+ class SandboxDeliveryConventions < Didit::Model
8552
+ def email_optin: () -> Didit::Types::SandboxDeliveryConventionsEmailOptin
8553
+ def phone_otp_code: () -> Didit::Types::SandboxOtpConvention
8554
+ def email_otp_code: () -> Didit::Types::SandboxOtpConvention
8555
+ end
8556
+
8557
+ class SandboxDeliveryConventionsEmailOptin < Didit::Model
8558
+ def description: () -> String
8559
+ def patterns: () -> Array[Didit::Types::SandboxDeliveryConventionsEmailOptinPatterns]
8560
+ end
8561
+
8562
+ class SandboxDeliveryConventionsEmailOptinPatterns < Didit::Model
8563
+ def pattern: () -> String
8564
+ def example: () -> String
8565
+ end
8566
+
8567
+ class SandboxMagicValue < Didit::Model
8568
+ def risk: () -> String
8569
+ def feature: () -> String
8570
+ def input_field: () -> String
8571
+ def magic_value: () -> String
8572
+ def description: () -> String
8573
+ end
8574
+
8575
+ class SandboxOtpConvention < Didit::Model
8576
+ def description: () -> String
8577
+ def value: () -> String
8578
+ end
8579
+
8580
+ class SandboxRiskCase < Didit::Model
8581
+ def risk: () -> String
8582
+ def feature: () -> String
8583
+ def status_path: () -> String
8584
+ def default_status: () -> String
8585
+ end
8586
+
8587
+ class SandboxSampleDocument < Didit::Model
8588
+ def sandbox_sample: () -> String?
8589
+ def document_name: () -> String
8590
+ def is_default: () -> bool
8591
+ def first_name: () -> String?
8592
+ def last_name: () -> String?
8593
+ def date_of_birth: () -> String?
8594
+ def gender: () -> String?
8595
+ def nationality: () -> String?
8596
+ def id_country: () -> String?
8597
+ def identification_number: () -> String?
8598
+ end
8599
+
8600
+ class SandboxSampleIdentity < Didit::Model
8601
+ def date_of_birth: () -> String
8602
+ def date_of_issue: () -> String
8603
+ def date_of_expiry: () -> String
8604
+ def documents: () -> Array[Didit::Types::SandboxSampleDocument]
8605
+ end
8606
+
8607
+ class SandboxScenario < Didit::Model
8608
+ def slug: () -> String
8609
+ def title: () -> String
8610
+ def description: () -> String
8611
+ def default_status: () -> String
8612
+ def steps: () -> Array[String]
8613
+ def group: () -> String
8614
+ def magic_inputs: () -> Hash[String, String]
8615
+ def warnings: () -> Array[Didit::Types::SandboxScenarioWarning]
8616
+ end
8617
+
8618
+ class SandboxScenarioCatalog < Didit::Model
8619
+ def scenarios: () -> Array[Didit::Types::SandboxScenario]
8620
+ def magic_values: () -> Array[Didit::Types::SandboxMagicValue]
8621
+ def risk_cases: () -> Array[Didit::Types::SandboxRiskCase]
8622
+ def sample_identity: () -> Didit::Types::SandboxSampleIdentity
8623
+ def delivery_conventions: () -> Didit::Types::SandboxDeliveryConventions
8624
+ def travel_rule: () -> Didit::Types::SandboxTestVasp
8625
+ end
8626
+
8627
+ class SandboxScenarioWarning < Didit::Model
8628
+ def risk: () -> String
8629
+ def feature: () -> String
8630
+ def input_field: () -> String
8631
+ def magic_value: () -> String
8632
+ end
8633
+
8467
8634
  class SandboxSimulateResponse < Didit::Model
8468
8635
  def session_id: () -> String
8469
8636
  def previous_status: () -> String
@@ -8473,6 +8640,33 @@ module Didit
8473
8640
  def send_webhooks: () -> bool
8474
8641
  end
8475
8642
 
8643
+ class SandboxTestVasp < Didit::Model
8644
+ def legal_name: () -> String
8645
+ def lei: () -> String
8646
+ def jurisdiction: () -> String
8647
+ def compliance_email: () -> String
8648
+ def travel_address: () -> String
8649
+ def network_codes: () -> Hash[String, String]
8650
+ def routes: () -> Array[String]
8651
+ def chain: () -> String
8652
+ def timeout_window_seconds: () -> Integer
8653
+ def default_scenario: () -> String
8654
+ def inbound_scenarios: () -> Array[String]
8655
+ def scenarios: () -> Array[Didit::Types::SandboxTestVaspScenario]
8656
+ end
8657
+
8658
+ class SandboxTestVaspScenario < Didit::Model
8659
+ def slug: () -> String
8660
+ def route: () -> String
8661
+ def title: () -> String
8662
+ def description: () -> String
8663
+ def beneficiary_name: () -> String
8664
+ def beneficiary_wallet_address: () -> String
8665
+ def chain: () -> String
8666
+ def travel_rule_status: () -> String
8667
+ def answers: () -> bool
8668
+ end
8669
+
8476
8670
  class SessionDecision < Didit::Model
8477
8671
  def session_id: () -> String?
8478
8672
  def session_kind: () -> String?
@@ -11029,6 +11223,7 @@ module Didit
11029
11223
  class TravelRuleSettingsDetail < Didit::Model
11030
11224
  def is_enabled: () -> bool?
11031
11225
  def jurisdiction: () -> String?
11226
+ def vasp_jurisdiction: () -> String?
11032
11227
  def name_matching_strictness: () -> String?
11033
11228
  def confirmation_timeout_hours: () -> Integer?
11034
11229
  def timeout_outcome: () -> String?
@@ -11150,6 +11345,8 @@ module Didit
11150
11345
  def originator_wallet_type: () -> String?
11151
11346
  def beneficiary_wallet_type: () -> String?
11152
11347
  def matched_transaction_id: () -> String?
11348
+ def scenario: () -> String?
11349
+ def webhooks_count: () -> Integer?
11153
11350
  def deadline_at: () -> Time?
11154
11351
  def created_at: () -> Time?
11155
11352
  end
@@ -176,7 +176,7 @@ module Didit
176
176
 
177
177
  type travel_rule_unmatched_deposits_match_params = { transaction_id: String }
178
178
 
179
- type travel_rule_update_settings_params = { ?is_enabled: bool, ?legal_name: String, ?lei: String, ?jurisdiction: String, ?name_matching_strictness: String, ?confirmation_timeout_hours: Integer, ?timeout_outcome: String, ?compliance_email: String, ?is_discoverable: bool, ?threshold_amount: String, ?ownership_validation_mode: String, ?simplified_validation_threshold: String, ?data_sharing_fields: Didit::Types::travel_rule_data_sharing_fields, ?matching_rules: Didit::Types::travel_rule_matching_rules, ?inbound_auto_accept: bool, ?allow_self_declaration: bool, ?allow_screenshot_proof: bool, ?auto_wallet_verification: bool, ?vasp_attribution_enabled: bool, ?counterparty_screening_enabled: bool, ?sunrise_policy: String, ?non_responsive_policy: String, ?disabled_networks: Array[String] }
179
+ type travel_rule_update_settings_params = { ?is_enabled: bool, ?legal_name: String, ?lei: String, ?jurisdiction: String, ?vasp_jurisdiction: String, ?name_matching_strictness: String, ?confirmation_timeout_hours: Integer, ?timeout_outcome: String, ?compliance_email: String, ?is_discoverable: bool, ?threshold_amount: String, ?ownership_validation_mode: String, ?simplified_validation_threshold: String, ?data_sharing_fields: Didit::Types::travel_rule_data_sharing_fields, ?matching_rules: Didit::Types::travel_rule_matching_rules, ?inbound_auto_accept: bool, ?allow_self_declaration: bool, ?allow_screenshot_proof: bool, ?auto_wallet_verification: bool, ?vasp_attribution_enabled: bool, ?counterparty_screening_enabled: bool, ?sunrise_policy: String, ?non_responsive_policy: String, ?disabled_networks: Array[String] }
180
180
 
181
181
  type travel_rule_update_vasp_decision_params = { decision: String, ?reason: String }
182
182
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: didit-sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.10.0
4
+ version: 2.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Didit
@@ -44,6 +44,7 @@ files:
44
44
  - lib/didit-sdk.rb
45
45
  - lib/didit.rb
46
46
  - lib/didit/authentication.rb
47
+ - lib/didit/authentication/agent_consent_request.rb
47
48
  - lib/didit/authentication/base64_url.rb
48
49
  - lib/didit/authentication/cache.rb
49
50
  - lib/didit/authentication/http.rb
@@ -103,6 +104,7 @@ files:
103
104
  - lib/didit/resources/questionnaires.rb
104
105
  - lib/didit/resources/regulatory_reports.rb
105
106
  - lib/didit/resources/report_templates.rb
107
+ - lib/didit/resources/sandbox.rb
106
108
  - lib/didit/resources/sessions.rb
107
109
  - lib/didit/resources/transactions.rb
108
110
  - lib/didit/resources/travel_rule.rb
@@ -162,6 +164,7 @@ files:
162
164
  - lib/didit/webhooks/verifier.rb
163
165
  - sig/didit.rbs
164
166
  - sig/didit/authentication.rbs
167
+ - sig/didit/authentication/agent_consent_request.rbs
165
168
  - sig/didit/authentication/base64_url.rbs
166
169
  - sig/didit/authentication/cache.rbs
167
170
  - sig/didit/authentication/http.rbs
@@ -215,6 +218,7 @@ files:
215
218
  - sig/didit/resources/questionnaires.rbs
216
219
  - sig/didit/resources/regulatory_reports.rbs
217
220
  - sig/didit/resources/report_templates.rbs
221
+ - sig/didit/resources/sandbox.rbs
218
222
  - sig/didit/resources/sessions.rbs
219
223
  - sig/didit/resources/transactions.rbs
220
224
  - sig/didit/resources/travel_rule.rbs