@zinn-digital/sdk 0.1.1922 → 0.1.1925

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;
@@ -40586,6 +40609,28 @@ export interface paths {
40586
40609
  patch?: never;
40587
40610
  trace?: never;
40588
40611
  };
40612
+ "/v1/media-offload/deletions": {
40613
+ parameters: {
40614
+ query?: never;
40615
+ header?: never;
40616
+ path?: never;
40617
+ cookie?: never;
40618
+ };
40619
+ get?: never;
40620
+ put?: never;
40621
+ /**
40622
+ * Delete this site's own offloaded files (the customer deleted them in WordPress).
40623
+ * @description Called by the Zinn® Media Offload plugin with a bearer plugin token when the customer deletes a media file in WordPress, naming that attachment's object keys (the original and every generated size). This is how a customer frees space; nothing is deleted on Zinn®'s own initiative.
40624
+ *
40625
+ * Every key is the FULL object key, as the upload ticket named it, and must sit under this site's own storage folder (`<prefix>/...`). A key anywhere else (another site's or organisation's folder, the bucket root, the folder itself) refuses the whole request with `403` `KEY_OUTSIDE_SITE`, writes an audit row, and deletes nothing; it is never re-rooted. An empty key, a `.`/`..` segment, a leading `/`, a backslash, `%`, `*` or any other character outside the key alphabet is refused with `422` `INVALID_KEY` and nothing is deleted. There is no wildcard, listing or empty-the-bucket form. At most 100 keys per request (`422` `TOO_MANY_KEYS` with `max_keys`; the plugin sends smaller batches). Deleting a key that no longer exists succeeds, so a retry is safe. Works while uploads are refused at the storage cap, while offload is paused and while the account is not in good standing. Every call writes one audit row with the count and the site, never the file names. Usage, and so the cap, follows at the next measurement (within 24 hours).
40626
+ */
40627
+ post: operations["deleteMediaOffloadObjects"];
40628
+ delete?: never;
40629
+ options?: never;
40630
+ head?: never;
40631
+ patch?: never;
40632
+ trace?: never;
40633
+ };
40589
40634
  "/v1/media-offload/report": {
40590
40635
  parameters: {
40591
40636
  query?: never;
@@ -40626,6 +40671,8 @@ export interface paths {
40626
40671
  * Every key is joined onto the site's own prefix and validated. A key that tries to climb out of that prefix is refused with `422`, never normalised into something plausible.
40627
40672
  *
40628
40673
  * An offload writing to **our** storage answers `422` with `code: FEATURE_NOT_INCLUDED` and no URLs once the organisation no longer holds a plan that includes object storage — checked on every request, because a plugin token outlives the plan that paid for it (D26223). An offload writing to the customer's own bucket is unaffected.
40674
+ *
40675
+ * **Hard cap.** When the plan states `object_storage_overage_cap_gb` and the latest complete measurement of the organisation's storage on our buckets has reached the allowance plus that cap, this answers `422` with `code: STORAGE_CAP_REACHED`, no URLs, and `refusal: {key: refusal.objectstorage.storageCapReached, params: {limitGb}}`. Nothing stored is touched: reads and deletes continue. An upgrade lifts it at once.
40629
40676
  */
40630
40677
  post: operations["createMediaOffloadUploads"];
40631
40678
  delete?: never;
@@ -116137,6 +116184,15 @@ export interface components {
116137
116184
  * @description Bytes across the buckets **we own**. A bucket of the customer's own costs us nothing and is deliberately excluded — counting it would charge them twice for storage we never provided.
116138
116185
  */
116139
116186
  bytes_stored: number;
116187
+ /** @description The hard cap, or `null` when the plan states none (then there is no limit beyond the overage price and no cap wording is shown). At the cap new uploads are refused with `422` `code: STORAGE_CAP_REACHED`; stored files can still be read and deleted. The figure is the latest COMPLETE measurement, so an incomplete reading never engages it. An upgrade lifts it at once. */
116188
+ cap?: {
116189
+ /** @description The allowance plus the plan's `object_storage_overage_cap_gb`. */
116190
+ limit_gb: number;
116191
+ /** @description GB past the allowance (billed as overage) before uploads stop. */
116192
+ overage_cap_gb: number;
116193
+ /** @description Whether new uploads are refused now. */
116194
+ reached: boolean;
116195
+ } | null;
116140
116196
  /** @description Whether these figures are an observation. `false` means no bucket has been measured yet, so `bytes_stored` is a default and **must not** be drawn as "using none of your allowance" — an org with no buckets, an org whose buckets are empty and an org nobody has measured all report zero bytes, and only the last is a fault. */
116141
116197
  measured: boolean;
116142
116198
  /** Format: date-time */
@@ -128917,6 +128973,43 @@ export interface operations {
128917
128973
  503: components["responses"]["ServiceUnavailable"];
128918
128974
  };
128919
128975
  };
128976
+ adminTerminateComputeServer: {
128977
+ parameters: {
128978
+ query?: never;
128979
+ header?: never;
128980
+ path: {
128981
+ /** @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. */
128982
+ serverId: components["parameters"]["ComputeServerId"];
128983
+ };
128984
+ cookie?: never;
128985
+ };
128986
+ requestBody: {
128987
+ content: {
128988
+ "application/json": {
128989
+ /** @description Why staff ended the server (stored in the audit row). */
128990
+ reason: string;
128991
+ };
128992
+ };
128993
+ };
128994
+ responses: {
128995
+ /** @description The server's admin row, now `terminating`; the teardown runs in the background. */
128996
+ 202: {
128997
+ headers: {
128998
+ "RateLimit-Remaining": components["headers"]["RateLimitRemaining"];
128999
+ [name: string]: unknown;
129000
+ };
129001
+ content: {
129002
+ "application/json": components["schemas"]["AdminComputeServerEnvelope"];
129003
+ };
129004
+ };
129005
+ 401: components["responses"]["Unauthorized"];
129006
+ 403: components["responses"]["Forbidden"];
129007
+ 404: components["responses"]["NotFound"];
129008
+ 422: components["responses"]["UnprocessableEntity"];
129009
+ 429: components["responses"]["TooManyRequests"];
129010
+ 503: components["responses"]["ServiceUnavailable"];
129011
+ };
129012
+ };
128920
129013
  unsuspendAdminComputeServer: {
128921
129014
  parameters: {
128922
129015
  query?: never;
@@ -191024,6 +191117,40 @@ export interface operations {
191024
191117
  429: components["responses"]["TooManyRequests"];
191025
191118
  };
191026
191119
  };
191120
+ deleteMediaOffloadObjects: {
191121
+ parameters: {
191122
+ query?: never;
191123
+ header?: never;
191124
+ path?: never;
191125
+ cookie?: never;
191126
+ };
191127
+ requestBody: {
191128
+ content: {
191129
+ "application/json": {
191130
+ keys: string[];
191131
+ plugin_version?: string;
191132
+ };
191133
+ };
191134
+ };
191135
+ responses: {
191136
+ /** @description The keys were deleted (or were already gone). */
191137
+ 200: {
191138
+ headers: {
191139
+ [name: string]: unknown;
191140
+ };
191141
+ content: {
191142
+ "application/json": {
191143
+ deleted: number;
191144
+ };
191145
+ };
191146
+ };
191147
+ 401: components["responses"]["Unauthorized"];
191148
+ 403: components["responses"]["Forbidden"];
191149
+ 422: components["responses"]["UnprocessableEntity"];
191150
+ 429: components["responses"]["TooManyRequests"];
191151
+ 503: components["responses"]["ProviderNotConfigured"];
191152
+ };
191153
+ };
191027
191154
  reportMediaOffloadProgress: {
191028
191155
  parameters: {
191029
191156
  query?: never;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zinn-digital/sdk",
3
- "version": "0.1.1922",
3
+ "version": "0.1.1925",
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>",