noresponse 9.1.0 → 9.2.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: 367df5573ff9088996a143ec41390cdc957575ed544f365e90c08d7c0920fbd4
4
- data.tar.gz: 9cb00b8cd819c7266ca22da8277ac91fa650d2d7c2927bb0667c1e0bc0aa754c
3
+ metadata.gz: 8953e9efde2a1afc67354b14a01cbe5839454a6920f6603d2f072aaf5649d777
4
+ data.tar.gz: 9bc93c249f17aaecf7eaff58c6fa7ffdb4c472b04d45856c8c09260269144acd
5
5
  SHA512:
6
- metadata.gz: e1a5b42991418819390e8045b89605b6cfa472c98d39b53502dbec211c4794187d2c85ecb8641f084b6ce4746504ca3619d372ae3c96915b69b113b27d53b242
7
- data.tar.gz: dacfc2999ae04d3f5f937004a2d7f4a577f8e18369287a8b5f3d63a9788c08746873ba76e737ea35ea0a371e6335568c1fa09a209c08b396ed88e3b3f49e9791
6
+ metadata.gz: 61d8e3318514097c2d3ccd782403c75facdefd90ecc81ab90c193f001feb610c3badcf766da50b7ddc9b09982b876a81e21386e2d68e027dae0860e3ef0b5361
7
+ data.tar.gz: 0f0778475a4f26e754af8139f13cae8d08a9e596aea104bc21b0ac0d252d5b03e43b92fa0985e38010bf0c4049402ab5ee1acbfbd51f997d5a032c89684ff9f0
@@ -1841,7 +1841,7 @@ module NoResponse
1841
1841
  }
1842
1842
  def search(request:, retries: nil, timeout_ms: nil, http_headers: nil)
1843
1843
  # search - Search assessments across this environment
1844
- # Search retained assessments created in [from,to), over at most 366 days. Filters use each assessment decision, rather than the current account decision. Results can change between pages. Keep the assessment version to retrieve the exact decision later. Each item's detail.identifiers holds the identifiers its assessment was sent, exactly as received. This read does not require an idempotency key.
1844
+ # Search retained assessments created in [from,to), over at most 366 days. Filters use each assessment decision, rather than the current account decision. Results can change between pages. Keep the assessment version to retrieve the exact decision later. Each item's detail.identifiers holds the identifiers its assessment was sent, exactly as received, and first_decision holds the decision of its first answer. email finds every assessment of the accounts that sent a mailbox, matched as lists match it. changed keeps the assessments a later revision changed. total counts every match, exactly up to 10000. This read does not require an idempotency key.
1845
1845
  url, params = @sdk_configuration.get_server_details
1846
1846
  base_url = Utils.template_url(url, params)
1847
1847
  url = "#{base_url}/v1/assessments/search"
