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.
Files changed (64) hide show
  1. checksums.yaml +4 -4
  2. data/lib/no_response/integrations.rb +1 -1
  3. data/lib/no_response/late_results.rb +23 -17
  4. data/lib/no_response/models/operations/createwebhookendpoint_response.rb +34 -0
  5. data/lib/no_response/models/operations/createwebhookendpoint_response.rbi +20 -0
  6. data/lib/no_response/models/operations/deletewebhookendpoint_request.rb +29 -0
  7. data/lib/no_response/models/operations/deletewebhookendpoint_request.rbi +14 -0
  8. data/lib/no_response/models/operations/deletewebhookendpoint_response.rb +28 -0
  9. data/lib/no_response/models/operations/deletewebhookendpoint_response.rbi +14 -0
  10. data/lib/no_response/models/operations/listwebhookendpoints_response.rb +32 -0
  11. data/lib/no_response/models/operations/listwebhookendpoints_response.rbi +20 -0
  12. data/lib/no_response/models/operations/rotatewebhooksigningkey_request.rb +33 -0
  13. data/lib/no_response/models/operations/rotatewebhooksigningkey_request.rbi +20 -0
  14. data/lib/no_response/models/operations/rotatewebhooksigningkey_response.rb +32 -0
  15. data/lib/no_response/models/operations/rotatewebhooksigningkey_response.rbi +20 -0
  16. data/lib/no_response/models/operations/sendwebhooktestevent_request.rb +33 -0
  17. data/lib/no_response/models/operations/sendwebhooktestevent_request.rbi +20 -0
  18. data/lib/no_response/models/operations/sendwebhooktestevent_response.rb +32 -0
  19. data/lib/no_response/models/operations/sendwebhooktestevent_response.rbi +20 -0
  20. data/lib/no_response/models/operations.rb +8 -0
  21. data/lib/no_response/models/shared/assessment.rb +12 -2
  22. data/lib/no_response/models/shared/assessment.rbi +6 -0
  23. data/lib/no_response/models/shared/assessmentauthcontext.rb +121 -0
  24. data/lib/no_response/models/shared/assessmentauthcontext.rbi +56 -0
  25. data/lib/no_response/models/shared/assessmentquery.rb +1 -1
  26. data/lib/no_response/models/shared/assessmentrequest.rb +1 -1
  27. data/lib/no_response/models/shared/authcontext.rb +4 -4
  28. data/lib/no_response/models/shared/badrequesterrorcode.rb +1 -0
  29. data/lib/no_response/models/shared/conflicterrorcode.rb +2 -0
  30. data/lib/no_response/models/shared/hookpoint.rb +5 -2
  31. data/lib/no_response/models/shared/responsemode.rb +4 -1
  32. data/lib/no_response/models/shared/security.rb +3 -3
  33. data/lib/no_response/models/shared/signingkey.rb +49 -0
  34. data/lib/no_response/models/shared/signingkey.rbi +26 -0
  35. data/lib/no_response/models/shared/signingsecret.rb +49 -0
  36. data/lib/no_response/models/shared/signingsecret.rbi +26 -0
  37. data/lib/no_response/models/shared/transport.rb +5 -2
  38. data/lib/no_response/models/shared/webhookendpoint.rb +100 -0
  39. data/lib/no_response/models/shared/webhookendpoint.rbi +50 -0
  40. data/lib/no_response/models/shared/webhookendpointcreated.rb +41 -0
  41. data/lib/no_response/models/shared/webhookendpointcreated.rbi +20 -0
  42. data/lib/no_response/models/shared/webhookendpointlist.rb +32 -0
  43. data/lib/no_response/models/shared/webhookendpointlist.rbi +14 -0
  44. data/lib/no_response/models/shared/webhookendpointrequest.rb +42 -0
  45. data/lib/no_response/models/shared/webhookendpointrequest.rbi +20 -0
  46. data/lib/no_response/models/shared/webhookendpointstate.rb +20 -0
  47. data/lib/no_response/models/shared/webhookendpointstate.rbi +9 -0
  48. data/lib/no_response/models/shared/webhookkeyrotation.rb +65 -0
  49. data/lib/no_response/models/shared/webhookkeyrotation.rbi +32 -0
  50. data/lib/no_response/models/shared/webhookkeyrotationrequest.rb +23 -0
  51. data/lib/no_response/models/shared/webhookkeyrotationrequest.rbi +9 -0
  52. data/lib/no_response/models/shared/webhooktest.rb +86 -0
  53. data/lib/no_response/models/shared/webhooktest.rbi +38 -0
  54. data/lib/no_response/models/shared/webhooktestrequest.rb +39 -0
  55. data/lib/no_response/models/shared/webhooktestrequest.rbi +14 -0
  56. data/lib/no_response/models/shared/webhooktestrequestevent.rb +19 -0
  57. data/lib/no_response/models/shared/webhooktestrequestevent.rbi +9 -0
  58. data/lib/no_response/models/shared.rb +13 -0
  59. data/lib/no_response/noresponseclient.rb +2 -1
  60. data/lib/no_response/sdkconfiguration.rb +5 -2
  61. data/lib/no_response/webhookendpoints.rb +1444 -0
  62. data/lib/no_response/webhooks.rb +7 -2
  63. data/lib/noresponse.rb +1 -0
  64. metadata +45 -2
