noresponse 2.1.15 → 3.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.
Files changed (27) hide show
  1. checksums.yaml +4 -4
  2. data/lib/no_response/accounts.rb +1 -1
  3. data/lib/no_response/assessments.rb +2 -2
  4. data/lib/no_response/late_results.rb +19 -15
  5. data/lib/no_response/models/shared/account.rb +1 -1
  6. data/lib/no_response/models/shared/accountdecisionsbyflow.rb +1 -1
  7. data/lib/no_response/models/shared/assessment.rb +41 -176
  8. data/lib/no_response/models/shared/assessment.rbi +10 -82
  9. data/lib/no_response/models/shared/assessmentdetail.rb +245 -0
  10. data/lib/no_response/models/shared/assessmentdetail.rbi +122 -0
  11. data/lib/no_response/models/shared/{assessmentauthcontext.rb → assessmentdetailauthcontext.rb} +1 -1
  12. data/lib/no_response/models/shared/{assessmentauthcontext.rbi → assessmentdetailauthcontext.rbi} +2 -2
  13. data/lib/no_response/models/shared/{assessmenttiming.rb → assessmentdetailtiming.rb} +1 -1
  14. data/lib/no_response/models/shared/{assessmenttiming.rbi → assessmentdetailtiming.rbi} +2 -2
  15. data/lib/no_response/models/shared/assessmentlist.rb +3 -3
  16. data/lib/no_response/models/shared/assessmentrequest.rb +15 -14
  17. data/lib/no_response/models/shared/assessmentrequest.rbi +4 -4
  18. data/lib/no_response/models/shared/assessmentrequestpolicycontext.rb +3 -16
  19. data/lib/no_response/models/shared/assessmentrequestpolicycontext.rbi +0 -6
  20. data/lib/no_response/models/shared/depth.rb +4 -1
  21. data/lib/no_response/models/shared/flow.rb +6 -4
  22. data/lib/no_response/models/shared.rb +3 -3
  23. data/lib/no_response/sdkconfiguration.rb +2 -2
  24. data/lib/no_response/webhooks.rb +1 -1
  25. metadata +7 -7
  26. data/lib/no_response/models/shared/assessmentflow.rb +0 -17
  27. data/lib/no_response/models/shared/assessmentflow.rbi +0 -9
