prelude-sdk 0.8.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 +8 -0
- data/README.md +1 -1
- data/lib/prelude_sdk/models/verification/phone/history_list_response.rb +4 -4
- data/lib/prelude_sdk/models/verification/phone/history_retrieve_response.rb +56 -36
- data/lib/prelude_sdk/models/verification_create_response.rb +59 -33
- data/lib/prelude_sdk/models/watch_evaluate_response.rb +54 -2
- data/lib/prelude_sdk/models/watch_predict_response.rb +53 -30
- data/lib/prelude_sdk/resources/watch.rb +3 -3
- data/lib/prelude_sdk/version.rb +1 -1
- data/rbi/prelude_sdk/models/verification/phone/history_list_response.rbi +6 -6
- data/rbi/prelude_sdk/models/verification/phone/history_retrieve_response.rbi +131 -70
- data/rbi/prelude_sdk/models/verification_create_response.rbi +143 -65
- data/rbi/prelude_sdk/models/watch_evaluate_response.rbi +105 -5
- data/rbi/prelude_sdk/models/watch_predict_response.rbi +135 -62
- data/rbi/prelude_sdk/resources/watch.rbi +3 -3
- data/sig/prelude_sdk/models/verification/phone/history_retrieve_response.rbs +30 -16
- data/sig/prelude_sdk/models/verification_create_response.rbs +32 -14
- data/sig/prelude_sdk/models/watch_evaluate_response.rbs +28 -4
- data/sig/prelude_sdk/models/watch_predict_response.rbs +32 -14
- metadata +2 -2
|
@@ -155,7 +155,9 @@ module PreludeSDK
|
|
|
155
155
|
|
|
156
156
|
# One result per rule in the recipe, in membership order. Every rule runs — a
|
|
157
157
|
# score is only meaningful when complete, so there is no short-circuit on the
|
|
158
|
-
# first trigger.
|
|
158
|
+
# first trigger. The exception is a recipe whose verdict a preempting rule has
|
|
159
|
+
# already determined, where a rule that could no longer change it may report
|
|
160
|
+
# `SKIPPED` instead.
|
|
159
161
|
sig do
|
|
160
162
|
returns(
|
|
161
163
|
T::Array[PreludeSDK::Models::WatchEvaluateResponse::Recipe::Rule]
|
|
@@ -214,7 +216,9 @@ module PreludeSDK
|
|
|
214
216
|
recipe_id:,
|
|
215
217
|
# One result per rule in the recipe, in membership order. Every rule runs — a
|
|
216
218
|
# score is only meaningful when complete, so there is no short-circuit on the
|
|
217
|
-
# first trigger.
|
|
219
|
+
# first trigger. The exception is a recipe whose verdict a preempting rule has
|
|
220
|
+
# already determined, where a rule that could no longer change it may report
|
|
221
|
+
# `SKIPPED` instead.
|
|
218
222
|
rules:,
|
|
219
223
|
# The sum of the weights of the rules that triggered, clamped to the range -100
|
|
220
224
|
# to 100. Two scores at a bound are not comparable.
|
|
@@ -267,6 +271,10 @@ module PreludeSDK
|
|
|
267
271
|
# - `NOT_EVALUATED` - The rule could not run, because something it reads never
|
|
268
272
|
# arrived. This is not a quieter `NOT_TRIGGERED`: it contributed nothing either
|
|
269
273
|
# way, and it is why `partial_evidence` is set on the recipe.
|
|
274
|
+
# - `SKIPPED` - The rule was not run, because another rule had already determined
|
|
275
|
+
# the recipe's verdict — see `determined_by`. Nothing was missing and nothing
|
|
276
|
+
# failed, so `partial_evidence` is not set: `determined_by` is what accounts for
|
|
277
|
+
# the recipe's score resting on fewer rules.
|
|
270
278
|
sig do
|
|
271
279
|
returns(
|
|
272
280
|
PreludeSDK::Models::WatchEvaluateResponse::Recipe::Rule::Outcome::TaggedSymbol
|
|
@@ -280,6 +288,19 @@ module PreludeSDK
|
|
|
280
288
|
sig { returns(String) }
|
|
281
289
|
attr_accessor :rule_id
|
|
282
290
|
|
|
291
|
+
# Who authored the rule, which is what says how much of the rest of this result
|
|
292
|
+
# you get.
|
|
293
|
+
#
|
|
294
|
+
# - `MANAGED` - Prelude-owned, shared with customers: `name` and `version_id` are
|
|
295
|
+
# omitted, and `blocked_by` reports only `missing_data`.
|
|
296
|
+
# - `CUSTOM` - Yours: every field is returned.
|
|
297
|
+
sig do
|
|
298
|
+
returns(
|
|
299
|
+
PreludeSDK::Models::WatchEvaluateResponse::Recipe::Rule::Type::TaggedSymbol
|
|
300
|
+
)
|
|
301
|
+
end
|
|
302
|
+
attr_accessor :type
|
|
303
|
+
|
|
283
304
|
# What this rule contributes to the recipe's score when it triggers.
|
|
284
305
|
sig { returns(Integer) }
|
|
285
306
|
attr_accessor :weight
|
|
@@ -313,15 +334,27 @@ module PreludeSDK
|
|
|
313
334
|
sig { params(unavailable: T::Boolean).void }
|
|
314
335
|
attr_writer :unavailable
|
|
315
336
|
|
|
337
|
+
# The version of the rule that scored — the one this recipe is pinned to, or the
|
|
338
|
+
# version current at evaluation time when it is not pinned. Present for a rule you
|
|
339
|
+
# authored, and omitted for a Prelude-managed one.
|
|
340
|
+
sig { returns(T.nilable(String)) }
|
|
341
|
+
attr_reader :version_id
|
|
342
|
+
|
|
343
|
+
sig { params(version_id: String).void }
|
|
344
|
+
attr_writer :version_id
|
|
345
|
+
|
|
316
346
|
sig do
|
|
317
347
|
params(
|
|
318
348
|
outcome:
|
|
319
349
|
PreludeSDK::Models::WatchEvaluateResponse::Recipe::Rule::Outcome::OrSymbol,
|
|
320
350
|
rule_id: String,
|
|
351
|
+
type:
|
|
352
|
+
PreludeSDK::Models::WatchEvaluateResponse::Recipe::Rule::Type::OrSymbol,
|
|
321
353
|
weight: Integer,
|
|
322
354
|
blocked_by: String,
|
|
323
355
|
name: String,
|
|
324
|
-
unavailable: T::Boolean
|
|
356
|
+
unavailable: T::Boolean,
|
|
357
|
+
version_id: String
|
|
325
358
|
).returns(T.attached_class)
|
|
326
359
|
end
|
|
327
360
|
def self.new(
|
|
@@ -332,11 +365,22 @@ module PreludeSDK
|
|
|
332
365
|
# - `NOT_EVALUATED` - The rule could not run, because something it reads never
|
|
333
366
|
# arrived. This is not a quieter `NOT_TRIGGERED`: it contributed nothing either
|
|
334
367
|
# way, and it is why `partial_evidence` is set on the recipe.
|
|
368
|
+
# - `SKIPPED` - The rule was not run, because another rule had already determined
|
|
369
|
+
# the recipe's verdict — see `determined_by`. Nothing was missing and nothing
|
|
370
|
+
# failed, so `partial_evidence` is not set: `determined_by` is what accounts for
|
|
371
|
+
# the recipe's score resting on fewer rules.
|
|
335
372
|
outcome:,
|
|
336
373
|
# The rule that produced this result. Present whatever the rule's visibility, so a
|
|
337
374
|
# rule you cannot see the condition of is still one you can reweight, switch off,
|
|
338
375
|
# or ask us about.
|
|
339
376
|
rule_id:,
|
|
377
|
+
# Who authored the rule, which is what says how much of the rest of this result
|
|
378
|
+
# you get.
|
|
379
|
+
#
|
|
380
|
+
# - `MANAGED` - Prelude-owned, shared with customers: `name` and `version_id` are
|
|
381
|
+
# omitted, and `blocked_by` reports only `missing_data`.
|
|
382
|
+
# - `CUSTOM` - Yours: every field is returned.
|
|
383
|
+
type:,
|
|
340
384
|
# What this rule contributes to the recipe's score when it triggers.
|
|
341
385
|
weight:,
|
|
342
386
|
# Why the rule could not run, set only when `outcome` is `NOT_EVALUATED`.
|
|
@@ -352,7 +396,11 @@ module PreludeSDK
|
|
|
352
396
|
name: nil,
|
|
353
397
|
# The rule could not run for a reason on our side rather than anything about your
|
|
354
398
|
# request. `outcome` is `NOT_EVALUATED` and the failure is ours to fix.
|
|
355
|
-
unavailable: nil
|
|
399
|
+
unavailable: nil,
|
|
400
|
+
# The version of the rule that scored — the one this recipe is pinned to, or the
|
|
401
|
+
# version current at evaluation time when it is not pinned. Present for a rule you
|
|
402
|
+
# authored, and omitted for a Prelude-managed one.
|
|
403
|
+
version_id: nil
|
|
356
404
|
)
|
|
357
405
|
end
|
|
358
406
|
|
|
@@ -362,10 +410,13 @@ module PreludeSDK
|
|
|
362
410
|
outcome:
|
|
363
411
|
PreludeSDK::Models::WatchEvaluateResponse::Recipe::Rule::Outcome::TaggedSymbol,
|
|
364
412
|
rule_id: String,
|
|
413
|
+
type:
|
|
414
|
+
PreludeSDK::Models::WatchEvaluateResponse::Recipe::Rule::Type::TaggedSymbol,
|
|
365
415
|
weight: Integer,
|
|
366
416
|
blocked_by: String,
|
|
367
417
|
name: String,
|
|
368
|
-
unavailable: T::Boolean
|
|
418
|
+
unavailable: T::Boolean,
|
|
419
|
+
version_id: String
|
|
369
420
|
}
|
|
370
421
|
)
|
|
371
422
|
end
|
|
@@ -379,6 +430,10 @@ module PreludeSDK
|
|
|
379
430
|
# - `NOT_EVALUATED` - The rule could not run, because something it reads never
|
|
380
431
|
# arrived. This is not a quieter `NOT_TRIGGERED`: it contributed nothing either
|
|
381
432
|
# way, and it is why `partial_evidence` is set on the recipe.
|
|
433
|
+
# - `SKIPPED` - The rule was not run, because another rule had already determined
|
|
434
|
+
# the recipe's verdict — see `determined_by`. Nothing was missing and nothing
|
|
435
|
+
# failed, so `partial_evidence` is not set: `determined_by` is what accounts for
|
|
436
|
+
# the recipe's score resting on fewer rules.
|
|
382
437
|
module Outcome
|
|
383
438
|
extend PreludeSDK::Internal::Type::Enum
|
|
384
439
|
|
|
@@ -406,6 +461,11 @@ module PreludeSDK
|
|
|
406
461
|
:NOT_EVALUATED,
|
|
407
462
|
PreludeSDK::Models::WatchEvaluateResponse::Recipe::Rule::Outcome::TaggedSymbol
|
|
408
463
|
)
|
|
464
|
+
SKIPPED =
|
|
465
|
+
T.let(
|
|
466
|
+
:SKIPPED,
|
|
467
|
+
PreludeSDK::Models::WatchEvaluateResponse::Recipe::Rule::Outcome::TaggedSymbol
|
|
468
|
+
)
|
|
409
469
|
|
|
410
470
|
sig do
|
|
411
471
|
override.returns(
|
|
@@ -417,6 +477,46 @@ module PreludeSDK
|
|
|
417
477
|
def self.values
|
|
418
478
|
end
|
|
419
479
|
end
|
|
480
|
+
|
|
481
|
+
# Who authored the rule, which is what says how much of the rest of this result
|
|
482
|
+
# you get.
|
|
483
|
+
#
|
|
484
|
+
# - `MANAGED` - Prelude-owned, shared with customers: `name` and `version_id` are
|
|
485
|
+
# omitted, and `blocked_by` reports only `missing_data`.
|
|
486
|
+
# - `CUSTOM` - Yours: every field is returned.
|
|
487
|
+
module Type
|
|
488
|
+
extend PreludeSDK::Internal::Type::Enum
|
|
489
|
+
|
|
490
|
+
TaggedSymbol =
|
|
491
|
+
T.type_alias do
|
|
492
|
+
T.all(
|
|
493
|
+
Symbol,
|
|
494
|
+
PreludeSDK::Models::WatchEvaluateResponse::Recipe::Rule::Type
|
|
495
|
+
)
|
|
496
|
+
end
|
|
497
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
498
|
+
|
|
499
|
+
MANAGED =
|
|
500
|
+
T.let(
|
|
501
|
+
:MANAGED,
|
|
502
|
+
PreludeSDK::Models::WatchEvaluateResponse::Recipe::Rule::Type::TaggedSymbol
|
|
503
|
+
)
|
|
504
|
+
CUSTOM =
|
|
505
|
+
T.let(
|
|
506
|
+
:CUSTOM,
|
|
507
|
+
PreludeSDK::Models::WatchEvaluateResponse::Recipe::Rule::Type::TaggedSymbol
|
|
508
|
+
)
|
|
509
|
+
|
|
510
|
+
sig do
|
|
511
|
+
override.returns(
|
|
512
|
+
T::Array[
|
|
513
|
+
PreludeSDK::Models::WatchEvaluateResponse::Recipe::Rule::Type::TaggedSymbol
|
|
514
|
+
]
|
|
515
|
+
)
|
|
516
|
+
end
|
|
517
|
+
def self.values
|
|
518
|
+
end
|
|
519
|
+
end
|
|
420
520
|
end
|
|
421
521
|
|
|
422
522
|
# This recipe's own verdict. Normally the score against the threshold, unless a
|
|
@@ -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 =
|
|
@@ -4,9 +4,9 @@ module PreludeSDK
|
|
|
4
4
|
module Resources
|
|
5
5
|
# Evaluate email addresses and phone numbers for trustworthiness.
|
|
6
6
|
class Watch
|
|
7
|
-
# **Beta.** The request and response shapes may still change
|
|
8
|
-
#
|
|
9
|
-
#
|
|
7
|
+
# **Beta.** The request and response shapes may still change. Talk to us before
|
|
8
|
+
# you build against it. Flows, recipes and rules are authored through the Watch
|
|
9
|
+
# Management API, or configured by Prelude on your behalf.
|
|
10
10
|
#
|
|
11
11
|
# Score a target against the rules configured for one moment in your product —
|
|
12
12
|
# signup, checkout, password reset. The flow selects which recipes run; each
|
|
@@ -200,33 +200,47 @@ module PreludeSDK
|
|
|
200
200
|
end
|
|
201
201
|
|
|
202
202
|
type block_reason =
|
|
203
|
-
:
|
|
204
|
-
| :
|
|
203
|
+
:automation_signature
|
|
204
|
+
| :carrier_not_permitted
|
|
205
|
+
| :client_fingerprint_mismatch
|
|
206
|
+
| :custom_policy
|
|
207
|
+
| :device_emulator
|
|
208
|
+
| :device_not_permitted
|
|
209
|
+
| :device_reuse
|
|
210
|
+
| :expired_signals
|
|
205
211
|
| :fraud_database
|
|
206
|
-
| :
|
|
212
|
+
| :invalid_signature
|
|
213
|
+
| :ip_concentration
|
|
214
|
+
| :ip_reputation
|
|
215
|
+
| :location_mismatch
|
|
207
216
|
| :missing_signals
|
|
208
|
-
| :
|
|
217
|
+
| :number_range_abuse
|
|
209
218
|
| :poor_conversion_history
|
|
210
|
-
| :
|
|
211
|
-
| :
|
|
212
|
-
| :suspected_request_tampering
|
|
213
|
-
| :suspicious_ip_address
|
|
219
|
+
| :proxy_network
|
|
220
|
+
| :repeated_attempts
|
|
214
221
|
| :temporary_phone_number
|
|
215
222
|
|
|
216
223
|
module BlockReason
|
|
217
224
|
extend PreludeSDK::Internal::Type::Enum
|
|
218
225
|
|
|
219
|
-
|
|
220
|
-
|
|
226
|
+
AUTOMATION_SIGNATURE: :automation_signature
|
|
227
|
+
CARRIER_NOT_PERMITTED: :carrier_not_permitted
|
|
228
|
+
CLIENT_FINGERPRINT_MISMATCH: :client_fingerprint_mismatch
|
|
229
|
+
CUSTOM_POLICY: :custom_policy
|
|
230
|
+
DEVICE_EMULATOR: :device_emulator
|
|
231
|
+
DEVICE_NOT_PERMITTED: :device_not_permitted
|
|
232
|
+
DEVICE_REUSE: :device_reuse
|
|
233
|
+
EXPIRED_SIGNALS: :expired_signals
|
|
221
234
|
FRAUD_DATABASE: :fraud_database
|
|
222
|
-
|
|
235
|
+
INVALID_SIGNATURE: :invalid_signature
|
|
236
|
+
IP_CONCENTRATION: :ip_concentration
|
|
237
|
+
IP_REPUTATION: :ip_reputation
|
|
238
|
+
LOCATION_MISMATCH: :location_mismatch
|
|
223
239
|
MISSING_SIGNALS: :missing_signals
|
|
224
|
-
|
|
240
|
+
NUMBER_RANGE_ABUSE: :number_range_abuse
|
|
225
241
|
POOR_CONVERSION_HISTORY: :poor_conversion_history
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
SUSPECTED_REQUEST_TAMPERING: :suspected_request_tampering
|
|
229
|
-
SUSPICIOUS_IP_ADDRESS: :suspicious_ip_address
|
|
242
|
+
PROXY_NETWORK: :proxy_network
|
|
243
|
+
REPEATED_ATTEMPTS: :repeated_attempts
|
|
230
244
|
TEMPORARY_PHONE_NUMBER: :temporary_phone_number
|
|
231
245
|
|
|
232
246
|
def self?.values: -> ::Array[PreludeSDK::Models::Verification::Phone::HistoryRetrieveResponse::block_reason]
|
|
@@ -159,29 +159,47 @@ module PreludeSDK
|
|
|
159
159
|
end
|
|
160
160
|
|
|
161
161
|
type risk_factor =
|
|
162
|
-
:
|
|
163
|
-
| :
|
|
162
|
+
:automation_signature
|
|
163
|
+
| :carrier_not_permitted
|
|
164
|
+
| :client_fingerprint_mismatch
|
|
165
|
+
| :custom_policy
|
|
166
|
+
| :device_emulator
|
|
167
|
+
| :device_not_permitted
|
|
168
|
+
| :device_reuse
|
|
169
|
+
| :expired_signals
|
|
164
170
|
| :fraud_database
|
|
165
|
-
| :
|
|
166
|
-
| :
|
|
171
|
+
| :invalid_signature
|
|
172
|
+
| :ip_concentration
|
|
173
|
+
| :ip_reputation
|
|
174
|
+
| :location_mismatch
|
|
175
|
+
| :missing_signals
|
|
176
|
+
| :number_range_abuse
|
|
167
177
|
| :poor_conversion_history
|
|
168
|
-
| :
|
|
169
|
-
| :
|
|
170
|
-
| :suspicious_ip_address
|
|
178
|
+
| :proxy_network
|
|
179
|
+
| :repeated_attempts
|
|
171
180
|
| :temporary_phone_number
|
|
172
181
|
|
|
173
182
|
module RiskFactor
|
|
174
183
|
extend PreludeSDK::Internal::Type::Enum
|
|
175
184
|
|
|
176
|
-
|
|
177
|
-
|
|
185
|
+
AUTOMATION_SIGNATURE: :automation_signature
|
|
186
|
+
CARRIER_NOT_PERMITTED: :carrier_not_permitted
|
|
187
|
+
CLIENT_FINGERPRINT_MISMATCH: :client_fingerprint_mismatch
|
|
188
|
+
CUSTOM_POLICY: :custom_policy
|
|
189
|
+
DEVICE_EMULATOR: :device_emulator
|
|
190
|
+
DEVICE_NOT_PERMITTED: :device_not_permitted
|
|
191
|
+
DEVICE_REUSE: :device_reuse
|
|
192
|
+
EXPIRED_SIGNALS: :expired_signals
|
|
178
193
|
FRAUD_DATABASE: :fraud_database
|
|
179
|
-
|
|
180
|
-
|
|
194
|
+
INVALID_SIGNATURE: :invalid_signature
|
|
195
|
+
IP_CONCENTRATION: :ip_concentration
|
|
196
|
+
IP_REPUTATION: :ip_reputation
|
|
197
|
+
LOCATION_MISMATCH: :location_mismatch
|
|
198
|
+
MISSING_SIGNALS: :missing_signals
|
|
199
|
+
NUMBER_RANGE_ABUSE: :number_range_abuse
|
|
181
200
|
POOR_CONVERSION_HISTORY: :poor_conversion_history
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
SUSPICIOUS_IP_ADDRESS: :suspicious_ip_address
|
|
201
|
+
PROXY_NETWORK: :proxy_network
|
|
202
|
+
REPEATED_ATTEMPTS: :repeated_attempts
|
|
185
203
|
TEMPORARY_PHONE_NUMBER: :temporary_phone_number
|
|
186
204
|
|
|
187
205
|
def self?.values: -> ::Array[PreludeSDK::Models::VerificationCreateResponse::risk_factor]
|
|
@@ -95,10 +95,12 @@ module PreludeSDK
|
|
|
95
95
|
{
|
|
96
96
|
outcome: PreludeSDK::Models::WatchEvaluateResponse::Recipe::Rule::outcome,
|
|
97
97
|
rule_id: String,
|
|
98
|
+
type: PreludeSDK::Models::WatchEvaluateResponse::Recipe::Rule::type_,
|
|
98
99
|
weight: Integer,
|
|
99
100
|
blocked_by: String,
|
|
100
101
|
name: String,
|
|
101
|
-
unavailable: bool
|
|
102
|
+
unavailable: bool,
|
|
103
|
+
version_id: String
|
|
102
104
|
}
|
|
103
105
|
|
|
104
106
|
class Rule < PreludeSDK::Internal::Type::BaseModel
|
|
@@ -106,6 +108,8 @@ module PreludeSDK
|
|
|
106
108
|
|
|
107
109
|
attr_accessor rule_id: String
|
|
108
110
|
|
|
111
|
+
attr_accessor type: PreludeSDK::Models::WatchEvaluateResponse::Recipe::Rule::type_
|
|
112
|
+
|
|
109
113
|
attr_accessor weight: Integer
|
|
110
114
|
|
|
111
115
|
attr_reader blocked_by: String?
|
|
@@ -120,25 +124,33 @@ module PreludeSDK
|
|
|
120
124
|
|
|
121
125
|
def unavailable=: (bool) -> bool
|
|
122
126
|
|
|
127
|
+
attr_reader version_id: String?
|
|
128
|
+
|
|
129
|
+
def version_id=: (String) -> String
|
|
130
|
+
|
|
123
131
|
def initialize: (
|
|
124
132
|
outcome: PreludeSDK::Models::WatchEvaluateResponse::Recipe::Rule::outcome,
|
|
125
133
|
rule_id: String,
|
|
134
|
+
type: PreludeSDK::Models::WatchEvaluateResponse::Recipe::Rule::type_,
|
|
126
135
|
weight: Integer,
|
|
127
136
|
?blocked_by: String,
|
|
128
137
|
?name: String,
|
|
129
|
-
?unavailable: bool
|
|
138
|
+
?unavailable: bool,
|
|
139
|
+
?version_id: String
|
|
130
140
|
) -> void
|
|
131
141
|
|
|
132
142
|
def to_hash: -> {
|
|
133
143
|
outcome: PreludeSDK::Models::WatchEvaluateResponse::Recipe::Rule::outcome,
|
|
134
144
|
rule_id: String,
|
|
145
|
+
type: PreludeSDK::Models::WatchEvaluateResponse::Recipe::Rule::type_,
|
|
135
146
|
weight: Integer,
|
|
136
147
|
blocked_by: String,
|
|
137
148
|
name: String,
|
|
138
|
-
unavailable: bool
|
|
149
|
+
unavailable: bool,
|
|
150
|
+
version_id: String
|
|
139
151
|
}
|
|
140
152
|
|
|
141
|
-
type outcome = :TRIGGERED | :NOT_TRIGGERED | :NOT_EVALUATED
|
|
153
|
+
type outcome = :TRIGGERED | :NOT_TRIGGERED | :NOT_EVALUATED | :SKIPPED
|
|
142
154
|
|
|
143
155
|
module Outcome
|
|
144
156
|
extend PreludeSDK::Internal::Type::Enum
|
|
@@ -146,9 +158,21 @@ module PreludeSDK
|
|
|
146
158
|
TRIGGERED: :TRIGGERED
|
|
147
159
|
NOT_TRIGGERED: :NOT_TRIGGERED
|
|
148
160
|
NOT_EVALUATED: :NOT_EVALUATED
|
|
161
|
+
SKIPPED: :SKIPPED
|
|
149
162
|
|
|
150
163
|
def self?.values: -> ::Array[PreludeSDK::Models::WatchEvaluateResponse::Recipe::Rule::outcome]
|
|
151
164
|
end
|
|
165
|
+
|
|
166
|
+
type type_ = :MANAGED | :CUSTOM
|
|
167
|
+
|
|
168
|
+
module Type
|
|
169
|
+
extend PreludeSDK::Internal::Type::Enum
|
|
170
|
+
|
|
171
|
+
MANAGED: :MANAGED
|
|
172
|
+
CUSTOM: :CUSTOM
|
|
173
|
+
|
|
174
|
+
def self?.values: -> ::Array[PreludeSDK::Models::WatchEvaluateResponse::Recipe::Rule::type_]
|
|
175
|
+
end
|
|
152
176
|
end
|
|
153
177
|
|
|
154
178
|
type verdict = :PASS | :FLAG
|