@@ -0,0 +1,20 @@
1
+ # typed: true
2
+ # frozen_string_literal: true
3
+
4
+ class NoResponse::Models::Shared::WebhookEndpointCreated
5
+ extend ::Crystalline::MetadataFields::ClassMethods
6
+ end
7
+
8
+ class NoResponse::Models::Shared::WebhookEndpointCreated
9
+ def endpoint
10
+ end
11
+
12
+ def endpoint=(str_)
13
+ end
14
+
15
+ def signing_secret
16
+ end
17
+
18
+ def signing_secret=(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 Shared
7
+ # GET /v1/webhooks answer: every endpoint of the calling tenant, in every state, ordered by endpoint_id. A tenant holds at most 5, so there is no page.
8
+ class WebhookEndpointList
9
+ extend T::Sig
10
+ include Crystalline::MetadataFields
11
+
12
+ field(
13
+ :items,
14
+ Crystalline::Array.new(Models::Shared::WebhookEndpoint),
15
+ {'format_json': {'letter_case': ::NoResponse::Utils.field_name("items"), required: true}}
16
+ )
17
+
18
+ sig { params(items: T::Array[Models::Shared::WebhookEndpoint]).void }
19
+ def initialize(items:)
20
+ @items = items
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 @items == other.items
27
+ true
28
+ end
29
+ end
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,14 @@
1
+ # typed: true
2
+ # frozen_string_literal: true
3
+
4
+ class NoResponse::Models::Shared::WebhookEndpointList
5
+ extend ::Crystalline::MetadataFields::ClassMethods
6
+ end
7
+
8
+ class NoResponse::Models::Shared::WebhookEndpointList
9
+ def items
10
+ end
11
+
12
+ def items=(str_)
13
+ end
14
+ end
@@ -0,0 +1,42 @@
1
+ # typed: true
2
+ # frozen_string_literal: true
3
+
4
+ module NoResponse
5
+ module Models
6
+ module Shared
7
+ # POST /v1/webhooks body. The tenant is the API key that signs the request, so it is not a body member. The URL must be https on port 443 or 8443 with a DNS name, not an IP literal, and every address the name resolves to must be public.
8
+ class WebhookEndpointRequest
9
+ extend T::Sig
10
+ include Crystalline::MetadataFields
11
+
12
+ # Where deliveries are sent: an https URL on port 443 or 8443, with a DNS host and no userinfo or fragment, at most 2048 characters.
13
+ field :url, ::String, {'format_json': {'letter_case': ::NoResponse::Utils.field_name("url"), required: true}}
14
+ # standard returns the consolidated risk response; detailed adds merged provider-neutral facts when the key has detailed scope. There is no raw mode.
15
+ field(
16
+ :response_mode,
17
+ Crystalline::Nilable.new(Models::Shared::ResponseMode),
18
+ {
19
+ 'format_json': {
20
+ 'letter_case': ::NoResponse::Utils.field_name("response_mode"),
21
+ 'decoder': ::NoResponse::Utils.open_enum_from_string(Models::Shared::ResponseMode, true)
22
+ }
23
+ }
24
+ )
25
+
26
+ sig { params(url: ::String, response_mode: T.nilable(Models::Shared::ResponseMode)).void }
27
+ def initialize(url:, response_mode: nil)
28
+ @url = url
29
+ @response_mode = response_mode
30
+ end
31
+
32
+ sig { params(other: T.untyped).returns(T::Boolean) }
33
+ def ==(other)
34
+ return false unless other.is_a?(self.class)
35
+ return false unless @url == other.url
36
+ return false unless @response_mode == other.response_mode
37
+ true
38
+ end
39
+ end
40
+ end
41
+ end
42
+ end
@@ -0,0 +1,20 @@
1
+ # typed: true
2
+ # frozen_string_literal: true
3
+
4
+ class NoResponse::Models::Shared::WebhookEndpointRequest
5
+ extend ::Crystalline::MetadataFields::ClassMethods
6
+ end
7
+
8
+ class NoResponse::Models::Shared::WebhookEndpointRequest
9
+ def url
10
+ end
11
+
12
+ def url=(str_)
13
+ end
14
+
15
+ def response_mode
16
+ end
17
+
18
+ def response_mode=(str_)
19
+ end
20
+ end
@@ -0,0 +1,20 @@
1
+ # typed: true
2
+ # frozen_string_literal: true
3
+
4
+ module NoResponse
5
+ module Models
6
+ module Shared
7
+ # WebhookEndpointState - unverified until the endpoint echoes an endpoint.verification challenge (send one with POST /v1/webhooks/{endpoint_id}/test); verified receives assessment.updated events; disabled after 72 hours of continuous delivery failure, and verified again by the same challenge.
8
+ class WebhookEndpointState
9
+ include ::Crystalline::Enum
10
+ enums do
11
+ UNVERIFIED = new("unverified")
12
+ VERIFIED = new("verified")
13
+ DISABLED = new("disabled")
14
+ end
15
+
16
+ open!
17
+ end
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,9 @@
1
+ # typed: true
2
+ # frozen_string_literal: true
3
+
4
+ class NoResponse::Models::Shared::WebhookEndpointState
5
+ extend ::Crystalline::MetadataFields::ClassMethods
6
+ end
7
+
8
+ class NoResponse::Models::Shared::WebhookEndpointState
9
+ end
@@ -0,0 +1,65 @@
1
+ # typed: true
2
+ # frozen_string_literal: true
3
+
4
+ module NoResponse
5
+ module Models
6
+ module Shared
7
+ # The 201 answer of POST /v1/webhooks/{endpoint_id}/rotate: the new signing secret, shown once, which signs every delivery from now on, and when the key it replaced stops verifying. Until then a receiver accepts both.
8
+ class WebhookKeyRotation
9
+ extend T::Sig
10
+ include Crystalline::MetadataFields
11
+
12
+ # Opaque id of the endpoint registration.
13
+ field(
14
+ :endpoint_id,
15
+ ::String,
16
+ {'format_json': {'letter_case': ::NoResponse::Utils.field_name("endpoint_id"), required: true}}
17
+ )
18
+ # A newly issued signing key with its secret, shown only in this answer. A receiver verifies NR-Webhook-Signature with the secret's UTF-8 bytes as the HMAC-SHA256 key.
19
+ field(
20
+ :signing_secret,
21
+ Models::Shared::SigningSecret,
22
+ {'format_json': {'letter_case': ::NoResponse::Utils.field_name("signing_secret"), required: true}}
23
+ )
24
+ # The key that signed until this rotation.
25
+ field(
26
+ :previous_key_id,
27
+ ::String,
28
+ {'format_json': {'letter_case': ::NoResponse::Utils.field_name("previous_key_id"), required: true}}
29
+ )
30
+ # When the previous key stops verifying: 7 days after the rotation.
31
+ field(
32
+ :previous_key_expires_at,
33
+ ::String,
34
+ {'format_json': {'letter_case': ::NoResponse::Utils.field_name("previous_key_expires_at"), required: true}}
35
+ )
36
+
37
+ sig {
38
+ params(
39
+ endpoint_id: ::String,
40
+ signing_secret: Models::Shared::SigningSecret,
41
+ previous_key_id: ::String,
42
+ previous_key_expires_at: ::String
43
+ )
44
+ .void
45
+ }
46
+ def initialize(endpoint_id:, signing_secret:, previous_key_id:, previous_key_expires_at:)
47
+ @endpoint_id = endpoint_id
48
+ @signing_secret = signing_secret
49
+ @previous_key_id = previous_key_id
50
+ @previous_key_expires_at = previous_key_expires_at
51
+ end
52
+
53
+ sig { params(other: T.untyped).returns(T::Boolean) }
54
+ def ==(other)
55
+ return false unless other.is_a?(self.class)
56
+ return false unless @endpoint_id == other.endpoint_id
57
+ return false unless @signing_secret == other.signing_secret
58
+ return false unless @previous_key_id == other.previous_key_id
59
+ return false unless @previous_key_expires_at == other.previous_key_expires_at
60
+ true
61
+ end
62
+ end
63
+ end
64
+ end
65
+ end
@@ -0,0 +1,32 @@
1
+ # typed: true
2
+ # frozen_string_literal: true
3
+
4
+ class NoResponse::Models::Shared::WebhookKeyRotation
5
+ extend ::Crystalline::MetadataFields::ClassMethods
6
+ end
7
+
8
+ class NoResponse::Models::Shared::WebhookKeyRotation
9
+ def endpoint_id
10
+ end
11
+
12
+ def endpoint_id=(str_)
13
+ end
14
+
15
+ def signing_secret
16
+ end
17
+
18
+ def signing_secret=(str_)
19
+ end
20
+
21
+ def previous_key_id
22
+ end
23
+
24
+ def previous_key_id=(str_)
25
+ end
26
+
27
+ def previous_key_expires_at
28
+ end
29
+
30
+ def previous_key_expires_at=(str_)
31
+ end
32
+ end
@@ -0,0 +1,23 @@
1
+ # typed: true
2
+ # frozen_string_literal: true
3
+
4
+ module NoResponse
5
+ module Models
6
+ module Shared
7
+ # POST /v1/webhooks/{endpoint_id}/rotate body: an empty object. The old key keeps verifying for 7 days.
8
+ class WebhookKeyRotationRequest
9
+ extend T::Sig
10
+ include Crystalline::MetadataFields
11
+
12
+ def initialize
13
+ end
14
+
15
+ sig { params(other: T.untyped).returns(T::Boolean) }
16
+ def ==(other)
17
+ return false unless other.is_a?(self.class)
18
+ true
19
+ end
20
+ end
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,9 @@
1
+ # typed: true
2
+ # frozen_string_literal: true
3
+
4
+ class NoResponse::Models::Shared::WebhookKeyRotationRequest
5
+ extend ::Crystalline::MetadataFields::ClassMethods
6
+ end
7
+
8
+ class NoResponse::Models::Shared::WebhookKeyRotationRequest
9
+ end
@@ -0,0 +1,86 @@
1
+ # typed: true
2
+ # frozen_string_literal: true
3
+
4
+ module NoResponse
5
+ module Models
6
+ module Shared
7
+ # The 202 answer of POST /v1/webhooks/{endpoint_id}/test: the event that was sent or queued.
8
+ class WebhookTest
9
+ extend T::Sig
10
+ include Crystalline::MetadataFields
11
+
12
+ # The event id the receiver sees as NR-Webhook-Id and as the body's id.
13
+ field(
14
+ :delivery_id,
15
+ ::String,
16
+ {'format_json': {'letter_case': ::NoResponse::Utils.field_name("delivery_id"), required: true}}
17
+ )
18
+ # Opaque id of the endpoint registration.
19
+ field(
20
+ :endpoint_id,
21
+ ::String,
22
+ {'format_json': {'letter_case': ::NoResponse::Utils.field_name("endpoint_id"), required: true}}
23
+ )
24
+ # endpoint.verification sends a fresh challenge now, in this call, and the endpoint is verified if it echoes it. assessment.updated queues an event whose data is a fixed example assessment, with test true, delivered and retried like any other; the endpoint must be verified.
25
+ field(
26
+ :event,
27
+ Models::Shared::WebhookTestRequestEvent,
28
+ {
29
+ 'format_json': {
30
+ 'letter_case': ::NoResponse::Utils.field_name("event"),
31
+ required: true,
32
+ 'decoder': ::NoResponse::Utils.open_enum_from_string(Models::Shared::WebhookTestRequestEvent, false)
33
+ }
34
+ }
35
+ )
36
+ # unverified until the endpoint echoes an endpoint.verification challenge (send one with POST /v1/webhooks/{endpoint_id}/test); verified receives assessment.updated events; disabled after 72 hours of continuous delivery failure, and verified again by the same challenge.
37
+ field(
38
+ :state,
39
+ Models::Shared::WebhookEndpointState,
40
+ {
41
+ 'format_json': {
42
+ 'letter_case': ::NoResponse::Utils.field_name("state"),
43
+ required: true,
44
+ 'decoder': ::NoResponse::Utils.open_enum_from_string(Models::Shared::WebhookEndpointState, false)
45
+ }
46
+ }
47
+ )
48
+ # endpoint.verification only: true when the endpoint echoed the challenge within 5 seconds. A false answer leaves the endpoint's state as it was.
49
+ field(
50
+ :verified,
51
+ Crystalline::Nilable.new(Crystalline::Boolean.new),
52
+ {'format_json': {'letter_case': ::NoResponse::Utils.field_name("verified")}}
53
+ )
54
+
55
+ sig {
56
+ params(
57
+ delivery_id: ::String,
58
+ endpoint_id: ::String,
59
+ event: Models::Shared::WebhookTestRequestEvent,
60
+ state: Models::Shared::WebhookEndpointState,
61
+ verified: T.nilable(T::Boolean)
62
+ )
63
+ .void
64
+ }
65
+ def initialize(delivery_id:, endpoint_id:, event:, state:, verified: nil)
66
+ @delivery_id = delivery_id
67
+ @endpoint_id = endpoint_id
68
+ @event = event
69
+ @state = state
70
+ @verified = verified
71
+ end
72
+
73
+ sig { params(other: T.untyped).returns(T::Boolean) }
74
+ def ==(other)
75
+ return false unless other.is_a?(self.class)
76
+ return false unless @delivery_id == other.delivery_id
77
+ return false unless @endpoint_id == other.endpoint_id
78
+ return false unless @event == other.event
79
+ return false unless @state == other.state
80
+ return false unless @verified == other.verified
81
+ true
82
+ end
83
+ end
84
+ end
85
+ end
86
+ end
@@ -0,0 +1,38 @@
1
+ # typed: true
2
+ # frozen_string_literal: true
3
+
4
+ class NoResponse::Models::Shared::WebhookTest
5
+ extend ::Crystalline::MetadataFields::ClassMethods
6
+ end
7
+
8
+ class NoResponse::Models::Shared::WebhookTest
9
+ def delivery_id
10
+ end
11
+
12
+ def delivery_id=(str_)
13
+ end
14
+
15
+ def endpoint_id
16
+ end
17
+
18
+ def endpoint_id=(str_)
19
+ end
20
+
21
+ def event
22
+ end
23
+
24
+ def event=(str_)
25
+ end
26
+
27
+ def state
28
+ end
29
+
30
+ def state=(str_)
31
+ end
32
+
33
+ def verified
34
+ end
35
+
36
+ def verified=(str_)
37
+ end
38
+ end
@@ -0,0 +1,39 @@
1
+ # typed: true
2
+ # frozen_string_literal: true
3
+
4
+ module NoResponse
5
+ module Models
6
+ module Shared
7
+ # POST /v1/webhooks/{endpoint_id}/test body: which event to send.
8
+ class WebhookTestRequest
9
+ extend T::Sig
10
+ include Crystalline::MetadataFields
11
+
12
+ # endpoint.verification sends a fresh challenge now, in this call, and the endpoint is verified if it echoes it. assessment.updated queues an event whose data is a fixed example assessment, with test true, delivered and retried like any other; the endpoint must be verified.
13
+ field(
14
+ :event,
15
+ Models::Shared::WebhookTestRequestEvent,
16
+ {
17
+ 'format_json': {
18
+ 'letter_case': ::NoResponse::Utils.field_name("event"),
19
+ required: true,
20
+ 'decoder': ::NoResponse::Utils.open_enum_from_string(Models::Shared::WebhookTestRequestEvent, false)
21
+ }
22
+ }
23
+ )
24
+
25
+ sig { params(event: Models::Shared::WebhookTestRequestEvent).void }
26
+ def initialize(event:)
27
+ @event = event
28
+ end
29
+
30
+ sig { params(other: T.untyped).returns(T::Boolean) }
31
+ def ==(other)
32
+ return false unless other.is_a?(self.class)
33
+ return false unless @event == other.event
34
+ true
35
+ end
36
+ end
37
+ end
38
+ end
39
+ end
@@ -0,0 +1,14 @@
1
+ # typed: true
2
+ # frozen_string_literal: true
3
+
4
+ class NoResponse::Models::Shared::WebhookTestRequest
5
+ extend ::Crystalline::MetadataFields::ClassMethods
6
+ end
7
+
8
+ class NoResponse::Models::Shared::WebhookTestRequest
9
+ def event
10
+ end
11
+
12
+ def event=(str_)
13
+ end
14
+ end
@@ -0,0 +1,19 @@
1
+ # typed: true
2
+ # frozen_string_literal: true
3
+
4
+ module NoResponse
5
+ module Models
6
+ module Shared
7
+ # WebhookTestRequestEvent - endpoint.verification sends a fresh challenge now, in this call, and the endpoint is verified if it echoes it. assessment.updated queues an event whose data is a fixed example assessment, with test true, delivered and retried like any other; the endpoint must be verified.
8
+ class WebhookTestRequestEvent
9
+ include ::Crystalline::Enum
10
+ enums do
11
+ ENDPOINT_VERIFICATION = new("endpoint.verification")
12
+ ASSESSMENT_UPDATED = new("assessment.updated")
13
+ end
14
+
15
+ open!
16
+ end
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,9 @@
1
+ # typed: true
2
+ # frozen_string_literal: true
3
+
4
+ class NoResponse::Models::Shared::WebhookTestRequestEvent
5
+ extend ::Crystalline::MetadataFields::ClassMethods
6
+ end
7
+
8
+ class NoResponse::Models::Shared::WebhookTestRequestEvent
9
+ end
@@ -5,6 +5,7 @@ module NoResponse
5
5
  module Models
6
6
  module Shared
7
7
  autoload :Assessment, "no_response/models/shared/assessment.rb"
8
+ autoload :AssessmentAuthContext, "no_response/models/shared/assessmentauthcontext.rb"
8
9
  autoload :AssessmentList, "no_response/models/shared/assessmentlist.rb"
9
10
  autoload :AssessmentOutcome, "no_response/models/shared/assessmentoutcome.rb"
10
11
  autoload :AssessmentOutcomeRequest, "no_response/models/shared/assessmentoutcomerequest.rb"
@@ -76,8 +77,20 @@ module NoResponse
76
77
  autoload :Security, "no_response/models/shared/security.rb"
77
78
  autoload :Signal, "no_response/models/shared/signal.rb"
78
79
  autoload :SignalOutcome, "no_response/models/shared/signaloutcome.rb"
80
+ autoload :SigningKey, "no_response/models/shared/signingkey.rb"
81
+ autoload :SigningSecret, "no_response/models/shared/signingsecret.rb"
79
82
  autoload :Status, "no_response/models/shared/status.rb"
80
83
  autoload :Transport, "no_response/models/shared/transport.rb"
84
+ autoload :WebhookEndpoint, "no_response/models/shared/webhookendpoint.rb"
85
+ autoload :WebhookEndpointCreated, "no_response/models/shared/webhookendpointcreated.rb"
86
+ autoload :WebhookEndpointList, "no_response/models/shared/webhookendpointlist.rb"
87
+ autoload :WebhookEndpointRequest, "no_response/models/shared/webhookendpointrequest.rb"
88
+ autoload :WebhookEndpointState, "no_response/models/shared/webhookendpointstate.rb"
89
+ autoload :WebhookKeyRotation, "no_response/models/shared/webhookkeyrotation.rb"
90
+ autoload :WebhookKeyRotationRequest, "no_response/models/shared/webhookkeyrotationrequest.rb"
91
+ autoload :WebhookTest, "no_response/models/shared/webhooktest.rb"
92
+ autoload :WebhookTestRequest, "no_response/models/shared/webhooktestrequest.rb"
93
+ autoload :WebhookTestRequestEvent, "no_response/models/shared/webhooktestrequestevent.rb"
81
94
  autoload :AlternateName, "no_response/models/shared/alternate_name.rb"
82
95
  autoload :AlternateNameUnion, "no_response/models/shared/alternate_name_union.rb"
83
96
  autoload :Email, "no_response/models/shared/email.rb"
@@ -15,7 +15,7 @@ module NoResponse
15
15
  class NoResponseClient
16
16
  extend T::Sig
17
17
 
18
- attr_accessor :assessments, :keys, :integrations
18
+ attr_accessor :assessments, :keys, :integrations, :webhook_endpoints
19
19
 
20
20
  # Instantiates the SDK, configuring it with the provided parameters.
21
21
  #
@@ -90,6 +90,7 @@ module NoResponse
90
90
  @assessments = Assessments.new(@sdk_configuration)
91
91
  @keys = Keys.new(@sdk_configuration)
92
92
  @integrations = Integrations.new(@sdk_configuration)
93
+ @webhook_endpoints = WebhookEndpoints.new(@sdk_configuration)
93
94
  end
94
95
 
95
96
  sig { params(base_url: String, url_variables: T.nilable(T::Hash[Symbol, T.any(String, T::Enum)])).returns(String) }
@@ -88,13 +88,16 @@ module NoResponse
88
88
  @security_source = security_source
89
89
  elsif !api_key.nil?
90
90
  @security_source = -> { Models::Shared::Security.new(api_key: api_key) }
91
+ elsif !ENV.fetch("NORESPONSE_API_KEY", "").empty?
92
+ env_security = Models::Shared::Security.new(api_key: ENV.fetch("NORESPONSE_API_KEY"))
93
+ @security_source = -> { env_security }
91
94
  end
92
95
 
93
96
  @language = "ruby"
94
97
  @openapi_doc_version = "1"
95
- @sdk_version = "2.0.18"
98
+ @sdk_version = "2.1.0"
96
99
  @gen_version = "internal"
97
- @user_agent = "noresponse-sdk/ruby 2.0.18 internal 1 noresponse"
100
+ @user_agent = "noresponse-sdk/ruby 2.1.0 internal 1 noresponse"
98
101
  end
99
102
 
100
103
  sig { returns([String, T::Hash[Symbol, String]]) }