noresponse 9.5.5 → 10.0.1

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: a571eb8a27672fc0a2ccf828fc8d820cd60782be2c44d9a3a6edef2256d5bdd9
4
- data.tar.gz: a00b6546f815eca9fd77a4851454e16bfe64dfe08b80d7165ad837b56501fb2d
3
+ metadata.gz: d4580d3276d8e1a6e9b3d9456c55be2baf736602067bf61df070a896ee39903b
4
+ data.tar.gz: 768921ebf728b70d51b2241e9ec839917f4791d22e0d0b665537b40d9b8a8aea
5
5
  SHA512:
6
- metadata.gz: 5b5167e7bdd431232ce48412d93f072c86514657987d2241828eb2c3da36150aac5cf098f0bc425fc9fd1d2fd1fc281289c4162940d380ac30d776c89d84fa9c
7
- data.tar.gz: 619650ee0d9779ace6d144ad8965b751398a0f4835d22053dbb0d2e0384f98495b98a47118ddf23d781e5ab038687f745c85673bbad81f11fe6a1f4fa1361d24
6
+ metadata.gz: 88f56f17d0374b4df2a7886ee75ee575198c6cae98cf25042f2d4f72708b4311c301d2e6d1dc0a99c8dbe4cb6652c0f48d6c8f2852f0abe8df7a6c8f319feef9
7
+ data.tar.gz: 2c988fcfe40dc2d6731842e349a229e32b3bf43489adcf4ccaf0af840256208f804c143622412892f899a0b4fdc4de0a6d28e01d80f0b7af971878419da52eeb
@@ -50,7 +50,7 @@ module NoResponse
50
50
  }
51
51
  def create(body:, workspace_id:, idempotency_key: nil, timeout_ms: nil, http_headers: nil)
52
52
  # create - Request an asynchronous customer export.
53
- # Request an encrypted JSON Lines snapshot of retained account or audit records. Requires exports plus history or audit scope; detailed account data also needs evidence or detailed scope. Criteria are frozen and hashed. Each environment permits four active jobs, 64 MiB per artifact, and 256 KiB per chunk. Artifacts expire after 24 hours. Send an Idempotency-Key to safely repeat a request. Every operation checks current permissions and source retention.
53
+ # Request an encrypted JSON Lines snapshot of retained account or audit records. Requires exports plus history or audit scope. An account export without legacy history needs investigate with evidence or detailed, because it holds submitted identifiers; detailed account data always needs evidence or detailed. Criteria are frozen and hashed. Each environment permits four active jobs, 64 MiB per artifact, and 256 KiB per chunk. Artifacts expire after 24 hours. Send an Idempotency-Key to safely repeat a request. Every operation checks current permissions and source retention.
54
54
  request = Models::Operations::CreateCustomerExportRequest.new(
55
55
  workspace_id: workspace_id,
56
56
  body: body,
@@ -73,26 +73,81 @@ module NoResponse
73
73
  # current risk. A delivery that fails verification raises
74
74
  # WebhookVerification::VerificationError before anything is read; any
75
75
  # other event, and a test event, does nothing.
76
+ #
77
+ # with_account_lock serializes enforcement of one account across your
78
+ # workers. It is called with the account id and a callable: hold an
79
+ # exclusive lock on the account, call the callable, store the result's
80
+ # risk_version and any state change, then release the lock. An exception
81
+ # must propagate. Inside the lock the handler reads the account's risk and
82
+ # your state again, so a stale event or listed account cannot undo a newer
83
+ # decision. Without it, overlapping calls can act on an old decision after
84
+ # a newer one.
76
85
  def handle_risk_change(client, payload, headers, secrets, provider:, get_account_state:, flows: {},
77
- tolerance_seconds: WebhookVerification::DEFAULT_TOLERANCE_SECONDS, now: nil)
86
+ tolerance_seconds: WebhookVerification::DEFAULT_TOLERANCE_SECONDS, now: nil,
87
+ with_account_lock: nil)
78
88
  event = WebhookVerification.construct_event(payload, headers, secrets, tolerance_seconds: tolerance_seconds, now: now)
79
89
  if event.type != 'account.risk_changed' || (event.respond_to?(:test) && event.test == true)
80
90
  return EnforcementResult.new(event: event, skipped: 'not_actionable', enforcements: [])
81
91
  end
82
92
 
83
- begin
84
- account = client.accounts.get(account_id: event.data.account.id).result
85
- rescue Models::Errors::NotFoundError
86
- return EnforcementResult.new(event: event, skipped: 'account_gone', enforcements: [])
87
- end
88
- result = enforce_account(client, account, provider: provider, get_account_state: get_account_state, flows: flows)
93
+ result = under_account_lock(client, event.data.account.id, provider, get_account_state, flows, with_account_lock)
89
94
  result.event = event
90
95
  result
91
96
  end
92
97
 
