noresponse 2.1.14 → 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 (36) hide show
  1. checksums.yaml +4 -4
  2. data/lib/no_response/accounts.rb +1 -1
  3. data/lib/no_response/assessments.rb +290 -2
  4. data/lib/no_response/late_results.rb +19 -15
  5. data/lib/no_response/models/operations/deleteassessment_request.rb +33 -0
  6. data/lib/no_response/models/operations/deleteassessment_request.rbi +14 -0
  7. data/lib/no_response/models/operations/deleteassessment_response.rb +32 -0
  8. data/lib/no_response/models/operations/deleteassessment_response.rbi +20 -0
  9. data/lib/no_response/models/operations.rb +2 -0
  10. data/lib/no_response/models/shared/account.rb +1 -1
  11. data/lib/no_response/models/shared/accountdecisionsbyflow.rb +1 -1
  12. data/lib/no_response/models/shared/assessment.rb +41 -176
  13. data/lib/no_response/models/shared/assessment.rbi +10 -82
  14. data/lib/no_response/models/shared/assessmentdeletion.rb +78 -0
  15. data/lib/no_response/models/shared/assessmentdeletion.rbi +38 -0
  16. data/lib/no_response/models/shared/assessmentdeletionaccount.rb +37 -0
  17. data/lib/no_response/models/shared/assessmentdeletionaccount.rbi +20 -0
  18. data/lib/no_response/models/shared/assessmentdetail.rb +245 -0
  19. data/lib/no_response/models/shared/assessmentdetail.rbi +122 -0
  20. data/lib/no_response/models/shared/{assessmentauthcontext.rb → assessmentdetailauthcontext.rb} +1 -1
  21. data/lib/no_response/models/shared/{assessmentauthcontext.rbi → assessmentdetailauthcontext.rbi} +2 -2
  22. data/lib/no_response/models/shared/{assessmenttiming.rb → assessmentdetailtiming.rb} +1 -1
  23. data/lib/no_response/models/shared/{assessmenttiming.rbi → assessmentdetailtiming.rbi} +2 -2
  24. data/lib/no_response/models/shared/assessmentlist.rb +3 -3
  25. data/lib/no_response/models/shared/assessmentrequest.rb +15 -14
  26. data/lib/no_response/models/shared/assessmentrequest.rbi +4 -4
  27. data/lib/no_response/models/shared/assessmentrequestpolicycontext.rb +3 -16
  28. data/lib/no_response/models/shared/assessmentrequestpolicycontext.rbi +0 -6
  29. data/lib/no_response/models/shared/depth.rb +4 -1
  30. data/lib/no_response/models/shared/flow.rb +6 -4
  31. data/lib/no_response/models/shared.rb +5 -3
  32. data/lib/no_response/sdkconfiguration.rb +2 -2
  33. data/lib/no_response/webhooks.rb +1 -1
  34. metadata +15 -7
  35. data/lib/no_response/models/shared/assessmentflow.rb +0 -17
  36. data/lib/no_response/models/shared/assessmentflow.rbi +0 -9
@@ -4,23 +4,13 @@
4
4
  module NoResponse
5
5
  module Models
6
6
  module Shared
7
- # One assessment of one account, as POST /v1/assessments, GET /v1/assessments/{assessment_id} and the assessment.updated webhook return it. status says whether it is final (complete), usable with a source still running (partial) or not yet usable (pending). risk and recommendation are present for complete and partial; assessment_url is present for pending. Keep the highest assessment_version.
7
+ # One assessment, as POST /v1/assessments, GET /v1/assessments/{assessment_id} and the assessment.updated webhook return it. account is the account's one current risk: its score, the decision for this assessment's flow, the reasons and the decision for each flow. detail holds this assessment's own facts. status says whether the assessment is final (complete), usable with a source still running (partial) or not yet usable (pending). While the account's first assessment is pending, account is absent; wait for the webhook or poll the assessment. Keep the highest detail.assessment_version.
8
8
  class Assessment
9
9
  extend T::Sig
10
10
  include Crystalline::MetadataFields
