noresponse 2.0.18 → 2.1.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 +4 -4
- data/lib/no_response/integrations.rb +1 -1
- data/lib/no_response/late_results.rb +23 -17
- data/lib/no_response/models/operations/createwebhookendpoint_response.rb +34 -0
- data/lib/no_response/models/operations/createwebhookendpoint_response.rbi +20 -0
- data/lib/no_response/models/operations/deletewebhookendpoint_request.rb +29 -0
- data/lib/no_response/models/operations/deletewebhookendpoint_request.rbi +14 -0
- data/lib/no_response/models/operations/deletewebhookendpoint_response.rb +28 -0
- data/lib/no_response/models/operations/deletewebhookendpoint_response.rbi +14 -0
- data/lib/no_response/models/operations/listwebhookendpoints_response.rb +32 -0
- data/lib/no_response/models/operations/listwebhookendpoints_response.rbi +20 -0
- data/lib/no_response/models/operations/rotatewebhooksigningkey_request.rb +33 -0
- data/lib/no_response/models/operations/rotatewebhooksigningkey_request.rbi +20 -0
- data/lib/no_response/models/operations/rotatewebhooksigningkey_response.rb +32 -0
- data/lib/no_response/models/operations/rotatewebhooksigningkey_response.rbi +20 -0
- data/lib/no_response/models/operations/sendwebhooktestevent_request.rb +33 -0
- data/lib/no_response/models/operations/sendwebhooktestevent_request.rbi +20 -0
- data/lib/no_response/models/operations/sendwebhooktestevent_response.rb +32 -0
- data/lib/no_response/models/operations/sendwebhooktestevent_response.rbi +20 -0
- data/lib/no_response/models/operations.rb +8 -0
- data/lib/no_response/models/shared/assessment.rb +12 -2
- data/lib/no_response/models/shared/assessment.rbi +6 -0
- data/lib/no_response/models/shared/assessmentauthcontext.rb +121 -0
- data/lib/no_response/models/shared/assessmentauthcontext.rbi +56 -0
- data/lib/no_response/models/shared/assessmentquery.rb +1 -1
- data/lib/no_response/models/shared/assessmentrequest.rb +1 -1
- data/lib/no_response/models/shared/authcontext.rb +4 -4
- data/lib/no_response/models/shared/badrequesterrorcode.rb +1 -0
- data/lib/no_response/models/shared/conflicterrorcode.rb +2 -0
- data/lib/no_response/models/shared/hookpoint.rb +5 -2
- data/lib/no_response/models/shared/responsemode.rb +4 -1
- data/lib/no_response/models/shared/security.rb +3 -3
- data/lib/no_response/models/shared/signingkey.rb +49 -0
- data/lib/no_response/models/shared/signingkey.rbi +26 -0
- data/lib/no_response/models/shared/signingsecret.rb +49 -0
- data/lib/no_response/models/shared/signingsecret.rbi +26 -0
- data/lib/no_response/models/shared/transport.rb +5 -2
- data/lib/no_response/models/shared/webhookendpoint.rb +100 -0
- data/lib/no_response/models/shared/webhookendpoint.rbi +50 -0
- data/lib/no_response/models/shared/webhookendpointcreated.rb +41 -0
- data/lib/no_response/models/shared/webhookendpointcreated.rbi +20 -0
- data/lib/no_response/models/shared/webhookendpointlist.rb +32 -0
- data/lib/no_response/models/shared/webhookendpointlist.rbi +14 -0
- data/lib/no_response/models/shared/webhookendpointrequest.rb +42 -0
- data/lib/no_response/models/shared/webhookendpointrequest.rbi +20 -0
- data/lib/no_response/models/shared/webhookendpointstate.rb +20 -0
- data/lib/no_response/models/shared/webhookendpointstate.rbi +9 -0
- data/lib/no_response/models/shared/webhookkeyrotation.rb +65 -0
- data/lib/no_response/models/shared/webhookkeyrotation.rbi +32 -0
- data/lib/no_response/models/shared/webhookkeyrotationrequest.rb +23 -0
- data/lib/no_response/models/shared/webhookkeyrotationrequest.rbi +9 -0
- data/lib/no_response/models/shared/webhooktest.rb +86 -0
- data/lib/no_response/models/shared/webhooktest.rbi +38 -0
- data/lib/no_response/models/shared/webhooktestrequest.rb +39 -0
- data/lib/no_response/models/shared/webhooktestrequest.rbi +14 -0
- data/lib/no_response/models/shared/webhooktestrequestevent.rb +19 -0
- data/lib/no_response/models/shared/webhooktestrequestevent.rbi +9 -0
- data/lib/no_response/models/shared.rb +13 -0
- data/lib/no_response/noresponseclient.rb +2 -1
- data/lib/no_response/sdkconfiguration.rb +5 -2
- data/lib/no_response/webhookendpoints.rb +1444 -0
- data/lib/no_response/webhooks.rb +7 -2
- data/lib/noresponse.rb +1 -0
- metadata +45 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f7f2f99e8a5df281a10706ca39f72c60dd4e0c945f6a895e95644921ef902125
|
|
4
|
+
data.tar.gz: 5c9a7bcdd021bbec006baa70a1e70c30e27845fbb0f3244e9657aefa22deb8bf
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: bc80309fad1e4e052a6fdb5bd3a9df90c3d9aab591a940b344678fa6ab9c7026c9f528b100a6ab0c68c1ed5b6ad824164600576702106a6e422d9f77eecdc8f4
|
|
7
|
+
data.tar.gz: 60e634af7afff07030476d5697bafecea730ef81062cdaad669f73c742b82f39b30f446fb094ee2ae9fbf02923703daf3baad858868f61844654a32cc69c69a7
|
|
@@ -706,7 +706,7 @@ module NoResponse
|
|
|
706
706
|
response: http_response
|
|
707
707
|
)
|
|
708
708
|
return Models::Operations::DeleteIntegrationResponse.new(
|
|
709
|
-
headers:
|
|
709
|
+
headers: http_response.headers
|
|
710
710
|
)
|
|
711
711
|
elsif Utils.match_status_code(http_response.status, ["400"])
|
|
712
712
|
if Utils.match_content_type(content_type, "application/problem+json")
|
|
@@ -11,7 +11,9 @@
|
|
|
11
11
|
# user.
|
|
12
12
|
#
|
|
13
13
|
# The handler verifies the delivery itself, so it never acts on an unverified
|
|
14
|
-
# event
|
|
14
|
+
# event, and it never acts on a test event from the send-test-event call. Every
|
|
15
|
+
# provider call treats a 404 (user or session already gone) as done, so a
|
|
16
|
+
# repeated delivery is safe. The provider calls are thin: you pass the credentials, and each
|
|
15
17
|
# action is the provider's documented admin endpoint.
|
|
16
18
|
|
|
17
19
|
require 'erb'
|
|
@@ -54,12 +56,12 @@ module NoResponse
|
|
|
54
56
|
|
|
55
57
|
class << self
|
|
56
58
|
# The action your policy names for a verified event. Only a served
|
|
57
|
-
# assessment with a recommendation can act
|
|
58
|
-
# and review (as strings or symbols) to NONE,
|
|
59
|
-
# recommendation you leave out does nothing. An
|
|
60
|
-
# ArgumentError.
|
|
59
|
+
# assessment with a recommendation can act; a test event never does.
|
|
60
|
+
# policy maps allow, step_up and review (as strings or symbols) to NONE,
|
|
61
|
+
# REVOKE_SESSIONS or BAN; a recommendation you leave out does nothing. An
|
|
62
|
+
# unknown action raises ArgumentError.
|
|
61
63
|
def action_for(event, policy = DEFAULT_POLICY)
|
|
62
|
-
return NONE if event.type != 'assessment.updated' || event.expired?
|
|
64
|
+
return NONE if event.type != 'assessment.updated' || event.test? || event.expired?
|
|
63
65
|
|
|
64
66
|
data = event.data
|
|
65
67
|
recommendation = data.recommendation || data.risk&.recommendation
|
|
@@ -111,7 +113,8 @@ module NoResponse
|
|
|
111
113
|
# Clerk Backend API. revoke_sessions lists the user's active sessions
|
|
112
114
|
# (GET /sessions?user_id&status=active) and revokes each
|
|
113
115
|
# (POST /sessions/{id}/revoke). ban is POST /users/{id}/ban, which
|
|
114
|
-
# revokes every session and blocks sign-in.
|
|
116
|
+
# revokes every session and blocks sign-in. A 404 on any call (user or
|
|
117
|
+
# session already gone) counts as done, so a repeated delivery is safe.
|
|
115
118
|
#
|
|
116
119
|
# base_url defaults to https://api.clerk.com/v1. http_client is an
|
|
117
120
|
# optional callable (method, uri, headers, body) returning
|
|
@@ -126,7 +129,9 @@ module NoResponse
|
|
|
126
129
|
# GET /user_management/users/{id}/sessions and revokes each active one
|
|
127
130
|
# with POST /user_management/sessions/revoke. WorkOS has no block or ban,
|
|
128
131
|
# so ban revokes the sessions and then deletes the user
|
|
129
|
-
# (DELETE /user_management/users/{id}); deletion is permanent.
|
|
132
|
+
# (DELETE /user_management/users/{id}); deletion is permanent. A 404 on
|
|
133
|
+
# any call (user or session already gone) counts as done, so a repeated
|
|
134
|
+
# delivery is safe.
|
|
130
135
|
#
|
|
131
136
|
# base_url defaults to https://api.workos.com.
|
|
132
137
|
def workos(api_key:, base_url: 'https://api.workos.com', http_client: nil)
|
|
@@ -141,7 +146,8 @@ module NoResponse
|
|
|
141
146
|
# (PATCH /users/{id}), then does the same. Pass domain (such as
|
|
142
147
|
# example.eu.auth0.com; the API is https://{domain}/api/v2) or base_url.
|
|
143
148
|
# token is a Management API access token with update:users,
|
|
144
|
-
# delete:sessions and delete:refresh_tokens.
|
|
149
|
+
# delete:sessions and delete:refresh_tokens. A 404 on any call (user
|
|
150
|
+
# already gone) counts as done, so a repeated delivery is safe.
|
|
145
151
|
def auth0(token:, domain: nil, base_url: nil, http_client: nil)
|
|
146
152
|
raise ArgumentError, 'auth0 needs token' if token.to_s.empty?
|
|
147
153
|
|
|
@@ -232,16 +238,16 @@ module NoResponse
|
|
|
232
238
|
(0...1000).each do |round|
|
|
233
239
|
page = Segment.sessions(@call.call('GET', '/sessions', query: [['user_id', user_id], %w[status active],
|
|
234
240
|
['limit', PAGE.to_s],
|
|
235
|
-
['offset', (round * PAGE).to_s]]))
|
|
241
|
+
['offset', (round * PAGE).to_s]], allow_404: true))
|
|
236
242
|
active.concat(Segment.active_ids(page))
|
|
237
243
|
break if page.length < PAGE
|
|
238
244
|
end
|
|
239
|
-
active.each { |id| @call.call('POST', "/sessions/#{ERB::Util.url_encode(id)}/revoke") }
|
|
245
|
+
active.each { |id| @call.call('POST', "/sessions/#{ERB::Util.url_encode(id)}/revoke", allow_404: true) }
|
|
240
246
|
nil
|
|
241
247
|
end
|
|
242
248
|
|
|
243
249
|
def ban(user_id)
|
|
244
|
-
@call.call('POST', "/users/#{Segment.encode(user_id)}/ban")
|
|
250
|
+
@call.call('POST', "/users/#{Segment.encode(user_id)}/ban", allow_404: true)
|
|
245
251
|
nil
|
|
246
252
|
end
|
|
247
253
|
end
|
|
@@ -260,14 +266,14 @@ module NoResponse
|
|
|
260
266
|
1000.times do
|
|
261
267
|
query = T.let([%w[limit 100]], T::Array[T::Array[String]])
|
|
262
268
|
query << ['after', after] if after
|
|
263
|
-
body = @call.call('GET', "/user_management/users/#{user}/sessions", query: query)
|
|
269
|
+
body = @call.call('GET', "/user_management/users/#{user}/sessions", query: query, allow_404: true)
|
|
264
270
|
active.concat(Segment.active_ids(Segment.sessions(body)))
|
|
265
271
|
nxt = body.is_a?(Hash) && body['list_metadata'].is_a?(Hash) ? body['list_metadata']['after'] : nil
|
|
266
272
|
break unless nxt.is_a?(String) && !nxt.empty?
|
|
267
273
|
|
|
268
274
|
after = nxt
|
|
269
275
|
end
|
|
270
|
-
active.each { |id| @call.call('POST', '/user_management/sessions/revoke', body: { 'session_id' => id }) }
|
|
276
|
+
active.each { |id| @call.call('POST', '/user_management/sessions/revoke', body: { 'session_id' => id }, allow_404: true) }
|
|
271
277
|
nil
|
|
272
278
|
end
|
|
273
279
|
|
|
@@ -287,13 +293,13 @@ module NoResponse
|
|
|
287
293
|
|
|
288
294
|
def revoke_sessions(user_id)
|
|
289
295
|
user = Segment.encode(user_id)
|
|
290
|
-
@call.call('DELETE', "/users/#{user}/sessions")
|
|
291
|
-
@call.call('DELETE', "/users/#{user}/refresh-tokens")
|
|
296
|
+
@call.call('DELETE', "/users/#{user}/sessions", allow_404: true)
|
|
297
|
+
@call.call('DELETE', "/users/#{user}/refresh-tokens", allow_404: true)
|
|
292
298
|
nil
|
|
293
299
|
end
|
|
294
300
|
|
|
295
301
|
def ban(user_id)
|
|
296
|
-
@call.call('PATCH', "/users/#{Segment.encode(user_id)}", body: { 'blocked' => true })
|
|
302
|
+
@call.call('PATCH', "/users/#{Segment.encode(user_id)}", body: { 'blocked' => true }, allow_404: true)
|
|
297
303
|
revoke_sessions(user_id)
|
|
298
304
|
end
|
|
299
305
|
end
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# typed: true
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
module NoResponse
|
|
5
|
+
module Models
|
|
6
|
+
module Operations
|
|
7
|
+
|
|
8
|
+
class CreateWebhookEndpointResponse
|
|
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::WebhookEndpointCreated, {}
|
|
15
|
+
|
|
16
|
+
sig {
|
|
17
|
+
params(headers: T::Hash[Symbol, T::Array[::String]], result: Models::Shared::WebhookEndpointCreated).void
|
|
18
|
+
}
|
|
19
|
+
def initialize(headers:, result:)
|
|
20
|
+
@headers = headers
|
|
21
|
+
@result = result
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
sig { params(other: T.untyped).returns(T::Boolean) }
|
|
25
|
+
def ==(other)
|
|
26
|
+
return false unless other.is_a?(self.class)
|
|
27
|
+
return false unless @headers == other.headers
|
|
28
|
+
return false unless @result == other.result
|
|
29
|
+
true
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# typed: true
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
class NoResponse::Models::Operations::CreateWebhookEndpointResponse
|
|
5
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
class NoResponse::Models::Operations::CreateWebhookEndpointResponse
|
|
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
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# typed: true
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
module NoResponse
|
|
5
|
+
module Models
|
|
6
|
+
module Operations
|
|
7
|
+
|
|
8
|
+
class DeleteWebhookEndpointRequest
|
|
9
|
+
extend T::Sig
|
|
10
|
+
include Crystalline::MetadataFields
|
|
11
|
+
|
|
12
|
+
# The endpoint's whe_ id. An id that is unknown, malformed or another tenant's answers 404.
|
|
13
|
+
field :endpoint_id, ::String, {'path_param': {'field_name': "endpoint_id", 'style': "simple", 'explode': false}}
|
|
14
|
+
|
|
15
|
+
sig { params(endpoint_id: ::String).void }
|
|
16
|
+
def initialize(endpoint_id:)
|
|
17
|
+
@endpoint_id = endpoint_id
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
sig { params(other: T.untyped).returns(T::Boolean) }
|
|
21
|
+
def ==(other)
|
|
22
|
+
return false unless other.is_a?(self.class)
|
|
23
|
+
return false unless @endpoint_id == other.endpoint_id
|
|
24
|
+
true
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# typed: true
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
class NoResponse::Models::Operations::DeleteWebhookEndpointRequest
|
|
5
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
class NoResponse::Models::Operations::DeleteWebhookEndpointRequest
|
|
9
|
+
def endpoint_id
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def endpoint_id=(str_)
|
|
13
|
+
end
|
|
14
|
+
end
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# typed: true
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
module NoResponse
|
|
5
|
+
module Models
|
|
6
|
+
module Operations
|
|
7
|
+
|
|
8
|
+
class DeleteWebhookEndpointResponse
|
|
9
|
+
extend T::Sig
|
|
10
|
+
include Crystalline::MetadataFields
|
|
11
|
+
|
|
12
|
+
field :headers, Crystalline::Hash.new(Symbol, Crystalline::Array.new(::String))
|
|
13
|
+
|
|
14
|
+
sig { params(headers: T::Hash[Symbol, T::Array[::String]]).void }
|
|
15
|
+
def initialize(headers:)
|
|
16
|
+
@headers = headers
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
sig { params(other: T.untyped).returns(T::Boolean) }
|
|
20
|
+
def ==(other)
|
|
21
|
+
return false unless other.is_a?(self.class)
|
|
22
|
+
return false unless @headers == other.headers
|
|
23
|
+
true
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# typed: true
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
class NoResponse::Models::Operations::DeleteWebhookEndpointResponse
|
|
5
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
class NoResponse::Models::Operations::DeleteWebhookEndpointResponse
|
|
9
|
+
def headers
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def headers=(str_)
|
|
13
|
+
end
|
|
14
|
+
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 ListWebhookEndpointsResponse
|
|
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::WebhookEndpointList, {}
|
|
15
|
+
|
|
16
|
+
sig { params(headers: T::Hash[Symbol, T::Array[::String]], result: Models::Shared::WebhookEndpointList).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::ListWebhookEndpointsResponse
|
|
5
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
class NoResponse::Models::Operations::ListWebhookEndpointsResponse
|
|
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
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# typed: true
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
module NoResponse
|
|
5
|
+
module Models
|
|
6
|
+
module Operations
|
|
7
|
+
|
|
8
|
+
class RotateWebhookSigningKeyRequest
|
|
9
|
+
extend T::Sig
|
|
10
|
+
include Crystalline::MetadataFields
|
|
11
|
+
|
|
12
|
+
# The endpoint's whe_ id. An id that is unknown, malformed or another tenant's answers 404.
|
|
13
|
+
field :endpoint_id, ::String, {'path_param': {'field_name': "endpoint_id", 'style': "simple", 'explode': false}}
|
|
14
|
+
|
|
15
|
+
field :body, Models::Shared::WebhookKeyRotationRequest, {'request': {'media_type': "application/json"}}
|
|
16
|
+
|
|
17
|
+
sig { params(endpoint_id: ::String, body: Models::Shared::WebhookKeyRotationRequest).void }
|
|
18
|
+
def initialize(endpoint_id:, body:)
|
|
19
|
+
@endpoint_id = endpoint_id
|
|
20
|
+
@body = body
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
sig { params(other: T.untyped).returns(T::Boolean) }
|
|
24
|
+
def ==(other)
|
|
25
|
+
return false unless other.is_a?(self.class)
|
|
26
|
+
return false unless @endpoint_id == other.endpoint_id
|
|
27
|
+
return false unless @body == other.body
|
|
28
|
+
true
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# typed: true
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
class NoResponse::Models::Operations::RotateWebhookSigningKeyRequest
|
|
5
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
class NoResponse::Models::Operations::RotateWebhookSigningKeyRequest
|
|
9
|
+
def endpoint_id
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def endpoint_id=(str_)
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
def body
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
def body=(str_)
|
|
19
|
+
end
|
|
20
|
+
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 RotateWebhookSigningKeyResponse
|
|
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::WebhookKeyRotation, {}
|
|
15
|
+
|
|
16
|
+
sig { params(headers: T::Hash[Symbol, T::Array[::String]], result: Models::Shared::WebhookKeyRotation).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::RotateWebhookSigningKeyResponse
|
|
5
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
class NoResponse::Models::Operations::RotateWebhookSigningKeyResponse
|
|
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
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# typed: true
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
module NoResponse
|
|
5
|
+
module Models
|
|
6
|
+
module Operations
|
|
7
|
+
|
|
8
|
+
class SendWebhookTestEventRequest
|
|
9
|
+
extend T::Sig
|
|
10
|
+
include Crystalline::MetadataFields
|
|
11
|
+
|
|
12
|
+
# The endpoint's whe_ id. An id that is unknown, malformed or another tenant's answers 404.
|
|
13
|
+
field :endpoint_id, ::String, {'path_param': {'field_name': "endpoint_id", 'style': "simple", 'explode': false}}
|
|
14
|
+
|
|
15
|
+
field :body, Models::Shared::WebhookTestRequest, {'request': {'media_type': "application/json"}}
|
|
16
|
+
|
|
17
|
+
sig { params(endpoint_id: ::String, body: Models::Shared::WebhookTestRequest).void }
|
|
18
|
+
def initialize(endpoint_id:, body:)
|
|
19
|
+
@endpoint_id = endpoint_id
|
|
20
|
+
@body = body
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
sig { params(other: T.untyped).returns(T::Boolean) }
|
|
24
|
+
def ==(other)
|
|
25
|
+
return false unless other.is_a?(self.class)
|
|
26
|
+
return false unless @endpoint_id == other.endpoint_id
|
|
27
|
+
return false unless @body == other.body
|
|
28
|
+
true
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# typed: true
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
class NoResponse::Models::Operations::SendWebhookTestEventRequest
|
|
5
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
class NoResponse::Models::Operations::SendWebhookTestEventRequest
|
|
9
|
+
def endpoint_id
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def endpoint_id=(str_)
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
def body
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
def body=(str_)
|
|
19
|
+
end
|
|
20
|
+
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 SendWebhookTestEventResponse
|
|
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::WebhookTest, {}
|
|
15
|
+
|
|
16
|
+
sig { params(headers: T::Hash[Symbol, T::Array[::String]], result: Models::Shared::WebhookTest).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::SendWebhookTestEventResponse
|
|
5
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
class NoResponse::Models::Operations::SendWebhookTestEventResponse
|
|
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
|
|
@@ -7,17 +7,25 @@ module NoResponse
|
|
|
7
7
|
autoload :CreateAssessmentRequest, "no_response/models/operations/createassessment_request.rb"
|
|
8
8
|
autoload :CreateAssessmentResponse, "no_response/models/operations/createassessment_response.rb"
|
|
9
9
|
autoload :CreateIntegrationResponse, "no_response/models/operations/createintegration_response.rb"
|
|
10
|
+
autoload :CreateWebhookEndpointResponse, "no_response/models/operations/createwebhookendpoint_response.rb"
|
|
10
11
|
autoload :DeleteIntegrationRequest, "no_response/models/operations/deleteintegration_request.rb"
|
|
11
12
|
autoload :DeleteIntegrationResponse, "no_response/models/operations/deleteintegration_response.rb"
|
|
13
|
+
autoload :DeleteWebhookEndpointRequest, "no_response/models/operations/deletewebhookendpoint_request.rb"
|
|
14
|
+
autoload :DeleteWebhookEndpointResponse, "no_response/models/operations/deletewebhookendpoint_response.rb"
|
|
12
15
|
autoload :GetAssessmentRequest, "no_response/models/operations/getassessment_request.rb"
|
|
13
16
|
autoload :GetAssessmentResponse, "no_response/models/operations/getassessment_response.rb"
|
|
14
17
|
autoload :ListIntegrationsResponse, "no_response/models/operations/listintegrations_response.rb"
|
|
18
|
+
autoload :ListWebhookEndpointsResponse, "no_response/models/operations/listwebhookendpoints_response.rb"
|
|
15
19
|
autoload :QueryAccountAssessmentsResponse, "no_response/models/operations/queryaccountassessments_response.rb"
|
|
16
20
|
autoload :RecordAssessmentOutcomeRequest, "no_response/models/operations/recordassessmentoutcome_request.rb"
|
|
17
21
|
autoload :RecordAssessmentOutcomeResponse, "no_response/models/operations/recordassessmentoutcome_response.rb"
|
|
18
22
|
autoload :RotateApiKeyResponse, "no_response/models/operations/rotateapikey_response.rb"
|
|
19
23
|
autoload :RotateIntegrationSecretRequest, "no_response/models/operations/rotateintegrationsecret_request.rb"
|
|
20
24
|
autoload :RotateIntegrationSecretResponse, "no_response/models/operations/rotateintegrationsecret_response.rb"
|
|
25
|
+
autoload :RotateWebhookSigningKeyRequest, "no_response/models/operations/rotatewebhooksigningkey_request.rb"
|
|
26
|
+
autoload :RotateWebhookSigningKeyResponse, "no_response/models/operations/rotatewebhooksigningkey_response.rb"
|
|
27
|
+
autoload :SendWebhookTestEventRequest, "no_response/models/operations/sendwebhooktestevent_request.rb"
|
|
28
|
+
autoload :SendWebhookTestEventResponse, "no_response/models/operations/sendwebhooktestevent_response.rb"
|
|
21
29
|
end
|
|
22
30
|
end
|
|
23
31
|
end
|
|
@@ -134,6 +134,12 @@ module NoResponse
|
|
|
134
134
|
Crystalline::Nilable.new(::String),
|
|
135
135
|
{'format_json': {'letter_case': ::NoResponse::Utils.field_name("assessment_url")}}
|
|
136
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::AssessmentAuthContext),
|
|
141
|
+
{'format_json': {'letter_case': ::NoResponse::Utils.field_name("auth_context")}}
|
|
142
|
+
)
|
|
137
143
|
|
|
138
144
|
sig {
|
|
139
145
|
params(
|
|
@@ -154,7 +160,8 @@ module NoResponse
|
|
|
154
160
|
risk: T.nilable(Models::Shared::Risk),
|
|
155
161
|
signals: T.nilable(T::Array[Models::Shared::Signal]),
|
|
156
162
|
policy_basis: ::String,
|
|
157
|
-
assessment_url: T.nilable(::String)
|
|
163
|
+
assessment_url: T.nilable(::String),
|
|
164
|
+
auth_context: T.nilable(Models::Shared::AssessmentAuthContext)
|
|
158
165
|
)
|
|
159
166
|
.void
|
|
160
167
|
}
|
|
@@ -176,7 +183,8 @@ module NoResponse
|
|
|
176
183
|
risk: nil,
|
|
177
184
|
signals: nil,
|
|
178
185
|
policy_basis: "heuristic_unvalidated",
|
|
179
|
-
assessment_url: nil
|
|
186
|
+
assessment_url: nil,
|
|
187
|
+
auth_context: nil
|
|
180
188
|
)
|
|
181
189
|
@assessment_id = assessment_id
|
|
182
190
|
@account_id = account_id
|
|
@@ -204,6 +212,7 @@ module NoResponse
|
|
|
204
212
|
|
|
205
213
|
@policy_basis = "heuristic_unvalidated"
|
|
206
214
|
@assessment_url = assessment_url
|
|
215
|
+
@auth_context = auth_context
|
|
207
216
|
end
|
|
208
217
|
|
|
209
218
|
sig { params(other: T.untyped).returns(T::Boolean) }
|
|
@@ -227,6 +236,7 @@ module NoResponse
|
|
|
227
236
|
return false unless @signals == other.signals
|
|
228
237
|
return false unless @policy_basis == other.policy_basis
|
|
229
238
|
return false unless @assessment_url == other.assessment_url
|
|
239
|
+
return false unless @auth_context == other.auth_context
|
|
230
240
|
true
|
|
231
241
|
end
|
|
232
242
|
end
|