noresponse 8.2.1 → 8.4.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 (39) hide show
  1. checksums.yaml +4 -4
  2. data/lib/no_response/assessments.rb +293 -0
  3. data/lib/no_response/models/operations/aggregateassessments_response.rb +32 -0
  4. data/lib/no_response/models/operations/aggregateassessments_response.rbi +20 -0
  5. data/lib/no_response/models/operations.rb +1 -0
  6. data/lib/no_response/models/shared/aggregatebucket.rb +82 -0
  7. data/lib/no_response/models/shared/aggregatebucket.rbi +44 -0
  8. data/lib/no_response/models/shared/aggregatedimension.rb +26 -0
  9. data/lib/no_response/models/shared/aggregatedimension.rbi +9 -0
  10. data/lib/no_response/models/shared/aggregategroup.rb +179 -0
  11. data/lib/no_response/models/shared/aggregategroup.rbi +74 -0
  12. data/lib/no_response/models/shared/aggregatelateflip.rb +83 -0
  13. data/lib/no_response/models/shared/aggregatelateflip.rbi +32 -0
  14. data/lib/no_response/models/shared/aggregatescorecount.rb +63 -0
  15. data/lib/no_response/models/shared/aggregatescorecount.rbi +32 -0
  16. data/lib/no_response/models/shared/aggregatescoreoutcome.rb +86 -0
  17. data/lib/no_response/models/shared/aggregatescoreoutcome.rbi +38 -0
  18. data/lib/no_response/models/shared/answerrevision.rb +16 -0
  19. data/lib/no_response/models/shared/answerrevision.rbi +9 -0
  20. data/lib/no_response/models/shared/assessmentaggregate.rb +121 -0
  21. data/lib/no_response/models/shared/assessmentaggregate.rbi +62 -0
  22. data/lib/no_response/models/shared/assessmentaggregate_metric.rb +21 -0
  23. data/lib/no_response/models/shared/assessmentaggregate_metric.rbi +9 -0
  24. data/lib/no_response/models/shared/assessmentaggregaterequest.rb +163 -0
  25. data/lib/no_response/models/shared/assessmentaggregaterequest.rbi +74 -0
  26. data/lib/no_response/models/shared/assessmentaggregaterequest_metric.rb +18 -0
  27. data/lib/no_response/models/shared/assessmentaggregaterequest_metric.rbi +9 -0
  28. data/lib/no_response/models/shared/assessmentsearchrequest.rb +17 -2
  29. data/lib/no_response/models/shared/assessmentsearchrequest.rbi +6 -0
  30. data/lib/no_response/models/shared/bucket.rb +20 -0
  31. data/lib/no_response/models/shared/bucket.rbi +9 -0
  32. data/lib/no_response/models/shared/decision.rb +5 -2
  33. data/lib/no_response/models/shared/delay.rb +23 -0
  34. data/lib/no_response/models/shared/delay.rbi +9 -0
  35. data/lib/no_response/models/shared/listmatch.rb +19 -0
  36. data/lib/no_response/models/shared/listmatch.rbi +9 -0
  37. data/lib/no_response/models/shared.rb +14 -0
  38. data/lib/no_response/sdkconfiguration.rb +2 -2
  39. metadata +31 -1
