@zinn-digital/sdk 0.1.1971 → 0.1.1972

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.
@@ -82317,7 +82317,8 @@ export interface components {
82317
82317
  billing_country?: string | null;
82318
82318
  /**
82319
82319
  * Format: int64
82320
- * @description The order total the checkout page **displayed to the customer**, in minor units. Send it and checkout refuses with `422` when the basket no longer comes to that figure; omit it and the order is placed at whatever the basket prices to, which is the behaviour every client had before this field existed.
82320
+ * @description The order total the checkout page **displayed to the customer**, in minor units, tax included (`POST /v1/pricing/tax-quote` `{cart_id}` → `gross_total_minor`). Checkout refuses with `422` when the basket no longer comes to that figure.
82321
+ * ⛔ **Becoming required** (CHKFIX-A, 2026-11-22). While the engine setting `CHECKOUT_REQUIRE_EXPECTED_TOTAL` is off (the default) a request without it is accepted, logged and counted in `checkout_expected_total_missing_total{endpoint}`. Once it is on, a request without it is refused `400` with `details[0].field = expected_total_minor` and `details[0].code = EXPECTED_TOTAL_REQUIRED` (key `refusal.commerce.expectedTotalRequired`) before anything is placed. A sent value that differs is refused `422 TOTAL_CHANGED` in both states. Every client should send it now.
82321
82322
  *
82322
82323
  * The basket is re-priced at the moment of placement — deliberately, because a basket that quotes last week's price and charges it is a dispute — so a page left open while a price **rises** would otherwise charge a total the customer never saw. The refusal happens **before the order row is created**, so nothing is placed, nothing is charged and there is nothing to reconcile: the client reloads the basket and shows the new figure.
82323
82324
  * The refusal is `422` with `details[0].field = expected_total_minor` and `details[0].code = TOTAL_CHANGED` (key `refusal.commerce.totalChanged`). A hosting/SEO coupon in the basket that stopped applying (docs/1311: a cap reached, an expiry, a deactivation) is refused whether or not this field is sent — `details[0].field = promo_code` — so the order is never placed at the full price silently.
@@ -103856,6 +103857,7 @@ export interface components {
103856
103857
  /**
103857
103858
  * Format: int64
103858
103859
  * @description The order total (tax included, minor units) the checkout page displayed. When sent and the placed order would total anything else, checkout refuses `422` with `details[0].code = TOTAL_CHANGED` before any order is placed, and nothing is charged: the visitor is shown the new total and confirms again (docs/1311).
103860
+ * ⛔ **Becoming required** (CHKFIX-A, 2026-11-22). While the engine setting `CHECKOUT_REQUIRE_EXPECTED_TOTAL` is off (the default) a request without it is accepted, logged and counted in `checkout_expected_total_missing_total{endpoint}`. Once it is on, a request without it is refused `400` with `details[0].field = expected_total_minor` and `details[0].code = EXPECTED_TOTAL_REQUIRED` (key `refusal.commerce.expectedTotalRequired`) before anything is placed. A sent value that differs is refused `422 TOTAL_CHANGED` in both states. Every client should send it now.
103859
103861
  * @example 7999
103860
103862
  */
103861
103863
  expected_total_minor?: number | null;
@@ -171203,6 +171205,15 @@ export interface operations {
171203
171205
  "application/json": components["schemas"]["Order"];
171204
171206
  };
171205
171207
  };
171208
+ /** @description The request is malformed. Includes (`error.details[0].code` `EXPECTED_TOTAL_REQUIRED`, `field: expected_total_minor`, CHKFIX-A) a checkout that did not send the total the customer was shown, once the engine setting `CHECKOUT_REQUIRE_EXPECTED_TOTAL` is on; the keyed message (`refusal.commerce.expectedTotalRequired`) asks the customer to reload. Nothing was placed and nothing was charged. */
171209
+ 400: {
171210
+ headers: {
171211
+ [name: string]: unknown;
171212
+ };
171213
+ content: {
171214
+ "application/json": components["schemas"]["Error"];
171215
+ };
171216
+ };
171206
171217
  401: components["responses"]["Unauthorized"];
171207
171218
  403: components["responses"]["Forbidden"];
171208
171219
  404: components["responses"]["NotFound"];
@@ -200652,6 +200663,15 @@ export interface operations {
200652
200663
  "application/json": components["schemas"]["PublicCheckoutResult"];
200653
200664
  };
200654
200665
  };
200666
+ /** @description The request is malformed. Includes (`error.details[0].code` `EXPECTED_TOTAL_REQUIRED`, `field: expected_total_minor`, CHKFIX-A) a checkout that did not send the total the customer was shown, once the engine setting `CHECKOUT_REQUIRE_EXPECTED_TOTAL` is on; the keyed message (`refusal.commerce.expectedTotalRequired`) asks the customer to reload. Nothing was placed and nothing was charged. */
200667
+ 400: {
200668
+ headers: {
200669
+ [name: string]: unknown;
200670
+ };
200671
+ content: {
200672
+ "application/json": components["schemas"]["Error"];
200673
+ };
200674
+ };
200655
200675
  /** @description The buyer's e-mail address is refused (`SIGNUP_EMAIL_REFUSED`, docs/1174): a disposable, invalid or spam-trap address. Nothing was created and the basket stays. For a likely typo in the domain, `details[0]` is `{field: email, code: EMAIL_POSSIBLE_TYPO, suggestion}`: `suggestion` is the same address on the domain the validator suggested ("ann@gmail.com" for "ann@gamil.com"), which the page offers as a one-click fix before the buyer submits again (EMAILTYPO). */
200656
200676
  403: {
200657
200677
  headers: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zinn-digital/sdk",
3
- "version": "0.1.1971",
3
+ "version": "0.1.1972",
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>",