@zinn-digital/sdk 0.1.1924 → 0.1.1926

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.
@@ -4040,6 +4040,29 @@ export interface paths {
4040
4040
  patch?: never;
4041
4041
  trace?: never;
4042
4042
  };
4043
+ "/v1/admin/compute/servers/{serverId}/terminate": {
4044
+ parameters: {
4045
+ query?: never;
4046
+ header?: never;
4047
+ path: {
4048
+ /** @description The server's id, as `listComputeServers` reports it. **Ours** (UUIDv7), minted when the order row was written — never the provider's own identifier for the machine. */
4049
+ serverId: components["parameters"]["ComputeServerId"];
4050
+ };
4051
+ cookie?: never;
4052
+ };
4053
+ get?: never;
4054
+ put?: never;
4055
+ /**
4056
+ * Staff end a cloud server (delete it at the supplier and close its meter).
4057
+ * @description DAY-0364. Starts the same `ComputeTeardownWorkflow` a customer's own cancel starts (licence back, renewal off, delete at the supplier — a machine already gone counts as deleted — then the hourly meter is rated and settled and the row reaches `terminated`). The org is resolved from the row. Staff-only on `abuse.suspend` (the same key as suspend); audit-logged (`compute.server.terminated`, with the actor, the server, the org and the reason) BEFORE the workflow starts. Idempotent: a call on a server already `terminating` answers `202` with the same row and starts nothing. ⛔ `422` on a server already `terminated` (`refusal.compute.alreadyRemoved`), on any status other than `active` (`refusal.compute.changedWaitFinishTry`) and on a cluster member (`refusal.compute.serverMachineClusterDelete`).
4058
+ */
4059
+ post: operations["adminTerminateComputeServer"];
4060
+ delete?: never;
4061
+ options?: never;
4062
+ head?: never;
4063
+ patch?: never;
4064
+ trace?: never;
4065
+ };
4043
4066
  "/v1/admin/compute/servers/{serverId}/unsuspend": {
4044
4067
  parameters: {
4045
4068
  query?: never;
@@ -117417,13 +117440,18 @@ export interface components {
117417
117440
  rate_bps: number;
117418
117441
  tax_total_minor: number;
117419
117442
  };
117420
- /** @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. */
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. 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. */
117421
117444
  TaxQuoteRequest: {
117445
+ /**
117446
+ * Format: uuid
117447
+ * @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`.
117448
+ */
117449
+ cart_id?: string;
117422
117450
  /** @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). */
117423
117451
  country?: string;
117424
117452
  /** @description ISO 4217. Defaults to the `docs/29` §3.1 resolution for the request. */
117425
117453
  currency?: string;
117426
- items: {
117454
+ items?: {
117427
117455
  /** @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`. */
117428
117456
  extra_code?: string;
117429
117457
  /** @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. */
@@ -117433,7 +117461,7 @@ export interface components {
117433
117461
  * @description REQUIRED when `kind` is `marketplace_package` (the package's type decides its VAT treatment); without it the request is refused with a `422`.
117434
117462
  */
117435
117463
  listing_package_id?: string;
117436
- /** @description The **net** amount, integer minor units (§2.8 — money is never a float). */
117464
+ /** @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). */
117437
117465
  net_minor: number;
117438
117466
  /** Format: uuid */
117439
117467
  plan_version_id?: string;
@@ -128950,6 +128978,43 @@ export interface operations {
128950
128978
  503: components["responses"]["ServiceUnavailable"];
128951
128979
  };
128952
128980
  };
128981
+ adminTerminateComputeServer: {
128982
+ parameters: {
128983
+ query?: never;
128984
+ header?: never;
128985
+ path: {
128986
+ /** @description The server's id, as `listComputeServers` reports it. **Ours** (UUIDv7), minted when the order row was written — never the provider's own identifier for the machine. */
128987
+ serverId: components["parameters"]["ComputeServerId"];
128988
+ };
128989
+ cookie?: never;
128990
+ };
128991
+ requestBody: {
128992
+ content: {
128993
+ "application/json": {
128994
+ /** @description Why staff ended the server (stored in the audit row). */
128995
+ reason: string;
128996
+ };
128997
+ };
128998
+ };
128999
+ responses: {
129000
+ /** @description The server's admin row, now `terminating`; the teardown runs in the background. */
129001
+ 202: {
129002
+ headers: {
129003
+ "RateLimit-Remaining": components["headers"]["RateLimitRemaining"];
129004
+ [name: string]: unknown;
129005
+ };
129006
+ content: {
129007
+ "application/json": components["schemas"]["AdminComputeServerEnvelope"];
129008
+ };
129009
+ };
129010
+ 401: components["responses"]["Unauthorized"];
129011
+ 403: components["responses"]["Forbidden"];
129012
+ 404: components["responses"]["NotFound"];
129013
+ 422: components["responses"]["UnprocessableEntity"];
129014
+ 429: components["responses"]["TooManyRequests"];
129015
+ 503: components["responses"]["ServiceUnavailable"];
129016
+ };
129017
+ };
128953
129018
  unsuspendAdminComputeServer: {
128954
129019
  parameters: {
128955
129020
  query?: never;
@@ -197718,7 +197783,16 @@ export interface operations {
197718
197783
  };
197719
197784
  };
197720
197785
  401: components["responses"]["Unauthorized"];
197721
- /** @description A malformed item list, a repeated `ref`, or an unknown currency. */
197786
+ /** @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). */
197787
+ 404: {
197788
+ headers: {
197789
+ [name: string]: unknown;
197790
+ };
197791
+ content: {
197792
+ "application/json": components["schemas"]["Error"];
197793
+ };
197794
+ };
197795
+ /** @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. */
197722
197796
  422: {
197723
197797
  headers: {
197724
197798
  [name: string]: unknown;
@@ -201077,7 +201151,7 @@ export interface operations {
201077
201151
  "application/json": components["schemas"]["TaxQuote"];
201078
201152
  };
201079
201153
  };
201080
- /** @description A malformed item list, a repeated `ref`, or an unknown currency. */
201154
+ /** @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). */
201081
201155
  422: {
201082
201156
  headers: {
201083
201157
  [name: string]: unknown;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zinn-digital/sdk",
3
- "version": "0.1.1924",
3
+ "version": "0.1.1926",
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>",