93
- # Enforce one account as read: the account a handler fetched, or one from
94
- # accounts.list_changed(unenforced: true) when catching up.
95
- def enforce_account(client, account, provider:, get_account_state:, flows: {})
98
+ # Enforce one account: the account a handler fetched, or one from
99
+ # accounts.list_changed(unenforced: true) when catching up. With
100
+ # with_account_lock the account is read again inside the lock; without it
101
+ # the account is enforced as given.
102
+ def enforce_account(client, account, provider:, get_account_state:, flows: {}, with_account_lock: nil)
103
+ return under_account_lock(client, account.id, provider, get_account_state, flows, with_account_lock) if with_account_lock
104
+
105
+ enforce_as_read(client, account, provider, get_account_state, flows)
106
+ end
107
+
108
+ # Clerk, WorkOS or Auth0, run from the shared action table. token is the
109
+ # Clerk secret key, WorkOS API key or Auth0 Management API token; domain
110
+ # is the Auth0 tenant domain. Pass http (a Faraday connection) for a proxy or for tests.
111
+ def identity_provider(name, token:, domain: nil, base_url: nil, http: nil)
112
+ name = name.to_s
113
+ spec = TABLE.fetch('providers')[name] or raise ArgumentError, "unknown identity provider #{name.inspect}"
114
+ raise ArgumentError, "#{name} needs token" if token.to_s.empty?
115
+
116
+ base = base_url || spec.fetch('base_url')
117
+ if base.include?('{domain}')
118
+ raise ArgumentError, "#{name} needs domain or base_url" if domain.to_s.empty?
119
+
120
+ base = base.sub('{domain}', domain)
121
+ end
122
+ TableProvider.new(name, spec, base.sub(%r{/+\z}, ''), token, http || Faraday.new(request: { timeout: 10 }))
123
+ end
124
+
125
+ # Your own user store: one callable per action you support, keyed by
126
+ # action. A callable may return other actions it ran. An action without one fails.
127
+ def custom_provider(handlers)
128
+ CustomProvider.new(handlers.transform_keys(&:to_s))
129
+ end
130
+
131
+ private
132
+
133
+ # Read the account's current risk and enforce it, inside with_account_lock when you gave one.
134
+ def under_account_lock(client, account_id, provider, get_account_state, flows, with_account_lock)
135
+ enforce = lambda do
136
+ begin
137
+ account = client.accounts.get(account_id: account_id).result
138
+ rescue Models::Errors::NotFoundError
139
+ next EnforcementResult.new(skipped: 'account_gone', enforcements: [])
140
+ end
141
+ enforce_as_read(client, account, provider, get_account_state, flows)
142
+ end
143
+ return enforce.call unless with_account_lock
144
+
145
+ result = nil
146
+ with_account_lock.call(account_id, -> { result = enforce.call })
147
+ result or raise 'with_account_lock returned without running enforce'
148
+ end
149
+
150
+ def enforce_as_read(client, account, provider, get_account_state, flows)
96
151
  answer = get_account_state.call(account)
97
152
  return EnforcementResult.new(account: account, skipped: 'unknown_user', enforcements: []) if answer.nil?
98
153
 
@@ -149,31 +204,6 @@ module NoResponse
149
204
  EnforcementResult.new(account: account, state: state, risk_version: risk_version, enforcements: enforcements)
150
205
  end
151
206
 
152
- # Clerk, WorkOS or Auth0, run from the shared action table. token is the
153
- # Clerk secret key, WorkOS API key or Auth0 Management API token; domain
154
- # is the Auth0 tenant domain. Pass http (a Faraday connection) for a proxy or for tests.
155
- def identity_provider(name, token:, domain: nil, base_url: nil, http: nil)
156
- name = name.to_s
157
- spec = TABLE.fetch('providers')[name] or raise ArgumentError, "unknown identity provider #{name.inspect}"
158
- raise ArgumentError, "#{name} needs token" if token.to_s.empty?
159
-
160
- base = base_url || spec.fetch('base_url')
161
- if base.include?('{domain}')
162
- raise ArgumentError, "#{name} needs domain or base_url" if domain.to_s.empty?
163
-
164
- base = base.sub('{domain}', domain)
165
- end
166
- TableProvider.new(name, spec, base.sub(%r{/+\z}, ''), token, http || Faraday.new(request: { timeout: 10 }))
167
- end
168
-
169
- # Your own user store: one callable per action you support, keyed by
170
- # action. A callable may return other actions it ran. An action without one fails.
171
- def custom_provider(handlers)
172
- CustomProvider.new(handlers.transform_keys(&:to_s))
173
- end
174
-
175
- private
176
-
177
207
  # The error_code of a failed action: the provider's code, else its HTTP status, as <provider>.<code>.
178
208
  def failure_code(provider, error)
179
209
  code = error.respond_to?(:code) ? error.code : nil
@@ -948,7 +948,7 @@ module NoResponse
948
948
  }
949
949
  def preview(body:, workspace_id:, environment:, retries: nil, timeout_ms: nil, http_headers: nil)
950
950
  # preview - Preview a list override change without side effects.
