@distyra/sdk 0.4.0 → 0.5.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.
@@ -34,7 +34,7 @@ export interface paths {
34
34
  put?: never;
35
35
  /**
36
36
  * Enrich a single transaction
37
- * @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/recurring detection) are returned as `null`/`false` and flagged as unavailable. Confidence values are uncalibrated similarity scores.
37
+ * @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.
38
38
  */
39
39
  post: operations["enrichSingle"];
40
40
  delete?: never;
@@ -1041,6 +1041,16 @@ export interface operations {
1041
1041
  * @example true
1042
1042
  */
1043
1043
  cache_only?: "true" | "false";
1044
+ /**
1045
+ * @description When `true` and the request mints a brand-new (cold) merchant, block up to `wait_timeout_ms` for the background logo crawl to finish, then return the real logo instead of `logo_url: null`. No effect for already-known merchants (no new crawl fires). On timeout, returns the normal async response (which carries the low-quality favicon floor when one is available).
1046
+ * @example true
1047
+ */
1048
+ wait_for_crawl?: "true" | "false";
1049
+ /**
1050
+ * @description Upper bound in milliseconds for `wait_for_crawl` (default 8000, max 15000). Ignored unless `wait_for_crawl=true`.
1051
+ * @example 8000
1052
+ */
1053
+ wait_timeout_ms?: string;
1044
1054
  };
1045
1055
  header?: never;
1046
1056
  path?: never;
@@ -1100,9 +1110,11 @@ export interface operations {
1100
1110
  * @example {
1101
1111
  * "merchant": {
1102
1112
  * "name": "Albert Heijn",
1103
- * "parent": null,
1113
+ * "parent": "Ahold Delhaize",
1114
+ * "parent_catalog_id": 9001,
1104
1115
  * "domain": "ah.nl",
1105
1116
  * "logo_url": "https://cdn.distyra.com/saas/142/a3f2b9e7d4c1f8a0/v1/light.png?token=…&expires=…",
1117
+ * "logo_quality_score": 0.8,
1106
1118
  * "brand_colors": {
1107
1119
  * "primary": "#0FAEEF"
1108
1120
  * },
@@ -1127,7 +1139,6 @@ export interface operations {
1127
1139
  * "is_subscription": false,
1128
1140
  * "is_marketplace": false,
1129
1141
  * "facilitator": null,
1130
- * "is_recurring_candidate": false,
1131
1142
  * "transaction_type": "merchant_payment",
1132
1143
  * "is_transfer": false,
1133
1144
  * "is_bank_internal": false,
@@ -1149,8 +1160,7 @@ export interface operations {
1149
1160
  * "transaction_type": true,
1150
1161
  * "logos": false,
1151
1162
  * "location": false,
1152
- * "subscription_detection": false,
1153
- * "recurring_detection": false
1163
+ * "subscription_detection": false
1154
1164
  * },
1155
1165
  * "livemode": true
1156
1166
  * }
@@ -1159,8 +1169,10 @@ export interface operations {
1159
1169
  merchant: {
1160
1170
  name: string | null;
1161
1171
  parent: string | null;
1172
+ parent_catalog_id: number | null;
1162
1173
  domain: string | null;
1163
1174
  logo_url: string | null;
1175
+ logo_quality_score: number | null;
1164
1176
  brand_colors: {
1165
1177
  [key: string]: unknown;
1166
1178
  };
@@ -1185,10 +1197,10 @@ export interface operations {
1185
1197
  country: string | null;
1186
1198
  };
1187
1199
  metadata: {
1200
+ /** @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. */
1188
1201
  is_subscription: boolean;
1189
1202
  is_marketplace: boolean;
1190
1203
  facilitator: string | null;
1191
- is_recurring_candidate: boolean;
1192
1204
  transaction_type: string | null;
1193
1205
  is_transfer: boolean;
1194
1206
  is_bank_internal: boolean;
@@ -1215,7 +1227,6 @@ export interface operations {
1215
1227
  logos: boolean;
1216
1228
  location: boolean;
1217
1229
  subscription_detection: boolean;
1218
- recurring_detection: boolean;
1219
1230
  };
1220
1231
  /** @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. */
1221
1232
  livemode: boolean;
@@ -1327,6 +1338,16 @@ export interface operations {
1327
1338
  * @example true
1328
1339
  */
1329
1340
  cache_only?: "true" | "false";
1341
+ /**
1342
+ * @description When `true` and the request mints a brand-new (cold) merchant, block up to `wait_timeout_ms` for the background logo crawl to finish, then return the real logo instead of `logo_url: null`. No effect for already-known merchants (no new crawl fires). On timeout, returns the normal async response (which carries the low-quality favicon floor when one is available).
1343
+ * @example true
1344
+ */
1345
+ wait_for_crawl?: "true" | "false";
1346
+ /**
1347
+ * @description Upper bound in milliseconds for `wait_for_crawl` (default 8000, max 15000). Ignored unless `wait_for_crawl=true`.
1348
+ * @example 8000
1349
+ */
1350
+ wait_timeout_ms?: string;
1330
1351
  };
1331
1352
  header?: never;
1332
1353
  path?: never;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@distyra/sdk",
3
- "version": "0.4.0",
3
+ "version": "0.5.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",