Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.8.0"
".": "0.9.0"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -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
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 0.9.0 (2026-09-18)

Full Changelog: [v0.8.0...v0.9.0](https://github.com/prelude-so/php-sdk/compare/v0.8.0...v0.9.0)

### Features

* **api:** api update ([0efc28f](https://github.com/prelude-so/php-sdk/commit/0efc28f63ebca1a4557d55311bf0cf3c3b89d8ac))

## 0.8.0 (2026-09-18)

Full Changelog: [v0.7.0...v0.8.0](https://github.com/prelude-so/php-sdk/compare/v0.7.0...v0.8.0)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ The REST API documentation can be found on [docs.prelude.so](https://docs.prelud
<!-- x-release-please-start-version -->

```
composer require "prelude-so/php-sdk 0.8.0"
composer require "prelude-so/php-sdk 0.9.0"
```

<!-- x-release-please-end -->
Expand Down
2 changes: 1 addition & 1 deletion src/Services/WatchRawService.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public function __construct(private Client $client) {}
/**
* @api
*
* **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 recipe scores its rules against a threshold and returns its own verdict, and the evaluation answers with the most severe verdict and action across them. Where Predict returns a single model-derived outcome, Eval returns the full breakdown, so you can see which rules fired and which could not run. Scoring-only — it does not update counters by itself.
*
Expand Down
2 changes: 1 addition & 1 deletion src/Services/WatchService.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public function __construct(private Client $client)
/**
* @api
*
* **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 recipe scores its rules against a threshold and returns its own verdict, and the evaluation answers with the most severe verdict and action across them. Where Predict returns a single model-derived outcome, Eval returns the full breakdown, so you can see which rules fired and which could not run. Scoring-only — it does not update counters by itself.
*
Expand Down
66 changes: 40 additions & 26 deletions src/Verification/Phone/History/HistoryGetResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ final class HistoryGetResponse implements 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.
*
* @var value-of<Status> $status
Expand All @@ -98,19 +98,26 @@ final class HistoryGetResponse implements BaseModel
public ?string $appVersion;

/**
* 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.
*
* @var list<value-of<BlockReason>>|null $blockReasons
*/
Expand Down Expand Up @@ -354,7 +361,7 @@ public function withPhoneNumber(string $phoneNumber): self
* * `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.
*
* @param Status|value-of<Status> $status
Expand All @@ -379,19 +386,26 @@ public function withAppVersion(string $appVersion): self
}

/**
* 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.
*
* @param list<BlockReason|value-of<BlockReason>> $blockReasons
*/
Expand Down
34 changes: 24 additions & 10 deletions src/Verification/Phone/History/HistoryGetResponse/BlockReason.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,41 @@

enum BlockReason: string
{
case BEHAVIORAL_PATTERN = 'behavioral_pattern';
case AUTOMATION_SIGNATURE = 'automation_signature';

case DEVICE_ATTRIBUTE = 'device_attribute';
case CARRIER_NOT_PERMITTED = 'carrier_not_permitted';

case CLIENT_FINGERPRINT_MISMATCH = 'client_fingerprint_mismatch';

case CUSTOM_POLICY = 'custom_policy';

case DEVICE_EMULATOR = 'device_emulator';

case DEVICE_NOT_PERMITTED = 'device_not_permitted';

case DEVICE_REUSE = 'device_reuse';

case EXPIRED_SIGNALS = 'expired_signals';

case FRAUD_DATABASE = 'fraud_database';

case LOCATION_DISCREPANCY = 'location_discrepancy';
case INVALID_SIGNATURE = 'invalid_signature';

case MISSING_SIGNALS = 'missing_signals';
case IP_CONCENTRATION = 'ip_concentration';

case NETWORK_FINGERPRINT = 'network_fingerprint';
case IP_REPUTATION = 'ip_reputation';

case POOR_CONVERSION_HISTORY = 'poor_conversion_history';
case LOCATION_MISMATCH = 'location_mismatch';

case PREFIX_CONCENTRATION = 'prefix_concentration';
case MISSING_SIGNALS = 'missing_signals';

case REPEATED_NUMBER = 'repeated_number';
case NUMBER_RANGE_ABUSE = 'number_range_abuse';

case POOR_CONVERSION_HISTORY = 'poor_conversion_history';

case SUSPECTED_REQUEST_TAMPERING = 'suspected_request_tampering';
case PROXY_NETWORK = 'proxy_network';

case SUSPICIOUS_IP_ADDRESS = 'suspicious_ip_address';
case REPEATED_ATTEMPTS = 'repeated_attempts';

case TEMPORARY_PHONE_NUMBER = 'temporary_phone_number';
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* * `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.
*/
enum Status: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ final class Verification implements 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.
*
* @var value-of<Status> $status
Expand Down Expand Up @@ -275,7 +275,7 @@ public function withPhoneNumber(string $phoneNumber): self
* * `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.
*
* @param Status|value-of<Status> $status
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* * `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.
*/
enum Status: string
Expand Down
Loading
Loading