noresponse 8.3.0 → 8.4.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: 0f9e488e772432bf291e12c927572051286be92d2e7571b8a0d5897d413f1a9f
4
- data.tar.gz: 41ce407e0b72b2cb45b757d87ec2f70353cb73f1d563f981865aadd239e3b933
3
+ metadata.gz: d99f9ca7440208ec5bda64fecd4186837591bf60b86a5895eea09e014fc837da
4
+ data.tar.gz: c461559fc95fd67f5af4e6aff08522d1c4bce1f385e9a8d4aad8dabb144e9dcb
5
5
  SHA512:
6
- metadata.gz: 8244940ad0a13006308c976eecd9a5982144d36059373f18101d69c574fca874e1192c16af296d6e15473125fa668c8b02885795d1b4240c3c84e8e3e1cb8461
7
- data.tar.gz: b130ae6e02b8d2db706cd843ff6b2ae9552c4d0ec869a3f96431cc76e75247a833adb0f64624f1c3a53ca9b10572cd7146cd4ec8b6f43d25b47eca77be747935
6
+ metadata.gz: d4bf03e4f317c928955973c49f724f7e73d60add449d349ed01aaa1405b347729afee1e7323bc172f788e682435465b111a878258d408fd0fcd89e1554115810
7
+ data.tar.gz: b590dc529ac6db073c6b54eb5e75269599ea3a43e9a99a0bee872d6784beed061dadd76a539fae56b402c974809a0a248b6a6b9dc837dd20d162fed26783dae0
@@ -1548,7 +1548,7 @@ module NoResponse
1548
1548
  }
1549
1549
  def aggregate(request:, retries: nil, timeout_ms: nil, http_headers: nil)
1550
1550
  # aggregate - Count assessments by time, decision and reason
1551
- # Count this environment's assessments created in [from,to) by hour, day or week, grouped by up to two of decision, flow, recommendation, band, reason, lane, country, asn and list_match. Each assessment counts once, by its first answer; late results do not count it again and appear in late_flips. Optional metrics add a score histogram per flow and late account decision changes. from and to start a bucket and cover at most 366 days (31 for hour buckets) inside the retention period. The filters are search's and describe the first answer: send them to search with revision first to list a cell's assessments. Counts hold no identifier, stay when an assessment or account is deleted, and report reasons by code and impact band. No Idempotency-Key.
1551
+ # Count this environment's assessments created in [from,to) by hour, day or week, grouped by up to two of decision, flow, recommendation, band, reason, lane, country, asn and list_match. Each assessment counts once, by its first answer; late results do not count it again and appear in late_flips. Optional metrics add a score histogram per flow, that histogram by the latest reported outcome, and late account decision changes. from and to start a bucket and cover at most 366 days (31 for hour buckets) inside the retention period. The filters are search's and describe the first answer: send them to search with revision first to list a cell's assessments. Counts hold no identifier, stay when an assessment or account is deleted, and report reasons by code and impact band. No Idempotency-Key.
1552
1552
  url, params = @sdk_configuration.get_server_details
1553
1553
  base_url = Utils.template_url(url, params)
1554
1554
  url = "#{base_url}/v1/assessments/aggregate"
@@ -32,6 +32,12 @@ module NoResponse
32
32
  Crystalline::Nilable.new(Crystalline::Array.new(Models::Shared::AggregateScoreCount)),
33
33
  {'format_json': {'letter_case': ::NoResponse::Utils.field_name("score_histogram")}}
34
34
  )
35
+ # With metric score_outcomes: the score_histogram's first answers whose assessment has a reported outcome, by its latest. A bin's count less its score_outcomes is the first answers with none reported.
36
+ field(
37
+ :score_outcomes,
38
+ Crystalline::Nilable.new(Crystalline::Array.new(Models::Shared::AggregateScoreOutcome)),
39
+ {'format_json': {'letter_case': ::NoResponse::Utils.field_name("score_outcomes")}}
40
+ )
35
41
 
36
42
  field(
37
43
  :late_flips,
@@ -45,15 +51,17 @@ module NoResponse
45
51
  count: T.nilable(::Integer),
46
52
  groups: T.nilable(T::Array[Models::Shared::AggregateGroup]),
47
53
  score_histogram: T.nilable(T::Array[Models::Shared::AggregateScoreCount]),
54
+ score_outcomes: T.nilable(T::Array[Models::Shared::AggregateScoreOutcome]),
48
55
  late_flips: T.nilable(T::Array[Models::Shared::AggregateLateFlip])
49
56
  )
50
57
  .void
51
58
  }
52
- def initialize(start:, count: nil, groups: nil, score_histogram: nil, late_flips: nil)
59
+ def initialize(start:, count: nil, groups: nil, score_histogram: nil, score_outcomes: nil, late_flips: nil)
53
60
  @start = start
54
61
  @count = count
55
62
  @groups = groups
56
63
  @score_histogram = score_histogram
