diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 6538ca91..6d78745c 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.8.0" + ".": "0.9.0" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index cce5f555..73ca5fad 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 27 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/prelude/prelude-33b70f86404b99046db5c61d3142b149dd7dec7eefe5e62ff3b397c7274aa5dc.yml -openapi_spec_hash: fb72aba38ec55a3b6b5162c9f5b4228d +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/prelude/prelude-fdbaf5386743020c305990b67afae97f62c69478baafc39c3efbd296cb62770c.yml +openapi_spec_hash: 14d5b04b5dfa004a9cb0b1317e928abe config_hash: 707d65d2f456a2b5ba5b2c565b60128a diff --git a/CHANGELOG.md b/CHANGELOG.md index d87320bf..d00959a8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.9.0 (2026-09-18) + +Full Changelog: [v0.8.0...v0.9.0](https://github.com/prelude-so/ruby-sdk/compare/v0.8.0...v0.9.0) + +### Features + +* **api:** api update ([f86194b](https://github.com/prelude-so/ruby-sdk/commit/f86194b0bea9b4034842e7d6e08089a9c90da2e9)) + ## 0.8.0 (2026-09-18) Full Changelog: [v0.7.0...v0.8.0](https://github.com/prelude-so/ruby-sdk/compare/v0.7.0...v0.8.0) diff --git a/Gemfile.lock b/Gemfile.lock index 90b631f8..4680ca40 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -11,7 +11,7 @@ GIT PATH remote: . specs: - prelude-sdk (0.8.0) + prelude-sdk (0.9.0) cgi connection_pool diff --git a/README.md b/README.md index c2c36cda..6dbdf1d8 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ To use this gem, install via Bundler by adding the following to your application ```ruby -gem "prelude-sdk", "~> 0.8.0" +gem "prelude-sdk", "~> 0.9.0" ``` diff --git a/lib/prelude_sdk/models/verification/phone/history_list_response.rb b/lib/prelude_sdk/models/verification/phone/history_list_response.rb index 548eebb3..addf2483 100644 --- a/lib/prelude_sdk/models/verification/phone/history_list_response.rb +++ b/lib/prelude_sdk/models/verification/phone/history_list_response.rb @@ -75,8 +75,8 @@ class Verification < PreludeSDK::Internal::Type::BaseModel # - `invalid_line` - The phone number is not a valid line type. # - `invalid_number` - The phone number is not a valid number. # - `rate_limited` - The verification was refused by a rate limit. - # - `expired_signals` - The SDK signals were collected too long before the - # request. + # - `expired_signals` - The SDK signals were collected too long before the request + # to still attest to it. # - `shadowed` - The anti-fraud system flagged the verification without blocking # it. # @@ -209,8 +209,8 @@ module Channel # - `invalid_line` - The phone number is not a valid line type. # - `invalid_number` - The phone number is not a valid number. # - `rate_limited` - The verification was refused by a rate limit. - # - `expired_signals` - The SDK signals were collected too long before the - # request. + # - `expired_signals` - The SDK signals were collected too long before the request + # to still attest to it. # - `shadowed` - The anti-fraud system flagged the verification without blocking # it. # diff --git a/lib/prelude_sdk/models/verification/phone/history_retrieve_response.rb b/lib/prelude_sdk/models/verification/phone/history_retrieve_response.rb index 1f38b130..a1ed359e 100644 --- a/lib/prelude_sdk/models/verification/phone/history_retrieve_response.rb +++ b/lib/prelude_sdk/models/verification/phone/history_retrieve_response.rb @@ -43,8 +43,8 @@ class HistoryRetrieveResponse < PreludeSDK::Internal::Type::BaseModel # - `invalid_line` - The phone number is not a valid line type. # - `invalid_number` - The phone number is not a valid number. # - `rate_limited` - The verification was refused by a rate limit. - # - `expired_signals` - The SDK signals were collected too long before the - # request. + # - `expired_signals` - The SDK signals were collected too long before the request + # to still attest to it. # - `shadowed` - The anti-fraud system flagged the verification without blocking # it. # @@ -58,31 +58,44 @@ class HistoryRetrieveResponse < PreludeSDK::Internal::Type::BaseModel optional :app_version, String # @!attribute block_reasons - # Why the anti-fraud system blocked the verification. Empty unless it did. - # - # - `behavioral_pattern` - The phone number past behavior during verification - # flows exhibits suspicious patterns. - # - `device_attribute` - The end-user device reported attributes associated with - # fraud or emulation. - # - `fraud_database` - The phone number appears in a fraud database. - # - `location_discrepancy` - The phone number region and the observed location - # disagree. + # Why the anti-fraud system blocked the verification. Empty unless it did. These + # are the same labels the Verify and Watch APIs serve as `risk_factors`. + # + # - `automation_signature` - The request appears to come from an automated client + # rather than a person. + # - `carrier_not_permitted` - The destination carrier is one this account does not + # accept traffic for. + # - `client_fingerprint_mismatch` - The client does not appear to be the platform + # it identifies itself as. + # - `custom_policy` - A rule configured for your account matched this request. + # - `device_emulator` - The request appears to come from an emulator rather than a + # physical device. + # - `device_not_permitted` - The device platform is one your account blocks. + # - `device_reuse` - One device is driving verifications for an unusual number of + # phone numbers. + # - `expired_signals` - The SDK signals were collected too long before the request + # to still attest to it. + # - `fraud_database` - The phone number is flagged in one or more of the fraud + # databases Prelude consults. + # - `invalid_signature` - The SDK signature did not verify, so the request cannot + # be attributed to the device it claims to come from. + # - `ip_concentration` - The request shares its origin with an unusual volume of + # other verifications. + # - `ip_reputation` - The originating IP address is not trusted. + # - `location_mismatch` - The network location and the phone number's country are + # inconsistent. # - `missing_signals` - The verification expected Prelude SDK signals and none # arrived. - # - `network_fingerprint` - The network fingerprint matches known fraudulent - # traffic. - # - `poor_conversion_history` - The phone number rarely completes the - # verifications it starts. - # - `prefix_concentration` - The phone number is part of a range known to be - # associated with suspicious activity patterns. - # - `repeated_number` - The phone number was used far more often than normal - # traffic would explain. - # - `suspected_request_tampering` - The SDK signals were altered or expired - # between collection and use. - # - `suspicious_ip_address` - The originating IP address is associated with - # suspicious activity. - # - `temporary_phone_number` - The phone number is known to be a temporary or - # disposable number. + # - `number_range_abuse` - The phone number belongs to a range currently + # associated with abuse. + # - `poor_conversion_history` - Traffic resembling this request rarely completes a + # verification. + # - `proxy_network` - The request did not arrive over the subscriber's own access + # network. + # - `repeated_attempts` - The phone number exceeded the allowed number of + # verification attempts in a short period. + # - `temporary_phone_number` - The phone number belongs to a disposable or + # short-lived numbering service. # # @return [Array, nil] optional :block_reasons, @@ -198,7 +211,7 @@ class HistoryRetrieveResponse < PreludeSDK::Internal::Type::BaseModel # # @param app_version [String] Version of your application, when known. # - # @param block_reasons [Array] Why the anti-fraud system blocked the verification. Empty unless it did. + # @param block_reasons [Array] Why the anti-fraud system blocked the verification. Empty unless it did. These a # # @param carrier [PreludeSDK::Models::Verification::Phone::PhoneVerificationCarrier] The end user's mobile network. # @@ -242,8 +255,8 @@ class HistoryRetrieveResponse < PreludeSDK::Internal::Type::BaseModel # - `invalid_line` - The phone number is not a valid line type. # - `invalid_number` - The phone number is not a valid number. # - `rate_limited` - The verification was refused by a rate limit. - # - `expired_signals` - The SDK signals were collected too long before the - # request. + # - `expired_signals` - The SDK signals were collected too long before the request + # to still attest to it. # - `shadowed` - The anti-fraud system flagged the verification without blocking # it. # @@ -271,17 +284,24 @@ module Status module BlockReason extend PreludeSDK::Internal::Type::Enum - BEHAVIORAL_PATTERN = :behavioral_pattern - DEVICE_ATTRIBUTE = :device_attribute + AUTOMATION_SIGNATURE = :automation_signature + CARRIER_NOT_PERMITTED = :carrier_not_permitted + CLIENT_FINGERPRINT_MISMATCH = :client_fingerprint_mismatch + CUSTOM_POLICY = :custom_policy + DEVICE_EMULATOR = :device_emulator + DEVICE_NOT_PERMITTED = :device_not_permitted + DEVICE_REUSE = :device_reuse + EXPIRED_SIGNALS = :expired_signals FRAUD_DATABASE = :fraud_database - LOCATION_DISCREPANCY = :location_discrepancy + INVALID_SIGNATURE = :invalid_signature + IP_CONCENTRATION = :ip_concentration + IP_REPUTATION = :ip_reputation + LOCATION_MISMATCH = :location_mismatch MISSING_SIGNALS = :missing_signals - NETWORK_FINGERPRINT = :network_fingerprint + NUMBER_RANGE_ABUSE = :number_range_abuse POOR_CONVERSION_HISTORY = :poor_conversion_history - PREFIX_CONCENTRATION = :prefix_concentration - REPEATED_NUMBER = :repeated_number - SUSPECTED_REQUEST_TAMPERING = :suspected_request_tampering - SUSPICIOUS_IP_ADDRESS = :suspicious_ip_address + PROXY_NETWORK = :proxy_network + REPEATED_ATTEMPTS = :repeated_attempts TEMPORARY_PHONE_NUMBER = :temporary_phone_number # @!method self.values diff --git a/lib/prelude_sdk/models/verification_create_response.rb b/lib/prelude_sdk/models/verification_create_response.rb index 180a3d17..9926bd38 100644 --- a/lib/prelude_sdk/models/verification_create_response.rb +++ b/lib/prelude_sdk/models/verification_create_response.rb @@ -58,9 +58,10 @@ class VerificationCreateResponse < PreludeSDK::Internal::Type::BaseModel # landline). # - `invalid_phone_number` - The phone number is not a valid phone number (e.g. # unallocated range). - # - `invalid_signature` - The signature of the SDK signals is invalid. - # - `repeated_attempts` - The phone number has made too many verification - # attempts. + # - `invalid_signature` - The SDK signature did not verify, so the request cannot + # be attributed to the device it claims to come from. + # - `repeated_attempts` - The phone number exceeded the allowed number of + # verification attempts in a short period. # - `suspicious` - The verification attempt was deemed suspicious by the # anti-fraud system. # @@ -77,26 +78,41 @@ class VerificationCreateResponse < PreludeSDK::Internal::Type::BaseModel # present when status is "blocked" or "shadow_blocked" and the anti-fraud system # detected specific risk signals. # - # - `behavioral_pattern` - The phone number past behavior during verification - # flows exhibits suspicious patterns. - # - `device_attribute` - The device exhibits characteristics associated with - # suspicious activity patterns. - # - `fraud_database` - The phone number has been flagged as suspicious in one or - # more of our fraud databases. - # - `location_discrepancy` - The phone number prefix and IP address discrepancy - # indicates potential fraud. - # - `network_fingerprint` - The network connection exhibits characteristics - # associated with suspicious activity patterns. - # - `poor_conversion_history` - The phone number has a history of poorly - # converting to a verified phone number. - # - `prefix_concentration` - The phone number is part of a range known to be - # associated with suspicious activity patterns. - # - `suspected_request_tampering` - The SDK signature is invalid and the request - # is considered to be tampered with. - # - `suspicious_ip_address` - The IP address is deemed to be associated with - # suspicious activity patterns. - # - `temporary_phone_number` - The phone number is known to be a temporary or - # disposable number. + # - `automation_signature` - The request appears to come from an automated client + # rather than a person. + # - `carrier_not_permitted` - The destination carrier is one this account does not + # accept traffic for. + # - `client_fingerprint_mismatch` - The client does not appear to be the platform + # it identifies itself as. + # - `custom_policy` - A rule configured for your account matched this request. + # - `device_emulator` - The request appears to come from an emulator rather than a + # physical device. + # - `device_not_permitted` - The device platform is one your account blocks. + # - `device_reuse` - One device is driving verifications for an unusual number of + # phone numbers. + # - `expired_signals` - The SDK signals were collected too long before the request + # to still attest to it. + # - `fraud_database` - The phone number is flagged in one or more of the fraud + # databases Prelude consults. + # - `invalid_signature` - The SDK signature did not verify, so the request cannot + # be attributed to the device it claims to come from. + # - `ip_concentration` - The request shares its origin with an unusual volume of + # other verifications. + # - `ip_reputation` - The originating IP address is not trusted. + # - `location_mismatch` - The network location and the phone number's country are + # inconsistent. + # - `missing_signals` - The verification expected Prelude SDK signals and none + # arrived. + # - `number_range_abuse` - The phone number belongs to a range currently + # associated with abuse. + # - `poor_conversion_history` - Traffic resembling this request rarely completes a + # verification. + # - `proxy_network` - The request did not arrive over the subscriber's own access + # network. + # - `repeated_attempts` - The phone number exceeded the allowed number of + # verification attempts in a short period. + # - `temporary_phone_number` - The phone number belongs to a disposable or + # short-lived numbering service. # # @return [Array, nil] optional :risk_factors, @@ -215,9 +231,10 @@ class Metadata < PreludeSDK::Internal::Type::BaseModel # landline). # - `invalid_phone_number` - The phone number is not a valid phone number (e.g. # unallocated range). - # - `invalid_signature` - The signature of the SDK signals is invalid. - # - `repeated_attempts` - The phone number has made too many verification - # attempts. + # - `invalid_signature` - The SDK signature did not verify, so the request cannot + # be attributed to the device it claims to come from. + # - `repeated_attempts` - The phone number exceeded the allowed number of + # verification attempts in a short period. # - `suspicious` - The verification attempt was deemed suspicious by the # anti-fraud system. # @@ -240,15 +257,24 @@ module Reason module RiskFactor extend PreludeSDK::Internal::Type::Enum - BEHAVIORAL_PATTERN = :behavioral_pattern - DEVICE_ATTRIBUTE = :device_attribute + AUTOMATION_SIGNATURE = :automation_signature + CARRIER_NOT_PERMITTED = :carrier_not_permitted + CLIENT_FINGERPRINT_MISMATCH = :client_fingerprint_mismatch + CUSTOM_POLICY = :custom_policy + DEVICE_EMULATOR = :device_emulator + DEVICE_NOT_PERMITTED = :device_not_permitted + DEVICE_REUSE = :device_reuse + EXPIRED_SIGNALS = :expired_signals FRAUD_DATABASE = :fraud_database - LOCATION_DISCREPANCY = :location_discrepancy - NETWORK_FINGERPRINT = :network_fingerprint + INVALID_SIGNATURE = :invalid_signature + IP_CONCENTRATION = :ip_concentration + IP_REPUTATION = :ip_reputation + LOCATION_MISMATCH = :location_mismatch + MISSING_SIGNALS = :missing_signals + NUMBER_RANGE_ABUSE = :number_range_abuse POOR_CONVERSION_HISTORY = :poor_conversion_history - PREFIX_CONCENTRATION = :prefix_concentration - SUSPECTED_REQUEST_TAMPERING = :suspected_request_tampering - SUSPICIOUS_IP_ADDRESS = :suspicious_ip_address + PROXY_NETWORK = :proxy_network + REPEATED_ATTEMPTS = :repeated_attempts TEMPORARY_PHONE_NUMBER = :temporary_phone_number # @!method self.values diff --git a/lib/prelude_sdk/models/watch_evaluate_response.rb b/lib/prelude_sdk/models/watch_evaluate_response.rb index 92064adb..240f4afc 100644 --- a/lib/prelude_sdk/models/watch_evaluate_response.rb +++ b/lib/prelude_sdk/models/watch_evaluate_response.rb @@ -88,7 +88,9 @@ class Recipe < PreludeSDK::Internal::Type::BaseModel # @!attribute rules # One result per rule in the recipe, in membership order. Every rule runs — a # score is only meaningful when complete, so there is no short-circuit on the - # first trigger. + # first trigger. The exception is a recipe whose verdict a preempting rule has + # already determined, where a rule that could no longer change it may report + # `SKIPPED` instead. # # @return [Array] required :rules, @@ -149,6 +151,10 @@ class Rule < PreludeSDK::Internal::Type::BaseModel # - `NOT_EVALUATED` - The rule could not run, because something it reads never # arrived. This is not a quieter `NOT_TRIGGERED`: it contributed nothing either # way, and it is why `partial_evidence` is set on the recipe. + # - `SKIPPED` - The rule was not run, because another rule had already determined + # the recipe's verdict — see `determined_by`. Nothing was missing and nothing + # failed, so `partial_evidence` is not set: `determined_by` is what accounts for + # the recipe's score resting on fewer rules. # # @return [Symbol, PreludeSDK::Models::WatchEvaluateResponse::Recipe::Rule::Outcome] required :outcome, enum: -> { PreludeSDK::Models::WatchEvaluateResponse::Recipe::Rule::Outcome } @@ -161,6 +167,17 @@ class Rule < PreludeSDK::Internal::Type::BaseModel # @return [String] required :rule_id, String + # @!attribute type + # Who authored the rule, which is what says how much of the rest of this result + # you get. + # + # - `MANAGED` - Prelude-owned, shared with customers: `name` and `version_id` are + # omitted, and `blocked_by` reports only `missing_data`. + # - `CUSTOM` - Yours: every field is returned. + # + # @return [Symbol, PreludeSDK::Models::WatchEvaluateResponse::Recipe::Rule::Type] + required :type, enum: -> { PreludeSDK::Models::WatchEvaluateResponse::Recipe::Rule::Type } + # @!attribute weight # What this rule contributes to the recipe's score when it triggers. # @@ -193,7 +210,15 @@ class Rule < PreludeSDK::Internal::Type::BaseModel # @return [Boolean, nil] optional :unavailable, PreludeSDK::Internal::Type::Boolean - # @!method initialize(outcome:, rule_id:, weight:, blocked_by: nil, name: nil, unavailable: nil) + # @!attribute version_id + # The version of the rule that scored — the one this recipe is pinned to, or the + # version current at evaluation time when it is not pinned. Present for a rule you + # authored, and omitted for a Prelude-managed one. + # + # @return [String, nil] + optional :version_id, String + + # @!method initialize(outcome:, rule_id:, type:, weight:, blocked_by: nil, name: nil, unavailable: nil, version_id: nil) # Some parameter documentations has been truncated, see # {PreludeSDK::Models::WatchEvaluateResponse::Recipe::Rule} for more details. # @@ -201,6 +226,8 @@ class Rule < PreludeSDK::Internal::Type::BaseModel # # @param rule_id [String] The rule that produced this result. Present whatever the rule's visibility, so a # + # @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 + # # @param weight [Integer] What this rule contributes to the recipe's score when it triggers. # # @param blocked_by [String] Why the rule could not run, set only when `outcome` is `NOT_EVALUATED`. @@ -208,6 +235,8 @@ class Rule < PreludeSDK::Internal::Type::BaseModel # @param name [String] The rule's name, present for a rule you authored and omitted for a Prelude-manag # # @param unavailable [Boolean] The rule could not run for a reason on our side rather than anything about your + # + # @param version_id [String] The version of the rule that scored — the one this recipe is pinned to, or the v # What the rule concluded. # @@ -216,6 +245,10 @@ class Rule < PreludeSDK::Internal::Type::BaseModel # - `NOT_EVALUATED` - The rule could not run, because something it reads never # arrived. This is not a quieter `NOT_TRIGGERED`: it contributed nothing either # way, and it is why `partial_evidence` is set on the recipe. + # - `SKIPPED` - The rule was not run, because another rule had already determined + # the recipe's verdict — see `determined_by`. Nothing was missing and nothing + # failed, so `partial_evidence` is not set: `determined_by` is what accounts for + # the recipe's score resting on fewer rules. # # @see PreludeSDK::Models::WatchEvaluateResponse::Recipe::Rule#outcome module Outcome @@ -224,6 +257,25 @@ module Outcome TRIGGERED = :TRIGGERED NOT_TRIGGERED = :NOT_TRIGGERED NOT_EVALUATED = :NOT_EVALUATED + SKIPPED = :SKIPPED + + # @!method self.values + # @return [Array] + end + + # Who authored the rule, which is what says how much of the rest of this result + # you get. + # + # - `MANAGED` - Prelude-owned, shared with customers: `name` and `version_id` are + # omitted, and `blocked_by` reports only `missing_data`. + # - `CUSTOM` - Yours: every field is returned. + # + # @see PreludeSDK::Models::WatchEvaluateResponse::Recipe::Rule#type + module Type + extend PreludeSDK::Internal::Type::Enum + + MANAGED = :MANAGED + CUSTOM = :CUSTOM # @!method self.values # @return [Array] diff --git a/lib/prelude_sdk/models/watch_predict_response.rb b/lib/prelude_sdk/models/watch_predict_response.rb index 8897b971..a2a802b9 100644 --- a/lib/prelude_sdk/models/watch_predict_response.rb +++ b/lib/prelude_sdk/models/watch_predict_response.rb @@ -28,29 +28,43 @@ class WatchPredictResponse < PreludeSDK::Internal::Type::BaseModel # when prediction is "suspicious" and the anti-fraud system detected specific risk # signals. # - # - `account_risk_profile` - The target matches a risk profile derived from the - # outcomes reported on your own account, rather than from a signal shared across - # accounts. - # - `behavioral_pattern` - The phone number past behavior during verification - # flows exhibits suspicious patterns. - # - `device_attribute` - The device exhibits characteristics associated with - # suspicious activity patterns. - # - `fraud_database` - The phone number has been flagged as suspicious in one or - # more of our fraud databases. - # - `location_discrepancy` - The phone number prefix and IP address discrepancy - # indicates potential fraud. - # - `network_fingerprint` - The network connection exhibits characteristics - # associated with suspicious activity patterns. - # - `poor_conversion_history` - The phone number has a history of poorly - # converting to a verified phone number. - # - `prefix_concentration` - The phone number is part of a range known to be - # associated with suspicious activity patterns. - # - `suspected_request_tampering` - The SDK signature is invalid and the request - # is considered to be tampered with. - # - `suspicious_ip_address` - The IP address is deemed to be associated with - # suspicious activity patterns. - # - `temporary_phone_number` - The phone number is known to be a temporary or - # disposable number. + # - `account_risk_profile` - The request matches a risk profile derived from the + # outcomes reported on your own account. + # - `automation_signature` - The request appears to come from an automated client + # rather than a person. + # - `carrier_not_permitted` - The destination carrier is one this account does not + # accept traffic for. + # - `client_fingerprint_mismatch` - The client does not appear to be the platform + # it identifies itself as. + # - `custom_policy` - A rule configured for your account matched this request. + # - `device_emulator` - The request appears to come from an emulator rather than a + # physical device. + # - `device_not_permitted` - The device platform is one your account blocks. + # - `device_reuse` - One device is driving verifications for an unusual number of + # phone numbers. + # - `expired_signals` - The SDK signals were collected too long before the request + # to still attest to it. + # - `fraud_database` - The phone number is flagged in one or more of the fraud + # databases Prelude consults. + # - `invalid_signature` - The SDK signature did not verify, so the request cannot + # be attributed to the device it claims to come from. + # - `ip_concentration` - The request shares its origin with an unusual volume of + # other verifications. + # - `ip_reputation` - The originating IP address is not trusted. + # - `location_mismatch` - The network location and the phone number's country are + # inconsistent. + # - `missing_signals` - The verification expected Prelude SDK signals and none + # arrived. + # - `number_range_abuse` - The phone number belongs to a range currently + # associated with abuse. + # - `poor_conversion_history` - Traffic resembling this request rarely completes a + # verification. + # - `proxy_network` - The request did not arrive over the subscriber's own access + # network. + # - `repeated_attempts` - The phone number exceeded the allowed number of + # verification attempts in a short period. + # - `temporary_phone_number` - The phone number belongs to a disposable or + # short-lived numbering service. # # @return [Array, nil] optional :risk_factors, @@ -85,15 +99,24 @@ module RiskFactor extend PreludeSDK::Internal::Type::Enum ACCOUNT_RISK_PROFILE = :account_risk_profile - BEHAVIORAL_PATTERN = :behavioral_pattern - DEVICE_ATTRIBUTE = :device_attribute + AUTOMATION_SIGNATURE = :automation_signature + CARRIER_NOT_PERMITTED = :carrier_not_permitted + CLIENT_FINGERPRINT_MISMATCH = :client_fingerprint_mismatch + CUSTOM_POLICY = :custom_policy + DEVICE_EMULATOR = :device_emulator + DEVICE_NOT_PERMITTED = :device_not_permitted + DEVICE_REUSE = :device_reuse + EXPIRED_SIGNALS = :expired_signals FRAUD_DATABASE = :fraud_database - LOCATION_DISCREPANCY = :location_discrepancy - NETWORK_FINGERPRINT = :network_fingerprint + INVALID_SIGNATURE = :invalid_signature + IP_CONCENTRATION = :ip_concentration + IP_REPUTATION = :ip_reputation + LOCATION_MISMATCH = :location_mismatch + MISSING_SIGNALS = :missing_signals + NUMBER_RANGE_ABUSE = :number_range_abuse POOR_CONVERSION_HISTORY = :poor_conversion_history - PREFIX_CONCENTRATION = :prefix_concentration - SUSPECTED_REQUEST_TAMPERING = :suspected_request_tampering - SUSPICIOUS_IP_ADDRESS = :suspicious_ip_address + PROXY_NETWORK = :proxy_network + REPEATED_ATTEMPTS = :repeated_attempts TEMPORARY_PHONE_NUMBER = :temporary_phone_number # @!method self.values diff --git a/lib/prelude_sdk/resources/watch.rb b/lib/prelude_sdk/resources/watch.rb index a0906f64..ec188132 100644 --- a/lib/prelude_sdk/resources/watch.rb +++ b/lib/prelude_sdk/resources/watch.rb @@ -7,9 +7,9 @@ class Watch # Some parameter documentations has been truncated, see # {PreludeSDK::Models::WatchEvaluateParams} for more details. # - # **Beta.** The request and response shapes may still change, and flows and - # recipes are configured by Prelude on your behalf for now. Talk to us before you - # build against it. + # **Beta.** The request and response shapes may still change. Talk to us before + # you build against it. Flows, recipes and rules are authored through the Watch + # Management API, or configured by Prelude on your behalf. # # Score a target against the rules configured for one moment in your product — # signup, checkout, password reset. The flow selects which recipes run; each diff --git a/lib/prelude_sdk/version.rb b/lib/prelude_sdk/version.rb index 19a3a6ef..0bf0411f 100644 --- a/lib/prelude_sdk/version.rb +++ b/lib/prelude_sdk/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module PreludeSDK - VERSION = "0.8.0" + VERSION = "0.9.0" end diff --git a/rbi/prelude_sdk/models/verification/phone/history_list_response.rbi b/rbi/prelude_sdk/models/verification/phone/history_list_response.rbi index f596b8b6..300e9dc5 100644 --- a/rbi/prelude_sdk/models/verification/phone/history_list_response.rbi +++ b/rbi/prelude_sdk/models/verification/phone/history_list_response.rbi @@ -112,8 +112,8 @@ module PreludeSDK # - `invalid_line` - The phone number is not a valid line type. # - `invalid_number` - The phone number is not a valid number. # - `rate_limited` - The verification was refused by a rate limit. - # - `expired_signals` - The SDK signals were collected too long before the - # request. + # - `expired_signals` - The SDK signals were collected too long before the request + # to still attest to it. # - `shadowed` - The anti-fraud system flagged the verification without blocking # it. sig do @@ -264,8 +264,8 @@ module PreludeSDK # - `invalid_line` - The phone number is not a valid line type. # - `invalid_number` - The phone number is not a valid number. # - `rate_limited` - The verification was refused by a rate limit. - # - `expired_signals` - The SDK signals were collected too long before the - # request. + # - `expired_signals` - The SDK signals were collected too long before the request + # to still attest to it. # - `shadowed` - The anti-fraud system flagged the verification without blocking # it. status:, @@ -440,8 +440,8 @@ module PreludeSDK # - `invalid_line` - The phone number is not a valid line type. # - `invalid_number` - The phone number is not a valid number. # - `rate_limited` - The verification was refused by a rate limit. - # - `expired_signals` - The SDK signals were collected too long before the - # request. + # - `expired_signals` - The SDK signals were collected too long before the request + # to still attest to it. # - `shadowed` - The anti-fraud system flagged the verification without blocking # it. module Status diff --git a/rbi/prelude_sdk/models/verification/phone/history_retrieve_response.rbi b/rbi/prelude_sdk/models/verification/phone/history_retrieve_response.rbi index 20d1b1f3..1cc28b7d 100644 --- a/rbi/prelude_sdk/models/verification/phone/history_retrieve_response.rbi +++ b/rbi/prelude_sdk/models/verification/phone/history_retrieve_response.rbi @@ -41,8 +41,8 @@ module PreludeSDK # - `invalid_line` - The phone number is not a valid line type. # - `invalid_number` - The phone number is not a valid number. # - `rate_limited` - The verification was refused by a rate limit. - # - `expired_signals` - The SDK signals were collected too long before the - # request. + # - `expired_signals` - The SDK signals were collected too long before the request + # to still attest to it. # - `shadowed` - The anti-fraud system flagged the verification without blocking # it. sig do @@ -59,31 +59,44 @@ module PreludeSDK sig { params(app_version: String).void } attr_writer :app_version - # Why the anti-fraud system blocked the verification. Empty unless it did. + # Why the anti-fraud system blocked the verification. Empty unless it did. These + # are the same labels the Verify and Watch APIs serve as `risk_factors`. # - # - `behavioral_pattern` - The phone number past behavior during verification - # flows exhibits suspicious patterns. - # - `device_attribute` - The end-user device reported attributes associated with - # fraud or emulation. - # - `fraud_database` - The phone number appears in a fraud database. - # - `location_discrepancy` - The phone number region and the observed location - # disagree. + # - `automation_signature` - The request appears to come from an automated client + # rather than a person. + # - `carrier_not_permitted` - The destination carrier is one this account does not + # accept traffic for. + # - `client_fingerprint_mismatch` - The client does not appear to be the platform + # it identifies itself as. + # - `custom_policy` - A rule configured for your account matched this request. + # - `device_emulator` - The request appears to come from an emulator rather than a + # physical device. + # - `device_not_permitted` - The device platform is one your account blocks. + # - `device_reuse` - One device is driving verifications for an unusual number of + # phone numbers. + # - `expired_signals` - The SDK signals were collected too long before the request + # to still attest to it. + # - `fraud_database` - The phone number is flagged in one or more of the fraud + # databases Prelude consults. + # - `invalid_signature` - The SDK signature did not verify, so the request cannot + # be attributed to the device it claims to come from. + # - `ip_concentration` - The request shares its origin with an unusual volume of + # other verifications. + # - `ip_reputation` - The originating IP address is not trusted. + # - `location_mismatch` - The network location and the phone number's country are + # inconsistent. # - `missing_signals` - The verification expected Prelude SDK signals and none # arrived. - # - `network_fingerprint` - The network fingerprint matches known fraudulent - # traffic. - # - `poor_conversion_history` - The phone number rarely completes the - # verifications it starts. - # - `prefix_concentration` - The phone number is part of a range known to be - # associated with suspicious activity patterns. - # - `repeated_number` - The phone number was used far more often than normal - # traffic would explain. - # - `suspected_request_tampering` - The SDK signals were altered or expired - # between collection and use. - # - `suspicious_ip_address` - The originating IP address is associated with - # suspicious activity. - # - `temporary_phone_number` - The phone number is known to be a temporary or - # disposable number. + # - `number_range_abuse` - The phone number belongs to a range currently + # associated with abuse. + # - `poor_conversion_history` - Traffic resembling this request rarely completes a + # verification. + # - `proxy_network` - The request did not arrive over the subscriber's own access + # network. + # - `repeated_attempts` - The phone number exceeded the allowed number of + # verification attempts in a short period. + # - `temporary_phone_number` - The phone number belongs to a disposable or + # short-lived numbering service. sig do returns( T.nilable( @@ -341,38 +354,51 @@ module PreludeSDK # - `invalid_line` - The phone number is not a valid line type. # - `invalid_number` - The phone number is not a valid number. # - `rate_limited` - The verification was refused by a rate limit. - # - `expired_signals` - The SDK signals were collected too long before the - # request. + # - `expired_signals` - The SDK signals were collected too long before the request + # to still attest to it. # - `shadowed` - The anti-fraud system flagged the verification without blocking # it. status:, # Version of your application, when known. app_version: nil, - # Why the anti-fraud system blocked the verification. Empty unless it did. + # Why the anti-fraud system blocked the verification. Empty unless it did. These + # are the same labels the Verify and Watch APIs serve as `risk_factors`. # - # - `behavioral_pattern` - The phone number past behavior during verification - # flows exhibits suspicious patterns. - # - `device_attribute` - The end-user device reported attributes associated with - # fraud or emulation. - # - `fraud_database` - The phone number appears in a fraud database. - # - `location_discrepancy` - The phone number region and the observed location - # disagree. + # - `automation_signature` - The request appears to come from an automated client + # rather than a person. + # - `carrier_not_permitted` - The destination carrier is one this account does not + # accept traffic for. + # - `client_fingerprint_mismatch` - The client does not appear to be the platform + # it identifies itself as. + # - `custom_policy` - A rule configured for your account matched this request. + # - `device_emulator` - The request appears to come from an emulator rather than a + # physical device. + # - `device_not_permitted` - The device platform is one your account blocks. + # - `device_reuse` - One device is driving verifications for an unusual number of + # phone numbers. + # - `expired_signals` - The SDK signals were collected too long before the request + # to still attest to it. + # - `fraud_database` - The phone number is flagged in one or more of the fraud + # databases Prelude consults. + # - `invalid_signature` - The SDK signature did not verify, so the request cannot + # be attributed to the device it claims to come from. + # - `ip_concentration` - The request shares its origin with an unusual volume of + # other verifications. + # - `ip_reputation` - The originating IP address is not trusted. + # - `location_mismatch` - The network location and the phone number's country are + # inconsistent. # - `missing_signals` - The verification expected Prelude SDK signals and none # arrived. - # - `network_fingerprint` - The network fingerprint matches known fraudulent - # traffic. - # - `poor_conversion_history` - The phone number rarely completes the - # verifications it starts. - # - `prefix_concentration` - The phone number is part of a range known to be - # associated with suspicious activity patterns. - # - `repeated_number` - The phone number was used far more often than normal - # traffic would explain. - # - `suspected_request_tampering` - The SDK signals were altered or expired - # between collection and use. - # - `suspicious_ip_address` - The originating IP address is associated with - # suspicious activity. - # - `temporary_phone_number` - The phone number is known to be a temporary or - # disposable number. + # - `number_range_abuse` - The phone number belongs to a range currently + # associated with abuse. + # - `poor_conversion_history` - Traffic resembling this request rarely completes a + # verification. + # - `proxy_network` - The request did not arrive over the subscriber's own access + # network. + # - `repeated_attempts` - The phone number exceeded the allowed number of + # verification attempts in a short period. + # - `temporary_phone_number` - The phone number belongs to a disposable or + # short-lived numbering service. block_reasons: nil, # The end user's mobile network. carrier: nil, @@ -463,8 +489,8 @@ module PreludeSDK # - `invalid_line` - The phone number is not a valid line type. # - `invalid_number` - The phone number is not a valid number. # - `rate_limited` - The verification was refused by a rate limit. - # - `expired_signals` - The SDK signals were collected too long before the - # request. + # - `expired_signals` - The SDK signals were collected too long before the request + # to still attest to it. # - `shadowed` - The anti-fraud system flagged the verification without blocking # it. module Status @@ -563,14 +589,44 @@ module PreludeSDK end OrSymbol = T.type_alias { T.any(Symbol, String) } - BEHAVIORAL_PATTERN = + AUTOMATION_SIGNATURE = T.let( - :behavioral_pattern, + :automation_signature, PreludeSDK::Models::Verification::Phone::HistoryRetrieveResponse::BlockReason::TaggedSymbol ) - DEVICE_ATTRIBUTE = + CARRIER_NOT_PERMITTED = T.let( - :device_attribute, + :carrier_not_permitted, + PreludeSDK::Models::Verification::Phone::HistoryRetrieveResponse::BlockReason::TaggedSymbol + ) + CLIENT_FINGERPRINT_MISMATCH = + T.let( + :client_fingerprint_mismatch, + PreludeSDK::Models::Verification::Phone::HistoryRetrieveResponse::BlockReason::TaggedSymbol + ) + CUSTOM_POLICY = + T.let( + :custom_policy, + PreludeSDK::Models::Verification::Phone::HistoryRetrieveResponse::BlockReason::TaggedSymbol + ) + DEVICE_EMULATOR = + T.let( + :device_emulator, + PreludeSDK::Models::Verification::Phone::HistoryRetrieveResponse::BlockReason::TaggedSymbol + ) + DEVICE_NOT_PERMITTED = + T.let( + :device_not_permitted, + PreludeSDK::Models::Verification::Phone::HistoryRetrieveResponse::BlockReason::TaggedSymbol + ) + DEVICE_REUSE = + T.let( + :device_reuse, + PreludeSDK::Models::Verification::Phone::HistoryRetrieveResponse::BlockReason::TaggedSymbol + ) + EXPIRED_SIGNALS = + T.let( + :expired_signals, PreludeSDK::Models::Verification::Phone::HistoryRetrieveResponse::BlockReason::TaggedSymbol ) FRAUD_DATABASE = @@ -578,44 +634,49 @@ module PreludeSDK :fraud_database, PreludeSDK::Models::Verification::Phone::HistoryRetrieveResponse::BlockReason::TaggedSymbol ) - LOCATION_DISCREPANCY = + INVALID_SIGNATURE = T.let( - :location_discrepancy, + :invalid_signature, PreludeSDK::Models::Verification::Phone::HistoryRetrieveResponse::BlockReason::TaggedSymbol ) - MISSING_SIGNALS = + IP_CONCENTRATION = T.let( - :missing_signals, + :ip_concentration, PreludeSDK::Models::Verification::Phone::HistoryRetrieveResponse::BlockReason::TaggedSymbol ) - NETWORK_FINGERPRINT = + IP_REPUTATION = T.let( - :network_fingerprint, + :ip_reputation, PreludeSDK::Models::Verification::Phone::HistoryRetrieveResponse::BlockReason::TaggedSymbol ) - POOR_CONVERSION_HISTORY = + LOCATION_MISMATCH = T.let( - :poor_conversion_history, + :location_mismatch, PreludeSDK::Models::Verification::Phone::HistoryRetrieveResponse::BlockReason::TaggedSymbol ) - PREFIX_CONCENTRATION = + MISSING_SIGNALS = T.let( - :prefix_concentration, + :missing_signals, PreludeSDK::Models::Verification::Phone::HistoryRetrieveResponse::BlockReason::TaggedSymbol ) - REPEATED_NUMBER = + NUMBER_RANGE_ABUSE = T.let( - :repeated_number, + :number_range_abuse, + PreludeSDK::Models::Verification::Phone::HistoryRetrieveResponse::BlockReason::TaggedSymbol + ) + POOR_CONVERSION_HISTORY = + T.let( + :poor_conversion_history, PreludeSDK::Models::Verification::Phone::HistoryRetrieveResponse::BlockReason::TaggedSymbol ) - SUSPECTED_REQUEST_TAMPERING = + PROXY_NETWORK = T.let( - :suspected_request_tampering, + :proxy_network, PreludeSDK::Models::Verification::Phone::HistoryRetrieveResponse::BlockReason::TaggedSymbol ) - SUSPICIOUS_IP_ADDRESS = + REPEATED_ATTEMPTS = T.let( - :suspicious_ip_address, + :repeated_attempts, PreludeSDK::Models::Verification::Phone::HistoryRetrieveResponse::BlockReason::TaggedSymbol ) TEMPORARY_PHONE_NUMBER = diff --git a/rbi/prelude_sdk/models/verification_create_response.rbi b/rbi/prelude_sdk/models/verification_create_response.rbi index 6361b953..597f0ef6 100644 --- a/rbi/prelude_sdk/models/verification_create_response.rbi +++ b/rbi/prelude_sdk/models/verification_create_response.rbi @@ -89,9 +89,10 @@ module PreludeSDK # landline). # - `invalid_phone_number` - The phone number is not a valid phone number (e.g. # unallocated range). - # - `invalid_signature` - The signature of the SDK signals is invalid. - # - `repeated_attempts` - The phone number has made too many verification - # attempts. + # - `invalid_signature` - The SDK signature did not verify, so the request cannot + # be attributed to the device it claims to come from. + # - `repeated_attempts` - The phone number exceeded the allowed number of + # verification attempts in a short period. # - `suspicious` - The verification attempt was deemed suspicious by the # anti-fraud system. sig do @@ -121,26 +122,41 @@ module PreludeSDK # present when status is "blocked" or "shadow_blocked" and the anti-fraud system # detected specific risk signals. # - # - `behavioral_pattern` - The phone number past behavior during verification - # flows exhibits suspicious patterns. - # - `device_attribute` - The device exhibits characteristics associated with - # suspicious activity patterns. - # - `fraud_database` - The phone number has been flagged as suspicious in one or - # more of our fraud databases. - # - `location_discrepancy` - The phone number prefix and IP address discrepancy - # indicates potential fraud. - # - `network_fingerprint` - The network connection exhibits characteristics - # associated with suspicious activity patterns. - # - `poor_conversion_history` - The phone number has a history of poorly - # converting to a verified phone number. - # - `prefix_concentration` - The phone number is part of a range known to be - # associated with suspicious activity patterns. - # - `suspected_request_tampering` - The SDK signature is invalid and the request - # is considered to be tampered with. - # - `suspicious_ip_address` - The IP address is deemed to be associated with - # suspicious activity patterns. - # - `temporary_phone_number` - The phone number is known to be a temporary or - # disposable number. + # - `automation_signature` - The request appears to come from an automated client + # rather than a person. + # - `carrier_not_permitted` - The destination carrier is one this account does not + # accept traffic for. + # - `client_fingerprint_mismatch` - The client does not appear to be the platform + # it identifies itself as. + # - `custom_policy` - A rule configured for your account matched this request. + # - `device_emulator` - The request appears to come from an emulator rather than a + # physical device. + # - `device_not_permitted` - The device platform is one your account blocks. + # - `device_reuse` - One device is driving verifications for an unusual number of + # phone numbers. + # - `expired_signals` - The SDK signals were collected too long before the request + # to still attest to it. + # - `fraud_database` - The phone number is flagged in one or more of the fraud + # databases Prelude consults. + # - `invalid_signature` - The SDK signature did not verify, so the request cannot + # be attributed to the device it claims to come from. + # - `ip_concentration` - The request shares its origin with an unusual volume of + # other verifications. + # - `ip_reputation` - The originating IP address is not trusted. + # - `location_mismatch` - The network location and the phone number's country are + # inconsistent. + # - `missing_signals` - The verification expected Prelude SDK signals and none + # arrived. + # - `number_range_abuse` - The phone number belongs to a range currently + # associated with abuse. + # - `poor_conversion_history` - Traffic resembling this request rarely completes a + # verification. + # - `proxy_network` - The request did not arrive over the subscriber's own access + # network. + # - `repeated_attempts` - The phone number exceeded the allowed number of + # verification attempts in a short period. + # - `temporary_phone_number` - The phone number belongs to a disposable or + # short-lived numbering service. sig do returns( T.nilable( @@ -231,9 +247,10 @@ module PreludeSDK # landline). # - `invalid_phone_number` - The phone number is not a valid phone number (e.g. # unallocated range). - # - `invalid_signature` - The signature of the SDK signals is invalid. - # - `repeated_attempts` - The phone number has made too many verification - # attempts. + # - `invalid_signature` - The SDK signature did not verify, so the request cannot + # be attributed to the device it claims to come from. + # - `repeated_attempts` - The phone number exceeded the allowed number of + # verification attempts in a short period. # - `suspicious` - The verification attempt was deemed suspicious by the # anti-fraud system. reason: nil, @@ -242,26 +259,41 @@ module PreludeSDK # present when status is "blocked" or "shadow_blocked" and the anti-fraud system # detected specific risk signals. # - # - `behavioral_pattern` - The phone number past behavior during verification - # flows exhibits suspicious patterns. - # - `device_attribute` - The device exhibits characteristics associated with - # suspicious activity patterns. - # - `fraud_database` - The phone number has been flagged as suspicious in one or - # more of our fraud databases. - # - `location_discrepancy` - The phone number prefix and IP address discrepancy - # indicates potential fraud. - # - `network_fingerprint` - The network connection exhibits characteristics - # associated with suspicious activity patterns. - # - `poor_conversion_history` - The phone number has a history of poorly - # converting to a verified phone number. - # - `prefix_concentration` - The phone number is part of a range known to be - # associated with suspicious activity patterns. - # - `suspected_request_tampering` - The SDK signature is invalid and the request - # is considered to be tampered with. - # - `suspicious_ip_address` - The IP address is deemed to be associated with - # suspicious activity patterns. - # - `temporary_phone_number` - The phone number is known to be a temporary or - # disposable number. + # - `automation_signature` - The request appears to come from an automated client + # rather than a person. + # - `carrier_not_permitted` - The destination carrier is one this account does not + # accept traffic for. + # - `client_fingerprint_mismatch` - The client does not appear to be the platform + # it identifies itself as. + # - `custom_policy` - A rule configured for your account matched this request. + # - `device_emulator` - The request appears to come from an emulator rather than a + # physical device. + # - `device_not_permitted` - The device platform is one your account blocks. + # - `device_reuse` - One device is driving verifications for an unusual number of + # phone numbers. + # - `expired_signals` - The SDK signals were collected too long before the request + # to still attest to it. + # - `fraud_database` - The phone number is flagged in one or more of the fraud + # databases Prelude consults. + # - `invalid_signature` - The SDK signature did not verify, so the request cannot + # be attributed to the device it claims to come from. + # - `ip_concentration` - The request shares its origin with an unusual volume of + # other verifications. + # - `ip_reputation` - The originating IP address is not trusted. + # - `location_mismatch` - The network location and the phone number's country are + # inconsistent. + # - `missing_signals` - The verification expected Prelude SDK signals and none + # arrived. + # - `number_range_abuse` - The phone number belongs to a range currently + # associated with abuse. + # - `poor_conversion_history` - Traffic resembling this request rarely completes a + # verification. + # - `proxy_network` - The request did not arrive over the subscriber's own access + # network. + # - `repeated_attempts` - The phone number exceeded the allowed number of + # verification attempts in a short period. + # - `temporary_phone_number` - The phone number belongs to a disposable or + # short-lived numbering service. risk_factors: nil, # The silent verification specific properties. silent: nil @@ -505,9 +537,10 @@ module PreludeSDK # landline). # - `invalid_phone_number` - The phone number is not a valid phone number (e.g. # unallocated range). - # - `invalid_signature` - The signature of the SDK signals is invalid. - # - `repeated_attempts` - The phone number has made too many verification - # attempts. + # - `invalid_signature` - The SDK signature did not verify, so the request cannot + # be attributed to the device it claims to come from. + # - `repeated_attempts` - The phone number exceeded the allowed number of + # verification attempts in a short period. # - `suspicious` - The verification attempt was deemed suspicious by the # anti-fraud system. module Reason @@ -581,14 +614,44 @@ module PreludeSDK end OrSymbol = T.type_alias { T.any(Symbol, String) } - BEHAVIORAL_PATTERN = + AUTOMATION_SIGNATURE = T.let( - :behavioral_pattern, + :automation_signature, PreludeSDK::Models::VerificationCreateResponse::RiskFactor::TaggedSymbol ) - DEVICE_ATTRIBUTE = + CARRIER_NOT_PERMITTED = T.let( - :device_attribute, + :carrier_not_permitted, + PreludeSDK::Models::VerificationCreateResponse::RiskFactor::TaggedSymbol + ) + CLIENT_FINGERPRINT_MISMATCH = + T.let( + :client_fingerprint_mismatch, + PreludeSDK::Models::VerificationCreateResponse::RiskFactor::TaggedSymbol + ) + CUSTOM_POLICY = + T.let( + :custom_policy, + PreludeSDK::Models::VerificationCreateResponse::RiskFactor::TaggedSymbol + ) + DEVICE_EMULATOR = + T.let( + :device_emulator, + PreludeSDK::Models::VerificationCreateResponse::RiskFactor::TaggedSymbol + ) + DEVICE_NOT_PERMITTED = + T.let( + :device_not_permitted, + PreludeSDK::Models::VerificationCreateResponse::RiskFactor::TaggedSymbol + ) + DEVICE_REUSE = + T.let( + :device_reuse, + PreludeSDK::Models::VerificationCreateResponse::RiskFactor::TaggedSymbol + ) + EXPIRED_SIGNALS = + T.let( + :expired_signals, PreludeSDK::Models::VerificationCreateResponse::RiskFactor::TaggedSymbol ) FRAUD_DATABASE = @@ -596,34 +659,49 @@ module PreludeSDK :fraud_database, PreludeSDK::Models::VerificationCreateResponse::RiskFactor::TaggedSymbol ) - LOCATION_DISCREPANCY = + INVALID_SIGNATURE = T.let( - :location_discrepancy, + :invalid_signature, PreludeSDK::Models::VerificationCreateResponse::RiskFactor::TaggedSymbol ) - NETWORK_FINGERPRINT = + IP_CONCENTRATION = T.let( - :network_fingerprint, + :ip_concentration, PreludeSDK::Models::VerificationCreateResponse::RiskFactor::TaggedSymbol ) - POOR_CONVERSION_HISTORY = + IP_REPUTATION = T.let( - :poor_conversion_history, + :ip_reputation, PreludeSDK::Models::VerificationCreateResponse::RiskFactor::TaggedSymbol ) - PREFIX_CONCENTRATION = + LOCATION_MISMATCH = T.let( - :prefix_concentration, + :location_mismatch, PreludeSDK::Models::VerificationCreateResponse::RiskFactor::TaggedSymbol ) - SUSPECTED_REQUEST_TAMPERING = + MISSING_SIGNALS = T.let( - :suspected_request_tampering, + :missing_signals, PreludeSDK::Models::VerificationCreateResponse::RiskFactor::TaggedSymbol ) - SUSPICIOUS_IP_ADDRESS = + NUMBER_RANGE_ABUSE = T.let( - :suspicious_ip_address, + :number_range_abuse, + PreludeSDK::Models::VerificationCreateResponse::RiskFactor::TaggedSymbol + ) + POOR_CONVERSION_HISTORY = + T.let( + :poor_conversion_history, + PreludeSDK::Models::VerificationCreateResponse::RiskFactor::TaggedSymbol + ) + PROXY_NETWORK = + T.let( + :proxy_network, + PreludeSDK::Models::VerificationCreateResponse::RiskFactor::TaggedSymbol + ) + REPEATED_ATTEMPTS = + T.let( + :repeated_attempts, PreludeSDK::Models::VerificationCreateResponse::RiskFactor::TaggedSymbol ) TEMPORARY_PHONE_NUMBER = diff --git a/rbi/prelude_sdk/models/watch_evaluate_response.rbi b/rbi/prelude_sdk/models/watch_evaluate_response.rbi index 68d686ba..cef3e152 100644 --- a/rbi/prelude_sdk/models/watch_evaluate_response.rbi +++ b/rbi/prelude_sdk/models/watch_evaluate_response.rbi @@ -155,7 +155,9 @@ module PreludeSDK # One result per rule in the recipe, in membership order. Every rule runs — a # score is only meaningful when complete, so there is no short-circuit on the - # first trigger. + # first trigger. The exception is a recipe whose verdict a preempting rule has + # already determined, where a rule that could no longer change it may report + # `SKIPPED` instead. sig do returns( T::Array[PreludeSDK::Models::WatchEvaluateResponse::Recipe::Rule] @@ -214,7 +216,9 @@ module PreludeSDK recipe_id:, # One result per rule in the recipe, in membership order. Every rule runs — a # score is only meaningful when complete, so there is no short-circuit on the - # first trigger. + # first trigger. The exception is a recipe whose verdict a preempting rule has + # already determined, where a rule that could no longer change it may report + # `SKIPPED` instead. rules:, # The sum of the weights of the rules that triggered, clamped to the range -100 # to 100. Two scores at a bound are not comparable. @@ -267,6 +271,10 @@ module PreludeSDK # - `NOT_EVALUATED` - The rule could not run, because something it reads never # arrived. This is not a quieter `NOT_TRIGGERED`: it contributed nothing either # way, and it is why `partial_evidence` is set on the recipe. + # - `SKIPPED` - The rule was not run, because another rule had already determined + # the recipe's verdict — see `determined_by`. Nothing was missing and nothing + # failed, so `partial_evidence` is not set: `determined_by` is what accounts for + # the recipe's score resting on fewer rules. sig do returns( PreludeSDK::Models::WatchEvaluateResponse::Recipe::Rule::Outcome::TaggedSymbol @@ -280,6 +288,19 @@ module PreludeSDK sig { returns(String) } attr_accessor :rule_id + # Who authored the rule, which is what says how much of the rest of this result + # you get. + # + # - `MANAGED` - Prelude-owned, shared with customers: `name` and `version_id` are + # omitted, and `blocked_by` reports only `missing_data`. + # - `CUSTOM` - Yours: every field is returned. + sig do + returns( + PreludeSDK::Models::WatchEvaluateResponse::Recipe::Rule::Type::TaggedSymbol + ) + end + attr_accessor :type + # What this rule contributes to the recipe's score when it triggers. sig { returns(Integer) } attr_accessor :weight @@ -313,15 +334,27 @@ module PreludeSDK sig { params(unavailable: T::Boolean).void } attr_writer :unavailable + # The version of the rule that scored — the one this recipe is pinned to, or the + # version current at evaluation time when it is not pinned. Present for a rule you + # authored, and omitted for a Prelude-managed one. + sig { returns(T.nilable(String)) } + attr_reader :version_id + + sig { params(version_id: String).void } + attr_writer :version_id + sig do params( outcome: PreludeSDK::Models::WatchEvaluateResponse::Recipe::Rule::Outcome::OrSymbol, rule_id: String, + type: + PreludeSDK::Models::WatchEvaluateResponse::Recipe::Rule::Type::OrSymbol, weight: Integer, blocked_by: String, name: String, - unavailable: T::Boolean + unavailable: T::Boolean, + version_id: String ).returns(T.attached_class) end def self.new( @@ -332,11 +365,22 @@ module PreludeSDK # - `NOT_EVALUATED` - The rule could not run, because something it reads never # arrived. This is not a quieter `NOT_TRIGGERED`: it contributed nothing either # way, and it is why `partial_evidence` is set on the recipe. + # - `SKIPPED` - The rule was not run, because another rule had already determined + # the recipe's verdict — see `determined_by`. Nothing was missing and nothing + # failed, so `partial_evidence` is not set: `determined_by` is what accounts for + # the recipe's score resting on fewer rules. outcome:, # The rule that produced this result. Present whatever the rule's visibility, so a # rule you cannot see the condition of is still one you can reweight, switch off, # or ask us about. rule_id:, + # Who authored the rule, which is what says how much of the rest of this result + # you get. + # + # - `MANAGED` - Prelude-owned, shared with customers: `name` and `version_id` are + # omitted, and `blocked_by` reports only `missing_data`. + # - `CUSTOM` - Yours: every field is returned. + type:, # What this rule contributes to the recipe's score when it triggers. weight:, # Why the rule could not run, set only when `outcome` is `NOT_EVALUATED`. @@ -352,7 +396,11 @@ module PreludeSDK name: nil, # The rule could not run for a reason on our side rather than anything about your # request. `outcome` is `NOT_EVALUATED` and the failure is ours to fix. - unavailable: nil + unavailable: nil, + # The version of the rule that scored — the one this recipe is pinned to, or the + # version current at evaluation time when it is not pinned. Present for a rule you + # authored, and omitted for a Prelude-managed one. + version_id: nil ) end @@ -362,10 +410,13 @@ module PreludeSDK outcome: PreludeSDK::Models::WatchEvaluateResponse::Recipe::Rule::Outcome::TaggedSymbol, rule_id: String, + type: + PreludeSDK::Models::WatchEvaluateResponse::Recipe::Rule::Type::TaggedSymbol, weight: Integer, blocked_by: String, name: String, - unavailable: T::Boolean + unavailable: T::Boolean, + version_id: String } ) end @@ -379,6 +430,10 @@ module PreludeSDK # - `NOT_EVALUATED` - The rule could not run, because something it reads never # arrived. This is not a quieter `NOT_TRIGGERED`: it contributed nothing either # way, and it is why `partial_evidence` is set on the recipe. + # - `SKIPPED` - The rule was not run, because another rule had already determined + # the recipe's verdict — see `determined_by`. Nothing was missing and nothing + # failed, so `partial_evidence` is not set: `determined_by` is what accounts for + # the recipe's score resting on fewer rules. module Outcome extend PreludeSDK::Internal::Type::Enum @@ -406,6 +461,11 @@ module PreludeSDK :NOT_EVALUATED, PreludeSDK::Models::WatchEvaluateResponse::Recipe::Rule::Outcome::TaggedSymbol ) + SKIPPED = + T.let( + :SKIPPED, + PreludeSDK::Models::WatchEvaluateResponse::Recipe::Rule::Outcome::TaggedSymbol + ) sig do override.returns( @@ -417,6 +477,46 @@ module PreludeSDK def self.values end end + + # Who authored the rule, which is what says how much of the rest of this result + # you get. + # + # - `MANAGED` - Prelude-owned, shared with customers: `name` and `version_id` are + # omitted, and `blocked_by` reports only `missing_data`. + # - `CUSTOM` - Yours: every field is returned. + module Type + extend PreludeSDK::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + PreludeSDK::Models::WatchEvaluateResponse::Recipe::Rule::Type + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + MANAGED = + T.let( + :MANAGED, + PreludeSDK::Models::WatchEvaluateResponse::Recipe::Rule::Type::TaggedSymbol + ) + CUSTOM = + T.let( + :CUSTOM, + PreludeSDK::Models::WatchEvaluateResponse::Recipe::Rule::Type::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + PreludeSDK::Models::WatchEvaluateResponse::Recipe::Rule::Type::TaggedSymbol + ] + ) + end + def self.values + end + end end # This recipe's own verdict. Normally the score against the threshold, unless a diff --git a/rbi/prelude_sdk/models/watch_predict_response.rbi b/rbi/prelude_sdk/models/watch_predict_response.rbi index 33567815..a72eddfd 100644 --- a/rbi/prelude_sdk/models/watch_predict_response.rbi +++ b/rbi/prelude_sdk/models/watch_predict_response.rbi @@ -32,29 +32,43 @@ module PreludeSDK # when prediction is "suspicious" and the anti-fraud system detected specific risk # signals. # - # - `account_risk_profile` - The target matches a risk profile derived from the - # outcomes reported on your own account, rather than from a signal shared across - # accounts. - # - `behavioral_pattern` - The phone number past behavior during verification - # flows exhibits suspicious patterns. - # - `device_attribute` - The device exhibits characteristics associated with - # suspicious activity patterns. - # - `fraud_database` - The phone number has been flagged as suspicious in one or - # more of our fraud databases. - # - `location_discrepancy` - The phone number prefix and IP address discrepancy - # indicates potential fraud. - # - `network_fingerprint` - The network connection exhibits characteristics - # associated with suspicious activity patterns. - # - `poor_conversion_history` - The phone number has a history of poorly - # converting to a verified phone number. - # - `prefix_concentration` - The phone number is part of a range known to be - # associated with suspicious activity patterns. - # - `suspected_request_tampering` - The SDK signature is invalid and the request - # is considered to be tampered with. - # - `suspicious_ip_address` - The IP address is deemed to be associated with - # suspicious activity patterns. - # - `temporary_phone_number` - The phone number is known to be a temporary or - # disposable number. + # - `account_risk_profile` - The request matches a risk profile derived from the + # outcomes reported on your own account. + # - `automation_signature` - The request appears to come from an automated client + # rather than a person. + # - `carrier_not_permitted` - The destination carrier is one this account does not + # accept traffic for. + # - `client_fingerprint_mismatch` - The client does not appear to be the platform + # it identifies itself as. + # - `custom_policy` - A rule configured for your account matched this request. + # - `device_emulator` - The request appears to come from an emulator rather than a + # physical device. + # - `device_not_permitted` - The device platform is one your account blocks. + # - `device_reuse` - One device is driving verifications for an unusual number of + # phone numbers. + # - `expired_signals` - The SDK signals were collected too long before the request + # to still attest to it. + # - `fraud_database` - The phone number is flagged in one or more of the fraud + # databases Prelude consults. + # - `invalid_signature` - The SDK signature did not verify, so the request cannot + # be attributed to the device it claims to come from. + # - `ip_concentration` - The request shares its origin with an unusual volume of + # other verifications. + # - `ip_reputation` - The originating IP address is not trusted. + # - `location_mismatch` - The network location and the phone number's country are + # inconsistent. + # - `missing_signals` - The verification expected Prelude SDK signals and none + # arrived. + # - `number_range_abuse` - The phone number belongs to a range currently + # associated with abuse. + # - `poor_conversion_history` - Traffic resembling this request rarely completes a + # verification. + # - `proxy_network` - The request did not arrive over the subscriber's own access + # network. + # - `repeated_attempts` - The phone number exceeded the allowed number of + # verification attempts in a short period. + # - `temporary_phone_number` - The phone number belongs to a disposable or + # short-lived numbering service. sig do returns( T.nilable( @@ -100,29 +114,43 @@ module PreludeSDK # when prediction is "suspicious" and the anti-fraud system detected specific risk # signals. # - # - `account_risk_profile` - The target matches a risk profile derived from the - # outcomes reported on your own account, rather than from a signal shared across - # accounts. - # - `behavioral_pattern` - The phone number past behavior during verification - # flows exhibits suspicious patterns. - # - `device_attribute` - The device exhibits characteristics associated with - # suspicious activity patterns. - # - `fraud_database` - The phone number has been flagged as suspicious in one or - # more of our fraud databases. - # - `location_discrepancy` - The phone number prefix and IP address discrepancy - # indicates potential fraud. - # - `network_fingerprint` - The network connection exhibits characteristics - # associated with suspicious activity patterns. - # - `poor_conversion_history` - The phone number has a history of poorly - # converting to a verified phone number. - # - `prefix_concentration` - The phone number is part of a range known to be - # associated with suspicious activity patterns. - # - `suspected_request_tampering` - The SDK signature is invalid and the request - # is considered to be tampered with. - # - `suspicious_ip_address` - The IP address is deemed to be associated with - # suspicious activity patterns. - # - `temporary_phone_number` - The phone number is known to be a temporary or - # disposable number. + # - `account_risk_profile` - The request matches a risk profile derived from the + # outcomes reported on your own account. + # - `automation_signature` - The request appears to come from an automated client + # rather than a person. + # - `carrier_not_permitted` - The destination carrier is one this account does not + # accept traffic for. + # - `client_fingerprint_mismatch` - The client does not appear to be the platform + # it identifies itself as. + # - `custom_policy` - A rule configured for your account matched this request. + # - `device_emulator` - The request appears to come from an emulator rather than a + # physical device. + # - `device_not_permitted` - The device platform is one your account blocks. + # - `device_reuse` - One device is driving verifications for an unusual number of + # phone numbers. + # - `expired_signals` - The SDK signals were collected too long before the request + # to still attest to it. + # - `fraud_database` - The phone number is flagged in one or more of the fraud + # databases Prelude consults. + # - `invalid_signature` - The SDK signature did not verify, so the request cannot + # be attributed to the device it claims to come from. + # - `ip_concentration` - The request shares its origin with an unusual volume of + # other verifications. + # - `ip_reputation` - The originating IP address is not trusted. + # - `location_mismatch` - The network location and the phone number's country are + # inconsistent. + # - `missing_signals` - The verification expected Prelude SDK signals and none + # arrived. + # - `number_range_abuse` - The phone number belongs to a range currently + # associated with abuse. + # - `poor_conversion_history` - Traffic resembling this request rarely completes a + # verification. + # - `proxy_network` - The request did not arrive over the subscriber's own access + # network. + # - `repeated_attempts` - The phone number exceeded the allowed number of + # verification attempts in a short period. + # - `temporary_phone_number` - The phone number belongs to a disposable or + # short-lived numbering service. risk_factors: nil ) end @@ -190,14 +218,44 @@ module PreludeSDK :account_risk_profile, PreludeSDK::Models::WatchPredictResponse::RiskFactor::TaggedSymbol ) - BEHAVIORAL_PATTERN = + AUTOMATION_SIGNATURE = T.let( - :behavioral_pattern, + :automation_signature, PreludeSDK::Models::WatchPredictResponse::RiskFactor::TaggedSymbol ) - DEVICE_ATTRIBUTE = + CARRIER_NOT_PERMITTED = T.let( - :device_attribute, + :carrier_not_permitted, + PreludeSDK::Models::WatchPredictResponse::RiskFactor::TaggedSymbol + ) + CLIENT_FINGERPRINT_MISMATCH = + T.let( + :client_fingerprint_mismatch, + PreludeSDK::Models::WatchPredictResponse::RiskFactor::TaggedSymbol + ) + CUSTOM_POLICY = + T.let( + :custom_policy, + PreludeSDK::Models::WatchPredictResponse::RiskFactor::TaggedSymbol + ) + DEVICE_EMULATOR = + T.let( + :device_emulator, + PreludeSDK::Models::WatchPredictResponse::RiskFactor::TaggedSymbol + ) + DEVICE_NOT_PERMITTED = + T.let( + :device_not_permitted, + PreludeSDK::Models::WatchPredictResponse::RiskFactor::TaggedSymbol + ) + DEVICE_REUSE = + T.let( + :device_reuse, + PreludeSDK::Models::WatchPredictResponse::RiskFactor::TaggedSymbol + ) + EXPIRED_SIGNALS = + T.let( + :expired_signals, PreludeSDK::Models::WatchPredictResponse::RiskFactor::TaggedSymbol ) FRAUD_DATABASE = @@ -205,34 +263,49 @@ module PreludeSDK :fraud_database, PreludeSDK::Models::WatchPredictResponse::RiskFactor::TaggedSymbol ) - LOCATION_DISCREPANCY = + INVALID_SIGNATURE = T.let( - :location_discrepancy, + :invalid_signature, PreludeSDK::Models::WatchPredictResponse::RiskFactor::TaggedSymbol ) - NETWORK_FINGERPRINT = + IP_CONCENTRATION = T.let( - :network_fingerprint, + :ip_concentration, PreludeSDK::Models::WatchPredictResponse::RiskFactor::TaggedSymbol ) - POOR_CONVERSION_HISTORY = + IP_REPUTATION = T.let( - :poor_conversion_history, + :ip_reputation, PreludeSDK::Models::WatchPredictResponse::RiskFactor::TaggedSymbol ) - PREFIX_CONCENTRATION = + LOCATION_MISMATCH = T.let( - :prefix_concentration, + :location_mismatch, + PreludeSDK::Models::WatchPredictResponse::RiskFactor::TaggedSymbol + ) + MISSING_SIGNALS = + T.let( + :missing_signals, + PreludeSDK::Models::WatchPredictResponse::RiskFactor::TaggedSymbol + ) + NUMBER_RANGE_ABUSE = + T.let( + :number_range_abuse, + PreludeSDK::Models::WatchPredictResponse::RiskFactor::TaggedSymbol + ) + POOR_CONVERSION_HISTORY = + T.let( + :poor_conversion_history, PreludeSDK::Models::WatchPredictResponse::RiskFactor::TaggedSymbol ) - SUSPECTED_REQUEST_TAMPERING = + PROXY_NETWORK = T.let( - :suspected_request_tampering, + :proxy_network, PreludeSDK::Models::WatchPredictResponse::RiskFactor::TaggedSymbol ) - SUSPICIOUS_IP_ADDRESS = + REPEATED_ATTEMPTS = T.let( - :suspicious_ip_address, + :repeated_attempts, PreludeSDK::Models::WatchPredictResponse::RiskFactor::TaggedSymbol ) TEMPORARY_PHONE_NUMBER = diff --git a/rbi/prelude_sdk/resources/watch.rbi b/rbi/prelude_sdk/resources/watch.rbi index 584d2d50..07d454fe 100644 --- a/rbi/prelude_sdk/resources/watch.rbi +++ b/rbi/prelude_sdk/resources/watch.rbi @@ -4,9 +4,9 @@ module PreludeSDK module Resources # Evaluate email addresses and phone numbers for trustworthiness. class Watch - # **Beta.** The request and response shapes may still change, and flows and - # recipes are configured by Prelude on your behalf for now. Talk to us before you - # build against it. + # **Beta.** The request and response shapes may still change. Talk to us before + # you build against it. Flows, recipes and rules are authored through the Watch + # Management API, or configured by Prelude on your behalf. # # Score a target against the rules configured for one moment in your product — # signup, checkout, password reset. The flow selects which recipes run; each diff --git a/sig/prelude_sdk/models/verification/phone/history_retrieve_response.rbs b/sig/prelude_sdk/models/verification/phone/history_retrieve_response.rbs index 9782c5df..04edecb4 100644 --- a/sig/prelude_sdk/models/verification/phone/history_retrieve_response.rbs +++ b/sig/prelude_sdk/models/verification/phone/history_retrieve_response.rbs @@ -200,33 +200,47 @@ module PreludeSDK end type block_reason = - :behavioral_pattern - | :device_attribute + :automation_signature + | :carrier_not_permitted + | :client_fingerprint_mismatch + | :custom_policy + | :device_emulator + | :device_not_permitted + | :device_reuse + | :expired_signals | :fraud_database - | :location_discrepancy + | :invalid_signature + | :ip_concentration + | :ip_reputation + | :location_mismatch | :missing_signals - | :network_fingerprint + | :number_range_abuse | :poor_conversion_history - | :prefix_concentration - | :repeated_number - | :suspected_request_tampering - | :suspicious_ip_address + | :proxy_network + | :repeated_attempts | :temporary_phone_number module BlockReason extend PreludeSDK::Internal::Type::Enum - BEHAVIORAL_PATTERN: :behavioral_pattern - DEVICE_ATTRIBUTE: :device_attribute + AUTOMATION_SIGNATURE: :automation_signature + CARRIER_NOT_PERMITTED: :carrier_not_permitted + CLIENT_FINGERPRINT_MISMATCH: :client_fingerprint_mismatch + CUSTOM_POLICY: :custom_policy + DEVICE_EMULATOR: :device_emulator + DEVICE_NOT_PERMITTED: :device_not_permitted + DEVICE_REUSE: :device_reuse + EXPIRED_SIGNALS: :expired_signals FRAUD_DATABASE: :fraud_database - LOCATION_DISCREPANCY: :location_discrepancy + INVALID_SIGNATURE: :invalid_signature + IP_CONCENTRATION: :ip_concentration + IP_REPUTATION: :ip_reputation + LOCATION_MISMATCH: :location_mismatch MISSING_SIGNALS: :missing_signals - NETWORK_FINGERPRINT: :network_fingerprint + NUMBER_RANGE_ABUSE: :number_range_abuse POOR_CONVERSION_HISTORY: :poor_conversion_history - PREFIX_CONCENTRATION: :prefix_concentration - REPEATED_NUMBER: :repeated_number - SUSPECTED_REQUEST_TAMPERING: :suspected_request_tampering - SUSPICIOUS_IP_ADDRESS: :suspicious_ip_address + PROXY_NETWORK: :proxy_network + REPEATED_ATTEMPTS: :repeated_attempts TEMPORARY_PHONE_NUMBER: :temporary_phone_number def self?.values: -> ::Array[PreludeSDK::Models::Verification::Phone::HistoryRetrieveResponse::block_reason] diff --git a/sig/prelude_sdk/models/verification_create_response.rbs b/sig/prelude_sdk/models/verification_create_response.rbs index 9e34070f..684d8fbd 100644 --- a/sig/prelude_sdk/models/verification_create_response.rbs +++ b/sig/prelude_sdk/models/verification_create_response.rbs @@ -159,29 +159,47 @@ module PreludeSDK end type risk_factor = - :behavioral_pattern - | :device_attribute + :automation_signature + | :carrier_not_permitted + | :client_fingerprint_mismatch + | :custom_policy + | :device_emulator + | :device_not_permitted + | :device_reuse + | :expired_signals | :fraud_database - | :location_discrepancy - | :network_fingerprint + | :invalid_signature + | :ip_concentration + | :ip_reputation + | :location_mismatch + | :missing_signals + | :number_range_abuse | :poor_conversion_history - | :prefix_concentration - | :suspected_request_tampering - | :suspicious_ip_address + | :proxy_network + | :repeated_attempts | :temporary_phone_number module RiskFactor extend PreludeSDK::Internal::Type::Enum - BEHAVIORAL_PATTERN: :behavioral_pattern - DEVICE_ATTRIBUTE: :device_attribute + AUTOMATION_SIGNATURE: :automation_signature + CARRIER_NOT_PERMITTED: :carrier_not_permitted + CLIENT_FINGERPRINT_MISMATCH: :client_fingerprint_mismatch + CUSTOM_POLICY: :custom_policy + DEVICE_EMULATOR: :device_emulator + DEVICE_NOT_PERMITTED: :device_not_permitted + DEVICE_REUSE: :device_reuse + EXPIRED_SIGNALS: :expired_signals FRAUD_DATABASE: :fraud_database - LOCATION_DISCREPANCY: :location_discrepancy - NETWORK_FINGERPRINT: :network_fingerprint + INVALID_SIGNATURE: :invalid_signature + IP_CONCENTRATION: :ip_concentration + IP_REPUTATION: :ip_reputation + LOCATION_MISMATCH: :location_mismatch + MISSING_SIGNALS: :missing_signals + NUMBER_RANGE_ABUSE: :number_range_abuse POOR_CONVERSION_HISTORY: :poor_conversion_history - PREFIX_CONCENTRATION: :prefix_concentration - SUSPECTED_REQUEST_TAMPERING: :suspected_request_tampering - SUSPICIOUS_IP_ADDRESS: :suspicious_ip_address + PROXY_NETWORK: :proxy_network + REPEATED_ATTEMPTS: :repeated_attempts TEMPORARY_PHONE_NUMBER: :temporary_phone_number def self?.values: -> ::Array[PreludeSDK::Models::VerificationCreateResponse::risk_factor] diff --git a/sig/prelude_sdk/models/watch_evaluate_response.rbs b/sig/prelude_sdk/models/watch_evaluate_response.rbs index f0692850..5581064b 100644 --- a/sig/prelude_sdk/models/watch_evaluate_response.rbs +++ b/sig/prelude_sdk/models/watch_evaluate_response.rbs @@ -95,10 +95,12 @@ module PreludeSDK { outcome: PreludeSDK::Models::WatchEvaluateResponse::Recipe::Rule::outcome, rule_id: String, + type: PreludeSDK::Models::WatchEvaluateResponse::Recipe::Rule::type_, weight: Integer, blocked_by: String, name: String, - unavailable: bool + unavailable: bool, + version_id: String } class Rule < PreludeSDK::Internal::Type::BaseModel @@ -106,6 +108,8 @@ module PreludeSDK attr_accessor rule_id: String + attr_accessor type: PreludeSDK::Models::WatchEvaluateResponse::Recipe::Rule::type_ + attr_accessor weight: Integer attr_reader blocked_by: String? @@ -120,25 +124,33 @@ module PreludeSDK def unavailable=: (bool) -> bool + attr_reader version_id: String? + + def version_id=: (String) -> String + def initialize: ( outcome: PreludeSDK::Models::WatchEvaluateResponse::Recipe::Rule::outcome, rule_id: String, + type: PreludeSDK::Models::WatchEvaluateResponse::Recipe::Rule::type_, weight: Integer, ?blocked_by: String, ?name: String, - ?unavailable: bool + ?unavailable: bool, + ?version_id: String ) -> void def to_hash: -> { outcome: PreludeSDK::Models::WatchEvaluateResponse::Recipe::Rule::outcome, rule_id: String, + type: PreludeSDK::Models::WatchEvaluateResponse::Recipe::Rule::type_, weight: Integer, blocked_by: String, name: String, - unavailable: bool + unavailable: bool, + version_id: String } - type outcome = :TRIGGERED | :NOT_TRIGGERED | :NOT_EVALUATED + type outcome = :TRIGGERED | :NOT_TRIGGERED | :NOT_EVALUATED | :SKIPPED module Outcome extend PreludeSDK::Internal::Type::Enum @@ -146,9 +158,21 @@ module PreludeSDK TRIGGERED: :TRIGGERED NOT_TRIGGERED: :NOT_TRIGGERED NOT_EVALUATED: :NOT_EVALUATED + SKIPPED: :SKIPPED def self?.values: -> ::Array[PreludeSDK::Models::WatchEvaluateResponse::Recipe::Rule::outcome] end + + type type_ = :MANAGED | :CUSTOM + + module Type + extend PreludeSDK::Internal::Type::Enum + + MANAGED: :MANAGED + CUSTOM: :CUSTOM + + def self?.values: -> ::Array[PreludeSDK::Models::WatchEvaluateResponse::Recipe::Rule::type_] + end end type verdict = :PASS | :FLAG diff --git a/sig/prelude_sdk/models/watch_predict_response.rbs b/sig/prelude_sdk/models/watch_predict_response.rbs index 665f1898..580fa357 100644 --- a/sig/prelude_sdk/models/watch_predict_response.rbs +++ b/sig/prelude_sdk/models/watch_predict_response.rbs @@ -48,30 +48,48 @@ module PreludeSDK type risk_factor = :account_risk_profile - | :behavioral_pattern - | :device_attribute + | :automation_signature + | :carrier_not_permitted + | :client_fingerprint_mismatch + | :custom_policy + | :device_emulator + | :device_not_permitted + | :device_reuse + | :expired_signals | :fraud_database - | :location_discrepancy - | :network_fingerprint + | :invalid_signature + | :ip_concentration + | :ip_reputation + | :location_mismatch + | :missing_signals + | :number_range_abuse | :poor_conversion_history - | :prefix_concentration - | :suspected_request_tampering - | :suspicious_ip_address + | :proxy_network + | :repeated_attempts | :temporary_phone_number module RiskFactor extend PreludeSDK::Internal::Type::Enum ACCOUNT_RISK_PROFILE: :account_risk_profile - BEHAVIORAL_PATTERN: :behavioral_pattern - DEVICE_ATTRIBUTE: :device_attribute + AUTOMATION_SIGNATURE: :automation_signature + CARRIER_NOT_PERMITTED: :carrier_not_permitted + CLIENT_FINGERPRINT_MISMATCH: :client_fingerprint_mismatch + CUSTOM_POLICY: :custom_policy + DEVICE_EMULATOR: :device_emulator + DEVICE_NOT_PERMITTED: :device_not_permitted + DEVICE_REUSE: :device_reuse + EXPIRED_SIGNALS: :expired_signals FRAUD_DATABASE: :fraud_database - LOCATION_DISCREPANCY: :location_discrepancy - NETWORK_FINGERPRINT: :network_fingerprint + INVALID_SIGNATURE: :invalid_signature + IP_CONCENTRATION: :ip_concentration + IP_REPUTATION: :ip_reputation + LOCATION_MISMATCH: :location_mismatch + MISSING_SIGNALS: :missing_signals + NUMBER_RANGE_ABUSE: :number_range_abuse POOR_CONVERSION_HISTORY: :poor_conversion_history - PREFIX_CONCENTRATION: :prefix_concentration - SUSPECTED_REQUEST_TAMPERING: :suspected_request_tampering - SUSPICIOUS_IP_ADDRESS: :suspicious_ip_address + PROXY_NETWORK: :proxy_network + REPEATED_ATTEMPTS: :repeated_attempts TEMPORARY_PHONE_NUMBER: :temporary_phone_number def self?.values: -> ::Array[PreludeSDK::Models::WatchPredictResponse::risk_factor]