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
|
@@ -12,12 +12,10 @@ module PreludeSDK
|
|
|
12
12
|
end
|
|
13
13
|
|
|
14
14
|
# The signup identifier to score — a phone number or email address.
|
|
15
|
-
sig { returns(PreludeSDK::
|
|
15
|
+
sig { returns(PreludeSDK::Target) }
|
|
16
16
|
attr_reader :target
|
|
17
17
|
|
|
18
|
-
sig
|
|
19
|
-
params(target: PreludeSDK::WatchPredictParams::Target::OrHash).void
|
|
20
|
-
end
|
|
18
|
+
sig { params(target: PreludeSDK::Target::OrHash).void }
|
|
21
19
|
attr_writer :target
|
|
22
20
|
|
|
23
21
|
# The identifier of the dispatch that came from the front-end SDK.
|
|
@@ -38,20 +36,18 @@ module PreludeSDK
|
|
|
38
36
|
|
|
39
37
|
# The signals used for anti-fraud. For more details, refer to
|
|
40
38
|
# [Signals](/verify/v2/documentation/prevent-fraud#signals).
|
|
41
|
-
sig { returns(T.nilable(PreludeSDK::
|
|
39
|
+
sig { returns(T.nilable(PreludeSDK::Signals)) }
|
|
42
40
|
attr_reader :signals
|
|
43
41
|
|
|
44
|
-
sig
|
|
45
|
-
params(signals: PreludeSDK::WatchPredictParams::Signals::OrHash).void
|
|
46
|
-
end
|
|
42
|
+
sig { params(signals: PreludeSDK::Signals::OrHash).void }
|
|
47
43
|
attr_writer :signals
|
|
48
44
|
|
|
49
45
|
sig do
|
|
50
46
|
params(
|
|
51
|
-
target: PreludeSDK::
|
|
47
|
+
target: PreludeSDK::Target::OrHash,
|
|
52
48
|
dispatch_id: String,
|
|
53
49
|
metadata: PreludeSDK::WatchPredictParams::Metadata::OrHash,
|
|
54
|
-
signals: PreludeSDK::
|
|
50
|
+
signals: PreludeSDK::Signals::OrHash,
|
|
55
51
|
request_options: PreludeSDK::RequestOptions::OrHash
|
|
56
52
|
).returns(T.attached_class)
|
|
57
53
|
end
|
|
@@ -72,10 +68,10 @@ module PreludeSDK
|
|
|
72
68
|
sig do
|
|
73
69
|
override.returns(
|
|
74
70
|
{
|
|
75
|
-
target: PreludeSDK::
|
|
71
|
+
target: PreludeSDK::Target,
|
|
76
72
|
dispatch_id: String,
|
|
77
73
|
metadata: PreludeSDK::WatchPredictParams::Metadata,
|
|
78
|
-
signals: PreludeSDK::
|
|
74
|
+
signals: PreludeSDK::Signals,
|
|
79
75
|
request_options: PreludeSDK::RequestOptions
|
|
80
76
|
}
|
|
81
77
|
)
|
|
@@ -83,82 +79,6 @@ module PreludeSDK
|
|
|
83
79
|
def to_hash
|
|
84
80
|
end
|
|
85
81
|
|
|
86
|
-
class Target < PreludeSDK::Internal::Type::BaseModel
|
|
87
|
-
OrHash =
|
|
88
|
-
T.type_alias do
|
|
89
|
-
T.any(
|
|
90
|
-
PreludeSDK::WatchPredictParams::Target,
|
|
91
|
-
PreludeSDK::Internal::AnyHash
|
|
92
|
-
)
|
|
93
|
-
end
|
|
94
|
-
|
|
95
|
-
# The type of the target. Either "phone_number" or "email_address".
|
|
96
|
-
sig { returns(PreludeSDK::WatchPredictParams::Target::Type::OrSymbol) }
|
|
97
|
-
attr_accessor :type
|
|
98
|
-
|
|
99
|
-
# An E.164 formatted phone number or an email address.
|
|
100
|
-
sig { returns(String) }
|
|
101
|
-
attr_accessor :value
|
|
102
|
-
|
|
103
|
-
# The signup identifier to score — a phone number or email address.
|
|
104
|
-
sig do
|
|
105
|
-
params(
|
|
106
|
-
type: PreludeSDK::WatchPredictParams::Target::Type::OrSymbol,
|
|
107
|
-
value: String
|
|
108
|
-
).returns(T.attached_class)
|
|
109
|
-
end
|
|
110
|
-
def self.new(
|
|
111
|
-
# The type of the target. Either "phone_number" or "email_address".
|
|
112
|
-
type:,
|
|
113
|
-
# An E.164 formatted phone number or an email address.
|
|
114
|
-
value:
|
|
115
|
-
)
|
|
116
|
-
end
|
|
117
|
-
|
|
118
|
-
sig do
|
|
119
|
-
override.returns(
|
|
120
|
-
{
|
|
121
|
-
type: PreludeSDK::WatchPredictParams::Target::Type::OrSymbol,
|
|
122
|
-
value: String
|
|
123
|
-
}
|
|
124
|
-
)
|
|
125
|
-
end
|
|
126
|
-
def to_hash
|
|
127
|
-
end
|
|
128
|
-
|
|
129
|
-
# The type of the target. Either "phone_number" or "email_address".
|
|
130
|
-
module Type
|
|
131
|
-
extend PreludeSDK::Internal::Type::Enum
|
|
132
|
-
|
|
133
|
-
TaggedSymbol =
|
|
134
|
-
T.type_alias do
|
|
135
|
-
T.all(Symbol, PreludeSDK::WatchPredictParams::Target::Type)
|
|
136
|
-
end
|
|
137
|
-
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
138
|
-
|
|
139
|
-
PHONE_NUMBER =
|
|
140
|
-
T.let(
|
|
141
|
-
:phone_number,
|
|
142
|
-
PreludeSDK::WatchPredictParams::Target::Type::TaggedSymbol
|
|
143
|
-
)
|
|
144
|
-
EMAIL_ADDRESS =
|
|
145
|
-
T.let(
|
|
146
|
-
:email_address,
|
|
147
|
-
PreludeSDK::WatchPredictParams::Target::Type::TaggedSymbol
|
|
148
|
-
)
|
|
149
|
-
|
|
150
|
-
sig do
|
|
151
|
-
override.returns(
|
|
152
|
-
T::Array[
|
|
153
|
-
PreludeSDK::WatchPredictParams::Target::Type::TaggedSymbol
|
|
154
|
-
]
|
|
155
|
-
)
|
|
156
|
-
end
|
|
157
|
-
def self.values
|
|
158
|
-
end
|
|
159
|
-
end
|
|
160
|
-
end
|
|
161
|
-
|
|
162
82
|
class Metadata < PreludeSDK::Internal::Type::BaseModel
|
|
163
83
|
OrHash =
|
|
164
84
|
T.type_alias do
|
|
@@ -189,238 +109,6 @@ module PreludeSDK
|
|
|
189
109
|
def to_hash
|
|
190
110
|
end
|
|
191
111
|
end
|
|
192
|
-
|
|
193
|
-
class Signals < PreludeSDK::Internal::Type::BaseModel
|
|
194
|
-
OrHash =
|
|
195
|
-
T.type_alias do
|
|
196
|
-
T.any(
|
|
197
|
-
PreludeSDK::WatchPredictParams::Signals,
|
|
198
|
-
PreludeSDK::Internal::AnyHash
|
|
199
|
-
)
|
|
200
|
-
end
|
|
201
|
-
|
|
202
|
-
# The version of your application.
|
|
203
|
-
sig { returns(T.nilable(String)) }
|
|
204
|
-
attr_reader :app_version
|
|
205
|
-
|
|
206
|
-
sig { params(app_version: String).void }
|
|
207
|
-
attr_writer :app_version
|
|
208
|
-
|
|
209
|
-
# A unique ID for the user's device. You should ensure that each user device has a
|
|
210
|
-
# unique `device_id` value. Ideally, for Android, this corresponds to the
|
|
211
|
-
# `ANDROID_ID` and for iOS, this corresponds to the `identifierForVendor`.
|
|
212
|
-
sig { returns(T.nilable(String)) }
|
|
213
|
-
attr_reader :device_id
|
|
214
|
-
|
|
215
|
-
sig { params(device_id: String).void }
|
|
216
|
-
attr_writer :device_id
|
|
217
|
-
|
|
218
|
-
# The model of the user's device.
|
|
219
|
-
sig { returns(T.nilable(String)) }
|
|
220
|
-
attr_reader :device_model
|
|
221
|
-
|
|
222
|
-
sig { params(device_model: String).void }
|
|
223
|
-
attr_writer :device_model
|
|
224
|
-
|
|
225
|
-
# The type of the user's device.
|
|
226
|
-
sig do
|
|
227
|
-
returns(
|
|
228
|
-
T.nilable(
|
|
229
|
-
PreludeSDK::WatchPredictParams::Signals::DevicePlatform::OrSymbol
|
|
230
|
-
)
|
|
231
|
-
)
|
|
232
|
-
end
|
|
233
|
-
attr_reader :device_platform
|
|
234
|
-
|
|
235
|
-
sig do
|
|
236
|
-
params(
|
|
237
|
-
device_platform:
|
|
238
|
-
PreludeSDK::WatchPredictParams::Signals::DevicePlatform::OrSymbol
|
|
239
|
-
).void
|
|
240
|
-
end
|
|
241
|
-
attr_writer :device_platform
|
|
242
|
-
|
|
243
|
-
# Whether the end-user already exists in your system, for example an existing
|
|
244
|
-
# account signing in again rather than a first-time signup. Unlike
|
|
245
|
-
# `is_trusted_user`, this signal does not bypass fraud checks; it is taken into
|
|
246
|
-
# account as one additional anti-fraud signal. For more details, refer to
|
|
247
|
-
# [Signals](/verify/v2/documentation/prevent-fraud#signals).
|
|
248
|
-
sig { returns(T.nilable(T::Boolean)) }
|
|
249
|
-
attr_reader :existing_user
|
|
250
|
-
|
|
251
|
-
sig { params(existing_user: T::Boolean).void }
|
|
252
|
-
attr_writer :existing_user
|
|
253
|
-
|
|
254
|
-
# The public IP v4 or v6 address of the end-user's device. You should collect this
|
|
255
|
-
# from your backend. If your backend is behind a proxy, use the `X-Forwarded-For`,
|
|
256
|
-
# `Forwarded`, `True-Client-IP`, `CF-Connecting-IP` or an equivalent header to get
|
|
257
|
-
# the actual public IP of the end-user's device.
|
|
258
|
-
sig { returns(T.nilable(String)) }
|
|
259
|
-
attr_reader :ip
|
|
260
|
-
|
|
261
|
-
sig { params(ip: String).void }
|
|
262
|
-
attr_writer :ip
|
|
263
|
-
|
|
264
|
-
# This signal should indicate a higher level of trust, explicitly stating that the
|
|
265
|
-
# user is genuine. Contact us to discuss your use case. For more details, refer to
|
|
266
|
-
# [Signals](/verify/v2/documentation/prevent-fraud#signals).
|
|
267
|
-
sig { returns(T.nilable(T::Boolean)) }
|
|
268
|
-
attr_reader :is_trusted_user
|
|
269
|
-
|
|
270
|
-
sig { params(is_trusted_user: T::Boolean).void }
|
|
271
|
-
attr_writer :is_trusted_user
|
|
272
|
-
|
|
273
|
-
# The JA4 fingerprint observed for the end-user's connection. Prelude will infer
|
|
274
|
-
# it automatically when you use our Frontend SDKs (which use Prelude's edge
|
|
275
|
-
# network), but you can also forward the value if you terminate TLS yourself.
|
|
276
|
-
sig { returns(T.nilable(String)) }
|
|
277
|
-
attr_reader :ja4_fingerprint
|
|
278
|
-
|
|
279
|
-
sig { params(ja4_fingerprint: String).void }
|
|
280
|
-
attr_writer :ja4_fingerprint
|
|
281
|
-
|
|
282
|
-
# The version of the user's device operating system.
|
|
283
|
-
sig { returns(T.nilable(String)) }
|
|
284
|
-
attr_reader :os_version
|
|
285
|
-
|
|
286
|
-
sig { params(os_version: String).void }
|
|
287
|
-
attr_writer :os_version
|
|
288
|
-
|
|
289
|
-
# The user agent of the user's device. If the individual fields (os_version,
|
|
290
|
-
# device_platform, device_model) are provided, we will prioritize those values
|
|
291
|
-
# instead of parsing them from the user agent string.
|
|
292
|
-
sig { returns(T.nilable(String)) }
|
|
293
|
-
attr_reader :user_agent
|
|
294
|
-
|
|
295
|
-
sig { params(user_agent: String).void }
|
|
296
|
-
attr_writer :user_agent
|
|
297
|
-
|
|
298
|
-
# The signals used for anti-fraud. For more details, refer to
|
|
299
|
-
# [Signals](/verify/v2/documentation/prevent-fraud#signals).
|
|
300
|
-
sig do
|
|
301
|
-
params(
|
|
302
|
-
app_version: String,
|
|
303
|
-
device_id: String,
|
|
304
|
-
device_model: String,
|
|
305
|
-
device_platform:
|
|
306
|
-
PreludeSDK::WatchPredictParams::Signals::DevicePlatform::OrSymbol,
|
|
307
|
-
existing_user: T::Boolean,
|
|
308
|
-
ip: String,
|
|
309
|
-
is_trusted_user: T::Boolean,
|
|
310
|
-
ja4_fingerprint: String,
|
|
311
|
-
os_version: String,
|
|
312
|
-
user_agent: String
|
|
313
|
-
).returns(T.attached_class)
|
|
314
|
-
end
|
|
315
|
-
def self.new(
|
|
316
|
-
# The version of your application.
|
|
317
|
-
app_version: nil,
|
|
318
|
-
# A unique ID for the user's device. You should ensure that each user device has a
|
|
319
|
-
# unique `device_id` value. Ideally, for Android, this corresponds to the
|
|
320
|
-
# `ANDROID_ID` and for iOS, this corresponds to the `identifierForVendor`.
|
|
321
|
-
device_id: nil,
|
|
322
|
-
# The model of the user's device.
|
|
323
|
-
device_model: nil,
|
|
324
|
-
# The type of the user's device.
|
|
325
|
-
device_platform: nil,
|
|
326
|
-
# Whether the end-user already exists in your system, for example an existing
|
|
327
|
-
# account signing in again rather than a first-time signup. Unlike
|
|
328
|
-
# `is_trusted_user`, this signal does not bypass fraud checks; it is taken into
|
|
329
|
-
# account as one additional anti-fraud signal. For more details, refer to
|
|
330
|
-
# [Signals](/verify/v2/documentation/prevent-fraud#signals).
|
|
331
|
-
existing_user: nil,
|
|
332
|
-
# The public IP v4 or v6 address of the end-user's device. You should collect this
|
|
333
|
-
# from your backend. If your backend is behind a proxy, use the `X-Forwarded-For`,
|
|
334
|
-
# `Forwarded`, `True-Client-IP`, `CF-Connecting-IP` or an equivalent header to get
|
|
335
|
-
# the actual public IP of the end-user's device.
|
|
336
|
-
ip: nil,
|
|
337
|
-
# This signal should indicate a higher level of trust, explicitly stating that the
|
|
338
|
-
# user is genuine. Contact us to discuss your use case. For more details, refer to
|
|
339
|
-
# [Signals](/verify/v2/documentation/prevent-fraud#signals).
|
|
340
|
-
is_trusted_user: nil,
|
|
341
|
-
# The JA4 fingerprint observed for the end-user's connection. Prelude will infer
|
|
342
|
-
# it automatically when you use our Frontend SDKs (which use Prelude's edge
|
|
343
|
-
# network), but you can also forward the value if you terminate TLS yourself.
|
|
344
|
-
ja4_fingerprint: nil,
|
|
345
|
-
# The version of the user's device operating system.
|
|
346
|
-
os_version: nil,
|
|
347
|
-
# The user agent of the user's device. If the individual fields (os_version,
|
|
348
|
-
# device_platform, device_model) are provided, we will prioritize those values
|
|
349
|
-
# instead of parsing them from the user agent string.
|
|
350
|
-
user_agent: nil
|
|
351
|
-
)
|
|
352
|
-
end
|
|
353
|
-
|
|
354
|
-
sig do
|
|
355
|
-
override.returns(
|
|
356
|
-
{
|
|
357
|
-
app_version: String,
|
|
358
|
-
device_id: String,
|
|
359
|
-
device_model: String,
|
|
360
|
-
device_platform:
|
|
361
|
-
PreludeSDK::WatchPredictParams::Signals::DevicePlatform::OrSymbol,
|
|
362
|
-
existing_user: T::Boolean,
|
|
363
|
-
ip: String,
|
|
364
|
-
is_trusted_user: T::Boolean,
|
|
365
|
-
ja4_fingerprint: String,
|
|
366
|
-
os_version: String,
|
|
367
|
-
user_agent: String
|
|
368
|
-
}
|
|
369
|
-
)
|
|
370
|
-
end
|
|
371
|
-
def to_hash
|
|
372
|
-
end
|
|
373
|
-
|
|
374
|
-
# The type of the user's device.
|
|
375
|
-
module DevicePlatform
|
|
376
|
-
extend PreludeSDK::Internal::Type::Enum
|
|
377
|
-
|
|
378
|
-
TaggedSymbol =
|
|
379
|
-
T.type_alias do
|
|
380
|
-
T.all(
|
|
381
|
-
Symbol,
|
|
382
|
-
PreludeSDK::WatchPredictParams::Signals::DevicePlatform
|
|
383
|
-
)
|
|
384
|
-
end
|
|
385
|
-
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
386
|
-
|
|
387
|
-
ANDROID =
|
|
388
|
-
T.let(
|
|
389
|
-
:android,
|
|
390
|
-
PreludeSDK::WatchPredictParams::Signals::DevicePlatform::TaggedSymbol
|
|
391
|
-
)
|
|
392
|
-
IOS =
|
|
393
|
-
T.let(
|
|
394
|
-
:ios,
|
|
395
|
-
PreludeSDK::WatchPredictParams::Signals::DevicePlatform::TaggedSymbol
|
|
396
|
-
)
|
|
397
|
-
IPADOS =
|
|
398
|
-
T.let(
|
|
399
|
-
:ipados,
|
|
400
|
-
PreludeSDK::WatchPredictParams::Signals::DevicePlatform::TaggedSymbol
|
|
401
|
-
)
|
|
402
|
-
TVOS =
|
|
403
|
-
T.let(
|
|
404
|
-
:tvos,
|
|
405
|
-
PreludeSDK::WatchPredictParams::Signals::DevicePlatform::TaggedSymbol
|
|
406
|
-
)
|
|
407
|
-
WEB =
|
|
408
|
-
T.let(
|
|
409
|
-
:web,
|
|
410
|
-
PreludeSDK::WatchPredictParams::Signals::DevicePlatform::TaggedSymbol
|
|
411
|
-
)
|
|
412
|
-
|
|
413
|
-
sig do
|
|
414
|
-
override.returns(
|
|
415
|
-
T::Array[
|
|
416
|
-
PreludeSDK::WatchPredictParams::Signals::DevicePlatform::TaggedSymbol
|
|
417
|
-
]
|
|
418
|
-
)
|
|
419
|
-
end
|
|
420
|
-
def self.values
|
|
421
|
-
end
|
|
422
|
-
end
|
|
423
|
-
end
|
|
424
112
|
end
|
|
425
113
|
end
|
|
426
114
|
end
|
|
@@ -32,29 +32,43 @@ module PreludeSDK
|
|
|
32
32
|
# when prediction is "suspicious" and the anti-fraud system detected specific risk
|
|
33
33
|
# signals.
|
|
34
34
|
#
|
|
35
|
-
# - `account_risk_profile` - The
|
|
36
|
-
# outcomes reported on your own account
|
|
37
|
-
#
|
|
38
|
-
#
|
|
39
|
-
#
|
|
40
|
-
#
|
|
41
|
-
#
|
|
42
|
-
#
|
|
43
|
-
#
|
|
44
|
-
# - `
|
|
45
|
-
#
|
|
46
|
-
# - `
|
|
47
|
-
#
|
|
48
|
-
#
|
|
49
|
-
#
|
|
50
|
-
#
|
|
51
|
-
#
|
|
52
|
-
#
|
|
53
|
-
#
|
|
54
|
-
#
|
|
55
|
-
#
|
|
56
|
-
#
|
|
57
|
-
#
|
|
35
|
+
# - `account_risk_profile` - The request matches a risk profile derived from the
|
|
36
|
+
# outcomes reported on your own account.
|
|
37
|
+
# - `automation_signature` - The request appears to come from an automated client
|
|
38
|
+
# rather than a person.
|
|
39
|
+
# - `carrier_not_permitted` - The destination carrier is one this account does not
|
|
40
|
+
# accept traffic for.
|
|
41
|
+
# - `client_fingerprint_mismatch` - The client does not appear to be the platform
|
|
42
|
+
# it identifies itself as.
|
|
43
|
+
# - `custom_policy` - A rule configured for your account matched this request.
|
|
44
|
+
# - `device_emulator` - The request appears to come from an emulator rather than a
|
|
45
|
+
# physical device.
|
|
46
|
+
# - `device_not_permitted` - The device platform is one your account blocks.
|
|
47
|
+
# - `device_reuse` - One device is driving verifications for an unusual number of
|
|
48
|
+
# phone numbers.
|
|
49
|
+
# - `expired_signals` - The SDK signals were collected too long before the request
|
|
50
|
+
# to still attest to it.
|
|
51
|
+
# - `fraud_database` - The phone number is flagged in one or more of the fraud
|
|
52
|
+
# databases Prelude consults.
|
|
53
|
+
# - `invalid_signature` - The SDK signature did not verify, so the request cannot
|
|
54
|
+
# be attributed to the device it claims to come from.
|
|
55
|
+
# - `ip_concentration` - The request shares its origin with an unusual volume of
|
|
56
|
+
# other verifications.
|
|
57
|
+
# - `ip_reputation` - The originating IP address is not trusted.
|
|
58
|
+
# - `location_mismatch` - The network location and the phone number's country are
|
|
59
|
+
# inconsistent.
|
|
60
|
+
# - `missing_signals` - The verification expected Prelude SDK signals and none
|
|
61
|
+
# arrived.
|
|
62
|
+
# - `number_range_abuse` - The phone number belongs to a range currently
|
|
63
|
+
# associated with abuse.
|
|
64
|
+
# - `poor_conversion_history` - Traffic resembling this request rarely completes a
|
|
65
|
+
# verification.
|
|
66
|
+
# - `proxy_network` - The request did not arrive over the subscriber's own access
|
|
67
|
+
# network.
|
|
68
|
+
# - `repeated_attempts` - The phone number exceeded the allowed number of
|
|
69
|
+
# verification attempts in a short period.
|
|
70
|
+
# - `temporary_phone_number` - The phone number belongs to a disposable or
|
|
71
|
+
# short-lived numbering service.
|
|
58
72
|
sig do
|
|
59
73
|
returns(
|
|
60
74
|
T.nilable(
|
|
@@ -100,29 +114,43 @@ module PreludeSDK
|
|
|
100
114
|
# when prediction is "suspicious" and the anti-fraud system detected specific risk
|
|
101
115
|
# signals.
|
|
102
116
|
#
|
|
103
|
-
# - `account_risk_profile` - The
|
|
104
|
-
# outcomes reported on your own account
|
|
105
|
-
#
|
|
106
|
-
#
|
|
107
|
-
#
|
|
108
|
-
#
|
|
109
|
-
#
|
|
110
|
-
#
|
|
111
|
-
#
|
|
112
|
-
# - `
|
|
113
|
-
#
|
|
114
|
-
# - `
|
|
115
|
-
#
|
|
116
|
-
#
|
|
117
|
-
#
|
|
118
|
-
#
|
|
119
|
-
#
|
|
120
|
-
#
|
|
121
|
-
#
|
|
122
|
-
#
|
|
123
|
-
#
|
|
124
|
-
#
|
|
125
|
-
#
|
|
117
|
+
# - `account_risk_profile` - The request matches a risk profile derived from the
|
|
118
|
+
# outcomes reported on your own account.
|
|
119
|
+
# - `automation_signature` - The request appears to come from an automated client
|
|
120
|
+
# rather than a person.
|
|
121
|
+
# - `carrier_not_permitted` - The destination carrier is one this account does not
|
|
122
|
+
# accept traffic for.
|
|
123
|
+
# - `client_fingerprint_mismatch` - The client does not appear to be the platform
|
|
124
|
+
# it identifies itself as.
|
|
125
|
+
# - `custom_policy` - A rule configured for your account matched this request.
|
|
126
|
+
# - `device_emulator` - The request appears to come from an emulator rather than a
|
|
127
|
+
# physical device.
|
|
128
|
+
# - `device_not_permitted` - The device platform is one your account blocks.
|
|
129
|
+
# - `device_reuse` - One device is driving verifications for an unusual number of
|
|
130
|
+
# phone numbers.
|
|
131
|
+
# - `expired_signals` - The SDK signals were collected too long before the request
|
|
132
|
+
# to still attest to it.
|
|
133
|
+
# - `fraud_database` - The phone number is flagged in one or more of the fraud
|
|
134
|
+
# databases Prelude consults.
|
|
135
|
+
# - `invalid_signature` - The SDK signature did not verify, so the request cannot
|
|
136
|
+
# be attributed to the device it claims to come from.
|
|
137
|
+
# - `ip_concentration` - The request shares its origin with an unusual volume of
|
|
138
|
+
# other verifications.
|
|
139
|
+
# - `ip_reputation` - The originating IP address is not trusted.
|
|
140
|
+
# - `location_mismatch` - The network location and the phone number's country are
|
|
141
|
+
# inconsistent.
|
|
142
|
+
# - `missing_signals` - The verification expected Prelude SDK signals and none
|
|
143
|
+
# arrived.
|
|
144
|
+
# - `number_range_abuse` - The phone number belongs to a range currently
|
|
145
|
+
# associated with abuse.
|
|
146
|
+
# - `poor_conversion_history` - Traffic resembling this request rarely completes a
|
|
147
|
+
# verification.
|
|
148
|
+
# - `proxy_network` - The request did not arrive over the subscriber's own access
|
|
149
|
+
# network.
|
|
150
|
+
# - `repeated_attempts` - The phone number exceeded the allowed number of
|
|
151
|
+
# verification attempts in a short period.
|
|
152
|
+
# - `temporary_phone_number` - The phone number belongs to a disposable or
|
|
153
|
+
# short-lived numbering service.
|
|
126
154
|
risk_factors: nil
|
|
127
155
|
)
|
|
128
156
|
end
|
|
@@ -190,14 +218,44 @@ module PreludeSDK
|
|
|
190
218
|
:account_risk_profile,
|
|
191
219
|
PreludeSDK::Models::WatchPredictResponse::RiskFactor::TaggedSymbol
|
|
192
220
|
)
|
|
193
|
-
|
|
221
|
+
AUTOMATION_SIGNATURE =
|
|
194
222
|
T.let(
|
|
195
|
-
:
|
|
223
|
+
:automation_signature,
|
|
196
224
|
PreludeSDK::Models::WatchPredictResponse::RiskFactor::TaggedSymbol
|
|
197
225
|
)
|
|
198
|
-
|
|
226
|
+
CARRIER_NOT_PERMITTED =
|
|
199
227
|
T.let(
|
|
200
|
-
:
|
|
228
|
+
:carrier_not_permitted,
|
|
229
|
+
PreludeSDK::Models::WatchPredictResponse::RiskFactor::TaggedSymbol
|
|
230
|
+
)
|
|
231
|
+
CLIENT_FINGERPRINT_MISMATCH =
|
|
232
|
+
T.let(
|
|
233
|
+
:client_fingerprint_mismatch,
|
|
234
|
+
PreludeSDK::Models::WatchPredictResponse::RiskFactor::TaggedSymbol
|
|
235
|
+
)
|
|
236
|
+
CUSTOM_POLICY =
|
|
237
|
+
T.let(
|
|
238
|
+
:custom_policy,
|
|
239
|
+
PreludeSDK::Models::WatchPredictResponse::RiskFactor::TaggedSymbol
|
|
240
|
+
)
|
|
241
|
+
DEVICE_EMULATOR =
|
|
242
|
+
T.let(
|
|
243
|
+
:device_emulator,
|
|
244
|
+
PreludeSDK::Models::WatchPredictResponse::RiskFactor::TaggedSymbol
|
|
245
|
+
)
|
|
246
|
+
DEVICE_NOT_PERMITTED =
|
|
247
|
+
T.let(
|
|
248
|
+
:device_not_permitted,
|
|
249
|
+
PreludeSDK::Models::WatchPredictResponse::RiskFactor::TaggedSymbol
|
|
250
|
+
)
|
|
251
|
+
DEVICE_REUSE =
|
|
252
|
+
T.let(
|
|
253
|
+
:device_reuse,
|
|
254
|
+
PreludeSDK::Models::WatchPredictResponse::RiskFactor::TaggedSymbol
|
|
255
|
+
)
|
|
256
|
+
EXPIRED_SIGNALS =
|
|
257
|
+
T.let(
|
|
258
|
+
:expired_signals,
|
|
201
259
|
PreludeSDK::Models::WatchPredictResponse::RiskFactor::TaggedSymbol
|
|
202
260
|
)
|
|
203
261
|
FRAUD_DATABASE =
|
|
@@ -205,34 +263,49 @@ module PreludeSDK
|
|
|
205
263
|
:fraud_database,
|
|
206
264
|
PreludeSDK::Models::WatchPredictResponse::RiskFactor::TaggedSymbol
|
|
207
265
|
)
|
|
208
|
-
|
|
266
|
+
INVALID_SIGNATURE =
|
|
209
267
|
T.let(
|
|
210
|
-
:
|
|
268
|
+
:invalid_signature,
|
|
211
269
|
PreludeSDK::Models::WatchPredictResponse::RiskFactor::TaggedSymbol
|
|
212
270
|
)
|
|
213
|
-
|
|
271
|
+
IP_CONCENTRATION =
|
|
214
272
|
T.let(
|
|
215
|
-
:
|
|
273
|
+
:ip_concentration,
|
|
216
274
|
PreludeSDK::Models::WatchPredictResponse::RiskFactor::TaggedSymbol
|
|
217
275
|
)
|
|
218
|
-
|
|
276
|
+
IP_REPUTATION =
|
|
219
277
|
T.let(
|
|
220
|
-
:
|
|
278
|
+
:ip_reputation,
|
|
221
279
|
PreludeSDK::Models::WatchPredictResponse::RiskFactor::TaggedSymbol
|
|
222
280
|
)
|
|
223
|
-
|
|
281
|
+
LOCATION_MISMATCH =
|
|
224
282
|
T.let(
|
|
225
|
-
:
|
|
283
|
+
:location_mismatch,
|
|
284
|
+
PreludeSDK::Models::WatchPredictResponse::RiskFactor::TaggedSymbol
|
|
285
|
+
)
|
|
286
|
+
MISSING_SIGNALS =
|
|
287
|
+
T.let(
|
|
288
|
+
:missing_signals,
|
|
289
|
+
PreludeSDK::Models::WatchPredictResponse::RiskFactor::TaggedSymbol
|
|
290
|
+
)
|
|
291
|
+
NUMBER_RANGE_ABUSE =
|
|
292
|
+
T.let(
|
|
293
|
+
:number_range_abuse,
|
|
294
|
+
PreludeSDK::Models::WatchPredictResponse::RiskFactor::TaggedSymbol
|
|
295
|
+
)
|
|
296
|
+
POOR_CONVERSION_HISTORY =
|
|
297
|
+
T.let(
|
|
298
|
+
:poor_conversion_history,
|
|
226
299
|
PreludeSDK::Models::WatchPredictResponse::RiskFactor::TaggedSymbol
|
|
227
300
|
)
|
|
228
|
-
|
|
301
|
+
PROXY_NETWORK =
|
|
229
302
|
T.let(
|
|
230
|
-
:
|
|
303
|
+
:proxy_network,
|
|
231
304
|
PreludeSDK::Models::WatchPredictResponse::RiskFactor::TaggedSymbol
|
|
232
305
|
)
|
|
233
|
-
|
|
306
|
+
REPEATED_ATTEMPTS =
|
|
234
307
|
T.let(
|
|
235
|
-
:
|
|
308
|
+
:repeated_attempts,
|
|
236
309
|
PreludeSDK::Models::WatchPredictResponse::RiskFactor::TaggedSymbol
|
|
237
310
|
)
|
|
238
311
|
TEMPORARY_PHONE_NUMBER =
|