noresponse 8.0.3 → 8.1.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: 9fbebee86b3b1c3f5177d1e3b9c3aa99936866c073feca1b2fe9b33b70466a08
4
- data.tar.gz: 04d9eaaed8ba4bbcd98a2caff36455bcef21d9be479b8f31ef27f844d7734d49
3
+ metadata.gz: 8661183bd9d9e44c1dd1fa3bbb4ac39306a626ffce2c0997337cfeb7dac0f5f0
4
+ data.tar.gz: b07e923d26bf9a3a75abd57b8bcec321599c2eca9affa3bf6dbb0a31dc011c05
5
5
  SHA512:
6
- metadata.gz: c8981a8f5ec356e5ef2061e59ffd9a3681c3e269bff7e5a3c147153c04956eceb24791adda8cf305edc372343bd012b06cb38f9ccfe75e7d70067a1326d454ea
7
- data.tar.gz: 064d72f3d8469f4568c21bb94898d5758ff5d199649154317388164cd87a99d0e3064f533c521bc087eaf9bf22bc4db76b0269cc237972ae33bfcdd9001db349
6
+ metadata.gz: 49c0c5a94a3046da8b0c9d2f3640e6c7a4852dca3f880f4d38c1e0022f618a26646b543444c6f8c1c16e561b03b235b8a531d29c6f6f21b43bcf5ee6a21dfebf
7
+ data.tar.gz: c25254593e21e52fddb2b9ae02a28f77314d4d65095d8243c0fae5e9d066b6e200c3a7cec464afe65f0c7b3def07a2ae17b8ac7965741c7c2735d5eb66bbae6a
@@ -4,7 +4,7 @@
4
4
  module NoResponse
5
5
  module Models
6
6
  module Shared
7
- # The account's decision for at least one flow changed. account is the account as GET /v1/accounts/{account_id} answers it for the revision that made the change: its new score, decision, reasons and decisions_by_flow, and the assessment the risk comes from. previous_decisions_by_flow are the decisions it replaced, so account.decisions_by_flow differs from them for at least one flow. On the account's first decision, previous_decisions_by_flow is allow for every flow. Events of one account are not ordered: account.risk_version orders them, so keep the account with the highest risk_version and ignore an event whose account is older than the one held.
7
+ # The account's decision for at least one flow changed. account is the account as GET /v1/accounts/{account_id} answers it for the revision that made the change: its new score, decision, reasons and decisions_by_flow, and the assessment the risk comes from. previous_decisions_by_flow are the decisions it replaced, so account.decisions_by_flow differs from them for at least one flow, and previous_risk_version is the risk_version they were announced at. On the account's first event no decision was announced before: previous_risk_version is absent and previous_decisions_by_flow is allow for every flow, the decisions an account has before its first event. Events of one account are not ordered: account.risk_version orders them, so keep the account with the highest risk_version and ignore an event whose account is older than the one held.
8
8
  class AccountRiskChanged
9
9
  extend T::Sig
10
10
  include Crystalline::MetadataFields
@@ -21,14 +21,25 @@ module NoResponse
21
21
  Models::Shared::AccountDecisionsByFlow,
22
22
  {'format_json': {'letter_case': ::NoResponse::Utils.field_name("previous_decisions_by_flow"), required: true}}
23
23
  )
24
+ # The account's risk_version when previous_decisions_by_flow were announced, always lower than account.risk_version. Absent on the account's first event, when no decision was announced before, and on the first event after the account was deleted.
25
+ field(
26
+ :previous_risk_version,
27
+ Crystalline::Nilable.new(::Integer),
28
+ {'format_json': {'letter_case': ::NoResponse::Utils.field_name("previous_risk_version")}}
29
+ )
24
30
 
25
31
  sig {
26
- params(account: Models::Shared::Account, previous_decisions_by_flow: Models::Shared::AccountDecisionsByFlow)
32
+ params(
33
+ account: Models::Shared::Account,
34
+ previous_decisions_by_flow: Models::Shared::AccountDecisionsByFlow,
35
+ previous_risk_version: T.nilable(::Integer)
36
+ )
27
37
  .void
28
38
  }
29
- def initialize(account:, previous_decisions_by_flow:)
39
+ def initialize(account:, previous_decisions_by_flow:, previous_risk_version: nil)
30
40
  @account = account
31
41
  @previous_decisions_by_flow = previous_decisions_by_flow
42
+ @previous_risk_version = previous_risk_version
32
43
  end
33
44
 
34
45
  sig { params(other: T.untyped).returns(T::Boolean) }
@@ -36,6 +47,7 @@ module NoResponse
36
47
  return false unless other.is_a?(self.class)
37
48
  return false unless @account == other.account
38
49
  return false unless @previous_decisions_by_flow == other.previous_decisions_by_flow
50
+ return false unless @previous_risk_version == other.previous_risk_version
39
51
  true
40
52
  end
41
53
  end
@@ -17,4 +17,10 @@ class NoResponse::Models::Shared::AccountRiskChanged
17
17
 
18
18
  def previous_decisions_by_flow=(str_)
19
19
  end
20
+
21
+ def previous_risk_version
22
+ end
23
+
24
+ def previous_risk_version=(str_)
25
+ end
20
26
  end
@@ -17,7 +17,7 @@ module NoResponse
17
17
  ::String,
18
18
  {'format_json': {'letter_case': ::NoResponse::Utils.field_name("created_at"), required: true}}
19
19
  )