64
+ @score_outcomes = score_outcomes
57
65
  @late_flips = late_flips
58
66
  end
59
67
 
@@ -64,6 +72,7 @@ module NoResponse
64
72
  return false unless @count == other.count
65
73
  return false unless @groups == other.groups
66
74
  return false unless @score_histogram == other.score_histogram
75
+ return false unless @score_outcomes == other.score_outcomes
67
76
  return false unless @late_flips == other.late_flips
68
77
  true
69
78
  end
@@ -30,6 +30,12 @@ class NoResponse::Models::Shared::AggregateBucket
30
30
  def score_histogram=(str_)
31
31
  end
32
32
 
33
+ def score_outcomes
34
+ end
35
+
36
+ def score_outcomes=(str_)
37
+ end
38
+
33
39
  def late_flips
34
40
  end
35
41
 
@@ -0,0 +1,86 @@
1
+ # typed: true
2
+ # frozen_string_literal: true
3
+
4
+ module NoResponse
5
+ module Models
6
+ module Shared
7
+ # First answers of one flow whose risk.score is in [score_min, score_max] and whose assessment's latest reported outcome (the latest received) is outcome. Counted when the first answer is counted and moved when a later outcome wins; outcomes reported before the first answer was counted are counted with it. An outcome reported before this count existed is counted only once another outcome is reported for the assessment.
8
+ class AggregateScoreOutcome
9
+ extend T::Sig
10
+ include Crystalline::MetadataFields
11
+
12
+ # The event an assessment is made for: account_creation (a user creates an account), login (a user returns to an existing account) or purchase (a payment or a credit grant). The account's risk is reported with the decision for this flow.
13
+ field(
14
+ :flow,
15
+ Models::Shared::Flow,
16
+ {
17
+ 'format_json': {
18
+ 'letter_case': ::NoResponse::Utils.field_name("flow"),
19
+ required: true,
20
+ 'decoder': ::NoResponse::Utils.open_enum_from_string(Models::Shared::Flow, false)
21
+ }
22
+ }
23
+ )
24
+ # A multiple of 5.
25
+ field(
26
+ :score_min,
27
+ ::Integer,
28
+ {'format_json': {'letter_case': ::NoResponse::Utils.field_name("score_min"), required: true}}
29
+ )
30
+
31
+ field(
32
+ :score_max,
33
+ ::Integer,
34
+ {'format_json': {'letter_case': ::NoResponse::Utils.field_name("score_max"), required: true}}
35
+ )
36
+ # What the provider later learned about the assessed account. confirmed_abuse, account_takeover and chargeback report abuse; false_positive and legitimate withdraw an earlier abuse report of this workspace for the assessment; unknown is recorded only. Outcomes are append-only and the latest one recorded for an assessment wins.
37
+ field(
38
+ :outcome,
39
+ Models::Shared::Outcome,
40
+ {
41
+ 'format_json': {
42
+ 'letter_case': ::NoResponse::Utils.field_name("outcome"),
43
+ required: true,
44
+ 'decoder': ::NoResponse::Utils.open_enum_from_string(Models::Shared::Outcome, false)
45
+ }
46
+ }
47
+ )
48
+
49
+ field(
50
+ :count,
51
+ ::Integer,
52
+ {'format_json': {'letter_case': ::NoResponse::Utils.field_name("count"), required: true}}
53
+ )
54
+
55
+ sig {
56
+ params(
57
+ flow: Models::Shared::Flow,
58
+ score_min: ::Integer,
59
+ score_max: ::Integer,
60
+ outcome: Models::Shared::Outcome,
61
+ count: ::Integer
62
+ )
63
+ .void
64
+ }
65
+ def initialize(flow:, score_min:, score_max:, outcome:, count:)
66
+ @flow = flow
67
+ @score_min = score_min
68
+ @score_max = score_max
69
+ @outcome = outcome
70
+ @count = count
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 @flow == other.flow
77
+ return false unless @score_min == other.score_min
78
+ return false unless @score_max == other.score_max
79
+ return false unless @outcome == other.outcome
80
+ return false unless @count == other.count
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::AggregateScoreOutcome
5
+ extend ::Crystalline::MetadataFields::ClassMethods
6
+ end
7
+
8
+ class NoResponse::Models::Shared::AggregateScoreOutcome
9
+ def flow
10
+ end
11
+
12
+ def flow=(str_)
13
+ end
14
+
15
+ def score_min
16
+ end
17
+
18
+ def score_min=(str_)
19
+ end
20
+
21
+ def score_max
22
+ end
23
+
24
+ def score_max=(str_)
25
+ end
26
+
27
+ def outcome
28
+ end
29
+
30
+ def outcome=(str_)
31
+ end
32
+
33
+ def count
34
+ end
35
+
36
+ def count=(str_)
37
+ end
38
+ end
@@ -10,6 +10,7 @@ module NoResponse
10
10
  enums do
11
11
  COUNT = new("count")
12
12
  SCORE_HISTOGRAM = new("score_histogram")
