@zinn-digital/sdk 0.1.2038 → 0.1.2040

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.
@@ -47386,6 +47386,26 @@ export interface paths {
47386
47386
  patch?: never;
47387
47387
  trace?: never;
47388
47388
  };
47389
+ "/v1/public/checkout/order-status": {
47390
+ parameters: {
47391
+ query?: never;
47392
+ header?: never;
47393
+ path?: never;
47394
+ cookie?: never;
47395
+ };
47396
+ get?: never;
47397
+ put?: never;
47398
+ /**
47399
+ * Read a guest order's real payment state back after checkout.
47400
+ * @description ORDERCONF-1121. The storefront's order-complete page asks this before it says anything about an order, so a buyer whose order is still `pending_payment` is told to finish paying instead of "your order is confirmed". Authorised by the `status_token` the checkout returned (never the order id alone), sent in the BODY so it stays out of access logs and `Referer`. Reads only: nothing is charged, sent or changed. A forged, foreign or unknown token and a missing order are the same `404`.
47401
+ */
47402
+ post: operations["publicCheckoutOrderStatus"];
47403
+ delete?: never;
47404
+ options?: never;
47405
+ head?: never;
47406
+ patch?: never;
47407
+ trace?: never;
47408
+ };
47389
47409
  "/v1/public/client-portal/{token}": {
47390
47410
  parameters: {
47391
47411
  query?: {
@@ -48359,6 +48379,7 @@ export interface paths {
48359
48379
  * A visitor may send the `vat_number` they typed at checkout. The server asks the registry itself and prices on that answer, returned as `vat_check` with a signed `pin`. `POST /v1/public/checkout` takes the pin back as `billing.vat_pin` and prices the order on the same answer, so the quote and the order always agree. When the registry cannot be reached the quote is priced **with** VAT and says so (`vat_check.status: unavailable`); it never refuses the quote.
48360
48380
  *
48361
48381
  * Country comes from the request body or Cloudflare's `CF-IPCountry`. The answer is always `estimated: true` — a pricing page runs on a geo hint, and the charge is rated again at checkout against real place-of-supply evidence.
48382
+ * A quote already answered for the same items, currency, country and `per_item` is served from a short-lived cache (5 minutes) and does not count against the caller's rate limit; a request carrying `vat_number` is never served from it. A `429` is only returned to a caller asking for many DISTINCT quotes.
48362
48383
  */
48363
48384
  post: operations["quotePublicTaxDisplay"];
48364
48385
  delete?: never;
@@ -105664,6 +105685,8 @@ export interface components {
105664
105685
  order_id: components["schemas"]["Uuid"];
105665
105686
  /** @description The organization created by this call — the customer's new tenant. */
105666
105687
  org_id: components["schemas"]["Uuid"];
105688
+ /** @description ORDERCONF-1121. The capability that reads THIS order's real payment state back through `POST /v1/public/checkout/order-status`, which the confirmation page does before it says anything about the order. Opaque, signed by the engine; it reaches one order and carries no personal data. Keep it out of URLs. */
105689
+ status_token?: string;
105667
105690
  /** @description The order's net amount, in minor units. */
105668
105691
  subtotal_minor: number;
105669
105692
  /** @description The tax computed for `billing.country`, in minor units. A guest basket has no country, so this is the first moment the tax exists — show it. */
@@ -105899,6 +105922,23 @@ export interface components {
105899
105922
  /** @enum {string} */
105900
105923
  wording_version: "news-v1";
105901
105924
  };
105925
+ /** @description A guest order's payment state as the buyer must read it (ORDERCONF-1121). No personal data: who placed it is never part of the answer. */
105926
+ PublicOrderStatus: {
105927
+ /** @description ISO 4217 code of the order. */
105928
+ currency: string;
105929
+ order_id: components["schemas"]["Uuid"];
105930
+ /**
105931
+ * @description `paid` — the money is in (paid, being delivered, delivered). `payment_due` — nothing has arrived, including a card the bank wants authenticated: pay now (card, PayPal or crypto). `processing` — payment is on its way and must NOT be repeated (crypto seen and confirming, a card authorised, a PayPal payment approved and not yet settled). `failed` — the payment failed; try again or another method. `closed` — canceled (an unpaid order is canceled after 7 days) or refunded.
105932
+ * @enum {string}
105933
+ */
105934
+ state: "paid" | "payment_due" | "processing" | "failed" | "closed";
105935
+ /** @description What the order owes, tax included, in minor units. */
105936
+ total_minor: number;
105937
+ };
105938
+ PublicOrderStatusRequest: {
105939
+ /** @description The `status_token` from `POST /v1/public/checkout`. */
105940
+ status_token: string;
105941
+ };
105902
105942
  /** @description The cheapest figure a Zinn® Private Cloud size is sold at, at one cadence. */
105903
105943
  PublicOwnCloudComputePrice: {
105904
105944
  /**
@@ -204570,6 +204610,33 @@ export interface operations {
204570
204610
  };
204571
204611
  };
204572
204612
  };
204613
+ publicCheckoutOrderStatus: {
204614
+ parameters: {
204615
+ query?: never;
204616
+ header?: never;
204617
+ path?: never;
204618
+ cookie?: never;
204619
+ };
204620
+ requestBody: {
204621
+ content: {
204622
+ "application/json": components["schemas"]["PublicOrderStatusRequest"];
204623
+ };
204624
+ };
204625
+ responses: {
204626
+ /** @description The order's payment state. */
204627
+ 200: {
204628
+ headers: {
204629
+ [name: string]: unknown;
204630
+ };
204631
+ content: {
204632
+ "application/json": components["schemas"]["PublicOrderStatus"];
204633
+ };
204634
+ };
204635
+ 404: components["responses"]["NotFound"];
204636
+ 422: components["responses"]["UnprocessableEntity"];
204637
+ 429: components["responses"]["TooManyRequests"];
204638
+ };
204639
+ };
204573
204640
  viewClientPortal: {
204574
204641
  parameters: {
204575
204642
  query?: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zinn-digital/sdk",
3
- "version": "0.1.2038",
3
+ "version": "0.1.2040",
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>",