11
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
- )
12
+ # This assessment's id, equal to detail.assessment_id.
13
+ field :id, ::String, {'format_json': {'letter_case': ::NoResponse::Utils.field_name("id"), required: true}}
24
14
  # 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
15
  field(
26
16
  :status,
@@ -33,210 +23,85 @@ module NoResponse
33
23
  }
34
24
  }
35
25
  )
36
- # Ordinal confidence in the recommendation under the current policy: low, medium, high or unavailable.
26
+ # 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.
37
27
  field(
38
- :confidence,
39
- Models::Shared::Confidence,
28
+ :flow,
29
+ Models::Shared::Flow,
40
30
  {
41
31
  'format_json': {
42
- 'letter_case': ::NoResponse::Utils.field_name("confidence"),
32
+ 'letter_case': ::NoResponse::Utils.field_name("flow"),
43
33
  required: true,
44
- 'decoder': ::NoResponse::Utils.open_enum_from_string(Models::Shared::Confidence, false)
34
+ 'decoder': ::NoResponse::Utils.open_enum_from_string(Models::Shared::Flow, false)
45
35
  }
46
36
  }
47
37
  )
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.
38
+ # 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.
49
39
  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::AssessmentTiming,
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),
40
+ :depth,
41
+ Models::Shared::Depth,
106
42
  {
107
43
  'format_json': {
108
- 'letter_case': ::NoResponse::Utils.field_name("recommendation"),
109
- 'decoder': ::NoResponse::Utils.open_enum_from_string(Models::Shared::Recommendation, true)
44
+ 'letter_case': ::NoResponse::Utils.field_name("depth"),
45
+ required: true,
46
+ 'decoder': ::NoResponse::Utils.open_enum_from_string(Models::Shared::Depth, false)
110
47
  }
111
48
  }
112
49
  )
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).
50
+ # 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.
120
51
  field(
121
- :signals,
122
- Crystalline::Nilable.new(Crystalline::Array.new(Models::Shared::Signal)),
123
- {'format_json': {'letter_case': ::NoResponse::Utils.field_name("signals")}}
52
+ :detail,
53
+ Models::Shared::AssessmentDetail,
54
+ {'format_json': {'letter_case': ::NoResponse::Utils.field_name("detail"), required: true}}
124
55
  )
125
- # Labels the v0 policy as hand-authored and not statistically validated.
56
+ # Version of the body shape.
126
57
  field(
127
- :policy_basis,
58
+ :schema_version,
128
59
  ::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")}}
60
+ {'format_json': {'letter_case': ::NoResponse::Utils.field_name("schema_version"), required: true}}
136
61
  )
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.
62
+ # Body of the 200 answer to GET /v1/accounts/{account_id}: the one current risk of one of the calling tenant's accounts. It is the risk of the account's latest assessment that has a decision (status complete or partial), by created_at and then assessment_id, scored exactly as GET /v1/assessments/{assessment_id} scores that assessment. Its assessments are the account's history (GET /v1/accounts/{account_id}/assessments).
138
63
  field(
139
- :auth_context,
140
- Crystalline::Nilable.new(Models::Shared::AssessmentAuthContext),
141
- {'format_json': {'letter_case': ::NoResponse::Utils.field_name("auth_context")}}
64
+ :account,
65
+ Crystalline::Nilable.new(Models::Shared::Account),
66
+ {'format_json': {'letter_case': ::NoResponse::Utils.field_name("account")}}
142
67
  )
143
68
 
144
69
  sig {
145
70
  params(
146
- assessment_id: ::String,
147
- account_id: ::String,
71
+ id: ::String,
148
72
  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::AssessmentTiming,
73
+ flow: Models::Shared::Flow,
74
+ depth: Models::Shared::Depth,
75
+ detail: Models::Shared::AssessmentDetail,
157
76
  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::AssessmentAuthContext)
77
+ account: T.nilable(Models::Shared::Account)
165
78
  )
166
79
  .void
167
80
  }
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
81
+ def initialize(id:, status:, flow:, depth:, detail:, schema_version: "1", account: nil)
82
+ @id = id
191
83
  @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
84
+ @flow = flow
85
+ @depth = depth
86
+ @detail = detail
200
87
  unless schema_version == "1"
