@distyra/sdk 0.6.1 → 0.7.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.
Files changed (2) hide show
  1. package/dist/generated.d.ts +24 -14
  2. package/package.json +1 -1
@@ -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; fields not yet available (logos, location, subscription) are returned as `null`/`false` and flagged. `metadata.is_subscription` is a merchant-category hint, not per-transaction recurrence,as unavailable. Confidence values are uncalibrated similarity scores.
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 `X-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.
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`. `X-Idempotency-Key` is honored for retry-safety.
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
- * "primary": "#0FAEEF"
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": false,
1371
+ * "logos": true,
1369
1372
  * "location": false,
1370
- * "subscription_detection": false
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
- [key: string]: unknown;
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 a single charge at a subscription merchant may still be a one-off. True only for conservatively curated brands; false also means "not flagged / unknown". Per-account recurrence detection needs the transaction series and lives in the banking/iOS layer, not this stateless API. */
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;
@@ -7200,8 +7209,9 @@ export interface operations {
7200
7209
  domain: string | null;
7201
7210
  logo_url: string | null;
7202
7211
  brand_colors: {
7203
- [key: string]: unknown;
7204
- };
7212
+ hex: string;
7213
+ source: string;
7214
+ }[];
7205
7215
  industry: string | null;
7206
7216
  subindustries: string[];
7207
7217
  primary_mcc: string | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@distyra/sdk",
3
- "version": "0.6.1",
3
+ "version": "0.7.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",