@@ -0,0 +1,245 @@
1
+ # typed: true
2
+ # frozen_string_literal: true
3
+
4
+ module NoResponse
5
+ module Models
6
+ module Shared
7
+ # One assessment's own facts: its score and recommendation, the signals behind them, the lanes still running and its timing. risk here is this assessment's own score; the account's current risk is the account member of the assessment. risk and recommendation are present for complete and partial; assessment_url is present for pending.
8
+ class AssessmentDetail
9
+ extend T::Sig
10
+ include Crystalline::MetadataFields
11
+
12
+ # Opaque, server-assigned assessment id: 'asm_' and a 26-character Crockford base32 ULID. Unique within the tenant; another tenant's assessment id answers 404.
13
+ field(
14
+ :assessment_id,
15
+ ::String,
16
+ {'format_json': {'letter_case': ::NoResponse::Utils.field_name("assessment_id"), required: true}}
17
+ )
18
+ # Your own opaque identifier for the account being checked, scoped to your tenant. Use an id you mint, with no direct identifier (email, phone, name or national id) in it. '|' is accepted so an Auth0 user id such as 'auth0|64abc' passes unchanged; '@', '+', '$' and whitespace are refused by the pattern, as is an exact-shape JWT; a hex digest such as a SHA-256 is allowed, because hashing an internal id is a common pseudonymous scheme. A value such as '07700900123' or 'jane.doe.gmail.com' cannot be told apart from an opaque id. It travels in bodies, and in a URL only as the path segment of GET /v1/accounts/{account_id} and its /assessments. An assessment requested by a provider hook at pre_registration, which has no account yet, carries the server-issued account_id pre: followed by its assessment_id.
19
+ field(
20
+ :account_id,
21
+ ::String,
22
+ {'format_json': {'letter_case': ::NoResponse::Utils.field_name("account_id"), required: true}}
23
+ )
24
+ # complete: final; nothing is still running. A lane that failed or missed its 10 s deadline stays listed in incomplete_sources, and confidence is lower. partial: a recommendation exists and at least one lane is still running or did not settle (see incomplete_sources). pending: nothing usable before the deadline; no recommendation yet, poll or wait for the webhook.
25
+ field(
26
+ :status,
27
+ Models::Shared::Status,
28
+ {
29
+ 'format_json': {
30
+ 'letter_case': ::NoResponse::Utils.field_name("status"),
31
+ required: true,
32
+ 'decoder': ::NoResponse::Utils.open_enum_from_string(Models::Shared::Status, false)
33
+ }
34
+ }
35
+ )
36
+ # Ordinal confidence in the recommendation under the current policy: low, medium, high or unavailable.
37
+ field(
38
+ :confidence,
39
+ Models::Shared::Confidence,
40
+ {
41
+ 'format_json': {
42
+ 'letter_case': ::NoResponse::Utils.field_name("confidence"),
43
+ required: true,
44
+ 'decoder': ::NoResponse::Utils.open_enum_from_string(Models::Shared::Confidence, false)
45
+ }
46
+ }
47
+ )
48
+ # The lanes that did not settle, each listed once with a reason; lanes, not sources. In a detailed view a lane is listed exactly when one of its signals did not settle; a standard view carries no signals to match.
49
+ field(
50
+ :incomplete_sources,
51
+ Crystalline::Array.new(Models::Shared::IncompleteSource),
52
+ {'format_json': {'letter_case': ::NoResponse::Utils.field_name("incomplete_sources"), required: true}}
53
+ )
54
+ # Version of the hand-authored heuristic weights that produced the recommendation, for example 'risk-2026-10.7'. A tenant threshold override adds a +t<N> suffix, e.g. 'risk-2026-10.7+t3'.
55
+ field(
56
+ :policy_version,
57
+ ::String,
58
+ {'format_json': {'letter_case': ::NoResponse::Utils.field_name("policy_version"), required: true}}
59
+ )
60
+ # Monotonic revision of this assessment. 1 on the synchronous answer; each material change while the assessment is served (an async continuation settling a source, a change of recommendation, confidence or status) increments it. Expiry does not increment it: an expired assessment is gone, not revised, and the expiry webhook carries the last served version.
61
+ field(
62
+ :assessment_version,
63
+ ::Integer,
64
+ {'format_json': {'letter_case': ::NoResponse::Utils.field_name("assessment_version"), required: true}}
65
+ )
66
+ # When the assessment was created. Fixed for the life of the assessment: every revision carries the same created_at.
67
+ field(
68
+ :created_at,
69
+ ::String,
70
+ {'format_json': {'letter_case': ::NoResponse::Utils.field_name("created_at"), required: true}}
71
+ )
72
+
73
+ field(
74
+ :updated_at,
75
+ ::String,
76
+ {'format_json': {'letter_case': ::NoResponse::Utils.field_name("updated_at"), required: true}}
77
+ )
78
+ # After this instant the assessment is no longer served: GET /v1/assessments/{assessment_id} answers 404 and it leaves the account history. It is created_at plus your retention period at creation (default and maximum 365 days) and is fixed per record: a later revision keeps it, and a new assessment for the same account starts its own clock. If you later shorten retention, the effective expiry becomes created_at plus the shorter of the two periods.
79
+ field(
80
+ :expires_at,
81
+ ::String,
82
+ {'format_json': {'letter_case': ::NoResponse::Utils.field_name("expires_at"), required: true}}
83
+ )
84
+
85
+ field(
86
+ :timing,
87
+ Models::Shared::AssessmentDetailTiming,
88
+ {'format_json': {'letter_case': ::NoResponse::Utils.field_name("timing"), required: true}}
89
+ )
90
+ # Version of the body shape.
91
+ field(
92
+ :schema_version,
93
+ ::String,
94
+ {'format_json': {'letter_case': ::NoResponse::Utils.field_name("schema_version"), required: true}}
95
+ )
96
+ # An optional provider correlation id, echoed back. It is not an idempotency key. Refuses an exact-shape JWT or a bare 40, 64 or 128 character hex digest; a UUID is accepted.
97
+ field(
98
+ :request_id,
99
+ Crystalline::Nilable.new(::String),
100
+ {'format_json': {'letter_case': ::NoResponse::Utils.field_name("request_id")}}
101
+ )
102
+ # The recommended action: allow, step_up or review. Your application applies it.
103
+ field(
104
+ :recommendation,
105
+ Crystalline::Nilable.new(Models::Shared::Recommendation),
106
+ {
107
+ 'format_json': {
108
+ 'letter_case': ::NoResponse::Utils.field_name("recommendation"),
109
+ 'decoder': ::NoResponse::Utils.open_enum_from_string(Models::Shared::Recommendation, true)
110
+ }
111
+ }
112
+ )
113
+ # The one risk decision for this event. score is 0 (safe) to 100 (risky): the sum of the weights of the reasons that fired, clamped to 0 to 100, from hand-set versioned weights. Every answer with a recommendation carries it, and the top-level recommendation equals risk.recommendation. It names no source or provider.
114
+ field(
115
+ :risk,
116
+ Crystalline::Nilable.new(Models::Shared::Risk),
117
+ {'format_json': {'letter_case': ::NoResponse::Utils.field_name("risk")}}
118
+ )
119
+ # Detailed view only (response_mode=detailed, which needs the detailed scope): a standard answer omits signals[], and a detailed one always carries it, possibly empty. The body does not name its mode, so that rule is the serving gate's; the schema states the half it can: an answer with risk.details is a detailed view and carries signals[]. At most one signal per (type, source_id, identifier).
120
+ field(
121
+ :signals,
122
+ Crystalline::Nilable.new(Crystalline::Array.new(Models::Shared::Signal)),
123
+ {'format_json': {'letter_case': ::NoResponse::Utils.field_name("signals")}}
124
+ )
125
+ # Labels the v0 policy as hand-authored and not statistically validated.
126
+ field(
127
+ :policy_basis,
128
+ ::String,
129
+ {'format_json': {'letter_case': ::NoResponse::Utils.field_name("policy_basis"), required: true}}
130
+ )
131
+ # Server-relative path of the authoritative assessment, GET /v1/assessments/{assessment_id}.
132
+ field(
133
+ :assessment_url,
134
+ Crystalline::Nilable.new(::String),
135
+ {'format_json': {'letter_case': ::NoResponse::Utils.field_name("assessment_url")}}
136
+ )
137
+ # The identity fields of the auth context the assessment was made with, echoed for the tenant's own correlation: the request's auth_context, or the one a hosted provider hook (POST /hooks/{integration_id}) built, with transport provider_hook and its hook_point. Present exactly when the request carried an auth_context, and the same on every revision of the assessment. Values are as the request or the hook sent them; tokens, timestamps, roles and scopes are not echoed, and the echo does not change the score.
138
+ field(
139
+ :auth_context,
140
+ Crystalline::Nilable.new(Models::Shared::AssessmentDetailAuthContext),
141
+ {'format_json': {'letter_case': ::NoResponse::Utils.field_name("auth_context")}}
142
+ )
143
+
144
+ sig {
145
+ params(
146
+ assessment_id: ::String,
147
+ account_id: ::String,
148
+ status: Models::Shared::Status,
149
+ confidence: Models::Shared::Confidence,
150
+ incomplete_sources: T::Array[Models::Shared::IncompleteSource],
151
+ policy_version: ::String,
152
+ assessment_version: ::Integer,
153
+ created_at: ::String,
154
+ updated_at: ::String,
155
+ expires_at: ::String,
156
+ timing: Models::Shared::AssessmentDetailTiming,
157
+ schema_version: ::String,
158
+ request_id: T.nilable(::String),
159
+ recommendation: T.nilable(Models::Shared::Recommendation),
160
+ risk: T.nilable(Models::Shared::Risk),
161
+ signals: T.nilable(T::Array[Models::Shared::Signal]),
162
+ policy_basis: ::String,
163
+ assessment_url: T.nilable(::String),
164
+ auth_context: T.nilable(Models::Shared::AssessmentDetailAuthContext)
165
+ )
166
+ .void
167
+ }
168
+ def initialize(
169
+ assessment_id:,
170
+ account_id:,
171
+ status:,
172
+ confidence:,
173
+ incomplete_sources:,
174
+ policy_version:,
175
+ assessment_version:,
176
+ created_at:,
177
+ updated_at:,
178
+ expires_at:,
179
+ timing:,
180
+ schema_version: "1",
181
+ request_id: nil,
182
+ recommendation: nil,
183
+ risk: nil,
184
+ signals: nil,
185
+ policy_basis: "heuristic_unvalidated",
186
+ assessment_url: nil,
187
+ auth_context: nil
188
+ )
189
+ @assessment_id = assessment_id
190
+ @account_id = account_id
191
+ @status = status
192
+ @confidence = confidence
193
+ @incomplete_sources = incomplete_sources
194
+ @policy_version = policy_version
195
+ @assessment_version = assessment_version
196
+ @created_at = created_at
197
+ @updated_at = updated_at
198
+ @expires_at = expires_at
199
+ @timing = timing
200
+ unless schema_version == "1"
201
+ raise ArgumentError, "Invalid value for schema_version"
202
+ end
203
+
204
+ @schema_version = "1"
205
+ @request_id = request_id
206
+ @recommendation = recommendation
207
+ @risk = risk
208
+ @signals = signals
209
+ unless policy_basis == "heuristic_unvalidated"
210
+ raise ArgumentError, "Invalid value for policy_basis"
211
+ end
212
+
213
+ @policy_basis = "heuristic_unvalidated"
214
+ @assessment_url = assessment_url
215
+ @auth_context = auth_context
216
+ end
217
+
218
+ sig { params(other: T.untyped).returns(T::Boolean) }
219
+ def ==(other)
220
+ return false unless other.is_a?(self.class)
221
+ return false unless @assessment_id == other.assessment_id
222
+ return false unless @account_id == other.account_id
223
+ return false unless @status == other.status
224
+ return false unless @confidence == other.confidence
225
+ return false unless @incomplete_sources == other.incomplete_sources
226
+ return false unless @policy_version == other.policy_version
227
+ return false unless @assessment_version == other.assessment_version
228
+ return false unless @created_at == other.created_at
229
+ return false unless @updated_at == other.updated_at
230
+ return false unless @expires_at == other.expires_at
231
+ return false unless @timing == other.timing
232
+ return false unless @schema_version == other.schema_version
233
+ return false unless @request_id == other.request_id
234
+ return false unless @recommendation == other.recommendation
235
+ return false unless @risk == other.risk
236
+ return false unless @signals == other.signals
237
+ return false unless @policy_basis == other.policy_basis
238
+ return false unless @assessment_url == other.assessment_url
239
+ return false unless @auth_context == other.auth_context
240
+ true
241
+ end
242
+ end
243
+ end
244
+ end
245
+ end
@@ -0,0 +1,122 @@
1
+ # typed: true
2
+ # frozen_string_literal: true
3
+
4
+ class NoResponse::Models::Shared::AssessmentDetail
5
+ extend ::Crystalline::MetadataFields::ClassMethods
6
+ end
7
+
8
+ class NoResponse::Models::Shared::AssessmentDetail
9
+ def assessment_id
10
+ end
11
+
12
+ def assessment_id=(str_)
13
+ end
14
+
15
+ def account_id
16
+ end
17
+
18
+ def account_id=(str_)
19
+ end
20
+
21
+ def status
22
+ end
23
+
24
+ def status=(str_)
25
+ end
26
+
27
+ def confidence
28
+ end
29
+
30
+ def confidence=(str_)
31
+ end
32
+
33
+ def incomplete_sources
34
+ end
35
+
36
+ def incomplete_sources=(str_)
37
+ end
38
+
39
+ def policy_version
40
+ end
41
+
42
+ def policy_version=(str_)
43
+ end
44
+
45
+ def assessment_version
46
+ end
47
+
48
+ def assessment_version=(str_)
49
+ end
50
+
51
+ def created_at
52
+ end
53
+
54
+ def created_at=(str_)
55
+ end
56
+
57
+ def updated_at
58
+ end
59
+
60
+ def updated_at=(str_)
61
+ end
62
+
63
+ def expires_at
64
+ end
65
+
66
+ def expires_at=(str_)
67
+ end
68
+
69
+ def timing
70
+ end
71
+
72
+ def timing=(str_)
73
+ end
74
+
75
+ def schema_version
76
+ end
77
+
78
+ def schema_version=(str_)
79
+ end
80
+
81
+ def request_id
82
+ end
83
+
84
+ def request_id=(str_)
85
+ end
86
+
87
+ def recommendation
88
+ end
89
+
90
+ def recommendation=(str_)
91
+ end
92
+
93
+ def risk
94
+ end
95
+
96
+ def risk=(str_)
97
+ end
98
+
99
+ def signals
100
+ end
101
+
102
+ def signals=(str_)
103
+ end
104
+
105
+ def policy_basis
106
+ end
107
+
108
+ def policy_basis=(str_)
109
+ end
110
+
111
+ def assessment_url
112
+ end
113
+
114
+ def assessment_url=(str_)
115
+ end
116
+
117
+ def auth_context
118
+ end
119
+
120
+ def auth_context=(str_)
121
+ end
122
+ end
@@ -5,7 +5,7 @@ module NoResponse
5
5
  module Models