201
88
  raise ArgumentError, "Invalid value for schema_version"
202
89
  end
203
90
 
204
91
  @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
92
+ @account = account
216
93
  end
217
94
 
218
95
  sig { params(other: T.untyped).returns(T::Boolean) }
219
96
  def ==(other)
220
97
  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
98
+ return false unless @id == other.id
223
99
  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
100
+ return false unless @flow == other.flow
101
+ return false unless @depth == other.depth
102
+ return false unless @detail == other.detail
232
103
  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
104
+ return false unless @account == other.account
240
105
  true
241
106
  end
242
107
  end
@@ -6,16 +6,10 @@ class NoResponse::Models::Shared::Assessment
6
6
  end
7
7
 
8
8
  class NoResponse::Models::Shared::Assessment
9
- def assessment_id
9
+ def id
10
10
  end
11
11
 
12
- def assessment_id=(str_)
13
- end
14
-
15
- def account_id
16
- end
17
-
18
- def account_id=(str_)
12
+ def id=(str_)
19
13
  end
20
14
 
21
15
  def status
@@ -24,52 +18,22 @@ class NoResponse::Models::Shared::Assessment
24
18
  def status=(str_)
25
19
  end
26
20
 
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
21
+ def flow
58
22
  end
59
23
 
60
- def updated_at=(str_)
24
+ def flow=(str_)
61
25
  end
62
26
 
63
- def expires_at
27
+ def depth
64
28
  end
65
29
 
66
- def expires_at=(str_)
30
+ def depth=(str_)
67
31
  end
68
32
 
69
- def timing
33
+ def detail
70
34
  end
71
35
 
72
- def timing=(str_)
36
+ def detail=(str_)
73
37
  end
74
38
 
75
39
  def schema_version
@@ -78,45 +42,9 @@ class NoResponse::Models::Shared::Assessment
78
42
  def schema_version=(str_)
79
43
  end
80
44
 
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
45
+ def account
118
46
  end
119
47
 
120
- def auth_context=(str_)
48
+ def account=(str_)
121
49
  end
122
50
  end
