@zinn-digital/sdk 0.1.1928 → 0.1.1930
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/schema.d.ts +53 -4
- package/package.json +1 -1
|
@@ -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
|
/**
|
|
@@ -119235,7 +119271,7 @@ export interface components {
|
|
|
119235
119271
|
TrialEligibility: {
|
|
119236
119272
|
/** @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
119273
|
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
|
|
119274
|
+
/** @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
119275
|
crypto_prepay?: {
|
|
119240
119276
|
/**
|
|
119241
119277
|
* Format: int64
|
|
@@ -121791,7 +121827,7 @@ export interface components {
|
|
|
121791
121827
|
/** @description The option set on every line in that category (`V2`). */
|
|
121792
121828
|
app_tracking_option: string;
|
|
121793
121829
|
/**
|
|
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.
|
|
121830
|
+
* @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
121831
|
* @example {
|
|
121796
121832
|
* "NOWPAYMENTS:USD": "96ade7e4-bb78-4fb7-8996-4f915bd9661f"
|
|
121797
121833
|
* }
|
|
@@ -193105,6 +193141,11 @@ export interface operations {
|
|
|
193105
193141
|
requestBody?: {
|
|
193106
193142
|
content: {
|
|
193107
193143
|
"application/json": {
|
|
193144
|
+
/**
|
|
193145
|
+
* @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.
|
|
193146
|
+
* @example 6000
|
|
193147
|
+
*/
|
|
193148
|
+
expected_usd_total_minor?: number;
|
|
193108
193149
|
/**
|
|
193109
193150
|
* @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
193151
|
* @example paypal
|
|
@@ -193149,7 +193190,7 @@ export interface operations {
|
|
|
193149
193190
|
"application/json": components["schemas"]["Error"];
|
|
193150
193191
|
};
|
|
193151
193192
|
};
|
|
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. */
|
|
193193
|
+
/** @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
193194
|
422: {
|
|
193154
193195
|
headers: {
|
|
193155
193196
|
[name: string]: unknown;
|
|
@@ -223637,7 +223678,15 @@ export interface operations {
|
|
|
223637
223678
|
401: components["responses"]["Unauthorized"];
|
|
223638
223679
|
403: components["responses"]["Forbidden"];
|
|
223639
223680
|
404: components["responses"]["NotFound"];
|
|
223640
|
-
|
|
223681
|
+
/** @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. */
|
|
223682
|
+
422: {
|
|
223683
|
+
headers: {
|
|
223684
|
+
[name: string]: unknown;
|
|
223685
|
+
};
|
|
223686
|
+
content: {
|
|
223687
|
+
"application/json": components["schemas"]["Error"];
|
|
223688
|
+
};
|
|
223689
|
+
};
|
|
223641
223690
|
429: components["responses"]["TooManyRequests"];
|
|
223642
223691
|
};
|
|
223643
223692
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zinn-digital/sdk",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1930",
|
|
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>",
|