@zinn-digital/sdk 0.1.1855 → 0.1.1858

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.
@@ -28329,7 +28329,7 @@ export interface paths {
28329
28329
  put?: never;
28330
28330
  /**
28331
28331
  * Check out a cart — place and charge an order.
28332
- * @description Converts the cart to an **immutable order**: re-prices every line, re-verifies each domain availability token (a stale/taken one is a `409`, with no charge), computes tax, places the order and charges it **wallet-first**. Fulfilment (provisioning/registration) then runs asynchronously as a Temporal workflow — this call never blocks on it (§2.9); poll the order `status` or the resource it produces. An **`Idempotency-Key` header is required**: a retried checkout returns the same order and never charges twice. Requires `billing.payment.manage`.
28332
+ * @description Converts the cart to an **immutable order**: re-prices every line, re-verifies each domain availability token (a stale/taken one is a `409`, with no charge), computes tax, places the order and charges it **wallet-first**. Fulfilment (provisioning/registration) then runs asynchronously as a Temporal workflow — this call never blocks on it (§2.9); poll the order `status` or the resource it produces. An **`Idempotency-Key` header is required**: a retried checkout returns the same order and never charges twice. A key that starts with a reserved billing-sweep prefix (`rebill:`, `adhoc:`, `final-overage:`) is stored under `client:`, so a checkout is never paid as a renewal sweep; the same key still replays the same order. Requires `billing.payment.manage`.
28333
28333
  *
28334
28334
  * **Pay first.** A cart carrying a new plan (`hosting_plan`, `compute_server`, `managed_database` or `boards_plan`) is refused with a `422` and the refusal `refusal.billing.renewalUnpaidNewPlan` while any subscription of the organisation owes an unpaid renewal, before tax is computed and before any order row or charge. Pay the renewal on the billing page, then check out.
28335
28335
  */
@@ -45378,7 +45378,7 @@ export interface paths {
45378
45378
  };
45379
45379
  /**
45380
45380
  * One analytics table as CSV or XLSX from the signed download link the ads_analytics_export MCP tool returns (za-286).
45381
- * @description Auth model: no session and no bearer header (`security: []`) - the path `token` IS the credential, a signed single-use capability. The view enforces `ads.view` by proxy: the `ads_analytics_export` MCP tool checks `ads.view` on the caller's MCP grant, resolves the caller's organisations exactly as `GET /v1/ads/analytics/export` does (narrowed by `org_id` to that organisation and its clients) and stores them, with the filters, on a durable row (`AdsExportLink`, tenant-scoped by RLS). The link signs (HMAC, Django signing with its own salt) only that row's id, `table`, `file`, `by`, `locale`, the issuing MCP grant and its organisation, valid for 15 minutes, so its length does not grow with the number of organisations; every signed value must equal the row. The file is the same one `exportAdsAnalyticsTable` streams. Every unusable link - tampered, expired, the MCP grant that minted it revoked since or no longer covering every organisation on the link (its `ads.view` scope removed, or an organisation moved out of its subtree: the whole link is refused, never a smaller file; an organisation added since is never added to it), an organisation no longer in good standing, or a table or filter that no longer parses - answers the same `404` (no oracle). A link is single-use: a second download answers `410`. Every answer, refusals included, carries `Cache-Control: no-store` and `Referrer-Policy: no-referrer`; the token is kept out of access logs, traces and the audit trail. Its own budget (`public_ads_analytics_export_link`, 120 per hour per address, fails closed).
45381
+ * @description Auth model: no session and no bearer header (`security: []`) - the path `token` IS the credential, a signed single-use capability. The view enforces `ads.view` by proxy: the `ads_analytics_export` MCP tool checks `ads.view` on the caller's MCP grant, resolves the caller's organisations exactly as `GET /v1/ads/analytics/export` does (narrowed by `org_id` to that organisation and its clients) and stores them, with the filters, on a durable row (`AdsExportLink`, tenant-scoped by RLS). The link signs (HMAC, Django signing with its own salt) only that row's id, `table`, `file`, `by`, `locale`, the issuing MCP grant and its organisation, valid for 15 minutes, so its length does not grow with the number of organisations; every signed value must equal the row. The file is the same one `exportAdsAnalyticsTable` streams. Every unusable link - tampered, expired, the MCP grant that minted it revoked since or no longer covering every organisation on the link (its `ads.view` scope removed, or an organisation moved out of its subtree: the whole link is refused, never a smaller file; an organisation added since is never added to it), a grant on the platform agent's admin profile while the agent-access kill switch is off at download time (a link minted while it was on stops downloading the moment it is turned off; turned back on, an unused link inside its 15 minutes downloads again), an organisation no longer in good standing, or a table or filter that no longer parses - answers the same `404` (no oracle). A link is single-use: a second download answers `410`. Every answer, refusals included, carries `Cache-Control: no-store` and `Referrer-Policy: no-referrer`; the token is kept out of access logs, traces and the audit trail. Its own budget (`public_ads_analytics_export_link`, 120 per hour per address, fails closed).
45382
45382
  */
45383
45383
  get: operations["downloadAdsAnalyticsExportByLink"];
45384
45384
  put?: never;
@@ -55844,7 +55844,7 @@ export interface paths {
55844
55844
  * Buy more disk or file allowance for one site.
55845
55845
  * @description Raises this site's ceiling by `steps` purchasable steps (1 GB of disk, 50,000 inodes) and applies it to the box. Recorded as an open-ended grant rather than by editing the base, so *what the site started with* and *what the customer bought* stay separately revocable.
55846
55846
  *
55847
- * ⛔⛔ **The charge is created BEFORE the ceiling is raised, and an upgrade that cannot be charged for is refused with `422` — no grant, nothing on the box.** Both refusals answer `422` and the body distinguishes them: no published price in the caller's currency, or no way to take the payment. Free capacity on a real box is the failure no customer reports, because they received what they asked for. An org with no way to pay at all (no usable stored payment method and no crypto election) is refused with `422` `refusal.siteQuota.noPaymentMethod` before anything is created: the upgrade renews monthly through the unattended ad-hoc sweep, which could never collect it. Spendable account credit that pays the first period INCLUDING tax (taxed exactly as the sweep will tax it) is a way to pay; credit covering only the pre-tax price is not. Credit must also cover everything it is already promised to: this upgrade is taxed together with the org's other ad-hoc items due in that currency, and every unpaid order the billing sweeps settle from that credit in that currency (ad-hoc orders, subscription renewals and final overage invoices) is added, so a second upgrade, or an upgrade beside a pending renewal, on credit that pays only one of them is refused. The check and the charge are serialised per organisation.
55847
+ * ⛔⛔ **The charge is created BEFORE the ceiling is raised, and an upgrade that cannot be charged for is refused with `422` — no grant, nothing on the box.** Both refusals answer `422` and the body distinguishes them: no published price in the caller's currency, or no way to take the payment. Free capacity on a real box is the failure no customer reports, because they received what they asked for. An org with no way to pay at all (no usable stored payment method and no crypto election) is refused with `422` `refusal.siteQuota.noPaymentMethod` before anything is created: the upgrade renews monthly through the unattended ad-hoc sweep, which could never collect it. Spendable account credit that pays the first period INCLUDING tax (taxed exactly as the sweep will tax it) is a way to pay; credit covering only the pre-tax price is not. Credit must also cover everything it is already promised to: this upgrade is taxed together with the org's other ad-hoc items due in that currency, and every unpaid order the billing sweeps settle from that credit in that currency (ad-hoc orders, subscription renewals and final overage invoices) is added, so a second upgrade, or an upgrade beside a pending renewal, on credit that pays only one of them is refused. The check and the charge are serialised per organisation. Every other spend from the same account credit (checkout, plan change, SEO lookup packs, a reseller client's wallet) takes the same per-organisation lock and leaves the credit an upgrade sold on credit is counting on, so the sweep that bills the upgrade still finds it.
55848
55848
  *
55849
55849
  * Charge-then-apply is deliberate: a charged-but-unapplied upgrade is repaired by the ten-minute reconciler, and free capacity is repaired by nobody. An upgrade also **lifts a quota freeze immediately**, because paying is the remedy and waiting for a sweep would be the worst minute of the product to leave to a schedule.
55850
55850
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zinn-digital/sdk",
3
- "version": "0.1.1855",
3
+ "version": "0.1.1858",
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>",