@@ -0,0 +1,78 @@
1
+ # typed: true
2
+ # frozen_string_literal: true
3
+
4
+ module NoResponse
5
+ module Models
6
+ module Shared
7
+ # Body of the 200 answer to DELETE /v1/assessments/{assessment_id}: one of the calling tenant's assessments was deleted, with its versions, evidence, outcomes and the identity-graph marks its outcomes set. Afterwards GET /v1/assessments/{assessment_id} answers 404 and the assessment leaves the account's history. The account is scored again from what remains: account.current_assessment_id names the assessment GET /v1/accounts/{account_id} now serves its risk from, and is absent when the account has no assessment with a decision left. Deleting an assessment that is already gone answers 404.
8
+ class AssessmentDeletion
9
+ extend T::Sig
10
+ include Crystalline::MetadataFields
11
+
12
+ # The assessment that was deleted.
13
+ field :id, ::String, {'format_json': {'letter_case': ::NoResponse::Utils.field_name("id"), required: true}}
14
+
15
+ field(
16
+ :account,
17
+ Models::Shared::AssessmentDeletionAccount,
18
+ {'format_json': {'letter_case': ::NoResponse::Utils.field_name("account"), required: true}}
19
+ )
20
+ # When the deletion took effect.
21
+ field(
22
+ :deleted_at,
23
+ ::String,
24
+ {'format_json': {'letter_case': ::NoResponse::Utils.field_name("deleted_at"), required: true}}
25
+ )
26
+ # Version of the body shape.
27
+ field(
28
+ :schema_version,
29
+ ::String,
30
+ {'format_json': {'letter_case': ::NoResponse::Utils.field_name("schema_version"), required: true}}
31
+ )
32
+
33
+ field(
34
+ :deleted,
35
+ Crystalline::Boolean.new,
36
+ {'format_json': {'letter_case': ::NoResponse::Utils.field_name("deleted"), required: true}}
37
+ )
38
+
39
+ sig {
40
+ params(
41
+ id: ::String,
42
+ account: Models::Shared::AssessmentDeletionAccount,
43
+ deleted_at: ::String,
44
+ schema_version: ::String,
45
+ deleted: T::Boolean
46
+ )
47
+ .void
48
+ }
49
+ def initialize(id:, account:, deleted_at:, schema_version: "1", deleted: true)
50
+ @id = id
51
+ @account = account
52
+ @deleted_at = deleted_at
53
+ unless schema_version == "1"
54
+ raise ArgumentError, "Invalid value for schema_version"
55
+ end
56
+
57
+ @schema_version = "1"
58
+ unless deleted == true
59
+ raise ArgumentError, "Invalid value for deleted"
60
+ end
61
+
62
+ @deleted = true
63
+ end
64
+
65
+ sig { params(other: T.untyped).returns(T::Boolean) }
66
+ def ==(other)
67
+ return false unless other.is_a?(self.class)
68
+ return false unless @id == other.id
69
+ return false unless @account == other.account
70
+ return false unless @deleted_at == other.deleted_at
71
+ return false unless @schema_version == other.schema_version
72
+ return false unless @deleted == other.deleted
73
+ true
74
+ end
75
+ end
76
+ end
77
+ end
78
+ end
@@ -0,0 +1,38 @@
1
+ # typed: true
2
+ # frozen_string_literal: true
3
+
4
+ class NoResponse::Models::Shared::AssessmentDeletion
5
+ extend ::Crystalline::MetadataFields::ClassMethods
6
+ end
7
+
8
+ class NoResponse::Models::Shared::AssessmentDeletion
9
+ def id
10
+ end
11
+
12
+ def id=(str_)
13
+ end
14
+
15
+ def account
16
+ end
17
+
18
+ def account=(str_)
19
+ end
20
+
21
+ def deleted_at
22
+ end
23
+
24
+ def deleted_at=(str_)
25
+ end
26
+
27
+ def schema_version
28
+ end
29
+
30
+ def schema_version=(str_)
31
+ end
32
+
33
+ def deleted
34
+ end
35
+
36
+ def deleted=(str_)
37
+ end
38
+ end
@@ -0,0 +1,37 @@
1
+ # typed: true
2
+ # frozen_string_literal: true
3
+
4
+ module NoResponse
5
+ module Models
6
+ module Shared
7
+
8
+ class AssessmentDeletionAccount
9
+ extend T::Sig
10
+ include Crystalline::MetadataFields
11
+
12
+ # The account_id of the deleted assessment.
13
+ field :id, ::String, {'format_json': {'letter_case': ::NoResponse::Utils.field_name("id"), required: true}}
14
+ # The assessment the account's current risk now comes from. Absent when the account has no assessment with a decision left, and GET /v1/accounts/{account_id} then answers 404.
15
+ field(
16
+ :current_assessment_id,
17
+ Crystalline::Nilable.new(::String),
18
+ {'format_json': {'letter_case': ::NoResponse::Utils.field_name("current_assessment_id")}}
19
+ )
20
+
21
+ sig { params(id: ::String, current_assessment_id: T.nilable(::String)).void }
22
+ def initialize(id:, current_assessment_id: nil)
23
+ @id = id
24
+ @current_assessment_id = current_assessment_id
25
+ end
26
+
27
+ sig { params(other: T.untyped).returns(T::Boolean) }
28
+ def ==(other)
29
+ return false unless other.is_a?(self.class)
30
+ return false unless @id == other.id
31
+ return false unless @current_assessment_id == other.current_assessment_id
32
+ true
33
+ end
34
+ end
35
+ end
36
+ end
37
+ end
@@ -0,0 +1,20 @@
1
+ # typed: true
2
+ # frozen_string_literal: true
3
+
4
+ class NoResponse::Models::Shared::AssessmentDeletionAccount
5
+ extend ::Crystalline::MetadataFields::ClassMethods
6
+ end
7
+
8
+ class NoResponse::Models::Shared::AssessmentDeletionAccount
9
+ def id
10
+ end
11
+
12
+ def id=(str_)
13
+ end
14
+
15
+ def current_assessment_id
16
+ end
17
+
18
+ def current_assessment_id=(str_)
19
+ end
20
+ end