@zinn-digital/sdk 0.1.1928 → 0.1.1931

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.
@@ -100277,6 +100277,42 @@ export interface components {
100277
100277
  charge_currencies?: {
100278
100278
  [key: string]: string;
100279
100279
  };
100280
+ /** @description `getOrderPaymentOptions` only (owner 2026-11-18: crypto is USD only at checkout, docs/311). `null` when crypto is not offered for this order or the order is already USD. Otherwise either the EXACT USD quote a crypto payment would charge (`available: true`), which the customer confirms by sending `total_minor` as `payOrder.expected_usd_total_minor`, or `available: false` with why this order cannot be switched to USD (crypto stays offered; the screen shows `message`). */
100281
+ crypto_usd?: {
100282
+ available: boolean;
100283
+ /**
100284
+ * @description Always `USD` when available.
100285
+ * @example USD
100286
+ */
100287
+ currency?: string;
100288
+ /** @description The refusal, rendered in the request's locale. */
100289
+ message?: string;
100290
+ /** @example refusal.commerce.cryptoUsdUnavailable */
100291
+ message_key?: string;
100292
+ /** @example TRY */
100293
+ order_currency?: string;
100294
+ /**
100295
+ * @description The order's total in its own currency, before conversion.
100296
+ * @example 210000
100297
+ */
100298
+ order_total_minor?: number;
100299
+ /** Format: date */
100300
+ rate_date?: string | null;
100301
+ /** @description When unavailable, the machine reason: `order_status`, `invoice_issued`, `payment_exists`, `authorisation_in_flight`, `fulfilment_exists`, `refund_exists`, `linked_amount`, or `no_rate`. */
100302
+ reason?: string;
100303
+ /** @example 1000 */
100304
+ tax_minor?: number;
100305
+ /**
100306
+ * @description The exact USD total, tax included, in minor units.
100307
+ * @example 6000
100308
+ */
100309
+ total_minor?: number;
100310
+ /**
100311
+ * @description Decimal string, one major unit of `order_currency` in USD.
100312
+ * @example 0.0285714
100313
+ */
100314
+ usd_rate?: string;
100315
+ } | null;
100280
100316
  /** @description Provider codes (`stripe`, `paypal`, `nowpayments`). Never empty — `stripe` is always present, because an unreadable provider registry must not be reported as "nothing is enabled". */
100281
100317
  gateways: string[];
100282
100318
  /**
@@ -113623,6 +113659,16 @@ export interface components {
113623
113659
  index_state: "indexed" | "not_indexed" | "unknown" | "never_checked" | "not_entitled";
113624
113660
  /** @description When the Moz reading was taken. */
113625
113661
  moz_measured_at?: string | null;
113662
+ /**
113663
+ * @description The number of search phrases that traffic comes from, same reading.
113664
+ * @example 2210
113665
+ */
113666
+ organic_keywords?: number | null;
113667
+ /**
113668
+ * @description Estimated monthly search visits to the site's domain, WORLDWIDE (every market at once), measured by the platform 3 days after the site went live and every 30 days. 0 is a real reading. null with `traffic_measured_at` set means we looked and the domain has no search data; null with `traffic_measured_at` null is not measured yet.
113669
+ * @example 104123
113670
+ */
113671
+ organic_traffic?: number | null;
113626
113672
  /**
113627
113673
  * @description Moz Page Authority of the site's homepage, 1-100, from the same reading.
113628
113674
  * @example 31
@@ -113670,6 +113716,8 @@ export interface components {
113670
113716
  * @example 1
113671
113717
  */
113672
113718
  spam_score?: number | null;
113719
+ /** @description When the search-traffic reading was taken. */
113720
+ traffic_measured_at?: string | null;
113673
113721
  /**
113674
113722
  * @description Trust Flow, 0-100. **Null means the provider did not supply it**; `0` means it measured zero. Only present when `seo_state` is `measured`.
113675
113723
  * @example 24
@@ -119235,7 +119283,7 @@ export interface components {
119235
119283
  TrialEligibility: {
119236
119284
  /** @description ⚖️ 2026-10-21 (ZEAB2): a verified payment method we can charge off-session later is already on file for this org (a Stripe card, wallet, SEPA, Link, Revolut Pay or Amazon Pay mandate, or a vaulted PayPal account; never charged), so a `requires_card` trial can start without the card step. s1014 row 145: any gateway, not only Stripe. */
119237
119285
  card_on_file?: boolean;
119238
- /** @description The crypto alternative to the card step: deposit `amount_minor` `currency` (the plan's first monthly price, never below the smallest wallet top-up; a settled deposit of the first month is what starts the trial) through `POST /v1/wallet/top-ups` with `gateway: nowpayments`. `null` when the trial needs no card, the plan has no monthly price in the caller's currency, or no crypto rail is enabled. */
119286
+ /** @description The crypto alternative to the card step: deposit `amount_minor` `currency` (the plan's first monthly price, never below the smallest wallet top-up; a settled deposit of the first month is what starts the trial) through `POST /v1/wallet/top-ups` with `gateway: nowpayments`. ⛔ Always `USD`, whatever the caller's currency: crypto is taken in US dollars only, and a USD deposit is measured against the plan's USD first month. `null` when the trial needs no card, the plan has no USD monthly price, or no crypto rail is enabled. */
119239
119287
  crypto_prepay?: {
119240
119288
  /**
119241
119289
  * Format: int64
@@ -121791,7 +121839,7 @@ export interface components {
121791
121839
  /** @description The option set on every line in that category (`V2`). */
121792
121840
  app_tracking_option: string;
121793
121841
  /**
121794
- * @description `RAIL:CURRENCY` → the Xero **AccountID** each rail's money is paid into when a finalised period is settled (docs/311). ⛔ An AccountID, never a name: three apps post into one Xero organisation, and a name pick put another app's crypto into V2's account (ZH-4323). An absent key means that rail+currency is not settled by code; a configured id that is missing, archived or in another currency refuses that payment.
121842
+ * @description `RAIL:CURRENCY` → the Xero **AccountID** each rail's money is paid into when a finalised period is settled (docs/311). ⛔ An AccountID, never a name: three apps post into one Xero organisation, and a name pick put another app's crypto into V2's account (ZH-4323). An absent key means that rail+currency is not settled by code; a configured id that is missing, archived or in another currency refuses that payment. ⛔ Crypto is settled in USD only: a `NOWPAYMENTS:<non-USD>` key is refused with 422 `refusal.accounting.cryptoClearingUsdOnly` and nothing is saved.
121795
121843
  * @example {
121796
121844
  * "NOWPAYMENTS:USD": "96ade7e4-bb78-4fb7-8996-4f915bd9661f"
121797
121845
  * }
@@ -193105,6 +193153,11 @@ export interface operations {
193105
193153
  requestBody?: {
193106
193154
  content: {
193107
193155
  "application/json": {
193156
+ /**
193157
+ * @description Crypto is priced and invoiced in USD only (owner 2026-11-18, docs/311). When `gateway` is `nowpayments` and the unpaid order is in another currency, the exact USD total (minor units) the customer confirmed from `getOrderPaymentOptions.crypto_usd.total_minor`. The order is converted to USD in place only when this equals the engine's current quote; otherwise `422` with `details[0].code = USD_CONFIRMATION_REQUIRED` and `details[0].message` = the current exact USD total, nothing charged and nothing converted. Ignored for any other rail or a USD order.
193158
+ * @example 6000
193159
+ */
193160
+ expected_usd_total_minor?: number;
193108
193161
  /**
193109
193162
  * @description The rail to settle on (`stripe`, `paypal`, `nowpayments`). Omit to use the org's nominated payment method. `422` if it is not one of this order's `getOrderPaymentOptions`.
193110
193163
  * @example paypal
@@ -193149,7 +193202,7 @@ export interface operations {
193149
193202
  "application/json": components["schemas"]["Error"];
193150
193203
  };
193151
193204
  };
193152
- /** @description The order is in a state that cannot be paid (canceled, refunding, draft), or `gateway` names a rail this order may not be settled on, or the card's share is under the gateway's smallest charge and account credit cannot cover the whole order (docs/31 §4.4), or the gateway answered and refused the charge. Nothing was charged and any account credit drawn was given back. `refusal.commerce.priorPaymentHeld` (STRIPEFIX r3, docs/05): the previous attempt cannot be resolved safely (the gateway no longer knows it, or it captured another amount), so nothing new was attempted and staff were alerted; the message quotes the order reference. */
193205
+ /** @description The order is in a state that cannot be paid (canceled, refunding, draft), or `gateway` names a rail this order may not be settled on, or the card's share is under the gateway's smallest charge and account credit cannot cover the whole order (docs/31 §4.4), or the gateway answered and refused the charge. Nothing was charged and any account credit drawn was given back. `refusal.commerce.priorPaymentHeld` (STRIPEFIX r3, docs/05): the previous attempt cannot be resolved safely (the gateway no longer knows it, or it captured another amount), so nothing new was attempted and staff were alerted; the message quotes the order reference. On the crypto rail for a non-USD order, `details[0].code` is `USD_CONFIRMATION_REQUIRED` (send `expected_usd_total_minor` equal to `details[0].message`) or `CRYPTO_USD_UNAVAILABLE` (the order cannot be switched to USD: `details[0].message` names why, e.g. account credit applied, a coupon, or no exchange rate; pay by card). */
193153
193206
  422: {
193154
193207
  headers: {
193155
193208
  [name: string]: unknown;
@@ -208166,7 +208219,7 @@ export interface operations {
208166
208219
  /** @description Only sites whose newest Moz Spam Score (percent) is at least this. s1014 MOZ-V2. A site Moz has not measured is excluded by any bound on that metric (not measured is never 0). Applied across the whole collection. */
208167
208220
  min_spam?: number;
208168
208221
  /** @description Sort key, optionally `-`-prefixed for descending. Defaults to `-created` (newest first). Sorting is applied across the whole collection and the cursor carries the sort position, so paging a sorted list is exact. An unrecognised key is a 422, never a silent fall back to the default. */
208169
- ordering?: "domain" | "-domain" | "name" | "-name" | "status" | "-status" | "line" | "-line" | "stack" | "-stack" | "region" | "-region" | "plan" | "-plan" | "created" | "-created" | "authority" | "-authority" | "indexed" | "-indexed" | "da" | "-da" | "pa" | "-pa" | "spam" | "-spam";
208222
+ ordering?: "domain" | "-domain" | "name" | "-name" | "status" | "-status" | "line" | "-line" | "stack" | "-stack" | "region" | "-region" | "plan" | "-plan" | "created" | "-created" | "authority" | "-authority" | "indexed" | "-indexed" | "da" | "-da" | "pa" | "-pa" | "spam" | "-spam" | "traffic" | "-traffic";
208170
208223
  /** @description Restrict to one organization in scope (default — the whole subtree). */
208171
208224
  org_id?: components["schemas"]["Uuid"];
208172
208225
  /** @description Filter by product line code (e.g. `footprint_free`, `mainstream`). */
@@ -223637,7 +223690,15 @@ export interface operations {
223637
223690
  401: components["responses"]["Unauthorized"];
223638
223691
  403: components["responses"]["Forbidden"];
223639
223692
  404: components["responses"]["NotFound"];
223640
- 422: components["responses"]["UnprocessableEntity"];
223693
+ /** @description The top-up cannot be started. `details[0].code` `CRYPTO_USD_ONLY` (owner 2026-11-18, docs/311): a crypto (`nowpayments`) top-up of a non-USD balance is refused before anything is charged, because crypto is priced in USD only; top up by card or PayPal, or hold a USD balance. */
223694
+ 422: {
223695
+ headers: {
223696
+ [name: string]: unknown;
223697
+ };
223698
+ content: {
223699
+ "application/json": components["schemas"]["Error"];
223700
+ };
223701
+ };
223641
223702
  429: components["responses"]["TooManyRequests"];
223642
223703
  };
223643
223704
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zinn-digital/sdk",
3
- "version": "0.1.1928",
3
+ "version": "0.1.1931",
4
4
  "description": "Typed TypeScript client for the Zinn Digital Platform API, generated from its OpenAPI spec.",
5
5
  "license": "MIT",
6
6
  "author": "Neil Lock \u2014 CEO, Zinn Digital\u00ae Ltd <office@zinndigital.com>",