@zinn-digital/sdk 0.1.1974 → 0.1.1978

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.
@@ -3555,6 +3555,29 @@ export interface paths {
3555
3555
  patch?: never;
3556
3556
  trace?: never;
3557
3557
  };
3558
+ "/v1/admin/certificate-orders/{orderId}/release": {
3559
+ parameters: {
3560
+ query?: never;
3561
+ header?: never;
3562
+ path: {
3563
+ /** @description The order's id, as `listCertificateOrders` reports it. Ours (UUIDv7). */
3564
+ orderId: components["parameters"]["CertificateOrderId"];
3565
+ };
3566
+ cookie?: never;
3567
+ };
3568
+ get?: never;
3569
+ put?: never;
3570
+ /**
3571
+ * Release ONE held certificate order (staff).
3572
+ * @description ⚖️ A paid certificate the authority did not confirm (or whose account lapsed before it was bought) is `held`, never refunded or cancelled automatically. Staff settle it here. `attach` records the authority's order reference (the authority DOES hold the order; `vendor_ref` required) and moves it to `awaiting_validation`; `reopen` clears the claim and returns the order to `pending`, so the customer's paid order can be submitted once more (staff confirmed the authority holds none). ⛔ Moves no money: a refund stays the admin order refund, as Zinn® credit. Acts in the row's own org scope and is audit-logged (`certificates.held_order.released`). `409` when the order is not held, `422` for a bad body. Requires staff + `billing.refund`.
3573
+ */
3574
+ post: operations["releaseAdminCertificateOrder"];
3575
+ delete?: never;
3576
+ options?: never;
3577
+ head?: never;
3578
+ patch?: never;
3579
+ trace?: never;
3580
+ };
3558
3581
  "/v1/admin/ci-fleet/health": {
3559
3582
  parameters: {
3560
3583
  query?: never;
@@ -4015,6 +4038,29 @@ export interface paths {
4015
4038
  patch?: never;
4016
4039
  trace?: never;
4017
4040
  };
4041
+ "/v1/admin/compute/servers/{serverId}/panel-retry": {
4042
+ parameters: {
4043
+ query?: never;
4044
+ header?: never;
4045
+ path: {
4046
+ /** @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. */
4047
+ serverId: components["parameters"]["ComputeServerId"];
4048
+ };
4049
+ cookie?: never;
4050
+ };
4051
+ get?: never;
4052
+ put?: never;
4053
+ /**
4054
+ * Staff re-run a cloud server's failed Zinn® panel set-up.
4055
+ * @description P3-023 (admin Unit H). Starts the same panel set-up the build starts (`compute.panel_enrol.start_enrolment`: the stack the server's paid licence runs, one workflow id per server). Staff-only on `fleet.manage`; audit-logged (`compute.server.panel_retry`, with the actor, the server, the org, the reason and the error it failed with) BEFORE the start. Buys nothing. Idempotent: a set-up already running answers `202` and starts nothing. ⛔ `422` on a bare server or a set-up that has not failed (`refusal.compute.panelRetryNothingToRerun`) and on a machine that is not `active` (`refusal.compute.changedWaitFinishTry`); `503` when the workflow engine cannot be reached (`refusal.compute.panelRetryUnavailable`).
4056
+ */
4057
+ post: operations["adminRetryComputeServerPanel"];
4058
+ delete?: never;
4059
+ options?: never;
4060
+ head?: never;
4061
+ patch?: never;
4062
+ trace?: never;
4063
+ };
4018
4064
  "/v1/admin/compute/servers/{serverId}/suspend": {
4019
4065
  parameters: {
4020
4066
  query?: never;
@@ -29146,7 +29192,9 @@ export interface paths {
29146
29192
  post?: never;
29147
29193
  /**
29148
29194
  * Cancel an order inside the authority's refund window.
29149
- * @description ⛔⛔ Answers `503` and leaves the order **unchanged** if the authority cannot be reached. Reporting a cancellation we did not achieve would remove the order from every screen while the charge stands. Requires `billing.payment.manage`.
29195
+ * @description ⛔⛔ Answers `503` and leaves the order **unchanged** if the authority cannot be reached. Reporting a cancellation we did not achieve would remove the order from every screen while the charge stands.
29196
+ *
29197
+ * ⛔⛔ **A paid order is never cancelled here.** An order whose checkout order is paid, whose purchase has been claimed, or which is `held` for staff answers `409` with `refusal.certificates.cancelPaid` and changes nothing (refunds are Zinn® credit, by staff). An unpaid order cancels its unpaid checkout order too; while a payment for it is still confirming the answer is `409` with `refusal.commerce.orderPaymentConfirmingCancel`. Requires `billing.payment.manage`.
29150
29198
  */
29151
29199
  delete: operations["cancelCertificateOrder"];
29152
29200
  options?: never;
@@ -29222,7 +29270,11 @@ export interface paths {
29222
29270
  *
29223
29271
  * ⛔⛔ **The CSR is required and is checked three times** — here, in the service and in the driver. That is not belt-and-braces: the authority accepts an order **without** one, charges for it, and issues nothing. Two such orders were created against our own account on 2026-08-29 by a probe reading validation errors, and the giveaway is how unlike a purchase they look — no common name, no issue date (`docs/272` §9).
29224
29272
  *
29225
- * ⭐ A customer-generated CSR is the better path and the one to encourage: the private key then never leaves their machine. Answers `503` when the authority could not be reached — in which case the order is recorded and reconciled rather than lost. Requires `billing.payment.manage`.
29273
+ * ⭐ A customer-generated CSR is the better path and the one to encourage: the private key then never leaves their machine. Answers `503` when the authority could not be reached — in which case the order is recorded and reconciled rather than lost.
29274
+ *
29275
+ * ⛔⛔ **Paid first (F22).** Answers `422` with `refusal.certificates.payFirst` until the order in `payment_order` is paid (captured or settled; a zero-total order counts). ⛔⛔ **Never buys twice.** The order is claimed before the authority is asked and the claim is never released, so a re-submit after an unconfirmed attempt (a timeout, a double click) answers `503` and asks the authority nothing.
29276
+ *
29277
+ * ⛔⛔ **A paid order that cannot be bought is HELD, never failed, cancelled or refunded.** A supplier error after the claim (a timeout, a refusal, an unknown product), or an account no longer in good standing, moves the order to `held`, raises ONE staff alert and asks the authority nothing more; staff settle it with `releaseAdminCertificateOrder`. Requires `billing.payment.manage`.
29226
29278
  */
29227
29279
  post: operations["submitCertificateOrder"];
29228
29280
  delete?: never;
@@ -64017,7 +64069,7 @@ export interface components {
64017
64069
  price_minor: number;
64018
64070
  product_code: string;
64019
64071
  /** @enum {string} */
64020
- state: "pending" | "awaiting_validation" | "issued" | "cancelled" | "failed" | "expired";
64072
+ state: "pending" | "awaiting_validation" | "held" | "issued" | "cancelled" | "failed" | "expired";
64021
64073
  };
64022
64074
  /** @description Unpaginated. Same `scanned` caveat as `AdminPanelLicenceList`. */
64023
64075
  AdminCertificateOrderList: {
@@ -64029,6 +64081,8 @@ export interface components {
64029
64081
  awaiting_validation: number;
64030
64082
  expired: number;
64031
64083
  failed: number;
64084
+ /** @description ⛔⛔ **Paid and held for staff**: the authority did not confirm the purchase, or the account lapsed before it. One staff alert each; release with `releaseAdminCertificateOrder`. */
64085
+ held: number;
64032
64086
  issued: number;
64033
64087
  /** @description ⛔⛔ Rows the query actually returned. Read this before the counts below. */
64034
64088
  scanned: number;
@@ -64162,13 +64216,41 @@ export interface components {
64162
64216
  comp_reason?: string | null;
64163
64217
  deploy_target: string;
64164
64218
  id: components["schemas"]["Uuid"];
64219
+ /**
64220
+ * @description P3-023 — how the machine is run, chosen at order (`engine.compute.panel_enrol`).
64221
+ * @enum {string}
64222
+ */
64223
+ management?: "panel" | "bare";
64224
+ /** @description P3-023 — the last panel set-up error (blank unless `failed`). */
64225
+ management_message?: string;
64165
64226
  /**
64166
64227
  * @description SERVERCARE-r1: who looks after this machine (`engine.compute.care`). `zinn_managed_paused` = care add-on held while the account is not in good standing (§2.46). SERVERWATCH: `zinn_watch` / `zinn_watch_paused` = Server Watch held, paid / not in good standing.
64167
64228
  * @enum {string}
64168
64229
  */
64169
64230
  management_mode?: "self_managed" | "zinn_managed" | "zinn_managed_paused" | "zinn_watch" | "zinn_watch_paused";
64231
+ /**
64232
+ * @description P3-023 — the panel set-up's state; `""` on a bare server.
64233
+ * @enum {string}
64234
+ */
64235
+ management_state?: "" | "enrolling" | "managed" | "failed";
64170
64236
  name: string;
64171
64237
  org_id: components["schemas"]["Uuid"];
64238
+ /** @description P3-023 — the fleet box a panel server became (list only; null on a bare server or before the set-up made its box). Read in one query per page. */
64239
+ panel_box?: {
64240
+ accepts_deploys?: boolean;
64241
+ capacity?: number;
64242
+ hostname?: string;
64243
+ /** @description What the last converge did: ok, failed or a short reason. */
64244
+ last_converge_note?: string;
64245
+ /** Format: date-time */
64246
+ last_converged_at?: string | null;
64247
+ /** Format: date-time */
64248
+ last_heartbeat_at?: string | null;
64249
+ placed_sites?: number;
64250
+ /** @description The box's web server (e.g. openlitespeed, litespeed). */
64251
+ stack?: string;
64252
+ status?: string;
64253
+ } | null;
64172
64254
  plan_code: string;
64173
64255
  power_state: string;
64174
64256
  /** @description Our provider id for the machine, as stored on the row. List only. With `vendor_server_id` it names the machine at the supplier — the brand does not: "Zinn® Cloud" and "Zinn® Private Cloud" are two suppliers. */
@@ -81908,6 +81990,8 @@ export interface components {
81908
81990
  message: string;
81909
81991
  /** Format: date-time */
81910
81992
  ordered_at: string | null;
81993
+ /** @description The order this certificate is paid through (F22). Ordering or renewing a certificate creates it, taxed, in `pending_payment` (a zero-total order is created `paid`); a client pays it through the shared payment dialog by `id`. ⛔⛔ The signing-request submit, which buys the certificate from the authority, is refused with `refusal.certificates.payFirst` until this order is paid (captured or settled, never merely authorised). `null` on an order made before certificates were paid through checkout; such an order is refused at submit too. */
81994
+ payment_order: components["schemas"]["CertificatePaymentOrder"] | null;
81911
81995
  period_years: number;
81912
81996
  /**
81913
81997
  * Format: int64
@@ -81930,10 +82014,25 @@ export interface components {
81930
82014
  * @description ⛔⛔ **`awaiting_validation` means PAID AND NOT ISSUED.** The authority charges at order time and then waits for the customer to prove they control the domain. It is deliberately not folded into `pending`, which would read as "we are working on it" — an order in this state resolves only when a **human acts**, so a client must surface it and show `validation_instructions` rather than spin on it.
81931
82015
  * @enum {string}
81932
82016
  */
81933
- state: "pending" | "awaiting_validation" | "issued" | "cancelled" | "failed" | "expired";
82017
+ state: "pending" | "awaiting_validation" | "held" | "issued" | "cancelled" | "failed" | "expired";
81934
82018
  /** @description What the customer must still do, in the authority's own words. ⭐ Carried as text rather than parsed: every authority words it differently, and a half-parsed instruction is worse than none. */
81935
82019
  validation_instructions: string;
81936
82020
  };
82021
+ /** @description The commerce order a certificate is paid through. */
82022
+ CertificatePaymentOrder: {
82023
+ /** @description ISO 4217 code. */
82024
+ currency: string;
82025
+ /** @description The order reference the customer sees on the payment dialog and invoice. */
82026
+ human_ref: string;
82027
+ id: components["schemas"]["Uuid"];
82028
+ /** @description The order status. `pending_payment` and `payment_failed` are still payable; `paid`, `fulfilling`, `completed` and `partially_fulfilled` mean the certificate is paid for and its signing request may be sent; any other status (a cancelled or refunded order) is neither. */
82029
+ status: string;
82030
+ /**
82031
+ * Format: int64
82032
+ * @description Total including tax, in the currency's minor units.
82033
+ */
82034
+ total_minor: number;
82035
+ };
81937
82036
  /** @description One certificate a customer can buy. ⛔ **There is deliberately no cost field** — what the authority charges us lives on the catalogue row for the admin margin ledger, and rendered beside the sell price it is a margin leak. */
81938
82037
  CertificateProduct: {
81939
82038
  /** @description The certificate authority — `Sectigo`. */
@@ -85588,6 +85687,11 @@ export interface components {
85588
85687
  currency: string;
85589
85688
  /** @description Additional names. ⛔ Capped by the product's `included_domains` — what the **price** covers — not by what the authority would technically allow, because it bills names beyond the included count separately. */
85590
85689
  domains?: string[];
85690
+ /**
85691
+ * Format: uuid
85692
+ * @description The org that buys the certificate. Optional for a caller in one org (or an API key, which acts in its own org); a caller in several names it here or in the `X-Zinn-Org` header, otherwise the order is a `422` `refusal.agencyboard.orgIdRequired`. Naming an org where the caller does not hold `billing.payment.manage` is a `403`.
85693
+ */
85694
+ org_id?: string;
85591
85695
  /** @default 1 */
85592
85696
  period_years: number;
85593
85697
  product_code: string;
@@ -128976,6 +129080,44 @@ export interface operations {
128976
129080
  429: components["responses"]["TooManyRequests"];
128977
129081
  };
128978
129082
  };
129083
+ releaseAdminCertificateOrder: {
129084
+ parameters: {
129085
+ query?: never;
129086
+ header?: never;
129087
+ path: {
129088
+ /** @description The order's id, as `listCertificateOrders` reports it. Ours (UUIDv7). */
129089
+ orderId: components["parameters"]["CertificateOrderId"];
129090
+ };
129091
+ cookie?: never;
129092
+ };
129093
+ requestBody: {
129094
+ content: {
129095
+ "application/json": {
129096
+ /** @enum {string} */
129097
+ outcome: "attach" | "reopen";
129098
+ /** @description The authority's order reference; required for `attach`. */
129099
+ vendor_ref?: string;
129100
+ };
129101
+ };
129102
+ };
129103
+ responses: {
129104
+ /** @description The released order. */
129105
+ 200: {
129106
+ headers: {
129107
+ [name: string]: unknown;
129108
+ };
129109
+ content: {
129110
+ "application/json": components["schemas"]["AdminCertificateOrder"];
129111
+ };
129112
+ };
129113
+ 401: components["responses"]["Unauthorized"];
129114
+ 403: components["responses"]["Forbidden"];
129115
+ 404: components["responses"]["NotFound"];
129116
+ 409: components["responses"]["Conflict"];
129117
+ 422: components["responses"]["UnprocessableEntity"];
129118
+ 429: components["responses"]["TooManyRequests"];
129119
+ };
129120
+ };
128979
129121
  adminGetCiFleetHealth: {
128980
129122
  parameters: {
128981
129123
  query?: never;
@@ -129584,6 +129726,8 @@ export interface operations {
129584
129726
  deploy_target?: string;
129585
129727
  /** @description Maximum items to return (page size). */
129586
129728
  limit?: components["parameters"]["Limit"];
129729
+ /** @description P3-023 (admin Unit H): `panel` returns the servers run with the Zinn® panel, `bare` the rest. Anything else is `422 refusal.acquisition.choice`. */
129730
+ management?: "panel" | "bare";
129587
129731
  /** @description SERVERCARE-r1 — the care roster: `zinn_managed` and `zinn_managed_paused` both return machines holding the care add-on (the row's `management_mode` says which), and `self_managed` the rest. SERVERWATCH: `zinn_watch` and `zinn_watch_paused` return the machines holding Server Watch the same way. Anything else is `422 refusal.compute.unknownManagementMode`. */
129588
129732
  management_mode?: "self_managed" | "zinn_managed" | "zinn_managed_paused" | "zinn_watch" | "zinn_watch_paused";
129589
129733
  /** @description Narrow to one customer — the usual path in from an abuse report. */
@@ -129652,6 +129796,43 @@ export interface operations {
129652
129796
  503: components["responses"]["ServiceUnavailable"];
129653
129797
  };
129654
129798
  };
129799
+ adminRetryComputeServerPanel: {
129800
+ parameters: {
129801
+ query?: never;
129802
+ header?: never;
129803
+ path: {
129804
+ /** @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. */
129805
+ serverId: components["parameters"]["ComputeServerId"];
129806
+ };
129807
+ cookie?: never;
129808
+ };
129809
+ requestBody: {
129810
+ content: {
129811
+ "application/json": {
129812
+ /** @description Why staff re-ran the set-up (stored in the audit row). */
129813
+ reason: string;
129814
+ };
129815
+ };
129816
+ };
129817
+ responses: {
129818
+ /** @description The server's admin row, now `enrolling`; the set-up runs in the background. */
129819
+ 202: {
129820
+ headers: {
129821
+ "RateLimit-Remaining": components["headers"]["RateLimitRemaining"];
129822
+ [name: string]: unknown;
129823
+ };
129824
+ content: {
129825
+ "application/json": components["schemas"]["AdminComputeServerEnvelope"];
129826
+ };
129827
+ };
129828
+ 401: components["responses"]["Unauthorized"];
129829
+ 403: components["responses"]["Forbidden"];
129830
+ 404: components["responses"]["NotFound"];
129831
+ 422: components["responses"]["UnprocessableEntity"];
129832
+ 429: components["responses"]["TooManyRequests"];
129833
+ 503: components["responses"]["ServiceUnavailable"];
129834
+ };
129835
+ };
129655
129836
  suspendAdminComputeServer: {
129656
129837
  parameters: {
129657
129838
  query?: never;
@@ -172349,6 +172530,7 @@ export interface operations {
172349
172530
  401: components["responses"]["Unauthorized"];
172350
172531
  403: components["responses"]["Forbidden"];
172351
172532
  404: components["responses"]["NotFound"];
172533
+ 409: components["responses"]["Conflict"];
172352
172534
  429: components["responses"]["TooManyRequests"];
172353
172535
  503: components["responses"]["ServiceUnavailable"];
172354
172536
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zinn-digital/sdk",
3
- "version": "0.1.1974",
3
+ "version": "0.1.1978",
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>",