@vesant-sdk/fraud 0.1.3-dev.80b25e7 → 0.1.3-dev.8d65fa4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -5
- package/package.json +4 -1
package/README.md
CHANGED
|
@@ -65,9 +65,9 @@ Types such as `$verification` appear in the Vesant dashboard but are **not** acc
|
|
|
65
65
|
| `billing_address` | `metadata.$billing_address` | Nested keys prefixed with `$` on the wire |
|
|
66
66
|
| `app` | `metadata.$app` | Mobile clients |
|
|
67
67
|
| `ip_address`, `device_id`, `user_agent` | top-level | Optional |
|
|
68
|
-
| `metadata` | `metadata` | Plain Vesant rule signals and optional `$…`
|
|
68
|
+
| `metadata` | `metadata` | Plain Vesant rule signals and optional `$…` reserved-key pass-through |
|
|
69
69
|
|
|
70
|
-
Prefer typed fields for common
|
|
70
|
+
Prefer typed fields for common reserved keys. Typed fields win if the same key appears in `metadata`.
|
|
71
71
|
|
|
72
72
|
### Rule signals (SDK-supplied)
|
|
73
73
|
|
|
@@ -79,7 +79,7 @@ Prefer typed fields for common Sift keys. Typed fields win if the same key appea
|
|
|
79
79
|
|
|
80
80
|
Do **not** send `new_device_added`, `email_changed`, `customer_age_years`, or `kyc_status` — Vesant derives or ignores these server-side.
|
|
81
81
|
|
|
82
|
-
### Event-specific
|
|
82
|
+
### Event-specific reserved fields
|
|
83
83
|
|
|
84
84
|
Typed on the request and normalized into `metadata.$*` on the wire:
|
|
85
85
|
|
|
@@ -197,9 +197,9 @@ await fraud.scoreEvent({
|
|
|
197
197
|
|
|
198
198
|
### Payment method normalization
|
|
199
199
|
|
|
200
|
-
The SDK normalizes `payment_methods` and `sift_payment_method` before wire emit (on by default). Tenants can send internal shapes; invalid
|
|
200
|
+
The SDK normalizes `payment_methods` and `sift_payment_method` before wire emit (on by default). Tenants can send internal shapes; invalid keys are mapped or moved to plain metadata.
|
|
201
201
|
|
|
202
|
-
| Mistake |
|
|
202
|
+
| Mistake | Wire error | SDK fix |
|
|
203
203
|
|---------|------------|---------|
|
|
204
204
|
| `payment_type: '$bank_account'` | Invalid `$payment_type` | Auto-mapped to `$electronic_fund_transfer` |
|
|
205
205
|
| `account_number_last4` | Unknown field | Auto-mapped to `account_number_last5` |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vesant-sdk/fraud",
|
|
3
|
-
"version": "0.1.3-dev.
|
|
3
|
+
"version": "0.1.3-dev.8d65fa4",
|
|
4
4
|
"description": "Fraud detection and scoring client for the Vesant Compliance Platform",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -46,5 +46,8 @@
|
|
|
46
46
|
"type": "git",
|
|
47
47
|
"url": "https://github.com/botcalm-compliance/vesant-sdk.git",
|
|
48
48
|
"directory": "typescript/packages/fraud"
|
|
49
|
+
},
|
|
50
|
+
"engines": {
|
|
51
|
+
"node": ">=18"
|
|
49
52
|
}
|
|
50
53
|
}
|