6
6
  module Shared
7
7
  # The identity fields of the auth context the assessment was made with, echoed for the tenant's own correlation: the request's auth_context, or the one a hosted provider hook (POST /hooks/{integration_id}) built, with transport provider_hook and its hook_point. Present exactly when the request carried an auth_context, and the same on every revision of the assessment. Values are as the request or the hook sent them; tokens, timestamps, roles and scopes are not echoed, and the echo does not change the score.
8
- class AssessmentAuthContext
8
+ class AssessmentDetailAuthContext
9
9
  extend T::Sig
10
10
  include Crystalline::MetadataFields
11
11
 
@@ -1,11 +1,11 @@
1
1
  # typed: true
2
2
  # frozen_string_literal: true
3
3
 
4
- class NoResponse::Models::Shared::AssessmentAuthContext
4
+ class NoResponse::Models::Shared::AssessmentDetailAuthContext
5
5
  extend ::Crystalline::MetadataFields::ClassMethods
6
6
  end
7
7
 
8
- class NoResponse::Models::Shared::AssessmentAuthContext
8
+ class NoResponse::Models::Shared::AssessmentDetailAuthContext
9
9
  def provider
10
10
  end
11
11
 
@@ -5,7 +5,7 @@ module NoResponse
5
5
  module Models