20
- # The account's decision for at least one flow changed. account is the account as GET /v1/accounts/{account_id} answers it for the revision that made the change: its new score, decision, reasons and decisions_by_flow, and the assessment the risk comes from. previous_decisions_by_flow are the decisions it replaced, so account.decisions_by_flow differs from them for at least one flow. On the account's first decision, previous_decisions_by_flow is allow for every flow. Events of one account are not ordered: account.risk_version orders them, so keep the account with the highest risk_version and ignore an event whose account is older than the one held.
20
+ # The account's decision for at least one flow changed. account is the account as GET /v1/accounts/{account_id} answers it for the revision that made the change: its new score, decision, reasons and decisions_by_flow, and the assessment the risk comes from. previous_decisions_by_flow are the decisions it replaced, so account.decisions_by_flow differs from them for at least one flow, and previous_risk_version is the risk_version they were announced at. On the account's first event no decision was announced before: previous_risk_version is absent and previous_decisions_by_flow is allow for every flow, the decisions an account has before its first event. Events of one account are not ordered: account.risk_version orders them, so keep the account with the highest risk_version and ignore an event whose account is older than the one held.
21
21
  field(
22
22
  :data,
23
23
  Models::Shared::AccountRiskChanged,
@@ -59,6 +59,24 @@ module NoResponse
59
59
  Crystalline::Nilable.new(::String),
60
60
  {'format_json': {'letter_case': ::NoResponse::Utils.field_name("verified_at")}}
61
61
  )
62
+ # The first failed delivery attempt of the endpoint's current failure streak. Absent while its latest attempt succeeded, before any attempt failed, and after it is verified again.
63
+ field(
64
+ :failing_since,
65
+ Crystalline::Nilable.new(::String),
66
+ {'format_json': {'letter_case': ::NoResponse::Utils.field_name("failing_since")}}
67
+ )
68
+ # The latest failed delivery attempt of the current failure streak; present exactly when failing_since is. A failure more than 2 hours after it starts a new streak.
69
+ field(
70
+ :last_failure_at,
71
+ Crystalline::Nilable.new(::String),
72
+ {'format_json': {'letter_case': ::NoResponse::Utils.field_name("last_failure_at")}}
73
+ )
74
+ # When the endpoint was disabled after failing continuously for 72 hours, as in the webhook_endpoint.disabled event. Present while state is disabled; absent before and after it is verified again.
75
+ field(
76
+ :disabled_at,
77
+ Crystalline::Nilable.new(::String),
78
+ {'format_json': {'letter_case': ::NoResponse::Utils.field_name("disabled_at")}}
79
+ )
62
80
 
63
81
  sig {
64
82
  params(
@@ -68,11 +86,25 @@ module NoResponse
68
86
  response_mode: Models::Shared::ResponseMode,
69
87
  created_at: ::String,
70
88
  signing_keys: T::Array[Models::Shared::SigningKey],
71
- verified_at: T.nilable(::String)
89
+ verified_at: T.nilable(::String),
90
+ failing_since: T.nilable(::String),
91
+ last_failure_at: T.nilable(::String),
92
+ disabled_at: T.nilable(::String)
72
93
  )
73
94
  .void
74
95
  }
75
- def initialize(endpoint_id:, url:, state:, response_mode:, created_at:, signing_keys:, verified_at: nil)
96
+ def initialize(
97
+ endpoint_id:,
98
+ url:,
99
+ state:,
100
+ response_mode:,
101
+ created_at:,
102
+ signing_keys:,
103
+ verified_at: nil,
104
+ failing_since: nil,
105
+ last_failure_at: nil,
106
+ disabled_at: nil
107
+ )
76
108
  @endpoint_id = endpoint_id
77
109
  @url = url
78
110
  @state = state
@@ -80,6 +112,9 @@ module NoResponse
80
112
  @created_at = created_at
81
113
  @signing_keys = signing_keys
82
114
  @verified_at = verified_at
115
+ @failing_since = failing_since
116
+ @last_failure_at = last_failure_at
117
+ @disabled_at = disabled_at
83
118
  end
84
119
 
85
120
  sig { params(other: T.untyped).returns(T::Boolean) }
@@ -92,6 +127,9 @@ module NoResponse
92
127
  return false unless @created_at == other.created_at
93
128
  return false unless @signing_keys == other.signing_keys
94
129
  return false unless @verified_at == other.verified_at
130
+ return false unless @failing_since == other.failing_since
131
+ return false unless @last_failure_at == other.last_failure_at
132
+ return false unless @disabled_at == other.disabled_at
95
133
  true
96
134
  end
97
135
  end
@@ -47,4 +47,22 @@ class NoResponse::Models::Shared::WebhookEndpoint
47
47
 
48
48
  def verified_at=(str_)
49
49
  end
50
+
51
+ def failing_since
52
+ end
53
+
54
+ def failing_since=(str_)
55
+ end
56
+
57
+ def last_failure_at
58
+ end
59
+
60
+ def last_failure_at=(str_)
61
+ end
62
+
63
+ def disabled_at
64
+ end
65
+
66
+ def disabled_at=(str_)
67
+ end
50
68
  end
@@ -95,9 +95,9 @@ module NoResponse
95
95
 
96
96
  @language = "ruby"
97
97
  @openapi_doc_version = "1"
98
- @sdk_version = "8.0.3"
98
+ @sdk_version = "8.1.1"
99
99
  @gen_version = "internal"
100
- @user_agent = "noresponse-sdk/ruby 8.0.3 internal 1 noresponse"
100
+ @user_agent = "noresponse-sdk/ruby 8.1.1 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: 8.0.3
4
+ version: 8.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - NoResponse