@distyra/sdk 0.6.1 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/generated.d.ts +30 -14
- package/package.json +1 -1
package/dist/generated.d.ts
CHANGED
|
@@ -51,7 +51,7 @@ export interface paths {
|
|
|
51
51
|
put?: never;
|
|
52
52
|
/**
|
|
53
53
|
* Enrich a single transaction
|
|
54
|
-
* @description Single-transaction enrichment. Resolution flow: normalize, then cache, catalog match, classifier, and LLM fallback. Returns the full response shape with an `availability` block
|
|
54
|
+
* @description Single-transaction enrichment. Resolution flow: normalize, then cache, catalog match, classifier, and LLM fallback. Returns the full response shape with an `availability` block. In that block `merchant_identity`, `transaction_type` and `logos` are constants meaning the feature has shipped, while `location` and `subscription_detection` report whether this request had the data the field needs. `metadata.is_subscription` is a merchant-category hint, not per-transaction recurrence, and is null when no merchant resolved. Confidence values are uncalibrated similarity scores.
|
|
55
55
|
*/
|
|
56
56
|
post: operations["enrichSingle"];
|
|
57
57
|
delete?: never;
|
|
@@ -99,7 +99,7 @@ export interface paths {
|
|
|
99
99
|
*
|
|
100
100
|
* **Persistence.** Lender-side only. The features payload is retained for 7-day re-fetch (use GET /v1/underwrite/analyses/:id), then purged. Only billing metadata + the analysis row stay after purge.
|
|
101
101
|
*
|
|
102
|
-
* **Idempotency.** Two surfaces: (1) the standard `
|
|
102
|
+
* **Idempotency.** Two surfaces: (1) the standard `Idempotency-Key` 24h dedup, and (2) a 7-day `(org_id, applicant_id)` window — re-submitting the same applicant_id returns the original result + `billable=false`. After 7 days, treated as a fresh evaluation event.
|
|
103
103
|
*
|
|
104
104
|
* **EUR-only in v1.** Multi-currency submissions return 409 `conflict_currency_mix`.
|
|
105
105
|
*
|
|
@@ -138,7 +138,7 @@ export interface paths {
|
|
|
138
138
|
*
|
|
139
139
|
* **Limits.** 25MB per file. Up to 500 files per submission (raised 2026-05-20 to accommodate German Anlage-3 fan-out where banks emit one CAMT.053 per account per day; same-IBAN fragments consolidate to one logical account before the per-applicant MAX_ACCOUNTS=16 cap applies). 100MB total payload. MAX_TRANSACTIONS=5000 across all parsed accounts.
|
|
140
140
|
*
|
|
141
|
-
* **Idempotency.** Same as JSON-mode — 7-day `(org_id, applicant_id)` re-pull window returns the original analysis with `billable=false`. `
|
|
141
|
+
* **Idempotency.** Same as JSON-mode — 7-day `(org_id, applicant_id)` re-pull window returns the original analysis with `billable=false`. `Idempotency-Key` is honored for retry-safety.
|
|
142
142
|
*
|
|
143
143
|
* Required scope: `underwriting:write`.
|
|
144
144
|
*/
|
|
@@ -1315,9 +1315,12 @@ export interface operations {
|
|
|
1315
1315
|
* "domain": "ah.nl",
|
|
1316
1316
|
* "logo_url": "https://cdn.distyra.com/saas/142/a3f2b9e7d4c1f8a0/v1/light.png?token=…&expires=…",
|
|
1317
1317
|
* "logo_quality_score": 0.8,
|
|
1318
|
-
* "brand_colors":
|
|
1319
|
-
*
|
|
1320
|
-
*
|
|
1318
|
+
* "brand_colors": [
|
|
1319
|
+
* {
|
|
1320
|
+
* "hex": "#0faeef",
|
|
1321
|
+
* "source": "theme_color_meta"
|
|
1322
|
+
* }
|
|
1323
|
+
* ],
|
|
1321
1324
|
* "catalog_id": 142,
|
|
1322
1325
|
* "source": "catalog",
|
|
1323
1326
|
* "confidence_bucket": "high",
|
|
@@ -1365,9 +1368,9 @@ export interface operations {
|
|
|
1365
1368
|
* "availability": {
|
|
1366
1369
|
* "merchant_identity": true,
|
|
1367
1370
|
* "transaction_type": true,
|
|
1368
|
-
* "logos":
|
|
1371
|
+
* "logos": true,
|
|
1369
1372
|
* "location": false,
|
|
1370
|
-
* "subscription_detection":
|
|
1373
|
+
* "subscription_detection": true
|
|
1371
1374
|
* },
|
|
1372
1375
|
* "livemode": true
|
|
1373
1376
|
* }
|
|
@@ -1381,8 +1384,11 @@ export interface operations {
|
|
|
1381
1384
|
logo_url: string | null;
|
|
1382
1385
|
logo_quality_score: number | null;
|
|
1383
1386
|
brand_colors: {
|
|
1384
|
-
|
|
1385
|
-
|
|
1387
|
+
/** @description Lowercase 6-digit hex, leading #. */
|
|
1388
|
+
hex: string;
|
|
1389
|
+
/** @description theme_color_meta | msapplication_tile_meta | pixel_sample */
|
|
1390
|
+
source: string;
|
|
1391
|
+
}[];
|
|
1386
1392
|
catalog_id: number | null;
|
|
1387
1393
|
source: "catalog" | "crawl" | "fuzzy_match" | "llm_inferred" | null;
|
|
1388
1394
|
confidence_bucket: "high" | "medium" | "low" | null;
|
|
@@ -1404,14 +1410,17 @@ export interface operations {
|
|
|
1404
1410
|
country: string | null;
|
|
1405
1411
|
};
|
|
1406
1412
|
metadata: {
|
|
1407
|
-
/** @description Merchant-category hint: true when the resolved merchant predominantly bills on subscription (streaming, SaaS, telco, gym, insurance). This reflects the MERCHANT, not this transaction
|
|
1408
|
-
is_subscription: boolean;
|
|
1413
|
+
/** @description Merchant-category hint: true when the resolved merchant predominantly bills on subscription (streaming, SaaS, telco, gym, insurance). This reflects the MERCHANT, not this transaction: a single charge at a subscription merchant may still be a one-off. True only for conservatively curated brands. NULL means no merchant resolved, so there was no catalog row to consult; false means a row resolved and is not on the curated list. Before 2026-07-16 the unresolved case also reported false, which asserted a negative we had no basis for. Per-account recurrence detection needs the transaction series and lives in the banking/iOS layer, not this stateless API. */
|
|
1414
|
+
is_subscription: boolean | null;
|
|
1409
1415
|
is_marketplace: boolean;
|
|
1410
1416
|
facilitator: string | null;
|
|
1417
|
+
/** @description bank_fee | internal_transfer | p2p_transfer | cash_withdrawal | cash_deposit | investment_transfer | salary | refund | direct_debit | standing_order | returned_dd | merchant_payment. "merchant_payment" is the ordinary-purchase verdict: the rule cascade found no non-merchant type AND a merchant or category resolved, so this is a normal payment to a business. NULL means genuinely undetermined (nothing resolved). Before 2026-07-16 ordinary purchases reported null at confidence 0, indistinguishable from "no idea", while the docs advertised a "merchant_payment" value that was not in the enum and could never be returned. */
|
|
1411
1418
|
transaction_type: string | null;
|
|
1412
1419
|
is_transfer: boolean;
|
|
1413
1420
|
is_bank_internal: boolean;
|
|
1414
1421
|
is_p2p: boolean;
|
|
1422
|
+
counterparty_role: string | null;
|
|
1423
|
+
statutory_kind: string | null;
|
|
1415
1424
|
};
|
|
1416
1425
|
confidence: {
|
|
1417
1426
|
merchant: number | null;
|
|
@@ -1442,11 +1451,17 @@ export interface operations {
|
|
|
1442
1451
|
/** @description Which stage resolved this transaction. 0 = not resolved (echo), 1 = cache hit, 2 = catalog match, 3 = reserved, 4 = LLM fallback. */
|
|
1443
1452
|
cache_tier: number;
|
|
1444
1453
|
processing_time_ms: number;
|
|
1454
|
+
/** @description Per-request summary: did THIS response yield each thing. Every entry is derivable from the payload, so it is a convenience layer, not new information. Changed in 0.8.0: merchant_identity/transaction_type/logos used to be build-time constants meaning "the feature has shipped", hardcoded true on every response, which contradicted the payload (merchant_identity:true beside merchant.name:null). They now report what you actually got. */
|
|
1445
1455
|
availability: {
|
|
1456
|
+
/** @description True when merchant.name is populated (a catalog hit or a Tier-4 proposal). */
|
|
1446
1457
|
merchant_identity: boolean;
|
|
1458
|
+
/** @description True when metadata.transaction_type is populated. Distinct from merchant_identity: a bank fee can be typed with no merchant identified. */
|
|
1447
1459
|
transaction_type: boolean;
|
|
1460
|
+
/** @description True when merchant.logo_url is populated on THIS response. */
|
|
1448
1461
|
logos: boolean;
|
|
1462
|
+
/** @description True when this descriptor yielded a city or country. */
|
|
1449
1463
|
location: boolean;
|
|
1464
|
+
/** @description True when a catalog row resolved, so its subscription flag was available to consult. Equivalently, metadata.is_subscription is not null. */
|
|
1450
1465
|
subscription_detection: boolean;
|
|
1451
1466
|
};
|
|
1452
1467
|
/** @description true when served to a live key; false when served to a test-mode (sk_test_) key. Test-mode responses run the full cascade but carry no billing or quota impact. */
|
|
@@ -7200,8 +7215,9 @@ export interface operations {
|
|
|
7200
7215
|
domain: string | null;
|
|
7201
7216
|
logo_url: string | null;
|
|
7202
7217
|
brand_colors: {
|
|
7203
|
-
|
|
7204
|
-
|
|
7218
|
+
hex: string;
|
|
7219
|
+
source: string;
|
|
7220
|
+
}[];
|
|
7205
7221
|
industry: string | null;
|
|
7206
7222
|
subindustries: string[];
|
|
7207
7223
|
primary_mcc: string | null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@distyra/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0",
|
|
4
4
|
"description": "TypeScript SDK for the Distyra Transaction Enrichment & SME Underwriting API. Generated from the committed OpenAPI spec; thin, typed wrapper around openapi-fetch.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Brightfield Software",
|