951
- # Preview canonical list matches and current override effects with settings or management. The result states its bounded coverage and changes no list entries.
951
+ # Preview canonical list matches and current override effects with settings or management, plus legacy history, or investigate with evidence or detailed. The result states its bounded coverage and changes no list entries.
952
952
  request = Models::Operations::PreviewListRequest.new(
953
953
  workspace_id: workspace_id,
954
954
  environment: environment,
@@ -57,12 +57,6 @@ module NoResponse
57
57
  Crystalline::Nilable.new(::String),
58
58
  {'query_param': {'field_name': "assignee_principal_id", 'style': "form", 'explode': true}}
59
59
  )
60
- # Only reviews of this exact account in the authenticated workspace and environment. Applied before pagination and bound into the cursor.
61
- field(
62
- :account_id,
63
- Crystalline::Nilable.new(::String),
64
- {'query_param': {'field_name': "account_id", 'style': "form", 'explode': true}}
65
- )
66
60
 
67
61
  field(
68
62
  :limit,
@@ -80,7 +74,6 @@ module NoResponse
80
74
  assignee: T.nilable(::String),
81
75
  unassigned: T.nilable(T::Boolean),
82
76
  assignee_principal_id: T.nilable(::String),
83
- account_id: T.nilable(::String),
84
77
  limit: T.nilable(::Integer)
85
78
  )
86
79
  .void
@@ -94,7 +87,6 @@ module NoResponse
94
87
  assignee: nil,
95
88
  unassigned: nil,
96
89
  assignee_principal_id: nil,
97
- account_id: nil,
98
90
  limit: 50
99
91
  )
100
92
  @workspace_id = workspace_id
@@ -105,7 +97,6 @@ module NoResponse
105
97
  @assignee = assignee
106
98
  @unassigned = unassigned
107
99
  @assignee_principal_id = assignee_principal_id
108
- @account_id = account_id
109
100
  @limit = limit
110
101
  end
111
102
 
@@ -120,7 +111,6 @@ module NoResponse
120
111
  return false unless @assignee == other.assignee
121
112
  return false unless @unassigned == other.unassigned
122
113
  return false unless @assignee_principal_id == other.assignee_principal_id
123
- return false unless @account_id == other.account_id
124
114
  return false unless @limit == other.limit
125
115
  true
126
116
  end
@@ -54,12 +54,6 @@ class NoResponse::Models::Operations::ListReviewsRequest
54
54
  def assignee_principal_id=(str_)
55
55
  end
56
56
 
57
- def account_id
58
- end
59
-
60
- def account_id=(str_)
61
- end
62
-
63
57
  def limit
64
58
  end
65
59
 
@@ -0,0 +1,52 @@
1
+ # typed: true
2
+ # frozen_string_literal: true
3
+
4
+ module NoResponse
5
+ module Models
6
+ module Operations
7
+
8
+ class QueryReviewsRequest
9
+ extend T::Sig
10
+ include Crystalline::MetadataFields
11
+
12
+ # Your workspace id, as each key lists it in workspace_id. Another workspace, a malformed id and a test environment's id answer 404.
13
+ field(
14
+ :workspace_id,
15
+ ::String,
16
+ {'path_param': {'field_name': "workspace_id", 'style': "simple", 'explode': false}}
17
+ )
18
+ # The environment: live or test. Each has its own settings. Any other value answers 400. An API key reads and changes only its own environment's; the other answers 404.
19
+ field(
20
+ :environment,
21
+ Models::Shared::KeyEnvironment,
22
+ {'path_param': {'field_name': "environment", 'style': "simple", 'explode': false}}
23
+ )
24
+
25
+ field :body, Models::Shared::ReviewQueryRequest, {'request': {'media_type': "application/json"}}
26
+
27
+ sig {
28
+ params(
29
+ workspace_id: ::String,
30
+ environment: Models::Shared::KeyEnvironment,
31
+ body: Models::Shared::ReviewQueryRequest
32
+ )
33
+ .void
34
+ }
35
+ def initialize(workspace_id:, environment:, body:)
36
+ @workspace_id = workspace_id
37
+ @environment = environment
38
+ @body = body
39
+ end
40
+
41
+ sig { params(other: T.untyped).returns(T::Boolean) }
42
+ def ==(other)
43
+ return false unless other.is_a?(self.class)
44
+ return false unless @workspace_id == other.workspace_id
45
+ return false unless @environment == other.environment
46
+ return false unless @body == other.body
47
+ true
48
+ end
49
+ end
50
+ end
51
+ end
52
+ end
@@ -0,0 +1,26 @@
1
+ # typed: true
2
+ # frozen_string_literal: true
3
+
4
+ class NoResponse::Models::Operations::QueryReviewsRequest
5
+ extend ::Crystalline::MetadataFields::ClassMethods
6
+ end
7
+
8
+ class NoResponse::Models::Operations::QueryReviewsRequest
9
+ def workspace_id
10
+ end
11
+
12
+ def workspace_id=(str_)
13
+ end
14
+
15
+ def environment
16
+ end
17
+
18
+ def environment=(str_)
19
+ end
20
+
21
+ def body
22
+ end
23
+
24
+ def body=(str_)
25
+ end
26
+ end
@@ -0,0 +1,32 @@
1
+ # typed: true
2
+ # frozen_string_literal: true
3
+
4
+ module NoResponse
5
+ module Models
6
+ module Operations
7
+
8
+ class QueryReviewsResponse
9
+ extend T::Sig
10
+ include Crystalline::MetadataFields
11
+
12
+ field :headers, Crystalline::Hash.new(Symbol, Crystalline::Array.new(::String))
13
+
14
+ field :result, Models::Shared::ReviewList, {}
15
+
16
+ sig { params(headers: T::Hash[Symbol, T::Array[::String]], result: Models::Shared::ReviewList).void }
17
+ def initialize(headers:, result:)
18
+ @headers = headers
19
+ @result = result
20
+ end
21
+
22
+ sig { params(other: T.untyped).returns(T::Boolean) }
23
+ def ==(other)
24
+ return false unless other.is_a?(self.class)
25
+ return false unless @headers == other.headers
26
+ return false unless @result == other.result
27
+ true
28
+ end
29
+ end
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,20 @@
1
+ # typed: true
2
+ # frozen_string_literal: true
3
+
4
+ class NoResponse::Models::Operations::QueryReviewsResponse
5
+ extend ::Crystalline::MetadataFields::ClassMethods
6
+ end
7
+
8
+ class NoResponse::Models::Operations::QueryReviewsResponse
9
+ def headers
10
+ end
11
+
12
+ def headers=(str_)
13
+ end
14
+
15
+ def result
16
+ end
17
+
18
+ def result=(str_)
19
+ end
20
+ end
@@ -149,6 +149,8 @@ module NoResponse
149
149
  autoload :PublishPolicyEvaluationRequest, "no_response/models/operations/publishpolicyevaluation_request.rb"
