@zinn-digital/sdk 0.1.2026 → 0.1.2029

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.
@@ -4225,6 +4225,26 @@ export interface paths {
4225
4225
  patch?: never;
4226
4226
  trace?: never;
4227
4227
  };
4228
+ "/v1/admin/compute/traffic-packs": {
4229
+ parameters: {
4230
+ query?: never;
4231
+ header?: never;
4232
+ path?: never;
4233
+ cookie?: never;
4234
+ };
4235
+ /**
4236
+ * Every prepaid traffic pack across the estate, newest first.
4237
+ * @description TRAFFICCAP car 4b (docs/687 section 9). Which org bought how many TB for which server and month, at what price, and whether it is still awaiting payment. `?status=` narrows to one status (anything else is `422 refusal.adminTransfer.unknownStatus`); `?period=` narrows to one `YYYY-MM` month. Read only. Requires staff `customer.view`.
4238
+ */
4239
+ get: operations["listAdminComputeTrafficPacks"];
4240
+ put?: never;
4241
+ post?: never;
4242
+ delete?: never;
4243
+ options?: never;
4244
+ head?: never;
4245
+ patch?: never;
4246
+ trace?: never;
4247
+ };
4228
4248
  "/v1/admin/conversions": {
4229
4249
  parameters: {
4230
4250
  query?: never;
@@ -32500,6 +32520,56 @@ export interface paths {
32500
32520
  patch?: never;
32501
32521
  trace?: never;
32502
32522
  };
32523
+ "/v1/compute/servers/{serverId}/traffic-packs": {
32524
+ parameters: {
32525
+ query?: never;
32526
+ header?: never;
32527
+ path: {
32528
+ /** @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. */
32529
+ serverId: components["parameters"]["ComputeServerId"];
32530
+ };
32531
+ cookie?: never;
32532
+ };
32533
+ /**
32534
+ * A server's traffic packs and its traffic against the cap this month.
32535
+ * @description TRAFFICCAP car 4. The packs bought for this machine (newest first, at most 100) and what the meter last read this month: usage, the plan allowance, the GB active packs add, and the cap they raise it to. A usage or allowance of `null` means the meter has no reading yet, never "nothing used". Requires `sites.view`.
32536
+ */
32537
+ get: operations["listComputeServerTrafficPacks"];
32538
+ put?: never;
32539
+ /**
32540
+ * Order a prepaid traffic pack for a server.
32541
+ * @description ⛔ **Chargeable, once paid.** Writes a pending pack and a taxed order for `tb` whole TB (unit price x TB, in the machine's billing currency). Nothing is charged here: pay the returned order with `payOrder` (wallet first, then any payment method). Paying activates the pack, which raises this month's cap at once and restarts a machine the cap stopped. Unused traffic expires when the allowance resets next month. A repeated `idempotency_key` (body or `Idempotency-Key` header) returns the same order. Refused (422) when the location sells no packs or the account is not in good standing. Requires `billing.payment.manage`.
32542
+ */
32543
+ post: operations["orderComputeServerTrafficPack"];
32544
+ delete?: never;
32545
+ options?: never;
32546
+ head?: never;
32547
+ patch?: never;
32548
+ trace?: never;
32549
+ };
32550
+ "/v1/compute/servers/{serverId}/traffic-packs/quote": {
32551
+ parameters: {
32552
+ query?: never;
32553
+ header?: never;
32554
+ path: {
32555
+ /** @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. */
32556
+ serverId: components["parameters"]["ComputeServerId"];
32557
+ };
32558
+ cookie?: never;
32559
+ };
32560
+ get?: never;
32561
+ put?: never;
32562
+ /**
32563
+ * What `tb` TB of extra traffic costs on this server.
32564
+ * @description A POST that changes nothing: the pre-tax price of `tb` packs in the machine's billing currency, with the expiry note every purchase surface shows. Requires `sites.view`.
32565
+ */
32566
+ post: operations["quoteComputeServerTrafficPack"];
32567
+ delete?: never;
32568
+ options?: never;
32569
+ head?: never;
32570
+ patch?: never;
32571
+ trace?: never;
32572
+ };
32503
32573
  "/v1/compute/servers/{serverId}/usage": {
32504
32574
  parameters: {
32505
32575
  query?: never;
@@ -65245,6 +65315,28 @@ export interface components {
65245
65315
  /** @description Why. ⛔ Required, and shown to the customer verbatim: a suspension with no reason is a support ticket we have already lost, and an operator who cannot remember why either. */
65246
65316
  reason: string;
65247
65317
  };
65318
+ /** @description A traffic pack as staff see it, with the org and server it belongs to. */
65319
+ AdminComputeTrafficPack: {
65320
+ /** Format: date-time */
65321
+ activated_at: string | null;
65322
+ /** Format: date-time */
65323
+ created_at: string;
65324
+ currency: string;
65325
+ id: components["schemas"]["Uuid"];
65326
+ net_minor: number;
65327
+ /** Format: uuid */
65328
+ order_id: string | null;
65329
+ /** Format: uuid */
65330
+ org_id: string;
65331
+ period: string;
65332
+ /** Format: uuid */
65333
+ server_id: string;
65334
+ server_label: string;
65335
+ /** @enum {string} */
65336
+ status: "pending" | "active" | "void";
65337
+ tb: number;
65338
+ unit_price_minor: number;
65339
+ };
65248
65340
  AdminComputeTrustWaiver: {
65249
65341
  /** Format: date-time */
65250
65342
  granted_at: string;
@@ -82456,6 +82548,7 @@ export interface components {
82456
82548
  listed_currency?: string | null;
82457
82549
  /** @description The marketplace package a `marketplace_package` line buys. Echoed so a basket can link back to the Zinn® it came from — the line's `description` is a snapshot taken at capture, this is the identity. */
82458
82550
  listing_package_id?: components["schemas"]["Uuid"] | null;
82551
+ /** @description The line's configuration. On a `compute_server` line it is the order config, and its `spec` is the opaque `sz-…` size id — never the supplier's machine code (SUPPLYCHK: server suppliers are never shown to customers). */
82459
82552
  metadata?: {
82460
82553
  [key: string]: unknown;
82461
82554
  };
@@ -85123,7 +85216,7 @@ export interface components {
85123
85216
  ram_gb: number | null;
85124
85217
  /** @description The one-off setup fee, passed on at cost, minor units. */
85125
85218
  setup_minor: number;
85126
- /** @description The offer's machine token. */
85219
+ /** @description The offer's machine id, sent back as given to order it. ⛔⛔ An opaque `sz-…` id on a customer response (SUPPLYCHK: a supplier's machine code names the supplier, and server suppliers are never shown to customers). */
85127
85220
  spec: string;
85128
85221
  zone: string;
85129
85222
  };
@@ -85271,7 +85364,7 @@ export interface components {
85271
85364
  plan_code: string;
85272
85365
  /** @description ⛔ D24975 (W43-48). OUR price for the plan, in minor units, in the machine's own data centre at its own cadence. On an own-account range this is the only figure; `amount` and `detail` are blank, because the provider's figure there is our cost. `null` on the resold range. */
85273
85366
  price_minor: number | null;
85274
- /** @description The size the figure is for. */
85367
+ /** @description The size the figure is for. ⛔⛔ An opaque `sz-…` id on a customer response (SUPPLYCHK: a supplier's machine code names the supplier, and server suppliers are never shown to customers). */
85275
85368
  spec: string;
85276
85369
  };
85277
85370
  /** @description The machine size to move to. Send `plan_code` on an own-account range (W43-48): several plans are built on one machine type there, so a type alone is refused when it is ambiguous. At least one of the two is required. */
@@ -85347,6 +85440,16 @@ export interface components {
85347
85440
  id: components["schemas"]["Uuid"];
85348
85441
  /** @description The provider image the machine was built from. Blank on the resold range, which installs one managed image and offers no choice. */
85349
85442
  image: string;
85443
+ /**
85444
+ * @description What kind of machine it is, read server-side from the real size.
85445
+ * @enum {string}
85446
+ */
85447
+ kind?: "vm" | "gpu" | "metal";
85448
+ /**
85449
+ * @description `windows` when the size carries a Windows Server licence, else `""`; read server-side from the real size.
85450
+ * @enum {string}
85451
+ */
85452
+ licence?: "" | "windows";
85350
85453
  /** @description The account to sign in as (W43-49, `docs/689`). `admin` — key-only, passwordless `sudo`, root login refused — on a Zinn® Cloud machine built under the access model; `root` on one built before it. */
85351
85454
  login_user: string;
85352
85455
  /**
@@ -85395,7 +85498,7 @@ export interface components {
85395
85498
  provider: string;
85396
85499
  /** @description ⛔ **Always null today, and honestly so**: the provider publishes no renewal date, and one computed from the order plus the term would be our arithmetic rendered as the provider's fact. */
85397
85500
  renews_at: string | null;
85398
- /** @description The machine size it currently runs. */
85501
+ /** @description The machine size it currently runs. ⛔⛔ An opaque `sz-…` id on a customer response (SUPPLYCHK: a supplier's machine code names the supplier, and server suppliers are never shown to customers). */
85399
85502
  spec: string;
85400
85503
  /**
85401
85504
  * @description How far the order got — **ours**, and a different fact from `power_state`. `pending` is a row with nothing bought and nothing charged; `failed` is the state whose `message` is the only thing on the screen worth reading. ⛔ Deliberately separate from `vendor_status`: rounding the provider's word into this enum would mean an unrecognised state silently became `active`, and `active` is what unlocks every control.
@@ -85945,10 +86048,20 @@ export interface components {
85945
86048
  cores: number | null;
85946
86049
  /** @description Disk in gibibytes, or null when not stated. */
85947
86050
  disk_gb: number | null;
85948
- /** @description The size's id, and what an order names. When the provider published no sizes, our own sold tiers fill the list and this id **is** a plan code. */
86051
+ /** @description The size's id, and what an order names. When the provider published no sizes, our own sold tiers fill the list and this id **is** a plan code. ⛔⛔ On a customer response this is an opaque `sz-…` id (SUPPLYCHK, owner: server suppliers are never shown to customers) — a supplier's machine code names the supplier. An order or resize may send it back as given; the engine maps it to the real size. */
85949
86052
  id: string;
85950
- /** @description The size's display name. */
86053
+ /**
86054
+ * @description What kind of machine the size is, read server-side from the real size (a client can no longer read it from the id, which is opaque). A resize keeps the kind.
86055
+ * @enum {string}
86056
+ */
86057
+ kind?: "vm" | "gpu" | "metal";
86058
+ /** @description The size's display name: on a customer response the Zinn plan name that sells this size, else `""` — never the supplier's product name. */
85951
86059
  label: string;
86060
+ /**
86061
+ * @description `windows` for a licence-included Windows size, else `""`, read server-side from the real size. A resize keeps the licence.
86062
+ * @enum {string}
86063
+ */
86064
+ licence?: "" | "windows";
85952
86065
  /**
85953
86066
  * @description `windows` for a size sold with a Windows Server licence included; `""` for any other. ⛔⛔ A picker MUST match it to `ComputeImage.os_family`: Windows images go on Windows sizes only and Windows sizes take Windows images only (the order is refused otherwise, before anything is charged).
85954
86067
  * @enum {string}
@@ -86071,7 +86184,7 @@ export interface components {
86071
86184
  sold_out: boolean;
86072
86185
  /** @description Availability is per region. The data centres (as in `zone_prices`) this plan is priced in but cannot be supplied in right now. A plan sold out in some regions stays orderable in the others (`zone_prices` lists only those); the order screen shows these as sold out. A region kept off sale by our margin floor is never listed: it is not offered at all. On a `sold_out` plan, every region it is sold out in. */
86073
86186
  sold_out_zones: string[];
86074
- /** @description The provider's own token for this size (the platform's `micro`), or empty when our catalogue names none. A client joins a chosen size to its price on THIS field first, falling back to `plan_code` — the ids in `ComputeProvider.specs` are vendor tokens whenever `spec_source` is `vendor` and plan codes whenever it is `catalogue`, and both states occur. Joining on `plan_code` alone made every Zinn® Cloud size unbuyable when the vendor began publishing its spec list. An empty value must never match an empty spec id. */
86187
+ /** @description ⛔⛔ On a customer response the opaque `sz-…` alias of the provider's token for this size (SUPPLYCHK — suppliers are never shown to customers; staff see the token), or empty when our catalogue names none. A client joins a chosen size to its price on THIS field first, falling back to `plan_code` — the ids in `ComputeProvider.specs` are vendor tokens whenever `spec_source` is `vendor` and plan codes whenever it is `catalogue`, and both states occur. Joining on `plan_code` alone made every Zinn® Cloud size unbuyable when the vendor began publishing its spec list. An empty value must never match an empty spec id. */
86075
86188
  vendor_spec: string;
86076
86189
  /**
86077
86190
  * @description Every data centre this size is sold in, with the figure for each cadence.
@@ -86108,6 +86221,66 @@ export interface components {
86108
86221
  /** @description The cadence. Sent straight back as `CartLineCreate.interval` to buy at it. */
86109
86222
  interval: components["schemas"]["BillingInterval"];
86110
86223
  };
86224
+ ComputeTrafficPack: {
86225
+ /** Format: date-time */
86226
+ activated_at: string | null;
86227
+ /** Format: date-time */
86228
+ created_at: string;
86229
+ currency: string;
86230
+ id: components["schemas"]["Uuid"];
86231
+ net_minor: number;
86232
+ /** Format: uuid */
86233
+ order_id: string | null;
86234
+ period: string;
86235
+ /** @enum {string} */
86236
+ status: "pending" | "active" | "void";
86237
+ tb: number;
86238
+ unit_price_minor: number;
86239
+ };
86240
+ ComputeTrafficPackList: {
86241
+ data: components["schemas"]["ComputeTrafficPack"][];
86242
+ expiry_note: string;
86243
+ status: components["schemas"]["ComputeTrafficStatus"];
86244
+ };
86245
+ ComputeTrafficPackOrder: {
86246
+ currency: string;
86247
+ expiry_note: string;
86248
+ order_id: components["schemas"]["Uuid"];
86249
+ pack: components["schemas"]["ComputeTrafficPack"];
86250
+ subtotal_minor: number;
86251
+ tax_minor: number;
86252
+ total_minor: number;
86253
+ };
86254
+ ComputeTrafficPackOrderRequest: {
86255
+ idempotency_key?: string;
86256
+ /** @description Whole TB to buy; no upper limit. */
86257
+ tb: number;
86258
+ };
86259
+ ComputeTrafficPackQuote: {
86260
+ currency: string;
86261
+ expiry_note: string;
86262
+ /** @description unit_price_minor x tb */
86263
+ net_minor: number;
86264
+ /** @description The month the pack counts in (YYYY-MM). */
86265
+ period: string;
86266
+ tb: number;
86267
+ /** @description Price of one TB in minor units. */
86268
+ unit_price_minor: number;
86269
+ };
86270
+ ComputeTrafficPackQuoteRequest: {
86271
+ /** @description Whole TB to buy; no upper limit. */
86272
+ tb: number;
86273
+ };
86274
+ ComputeTrafficStatus: {
86275
+ /** @description -1 = unlimited; null = no reading yet. */
86276
+ allowance_gb_milli: number | null;
86277
+ cap_gb_milli: number | null;
86278
+ packs_gb: number;
86279
+ packs_sold: boolean;
86280
+ period: string;
86281
+ /** @description Thousandths of a GB; null = no reading yet. */
86282
+ used_gb_milli: number | null;
86283
+ };
86111
86284
  ComputeTrialCredit: {
86112
86285
  claimed: boolean;
86113
86286
  currency: string;
@@ -131729,6 +131902,40 @@ export interface operations {
131729
131902
  503: components["responses"]["ServiceUnavailable"];
131730
131903
  };
131731
131904
  };
131905
+ listAdminComputeTrafficPacks: {
131906
+ parameters: {
131907
+ query?: {
131908
+ /** @description Opaque cursor from a previous page's `page.next_cursor`. */
131909
+ cursor?: components["parameters"]["Cursor"];
131910
+ /** @description Maximum items to return (page size). */
131911
+ limit?: components["parameters"]["Limit"];
131912
+ period?: string;
131913
+ status?: "pending" | "active" | "void";
131914
+ };
131915
+ header?: never;
131916
+ path?: never;
131917
+ cookie?: never;
131918
+ };
131919
+ requestBody?: never;
131920
+ responses: {
131921
+ /** @description One page of traffic packs. */
131922
+ 200: {
131923
+ headers: {
131924
+ [name: string]: unknown;
131925
+ };
131926
+ content: {
131927
+ "application/json": {
131928
+ data: components["schemas"]["AdminComputeTrafficPack"][];
131929
+ page: components["schemas"]["PageMeta"];
131930
+ };
131931
+ };
131932
+ };
131933
+ 401: components["responses"]["Unauthorized"];
131934
+ 403: components["responses"]["Forbidden"];
131935
+ 422: components["responses"]["UnprocessableEntity"];
131936
+ 429: components["responses"]["TooManyRequests"];
131937
+ };
131938
+ };
131732
131939
  getAdminConversions: {
131733
131940
  parameters: {
131734
131941
  query?: {
@@ -179573,6 +179780,107 @@ export interface operations {
179573
179780
  429: components["responses"]["TooManyRequests"];
179574
179781
  };
179575
179782
  };
179783
+ listComputeServerTrafficPacks: {
179784
+ parameters: {
179785
+ query?: never;
179786
+ header?: never;
179787
+ path: {
179788
+ /** @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. */
179789
+ serverId: components["parameters"]["ComputeServerId"];
179790
+ };
179791
+ cookie?: never;
179792
+ };
179793
+ requestBody?: never;
179794
+ responses: {
179795
+ /** @description The machine's packs and traffic status. */
179796
+ 200: {
179797
+ headers: {
179798
+ "RateLimit-Remaining": components["headers"]["RateLimitRemaining"];
179799
+ [name: string]: unknown;
179800
+ };
179801
+ content: {
179802
+ "application/json": components["schemas"]["ComputeTrafficPackList"];
179803
+ };
179804
+ };
179805
+ 401: components["responses"]["Unauthorized"];
179806
+ 403: components["responses"]["Forbidden"];
179807
+ 404: components["responses"]["NotFound"];
179808
+ 422: components["responses"]["UnprocessableEntity"];
179809
+ 429: components["responses"]["TooManyRequests"];
179810
+ 503: components["responses"]["ServiceUnavailable"];
179811
+ };
179812
+ };
179813
+ orderComputeServerTrafficPack: {
179814
+ parameters: {
179815
+ query?: never;
179816
+ header?: {
179817
+ /** @description Client-generated key that makes an unsafe request replay-safe: the server stores the first response and returns it verbatim for repeats. */
179818
+ "Idempotency-Key"?: components["parameters"]["IdempotencyKey"];
179819
+ };
179820
+ path: {
179821
+ /** @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. */
179822
+ serverId: components["parameters"]["ComputeServerId"];
179823
+ };
179824
+ cookie?: never;
179825
+ };
179826
+ requestBody: {
179827
+ content: {
179828
+ "application/json": components["schemas"]["ComputeTrafficPackOrderRequest"];
179829
+ };
179830
+ };
179831
+ responses: {
179832
+ /** @description The pending pack and the order that pays it. */
179833
+ 201: {
179834
+ headers: {
179835
+ "RateLimit-Remaining": components["headers"]["RateLimitRemaining"];
179836
+ [name: string]: unknown;
179837
+ };
179838
+ content: {
179839
+ "application/json": components["schemas"]["ComputeTrafficPackOrder"];
179840
+ };
179841
+ };
179842
+ 401: components["responses"]["Unauthorized"];
179843
+ 403: components["responses"]["Forbidden"];
179844
+ 404: components["responses"]["NotFound"];
179845
+ 422: components["responses"]["UnprocessableEntity"];
179846
+ 429: components["responses"]["TooManyRequests"];
179847
+ 503: components["responses"]["ServiceUnavailable"];
179848
+ };
179849
+ };
179850
+ quoteComputeServerTrafficPack: {
179851
+ parameters: {
179852
+ query?: never;
179853
+ header?: never;
179854
+ path: {
179855
+ /** @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. */
179856
+ serverId: components["parameters"]["ComputeServerId"];
179857
+ };
179858
+ cookie?: never;
179859
+ };
179860
+ requestBody: {
179861
+ content: {
179862
+ "application/json": components["schemas"]["ComputeTrafficPackQuoteRequest"];
179863
+ };
179864
+ };
179865
+ responses: {
179866
+ /** @description The price. */
179867
+ 200: {
179868
+ headers: {
179869
+ "RateLimit-Remaining": components["headers"]["RateLimitRemaining"];
179870
+ [name: string]: unknown;
179871
+ };
179872
+ content: {
179873
+ "application/json": components["schemas"]["ComputeTrafficPackQuote"];
179874
+ };
179875
+ };
179876
+ 401: components["responses"]["Unauthorized"];
179877
+ 403: components["responses"]["Forbidden"];
179878
+ 404: components["responses"]["NotFound"];
179879
+ 422: components["responses"]["UnprocessableEntity"];
179880
+ 429: components["responses"]["TooManyRequests"];
179881
+ 503: components["responses"]["ServiceUnavailable"];
179882
+ };
179883
+ };
179576
179884
  getComputeServerUsage: {
179577
179885
  parameters: {
179578
179886
  query?: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zinn-digital/sdk",
3
- "version": "0.1.2026",
3
+ "version": "0.1.2029",
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>",