@@ -0,0 +1,179 @@
1
+ # typed: true
2
+ # frozen_string_literal: true
3
+
4
+ module NoResponse
5
+ module Models
6
+ module Shared
7
+ # One group's count in one bucket. It holds each grouped dimension the counted assessments had a value for: a pending first answer has no decision, recommendation or band; an answer that fired no reason, listed no incomplete lane, matched no list entry or whose IP has no known country or ASN leaves that dimension out.
8
+ class AggregateGroup
9
+ extend T::Sig
10
+ include Crystalline::MetadataFields
11
+
12
+ field(
13
+ :count,
14
+ ::Integer,
15
+ {'format_json': {'letter_case': ::NoResponse::Utils.field_name("count"), required: true}}
16
+ )
17
+ # An assessment's own decision: block when its stored risk.block is true, otherwise its recommendation. It is not the account's decision or held-admission state.
18
+ field(
19
+ :decision,
20
+ Crystalline::Nilable.new(Models::Shared::Decision),
21
+ {
22
+ 'format_json': {
23
+ 'letter_case': ::NoResponse::Utils.field_name("decision"),
24
+ 'decoder': ::NoResponse::Utils.open_enum_from_string(Models::Shared::Decision, true)
25
+ }
26
+ }
27
+ )
28
+ # 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.
29
+ field(
30
+ :flow,
31
+ Crystalline::Nilable.new(Models::Shared::Flow),
32
+ {
33
+ 'format_json': {
34
+ 'letter_case': ::NoResponse::Utils.field_name("flow"),
35
+ 'decoder': ::NoResponse::Utils.open_enum_from_string(Models::Shared::Flow, true)
36
+ }
37
+ }
38
+ )
39
+ # The recommended action: allow, step_up or review. Your application applies it.
40
+ field(
41
+ :recommendation,
42
+ Crystalline::Nilable.new(Models::Shared::Recommendation),
43
+ {
44
+ 'format_json': {
45
+ 'letter_case': ::NoResponse::Utils.field_name("recommendation"),
46
+ 'decoder': ::NoResponse::Utils.open_enum_from_string(Models::Shared::Recommendation, true)
47
+ }
48
+ }
49
+ )
50
+ # low 0-29, medium 30-59, high 60-84, critical 85-100.
51
+ field(
52
+ :band,
53
+ Crystalline::Nilable.new(Models::Shared::Band),
54
+ {
55
+ 'format_json': {
56
+ 'letter_case': ::NoResponse::Utils.field_name("band"),
57
+ 'decoder': ::NoResponse::Utils.open_enum_from_string(Models::Shared::Band, true)
58
+ }
59
+ }
60
+ )
61
+ # The action of the list entry that decided the account.
62
+ field(
63
+ :list_match,
64
+ Crystalline::Nilable.new(Models::Shared::ListMatch),
65
+ {
66
+ 'format_json': {
67
+ 'letter_case': ::NoResponse::Utils.field_name("list_match"),
68
+ 'decoder': ::NoResponse::Utils.open_enum_from_string(Models::Shared::ListMatch, true)
69
+ }
70
+ }
71
+ )
72
+ # A stable reason code. New codes may appear; ignore any you do not know.
73
+ field(
74
+ :reason,
75
+ Crystalline::Nilable.new(Models::Shared::ReasonCode),
76
+ {
77
+ 'format_json': {
78
+ 'letter_case': ::NoResponse::Utils.field_name("reason"),
79
+ 'decoder': ::NoResponse::Utils.open_enum_from_string(Models::Shared::ReasonCode, true)
80
+ }
81
+ }
82
+ )
83
+
84
+ field(
85
+ :impact,
86
+ Crystalline::Nilable.new(Models::Shared::Impact),
87
+ {
88
+ 'format_json': {
89
+ 'letter_case': ::NoResponse::Utils.field_name("impact"),
90
+ 'decoder': ::NoResponse::Utils.open_enum_from_string(Models::Shared::Impact, true)
91
+ }
92
+ }
93
+ )
94
+ # An evidence lane: accounts (account presence for email and username), phone, breach, domain (the email domain's registration) and ip.
95
+ field(
96
+ :lane,
97
+ Crystalline::Nilable.new(Models::Shared::Lane),
98
+ {
99
+ 'format_json': {
100
+ 'letter_case': ::NoResponse::Utils.field_name("lane"),
101
+ 'decoder': ::NoResponse::Utils.open_enum_from_string(Models::Shared::Lane, true)
102
+ }
103
+ }
104
+ )
105
+
106
+ field(
107
+ :country,
108
+ Crystalline::Nilable.new(::String),
109
+ {'format_json': {'letter_case': ::NoResponse::Utils.field_name("country")}}
110
+ )
111
+
112
+ field(
113
+ :asn,
114
+ Crystalline::Nilable.new(::Integer),
115
+ {'format_json': {'letter_case': ::NoResponse::Utils.field_name("asn")}}
116
+ )
117
+
118
+ sig {
119
+ params(
120
+ count: ::Integer,
121
+ decision: T.nilable(Models::Shared::Decision),
122
+ flow: T.nilable(Models::Shared::Flow),
123
+ recommendation: T.nilable(Models::Shared::Recommendation),
124
+ band: T.nilable(Models::Shared::Band),
125
+ list_match: T.nilable(Models::Shared::ListMatch),
126
+ reason: T.nilable(Models::Shared::ReasonCode),
127
+ impact: T.nilable(Models::Shared::Impact),
128
+ lane: T.nilable(Models::Shared::Lane),
129
+ country: T.nilable(::String),
130
+ asn: T.nilable(::Integer)
131
+ )
132
+ .void
133
+ }
134
+ def initialize(
135
+ count:,
136
+ decision: nil,
137
+ flow: nil,
138
+ recommendation: nil,
139
+ band: nil,
140
+ list_match: nil,
141
+ reason: nil,
142
+ impact: nil,
143
+ lane: nil,
144
+ country: nil,
145
+ asn: nil
146
+ )
147
+ @count = count
148
+ @decision = decision
149
+ @flow = flow
150
+ @recommendation = recommendation
151
+ @band = band
152
+ @list_match = list_match
153
+ @reason = reason
154
+ @impact = impact
155
+ @lane = lane
156
+ @country = country
157
+ @asn = asn
158
+ end
159
+
160
+ sig { params(other: T.untyped).returns(T::Boolean) }
161
+ def ==(other)
162
+ return false unless other.is_a?(self.class)
163
+ return false unless @count == other.count
164
+ return false unless @decision == other.decision
165
+ return false unless @flow == other.flow
166
+ return false unless @recommendation == other.recommendation
167
+ return false unless @band == other.band
168
+ return false unless @list_match == other.list_match
169
+ return false unless @reason == other.reason
170
+ return false unless @impact == other.impact
171
+ return false unless @lane == other.lane
172
+ return false unless @country == other.country
173
+ return false unless @asn == other.asn
174
+ true
175
+ end
176
+ end
177
+ end
178
+ end
179
+ end
@@ -0,0 +1,74 @@
1
+ # typed: true
2
+ # frozen_string_literal: true
3
+
4
+ class NoResponse::Models::Shared::AggregateGroup
5
+ extend ::Crystalline::MetadataFields::ClassMethods
6
+ end
7
+
8
+ class NoResponse::Models::Shared::AggregateGroup
9
+ def count
10
+ end
11
+
12
+ def count=(str_)
13
+ end
14
+
15
+ def decision
16
+ end
17
+
18
+ def decision=(str_)
19
+ end
20
+
21
+ def flow
22
+ end
23
+
24
+ def flow=(str_)
25
+ end
26
+
27
+ def recommendation
28
+ end
29
+
30
+ def recommendation=(str_)
31
+ end
32
+
33
+ def band
34
+ end
35
+
36
+ def band=(str_)
37
+ end
38
+
39
+ def list_match
40
+ end
41
+
42
+ def list_match=(str_)
43
+ end
44
+
45
+ def reason
46
+ end
47
+
48
+ def reason=(str_)
49
+ end
50
+
51
+ def impact
52
+ end
53
+
54
+ def impact=(str_)
55
+ end
56
+
57
+ def lane
58
+ end
59
+
60
+ def lane=(str_)
61
+ end
62
+
63
+ def country
64
+ end
65
+
66
+ def country=(str_)
67
+ end
68
+
69
+ def asn
70
+ end
71
+
72
+ def asn=(str_)
73
+ end
74
+ end
@@ -0,0 +1,83 @@
1
+ # typed: true
2
+ # frozen_string_literal: true
3
+
4
+ module NoResponse
5
+ module Models
6
+ module Shared
7
+ # Changes of the account decision for an assessment's flow after its first answer, as account.risk_changed announces them, counted in the bucket of the assessment's creation. from is the decision announced before (allow before the first announcement); an assessment that changes twice counts twice.
8
+ class AggregateLateFlip
9
+ extend T::Sig
10
+ include Crystalline::MetadataFields
11
+
12
+ # block when the score reached your block threshold (risk.block of the assessment), otherwise the assessment's recommendation. held only for a flow whose admission is held (settings flows.<flow>.admission), when the account's current assessment was made for that flow and its investigation has not completed (status partial): the final decision arrives as account.risk_changed when the investigation completes, decided by its score, or when the hold's deadline (hold_seconds after the assessment was created) passes first, as the flow's on_expiry action or the decision the evidence so far gives, whichever is stricter. Your application applies it.
13
+ field(
14
+ :from,
15
+ Models::Shared::AccountDecision,
16
+ {
17
+ 'format_json': {
18
+ 'letter_case': ::NoResponse::Utils.field_name("from"),
19
+ required: true,
20
+ 'decoder': ::NoResponse::Utils.open_enum_from_string(Models::Shared::AccountDecision, false)
21
+ }
22
+ }
23
+ )
24
+ # block when the score reached your block threshold (risk.block of the assessment), otherwise the assessment's recommendation. held only for a flow whose admission is held (settings flows.<flow>.admission), when the account's current assessment was made for that flow and its investigation has not completed (status partial): the final decision arrives as account.risk_changed when the investigation completes, decided by its score, or when the hold's deadline (hold_seconds after the assessment was created) passes first, as the flow's on_expiry action or the decision the evidence so far gives, whichever is stricter. Your application applies it.
25
+ field(
26
+ :to,
27
+ Models::Shared::AccountDecision,
28
+ {
29
+ 'format_json': {
30
+ 'letter_case': ::NoResponse::Utils.field_name("to"),
31
+ required: true,
32
+ 'decoder': ::NoResponse::Utils.open_enum_from_string(Models::Shared::AccountDecision, false)
33
+ }
34
+ }
35
+ )
36
+ # How long after the assessment's creation the change was made.
37
+ field(
38
+ :delay,
39
+ Models::Shared::Delay,
40
+ {
41
+ 'format_json': {
42
+ 'letter_case': ::NoResponse::Utils.field_name("delay"),
43
+ required: true,
44
+ 'decoder': ::NoResponse::Utils.open_enum_from_string(Models::Shared::Delay, 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
+ from: Models::Shared::AccountDecision,
58
+ to: Models::Shared::AccountDecision,
59
+ delay: Models::Shared::Delay,
60
+ count: ::Integer
61
+ )
62
+ .void
63
+ }
64
+ def initialize(from:, to:, delay:, count:)
65
+ @from = from
66
+ @to = to
67
+ @delay = delay
68
+ @count = count
69
+ end
70
+
71
+ sig { params(other: T.untyped).returns(T::Boolean) }
72
+ def ==(other)
73
+ return false unless other.is_a?(self.class)
74
+ return false unless @from == other.from
75
+ return false unless @to == other.to
76
+ return false unless @delay == other.delay
77
+ return false unless @count == other.count
78
+ true
79
+ end
80
+ end
81
+ end
82
+ end
83
+ end
@@ -0,0 +1,32 @@
1
+ # typed: true
2
+ # frozen_string_literal: true
3
+
4
+ class NoResponse::Models::Shared::AggregateLateFlip
5
+ extend ::Crystalline::MetadataFields::ClassMethods
6
+ end
7
+
8
+ class NoResponse::Models::Shared::AggregateLateFlip
9
+ def from
10
+ end
11
+
12
+ def from=(str_)
13
+ end
14
+
15
+ def to
16
+ end
17
+
18
+ def to=(str_)
19
+ end
20
+
21
+ def delay
22
+ end
23
+
24
+ def delay=(str_)
25
+ end
26
+
27
+ def count
28
+ end
29
+
30
+ def count=(str_)
31
+ end
32
+ end
@@ -0,0 +1,63 @@
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]: 0-4, 5-9 up to 95-100. A pending answer has no score.
8
+ class AggregateScoreCount
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
+
37
+ field(
38
+ :count,
39
+ ::Integer,
40
+ {'format_json': {'letter_case': ::NoResponse::Utils.field_name("count"), required: true}}
41
+ )
42
+
43
+ sig { params(flow: Models::Shared::Flow, score_min: ::Integer, score_max: ::Integer, count: ::Integer).void }
44
+ def initialize(flow:, score_min:, score_max:, count:)
45
+ @flow = flow
46
+ @score_min = score_min
47
+ @score_max = score_max
48
+ @count = count
49
+ end
50
+
51
+ sig { params(other: T.untyped).returns(T::Boolean) }
52
+ def ==(other)
53
+ return false unless other.is_a?(self.class)
54
+ return false unless @flow == other.flow
55
+ return false unless @score_min == other.score_min
56
+ return false unless @score_max == other.score_max
57
+ return false unless @count == other.count
58
+ true
59
+ end
60
+ end
61
+ end
62
+ end
63
+ end
@@ -0,0 +1,32 @@
1
+ # typed: true
2
+ # frozen_string_literal: true
3
+
4
+ class NoResponse::Models::Shared::AggregateScoreCount
5
+ extend ::Crystalline::MetadataFields::ClassMethods
6
+ end
7
+
8
+ class NoResponse::Models::Shared::AggregateScoreCount
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 count
28
+ end
29
+
30
+ def count=(str_)
31
+ end
32
+ end
@@ -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
@@ -0,0 +1,16 @@
1
+ # typed: true
2
+ # frozen_string_literal: true
3
+
4
+ module NoResponse
5
+ module Models
6
+ module Shared
7
+ # AnswerRevision - Which answer of each assessment the filters describe: latest, the latest stored revision, or first, the first answer, as served when the assessment was first answered (POST /v1/assessments/aggregate counts first answers). A cell of an aggregate drills down to POST /v1/assessments/search with the same filters, revision first and the cell's bucket as from and to.
8
+ class AnswerRevision < T::Enum
9
+ enums do
10
+ LATEST = new("latest")
11
+ FIRST = new("first")
12
+ end
13
+ end
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,9 @@
1
+ # typed: true
2
+ # frozen_string_literal: true
3
+
4
+ class NoResponse::Models::Shared::AnswerRevision
5
+ extend ::Crystalline::MetadataFields::ClassMethods
6
+ end
7
+
8
+ class NoResponse::Models::Shared::AnswerRevision
9
+ end