13
+ SCORE_OUTCOMES = new("score_outcomes")
13
14
  LATE_FLIPS = new("late_flips")
14
15
  end
15
16
 
@@ -31,7 +31,7 @@ module NoResponse
31
31
  Crystalline::Nilable.new(Crystalline::Array.new(Models::Shared::AggregateDimension)),
32
32
  {'format_json': {'letter_case': ::NoResponse::Utils.field_name("group_by")}}
33
33
  )
34
- # count: each bucket's count and groups. score_histogram: first answers by flow and 5-point score bucket. late_flips: changes of an assessment's account decision for its flow after its first answer, by from, to and delay.
34
+ # count: each bucket's count and groups. score_histogram: first answers by flow and 5-point score bucket. score_outcomes: the histogram's first answers that have a reported outcome, by flow, 5-point score bucket and the latest outcome reported for the assessment (POST /v1/assessments/{assessment_id}/outcomes); the rest of a bin has none reported. late_flips: changes of an assessment's account decision for its flow after its first answer, by from, to and delay.
35
35
  field(
36
36
  :metrics,
37
37
  Crystalline::Nilable.new(Crystalline::Array.new(Models::Shared::AssessmentAggregateRequestMetric)),
@@ -9,6 +9,7 @@ module NoResponse
9
9
  enums do
10
10
  COUNT = new("count")
11
11
  SCORE_HISTOGRAM = new("score_histogram")
12
+ SCORE_OUTCOMES = new("score_outcomes")
12
13
  LATE_FLIPS = new("late_flips")
13
14
  end
14
15
  end
@@ -14,7 +14,7 @@ module NoResponse
14
14
  Crystalline::Nilable.new(Crystalline::Array.new(Models::Shared::RiskDetailsPhoneName)),
15
15
  {'format_json': {'letter_case': ::NoResponse::Utils.field_name("phone_names")}}
16
16
  )
17
- # The matching breach tables, newest first, at most 50.
17
+ # The matching breach tables, newest first, at most 100.
18
18
  field(
19
19
  :breaches,
20
20
  Crystalline::Nilable.new(Crystalline::Array.new(Models::Shared::Breach)),
@@ -26,7 +26,7 @@ module NoResponse
26
26
  Crystalline::Nilable.new(Crystalline::Array.new(Models::Shared::RiskDetailsBreachName)),
27
27
  {'format_json': {'letter_case': ::NoResponse::Utils.field_name("breach_names")}}
28
28
  )
29
- # The identity's dated footprint events, newest first, at most 100: the year and month, what happened (created, last_active, breached), the site, its category, the kind of evidence and the identifier it belongs to. No breach value: dates are coarsened to the month.
29
+ # The identity's dated footprint events, newest first, at most 300: the year and month, what happened (created, last_active, breached), the site, its category, the kind of evidence and the identifier it belongs to. No breach value: dates are coarsened to the month.
30
30
  field(
31
31
  :events,
32
32
  Crystalline::Nilable.new(Crystalline::Array.new(Models::Shared::RiskDetailsEvent)),
@@ -30,6 +30,7 @@ module NoResponse
30
30
  autoload :AggregateGroup, "no_response/models/shared/aggregategroup.rb"
31
31
  autoload :AggregateLateFlip, "no_response/models/shared/aggregatelateflip.rb"
32
32
  autoload :AggregateScoreCount, "no_response/models/shared/aggregatescorecount.rb"
33
+ autoload :AggregateScoreOutcome, "no_response/models/shared/aggregatescoreoutcome.rb"
33
34
  autoload :Agreement, "no_response/models/shared/agreement.rb"
34
35
  autoload :AnswerRevision, "no_response/models/shared/answerrevision.rb"
35
36
  autoload :Assessment, "no_response/models/shared/assessment.rb"
@@ -95,9 +95,9 @@ module NoResponse
95
95
 
96
96
  @language = "ruby"
97
97
  @openapi_doc_version = "1"
98
- @sdk_version = "8.3.0"
98
+ @sdk_version = "8.4.1"
99
99
  @gen_version = "internal"
100
- @user_agent = "noresponse-sdk/ruby 8.3.0 internal 1 noresponse"
100
+ @user_agent = "noresponse-sdk/ruby 8.4.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.3.0
4
+ version: 8.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - NoResponse
@@ -487,6 +487,8 @@ files:
487
487
  - lib/no_response/models/shared/aggregatelateflip.rbi
488
488
  - lib/no_response/models/shared/aggregatescorecount.rb
489
489
  - lib/no_response/models/shared/aggregatescorecount.rbi
490
+ - lib/no_response/models/shared/aggregatescoreoutcome.rb
491
+ - lib/no_response/models/shared/aggregatescoreoutcome.rbi
490
492
  - lib/no_response/models/shared/agreement.rb
491
493
  - lib/no_response/models/shared/agreement.rbi
492
494
  - lib/no_response/models/shared/alternate_name.rb