prelude-sdk 0.7.0 → 0.9.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/CHANGELOG.md +16 -0
- data/README.md +3 -5
- data/lib/prelude_sdk/client.rb +4 -0
- data/lib/prelude_sdk/internal/type/base_model.rb +5 -5
- data/lib/prelude_sdk/models/intel/kyc_match_params.rb +96 -0
- data/lib/prelude_sdk/models/intel/kyc_match_response.rb +305 -0
- data/lib/prelude_sdk/models/notify_reply_params.rb +60 -0
- data/lib/prelude_sdk/models/notify_reply_response.rb +65 -0
- data/lib/prelude_sdk/models/signals.rb +125 -0
- data/lib/prelude_sdk/models/target.rb +39 -0
- data/lib/prelude_sdk/models/verification/phone/history_list_params.rb +177 -0
- data/lib/prelude_sdk/models/verification/phone/history_list_response.rb +286 -0
- data/lib/prelude_sdk/models/verification/phone/history_retrieve_params.rb +24 -0
- data/lib/prelude_sdk/models/verification/phone/history_retrieve_response.rb +910 -0
- data/lib/prelude_sdk/models/verification/phone/phone_verification_carrier.rb +29 -0
- data/lib/prelude_sdk/models/verification/phone/phone_verification_money.rb +35 -0
- data/lib/prelude_sdk/models/verification/phone/phone_verification_psd2_transaction.rb +29 -0
- data/lib/prelude_sdk/models/verification_check_params.rb +3 -38
- data/lib/prelude_sdk/models/verification_create_params.rb +6 -161
- data/lib/prelude_sdk/models/verification_create_response.rb +59 -33
- data/lib/prelude_sdk/models/verification_management/sandbox_add_phone_number_params.rb +37 -0
- data/lib/prelude_sdk/models/verification_management/sandbox_add_phone_number_response.rb +27 -0
- data/lib/prelude_sdk/models/verification_management/sandbox_delete_phone_number_params.rb +22 -0
- data/lib/prelude_sdk/models/verification_management/sandbox_delete_phone_number_response.rb +19 -0
- data/lib/prelude_sdk/models/verification_management/sandbox_list_phone_numbers_params.rb +16 -0
- data/lib/prelude_sdk/models/verification_management/sandbox_list_phone_numbers_response.rb +47 -0
- data/lib/prelude_sdk/models/watch_evaluate_params.rb +68 -0
- data/lib/prelude_sdk/models/watch_evaluate_response.rb +318 -0
- data/lib/prelude_sdk/models/watch_predict_params.rb +6 -160
- data/lib/prelude_sdk/models/watch_predict_response.rb +53 -30
- data/lib/prelude_sdk/models/watch_send_events_params.rb +3 -38
- data/lib/prelude_sdk/models/watch_send_feedbacks_params.rb +3 -38
- data/lib/prelude_sdk/models.rb +14 -0
- data/lib/prelude_sdk/resources/intel/kyc.rb +62 -0
- data/lib/prelude_sdk/resources/intel.rb +20 -0
- data/lib/prelude_sdk/resources/notify.rb +35 -0
- data/lib/prelude_sdk/resources/verification/phone/history.rb +104 -0
- data/lib/prelude_sdk/resources/verification/phone.rb +21 -0
- data/lib/prelude_sdk/resources/verification.rb +7 -3
- data/lib/prelude_sdk/resources/verification_management/sandbox.rb +99 -0
- data/lib/prelude_sdk/resources/verification_management.rb +5 -0
- data/lib/prelude_sdk/resources/watch.rb +45 -2
- data/lib/prelude_sdk/version.rb +1 -1
- data/lib/prelude_sdk.rb +26 -0
- data/rbi/prelude_sdk/client.rbi +3 -0
- data/rbi/prelude_sdk/models/intel/kyc_match_params.rbi +147 -0
- data/rbi/prelude_sdk/models/intel/kyc_match_response.rbi +736 -0
- data/rbi/prelude_sdk/models/notify_reply_params.rbi +87 -0
- data/rbi/prelude_sdk/models/notify_reply_response.rbi +94 -0
- data/rbi/prelude_sdk/models/signals.rbi +200 -0
- data/rbi/prelude_sdk/models/target.rbi +61 -0
- data/rbi/prelude_sdk/models/verification/phone/history_list_params.rbi +436 -0
- data/rbi/prelude_sdk/models/verification/phone/history_list_response.rbi +661 -0
- data/rbi/prelude_sdk/models/verification/phone/history_retrieve_params.rbi +42 -0
- data/rbi/prelude_sdk/models/verification/phone/history_retrieve_response.rbi +2290 -0
- data/rbi/prelude_sdk/models/verification/phone/phone_verification_carrier.rbi +39 -0
- data/rbi/prelude_sdk/models/verification/phone/phone_verification_money.rbi +46 -0
- data/rbi/prelude_sdk/models/verification/phone/phone_verification_psd2_transaction.rbi +68 -0
- data/rbi/prelude_sdk/models/verification_check_params.rbi +4 -85
- data/rbi/prelude_sdk/models/verification_create_params.rbi +8 -328
- data/rbi/prelude_sdk/models/verification_create_response.rbi +143 -65
- data/rbi/prelude_sdk/models/verification_management/sandbox_add_phone_number_params.rbi +58 -0
- data/rbi/prelude_sdk/models/verification_management/sandbox_add_phone_number_response.rbi +42 -0
- data/rbi/prelude_sdk/models/verification_management/sandbox_delete_phone_number_params.rbi +43 -0
- data/rbi/prelude_sdk/models/verification_management/sandbox_delete_phone_number_response.rbi +32 -0
- data/rbi/prelude_sdk/models/verification_management/sandbox_list_phone_numbers_params.rbi +34 -0
- data/rbi/prelude_sdk/models/verification_management/sandbox_list_phone_numbers_response.rbi +101 -0
- data/rbi/prelude_sdk/models/watch_evaluate_params.rbi +109 -0
- data/rbi/prelude_sdk/models/watch_evaluate_response.rbi +596 -0
- data/rbi/prelude_sdk/models/watch_predict_params.rbi +8 -320
- data/rbi/prelude_sdk/models/watch_predict_response.rbi +135 -62
- data/rbi/prelude_sdk/models/watch_send_events_params.rbi +4 -93
- data/rbi/prelude_sdk/models/watch_send_feedbacks_params.rbi +4 -95
- data/rbi/prelude_sdk/models.rbi +14 -0
- data/rbi/prelude_sdk/resources/intel/kyc.rbi +61 -0
- data/rbi/prelude_sdk/resources/intel.rbi +17 -0
- data/rbi/prelude_sdk/resources/notify.rbi +31 -0
- data/rbi/prelude_sdk/resources/verification/phone/history.rbi +112 -0
- data/rbi/prelude_sdk/resources/verification/phone.rbi +18 -0
- data/rbi/prelude_sdk/resources/verification.rbi +6 -3
- data/rbi/prelude_sdk/resources/verification_management/sandbox.rbi +76 -0
- data/rbi/prelude_sdk/resources/verification_management.rbi +4 -0
- data/rbi/prelude_sdk/resources/watch.rbi +49 -2
- data/sig/prelude_sdk/client.rbs +2 -0
- data/sig/prelude_sdk/models/intel/kyc_match_params.rbs +91 -0
- data/sig/prelude_sdk/models/intel/kyc_match_response.rbs +276 -0
- data/sig/prelude_sdk/models/notify_reply_params.rbs +50 -0
- data/sig/prelude_sdk/models/notify_reply_response.rbs +54 -0
- data/sig/prelude_sdk/models/signals.rbs +101 -0
- data/sig/prelude_sdk/models/target.rbs +29 -0
- data/sig/prelude_sdk/models/verification/phone/history_list_params.rbs +187 -0
- data/sig/prelude_sdk/models/verification/phone/history_list_response.rbs +241 -0
- data/sig/prelude_sdk/models/verification/phone/history_retrieve_params.rbs +27 -0
- data/sig/prelude_sdk/models/verification/phone/history_retrieve_response.rbs +887 -0
- data/sig/prelude_sdk/models/verification/phone/phone_verification_carrier.rbs +23 -0
- data/sig/prelude_sdk/models/verification/phone/phone_verification_money.rbs +21 -0
- data/sig/prelude_sdk/models/verification/phone/phone_verification_psd2_transaction.rbs +37 -0
- data/sig/prelude_sdk/models/verification_check_params.rbs +4 -37
- data/sig/prelude_sdk/models/verification_create_params.rbs +9 -142
- data/sig/prelude_sdk/models/verification_create_response.rbs +32 -14
- data/sig/prelude_sdk/models/verification_management/sandbox_add_phone_number_params.rbs +30 -0
- data/sig/prelude_sdk/models/verification_management/sandbox_add_phone_number_response.rbs +18 -0
- data/sig/prelude_sdk/models/verification_management/sandbox_delete_phone_number_params.rbs +26 -0
- data/sig/prelude_sdk/models/verification_management/sandbox_delete_phone_number_response.rbs +15 -0
- data/sig/prelude_sdk/models/verification_management/sandbox_list_phone_numbers_params.rbs +17 -0
- data/sig/prelude_sdk/models/verification_management/sandbox_list_phone_numbers_response.rbs +45 -0
- data/sig/prelude_sdk/models/watch_evaluate_params.rbs +52 -0
- data/sig/prelude_sdk/models/watch_evaluate_response.rbs +202 -0
- data/sig/prelude_sdk/models/watch_predict_params.rbs +9 -142
- data/sig/prelude_sdk/models/watch_predict_response.rbs +32 -14
- data/sig/prelude_sdk/models/watch_send_events_params.rbs +4 -37
- data/sig/prelude_sdk/models/watch_send_feedbacks_params.rbs +4 -37
- data/sig/prelude_sdk/models.rbs +14 -0
- data/sig/prelude_sdk/resources/intel/kyc.rbs +23 -0
- data/sig/prelude_sdk/resources/intel.rbs +9 -0
- data/sig/prelude_sdk/resources/notify.rbs +9 -0
- data/sig/prelude_sdk/resources/verification/phone/history.rbs +32 -0
- data/sig/prelude_sdk/resources/verification/phone.rbs +11 -0
- data/sig/prelude_sdk/resources/verification.rbs +5 -3
- data/sig/prelude_sdk/resources/verification_management/sandbox.rbs +24 -0
- data/sig/prelude_sdk/resources/verification_management.rbs +2 -0
- data/sig/prelude_sdk/resources/watch.rbs +11 -2
- metadata +80 -2
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module PreludeSDK
|
|
4
|
+
module Models
|
|
5
|
+
# @see PreludeSDK::Resources::Watch#evaluate
|
|
6
|
+
class WatchEvaluateParams < PreludeSDK::Internal::Type::BaseModel
|
|
7
|
+
extend PreludeSDK::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include PreludeSDK::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute flow_id
|
|
11
|
+
# The flow to evaluate. A flow names the moment you are guarding and selects the
|
|
12
|
+
# recipes that run.
|
|
13
|
+
#
|
|
14
|
+
# @return [String]
|
|
15
|
+
required :flow_id, String
|
|
16
|
+
|
|
17
|
+
# @!attribute target
|
|
18
|
+
# The identifier to score — a phone number or email address.
|
|
19
|
+
#
|
|
20
|
+
# @return [PreludeSDK::Models::Target]
|
|
21
|
+
required :target, -> { PreludeSDK::Target }
|
|
22
|
+
|
|
23
|
+
# @!attribute attributes
|
|
24
|
+
# Values for the attributes the flow's recipes declare, keyed without the `attr.`
|
|
25
|
+
# namespace a rule uses to reference them.
|
|
26
|
+
#
|
|
27
|
+
# An attribute a recipe declares and this request omits is treated as missing
|
|
28
|
+
# evidence, not as an empty value: the rules reading it report `NOT_EVALUATED`
|
|
29
|
+
# rather than being scored as though the condition were false. A key no recipe in
|
|
30
|
+
# the flow declares is ignored rather than rejected, so one payload can serve
|
|
31
|
+
# flows that read different attributes.
|
|
32
|
+
#
|
|
33
|
+
# @return [Hash{Symbol=>String}, nil]
|
|
34
|
+
optional :attributes, PreludeSDK::Internal::Type::HashOf[String]
|
|
35
|
+
|
|
36
|
+
# @!attribute dispatch_id
|
|
37
|
+
# The identifier of the dispatch that came from the front-end SDK. Signals it
|
|
38
|
+
# carries fill in anything the request did not state; the request wins where both
|
|
39
|
+
# supply a value.
|
|
40
|
+
#
|
|
41
|
+
# @return [String, nil]
|
|
42
|
+
optional :dispatch_id, String
|
|
43
|
+
|
|
44
|
+
# @!attribute signals
|
|
45
|
+
# The signals used for anti-fraud. For more details, refer to
|
|
46
|
+
# [Signals](/verify/v2/documentation/prevent-fraud#signals).
|
|
47
|
+
#
|
|
48
|
+
# @return [PreludeSDK::Models::Signals, nil]
|
|
49
|
+
optional :signals, -> { PreludeSDK::Signals }
|
|
50
|
+
|
|
51
|
+
# @!method initialize(flow_id:, target:, attributes: nil, dispatch_id: nil, signals: nil, request_options: {})
|
|
52
|
+
# Some parameter documentations has been truncated, see
|
|
53
|
+
# {PreludeSDK::Models::WatchEvaluateParams} for more details.
|
|
54
|
+
#
|
|
55
|
+
# @param flow_id [String] The flow to evaluate. A flow names the moment you are guarding and selects the r
|
|
56
|
+
#
|
|
57
|
+
# @param target [PreludeSDK::Models::Target] The identifier to score — a phone number or email address.
|
|
58
|
+
#
|
|
59
|
+
# @param attributes [Hash{Symbol=>String}] Values for the attributes the flow's recipes declare, keyed without the `attr.`
|
|
60
|
+
#
|
|
61
|
+
# @param dispatch_id [String] The identifier of the dispatch that came from the front-end SDK. Signals it carr
|
|
62
|
+
#
|
|
63
|
+
# @param signals [PreludeSDK::Models::Signals] The signals used for anti-fraud. For more details, refer to [Signals](/verify/v2
|
|
64
|
+
#
|
|
65
|
+
# @param request_options [PreludeSDK::RequestOptions, Hash{Symbol=>Object}]
|
|
66
|
+
end
|
|
67
|
+
end
|
|
68
|
+
end
|
|
@@ -0,0 +1,318 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module PreludeSDK
|
|
4
|
+
module Models
|
|
5
|
+
# @see PreludeSDK::Resources::Watch#evaluate
|
|
6
|
+
class WatchEvaluateResponse < PreludeSDK::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute id
|
|
8
|
+
# The evaluation identifier.
|
|
9
|
+
#
|
|
10
|
+
# @return [String]
|
|
11
|
+
required :id, String
|
|
12
|
+
|
|
13
|
+
# @!attribute action
|
|
14
|
+
# What the evaluation suggests you do, being the most severe action across the
|
|
15
|
+
# recipes that ran. Advisory: enforcement is yours.
|
|
16
|
+
#
|
|
17
|
+
# - `ALLOW` - Let the request through.
|
|
18
|
+
# - `BLOCK` - Refuse the request.
|
|
19
|
+
# - `CHALLENGE` - Let the request through behind an additional check.
|
|
20
|
+
#
|
|
21
|
+
# @return [Symbol, PreludeSDK::Models::WatchEvaluateResponse::Action]
|
|
22
|
+
required :action, enum: -> { PreludeSDK::Models::WatchEvaluateResponse::Action }
|
|
23
|
+
|
|
24
|
+
# @!attribute recipes
|
|
25
|
+
# One result per recipe that ran. A recipe the flow names but that is not in
|
|
26
|
+
# service is absent rather than reported as having passed.
|
|
27
|
+
#
|
|
28
|
+
# @return [Array<PreludeSDK::Models::WatchEvaluateResponse::Recipe>]
|
|
29
|
+
required :recipes,
|
|
30
|
+
-> { PreludeSDK::Internal::Type::ArrayOf[PreludeSDK::Models::WatchEvaluateResponse::Recipe] }
|
|
31
|
+
|
|
32
|
+
# @!attribute verdict
|
|
33
|
+
# The evaluation-level verdict, being the most severe verdict across the recipes
|
|
34
|
+
# that ran.
|
|
35
|
+
#
|
|
36
|
+
# - `PASS` - No recipe flagged.
|
|
37
|
+
# - `FLAG` - At least one recipe flagged.
|
|
38
|
+
#
|
|
39
|
+
# @return [Symbol, PreludeSDK::Models::WatchEvaluateResponse::Verdict]
|
|
40
|
+
required :verdict, enum: -> { PreludeSDK::Models::WatchEvaluateResponse::Verdict }
|
|
41
|
+
|
|
42
|
+
# @!method initialize(id:, action:, recipes:, verdict:)
|
|
43
|
+
# Some parameter documentations has been truncated, see
|
|
44
|
+
# {PreludeSDK::Models::WatchEvaluateResponse} for more details.
|
|
45
|
+
#
|
|
46
|
+
# @param id [String] The evaluation identifier.
|
|
47
|
+
#
|
|
48
|
+
# @param action [Symbol, PreludeSDK::Models::WatchEvaluateResponse::Action] What the evaluation suggests you do, being the most severe action across the rec
|
|
49
|
+
#
|
|
50
|
+
# @param recipes [Array<PreludeSDK::Models::WatchEvaluateResponse::Recipe>] One result per recipe that ran. A recipe the flow names but that is not in servi
|
|
51
|
+
#
|
|
52
|
+
# @param verdict [Symbol, PreludeSDK::Models::WatchEvaluateResponse::Verdict] The evaluation-level verdict, being the most severe verdict across the recipes t
|
|
53
|
+
|
|
54
|
+
# What the evaluation suggests you do, being the most severe action across the
|
|
55
|
+
# recipes that ran. Advisory: enforcement is yours.
|
|
56
|
+
#
|
|
57
|
+
# - `ALLOW` - Let the request through.
|
|
58
|
+
# - `BLOCK` - Refuse the request.
|
|
59
|
+
# - `CHALLENGE` - Let the request through behind an additional check.
|
|
60
|
+
#
|
|
61
|
+
# @see PreludeSDK::Models::WatchEvaluateResponse#action
|
|
62
|
+
module Action
|
|
63
|
+
extend PreludeSDK::Internal::Type::Enum
|
|
64
|
+
|
|
65
|
+
ALLOW = :ALLOW
|
|
66
|
+
BLOCK = :BLOCK
|
|
67
|
+
CHALLENGE = :CHALLENGE
|
|
68
|
+
|
|
69
|
+
# @!method self.values
|
|
70
|
+
# @return [Array<Symbol>]
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
class Recipe < PreludeSDK::Internal::Type::BaseModel
|
|
74
|
+
# @!attribute partial_evidence
|
|
75
|
+
# At least one rule could not be evaluated, so the score rests on less than the
|
|
76
|
+
# whole recipe. The score is still returned — a partial verdict is more useful
|
|
77
|
+
# than none — but it is labeled rather than passed off as whole.
|
|
78
|
+
#
|
|
79
|
+
# @return [Boolean]
|
|
80
|
+
required :partial_evidence, PreludeSDK::Internal::Type::Boolean
|
|
81
|
+
|
|
82
|
+
# @!attribute recipe_id
|
|
83
|
+
# The recipe that produced this result.
|
|
84
|
+
#
|
|
85
|
+
# @return [String]
|
|
86
|
+
required :recipe_id, String
|
|
87
|
+
|
|
88
|
+
# @!attribute rules
|
|
89
|
+
# One result per rule in the recipe, in membership order. Every rule runs — a
|
|
90
|
+
# score is only meaningful when complete, so there is no short-circuit on the
|
|
91
|
+
# first trigger. The exception is a recipe whose verdict a preempting rule has
|
|
92
|
+
# already determined, where a rule that could no longer change it may report
|
|
93
|
+
# `SKIPPED` instead.
|
|
94
|
+
#
|
|
95
|
+
# @return [Array<PreludeSDK::Models::WatchEvaluateResponse::Recipe::Rule>]
|
|
96
|
+
required :rules,
|
|
97
|
+
-> { PreludeSDK::Internal::Type::ArrayOf[PreludeSDK::Models::WatchEvaluateResponse::Recipe::Rule] }
|
|
98
|
+
|
|
99
|
+
# @!attribute score
|
|
100
|
+
# The sum of the weights of the rules that triggered, clamped to the range -100
|
|
101
|
+
# to 100. Two scores at a bound are not comparable.
|
|
102
|
+
#
|
|
103
|
+
# @return [Integer]
|
|
104
|
+
required :score, Integer
|
|
105
|
+
|
|
106
|
+
# @!attribute threshold
|
|
107
|
+
# The score at or above which this recipe flags.
|
|
108
|
+
#
|
|
109
|
+
# @return [Integer]
|
|
110
|
+
required :threshold, Integer
|
|
111
|
+
|
|
112
|
+
# @!attribute verdict
|
|
113
|
+
# This recipe's own verdict. Normally the score against the threshold, unless a
|
|
114
|
+
# preempting rule fired — see `determined_by`.
|
|
115
|
+
#
|
|
116
|
+
# @return [Symbol, PreludeSDK::Models::WatchEvaluateResponse::Recipe::Verdict]
|
|
117
|
+
required :verdict, enum: -> { PreludeSDK::Models::WatchEvaluateResponse::Recipe::Verdict }
|
|
118
|
+
|
|
119
|
+
# @!attribute determined_by
|
|
120
|
+
# The preempting rule that set `verdict`, present only when a rule rather than the
|
|
121
|
+
# score decided it. Without it a recipe can report a score under its threshold and
|
|
122
|
+
# still flag, with nothing in the payload accounting for the difference.
|
|
123
|
+
#
|
|
124
|
+
# @return [String, nil]
|
|
125
|
+
optional :determined_by, String
|
|
126
|
+
|
|
127
|
+
# @!method initialize(partial_evidence:, recipe_id:, rules:, score:, threshold:, verdict:, determined_by: nil)
|
|
128
|
+
# Some parameter documentations has been truncated, see
|
|
129
|
+
# {PreludeSDK::Models::WatchEvaluateResponse::Recipe} for more details.
|
|
130
|
+
#
|
|
131
|
+
# @param partial_evidence [Boolean] At least one rule could not be evaluated, so the score rests on less than the wh
|
|
132
|
+
#
|
|
133
|
+
# @param recipe_id [String] The recipe that produced this result.
|
|
134
|
+
#
|
|
135
|
+
# @param rules [Array<PreludeSDK::Models::WatchEvaluateResponse::Recipe::Rule>] One result per rule in the recipe, in membership order. Every rule runs — a scor
|
|
136
|
+
#
|
|
137
|
+
# @param score [Integer] The sum of the weights of the rules that triggered, clamped to the range -100 to
|
|
138
|
+
#
|
|
139
|
+
# @param threshold [Integer] The score at or above which this recipe flags.
|
|
140
|
+
#
|
|
141
|
+
# @param verdict [Symbol, PreludeSDK::Models::WatchEvaluateResponse::Recipe::Verdict] This recipe's own verdict. Normally the score against the threshold, unless a pr
|
|
142
|
+
#
|
|
143
|
+
# @param determined_by [String] The preempting rule that set `verdict`, present only when a rule rather than the
|
|
144
|
+
|
|
145
|
+
class Rule < PreludeSDK::Internal::Type::BaseModel
|
|
146
|
+
# @!attribute outcome
|
|
147
|
+
# What the rule concluded.
|
|
148
|
+
#
|
|
149
|
+
# - `TRIGGERED` - The condition held; `weight` was added to the score.
|
|
150
|
+
# - `NOT_TRIGGERED` - The condition did not hold.
|
|
151
|
+
# - `NOT_EVALUATED` - The rule could not run, because something it reads never
|
|
152
|
+
# arrived. This is not a quieter `NOT_TRIGGERED`: it contributed nothing either
|
|
153
|
+
# way, and it is why `partial_evidence` is set on the recipe.
|
|
154
|
+
# - `SKIPPED` - The rule was not run, because another rule had already determined
|
|
155
|
+
# the recipe's verdict — see `determined_by`. Nothing was missing and nothing
|
|
156
|
+
# failed, so `partial_evidence` is not set: `determined_by` is what accounts for
|
|
157
|
+
# the recipe's score resting on fewer rules.
|
|
158
|
+
#
|
|
159
|
+
# @return [Symbol, PreludeSDK::Models::WatchEvaluateResponse::Recipe::Rule::Outcome]
|
|
160
|
+
required :outcome, enum: -> { PreludeSDK::Models::WatchEvaluateResponse::Recipe::Rule::Outcome }
|
|
161
|
+
|
|
162
|
+
# @!attribute rule_id
|
|
163
|
+
# The rule that produced this result. Present whatever the rule's visibility, so a
|
|
164
|
+
# rule you cannot see the condition of is still one you can reweight, switch off,
|
|
165
|
+
# or ask us about.
|
|
166
|
+
#
|
|
167
|
+
# @return [String]
|
|
168
|
+
required :rule_id, String
|
|
169
|
+
|
|
170
|
+
# @!attribute type
|
|
171
|
+
# Who authored the rule, which is what says how much of the rest of this result
|
|
172
|
+
# you get.
|
|
173
|
+
#
|
|
174
|
+
# - `MANAGED` - Prelude-owned, shared with customers: `name` and `version_id` are
|
|
175
|
+
# omitted, and `blocked_by` reports only `missing_data`.
|
|
176
|
+
# - `CUSTOM` - Yours: every field is returned.
|
|
177
|
+
#
|
|
178
|
+
# @return [Symbol, PreludeSDK::Models::WatchEvaluateResponse::Recipe::Rule::Type]
|
|
179
|
+
required :type, enum: -> { PreludeSDK::Models::WatchEvaluateResponse::Recipe::Rule::Type }
|
|
180
|
+
|
|
181
|
+
# @!attribute weight
|
|
182
|
+
# What this rule contributes to the recipe's score when it triggers.
|
|
183
|
+
#
|
|
184
|
+
# @return [Integer]
|
|
185
|
+
required :weight, Integer
|
|
186
|
+
|
|
187
|
+
# @!attribute blocked_by
|
|
188
|
+
# Why the rule could not run, set only when `outcome` is `NOT_EVALUATED`.
|
|
189
|
+
#
|
|
190
|
+
# A rule you authored names the signal or attribute it waited on, since you wrote
|
|
191
|
+
# the expression that reads it. A Prelude-managed rule reports `missing_data` and
|
|
192
|
+
# nothing more: the signal it waited on is part of a condition that is not
|
|
193
|
+
# disclosed.
|
|
194
|
+
#
|
|
195
|
+
# @return [String, nil]
|
|
196
|
+
optional :blocked_by, String
|
|
197
|
+
|
|
198
|
+
# @!attribute name
|
|
199
|
+
# The rule's name, present for a rule you authored and omitted for a
|
|
200
|
+
# Prelude-managed one. A managed rule's name describes what it looks for, which is
|
|
201
|
+
# as much of the condition as the expression is.
|
|
202
|
+
#
|
|
203
|
+
# @return [String, nil]
|
|
204
|
+
optional :name, String
|
|
205
|
+
|
|
206
|
+
# @!attribute unavailable
|
|
207
|
+
# The rule could not run for a reason on our side rather than anything about your
|
|
208
|
+
# request. `outcome` is `NOT_EVALUATED` and the failure is ours to fix.
|
|
209
|
+
#
|
|
210
|
+
# @return [Boolean, nil]
|
|
211
|
+
optional :unavailable, PreludeSDK::Internal::Type::Boolean
|
|
212
|
+
|
|
213
|
+
# @!attribute version_id
|
|
214
|
+
# The version of the rule that scored — the one this recipe is pinned to, or the
|
|
215
|
+
# version current at evaluation time when it is not pinned. Present for a rule you
|
|
216
|
+
# authored, and omitted for a Prelude-managed one.
|
|
217
|
+
#
|
|
218
|
+
# @return [String, nil]
|
|
219
|
+
optional :version_id, String
|
|
220
|
+
|
|
221
|
+
# @!method initialize(outcome:, rule_id:, type:, weight:, blocked_by: nil, name: nil, unavailable: nil, version_id: nil)
|
|
222
|
+
# Some parameter documentations has been truncated, see
|
|
223
|
+
# {PreludeSDK::Models::WatchEvaluateResponse::Recipe::Rule} for more details.
|
|
224
|
+
#
|
|
225
|
+
# @param outcome [Symbol, PreludeSDK::Models::WatchEvaluateResponse::Recipe::Rule::Outcome] What the rule concluded.
|
|
226
|
+
#
|
|
227
|
+
# @param rule_id [String] The rule that produced this result. Present whatever the rule's visibility, so a
|
|
228
|
+
#
|
|
229
|
+
# @param type [Symbol, PreludeSDK::Models::WatchEvaluateResponse::Recipe::Rule::Type] Who authored the rule, which is what says how much of the rest of this result yo
|
|
230
|
+
#
|
|
231
|
+
# @param weight [Integer] What this rule contributes to the recipe's score when it triggers.
|
|
232
|
+
#
|
|
233
|
+
# @param blocked_by [String] Why the rule could not run, set only when `outcome` is `NOT_EVALUATED`.
|
|
234
|
+
#
|
|
235
|
+
# @param name [String] The rule's name, present for a rule you authored and omitted for a Prelude-manag
|
|
236
|
+
#
|
|
237
|
+
# @param unavailable [Boolean] The rule could not run for a reason on our side rather than anything about your
|
|
238
|
+
#
|
|
239
|
+
# @param version_id [String] The version of the rule that scored — the one this recipe is pinned to, or the v
|
|
240
|
+
|
|
241
|
+
# What the rule concluded.
|
|
242
|
+
#
|
|
243
|
+
# - `TRIGGERED` - The condition held; `weight` was added to the score.
|
|
244
|
+
# - `NOT_TRIGGERED` - The condition did not hold.
|
|
245
|
+
# - `NOT_EVALUATED` - The rule could not run, because something it reads never
|
|
246
|
+
# arrived. This is not a quieter `NOT_TRIGGERED`: it contributed nothing either
|
|
247
|
+
# way, and it is why `partial_evidence` is set on the recipe.
|
|
248
|
+
# - `SKIPPED` - The rule was not run, because another rule had already determined
|
|
249
|
+
# the recipe's verdict — see `determined_by`. Nothing was missing and nothing
|
|
250
|
+
# failed, so `partial_evidence` is not set: `determined_by` is what accounts for
|
|
251
|
+
# the recipe's score resting on fewer rules.
|
|
252
|
+
#
|
|
253
|
+
# @see PreludeSDK::Models::WatchEvaluateResponse::Recipe::Rule#outcome
|
|
254
|
+
module Outcome
|
|
255
|
+
extend PreludeSDK::Internal::Type::Enum
|
|
256
|
+
|
|
257
|
+
TRIGGERED = :TRIGGERED
|
|
258
|
+
NOT_TRIGGERED = :NOT_TRIGGERED
|
|
259
|
+
NOT_EVALUATED = :NOT_EVALUATED
|
|
260
|
+
SKIPPED = :SKIPPED
|
|
261
|
+
|
|
262
|
+
# @!method self.values
|
|
263
|
+
# @return [Array<Symbol>]
|
|
264
|
+
end
|
|
265
|
+
|
|
266
|
+
# Who authored the rule, which is what says how much of the rest of this result
|
|
267
|
+
# you get.
|
|
268
|
+
#
|
|
269
|
+
# - `MANAGED` - Prelude-owned, shared with customers: `name` and `version_id` are
|
|
270
|
+
# omitted, and `blocked_by` reports only `missing_data`.
|
|
271
|
+
# - `CUSTOM` - Yours: every field is returned.
|
|
272
|
+
#
|
|
273
|
+
# @see PreludeSDK::Models::WatchEvaluateResponse::Recipe::Rule#type
|
|
274
|
+
module Type
|
|
275
|
+
extend PreludeSDK::Internal::Type::Enum
|
|
276
|
+
|
|
277
|
+
MANAGED = :MANAGED
|
|
278
|
+
CUSTOM = :CUSTOM
|
|
279
|
+
|
|
280
|
+
# @!method self.values
|
|
281
|
+
# @return [Array<Symbol>]
|
|
282
|
+
end
|
|
283
|
+
end
|
|
284
|
+
|
|
285
|
+
# This recipe's own verdict. Normally the score against the threshold, unless a
|
|
286
|
+
# preempting rule fired — see `determined_by`.
|
|
287
|
+
#
|
|
288
|
+
# @see PreludeSDK::Models::WatchEvaluateResponse::Recipe#verdict
|
|
289
|
+
module Verdict
|
|
290
|
+
extend PreludeSDK::Internal::Type::Enum
|
|
291
|
+
|
|
292
|
+
PASS = :PASS
|
|
293
|
+
FLAG = :FLAG
|
|
294
|
+
|
|
295
|
+
# @!method self.values
|
|
296
|
+
# @return [Array<Symbol>]
|
|
297
|
+
end
|
|
298
|
+
end
|
|
299
|
+
|
|
300
|
+
# The evaluation-level verdict, being the most severe verdict across the recipes
|
|
301
|
+
# that ran.
|
|
302
|
+
#
|
|
303
|
+
# - `PASS` - No recipe flagged.
|
|
304
|
+
# - `FLAG` - At least one recipe flagged.
|
|
305
|
+
#
|
|
306
|
+
# @see PreludeSDK::Models::WatchEvaluateResponse#verdict
|
|
307
|
+
module Verdict
|
|
308
|
+
extend PreludeSDK::Internal::Type::Enum
|
|
309
|
+
|
|
310
|
+
PASS = :PASS
|
|
311
|
+
FLAG = :FLAG
|
|
312
|
+
|
|
313
|
+
# @!method self.values
|
|
314
|
+
# @return [Array<Symbol>]
|
|
315
|
+
end
|
|
316
|
+
end
|
|
317
|
+
end
|
|
318
|
+
end
|
|
@@ -10,8 +10,8 @@ module PreludeSDK
|
|
|
10
10
|
# @!attribute target
|
|
11
11
|
# The signup identifier to score — a phone number or email address.
|
|
12
12
|
#
|
|
13
|
-
# @return [PreludeSDK::Models::
|
|
14
|
-
required :target, -> { PreludeSDK::
|
|
13
|
+
# @return [PreludeSDK::Models::Target]
|
|
14
|
+
required :target, -> { PreludeSDK::Target }
|
|
15
15
|
|
|
16
16
|
# @!attribute dispatch_id
|
|
17
17
|
# The identifier of the dispatch that came from the front-end SDK.
|
|
@@ -29,57 +29,23 @@ module PreludeSDK
|
|
|
29
29
|
# The signals used for anti-fraud. For more details, refer to
|
|
30
30
|
# [Signals](/verify/v2/documentation/prevent-fraud#signals).
|
|
31
31
|
#
|
|
32
|
-
# @return [PreludeSDK::Models::
|
|
33
|
-
optional :signals, -> { PreludeSDK::
|
|
32
|
+
# @return [PreludeSDK::Models::Signals, nil]
|
|
33
|
+
optional :signals, -> { PreludeSDK::Signals }
|
|
34
34
|
|
|
35
35
|
# @!method initialize(target:, dispatch_id: nil, metadata: nil, signals: nil, request_options: {})
|
|
36
36
|
# Some parameter documentations has been truncated, see
|
|
37
37
|
# {PreludeSDK::Models::WatchPredictParams} for more details.
|
|
38
38
|
#
|
|
39
|
-
# @param target [PreludeSDK::Models::
|
|
39
|
+
# @param target [PreludeSDK::Models::Target] The signup identifier to score — a phone number or email address.
|
|
40
40
|
#
|
|
41
41
|
# @param dispatch_id [String] The identifier of the dispatch that came from the front-end SDK.
|
|
42
42
|
#
|
|
43
43
|
# @param metadata [PreludeSDK::Models::WatchPredictParams::Metadata] The metadata for this prediction.
|
|
44
44
|
#
|
|
45
|
-
# @param signals [PreludeSDK::Models::
|
|
45
|
+
# @param signals [PreludeSDK::Models::Signals] The signals used for anti-fraud. For more details, refer to [Signals](/verify/v2
|
|
46
46
|
#
|
|
47
47
|
# @param request_options [PreludeSDK::RequestOptions, Hash{Symbol=>Object}]
|
|
48
48
|
|
|
49
|
-
class Target < PreludeSDK::Internal::Type::BaseModel
|
|
50
|
-
# @!attribute type
|
|
51
|
-
# The type of the target. Either "phone_number" or "email_address".
|
|
52
|
-
#
|
|
53
|
-
# @return [Symbol, PreludeSDK::Models::WatchPredictParams::Target::Type]
|
|
54
|
-
required :type, enum: -> { PreludeSDK::WatchPredictParams::Target::Type }
|
|
55
|
-
|
|
56
|
-
# @!attribute value
|
|
57
|
-
# An E.164 formatted phone number or an email address.
|
|
58
|
-
#
|
|
59
|
-
# @return [String]
|
|
60
|
-
required :value, String
|
|
61
|
-
|
|
62
|
-
# @!method initialize(type:, value:)
|
|
63
|
-
# The signup identifier to score — a phone number or email address.
|
|
64
|
-
#
|
|
65
|
-
# @param type [Symbol, PreludeSDK::Models::WatchPredictParams::Target::Type] The type of the target. Either "phone_number" or "email_address".
|
|
66
|
-
#
|
|
67
|
-
# @param value [String] An E.164 formatted phone number or an email address.
|
|
68
|
-
|
|
69
|
-
# The type of the target. Either "phone_number" or "email_address".
|
|
70
|
-
#
|
|
71
|
-
# @see PreludeSDK::Models::WatchPredictParams::Target#type
|
|
72
|
-
module Type
|
|
73
|
-
extend PreludeSDK::Internal::Type::Enum
|
|
74
|
-
|
|
75
|
-
PHONE_NUMBER = :phone_number
|
|
76
|
-
EMAIL_ADDRESS = :email_address
|
|
77
|
-
|
|
78
|
-
# @!method self.values
|
|
79
|
-
# @return [Array<Symbol>]
|
|
80
|
-
end
|
|
81
|
-
end
|
|
82
|
-
|
|
83
49
|
class Metadata < PreludeSDK::Internal::Type::BaseModel
|
|
84
50
|
# @!attribute correlation_id
|
|
85
51
|
# A user-defined identifier to correlate this prediction with. It is returned in
|
|
@@ -96,126 +62,6 @@ module PreludeSDK
|
|
|
96
62
|
#
|
|
97
63
|
# @param correlation_id [String] A user-defined identifier to correlate this prediction with. It is returned in t
|
|
98
64
|
end
|
|
99
|
-
|
|
100
|
-
class Signals < PreludeSDK::Internal::Type::BaseModel
|
|
101
|
-
# @!attribute app_version
|
|
102
|
-
# The version of your application.
|
|
103
|
-
#
|
|
104
|
-
# @return [String, nil]
|
|
105
|
-
optional :app_version, String
|
|
106
|
-
|
|
107
|
-
# @!attribute device_id
|
|
108
|
-
# A unique ID for the user's device. You should ensure that each user device has a
|
|
109
|
-
# unique `device_id` value. Ideally, for Android, this corresponds to the
|
|
110
|
-
# `ANDROID_ID` and for iOS, this corresponds to the `identifierForVendor`.
|
|
111
|
-
#
|
|
112
|
-
# @return [String, nil]
|
|
113
|
-
optional :device_id, String
|
|
114
|
-
|
|
115
|
-
# @!attribute device_model
|
|
116
|
-
# The model of the user's device.
|
|
117
|
-
#
|
|
118
|
-
# @return [String, nil]
|
|
119
|
-
optional :device_model, String
|
|
120
|
-
|
|
121
|
-
# @!attribute device_platform
|
|
122
|
-
# The type of the user's device.
|
|
123
|
-
#
|
|
124
|
-
# @return [Symbol, PreludeSDK::Models::WatchPredictParams::Signals::DevicePlatform, nil]
|
|
125
|
-
optional :device_platform, enum: -> { PreludeSDK::WatchPredictParams::Signals::DevicePlatform }
|
|
126
|
-
|
|
127
|
-
# @!attribute existing_user
|
|
128
|
-
# Whether the end-user already exists in your system, for example an existing
|
|
129
|
-
# account signing in again rather than a first-time signup. Unlike
|
|
130
|
-
# `is_trusted_user`, this signal does not bypass fraud checks; it is taken into
|
|
131
|
-
# account as one additional anti-fraud signal. For more details, refer to
|
|
132
|
-
# [Signals](/verify/v2/documentation/prevent-fraud#signals).
|
|
133
|
-
#
|
|
134
|
-
# @return [Boolean, nil]
|
|
135
|
-
optional :existing_user, PreludeSDK::Internal::Type::Boolean
|
|
136
|
-
|
|
137
|
-
# @!attribute ip
|
|
138
|
-
# The public IP v4 or v6 address of the end-user's device. You should collect this
|
|
139
|
-
# from your backend. If your backend is behind a proxy, use the `X-Forwarded-For`,
|
|
140
|
-
# `Forwarded`, `True-Client-IP`, `CF-Connecting-IP` or an equivalent header to get
|
|
141
|
-
# the actual public IP of the end-user's device.
|
|
142
|
-
#
|
|
143
|
-
# @return [String, nil]
|
|
144
|
-
optional :ip, String
|
|
145
|
-
|
|
146
|
-
# @!attribute is_trusted_user
|
|
147
|
-
# This signal should indicate a higher level of trust, explicitly stating that the
|
|
148
|
-
# user is genuine. Contact us to discuss your use case. For more details, refer to
|
|
149
|
-
# [Signals](/verify/v2/documentation/prevent-fraud#signals).
|
|
150
|
-
#
|
|
151
|
-
# @return [Boolean, nil]
|
|
152
|
-
optional :is_trusted_user, PreludeSDK::Internal::Type::Boolean
|
|
153
|
-
|
|
154
|
-
# @!attribute ja4_fingerprint
|
|
155
|
-
# The JA4 fingerprint observed for the end-user's connection. Prelude will infer
|
|
156
|
-
# it automatically when you use our Frontend SDKs (which use Prelude's edge
|
|
157
|
-
# network), but you can also forward the value if you terminate TLS yourself.
|
|
158
|
-
#
|
|
159
|
-
# @return [String, nil]
|
|
160
|
-
optional :ja4_fingerprint, String
|
|
161
|
-
|
|
162
|
-
# @!attribute os_version
|
|
163
|
-
# The version of the user's device operating system.
|
|
164
|
-
#
|
|
165
|
-
# @return [String, nil]
|
|
166
|
-
optional :os_version, String
|
|
167
|
-
|
|
168
|
-
# @!attribute user_agent
|
|
169
|
-
# The user agent of the user's device. If the individual fields (os_version,
|
|
170
|
-
# device_platform, device_model) are provided, we will prioritize those values
|
|
171
|
-
# instead of parsing them from the user agent string.
|
|
172
|
-
#
|
|
173
|
-
# @return [String, nil]
|
|
174
|
-
optional :user_agent, String
|
|
175
|
-
|
|
176
|
-
# @!method initialize(app_version: nil, device_id: nil, device_model: nil, device_platform: nil, existing_user: nil, ip: nil, is_trusted_user: nil, ja4_fingerprint: nil, os_version: nil, user_agent: nil)
|
|
177
|
-
# Some parameter documentations has been truncated, see
|
|
178
|
-
# {PreludeSDK::Models::WatchPredictParams::Signals} for more details.
|
|
179
|
-
#
|
|
180
|
-
# The signals used for anti-fraud. For more details, refer to
|
|
181
|
-
# [Signals](/verify/v2/documentation/prevent-fraud#signals).
|
|
182
|
-
#
|
|
183
|
-
# @param app_version [String] The version of your application.
|
|
184
|
-
#
|
|
185
|
-
# @param device_id [String] A unique ID for the user's device. You should ensure that each user device has a
|
|
186
|
-
#
|
|
187
|
-
# @param device_model [String] The model of the user's device.
|
|
188
|
-
#
|
|
189
|
-
# @param device_platform [Symbol, PreludeSDK::Models::WatchPredictParams::Signals::DevicePlatform] The type of the user's device.
|
|
190
|
-
#
|
|
191
|
-
# @param existing_user [Boolean] Whether the end-user already exists in your system, for example an existing acco
|
|
192
|
-
#
|
|
193
|
-
# @param ip [String] The public IP v4 or v6 address of the end-user's device. You should collect this
|
|
194
|
-
#
|
|
195
|
-
# @param is_trusted_user [Boolean] This signal should indicate a higher level of trust, explicitly stating that the
|
|
196
|
-
#
|
|
197
|
-
# @param ja4_fingerprint [String] The JA4 fingerprint observed for the end-user's connection. Prelude will infer i
|
|
198
|
-
#
|
|
199
|
-
# @param os_version [String] The version of the user's device operating system.
|
|
200
|
-
#
|
|
201
|
-
# @param user_agent [String] The user agent of the user's device. If the individual fields (os_version, devic
|
|
202
|
-
|
|
203
|
-
# The type of the user's device.
|
|
204
|
-
#
|
|
205
|
-
# @see PreludeSDK::Models::WatchPredictParams::Signals#device_platform
|
|
206
|
-
module DevicePlatform
|
|
207
|
-
extend PreludeSDK::Internal::Type::Enum
|
|
208
|
-
|
|
209
|
-
ANDROID = :android
|
|
210
|
-
IOS = :ios
|
|
211
|
-
IPADOS = :ipados
|
|
212
|
-
TVOS = :tvos
|
|
213
|
-
WEB = :web
|
|
214
|
-
|
|
215
|
-
# @!method self.values
|
|
216
|
-
# @return [Array<Symbol>]
|
|
217
|
-
end
|
|
218
|
-
end
|
|
219
65
|
end
|
|
220
66
|
end
|
|
221
67
|
end
|