@@ -0,0 +1,115 @@
1
+ # typed: true
2
+ # frozen_string_literal: true
3
+
4
+ module NoResponse
5
+ module Models
6
+ module Shared
7
+ # One stored assessment revision, exactly as GET /v1/assessments/{assessment_id}/versions/{version} returns it, with the decision of the assessment's first answer. It is not re-scored and carries no current account risk.
8
+ class AssessmentSearchItem
9
+ extend T::Sig
10
+ include Crystalline::MetadataFields
11
+
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}}
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.
15
+ field(
16
+ :status,
17
+ Models::Shared::Status,
18
+ {
19
+ 'format_json': {
20
+ 'letter_case': ::NoResponse::Utils.field_name("status"),
21
+ required: true,
22
+ 'decoder': ::NoResponse::Utils.open_enum_from_string(Models::Shared::Status, false)
23
+ }
24
+ }
25
+ )
26
+ # The event an assessment is made for: account_creation (a user creates an account), login (a user returns to an existing account) or purchase (a payment or a credit grant). The account's risk is reported with the decision for this flow.
27
+ field(
28
+ :flow,
29
+ Models::Shared::Flow,
30
+ {
31
+ 'format_json': {
32
+ 'letter_case': ::NoResponse::Utils.field_name("flow"),
33
+ required: true,
34
+ 'decoder': ::NoResponse::Utils.open_enum_from_string(Models::Shared::Flow, false)
35
+ }
36
+ }
37
+ )
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.
39
+ field(
40
+ :depth,
41
+ Models::Shared::Depth,
42
+ {
43
+ 'format_json': {
44
+ 'letter_case': ::NoResponse::Utils.field_name("depth"),
45
+ required: true,
46
+ 'decoder': ::NoResponse::Utils.open_enum_from_string(Models::Shared::Depth, false)
47
+ }
48
+ }
49
+ )
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.
51
+ field(
52
+ :detail,
53
+ Models::Shared::AssessmentDetail,
54
+ {'format_json': {'letter_case': ::NoResponse::Utils.field_name("detail"), required: true}}
55
+ )
56
+ # Version of the body shape.
57
+ field(
58
+ :schema_version,
59
+ ::String,
60
+ {'format_json': {'letter_case': ::NoResponse::Utils.field_name("schema_version"), required: true}}
61
+ )
62
+ # An assessment's own decision: block when its stored risk.block is true, otherwise its recommendation. It is not the account's decision or held-admission state.
63
+ field(
64
+ :first_decision,
65
+ Crystalline::Nilable.new(Models::Shared::Decision),
66
+ {
67
+ 'format_json': {
68
+ 'letter_case': ::NoResponse::Utils.field_name("first_decision"),
69
+ 'decoder': ::NoResponse::Utils.open_enum_from_string(Models::Shared::Decision, true)
70
+ }
71
+ }
72
+ )
73
+
74
+ sig {
75
+ params(
76
+ id: ::String,
77
+ status: Models::Shared::Status,
78
+ flow: Models::Shared::Flow,
79
+ depth: Models::Shared::Depth,
80
+ detail: Models::Shared::AssessmentDetail,
81
+ schema_version: ::String,
82
+ first_decision: T.nilable(Models::Shared::Decision)
83
+ )
84
+ .void
85
+ }
86
+ def initialize(id:, status:, flow:, depth:, detail:, schema_version: "1", first_decision: nil)
87
+ @id = id
88
+ @status = status
89
+ @flow = flow
90
+ @depth = depth
91
+ @detail = detail
92
+ unless schema_version == "1"
93
+ raise ArgumentError, "Invalid value for schema_version"
94
+ end
95
+
96
+ @schema_version = "1"
97
+ @first_decision = first_decision
98
+ end
99
+
100
+ sig { params(other: T.untyped).returns(T::Boolean) }
101
+ def ==(other)
102
+ return false unless other.is_a?(self.class)
103
+ return false unless @id == other.id
104
+ return false unless @status == other.status
105
+ return false unless @flow == other.flow
106
+ return false unless @depth == other.depth
107
+ return false unless @detail == other.detail
108
+ return false unless @schema_version == other.schema_version
109
+ return false unless @first_decision == other.first_decision
110
+ true
111
+ end
112
+ end
113
+ end
114
+ end
115
+ end
@@ -0,0 +1,50 @@
1
+ # typed: true
2
+ # frozen_string_literal: true
3
+
4
+ class NoResponse::Models::Shared::AssessmentSearchItem
5
+ extend ::Crystalline::MetadataFields::ClassMethods
6
+ end
7
+
8
+ class NoResponse::Models::Shared::AssessmentSearchItem
9
+ def id
10
+ end
11
+
12
+ def id=(str_)
13
+ end
14
+
15
+ def status
16
+ end
17
+
18
+ def status=(str_)
19
+ end
20
+
21
+ def flow
22
+ end
23
+
24
+ def flow=(str_)
25
+ end
26
+
27
+ def depth
28
+ end
29
+
30
+ def depth=(str_)
31
+ end
32
+
33
+ def detail
34
+ end
35
+
36
+ def detail=(str_)
37
+ end
38
+
39
+ def schema_version
40
+ end
41
+
42
+ def schema_version=(str_)
43
+ end
44
+
45
+ def first_decision
46
+ end
47
+
48
+ def first_decision=(str_)
49
+ end
50
+ end
@@ -4,16 +4,28 @@
4
4
  module NoResponse
5
5
  module Models
6
6
  module Shared
7
- # A bounded page of latest assessment revisions, newest creation first. Each revision identifies the exact result found; no current account risk is attached.
7
+ # A bounded page of latest assessment revisions, newest creation first, with how many assessments match the filters. Each item is the revision found and its first answer's decision; no current account risk is attached.
8
8
  class AssessmentSearchPage
9
9
  extend T::Sig
10
10
  include Crystalline::MetadataFields
11
11
 
12
12
  field(
13
13
  :items,
14
- Crystalline::Array.new(Models::Shared::AssessmentRevision),
14
+ Crystalline::Array.new(Models::Shared::AssessmentSearchItem),
15
15
  {'format_json': {'letter_case': ::NoResponse::Utils.field_name("items"), required: true}}
16
16
  )
