From 6ad7a2a421047b6164493ae31e178b52f14628cd Mon Sep 17 00:00:00 2001 From: Gregory Oschwald Date: Tue, 1 Dec 2026 22:08:45 +0000 Subject: [PATCH 1/2] Deprecate ShippingAddress.isHighRisk The minFraud web service is removing shipping_address.is_high_risk from its responses. Mark the property deprecated for removal in 10.0.0. Keep its type, because widening it to optional could break code that compiles today. The old comment described is_in_ip_country. Replace it with the deprecation notice. STF-2532 Co-Authored-By: Claude Opus 5.5 --- CHANGELOG.md | 3 +++ src/response/records.ts | 10 ++++++---- src/response/web-records.ts | 1 + 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 23fd7186..600683cd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,9 @@ CHANGELOG 9.3.0 (unreleased) ------------------ +* Deprecated the `isHighRisk` property on `response.shippingAddress`. The + minFraud web service is removing the `shipping_address.is_high_risk` field + from its responses. The property will be removed in 10.0.0. * Updated the documentation for the email and phone verification inputs. Set `wasVerificationSuccessful` and `phoneWasVerificationSuccessful` to `true` if your system considers the email address or phone number verified as of diff --git a/src/response/records.ts b/src/response/records.ts index 2dfaf207..43067899 100644 --- a/src/response/records.ts +++ b/src/response/records.ts @@ -335,10 +335,12 @@ export interface Phone { */ export interface ShippingAddress { /** - * This property is `true` if the shipping address is in the IP country. The - * property is `false` when the address is not in the IP country. If the - * shipping address could not be parsed or was not provided or the IP address - * could not be geolocated, then the property is `null`. + * This is `true` if the shipping address is associated with fraudulent + * transactions. The minFraud web service deprecated this field. This is + * `undefined` when the web service does not return it. + * + * @category Deprecated + * @deprecated This property will be removed in 10.0.0. */ readonly isHighRisk: boolean; /** diff --git a/src/response/web-records.ts b/src/response/web-records.ts index c2cc302b..24de5fd5 100644 --- a/src/response/web-records.ts +++ b/src/response/web-records.ts @@ -108,6 +108,7 @@ export interface EmailWebRecord { } export interface ShippingAddressWebRecord { + /** @deprecated This property will be removed in 10.0.0. */ readonly is_high_risk: boolean; readonly is_postal_in_city?: boolean; readonly latitude: number; From 01b173bece9e6614c8a1ac7e6234df697baa3185 Mon Sep 17 00:00:00 2001 From: Gregory Oschwald Date: Wed, 2 Dec 2026 18:03:27 +0000 Subject: [PATCH 2/2] Say undefined, not null, for missing address properties The client does not add keys that the web service leaves out, so a missing isPostalInCity or isInIpCountry is undefined, not null. This matches the new isHighRisk comment. STF-2532 Co-Authored-By: Claude Opus 5.5 --- src/response/records.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/response/records.ts b/src/response/records.ts index 43067899..394830c9 100644 --- a/src/response/records.ts +++ b/src/response/records.ts @@ -347,7 +347,7 @@ export interface ShippingAddress { * This property is `true` if the postal code provided with the address is in * the city for the address. The property is `false` when the postal code is * not in the city. If the address was not provided or could not be parsed, - * the property will be `null`. + * the property is `undefined`. */ readonly isPostalInCity?: boolean; /** @@ -370,7 +370,7 @@ export interface ShippingAddress { * This property is `true` if the address is in the IP country. The property * is `false` when the address is not in the IP country. If the address could * not be parsed or was not provided or if the IP address could not be - * geolocated, the property will be `null`. + * geolocated, the property is `undefined`. */ readonly isInIpCountry?: boolean; } @@ -380,7 +380,7 @@ export interface BillingAddress { * This property is `true` if the postal code provided with the address is in * the city for the address. The property is `false` when the postal code is * not in the city. If the address was not provided or could not be parsed, - * the property will be `null`. + * the property is `undefined`. */ readonly isPostalInCity?: boolean; /** @@ -399,7 +399,7 @@ export interface BillingAddress { * This property is `true` if the address is in the IP country. The property * is `false` when the address is not in the IP country. If the address could * not be parsed or was not provided or if the IP address could not be - * geolocated, the property will be `null`. + * geolocated, the property is `undefined`. */ readonly isInIpCountry?: boolean; }