@zinn-digital/sdk 0.1.1944 → 0.1.1948

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.
@@ -41878,6 +41878,60 @@ export interface paths {
41878
41878
  patch?: never;
41879
41879
  trace?: never;
41880
41880
  };
41881
+ "/v1/orders/{orderId}/card-payment": {
41882
+ parameters: {
41883
+ query?: never;
41884
+ header?: never;
41885
+ path: {
41886
+ /** @description The order's id. */
41887
+ orderId: components["parameters"]["OrderId"];
41888
+ };
41889
+ cookie?: never;
41890
+ };
41891
+ get?: never;
41892
+ put?: never;
41893
+ /**
41894
+ * Open a card payment the customer's browser confirms.
41895
+ * @description CARDAUTH (DAY-0434). Opens ONE card payment per order at the processor, for the browser to confirm with the processor's library, so a 3-D Secure challenge opens in the page. Calling it again while that payment is open returns the same one. The amount is computed here from the order, never from the request.
41896
+ *
41897
+ * Account credit pays first, exactly as on `payOrder`: the card is asked only for the remainder, and the credit is drawn only when the card part is confirmed captured, so an abandoned or failed challenge costs no credit. When credit pays the whole order no card payment is opened and `status` is `covered_by_credit`: settle with `payOrder`.
41898
+ *
41899
+ * Pay once is the default: the card is kept for renewals only when `save_card` is true.
41900
+ *
41901
+ * Opens are limited per organisation and per order (each one reads the processor); over the limit the answer is `429` with `Retry-After`. A repeated call for the same order within the limit returns the same open payment.
41902
+ */
41903
+ post: operations["startOrderCardPayment"];
41904
+ delete?: never;
41905
+ options?: never;
41906
+ head?: never;
41907
+ patch?: never;
41908
+ trace?: never;
41909
+ };
41910
+ "/v1/orders/{orderId}/card-payment/confirm": {
41911
+ parameters: {
41912
+ query?: never;
41913
+ header?: never;
41914
+ path: {
41915
+ /** @description The order's id. */
41916
+ orderId: components["parameters"]["OrderId"];
41917
+ };
41918
+ cookie?: never;
41919
+ };
41920
+ get?: never;
41921
+ put?: never;
41922
+ /**
41923
+ * Settle the order from the card payment the browser confirmed.
41924
+ * @description ⛔ **The browser is not believed.** The engine re-reads the payment from the processor and settles only when it succeeded, for this order's remainder, in its currency, with this order and organisation in its metadata. The processor's webhook is the second path to the same single settlement, so a closed tab still pays the order.
41925
+ *
41926
+ * A declined card or a failed 3-D Secure challenge answers 200 with `payment_failed`, the class of failure and the other rails; nothing was taken and the order is payable again.
41927
+ */
41928
+ post: operations["confirmOrderCardPayment"];
41929
+ delete?: never;
41930
+ options?: never;
41931
+ head?: never;
41932
+ patch?: never;
41933
+ trace?: never;
41934
+ };
41881
41935
  "/v1/orders/{orderId}/customer-action": {
41882
41936
  parameters: {
41883
41937
  query?: never;
@@ -64256,6 +64310,11 @@ export interface components {
64256
64310
  * ⛔ Required — `422` — on any range that publishes images, and meaningless on one that does not. It is not marked required here because which ranges publish them is a live provider fact a schema cannot know. ⛔⛔ Check the image's `architecture` against the chosen size: ARM and x86 images are separate entries with the **same name**, and a mismatch is refused *after* the customer has paid.
64257
64311
  */
64258
64312
  image?: string;
64313
+ /**
64314
+ * @description CLOUD-U2 (P3-007). How the server is run: `panel` = With the Zinn® panel (our free web stack converged on it and managed from the dashboard), `bare` = Bare server, I manage it. Omitted or blank = `bare` (R2: the panel is only ever given when the order names it; the dashboard's order form always sends the choice). An explicit `panel` that cannot run (Windows, under 2 GB or an unknown size, a range we do not hold the account for, or with a Docker or Kubernetes `blueprint`) is refused `422` (`refusal.compute.panel*`) and nothing is charged.
64315
+ * @enum {string}
64316
+ */
64317
+ management?: "" | "panel" | "bare";
64259
64318
  /** @description What to call the machine. It is also the name at the provider, which is what lets a retried purchase find the machine it already bought instead of buying a second. */
64260
64319
  name: string;
64261
64320
  /** @description A stack optimisation profile, as the configurator reported it. */
@@ -83189,9 +83248,17 @@ export interface components {
83189
83248
  can_order: boolean;
83190
83249
  /** @description The platforms a machine can be placed on. */
83191
83250
  data: components["schemas"]["ComputeProvider"][];
83251
+ panel?: components["schemas"]["ComputeCataloguePanel"];
83192
83252
  /** @description The tiers we sell on this range. */
83193
83253
  tiers: components["schemas"]["ComputeTier"][];
83194
83254
  };
83255
+ /** @description CLOUD-U2 (P3-007): whether "With the Zinn® panel" can be ordered on this range. The machine half — a Linux image and at least `min_ram_mb` of memory — is judged per size with these numbers by the screen and again by the order, which refuses `422`. */
83256
+ ComputeCataloguePanel: {
83257
+ min_ram_mb: number;
83258
+ offered: boolean;
83259
+ /** @description The refusal key naming why this range cannot have the panel, or null. */
83260
+ refusal: string | null;
83261
+ };
83195
83262
  /** @description A k3s cluster on the organisation's own pay-by-the-hour machines (W43-49, `docs/689`). Every version and health figure is the cluster's own answer, read from it. */
83196
83263
  ComputeCluster: {
83197
83264
  /** @description The Kubernetes API's public address (port 6443). */
@@ -83467,6 +83534,11 @@ export interface components {
83467
83534
  image?: string;
83468
83535
  /** @description SERVERCARE-r1: order the machine Zinn® Managed (patching, monitoring, on-call) from day one (absent means self-managed). Priced from the live `managed` add-on row and added to the machine's line; refused at add-to-cart when the range or currency cannot take it. Coexists with `add_on`. Refused on a website's own server (`own_vps_site_id`) with `refusal.ownVps.managedCareNotOnMove`, at add-to-cart and again at checkout: that server is already run by us. */
83469
83536
  managed_care?: boolean;
83537
+ /**
83538
+ * @description CLOUD-U2 (P3-007). How the server is run: `panel` = With the Zinn® panel (our free web stack converged on it and managed from the dashboard), `bare` = Bare server, I manage it. Omitted or blank = `bare` (R2: the panel is only ever given when the order names it; the dashboard's order form always sends the choice). An explicit `panel` that cannot run (Windows, under 2 GB or an unknown size, a range we do not hold the account for, or with a Docker or Kubernetes `blueprint`) is refused `422` (`refusal.compute.panel*`) and nothing is charged.
83539
+ * @enum {string}
83540
+ */
83541
+ management?: "" | "panel" | "bare";
83470
83542
  /** @description What the customer calls the machine. Theirs, shown back verbatim, and never sent to the vendor — on the managed platform a machine's name is the platform's own row id. */
83471
83543
  name: string;
83472
83544
  /** @description The stack to tune for (PHP, WordPress, Magento, …). */
@@ -83722,6 +83794,11 @@ export interface components {
83722
83794
  image: string;
83723
83795
  /** @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. */
83724
83796
  login_user: string;
83797
+ /**
83798
+ * @description CLOUD-U2 (P3-007): as ordered — `panel` (With the Zinn® panel) or `bare` (I manage it). ⛔ Not `management_mode`, which is the paid Managed Care add-on.
83799
+ * @enum {string}
83800
+ */
83801
+ management: "panel" | "bare";
83725
83802
  /**
83726
83803
  * @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).
83727
83804
  * @enum {string}
@@ -83744,6 +83821,13 @@ export interface components {
83744
83821
  operable: boolean;
83745
83822
  /** @description The stack optimisation profile it was built with, or `""` for none. */
83746
83823
  optimisation: string;
83824
+ /** @description Customer-facing reason a panel enrolment failed; blank otherwise. */
83825
+ panel_message: string;
83826
+ /**
83827
+ * @description CLOUD-U2 (P3-003): what is REALLY on the machine — blank (nothing of ours), `enrolling`, `managed` or `failed`. The server page shows the panel from this, never from `management`.
83828
+ * @enum {string}
83829
+ */
83830
+ panel_state: "" | "enrolling" | "managed" | "failed";
83747
83831
  /** @description The tier it was bought on, or `""` when it was ordered by size alone. */
83748
83832
  plan_code: string;
83749
83833
  /**
@@ -97989,6 +98073,44 @@ export interface components {
97989
98073
  /** @description Elapsed-time SLA for an automated service; `null` where there is no committed one. A database optimisation does not care that it is Sunday. */
97990
98074
  sla_hours: number | null;
97991
98075
  };
98076
+ /** @description The order after the engine re-read the card payment from the processor. `paid`: settled. `requires_action`: the browser still has a step to finish (3-D Secure). `processing`: the processor has not decided; the webhook settles it. `held`: money was captured but cannot settle this order as recorded (another payment paid it, or the amount changed); staff were told and nothing is refunded automatically. `payment_failed`: nothing was taken; read `failure_class` and offer `other_rails`. */
98077
+ OrderCardPaymentResult: {
98078
+ failure_class?: components["schemas"]["PaymentDeclineClass"];
98079
+ order_status?: string;
98080
+ /** @description The other gateways this order may be paid on (`getOrderPaymentOptions`). */
98081
+ other_rails?: string[];
98082
+ settled: boolean;
98083
+ /** @enum {string} */
98084
+ status: "paid" | "requires_action" | "processing" | "held" | "payment_failed";
98085
+ };
98086
+ /** @description A card payment the customer's browser confirms (CARDAUTH, DAY-0434), so a 3-D Secure challenge opens in the page. `covered_by_credit`: account credit pays the whole order, no card payment was opened, and the client settles with `payOrder`. */
98087
+ OrderCardPaymentStart: {
98088
+ /**
98089
+ * Format: int64
98090
+ * @description What the card is asked for, in minor units (the order total less credit).
98091
+ */
98092
+ amount_minor: number;
98093
+ /** @description True only when the customer ticked "save this card": the processor keeps the card for off-session renewals. False (the default) is pay once; nothing is kept. */
98094
+ card_reuse_applied?: boolean;
98095
+ /** @description The processor's client secret, for `confirmPayment` in the browser only. Never stored or logged by the client. Absent when `status` is `covered_by_credit`. */
98096
+ client_token?: string;
98097
+ /**
98098
+ * Format: int64
98099
+ * @description The account credit that pays the rest, drawn only once the card part is captured.
98100
+ */
98101
+ credit_minor: number;
98102
+ currency: string;
98103
+ /** @enum {string} */
98104
+ intent_kind?: "payment";
98105
+ /** @description The processor's payment id, posted back to `confirmOrderCardPayment`. */
98106
+ payment_intent_id?: string;
98107
+ /** @description The processor's publishable key for the browser library. */
98108
+ publishable_key?: string;
98109
+ /** @enum {string} */
98110
+ rail: "card";
98111
+ /** @enum {string} */
98112
+ status: "requires_payment" | "covered_by_credit";
98113
+ };
97992
98114
  /** @description ⛔ Shape only. Everything that decides whether the provider would accept the order — the provider, the zone, the size, the disk/bandwidth pair — is validated in the engine, because those rules must hold for a workflow activity and a management command too, and the sentence a customer reads must be the same whichever door they came through. */
97993
98115
  OrderComputeServerRequest: {
97994
98116
  /** @description An explicit transfer allocation, for a provider whose `supports_disk_and_bandwidth` is true. */
@@ -98007,6 +98129,11 @@ export interface components {
98007
98129
  * ⛔ Required — `422` — on any range that publishes images, and meaningless on one that does not. It is not marked required here because which ranges publish them is a live provider fact a schema cannot know. ⛔⛔ Check the image's `architecture` against the chosen size: ARM and x86 images are separate entries with the **same name**, and a mismatch is refused *after* the customer has paid.
98008
98130
  */
98009
98131
  image?: string;
98132
+ /**
98133
+ * @description CLOUD-U2 (P3-007). How the server is run: `panel` = With the Zinn® panel (our free web stack converged on it and managed from the dashboard), `bare` = Bare server, I manage it. Omitted or blank = `bare` (R2: the panel is only ever given when the order names it; the dashboard's order form always sends the choice). An explicit `panel` that cannot run (Windows, under 2 GB or an unknown size, a range we do not hold the account for, or with a Docker or Kubernetes `blueprint`) is refused `422` (`refusal.compute.panel*`) and nothing is charged.
98134
+ * @enum {string}
98135
+ */
98136
+ management?: "" | "panel" | "bare";
98010
98137
  /** @description What to call the machine. It is also the name at the provider, which is what lets a retried purchase find the machine it already bought instead of buying a second. */
98011
98138
  name: string;
98012
98139
  /** @description A stack optimisation profile, as the configurator reported it. */
@@ -193270,6 +193397,113 @@ export interface operations {
193270
193397
  429: components["responses"]["TooManyRequests"];
193271
193398
  };
193272
193399
  };
193400
+ startOrderCardPayment: {
193401
+ parameters: {
193402
+ query?: never;
193403
+ header?: never;
193404
+ path: {
193405
+ /** @description The order's id. */
193406
+ orderId: components["parameters"]["OrderId"];
193407
+ };
193408
+ cookie?: never;
193409
+ };
193410
+ requestBody?: {
193411
+ content: {
193412
+ "application/json": {
193413
+ /**
193414
+ * @description The customer ticked "save this card" for automatic renewals.
193415
+ * @default false
193416
+ */
193417
+ save_card?: boolean;
193418
+ };
193419
+ };
193420
+ };
193421
+ responses: {
193422
+ /** @description The card payment to confirm in the browser, or `covered_by_credit`. */
193423
+ 200: {
193424
+ headers: {
193425
+ [name: string]: unknown;
193426
+ };
193427
+ content: {
193428
+ "application/json": components["schemas"]["OrderCardPaymentStart"];
193429
+ };
193430
+ };
193431
+ 401: components["responses"]["Unauthorized"];
193432
+ 403: components["responses"]["Forbidden"];
193433
+ 404: components["responses"]["NotFound"];
193434
+ /** @description Another payment for this order is already being processed (`refusal.commerce.paymentInFlight`), or an included domain is no longer available. */
193435
+ 409: {
193436
+ headers: {
193437
+ [name: string]: unknown;
193438
+ };
193439
+ content: {
193440
+ "application/json": components["schemas"]["Error"];
193441
+ };
193442
+ };
193443
+ /** @description The order is already paid, cannot be paid, or cannot be paid by card in the browser. */
193444
+ 422: {
193445
+ headers: {
193446
+ [name: string]: unknown;
193447
+ };
193448
+ content: {
193449
+ "application/json": components["schemas"]["Error"];
193450
+ };
193451
+ };
193452
+ 429: components["responses"]["TooManyRequests"];
193453
+ };
193454
+ };
193455
+ confirmOrderCardPayment: {
193456
+ parameters: {
193457
+ query?: never;
193458
+ header?: never;
193459
+ path: {
193460
+ /** @description The order's id. */
193461
+ orderId: components["parameters"]["OrderId"];
193462
+ };
193463
+ cookie?: never;
193464
+ };
193465
+ requestBody: {
193466
+ content: {
193467
+ "application/json": {
193468
+ /** @description The id returned by `startOrderCardPayment`. */
193469
+ payment_intent_id: string;
193470
+ };
193471
+ };
193472
+ };
193473
+ responses: {
193474
+ /** @description The result of the re-read. Read `status`. */
193475
+ 200: {
193476
+ headers: {
193477
+ [name: string]: unknown;
193478
+ };
193479
+ content: {
193480
+ "application/json": components["schemas"]["OrderCardPaymentResult"];
193481
+ };
193482
+ };
193483
+ 401: components["responses"]["Unauthorized"];
193484
+ 403: components["responses"]["Forbidden"];
193485
+ 404: components["responses"]["NotFound"];
193486
+ /** @description Nothing was settled: the payment named is not this order's, or the processor holds another amount or currency (`refusal.commerce.cardPaymentMismatch`, audited), or another payment for this order is being processed (`refusal.commerce.paymentInFlight`). */
193487
+ 409: {
193488
+ headers: {
193489
+ [name: string]: unknown;
193490
+ };
193491
+ content: {
193492
+ "application/json": components["schemas"]["Error"];
193493
+ };
193494
+ };
193495
+ /** @description No `payment_intent_id`, or the order cannot be paid. */
193496
+ 422: {
193497
+ headers: {
193498
+ [name: string]: unknown;
193499
+ };
193500
+ content: {
193501
+ "application/json": components["schemas"]["Error"];
193502
+ };
193503
+ };
193504
+ 429: components["responses"]["TooManyRequests"];
193505
+ };
193506
+ };
193273
193507
  openOrderCustomerAction: {
193274
193508
  parameters: {
193275
193509
  query?: never;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zinn-digital/sdk",
3
- "version": "0.1.1944",
3
+ "version": "0.1.1948",
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>",