noresponse 8.1.3 → 8.2.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 +4 -4
- data/lib/no_response/accounts.rb +2069 -1
- data/lib/no_response/assessments.rb +893 -3
- 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/assessmentdetail.rb +10 -0
- data/lib/no_response/models/shared/assessmentdetail.rbi +6 -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/sentidentifiers.rb +74 -0
- data/lib/no_response/models/shared/sentidentifiers.rbi +38 -0
- data/lib/no_response/models/shared.rb +24 -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 +92 -1
|
@@ -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 CredentialAssociationRetiredBy
|
|
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::CredentialAssociationRetiredBy
|
|
5
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
class NoResponse::Models::Shared::CredentialAssociationRetiredBy
|
|
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,56 @@
|
|
|
1
|
+
# typed: true
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
module NoResponse
|
|
5
|
+
module Models
|
|
6
|
+
module Shared
|
|
7
|
+
# Retained credential associations, ordered by id. Page with the authenticated cursor. Associations are removed on account erasure.
|
|
8
|
+
class CredentialPage
|
|
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::CredentialAssociation),
|
|
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
|
+
|
|
31
|
+
sig {
|
|
32
|
+
params(
|
|
33
|
+
account_id: ::String,
|
|
34
|
+
items: T::Array[Models::Shared::CredentialAssociation],
|
|
35
|
+
next_cursor: T.nilable(::String)
|
|
36
|
+
)
|
|
37
|
+
.void
|
|
38
|
+
}
|
|
39
|
+
def initialize(account_id:, items:, next_cursor: nil)
|
|
40
|
+
@account_id = account_id
|
|
41
|
+
@items = items
|
|
42
|
+
@next_cursor = next_cursor
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
sig { params(other: T.untyped).returns(T::Boolean) }
|
|
46
|
+
def ==(other)
|
|
47
|
+
return false unless other.is_a?(self.class)
|
|
48
|
+
return false unless @account_id == other.account_id
|
|
49
|
+
return false unless @items == other.items
|
|
50
|
+
return false unless @next_cursor == other.next_cursor
|
|
51
|
+
true
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
end
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# typed: true
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
class NoResponse::Models::Shared::CredentialPage
|
|
5
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
class NoResponse::Models::Shared::CredentialPage
|
|
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
|
+
end
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# typed: true
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
module NoResponse
|
|
5
|
+
module Models
|
|
6
|
+
module Shared
|
|
7
|
+
# Associate the SHA-256 of a high-entropy key issued by your service. Send the hash instead of the key. Repeating a hash returns its original association, including its retirement state. A hash associated with another account returns a conflict.
|
|
8
|
+
class CredentialRequest
|
|
9
|
+
extend T::Sig
|
|
10
|
+
include Crystalline::MetadataFields
|
|
11
|
+
|
|
12
|
+
field(
|
|
13
|
+
:sha256,
|
|
14
|
+
::String,
|
|
15
|
+
{'format_json': {'letter_case': ::NoResponse::Utils.field_name("sha256"), required: true}}
|
|
16
|
+
)
|
|
17
|
+
|
|
18
|
+
sig { params(sha256: ::String).void }
|
|
19
|
+
def initialize(sha256:)
|
|
20
|
+
@sha256 = sha256
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
sig { params(other: T.untyped).returns(T::Boolean) }
|
|
24
|
+
def ==(other)
|
|
25
|
+
return false unless other.is_a?(self.class)
|
|
26
|
+
return false unless @sha256 == other.sha256
|
|
27
|
+
true
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# typed: true
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
class NoResponse::Models::Shared::CredentialRequest
|
|
5
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
class NoResponse::Models::Shared::CredentialRequest
|
|
9
|
+
def sha256
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def sha256=(str_)
|
|
13
|
+
end
|
|
14
|
+
end
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# typed: true
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
module NoResponse
|
|
5
|
+
module Models
|
|
6
|
+
module Shared
|
|
7
|
+
# Decision - The decision of the assessment's latest stored revision: block when its stored risk.block is true, otherwise its recommendation. This is not the account's current decision or held-admission state. Combined with recommendation using AND.
|
|
8
|
+
class Decision < T::Enum
|
|
9
|
+
enums do
|
|
10
|
+
ALLOW = new("allow")
|
|
11
|
+
STEP_UP = new("step_up")
|
|
12
|
+
REVIEW = new("review")
|
|
13
|
+
BLOCK = new("block")
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
# typed: true
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
module NoResponse
|
|
5
|
+
module Models
|
|
6
|
+
module Shared
|
|
7
|
+
# The decision prepared for one HTTP attempt. Its account field preserves the account decision returned for that attempt, even after subsequent changes.
|
|
8
|
+
class DecisionReceipt
|
|
9
|
+
extend T::Sig
|
|
10
|
+
include Crystalline::MetadataFields
|
|
11
|
+
|
|
12
|
+
# Opaque, server-assigned assessment id: 'asm_' and a 26-character Crockford base32 ULID. Unique within the workspace; another workspace's assessment id answers 404.
|
|
13
|
+
field(
|
|
14
|
+
:assessment_id,
|
|
15
|
+
::String,
|
|
16
|
+
{'format_json': {'letter_case': ::NoResponse::Utils.field_name("assessment_id"), required: true}}
|
|
17
|
+
)
|
|
18
|
+
# Monotonic revision of this assessment. 1 on the synchronous answer; each material change while the assessment is served (an async continuation settling a source, a change of recommendation, confidence or status) increments it. Expiry does not increment it: an expired assessment is gone, not revised, and the expiry webhook carries the last served version.
|
|
19
|
+
field(
|
|
20
|
+
:assessment_version,
|
|
21
|
+
::Integer,
|
|
22
|
+
{'format_json': {'letter_case': ::NoResponse::Utils.field_name("assessment_version"), required: true}}
|
|
23
|
+
)
|
|
24
|
+
# 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.
|
|
25
|
+
field(
|
|
26
|
+
:flow,
|
|
27
|
+
Models::Shared::Flow,
|
|
28
|
+
{
|
|
29
|
+
'format_json': {
|
|
30
|
+
'letter_case': ::NoResponse::Utils.field_name("flow"),
|
|
31
|
+
required: true,
|
|
32
|
+
'decoder': ::NoResponse::Utils.open_enum_from_string(Models::Shared::Flow, false)
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
)
|
|
36
|
+
# 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.
|
|
37
|
+
field(
|
|
38
|
+
:status,
|
|
39
|
+
Models::Shared::Status,
|
|
40
|
+
{
|
|
41
|
+
'format_json': {
|
|
42
|
+
'letter_case': ::NoResponse::Utils.field_name("status"),
|
|
43
|
+
required: true,
|
|
44
|
+
'decoder': ::NoResponse::Utils.open_enum_from_string(Models::Shared::Status, false)
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
)
|
|
48
|
+
# Version of the hand-authored heuristic policy that produced the recommendation, for example 'risk-2026-10.7'. A workspace threshold override adds a +t<N> suffix, e.g. 'risk-2026-10.7+t3'.
|
|
49
|
+
field(
|
|
50
|
+
:policy_version,
|
|
51
|
+
Crystalline::Nilable.new(::String),
|
|
52
|
+
{'format_json': {'letter_case': ::NoResponse::Utils.field_name("policy_version")}}
|
|
53
|
+
)
|
|
54
|
+
|
|
55
|
+
field(
|
|
56
|
+
:score,
|
|
57
|
+
Crystalline::Nilable.new(::Integer),
|
|
58
|
+
{'format_json': {'letter_case': ::NoResponse::Utils.field_name("score")}}
|
|
59
|
+
)
|
|
60
|
+
# Body of the 200 answer to GET /v1/accounts/{account_id}: the one current risk of one of the calling workspace's accounts. It is the risk of the account's latest assessment that has a decision (status complete or partial), by created_at and then assessment_id, scored exactly as GET /v1/assessments/{assessment_id} scores that assessment, plus the account's own reason shared_api_key when a key issued to the account was used from many IP addresses or countries (POST /v1/key_usage/batches). Its assessments are the account's history (GET /v1/accounts/{account_id}/assessments).
|
|
61
|
+
field(
|
|
62
|
+
:account,
|
|
63
|
+
Crystalline::Nilable.new(Models::Shared::Account),
|
|
64
|
+
{'format_json': {'letter_case': ::NoResponse::Utils.field_name("account")}}
|
|
65
|
+
)
|
|
66
|
+
|
|
67
|
+
sig {
|
|
68
|
+
params(
|
|
69
|
+
assessment_id: ::String,
|
|
70
|
+
assessment_version: ::Integer,
|
|
71
|
+
flow: Models::Shared::Flow,
|
|
72
|
+
status: Models::Shared::Status,
|
|
73
|
+
policy_version: T.nilable(::String),
|
|
74
|
+
score: T.nilable(::Integer),
|
|
75
|
+
account: T.nilable(Models::Shared::Account)
|
|
76
|
+
)
|
|
77
|
+
.void
|
|
78
|
+
}
|
|
79
|
+
def initialize(
|
|
80
|
+
assessment_id:,
|
|
81
|
+
assessment_version:,
|
|
82
|
+
flow:,
|
|
83
|
+
status:,
|
|
84
|
+
policy_version: nil,
|
|
85
|
+
score: nil,
|
|
86
|
+
account: nil
|
|
87
|
+
)
|
|
88
|
+
@assessment_id = assessment_id
|
|
89
|
+
@assessment_version = assessment_version
|
|
90
|
+
@flow = flow
|
|
91
|
+
@status = status
|
|
92
|
+
@policy_version = policy_version
|
|
93
|
+
@score = score
|
|
94
|
+
@account = account
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
sig { params(other: T.untyped).returns(T::Boolean) }
|
|
98
|
+
def ==(other)
|
|
99
|
+
return false unless other.is_a?(self.class)
|
|
100
|
+
return false unless @assessment_id == other.assessment_id
|
|
101
|
+
return false unless @assessment_version == other.assessment_version
|
|
102
|
+
return false unless @flow == other.flow
|
|
103
|
+
return false unless @status == other.status
|
|
104
|
+
return false unless @policy_version == other.policy_version
|
|
105
|
+
return false unless @score == other.score
|
|
106
|
+
return false unless @account == other.account
|
|
107
|
+
true
|
|
108
|
+
end
|
|
109
|
+
end
|
|
110
|
+
end
|
|
111
|
+
end
|
|
112
|
+
end
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# typed: true
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
class NoResponse::Models::Shared::DecisionReceipt
|
|
5
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
class NoResponse::Models::Shared::DecisionReceipt
|
|
9
|
+
def assessment_id
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def assessment_id=(str_)
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
def assessment_version
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
def assessment_version=(str_)
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def flow
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def flow=(str_)
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
def status
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
def status=(str_)
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
def policy_version
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
def policy_version=(str_)
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
def score
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
def score=(str_)
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
def account
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
def account=(str_)
|
|
49
|
+
end
|
|
50
|
+
end
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# typed: true
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
module NoResponse
|
|
5
|
+
module Models
|
|
6
|
+
module Shared
|
|
7
|
+
|
|
8
|
+
class Exclusion
|
|
9
|
+
include ::Crystalline::Enum
|
|
10
|
+
enums do
|
|
11
|
+
EXPIRED_OR_ERASED_RECORDS = new("expired_or_erased_records")
|
|
12
|
+
SECRETS_AND_CREDENTIAL_DIGESTS = new("secrets_and_credential_digests")
|
|
13
|
+
PRIVATE_SOURCE_AND_WORK_PAYLOADS = new("private_source_and_work_payloads")
|
|
14
|
+
CROSS_CUSTOMER_DATA = new("cross_customer_data")
|
|
15
|
+
LEGACY_OUTCOME_NOTES = new("legacy_outcome_notes")
|
|
16
|
+
UNCAPTURED_HISTORICAL_DECISIONS = new("uncaptured_historical_decisions")
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
open!
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
# typed: true
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
module NoResponse
|
|
5
|
+
module Models
|
|
6
|
+
module Shared
|
|
7
|
+
# Structured fields of a retained per-assessment outcome. Legacy notes remain private as promised by the existing outcome contract.
|
|
8
|
+
class ExportAssessmentOutcome
|
|
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
|
+
# Opaque, server-assigned assessment id: 'asm_' and a 26-character Crockford base32 ULID. Unique within the workspace; another workspace's assessment id answers 404.
|
|
15
|
+
field(
|
|
16
|
+
:assessment_id,
|
|
17
|
+
::String,
|
|
18
|
+
{'format_json': {'letter_case': ::NoResponse::Utils.field_name("assessment_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
|
+
# 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.
|
|
45
|
+
field(
|
|
46
|
+
:external_ref,
|
|
47
|
+
Crystalline::Nilable.new(::String),
|
|
48
|
+
{'format_json': {'letter_case': ::NoResponse::Utils.field_name("external_ref")}}
|
|
49
|
+
)
|
|
50
|
+
|
|
51
|
+
sig {
|
|
52
|
+
params(
|
|
53
|
+
id: ::String,
|
|
54
|
+
assessment_id: ::String,
|
|
55
|
+
outcome: Models::Shared::Outcome,
|
|
56
|
+
observed_at: ::String,
|
|
57
|
+
received_at: ::String,
|
|
58
|
+
external_ref: T.nilable(::String)
|
|
59
|
+
)
|
|
60
|
+
.void
|
|
61
|
+
}
|
|
62
|
+
def initialize(id:, assessment_id:, outcome:, observed_at:, received_at:, external_ref: nil)
|
|
63
|
+
@id = id
|
|
64
|
+
@assessment_id = assessment_id
|
|
65
|
+
@outcome = outcome
|
|
66
|
+
@observed_at = observed_at
|
|
67
|
+
@received_at = received_at
|
|
68
|
+
@external_ref = external_ref
|
|
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 @id == other.id
|
|
75
|
+
return false unless @assessment_id == other.assessment_id
|
|
76
|
+
return false unless @outcome == other.outcome
|
|
77
|
+
return false unless @observed_at == other.observed_at
|
|
78
|
+
return false unless @received_at == other.received_at
|
|
79
|
+
return false unless @external_ref == other.external_ref
|
|
80
|
+
true
|
|
81
|
+
end
|
|
82
|
+
end
|
|
83
|
+
end
|
|
84
|
+
end
|
|
85
|
+
end
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# typed: true
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
class NoResponse::Models::Shared::ExportAssessmentOutcome
|
|
5
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
class NoResponse::Models::Shared::ExportAssessmentOutcome
|
|
9
|
+
def id
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def id=(str_)
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
def assessment_id
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
def assessment_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 external_ref
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
def external_ref=(str_)
|
|
43
|
+
end
|
|
44
|
+
end
|