noresponse 8.0.2 → 8.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 441dc61ae87ad2e8d797869f3ef6af730f2ad6df8e820aa0f745a3f5d807ab57
4
- data.tar.gz: c9dcb876668695180198d0f29f4522ed0e4e2aa6a30dc45a2195b323ee457d1f
3
+ metadata.gz: e159d3682d0bd240f573774f2183c678e822cf7dca00cc70ede248bc8c8a0fd5
4
+ data.tar.gz: 71e5fd162d48e54d082cd19870c0a8ad3c1ddcac14d6ede0c9e50105397e340e
5
5
  SHA512:
6
- metadata.gz: 359c75bde46574884cbce39305d9ed140696c548412b1bbf47121b27ab4863748f1b0714636a102cedb840c39d3dac933d4c8bcc6769ac618ed776e222ff84c4
7
- data.tar.gz: 4df1c44d97ee4d8416d0de724eac47ea93a61a750dddb089080e41b4b87e8e333f326889cbd7df09d7d172f32331a3cf8f6fd4e6215d27526ec7237ff22a7b90
6
+ metadata.gz: cdc1627fa9932f492978e09fbc0c4bd3bc305bfb853a6d6ea4d6f6d2a38a052683adce8d67a2412c83bb8f7c14d044c5eced1b20f391542955df651d300bd9cd
7
+ data.tar.gz: 425841a87b3ad092d96d5f54e87656cfff47dd1a5588066b8d5637370c30d4f88cfb03bfcfaa16891d12a1e20e7d80d49bedf57009fc4ad9f779c37fa2aae0e2
@@ -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,
@@ -26,6 +26,12 @@ module NoResponse
26
26
  }
27
27
  }
28
28
  )
29
+ # Autonomous system number of the network that announces the address, from the offline database. Absent when unknown.
30
+ field(
31
+ :asn,
32
+ Crystalline::Nilable.new(::Integer),
33
+ {'format_json': {'letter_case': ::NoResponse::Utils.field_name("asn")}}
34
+ )
29
35
  # Assessments in this workspace with the same IP in the last 24 hours, this one included. A count only.
30
36
  field(
31
37
  :seen_in_workspace,
@@ -37,13 +43,15 @@ module NoResponse
37
43
  params(
38
44
  country: T.nilable(::String),
39
45
  type: T.nilable(Models::Shared::IpSummaryType),
46
+ asn: T.nilable(::Integer),
40
47
  seen_in_workspace: T.nilable(::Integer)
41
48
  )
42
49
  .void
43
50
  }
44
- def initialize(country: nil, type: nil, seen_in_workspace: nil)
51
+ def initialize(country: nil, type: nil, asn: nil, seen_in_workspace: nil)
45
52
  @country = country
46
53
  @type = type
54
+ @asn = asn
47
55
  @seen_in_workspace = seen_in_workspace
48
56
  end
49
57
 
@@ -52,6 +60,7 @@ module NoResponse
52
60
  return false unless other.is_a?(self.class)
53
61
  return false unless @country == other.country
54
62
  return false unless @type == other.type
63
+ return false unless @asn == other.asn
55
64
  return false unless @seen_in_workspace == other.seen_in_workspace
56
65
  true
57
66
  end
@@ -18,6 +18,12 @@ class NoResponse::Models::Shared::IpSummary
18
18
  def type=(str_)
19
19
  end
20
20
 
21
+ def asn
22
+ end
23
+
24
+ def asn=(str_)
25
+ end
26
+
21
27
  def seen_in_workspace
22
28
  end
23
29
 
@@ -95,9 +95,9 @@ module NoResponse
95
95
 
96
96
  @language = "ruby"
97
97
  @openapi_doc_version = "1"
98
- @sdk_version = "8.0.2"
98
+ @sdk_version = "8.1.0"
99
99
  @gen_version = "internal"
100
- @user_agent = "noresponse-sdk/ruby 8.0.2 internal 1 noresponse"
100
+ @user_agent = "noresponse-sdk/ruby 8.1.0 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: 8.0.2
4
+ version: 8.1.0
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-26 00:00:00.000000000 Z
11
+ date: 2026-10-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: base64