150
150
  autoload :PublishPolicyEvaluationResponse, "no_response/models/operations/publishpolicyevaluation_response.rb"
151
151
  autoload :QueryAccountAssessmentsResponse, "no_response/models/operations/queryaccountassessments_response.rb"
152
+ autoload :QueryReviewsRequest, "no_response/models/operations/queryreviews_request.rb"
153
+ autoload :QueryReviewsResponse, "no_response/models/operations/queryreviews_response.rb"
152
154
  autoload :RecordAccountOutcomeRequest, "no_response/models/operations/recordaccountoutcome_request.rb"
153
155
  autoload :RecordAccountOutcomeResponse, "no_response/models/operations/recordaccountoutcome_response.rb"
154
156
  autoload :RecordAssessmentOutcomeRequest, "no_response/models/operations/recordassessmentoutcome_request.rb"
@@ -32,6 +32,7 @@ module NoResponse
32
32
  EVALUATION_LIMIT_REACHED = new("evaluation_limit_reached")
33
33
  ALREADY_MEMBER = new("already_member")
34
34
  MEMBER_LIMIT_REACHED = new("member_limit_reached")
35
+ AGGREGATE_ERASED_DATA = new("aggregate_erased_data")
35
36
  end
36
37
 
37
38
  open!
@@ -0,0 +1,120 @@
1
+ # typed: true
2
+ # frozen_string_literal: true
3
+
4
+ module NoResponse
5
+ module Models
6
+ module Shared
7
+
8
+ class ReviewQueryRequest
9
+ extend T::Sig
10
+ include Crystalline::MetadataFields
11
+
12
+ # Only reviews of this exact account in the authenticated workspace and environment. Applied before pagination.
13
+ field(
14
+ :account_id,
15
+ Crystalline::Nilable.new(::String),
16
+ {'format_json': {'letter_case': ::NoResponse::Utils.field_name("account_id")}}
17
+ )
18
+
19
+ field(
20
+ :status,
21
+ Crystalline::Nilable.new(Models::Shared::ReviewStatus),
22
+ {
23
+ 'format_json': {
24
+ 'letter_case': ::NoResponse::Utils.field_name("status"),
25
+ 'decoder': ::NoResponse::Utils.open_enum_from_string(Models::Shared::ReviewStatus, true)
26
+ }
27
+ }
28
+ )
29
+
30
+ field(
31
+ :priority,
32
+ Crystalline::Nilable.new(Models::Shared::Priority),
33
+ {
34
+ 'format_json': {
35
+ 'letter_case': ::NoResponse::Utils.field_name("priority"),
36
+ 'decoder': ::NoResponse::Utils.open_enum_from_string(Models::Shared::Priority, true)
37
+ }
38
+ }
39
+ )
40
+
41
+ field(
42
+ :assignee,
43
+ Crystalline::Nilable.new(::String),
44
+ {'format_json': {'letter_case': ::NoResponse::Utils.field_name("assignee")}}
45
+ )
46
+
47
+ field(
48
+ :unassigned,
49
+ Crystalline::Nilable.new(Crystalline::Boolean.new),
50
+ {'format_json': {'letter_case': ::NoResponse::Utils.field_name("unassigned")}}
51
+ )
52
+
53
+ field(
54
+ :assignee_principal_id,
55
+ Crystalline::Nilable.new(::String),
56
+ {'format_json': {'letter_case': ::NoResponse::Utils.field_name("assignee_principal_id")}}
57
+ )
58
+
59
+ field(
60
+ :cursor,
61
+ Crystalline::Nilable.new(::String),
62
+ {'format_json': {'letter_case': ::NoResponse::Utils.field_name("cursor")}}
63
+ )
64
+
65
+ field(
66
+ :limit,
67
+ Crystalline::Nilable.new(::Integer),
68
+ {'format_json': {'letter_case': ::NoResponse::Utils.field_name("limit")}}
69
+ )
70
+
71
+ sig {
72
+ params(
73
+ account_id: T.nilable(::String),
74
+ status: T.nilable(Models::Shared::ReviewStatus),
75
+ priority: T.nilable(Models::Shared::Priority),
76
+ assignee: T.nilable(::String),
77
+ unassigned: T.nilable(T::Boolean),
78
+ assignee_principal_id: T.nilable(::String),
79
+ cursor: T.nilable(::String),
80
+ limit: T.nilable(::Integer)
81
+ )
82
+ .void
83
+ }
84
+ def initialize(
85
+ account_id: nil,
86
+ status: nil,
87
+ priority: nil,
88
+ assignee: nil,
89
+ unassigned: nil,
90
+ assignee_principal_id: nil,
91
+ cursor: nil,
92
+ limit: 50
93
+ )
94
+ @account_id = account_id
95
+ @status = status
96
+ @priority = priority
97
+ @assignee = assignee
98
+ @unassigned = unassigned
99
+ @assignee_principal_id = assignee_principal_id
100
+ @cursor = cursor
101
+ @limit = limit
102
+ end
103
+
104
+ sig { params(other: T.untyped).returns(T::Boolean) }
105
+ def ==(other)
106
+ return false unless other.is_a?(self.class)
107
+ return false unless @account_id == other.account_id
108
+ return false unless @status == other.status
109
+ return false unless @priority == other.priority
110
+ return false unless @assignee == other.assignee
111
+ return false unless @unassigned == other.unassigned
112
+ return false unless @assignee_principal_id == other.assignee_principal_id
113
+ return false unless @cursor == other.cursor
114
+ return false unless @limit == other.limit
115
+ true
116
+ end
117
+ end
118
+ end
119
+ end
120
+ end
@@ -0,0 +1,56 @@
1
+ # typed: true
2
+ # frozen_string_literal: true
3
+
4
+ class NoResponse::Models::Shared::ReviewQueryRequest
5
+ extend ::Crystalline::MetadataFields::ClassMethods
6
+ end
7
+
8
+ class NoResponse::Models::Shared::ReviewQueryRequest
9
+ def account_id
10
+ end
11
+
12
+ def account_id=(str_)
13
+ end
14
+
15
+ def status
16
+ end
17
+
18
+ def status=(str_)
19
+ end
20
+
21
+ def priority
22
+ end
23
+
24
+ def priority=(str_)
25
+ end
26
+
27
+ def assignee
28
+ end
29
+
30
+ def assignee=(str_)
31
+ end
32
+
33
+ def unassigned
34
+ end
35
+
36
+ def unassigned=(str_)
37
+ end
38
+
39
+ def assignee_principal_id
40
+ end
41
+
42
+ def assignee_principal_id=(str_)
43
+ end
44
+
45
+ def cursor
46
+ end
47
+
48
+ def cursor=(str_)
49
+ end
50
+
51
+ def limit
52
+ end
53
+
54
+ def limit=(str_)
55
+ end
56
+ end
@@ -289,6 +289,7 @@ module NoResponse
289
289
  autoload :ReviewCommentRequest, "no_response/models/shared/reviewcommentrequest.rb"
