@zinn-digital/sdk 0.1.1868 → 0.1.1869

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.
@@ -28332,6 +28332,8 @@ export interface paths {
28332
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
+ *
28336
+ * **Room.** Room for every `hosting_plan` line's whole site allowance is asked again here, before an order exists (P6b-002). A plan whose sites do not all fit today is still sold and its sites queued (`capacity_notice` on the line); only when the platform refuses plans larger than everything it can hold is this a `422` with error code `CAPACITY_UNAVAILABLE`, with nothing placed and nothing charged.
28335
28337
  */
28336
28338
  post: operations["checkoutCart"];
28337
28339
  delete?: never;
@@ -28354,7 +28356,7 @@ export interface paths {
28354
28356
  put?: never;
28355
28357
  /**
28356
28358
  * Add a line to a cart.
28357
- * @description Adds a priced line. A `hosting_plan` line needs a `plan_version_id`; a `domain_register`/`domain_transfer`/`domain_renew` line needs a `domain_name`, `tld` and `period_years`. The line shape and price are validated + stamped by the server; a bad shape (or a plan version with no price) is a `422`.
28359
+ * @description Adds a priced line. A `hosting_plan` line needs a `plan_version_id`; a `domain_register`/`domain_transfer`/`domain_renew` line needs a `domain_name`, `tld` and `period_years`. The line shape and price are validated + stamped by the server; a bad shape (or a plan version with no price) is a `422`. A hosting-plan line whose site allowance does not all fit on the servers today is still added and carries `capacity_notice` (P6b-002); only when the platform refuses plans larger than everything it can hold is it a `422` with error code `CAPACITY_UNAVAILABLE` (`details[0].sites_wanted`, `details[0].sites_possible`).
28358
28360
  */
28359
28361
  post: operations["addCartLine"];
28360
28362
  delete?: never;
@@ -28534,6 +28536,28 @@ export interface paths {
28534
28536
  patch?: never;
28535
28537
  trace?: never;
28536
28538
  };
28539
+ "/v1/catalog/app/room": {
28540
+ parameters: {
28541
+ query?: never;
28542
+ header?: never;
28543
+ path?: never;
28544
+ cookie?: never;
28545
+ };
28546
+ /**
28547
+ * Ask whether every site a plan allows can be built today, before buying it.
28548
+ * @description The capacity check before sale (P6b-002). Asks for room for the plan's **whole** site allowance, never for one site, and answers the same `CapacityNotice` a basket line carries: `null` when every site can be built now, otherwise how many are built at once and how many are queued. Queued sites are built automatically, oldest first, as space is made ready; **no time is promised**, and no server or supplier is named.
28549
+ *
28550
+ * A read: it refuses nothing and changes nothing. Name the plan by `plan_version_id` (the id `listInAppCatalogPlans` publishes) or by `plan_code` (its current version); `region` narrows the answer to one region from `listHostingRegions`, and an unknown region is ignored. A plan that is not built on our own servers always answers `null`. Signed-in, non-tenant data.
28551
+ */
28552
+ get: operations["getPlanRoom"];
28553
+ put?: never;
28554
+ post?: never;
28555
+ delete?: never;
28556
+ options?: never;
28557
+ head?: never;
28558
+ patch?: never;
28559
+ trace?: never;
28560
+ };
28537
28561
  "/v1/catalog/app/site-hosting-lines": {
28538
28562
  parameters: {
28539
28563
  query?: never;
@@ -80485,6 +80509,14 @@ export interface components {
80485
80509
  /** @description Where it went. ⛔ Not `format: email` — on a connected channel this is the destination (`#announcements`, a chat id), and declaring it an e-mail address would make a truthful response fail its own contract test. */
80486
80510
  to: string;
80487
80511
  };
80512
+ /** @description P6b-002: the plan's sites do not all fit on the servers today. `queued` (the default): `sites_ready_now` are built at once and `sites_queued` are built automatically, oldest first, as space is made ready; no time is promised. `unavailable`: only when the platform setting refuses a plan larger than everything it can hold (the request is then refused with error code `CAPACITY_UNAVAILABLE`). */
80513
+ CapacityNotice: {
80514
+ sites_queued: number;
80515
+ sites_ready_now: number;
80516
+ sites_wanted: number;
80517
+ /** @enum {string} */
80518
+ state: "queued" | "unavailable";
80519
+ };
80488
80520
  Cart: {
80489
80521
  /** @description What the typed hosting/SEO coupon did to this basket, or null when no coupon code is typed (a domain promotion code is reported on its lines instead). */
80490
80522
  coupon?: components["schemas"]["CartCoupon"] | null;
@@ -80549,6 +80581,8 @@ export interface components {
80549
80581
  /** @description One priced line in a cart. `registrar_cost` and a premium line's wholesale quote (both margin audit) are never exposed. */
80550
80582
  CartLine: {
80551
80583
  auto_renew?: boolean;
80584
+ /** @description P6b-002: null when every site of the plan's allowance can be built now; otherwise the codes and numbers a client renders in its own language (never a server name). */
80585
+ capacity_notice?: components["schemas"]["CapacityNotice"] | null;
80552
80586
  currency: components["schemas"]["CurrencyCode"];
80553
80587
  /** Format: int64 */
80554
80588
  discount_minor?: number;
@@ -100627,6 +100661,14 @@ export interface components {
100627
100661
  starts_at: string;
100628
100662
  title: string;
100629
100663
  };
100664
+ /** @description P6b-002: the answer of `getPlanRoom`. */
100665
+ PlanRoom: {
100666
+ /** @description Null when every site of the plan's allowance can be built now. */
100667
+ capacity_notice: components["schemas"]["CapacityNotice"] | null;
100668
+ plan_code: string;
100669
+ /** Format: uuid */
100670
+ plan_version_id: string;
100671
+ };
100630
100672
  /** @description What the PLATFORM's own AI work may spend today, and what is left of it. It rides on the capabilities response because the screen showing the ladder is the screen where somebody asks the agent a question — a budget you only discover by being refused is one nobody can plan around. */
100631
100673
  PlatformAiBudget: {
100632
100674
  /**
@@ -118798,6 +118840,8 @@ export interface components {
118798
118840
  app?: string;
118799
118841
  /** @description Whether the customer agreed **at the start** that this may become a paid subscription when the period ends. Captured per trial rather than read from the template at expiry, so consent given today cannot be re-interpreted by a template edited in three months. */
118800
118842
  auto_convert_opt_in?: boolean;
118843
+ /** @description P6b-002: null when every site of the plan's allowance can be built now; otherwise the codes and numbers a client renders in its own language (never a server name). */
118844
+ capacity_notice?: components["schemas"]["CapacityNotice"] | null;
118801
118845
  /** @description Whole days until `ends_at`, rounded UP and floored at zero. Computed on the server on purpose: a client doing `(ends_at - Date.now())` measures the **device** clock, so a laptop a day out tells the customer their trial ends tomorrow when it ends today — and this is the number that drives an increasingly insistent upgrade prompt. `0` means the trial has ended, never "today", so a screen can branch on it. */
118802
118846
  days_remaining?: number;
118803
118847
  /** Format: date-time */
@@ -170156,6 +170200,40 @@ export interface operations {
170156
170200
  429: components["responses"]["TooManyRequests"];
170157
170201
  };
170158
170202
  };
170203
+ getPlanRoom: {
170204
+ parameters: {
170205
+ query?: {
170206
+ /** @description The plan to ask about, by code; its current version is used. */
170207
+ plan_code?: string;
170208
+ /** @description The plan version to ask about. Wins over `plan_code`. */
170209
+ plan_version_id?: string;
170210
+ /** @description Only count room in this region (a `code` from `listHostingRegions`). */
170211
+ region?: string;
170212
+ };
170213
+ header?: never;
170214
+ path?: never;
170215
+ cookie?: never;
170216
+ };
170217
+ requestBody?: never;
170218
+ responses: {
170219
+ /** @description The room for the plan today. */
170220
+ 200: {
170221
+ headers: {
170222
+ /** @description Always `private, no-store`. */
170223
+ "Cache-Control"?: string;
170224
+ [name: string]: unknown;
170225
+ };
170226
+ content: {
170227
+ "application/json": {
170228
+ data: components["schemas"]["PlanRoom"];
170229
+ };
170230
+ };
170231
+ };
170232
+ 401: components["responses"]["Unauthorized"];
170233
+ 404: components["responses"]["NotFound"];
170234
+ 429: components["responses"]["TooManyRequests"];
170235
+ };
170236
+ };
170159
170237
  listSiteHostingLines: {
170160
170238
  parameters: {
170161
170239
  query?: never;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zinn-digital/sdk",
3
- "version": "0.1.1868",
3
+ "version": "0.1.1869",
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>",