6
6
  module Shared
7
7
 
8
- class AssessmentTiming
8
+ class AssessmentDetailTiming
9
9
  extend T::Sig
10
10
  include Crystalline::MetadataFields
11
11
 
@@ -1,11 +1,11 @@
1
1
  # typed: true
2
2
  # frozen_string_literal: true
3
3
 
4
- class NoResponse::Models::Shared::AssessmentTiming
4
+ class NoResponse::Models::Shared::AssessmentDetailTiming
5
5
  extend ::Crystalline::MetadataFields::ClassMethods
6
6
  end
7
7
 
8
- class NoResponse::Models::Shared::AssessmentTiming
8
+ class NoResponse::Models::Shared::AssessmentDetailTiming
9
9
  def deadline_ms
10
10
  end
11
11
 
@@ -4,7 +4,7 @@
4
4
  module NoResponse
5
5
  module Models
6
6
  module Shared
7
- # Body of the 200 answer to POST /v1/assessments/query: one page of the calling tenant's unexpired assessments for one account, newest first, each at its latest assessment_version. Every item's account_id equals the page's. An assessment past its expires_at is not listed. next_cursor is present only when another page exists.
7
+ # Body of the 200 answer to POST /v1/assessments/query: one page of the calling tenant's unexpired assessments for one account, newest first, each at its latest assessment_version, as its detail; the account's current risk is GET /v1/accounts/{account_id}. Every item's account_id equals the page's. An assessment past its expires_at is not listed. next_cursor is present only when another page exists.
8
8
  class AssessmentList