290
290
  autoload :ReviewCreateRequest, "no_response/models/shared/reviewcreaterequest.rb"
291
291
  autoload :ReviewList, "no_response/models/shared/reviewlist.rb"
292
+ autoload :ReviewQueryRequest, "no_response/models/shared/reviewqueryrequest.rb"
292
293
  autoload :ReviewResolutionList, "no_response/models/shared/reviewresolutionlist.rb"
293
294
  autoload :ReviewResolveRequest, "no_response/models/shared/reviewresolverequest.rb"
294
295
  autoload :ReviewStatus, "no_response/models/shared/reviewstatus.rb"
@@ -49,7 +49,7 @@ module NoResponse
49
49
  }
50
50
  def list(request:, retries: nil, timeout_ms: nil, http_headers: nil)
51
51
  # list - List retained account reviews.
52
- # List retained investigation reviews using filters and an authenticated cursor. Optional account_id selects one exact account in this environment before pagination. All filters are bound into the cursor.
52
+ # List retained investigation reviews using filters and an authenticated cursor. Use reviews.query to filter by account_id in a JSON body. All filters are bound into the cursor.
53
53
  url, params = @sdk_configuration.get_server_details
54
54
  base_url = Utils.template_url(url, params)
55
55
  url = Utils.generate_url(
@@ -179,8 +179,7 @@ module NoResponse
179
179
  priority: request.priority,
180
180
  assignee: request.assignee,
181
181
  unassigned: request.unassigned,
182
- assignee_principal_id: request.assignee_principal_id,
183
- account_id: request.account_id
182
+ assignee_principal_id: request.assignee_principal_id
184
183
  ),
