@zinn-digital/sdk 0.1.1925 → 0.1.1928

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.
@@ -43901,6 +43901,8 @@ export interface paths {
43901
43901
  * The response carries whichever credential the chosen rail needs: `client_token` is a card intent's client secret for the browser SDK, `redirect_url` is an approval page for PayPal or a crypto invoice. `settled: true` means the total was zero and the order completed with no gateway at all.
43902
43902
  *
43903
43903
  * ⛔ Nothing here captures money and nothing here decides an order is paid. The gateway's webhook does both, exactly as it does for every other order on the platform.
43904
+ *
43905
+ * ⛔ This link needs no sign-in, so it never charges a payment method the payer org stored earlier, on any rail (a saved card, a saved PayPal account), and never draws the org's account credit: the first press always answers with the step where the payer presents a payment. A refusal carries its code in `error.details[].code` (`field: payment`) and is recorded on the audit log.
43904
43906
  */
43905
43907
  post: operations["startDirectInvoicePayment"];
43906
43908
  delete?: never;
@@ -43920,11 +43922,11 @@ export interface paths {
43920
43922
  put?: never;
43921
43923
  /**
43922
43924
  * The payer entered a card — record it and take the money. Unauthenticated.
43923
- * @description The second half of a two-step that cannot be collapsed into one. A payer with no card on file gets a **SetupIntent** from `/checkout`, confirms it in the browser, and lands here; this records the mandate and then charges the order.
43925
+ * @description The second half of a two-step that cannot be collapsed into one. The card rail of `/checkout` always answers with a **SetupIntent** (`status: setup_required`, nothing charged), whether or not the payer's organization already has a saved card: this link is public, so a saved card is never charged from it. The payer confirms the intent in the browser and lands here; this records the mandate and charges ONLY that card (never a saved one, and never another saved one after this card is declined).
43924
43926
  *
43925
43927
  * Charging on the first call instead would put a failed payment on the order — this platform classifies a mandate-less charge as *nothing was presented* — and the capture webhook refuses to settle one of those, so the money would be taken and never recorded.
43926
43928
  *
43927
- * `setup_intent_id` is an id and not a credential. The mandate behind it is re-read from the gateway and refused unless the gateway itself says it belongs to this invoice's payer, so holding one pay link cannot attach a stranger's saved card.
43929
+ * `setup_intent_id` is an id and not a credential. The mandate behind it is re-read from the gateway and refused unless the gateway itself says it belongs to this invoice's payer, so holding one pay link cannot attach a stranger's saved card. It must also be the intent THIS link opened (an intent of the same organization opened elsewhere is refused with the same `409`), and it must have succeeded at the gateway: an intent still awaiting authentication is not a card yet and nothing is recorded or charged.
43928
43930
  */
43929
43931
  post: operations["confirmDirectInvoicePayment"];
43930
43932
  delete?: never;
@@ -117440,13 +117442,18 @@ export interface components {
117440
117442
  rate_bps: number;
117441
117443
  tax_total_minor: number;
117442
117444
  };
117443
- /** @description Net amounts the caller already holds, to be rated for display (#1482). ⛔ Nothing here re-prices: the amounts come from the catalogue and come back rated, so this cannot become a second source of prices. */
117445
+ /** @description Net amounts the caller already holds, to be rated for display (#1482). ⛔ Nothing here re-prices: the amounts come from the catalogue and come back rated, so this cannot become a second source of prices. Send exactly one of `items` (display-only previews: bounded, never charged) or `cart_id` (signed-in route only: the server re-prices the caller's own cart exactly as `GET /v1/carts/{cartId}` does and builds the lines itself, so a checkout figure never rests on client amounts). Both together, or neither, is a 422. */
117444
117446
  TaxQuoteRequest: {
117447
+ /**
117448
+ * Format: uuid
117449
+ * @description Signed-in route only (the public route refuses it with a 422). The caller's own open cart; the quote rates its server-repriced lines (`ref` = line id, net = the line's `line_total_minor`) in the cart's currency. Another organisation's cart is a 404. Mutually exclusive with `items`.
117450
+ */
117451
+ cart_id?: string;
117445
117452
  /** @description ISO 3166-1 alpha-2 destination. On the signed-in route this overrides the stored billing country (the customer may be pricing an address they have not saved). Omitted, the public route falls back to Cloudflare's `CF-IPCountry`; the signed-in route falls back to the stored billing country and then to `CF-IPCountry`, answering `estimated: true` for any figure not rated on the stored country (a signed-in customer with no saved address is shown the VAT their basket will carry rather than the net figure alone). */
117446
117453
  country?: string;
117447
117454
  /** @description ISO 4217. Defaults to the `docs/29` §3.1 resolution for the request. */
117448
117455
  currency?: string;
117449
- items: {
117456
+ items?: {
117450
117457
  /** @description REQUIRED when `kind` is `extra` (each extra carries its own VAT classification; the bare kind has none); without it the request is refused with a `422`. */
117451
117458
  extra_code?: string;
117452
117459
  /** @description The `LineKind` value. Together with the ids below it resolves the line's `tax_service_type`, which decides **which country** taxes it: an electronically supplied service is taxed where the customer belongs, a service a human performs where we belong. */
@@ -117456,7 +117463,7 @@ export interface components {
117456
117463
  * @description REQUIRED when `kind` is `marketplace_package` (the package's type decides its VAT treatment); without it the request is refused with a `422`.
117457
117464
  */
117458
117465
  listing_package_id?: string;
117459
- /** @description The **net** amount, integer minor units (§2.8 — money is never a float). */
117466
+ /** @description The **net** amount, integer minor units (§2.8 — money is never a float). Display only; capped at 10^12 minor units (a 422 above it). */
117460
117467
  net_minor: number;
117461
117468
  /** Format: uuid */
117462
117469
  plan_version_id?: string;
@@ -197778,7 +197785,16 @@ export interface operations {
197778
197785
  };
197779
197786
  };
197780
197787
  401: components["responses"]["Unauthorized"];
197781
- /** @description A malformed item list, a repeated `ref`, or an unknown currency. */
197788
+ /** @description `cart_id` names no open cart the caller may pay for (another organisation's cart answers 404, never 403, so the id is not an existence oracle). */
197789
+ 404: {
197790
+ headers: {
197791
+ [name: string]: unknown;
197792
+ };
197793
+ content: {
197794
+ "application/json": components["schemas"]["Error"];
197795
+ };
197796
+ };
197797
+ /** @description A malformed item list, a repeated `ref`, an amount above the display cap, an unknown currency, `cart_id` sent together with `items`, neither of them sent, a `currency` that differs from the cart's, or a cart line the catalogue no longer prices. */
197782
197798
  422: {
197783
197799
  headers: {
197784
197800
  [name: string]: unknown;
@@ -201137,7 +201153,7 @@ export interface operations {
201137
201153
  "application/json": components["schemas"]["TaxQuote"];
201138
201154
  };
201139
201155
  };
201140
- /** @description A malformed item list, a repeated `ref`, or an unknown currency. */
201156
+ /** @description A malformed item list, a repeated `ref`, an amount above the display cap, an unknown currency, or a `cart_id` (carts are quoted on the signed-in route only). */
201141
201157
  422: {
201142
201158
  headers: {
201143
201159
  [name: string]: unknown;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zinn-digital/sdk",
3
- "version": "0.1.1925",
3
+ "version": "0.1.1928",
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>",