9
9
  extend T::Sig
10
10
  include Crystalline::MetadataFields
@@ -18,7 +18,7 @@ module NoResponse
18
18
 
19
19
  field(
20
20
  :items,
21
- Crystalline::Array.new(Models::Shared::Assessment),
21
+ Crystalline::Array.new(Models::Shared::AssessmentDetail),
22
22
  {'format_json': {'letter_case': ::NoResponse::Utils.field_name("items"), required: true}}
23
23
  )
24
24
  # Version of the body shape.
@@ -43,7 +43,7 @@ module NoResponse
43
43
  sig {
44
44
  params(
45
45
  account_id: ::String,
46
- items: T::Array[Models::Shared::Assessment],
46
+ items: T::Array[Models::Shared::AssessmentDetail],
47
47
  schema_version: ::String,
48
48
  next_cursor: T.nilable(::String),
49
49
  retention_days: T.nilable(::Integer)
@@ -15,23 +15,24 @@ module NoResponse
15
15
  ::String,
16
16
  {'format_json': {'letter_case': ::NoResponse::Utils.field_name("account_id"), required: true}}
17
17
  )
18
- # At least one of email, username or phone. name and ip refine the match and travel beside a lookup identifier; a body with only name or ip is refused with 400.
19
- field(
20
- :identifiers,
21
- Models::Shared::AssessmentRequestIdentifiers,
22
- {'format_json': {'letter_case': ::NoResponse::Utils.field_name("identifiers"), required: true}}
23
- )
24
18
  # The customer event an assessment is made for: signup (a new account), login (a returning sign-in) or purchase (a payment or credit grant). The account's risk is reported with the decision for this flow.
25
19
  field(
26
20
  :flow,
27
- Crystalline::Nilable.new(Models::Shared::AssessmentFlow),
21
+ Models::Shared::Flow,
28
22
  {
29
23
  'format_json': {
30
24
  'letter_case': ::NoResponse::Utils.field_name("flow"),
31
- 'decoder': ::NoResponse::Utils.enum_from_string(Models::Shared::AssessmentFlow, true)
25
+ required: true,
26
+ 'decoder': ::NoResponse::Utils.open_enum_from_string(Models::Shared::Flow, false)
32
27
  }
33
28
  }
34
29
  )
30
+ # At least one of email, username or phone. name and ip refine the match and travel beside a lookup identifier; a body with only name or ip is refused with 400.
31
+ field(
32
+ :identifiers,
33
+ Models::Shared::AssessmentRequestIdentifiers,
34
+ {'format_json': {'letter_case': ::NoResponse::Utils.field_name("identifiers"), required: true}}
35
+ )
35
36
  # How long the synchronous answer waits for sources. quick waits only for the fast sources, those that answer within 500 ms of ingress (or deadline_ms when lower); full waits for the whole budget, up to 3000 ms. Sources still running at the cut continue asynchronously and update the assessment either way.
36
37
  field(
37
38
  :depth,
@@ -39,11 +40,11 @@ module NoResponse
39
40
  {
40
41
  'format_json': {
41
42
  'letter_case': ::NoResponse::Utils.field_name("depth"),
42
- 'decoder': ::NoResponse::Utils.enum_from_string(Models::Shared::Depth, true)
43
+ 'decoder': ::NoResponse::Utils.open_enum_from_string(Models::Shared::Depth, true)
43
44
  }
44
45
  }
45
46
  )
46
-
47
+ # Optional policy inputs: region.
47
48
  field(
48
49
  :policy_context,
49
50
  Crystalline::Nilable.new(Models::Shared::AssessmentRequestPolicyContext),
@@ -94,8 +95,8 @@ module NoResponse
94
95
  sig {
95
96
  params(
96
97
  account_id: ::String,
98
+ flow: Models::Shared::Flow,
97
99
  identifiers: Models::Shared::AssessmentRequestIdentifiers,
98
- flow: T.nilable(Models::Shared::AssessmentFlow),
99
100
  depth: T.nilable(Models::Shared::Depth),
100
101
  policy_context: T.nilable(Models::Shared::AssessmentRequestPolicyContext),
101
102
  request_id: T.nilable(::String),
@@ -109,8 +110,8 @@ module NoResponse
109
110
  }
110
111
  def initialize(
111
112
  account_id:,
113
+ flow:,
112
114
  identifiers:,
113
- flow: nil,
114
115
  depth: nil,
115
116
  policy_context: nil,
116
117
  request_id: nil,
@@ -121,8 +122,8 @@ module NoResponse
121
122
  issued_credential: nil
122
123
  )
123
124
  @account_id = account_id
124
- @identifiers = identifiers
125
125
  @flow = flow
126
+ @identifiers = identifiers
126
127
  @depth = depth
127
128
  @policy_context = policy_context
128
129
  @request_id = request_id
@@ -137,8 +138,8 @@ module NoResponse
137
138
  def ==(other)
138
139
  return false unless other.is_a?(self.class)
139
140
  return false unless @account_id == other.account_id
140
- return false unless @identifiers == other.identifiers
141
141
  return false unless @flow == other.flow
142
+ return false unless @identifiers == other.identifiers
142
143
  return false unless @depth == other.depth
143
144
  return false unless @policy_context == other.policy_context
144
145
  return false unless @request_id == other.request_id
@@ -12,16 +12,16 @@ class NoResponse::Models::Shared::AssessmentRequest
12
12
  def account_id=(str_)
13
13
  end
14
14
 
15
- def identifiers
15
+ def flow
16
16
  end
17
17
 
18
- def identifiers=(str_)
18
+ def flow=(str_)
19
19
  end
20
20
 
21
- def flow
21
+ def identifiers
22
22
  end
23
23
 
24
- def flow=(str_)
24
+ def identifiers=(str_)
25
25
  end
26
26
 
27
27
  def depth
@@ -4,22 +4,11 @@
4
4
  module NoResponse
5
5
  module Models
6
6
  module Shared
7
-
7
+ # Optional policy inputs: region.
8
8
  class AssessmentRequestPolicyContext
9
9
  extend T::Sig
10
10
  include Crystalline::MetadataFields
11
11
 
12
- # The provider flow the assessment gates. Use the top-level flow instead; this member is ignored when the top-level flow is present. Absent means signup.
13
- field(
14
- :flow,
15
- Crystalline::Nilable.new(Models::Shared::Flow),
16
- {
17
- 'format_json': {
18
- 'letter_case': ::NoResponse::Utils.field_name("flow"),
19
- 'decoder': ::NoResponse::Utils.enum_from_string(Models::Shared::Flow, true)
20
- }
21
- }
22
- )
23
12
  # ISO 3166-1 alpha-2 region of the signup, as the provider determines it.
24
13
  field(
25
14
  :region,
@@ -27,16 +16,14 @@ module NoResponse
27
16
  {'format_json': {'letter_case': ::NoResponse::Utils.field_name("region")}}
28
17
  )
29
18
 
30
- sig { params(flow: T.nilable(Models::Shared::Flow), region: T.nilable(::String)).void }
31
- def initialize(flow: nil, region: nil)
32
- @flow = flow
19
+ sig { params(region: T.nilable(::String)).void }
20
+ def initialize(region: nil)
33
21
  @region = region
34
22
  end
35
23
 
36
24
  sig { params(other: T.untyped).returns(T::Boolean) }
37
25
  def ==(other)
38
26
  return false unless other.is_a?(self.class)
39
- return false unless @flow == other.flow
40
27
  return false unless @region == other.region
41
28
  true
42
29
  end
@@ -6,12 +6,6 @@ class NoResponse::Models::Shared::AssessmentRequestPolicyContext
6
6
  end
7
7
 
8
8
  class NoResponse::Models::Shared::AssessmentRequestPolicyContext
9
- def flow
10
- end
11
-
12
- def flow=(str_)
13
- end
14
-
15
9
  def region
16
10
  end
17
11
 
@@ -5,11 +5,14 @@ module NoResponse
5
5
  module Models
6
6
  module Shared
7
7
  # Depth - How long the synchronous answer waits for sources. quick waits only for the fast sources, those that answer within 500 ms of ingress (or deadline_ms when lower); full waits for the whole budget, up to 3000 ms. Sources still running at the cut continue asynchronously and update the assessment either way.
8
- class Depth < T::Enum
8
+ class Depth
9
+ include ::Crystalline::Enum
9
10
  enums do
10
11
  QUICK = new("quick")
11
12
  FULL = new("full")
12
13
  end
14
+
15
+ open!
13
16
  end
14
17
  end
15
18
  end
@@ -4,14 +4,16 @@
4
4
  module NoResponse
5
5
  module Models
6
6
  module Shared
7
- # Flow - The provider flow the assessment gates. Use the top-level flow instead; this member is ignored when the top-level flow is present. Absent means signup.
8
- class Flow < T::Enum
7
+ # Flow - The customer event an assessment is made for: signup (a new account), login (a returning sign-in) or purchase (a payment or credit grant). The account's risk is reported with the decision for this flow.
8
+ class Flow
9
+ include ::Crystalline::Enum
9
10
  enums do
10
11
  SIGNUP = new("signup")
11
12
  LOGIN = new("login")
12
- RECOVERY = new("recovery")
13
- PROFILE_CHANGE = new("profile_change")
13
+ PURCHASE = new("purchase")
14
14
  end
15
+
16
+ open!
15
17
  end
16
18
  end
17
19
  end
@@ -11,10 +11,11 @@ module NoResponse
11
11
  autoload :AccountRisk, "no_response/models/shared/accountrisk.rb"
12
12
  autoload :AccountRiskReason, "no_response/models/shared/accountriskreason.rb"
13
13
  autoload :Assessment, "no_response/models/shared/assessment.rb"
14
- autoload :AssessmentAuthContext, "no_response/models/shared/assessmentauthcontext.rb"
15
14
  autoload :AssessmentDeletion, "no_response/models/shared/assessmentdeletion.rb"
16
15
  autoload :AssessmentDeletionAccount, "no_response/models/shared/assessmentdeletionaccount.rb"
17
- autoload :AssessmentFlow, "no_response/models/shared/assessmentflow.rb"
16
+ autoload :AssessmentDetail, "no_response/models/shared/assessmentdetail.rb"
17
+ autoload :AssessmentDetailAuthContext, "no_response/models/shared/assessmentdetailauthcontext.rb"
18
+ autoload :AssessmentDetailTiming, "no_response/models/shared/assessmentdetailtiming.rb"
18
19
  autoload :AssessmentList, "no_response/models/shared/assessmentlist.rb"
19
20
  autoload :AssessmentOutcome, "no_response/models/shared/assessmentoutcome.rb"
20
21
  autoload :AssessmentOutcomeRequest, "no_response/models/shared/assessmentoutcomerequest.rb"
@@ -24,7 +25,6 @@ module NoResponse
24
25
  autoload :AssessmentRequestIdentifiers, "no_response/models/shared/assessmentrequestidentifiers.rb"
25
26
  autoload :AssessmentRequestIssuedCredential, "no_response/models/shared/assessmentrequestissuedcredential.rb"
26
27
  autoload :AssessmentRequestPolicyContext, "no_response/models/shared/assessmentrequestpolicycontext.rb"
27
- autoload :AssessmentTiming, "no_response/models/shared/assessmenttiming.rb"
28
28
  autoload :AssuranceLevel, "no_response/models/shared/assurancelevel.rb"
29
29
  autoload :AuthContext, "no_response/models/shared/authcontext.rb"
30
30
  autoload :AuthContextMfa, "no_response/models/shared/authcontextmfa.rb"