185
184
  http_headers: http_headers
186
185
  )
@@ -4803,5 +4802,310 @@ module NoResponse
4803
4802
 
4804
4803
  end
4805
4804
  end
4805
+
4806
+ sig {
4807
+ params(
4808
+ body: Models::Shared::ReviewQueryRequest,
4809
+ workspace_id: ::String,
4810
+ environment: Models::Shared::KeyEnvironment,
4811
+ retries: T.nilable(Utils::RetryConfig),
4812
+ timeout_ms: T.nilable(Integer),
4813
+ http_headers: T.nilable(T::Hash[T.any(String, Symbol), String])
4814
+ )
4815
+ .returns(Models::Operations::QueryReviewsResponse)
4816
+ }
4817
+ def query(body:, workspace_id:, environment:, retries: nil, timeout_ms: nil, http_headers: nil)
4818
+ # query - Query retained reviews without identifiers in URLs.
4819
+ # Query retained investigation reviews using a JSON body, including an exact account_id filter. All filters are bound into the cursor.
4820
+ request = Models::Operations::QueryReviewsRequest.new(
4821
+ workspace_id: workspace_id,
4822
+ environment: environment,
4823
+ body: body
4824
+ )
4825
+ url, params = @sdk_configuration.get_server_details
4826
+ base_url = Utils.template_url(url, params)
4827
+ url = Utils.generate_url(
4828
+ Models::Operations::QueryReviewsRequest,
4829
+ base_url,
4830
+ "/v1/workspaces/{workspace_id}/reviews/{environment}/query",
4831
+ request
4832
+ )
4833
+ headers = {}
4834
+ headers = T.cast(headers, T::Hash[String, String])
4835
+ req_content_type, data, form = Utils.serialize_request_body(request, false, false, :body, :json)
4836
+ headers["content-type"] = req_content_type
4837
+ raise StandardError, "request body is required" if data.nil? && form.nil?
4838
+
4839
+ if form && !form.empty?
4840
+ body = Utils.encode_form(form)
4841
+ elsif Utils.match_content_type(req_content_type, "application/x-www-form-urlencoded")
4842
+ body = URI.encode_www_form(T.cast(data, T::Hash[Symbol, Object]))
4843
+ else
4844
+ body = data
4845
+ end
4846
+
4847
+ headers["Accept"] = "application/json"
4848
+ headers["user-agent"] = @sdk_configuration.user_agent
4849
+ retries ||= @sdk_configuration.retry_config
4850
+ retries ||= Utils::RetryConfig.new(
4851
+ backoff: Utils::BackoffStrategy.new(
4852
+ exponent: 2.0,
4853
+ initial_interval: 500,
4854
+ max_elapsed_time: 30_000,
4855
+ max_interval: 8000
4856
+ ),
4857
+ retry_connection_errors: true,
4858
+ strategy: "backoff"
4859
+ )
4860
+ retry_options = retries.to_faraday_retry_options(initial_time: Time.now)
4861
+ retry_options[:retry_statuses] = [408, 429, 500, 501, 502, 503, 504, 505]
4862
+
4863
+ security = @sdk_configuration.security_source&.call
4864
+
4865
+ timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
4866
+ timeout ||= @sdk_configuration.timeout
4867
+
4868
+ connection = @sdk_configuration.client.dup
4869
+ connection.use(Utils::RetryMiddleware, retry_options)
4870
+
4871
+ hook_ctx = SDKHooks::HookContext.new(
4872
+ config: @sdk_configuration,
4873
+ base_url: base_url,
4874
+ oauth2_scopes: nil,
4875
+ operation_id: "queryReviews",
4876
+ security_source: @sdk_configuration.security_source
4877
+ )
4878
+
4879
+ error = T.let(nil, T.nilable(StandardError))
4880
+ http_response = T.let(nil, T.nilable(Faraday::Response))
4881
+
4882
+ begin
4883
+ http_response = T.must(connection).post(url) do |req|
4884
+ req.body = body
4885
+ req.headers.merge!(headers)
4886
+ req.options.timeout = timeout unless timeout.nil?
4887
+ Utils.configure_request_security(req, security)
4888
+ http_headers&.each do |key, value|
4889
+ req.headers[key.to_s] = value
4890
+ end
4891
+
4892
+ @sdk_configuration.hooks.before_request(
4893
+ hook_ctx: SDKHooks::BeforeRequestHookContext.new(
4894
+ hook_ctx: hook_ctx
4895
+ ),
4896
+ request: req
4897
+ )
4898
+ end
4899
+
4900
+ rescue StandardError => e
4901
+ error = e
4902
+ ensure
4903
+ if http_response.nil? || Utils.error_status?(http_response.status)
4904
+ http_response = @sdk_configuration.hooks.after_error(
4905
+ error: error,
4906
+ hook_ctx: SDKHooks::AfterErrorHookContext.new(
4907
+ hook_ctx: hook_ctx
4908
+ ),
4909
+ response: http_response
4910
+ )
4911
+ else
4912
+ http_response = @sdk_configuration.hooks.after_success(
4913
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
4914
+ hook_ctx: hook_ctx
4915
+ ),
4916
+ response: http_response
4917
+ )
4918
+ end
4919
+
4920
+ if http_response.nil?
4921
+ raise error if !error.nil?
4922
+ raise "no response"
4923
+ end
4924
+ end
4925
+
4926
+ content_type = http_response.headers.fetch("Content-Type", "application/octet-stream")
4927
+ if Utils.match_status_code(http_response.status, ["200"])
4928
+ if Utils.match_content_type(content_type, "application/json")
4929
+ @sdk_configuration.hooks.after_success(
4930
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
4931
+ hook_ctx: hook_ctx
4932
+ ),
4933
+ response: http_response
4934
+ )
4935
+ response_data = http_response.env.response_body
4936
+ obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Shared::ReviewList)
4937
+ result = obj
4938
+ response = Models::Operations::QueryReviewsResponse.new(
4939
+ result: result,
4940
+ headers: http_response.headers
4941
+ )
4942
+
4943
+ return response
4944
+ else
4945
+ raise(
4946
+ ::NoResponse::Models::Errors::APIStatusError.new(
4947
+ status_code: http_response.status,
4948
+ body: http_response.env.response_body,
4949
+ raw_response: http_response
4950
+ ),
4951
+ "Unknown content type received"
4952
+ )
4953
+ end
4954
+ elsif Utils.match_status_code(http_response.status, ["400"])
4955
+ if Utils.match_content_type(content_type, "application/problem+json")
4956
+ @sdk_configuration.hooks.after_success(
4957
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
4958
+ hook_ctx: hook_ctx
4959
+ ),
4960
+ response: http_response
4961
+ )
4962
+ response_data = http_response.env.response_body
4963
+ obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::BadRequestError)
4964
+ raise obj
4965
+ else
4966
+ raise(
4967
+ ::NoResponse::Models::Errors::APIStatusError.new(
4968
+ status_code: http_response.status,
4969
+ body: http_response.env.response_body,
4970
+ raw_response: http_response
4971
+ ),
4972
+ "Unknown content type received"
4973
+ )
4974
+ end
4975
+ elsif Utils.match_status_code(http_response.status, ["401"])
4976
+ if Utils.match_content_type(content_type, "application/problem+json")
4977
+ @sdk_configuration.hooks.after_success(
4978
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
4979
+ hook_ctx: hook_ctx
4980
+ ),
4981
+ response: http_response
4982
+ )
4983
+ response_data = http_response.env.response_body
4984
+ obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::AuthenticationError)
4985
+ raise obj
4986
+ else
4987
+ raise(
4988
+ ::NoResponse::Models::Errors::APIStatusError.new(
4989
+ status_code: http_response.status,
4990
+ body: http_response.env.response_body,
4991
+ raw_response: http_response
4992
+ ),
4993
+ "Unknown content type received"
4994
+ )
4995
+ end
4996
+ elsif Utils.match_status_code(http_response.status, ["403"])
4997
+ if Utils.match_content_type(content_type, "application/problem+json")
4998
+ @sdk_configuration.hooks.after_success(
4999
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
5000
+ hook_ctx: hook_ctx
5001
+ ),
5002
+ response: http_response
5003
+ )
5004
+ response_data = http_response.env.response_body
5005
+ obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::PermissionDeniedError)
5006
+ raise obj
5007
+ else
5008
+ raise(
5009
+ ::NoResponse::Models::Errors::APIStatusError.new(
5010
+ status_code: http_response.status,
5011
+ body: http_response.env.response_body,
5012
+ raw_response: http_response
5013
+ ),
5014
+ "Unknown content type received"
5015
+ )
5016
+ end
5017
+ elsif Utils.match_status_code(http_response.status, ["404"])
5018
+ if Utils.match_content_type(content_type, "application/problem+json")
5019
+ @sdk_configuration.hooks.after_success(
5020
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
5021
+ hook_ctx: hook_ctx
5022
+ ),
5023
+ response: http_response
5024
+ )
5025
+ response_data = http_response.env.response_body
5026
+ obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::NotFoundError)
5027
+ raise obj
5028
+ else
5029
+ raise(
5030
+ ::NoResponse::Models::Errors::APIStatusError.new(
5031
+ status_code: http_response.status,
5032
+ body: http_response.env.response_body,
5033
+ raw_response: http_response
5034
+ ),
5035
+ "Unknown content type received"
5036
+ )
5037
+ end
5038
+ elsif Utils.match_status_code(http_response.status, ["409"])
5039
+ if Utils.match_content_type(content_type, "application/problem+json")
5040
+ @sdk_configuration.hooks.after_success(
5041
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
5042
+ hook_ctx: hook_ctx
5043
+ ),
5044
+ response: http_response
5045
+ )
5046
+ response_data = http_response.env.response_body
5047
+ obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::ConflictError)
5048
+ raise obj
5049
+ else
5050
+ raise(
5051
+ ::NoResponse::Models::Errors::APIStatusError.new(
5052
+ status_code: http_response.status,
5053
+ body: http_response.env.response_body,
5054
+ raw_response: http_response
5055
+ ),
5056
+ "Unknown content type received"
5057
+ )
5058
+ end
5059
+ elsif Utils.match_status_code(http_response.status, ["429"])
5060
+ if Utils.match_content_type(content_type, "application/problem+json")
5061
+ @sdk_configuration.hooks.after_success(
5062
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
5063
+ hook_ctx: hook_ctx
5064
+ ),
5065
+ response: http_response
5066
+ )
5067
+ response_data = http_response.env.response_body
5068
+ obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::RateLimitError)
5069
+ raise obj
5070
+ else
5071
+ raise(
5072
+ ::NoResponse::Models::Errors::APIStatusError.new(
5073
+ status_code: http_response.status,
5074
+ body: http_response.env.response_body,
5075
+ raw_response: http_response
5076
+ ),
5077
+ "Unknown content type received"
5078
+ )
5079
+ end
5080
+ elsif Utils.match_status_code(http_response.status, ["4XX"])
5081
+ raise(
5082
+ ::NoResponse::Models::Errors::APIStatusError.new(
5083
+ status_code: http_response.status,
5084
+ body: http_response.env.response_body,
5085
+ raw_response: http_response
5086
+ ),
5087
+ "API error occurred"
5088
+ )
5089
+ elsif Utils.match_status_code(http_response.status, ["5XX"])
5090
+ raise(
5091
+ ::NoResponse::Models::Errors::APIStatusError.new(
5092
+ status_code: http_response.status,
5093
+ body: http_response.env.response_body,
5094
+ raw_response: http_response
5095
+ ),
5096
+ "API error occurred"
5097
+ )
5098
+ else
5099
+ raise(
5100
+ ::NoResponse::Models::Errors::APIStatusError.new(
5101
+ status_code: http_response.status,
5102
+ body: http_response.env.response_body,
5103
+ raw_response: http_response
5104
+ ),
5105
+ "Unknown status code received"
5106
+ )
5107
+
5108
+ end
5109
+ end
4806
5110
  end