17
+ # How many assessments match the filters over every page, counted when this page was read: exact up to 10000. At 10000 or more it is 10000 and total_capped is true. The cursor does not change it; a later page can count differently, as results are live.
18
+ field(
19
+ :total,
20
+ ::Integer,
21
+ {'format_json': {'letter_case': ::NoResponse::Utils.field_name("total"), required: true}}
22
+ )
23
+ # True when at least 10000 assessments match, so total is 10000 and not the exact count.
24
+ field(
25
+ :total_capped,
26
+ Crystalline::Boolean.new,
27
+ {'format_json': {'letter_case': ::NoResponse::Utils.field_name("total_capped"), required: true}}
28
+ )
17
29
  # Version of the body shape.
18
30
  field(
19
31
  :schema_version,
@@ -35,15 +47,19 @@ module NoResponse
35
47
 
36
48
  sig {
37
49
  params(
38
- items: T::Array[Models::Shared::AssessmentRevision],
50
+ items: T::Array[Models::Shared::AssessmentSearchItem],
51
+ total: ::Integer,
52
+ total_capped: T::Boolean,
39
53
  schema_version: ::String,
40
54
  next_cursor: T.nilable(::String),
41
55
  retention_days: T.nilable(::Integer)
42
56
  )
43
57
  .void
44
58
  }
45
- def initialize(items:, schema_version: "1", next_cursor: nil, retention_days: 365)
59
+ def initialize(items:, total:, total_capped:, schema_version: "1", next_cursor: nil, retention_days: 365)
46
60
  @items = items
61
+ @total = total
62
+ @total_capped = total_capped
47
63
  unless schema_version == "1"
48
64
  raise ArgumentError, "Invalid value for schema_version"
49
65
  end
@@ -57,6 +73,8 @@ module NoResponse
57
73
  def ==(other)
58
74
  return false unless other.is_a?(self.class)
59
75
  return false unless @items == other.items
76
+ return false unless @total == other.total
77
+ return false unless @total_capped == other.total_capped
60
78
  return false unless @schema_version == other.schema_version
61
79
  return false unless @next_cursor == other.next_cursor
62
80
  return false unless @retention_days == other.retention_days
@@ -12,6 +12,18 @@ class NoResponse::Models::Shared::AssessmentSearchPage
12
12
  def items=(str_)
13
13
  end
14
14
 
15
+ def total
16
+ end
17
+
18
+ def total=(str_)
19
+ end
20
+
21
+ def total_capped
22
+ end
23
+
24
+ def total_capped=(str_)
25
+ end
26
+
15
27
  def schema_version
16
28
  end
17
29
 
@@ -18,6 +18,12 @@ module NoResponse
18
18
  Crystalline::Nilable.new(::String),
19
19
  {'format_json': {'letter_case': ::NoResponse::Utils.field_name("account_id")}}
20
20
  )
21
+ # Assessments of every account that one of its retained admitted assessments sent this mailbox as identifiers.email, matched as lists match an email entry: case-insensitive, a +tag removed and, at gmail.com and googlemail.com, the dots of the local part ignored. Only assessments stored since email list matching began carry the mailbox. An address that is not a valid mailbox is refused with 400.
22
+ field(
23
+ :email,
24
+ Crystalline::Nilable.new(::String),
25
+ {'format_json': {'letter_case': ::NoResponse::Utils.field_name("email")}}
26
+ )
21
27
  # The event an assessment is made for: account_creation (a user creates an account), login (a user returns to an existing account) or purchase (a payment or a credit grant). The account's risk is reported with the decision for this flow.
22
28
  field(
23
29
  :flow,
@@ -169,6 +175,12 @@ module NoResponse
169
175
  }
170
176
  }
171
177
  )
178
+ # true returns only assessments whose latest stored revision's decision differs from their first answer's decision (see decision); false only the others. An assessment whose first answer or latest revision has no decision yet is not changed. Cannot be combined with revision first.
179
+ field(
180
+ :changed,
181
+ Crystalline::Nilable.new(Crystalline::Boolean.new),
182
+ {'format_json': {'letter_case': ::NoResponse::Utils.field_name("changed")}}
183
+ )
172
184
 
173
185
  field(
174
186
  :limit,
@@ -181,6 +193,7 @@ module NoResponse
181
193
  from: ::String,
182
194
  to: ::String,
183
195
  account_id: T.nilable(::String),
196
+ email: T.nilable(::String),
184
197
  flow: T.nilable(Models::Shared::Flow),
185
198
  status: T.nilable(Models::Shared::Status),
186
199
  recommendation: T.nilable(Models::Shared::Recommendation),
@@ -197,6 +210,7 @@ module NoResponse
197
210
  score_min: T.nilable(::Integer),
198
211
  score_max: T.nilable(::Integer),
199
212
  list_match: T.nilable(Models::Shared::ListMatch),
213
+ changed: T.nilable(T::Boolean),
200
214
  limit: T.nilable(::Integer)
201
215
  )
