noresponse 8.1.3 → 8.2.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 +4 -4
- data/lib/no_response/accounts.rb +2068 -0
- data/lib/no_response/assessments.rb +890 -0
- data/lib/no_response/models/operations/associatecredential_request.rb +33 -0
- data/lib/no_response/models/operations/associatecredential_request.rbi +20 -0
- data/lib/no_response/models/operations/associatecredential_response.rb +34 -0
- data/lib/no_response/models/operations/associatecredential_response.rbi +20 -0
- data/lib/no_response/models/operations/bindprovisionalaccount_request.rb +37 -0
- data/lib/no_response/models/operations/bindprovisionalaccount_request.rbi +20 -0
- data/lib/no_response/models/operations/bindprovisionalaccount_response.rb +32 -0
- data/lib/no_response/models/operations/bindprovisionalaccount_response.rbi +20 -0
- data/lib/no_response/models/operations/exportaccount_request.rb +37 -0
- data/lib/no_response/models/operations/exportaccount_request.rbi +20 -0
- data/lib/no_response/models/operations/exportaccount_response.rb +32 -0
- data/lib/no_response/models/operations/exportaccount_response.rbi +20 -0
- data/lib/no_response/models/operations/getaccountdecision_request.rb +37 -0
- data/lib/no_response/models/operations/getaccountdecision_request.rbi +20 -0
- data/lib/no_response/models/operations/getaccountdecision_response.rb +34 -0
- data/lib/no_response/models/operations/getaccountdecision_response.rbi +20 -0
- data/lib/no_response/models/operations/getassessmentversion_request.rb +48 -0
- data/lib/no_response/models/operations/getassessmentversion_request.rbi +26 -0
- data/lib/no_response/models/operations/getassessmentversion_response.rb +32 -0
- data/lib/no_response/models/operations/getassessmentversion_response.rbi +20 -0
- data/lib/no_response/models/operations/listaccountcredentials_request.rb +45 -0
- data/lib/no_response/models/operations/listaccountcredentials_request.rbi +26 -0
- data/lib/no_response/models/operations/listaccountcredentials_response.rb +32 -0
- data/lib/no_response/models/operations/listaccountcredentials_response.rbi +20 -0
- data/lib/no_response/models/operations/listaccountoutcomes_request.rb +45 -0
- data/lib/no_response/models/operations/listaccountoutcomes_request.rbi +26 -0
- data/lib/no_response/models/operations/listaccountoutcomes_response.rb +32 -0
- data/lib/no_response/models/operations/listaccountoutcomes_response.rbi +20 -0
- data/lib/no_response/models/operations/listrequestdiagnostics_request.rb +84 -0
- data/lib/no_response/models/operations/listrequestdiagnostics_request.rbi +50 -0
- data/lib/no_response/models/operations/listrequestdiagnostics_response.rb +34 -0
- data/lib/no_response/models/operations/listrequestdiagnostics_response.rbi +20 -0
- data/lib/no_response/models/operations/recordaccountoutcome_request.rb +48 -0
- data/lib/no_response/models/operations/recordaccountoutcome_request.rbi +26 -0
- data/lib/no_response/models/operations/recordaccountoutcome_response.rb +32 -0
- data/lib/no_response/models/operations/recordaccountoutcome_response.rbi +20 -0
- data/lib/no_response/models/operations/retireaccountcredential_request.rb +37 -0
- data/lib/no_response/models/operations/retireaccountcredential_request.rbi +20 -0
- data/lib/no_response/models/operations/retireaccountcredential_response.rb +34 -0
- data/lib/no_response/models/operations/retireaccountcredential_response.rbi +20 -0
- data/lib/no_response/models/operations/searchassessments_response.rb +32 -0
- data/lib/no_response/models/operations/searchassessments_response.rbi +20 -0
- data/lib/no_response/models/operations.rb +21 -0
- data/lib/no_response/models/shared/accountbinding.rb +83 -0
- data/lib/no_response/models/shared/accountbinding.rbi +44 -0
- data/lib/no_response/models/shared/accountbindingactor.rb +40 -0
- data/lib/no_response/models/shared/accountbindingactor.rbi +20 -0
- data/lib/no_response/models/shared/accountbindingrequest.rb +33 -0
- data/lib/no_response/models/shared/accountbindingrequest.rbi +14 -0
- data/lib/no_response/models/shared/accountdecisionsnapshot.rb +94 -0
- data/lib/no_response/models/shared/accountdecisionsnapshot.rbi +44 -0
- data/lib/no_response/models/shared/accountexport.rb +178 -0
- data/lib/no_response/models/shared/accountexport.rbi +92 -0
- data/lib/no_response/models/shared/accountoutcome.rb +152 -0
- data/lib/no_response/models/shared/accountoutcome.rbi +80 -0
- data/lib/no_response/models/shared/accountoutcomeactor.rb +40 -0
- data/lib/no_response/models/shared/accountoutcomeactor.rbi +20 -0
- data/lib/no_response/models/shared/accountoutcomepage.rb +65 -0
- data/lib/no_response/models/shared/accountoutcomepage.rbi +32 -0
- data/lib/no_response/models/shared/accountoutcomerequest.rb +71 -0
- data/lib/no_response/models/shared/accountoutcomerequest.rbi +32 -0
- data/lib/no_response/models/shared/assessmentrevision.rb +101 -0
- data/lib/no_response/models/shared/assessmentrevision.rbi +44 -0
- data/lib/no_response/models/shared/assessmentsearchpage.rb +68 -0
- data/lib/no_response/models/shared/assessmentsearchpage.rbi +32 -0
- data/lib/no_response/models/shared/assessmentsearchrequest.rb +146 -0
- data/lib/no_response/models/shared/assessmentsearchrequest.rbi +68 -0
- data/lib/no_response/models/shared/conflicterrorcode.rb +3 -0
- data/lib/no_response/models/shared/credentialassociation.rb +78 -0
- data/lib/no_response/models/shared/credentialassociation.rbi +44 -0
- data/lib/no_response/models/shared/credentialassociationactor.rb +40 -0
- data/lib/no_response/models/shared/credentialassociationactor.rbi +20 -0
- data/lib/no_response/models/shared/credentialassociationretiredby.rb +40 -0
- data/lib/no_response/models/shared/credentialassociationretiredby.rbi +20 -0
- data/lib/no_response/models/shared/credentialpage.rb +56 -0
- data/lib/no_response/models/shared/credentialpage.rbi +26 -0
- data/lib/no_response/models/shared/credentialrequest.rb +32 -0
- data/lib/no_response/models/shared/credentialrequest.rbi +14 -0
- data/lib/no_response/models/shared/decision.rb +18 -0
- data/lib/no_response/models/shared/decision.rbi +9 -0
- data/lib/no_response/models/shared/decisionreceipt.rb +112 -0
- data/lib/no_response/models/shared/decisionreceipt.rbi +50 -0
- data/lib/no_response/models/shared/exclusion.rb +23 -0
- data/lib/no_response/models/shared/exclusion.rbi +9 -0
- data/lib/no_response/models/shared/exportassessmentoutcome.rb +85 -0
- data/lib/no_response/models/shared/exportassessmentoutcome.rbi +44 -0
- data/lib/no_response/models/shared/reasoncode.rb +1 -0
- data/lib/no_response/models/shared/requestdiagnostic.rb +145 -0
- data/lib/no_response/models/shared/requestdiagnostic.rbi +80 -0
- data/lib/no_response/models/shared/requestdiagnosticpage.rb +40 -0
- data/lib/no_response/models/shared/requestdiagnosticpage.rbi +20 -0
- data/lib/no_response/models/shared.rb +23 -0
- data/lib/no_response/noresponseclient.rb +12 -1
- data/lib/no_response/requests.rb +320 -0
- data/lib/no_response/sdkconfiguration.rb +2 -2
- data/lib/noresponse.rb +1 -0
- metadata +90 -1
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
# typed: true
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
class NoResponse::Models::Shared::AccountExport
|
|
5
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
class NoResponse::Models::Shared::AccountExport
|
|
9
|
+
def account_id
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def account_id=(str_)
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
def exported_at
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
def exported_at=(str_)
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def current_risk_version
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def current_risk_version=(str_)
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
def assessments
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
def assessments=(str_)
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
def decisions
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
def decisions=(str_)
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
def outcomes
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
def outcomes=(str_)
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
def assessment_outcomes
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
def assessment_outcomes=(str_)
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
def credentials
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
def credentials=(str_)
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
def bindings
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
def bindings=(str_)
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
def enforcements
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
def enforcements=(str_)
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
def requests
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
def requests=(str_)
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
def exclusions
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
def exclusions=(str_)
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
def schema_version
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
def schema_version=(str_)
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
def complete
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
def complete=(str_)
|
|
91
|
+
end
|
|
92
|
+
end
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
# typed: true
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
module NoResponse
|
|
5
|
+
module Models
|
|
6
|
+
module Shared
|
|
7
|
+
# Immutable acceptance receipt. risk_version is the account version after this report committed, not the version when a retry reads it. effective_outcome_id names the effective head at that write. The effective expiration may shorten under retention changes. A legitimate report or correction removes only the account-feedback contribution, not unrelated risk.
|
|
8
|
+
class AccountOutcome
|
|
9
|
+
extend T::Sig
|
|
10
|
+
include Crystalline::MetadataFields
|
|
11
|
+
|
|
12
|
+
# Opaque, server-assigned id of one recorded outcome: 'out_' and a 26-character Crockford base32 ULID. Unique within the workspace.
|
|
13
|
+
field :id, ::String, {'format_json': {'letter_case': ::NoResponse::Utils.field_name("id"), required: true}}
|
|
14
|
+
# Your own opaque identifier for the account being checked, scoped to your workspace. Use an id you mint, with no direct identifier (email, phone, name or national id) in it. '|' is accepted so an Auth0 user id such as 'auth0|64abc' passes unchanged; '@', '+', '$' and whitespace are refused by the pattern, as is an exact-shape JWT; a hex digest such as a SHA-256 is allowed, because hashing an internal id is a common pseudonymous scheme. A value such as '07700900123' or 'jane.doe.gmail.com' cannot be told apart from an opaque id. It travels in bodies, and in a URL only as the path segment of GET /v1/accounts/{account_id} and its /assessments. An assessment requested by a provider hook at pre_registration, which has no account yet, carries the server-issued account_id pre: followed by its assessment_id.
|
|
15
|
+
field(
|
|
16
|
+
:account_id,
|
|
17
|
+
::String,
|
|
18
|
+
{'format_json': {'letter_case': ::NoResponse::Utils.field_name("account_id"), required: true}}
|
|
19
|
+
)
|
|
20
|
+
# 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.
|
|
21
|
+
field(
|
|
22
|
+
:outcome,
|
|
23
|
+
Models::Shared::Outcome,
|
|
24
|
+
{
|
|
25
|
+
'format_json': {
|
|
26
|
+
'letter_case': ::NoResponse::Utils.field_name("outcome"),
|
|
27
|
+
required: true,
|
|
28
|
+
'decoder': ::NoResponse::Utils.open_enum_from_string(Models::Shared::Outcome, false)
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
)
|
|
32
|
+
|
|
33
|
+
field(
|
|
34
|
+
:observed_at,
|
|
35
|
+
::String,
|
|
36
|
+
{'format_json': {'letter_case': ::NoResponse::Utils.field_name("observed_at"), required: true}}
|
|
37
|
+
)
|
|
38
|
+
|
|
39
|
+
field(
|
|
40
|
+
:received_at,
|
|
41
|
+
::String,
|
|
42
|
+
{'format_json': {'letter_case': ::NoResponse::Utils.field_name("received_at"), required: true}}
|
|
43
|
+
)
|
|
44
|
+
|
|
45
|
+
field(
|
|
46
|
+
:expires_at,
|
|
47
|
+
::String,
|
|
48
|
+
{'format_json': {'letter_case': ::NoResponse::Utils.field_name("expires_at"), required: true}}
|
|
49
|
+
)
|
|
50
|
+
|
|
51
|
+
field(
|
|
52
|
+
:actor,
|
|
53
|
+
Models::Shared::AccountOutcomeActor,
|
|
54
|
+
{'format_json': {'letter_case': ::NoResponse::Utils.field_name("actor"), required: true}}
|
|
55
|
+
)
|
|
56
|
+
|
|
57
|
+
field(
|
|
58
|
+
:risk_version_before,
|
|
59
|
+
::Integer,
|
|
60
|
+
{'format_json': {'letter_case': ::NoResponse::Utils.field_name("risk_version_before"), required: true}}
|
|
61
|
+
)
|
|
62
|
+
|
|
63
|
+
field(
|
|
64
|
+
:risk_version,
|
|
65
|
+
::Integer,
|
|
66
|
+
{'format_json': {'letter_case': ::NoResponse::Utils.field_name("risk_version"), required: true}}
|
|
67
|
+
)
|
|
68
|
+
# Opaque, server-assigned id of one recorded outcome: 'out_' and a 26-character Crockford base32 ULID. Unique within the workspace.
|
|
69
|
+
field(
|
|
70
|
+
:supersedes,
|
|
71
|
+
Crystalline::Nilable.new(::String),
|
|
72
|
+
{'format_json': {'letter_case': ::NoResponse::Utils.field_name("supersedes")}}
|
|
73
|
+
)
|
|
74
|
+
# Your own opaque reference for the outcome, such as a case or ticket id. Stored as given and not interpreted; keep direct identifiers out of it.
|
|
75
|
+
field(
|
|
76
|
+
:external_ref,
|
|
77
|
+
Crystalline::Nilable.new(::String),
|
|
78
|
+
{'format_json': {'letter_case': ::NoResponse::Utils.field_name("external_ref")}}
|
|
79
|
+
)
|
|
80
|
+
# Opaque, server-assigned id of one recorded outcome: 'out_' and a 26-character Crockford base32 ULID. Unique within the workspace.
|
|
81
|
+
field(
|
|
82
|
+
:effective_outcome_id,
|
|
83
|
+
Crystalline::Nilable.new(::String),
|
|
84
|
+
{'format_json': {'letter_case': ::NoResponse::Utils.field_name("effective_outcome_id")}}
|
|
85
|
+
)
|
|
86
|
+
|
|
87
|
+
sig {
|
|
88
|
+
params(
|
|
89
|
+
id: ::String,
|
|
90
|
+
account_id: ::String,
|
|
91
|
+
outcome: Models::Shared::Outcome,
|
|
92
|
+
observed_at: ::String,
|
|
93
|
+
received_at: ::String,
|
|
94
|
+
expires_at: ::String,
|
|
95
|
+
actor: Models::Shared::AccountOutcomeActor,
|
|
96
|
+
risk_version_before: ::Integer,
|
|
97
|
+
risk_version: ::Integer,
|
|
98
|
+
supersedes: T.nilable(::String),
|
|
99
|
+
external_ref: T.nilable(::String),
|
|
100
|
+
effective_outcome_id: T.nilable(::String)
|
|
101
|
+
)
|
|
102
|
+
.void
|
|
103
|
+
}
|
|
104
|
+
def initialize(
|
|
105
|
+
id:,
|
|
106
|
+
account_id:,
|
|
107
|
+
outcome:,
|
|
108
|
+
observed_at:,
|
|
109
|
+
received_at:,
|
|
110
|
+
expires_at:,
|
|
111
|
+
actor:,
|
|
112
|
+
risk_version_before:,
|
|
113
|
+
risk_version:,
|
|
114
|
+
supersedes: nil,
|
|
115
|
+
external_ref: nil,
|
|
116
|
+
effective_outcome_id: nil
|
|
117
|
+
)
|
|
118
|
+
@id = id
|
|
119
|
+
@account_id = account_id
|
|
120
|
+
@outcome = outcome
|
|
121
|
+
@observed_at = observed_at
|
|
122
|
+
@received_at = received_at
|
|
123
|
+
@expires_at = expires_at
|
|
124
|
+
@actor = actor
|
|
125
|
+
@risk_version_before = risk_version_before
|
|
126
|
+
@risk_version = risk_version
|
|
127
|
+
@supersedes = supersedes
|
|
128
|
+
@external_ref = external_ref
|
|
129
|
+
@effective_outcome_id = effective_outcome_id
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
sig { params(other: T.untyped).returns(T::Boolean) }
|
|
133
|
+
def ==(other)
|
|
134
|
+
return false unless other.is_a?(self.class)
|
|
135
|
+
return false unless @id == other.id
|
|
136
|
+
return false unless @account_id == other.account_id
|
|
137
|
+
return false unless @outcome == other.outcome
|
|
138
|
+
return false unless @observed_at == other.observed_at
|
|
139
|
+
return false unless @received_at == other.received_at
|
|
140
|
+
return false unless @expires_at == other.expires_at
|
|
141
|
+
return false unless @actor == other.actor
|
|
142
|
+
return false unless @risk_version_before == other.risk_version_before
|
|
143
|
+
return false unless @risk_version == other.risk_version
|
|
144
|
+
return false unless @supersedes == other.supersedes
|
|
145
|
+
return false unless @external_ref == other.external_ref
|
|
146
|
+
return false unless @effective_outcome_id == other.effective_outcome_id
|
|
147
|
+
true
|
|
148
|
+
end
|
|
149
|
+
end
|
|
150
|
+
end
|
|
151
|
+
end
|
|
152
|
+
end
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# typed: true
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
class NoResponse::Models::Shared::AccountOutcome
|
|
5
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
class NoResponse::Models::Shared::AccountOutcome
|
|
9
|
+
def id
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def id=(str_)
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
def account_id
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
def account_id=(str_)
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def outcome
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def outcome=(str_)
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
def observed_at
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
def observed_at=(str_)
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
def received_at
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
def received_at=(str_)
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
def expires_at
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
def expires_at=(str_)
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
def actor
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
def actor=(str_)
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
def risk_version_before
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
def risk_version_before=(str_)
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
def risk_version
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
def risk_version=(str_)
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
def supersedes
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
def supersedes=(str_)
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
def external_ref
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
def external_ref=(str_)
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
def effective_outcome_id
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
def effective_outcome_id=(str_)
|
|
79
|
+
end
|
|
80
|
+
end
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# typed: true
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
module NoResponse
|
|
5
|
+
module Models
|
|
6
|
+
module Shared
|
|
7
|
+
|
|
8
|
+
class AccountOutcomeActor
|
|
9
|
+
extend T::Sig
|
|
10
|
+
include Crystalline::MetadataFields
|
|
11
|
+
|
|
12
|
+
field(
|
|
13
|
+
:key_id,
|
|
14
|
+
::String,
|
|
15
|
+
{'format_json': {'letter_case': ::NoResponse::Utils.field_name("key_id"), required: true}}
|
|
16
|
+
)
|
|
17
|
+
|
|
18
|
+
field :type, ::String, {'format_json': {'letter_case': ::NoResponse::Utils.field_name("type"), required: true}}
|
|
19
|
+
|
|
20
|
+
sig { params(key_id: ::String, type: ::String).void }
|
|
21
|
+
def initialize(key_id:, type: "api_key")
|
|
22
|
+
@key_id = key_id
|
|
23
|
+
unless type == "api_key"
|
|
24
|
+
raise ArgumentError, "Invalid value for type"
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
@type = "api_key"
|
|
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 @key_id == other.key_id
|
|
34
|
+
return false unless @type == other.type
|
|
35
|
+
true
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# typed: true
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
class NoResponse::Models::Shared::AccountOutcomeActor
|
|
5
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
class NoResponse::Models::Shared::AccountOutcomeActor
|
|
9
|
+
def key_id
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def key_id=(str_)
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
def type
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
def type=(str_)
|
|
19
|
+
end
|
|
20
|
+
end
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# typed: true
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
module NoResponse
|
|
5
|
+
module Models
|
|
6
|
+
module Shared
|
|
7
|
+
# List retained account reports, newest first. The page-level effective outcome id names the current report. Each receipt preserves the effective report and risk version from its original write. Page with the returned cursor.
|
|
8
|
+
class AccountOutcomePage
|
|
9
|
+
extend T::Sig
|
|
10
|
+
include Crystalline::MetadataFields
|
|
11
|
+
|
|
12
|
+
# Your own opaque identifier for the account being checked, scoped to your workspace. Use an id you mint, with no direct identifier (email, phone, name or national id) in it. '|' is accepted so an Auth0 user id such as 'auth0|64abc' passes unchanged; '@', '+', '$' and whitespace are refused by the pattern, as is an exact-shape JWT; a hex digest such as a SHA-256 is allowed, because hashing an internal id is a common pseudonymous scheme. A value such as '07700900123' or 'jane.doe.gmail.com' cannot be told apart from an opaque id. It travels in bodies, and in a URL only as the path segment of GET /v1/accounts/{account_id} and its /assessments. An assessment requested by a provider hook at pre_registration, which has no account yet, carries the server-issued account_id pre: followed by its assessment_id.
|
|
13
|
+
field(
|
|
14
|
+
:account_id,
|
|
15
|
+
::String,
|
|
16
|
+
{'format_json': {'letter_case': ::NoResponse::Utils.field_name("account_id"), required: true}}
|
|
17
|
+
)
|
|
18
|
+
|
|
19
|
+
field(
|
|
20
|
+
:items,
|
|
21
|
+
Crystalline::Array.new(Models::Shared::AccountOutcome),
|
|
22
|
+
{'format_json': {'letter_case': ::NoResponse::Utils.field_name("items"), required: true}}
|
|
23
|
+
)
|
|
24
|
+
# Opaque, expiring cursor bound to this environment, operation and every filter. Keep the filters unchanged.
|
|
25
|
+
field(
|
|
26
|
+
:next_cursor,
|
|
27
|
+
Crystalline::Nilable.new(::String),
|
|
28
|
+
{'format_json': {'letter_case': ::NoResponse::Utils.field_name("next_cursor")}}
|
|
29
|
+
)
|
|
30
|
+
# Opaque, server-assigned id of one recorded outcome: 'out_' and a 26-character Crockford base32 ULID. Unique within the workspace.
|
|
31
|
+
field(
|
|
32
|
+
:effective_outcome_id,
|
|
33
|
+
Crystalline::Nilable.new(::String),
|
|
34
|
+
{'format_json': {'letter_case': ::NoResponse::Utils.field_name("effective_outcome_id")}}
|
|
35
|
+
)
|
|
36
|
+
|
|
37
|
+
sig {
|
|
38
|
+
params(
|
|
39
|
+
account_id: ::String,
|
|
40
|
+
items: T::Array[Models::Shared::AccountOutcome],
|
|
41
|
+
next_cursor: T.nilable(::String),
|
|
42
|
+
effective_outcome_id: T.nilable(::String)
|
|
43
|
+
)
|
|
44
|
+
.void
|
|
45
|
+
}
|
|
46
|
+
def initialize(account_id:, items:, next_cursor: nil, effective_outcome_id: nil)
|
|
47
|
+
@account_id = account_id
|
|
48
|
+
@items = items
|
|
49
|
+
@next_cursor = next_cursor
|
|
50
|
+
@effective_outcome_id = effective_outcome_id
|
|
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 @account_id == other.account_id
|
|
57
|
+
return false unless @items == other.items
|
|
58
|
+
return false unless @next_cursor == other.next_cursor
|
|
59
|
+
return false unless @effective_outcome_id == other.effective_outcome_id
|
|
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::AccountOutcomePage
|
|
5
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
class NoResponse::Models::Shared::AccountOutcomePage
|
|
9
|
+
def account_id
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def account_id=(str_)
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
def items
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
def items=(str_)
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def next_cursor
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def next_cursor=(str_)
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
def effective_outcome_id
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
def effective_outcome_id=(str_)
|
|
31
|
+
end
|
|
32
|
+
end
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# typed: true
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
module NoResponse
|
|
5
|
+
module Models
|
|
6
|
+
module Shared
|
|
7
|
+
# Record a factual report, not an enforcement action. A known outcome replaces the effective report. unknown alone records uncertainty without changing it; unknown with supersedes explicitly retracts it. supersedes must name the current effective report or the request answers 409 outcome_conflict. Reports remain append-only. Idempotency-Key is required. observed_at defaults to receipt time and cannot be over five minutes ahead.
|
|
8
|
+
class AccountOutcomeRequest
|
|
9
|
+
extend T::Sig
|
|
10
|
+
include Crystalline::MetadataFields
|
|
11
|
+
|
|
12
|
+
# 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.
|
|
13
|
+
field(
|
|
14
|
+
:outcome,
|
|
15
|
+
Models::Shared::Outcome,
|
|
16
|
+
{
|
|
17
|
+
'format_json': {
|
|
18
|
+
'letter_case': ::NoResponse::Utils.field_name("outcome"),
|
|
19
|
+
required: true,
|
|
20
|
+
'decoder': ::NoResponse::Utils.open_enum_from_string(Models::Shared::Outcome, false)
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
)
|
|
24
|
+
|
|
25
|
+
field(
|
|
26
|
+
:observed_at,
|
|
27
|
+
Crystalline::Nilable.new(::String),
|
|
28
|
+
{'format_json': {'letter_case': ::NoResponse::Utils.field_name("observed_at")}}
|
|
29
|
+
)
|
|
30
|
+
# Your own opaque reference for the outcome, such as a case or ticket id. Stored as given and not interpreted; keep direct identifiers out of it.
|
|
31
|
+
field(
|
|
32
|
+
:external_ref,
|
|
33
|
+
Crystalline::Nilable.new(::String),
|
|
34
|
+
{'format_json': {'letter_case': ::NoResponse::Utils.field_name("external_ref")}}
|
|
35
|
+
)
|
|
36
|
+
# Opaque, server-assigned id of one recorded outcome: 'out_' and a 26-character Crockford base32 ULID. Unique within the workspace.
|
|
37
|
+
field(
|
|
38
|
+
:supersedes,
|
|
39
|
+
Crystalline::Nilable.new(::String),
|
|
40
|
+
{'format_json': {'letter_case': ::NoResponse::Utils.field_name("supersedes")}}
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
sig {
|
|
44
|
+
params(
|
|
45
|
+
outcome: Models::Shared::Outcome,
|
|
46
|
+
observed_at: T.nilable(::String),
|
|
47
|
+
external_ref: T.nilable(::String),
|
|
48
|
+
supersedes: T.nilable(::String)
|
|
49
|
+
)
|
|
50
|
+
.void
|
|
51
|
+
}
|
|
52
|
+
def initialize(outcome:, observed_at: nil, external_ref: nil, supersedes: nil)
|
|
53
|
+
@outcome = outcome
|
|
54
|
+
@observed_at = observed_at
|
|
55
|
+
@external_ref = external_ref
|
|
56
|
+
@supersedes = supersedes
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
sig { params(other: T.untyped).returns(T::Boolean) }
|
|
60
|
+
def ==(other)
|
|
61
|
+
return false unless other.is_a?(self.class)
|
|
62
|
+
return false unless @outcome == other.outcome
|
|
63
|
+
return false unless @observed_at == other.observed_at
|
|
64
|
+
return false unless @external_ref == other.external_ref
|
|
65
|
+
return false unless @supersedes == other.supersedes
|
|
66
|
+
true
|
|
67
|
+
end
|
|
68
|
+
end
|
|
69
|
+
end
|
|
70
|
+
end
|
|
71
|
+
end
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# typed: true
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
class NoResponse::Models::Shared::AccountOutcomeRequest
|
|
5
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
class NoResponse::Models::Shared::AccountOutcomeRequest
|
|
9
|
+
def outcome
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def outcome=(str_)
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
def observed_at
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
def observed_at=(str_)
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def external_ref
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def external_ref=(str_)
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
def supersedes
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
def supersedes=(str_)
|
|
31
|
+
end
|
|
32
|
+
end
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
# typed: true
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
module NoResponse
|
|
5
|
+
module Models
|
|
6
|
+
module Shared
|
|
7
|
+
# Retrieve a retained assessment version with its original decision, policy, flow and depth. This response excludes the current account decision. Current retention and response-mode permissions still apply.
|
|
8
|
+
class AssessmentRevision
|
|
9
|
+
extend T::Sig
|
|
10
|
+
include Crystalline::MetadataFields
|
|
11
|
+
|
|
12
|
+
# This assessment's id, equal to detail.assessment_id.
|
|
13
|
+
field :id, ::String, {'format_json': {'letter_case': ::NoResponse::Utils.field_name("id"), required: true}}
|
|
14
|
+
# complete: final; nothing is still running. A lane that failed or missed its 10 s deadline stays listed in incomplete_sources, and confidence is lower. partial: a recommendation exists and at least one lane is still running or did not settle (see incomplete_sources). pending: nothing usable before the deadline; no recommendation yet, poll or wait for the webhook.
|
|
15
|
+
field(
|
|
16
|
+
:status,
|
|
17
|
+
Models::Shared::Status,
|
|
18
|
+
{
|
|
19
|
+
'format_json': {
|
|
20
|
+
'letter_case': ::NoResponse::Utils.field_name("status"),
|
|
21
|
+
required: true,
|
|
22
|
+
'decoder': ::NoResponse::Utils.open_enum_from_string(Models::Shared::Status, false)
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
)
|
|
26
|
+
# 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.
|
|
27
|
+
field(
|
|
28
|
+
:flow,
|
|
29
|
+
Models::Shared::Flow,
|
|
30
|
+
{
|
|
31
|
+
'format_json': {
|
|
32
|
+
'letter_case': ::NoResponse::Utils.field_name("flow"),
|
|
33
|
+
required: true,
|
|
34
|
+
'decoder': ::NoResponse::Utils.open_enum_from_string(Models::Shared::Flow, false)
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
)
|
|
38
|
+
# How long the synchronous answer waits for sources. quick waits only for the fast sources, those that answer within 500 ms of ingress (or deadline_ms when lower); full waits for the whole budget, up to 3000 ms. Sources still running at the cut continue asynchronously and update the assessment either way.
|
|
39
|
+
field(
|
|
40
|
+
:depth,
|
|
41
|
+
Models::Shared::Depth,
|
|
42
|
+
{
|
|
43
|
+
'format_json': {
|
|
44
|
+
'letter_case': ::NoResponse::Utils.field_name("depth"),
|
|
45
|
+
required: true,
|
|
46
|
+
'decoder': ::NoResponse::Utils.open_enum_from_string(Models::Shared::Depth, false)
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
)
|
|
50
|
+
# One assessment's own facts: its score and recommendation, the signals behind them, the lanes still running and its timing. risk here is this assessment's own score; the account's current risk is the account member of the assessment. risk and recommendation are present for complete and partial; assessment_url is present for pending.
|
|
51
|
+
field(
|
|
52
|
+
:detail,
|
|
53
|
+
Models::Shared::AssessmentDetail,
|
|
54
|
+
{'format_json': {'letter_case': ::NoResponse::Utils.field_name("detail"), required: true}}
|
|
55
|
+
)
|
|
56
|
+
# Version of the body shape.
|
|
57
|
+
field(
|
|
58
|
+
:schema_version,
|
|
59
|
+
::String,
|
|
60
|
+
{'format_json': {'letter_case': ::NoResponse::Utils.field_name("schema_version"), required: true}}
|
|
61
|
+
)
|
|
62
|
+
|
|
63
|
+
sig {
|
|
64
|
+
params(
|
|
65
|
+
id: ::String,
|
|
66
|
+
status: Models::Shared::Status,
|
|
67
|
+
flow: Models::Shared::Flow,
|
|
68
|
+
depth: Models::Shared::Depth,
|
|
69
|
+
detail: Models::Shared::AssessmentDetail,
|
|
70
|
+
schema_version: ::String
|
|
71
|
+
)
|
|
72
|
+
.void
|
|
73
|
+
}
|
|
74
|
+
def initialize(id:, status:, flow:, depth:, detail:, schema_version: "1")
|
|
75
|
+
@id = id
|
|
76
|
+
@status = status
|
|
77
|
+
@flow = flow
|
|
78
|
+
@depth = depth
|
|
79
|
+
@detail = detail
|
|
80
|
+
unless schema_version == "1"
|
|
81
|
+
raise ArgumentError, "Invalid value for schema_version"
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
@schema_version = "1"
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
sig { params(other: T.untyped).returns(T::Boolean) }
|
|
88
|
+
def ==(other)
|
|
89
|
+
return false unless other.is_a?(self.class)
|
|
90
|
+
return false unless @id == other.id
|
|
91
|
+
return false unless @status == other.status
|
|
92
|
+
return false unless @flow == other.flow
|
|
93
|
+
return false unless @depth == other.depth
|
|
94
|
+
return false unless @detail == other.detail
|
|
95
|
+
return false unless @schema_version == other.schema_version
|
|
96
|
+
true
|
|
97
|
+
end
|
|
98
|
+
end
|
|
99
|
+
end
|
|
100
|
+
end
|
|
101
|
+
end
|