4807
5111
  end
@@ -95,9 +95,9 @@ module NoResponse
95
95
 
96
96
  @language = "ruby"
97
97
  @openapi_doc_version = "1"
98
- @sdk_version = "9.5.5"
98
+ @sdk_version = "10.0.1"
99
99
  @gen_version = "internal"
100
- @user_agent = "noresponse-sdk/ruby 9.5.5 internal 1 noresponse"
100
+ @user_agent = "noresponse-sdk/ruby 10.0.1 internal 1 noresponse"
101
101
  end
102
102
 
103
103
  sig { returns([String, T::Hash[Symbol, String]]) }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: noresponse
3
3
  version: !ruby/object:Gem::Version
4
- version: 9.5.5
4
+ version: 10.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - NoResponse
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-10-30 00:00:00.000000000 Z
11
+ date: 2026-10-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: base64
@@ -562,6 +562,10 @@ files:
562
562
  - lib/no_response/models/operations/publishpolicyevaluation_response.rbi
563
563
  - lib/no_response/models/operations/queryaccountassessments_response.rb
564
564
  - lib/no_response/models/operations/queryaccountassessments_response.rbi
565
+ - lib/no_response/models/operations/queryreviews_request.rb
566
+ - lib/no_response/models/operations/queryreviews_request.rbi
567
+ - lib/no_response/models/operations/queryreviews_response.rb
568
+ - lib/no_response/models/operations/queryreviews_response.rbi
565
569
  - lib/no_response/models/operations/recordaccountoutcome_request.rb
566
570
  - lib/no_response/models/operations/recordaccountoutcome_request.rbi
567
571
  - lib/no_response/models/operations/recordaccountoutcome_response.rb
@@ -1249,6 +1253,8 @@ files:
1249
1253
  - lib/no_response/models/shared/reviewcreaterequest.rbi
1250
1254
  - lib/no_response/models/shared/reviewlist.rb
1251
1255
  - lib/no_response/models/shared/reviewlist.rbi
1256
+ - lib/no_response/models/shared/reviewqueryrequest.rb
1257
+ - lib/no_response/models/shared/reviewqueryrequest.rbi
1252
1258
  - lib/no_response/models/shared/reviewresolutionlist.rb
1253
1259
  - lib/no_response/models/shared/reviewresolutionlist.rbi
1254
1260
  - lib/no_response/models/shared/reviewresolverequest.rb