202
216
  .void
@@ -205,6 +219,7 @@ module NoResponse
205
219
  from:,
206
220
  to:,
207
221
  account_id: nil,
222
+ email: nil,
208
223
  flow: nil,
209
224
  status: nil,
210
225
  recommendation: nil,
@@ -221,11 +236,13 @@ module NoResponse
221
236
  score_min: nil,
222
237
  score_max: nil,
223
238
  list_match: nil,
239
+ changed: nil,
224
240
  limit: 20
225
241
  )
226
242
  @from = from
227
243
  @to = to
228
244
  @account_id = account_id
245
+ @email = email
229
246
  @flow = flow
230
247
  @status = status
231
248
  @recommendation = recommendation
@@ -242,6 +259,7 @@ module NoResponse
242
259
  @score_min = score_min
243
260
  @score_max = score_max
244
261
  @list_match = list_match
262
+ @changed = changed
245
263
  @limit = limit
246
264
  end
247
265
 
@@ -251,6 +269,7 @@ module NoResponse
251
269
  return false unless @from == other.from
252
270
  return false unless @to == other.to
253
271
  return false unless @account_id == other.account_id
272
+ return false unless @email == other.email
254
273
  return false unless @flow == other.flow
255
274
  return false unless @status == other.status
256
275
  return false unless @recommendation == other.recommendation
@@ -267,6 +286,7 @@ module NoResponse
267
286
  return false unless @score_min == other.score_min
268
287
  return false unless @score_max == other.score_max
269
288
  return false unless @list_match == other.list_match
289
+ return false unless @changed == other.changed
270
290
  return false unless @limit == other.limit
271
291
  true
272
292
  end
@@ -24,6 +24,12 @@ class NoResponse::Models::Shared::AssessmentSearchRequest
24
24
  def account_id=(str_)
25
25
  end
26
26
 
27
+ def email
28
+ end
29
+
30
+ def email=(str_)
31
+ end
32
+
27
33
  def flow
28
34
  end
29
35
 
@@ -120,6 +126,12 @@ class NoResponse::Models::Shared::AssessmentSearchRequest
120
126
  def list_match=(str_)
121
127
  end
122
128
 
129
+ def changed
130
+ end
131
+
132
+ def changed=(str_)
133
+ end
134
+
123
135
  def limit
124
136
  end
125
137
 
@@ -60,6 +60,7 @@ module NoResponse
60
60
  autoload :AssessmentRequestIssuedCredential, "no_response/models/shared/assessmentrequestissuedcredential.rb"
61
61
  autoload :AssessmentRequestPolicyContext, "no_response/models/shared/assessmentrequestpolicycontext.rb"
62
62
  autoload :AssessmentRevision, "no_response/models/shared/assessmentrevision.rb"
63
+ autoload :AssessmentSearchItem, "no_response/models/shared/assessmentsearchitem.rb"
63
64
  autoload :AssessmentSearchPage, "no_response/models/shared/assessmentsearchpage.rb"
64
65
  autoload :AssessmentSearchRequest, "no_response/models/shared/assessmentsearchrequest.rb"
65
66
  autoload :AssessmentUpdatedData, "no_response/models/shared/assessmentupdateddata.rb"
@@ -95,9 +95,9 @@ module NoResponse
95
95
 
96
96
  @language = "ruby"
97
97
  @openapi_doc_version = "1"
98
- @sdk_version = "9.1.0"
98
+ @sdk_version = "9.2.0"
99
99
  @gen_version = "internal"
100
- @user_agent = "noresponse-sdk/ruby 9.1.0 internal 1 noresponse"
100
+ @user_agent = "noresponse-sdk/ruby 9.2.0 internal 1 noresponse"
101
101
  end
102
102
 
103
103
  sig { returns([String, T::Hash[Symbol, String]]) }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: noresponse
3
3
  version: !ruby/object:Gem::Version
4
- version: 9.1.0
4
+ version: 9.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - NoResponse
@@ -777,6 +777,8 @@ files:
777
777
  - lib/no_response/models/shared/assessmentrequestpolicycontext.rbi
778
778
  - lib/no_response/models/shared/assessmentrevision.rb
779
779
  - lib/no_response/models/shared/assessmentrevision.rbi
780
+ - lib/no_response/models/shared/assessmentsearchitem.rb
781
+ - lib/no_response/models/shared/assessmentsearchitem.rbi
780
782
  - lib/no_response/models/shared/assessmentsearchpage.rb
781
783
  - lib/no_response/models/shared/assessmentsearchpage.rbi
782
784
  - lib/no_response/models/shared/assessmentsearchrequest.rb