@zinn-digital/sdk 0.1.1953 → 0.1.1956
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.
- package/dist/generated/schema.d.ts +136 -2
- package/package.json +1 -1
|
@@ -4086,6 +4086,33 @@ export interface paths {
|
|
|
4086
4086
|
patch?: never;
|
|
4087
4087
|
trace?: never;
|
|
4088
4088
|
};
|
|
4089
|
+
"/v1/admin/compute/servers/{serverId}/void-unbuilt": {
|
|
4090
|
+
parameters: {
|
|
4091
|
+
query?: never;
|
|
4092
|
+
header?: never;
|
|
4093
|
+
path: {
|
|
4094
|
+
/** @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. */
|
|
4095
|
+
serverId: components["parameters"]["ComputeServerId"];
|
|
4096
|
+
};
|
|
4097
|
+
cookie?: never;
|
|
4098
|
+
};
|
|
4099
|
+
/**
|
|
4100
|
+
* What voiding a never-built cloud server would return as Zinn® credit.
|
|
4101
|
+
* @description DAY-0364 (VERIFY-X276 F1). Staff-only on `billing.refund`. Reads only: no supplier call, nothing written. Answers the Zinn® credit a void WOULD return per purse (`trial`, `general`) in integer minor units of `currency`, computed by the same code the void uses, so the confirm dialog names the exact amount. Once the server has been voided, `already` is true and the figures are what the first void returned.
|
|
4102
|
+
*/
|
|
4103
|
+
get: operations["adminPreviewVoidUnbuiltComputeServer"];
|
|
4104
|
+
put?: never;
|
|
4105
|
+
/**
|
|
4106
|
+
* Staff void a cloud server that was paid for but never built.
|
|
4107
|
+
* @description DAY-0364/DAY-0429. Staff-only on `billing.refund` (it returns money); audit-logged (`compute.server.void_unbuilt`) in the same transaction as the change. Makes ONE fresh READ at the supplier (never a cancel or delete): only a definite not-found proceeds. Hours not yet settled are voided (never billed); money already taken for this server is returned as Zinn® credit to the SAME purse it came from (trial credit stays trial credit), in integer minor units, with no "credit added" mail. The row becomes `failed` with the `build_never_built_not_charged` notice, so the customer sees "We could not build this server. You have not been charged for it." Idempotent: a second call answers `200` with `already: true` and returns nothing twice. ⛔ `422` on a server ever seen running at the supplier (`refusal.compute.voidEverSeenRunning`), one not recorded as missing (`refusal.compute.voidNotMissing`), one already `terminated` (`refusal.compute.alreadyRemoved`), a fenced organisation without `allow_fenced_org` (`refusal.compute.voidFencedOrg`), a machine the supplier still has (`refusal.compute.voidMachineExists`) and a supplier answer that is not a definite not-found (`refusal.compute.voidSupplierUnreadable`).
|
|
4108
|
+
*/
|
|
4109
|
+
post: operations["adminVoidUnbuiltComputeServer"];
|
|
4110
|
+
delete?: never;
|
|
4111
|
+
options?: never;
|
|
4112
|
+
head?: never;
|
|
4113
|
+
patch?: never;
|
|
4114
|
+
trace?: never;
|
|
4115
|
+
};
|
|
4089
4116
|
"/v1/admin/conversions": {
|
|
4090
4117
|
parameters: {
|
|
4091
4118
|
query?: never;
|
|
@@ -83914,10 +83941,10 @@ export interface components {
|
|
|
83914
83941
|
/** @description Why the order failed, as an English sentence for staff, support and SDK readers. Blank unless `failed`. A client renders `message_code` instead when it is set. */
|
|
83915
83942
|
message: string;
|
|
83916
83943
|
/**
|
|
83917
|
-
* @description NIGHTFIX1114 FAILEDSRV: the half of `message` a client renders, as a stable code it translates (the platform ships in 58 languages; `message` is English). `build_failed_ticket` (we opened support ticket `message_params.ticket_id`), `build_failed_no_ticket` (the ticket could not be opened), `build_retry_held` (a retried rebuild failed again and we are on it). Null when `message` is blank or not one of these; the client then shows `message`.
|
|
83944
|
+
* @description NIGHTFIX1114 FAILEDSRV: the half of `message` a client renders, as a stable code it translates (the platform ships in 58 languages; `message` is English). `build_failed_ticket` (we opened support ticket `message_params.ticket_id`), `build_failed_no_ticket` (the ticket could not be opened), `build_retry_held` (a retried rebuild failed again and we are on it), `build_never_built_not_charged` (DAY-0364: the supplier never built the machine and the customer is not charged for it). Null when `message` is blank or not one of these; the client then shows `message`.
|
|
83918
83945
|
* @enum {string|null}
|
|
83919
83946
|
*/
|
|
83920
|
-
message_code?: "build_retry_held" | "build_failed_no_ticket" | "build_failed_ticket" | null;
|
|
83947
|
+
message_code?: "build_retry_held" | "build_failed_no_ticket" | "build_failed_ticket" | "build_never_built_not_charged" | null;
|
|
83921
83948
|
/** @description The values `message_code` interpolates; `ticket_id` for `build_failed_ticket`, otherwise empty. */
|
|
83922
83949
|
message_params?: {
|
|
83923
83950
|
[key: string]: string;
|
|
@@ -129489,6 +129516,108 @@ export interface operations {
|
|
|
129489
129516
|
503: components["responses"]["ServiceUnavailable"];
|
|
129490
129517
|
};
|
|
129491
129518
|
};
|
|
129519
|
+
adminPreviewVoidUnbuiltComputeServer: {
|
|
129520
|
+
parameters: {
|
|
129521
|
+
query?: never;
|
|
129522
|
+
header?: never;
|
|
129523
|
+
path: {
|
|
129524
|
+
/** @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. */
|
|
129525
|
+
serverId: components["parameters"]["ComputeServerId"];
|
|
129526
|
+
};
|
|
129527
|
+
cookie?: never;
|
|
129528
|
+
};
|
|
129529
|
+
requestBody?: never;
|
|
129530
|
+
responses: {
|
|
129531
|
+
/** @description The amount a void would return (or, with `already`, did return). */
|
|
129532
|
+
200: {
|
|
129533
|
+
headers: {
|
|
129534
|
+
"RateLimit-Remaining": components["headers"]["RateLimitRemaining"];
|
|
129535
|
+
[name: string]: unknown;
|
|
129536
|
+
};
|
|
129537
|
+
content: {
|
|
129538
|
+
"application/json": {
|
|
129539
|
+
data: {
|
|
129540
|
+
/** @description True when the server was already voided; the figures are what that void returned. */
|
|
129541
|
+
already: boolean;
|
|
129542
|
+
/** @description ISO 4217 code; empty only when nothing was ever rated for the server. */
|
|
129543
|
+
currency: string;
|
|
129544
|
+
/** @description Zinn® credit per purse (`trial`, `general`), integer minor units. */
|
|
129545
|
+
returnable_minor: {
|
|
129546
|
+
[key: string]: number;
|
|
129547
|
+
};
|
|
129548
|
+
/** Format: uuid */
|
|
129549
|
+
server_id: string;
|
|
129550
|
+
/** @description Sum of `returnable_minor`, integer minor units of `currency`. */
|
|
129551
|
+
total_minor: number;
|
|
129552
|
+
};
|
|
129553
|
+
};
|
|
129554
|
+
};
|
|
129555
|
+
};
|
|
129556
|
+
401: components["responses"]["Unauthorized"];
|
|
129557
|
+
403: components["responses"]["Forbidden"];
|
|
129558
|
+
404: components["responses"]["NotFound"];
|
|
129559
|
+
429: components["responses"]["TooManyRequests"];
|
|
129560
|
+
};
|
|
129561
|
+
};
|
|
129562
|
+
adminVoidUnbuiltComputeServer: {
|
|
129563
|
+
parameters: {
|
|
129564
|
+
query?: never;
|
|
129565
|
+
header?: never;
|
|
129566
|
+
path: {
|
|
129567
|
+
/** @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. */
|
|
129568
|
+
serverId: components["parameters"]["ComputeServerId"];
|
|
129569
|
+
};
|
|
129570
|
+
cookie?: never;
|
|
129571
|
+
};
|
|
129572
|
+
requestBody: {
|
|
129573
|
+
content: {
|
|
129574
|
+
"application/json": {
|
|
129575
|
+
/**
|
|
129576
|
+
* @description Required to void a server in a fenced organisation.
|
|
129577
|
+
* @default false
|
|
129578
|
+
*/
|
|
129579
|
+
allow_fenced_org?: boolean;
|
|
129580
|
+
/** @description Why staff voided the server (stored in the audit row). */
|
|
129581
|
+
reason: string;
|
|
129582
|
+
};
|
|
129583
|
+
};
|
|
129584
|
+
};
|
|
129585
|
+
responses: {
|
|
129586
|
+
/** @description What the void did (or, with `already`, what the first void did). */
|
|
129587
|
+
200: {
|
|
129588
|
+
headers: {
|
|
129589
|
+
"RateLimit-Remaining": components["headers"]["RateLimitRemaining"];
|
|
129590
|
+
[name: string]: unknown;
|
|
129591
|
+
};
|
|
129592
|
+
content: {
|
|
129593
|
+
"application/json": {
|
|
129594
|
+
data: {
|
|
129595
|
+
/** @description True when an earlier void already did this; nothing was returned twice. */
|
|
129596
|
+
already: boolean;
|
|
129597
|
+
currency: string;
|
|
129598
|
+
hours_voided: number;
|
|
129599
|
+
metered_until: string;
|
|
129600
|
+
/** @description Unsettled usage voided, in micro-units of `currency`. */
|
|
129601
|
+
micros_voided: number;
|
|
129602
|
+
/** @description Zinn® credit returned per purse (`trial`, `general`), integer minor units. */
|
|
129603
|
+
returned_minor: {
|
|
129604
|
+
[key: string]: number;
|
|
129605
|
+
};
|
|
129606
|
+
/** Format: uuid */
|
|
129607
|
+
server_id: string;
|
|
129608
|
+
supplier_answer: string;
|
|
129609
|
+
};
|
|
129610
|
+
};
|
|
129611
|
+
};
|
|
129612
|
+
};
|
|
129613
|
+
401: components["responses"]["Unauthorized"];
|
|
129614
|
+
403: components["responses"]["Forbidden"];
|
|
129615
|
+
404: components["responses"]["NotFound"];
|
|
129616
|
+
422: components["responses"]["UnprocessableEntity"];
|
|
129617
|
+
429: components["responses"]["TooManyRequests"];
|
|
129618
|
+
503: components["responses"]["ServiceUnavailable"];
|
|
129619
|
+
};
|
|
129620
|
+
};
|
|
129492
129621
|
getAdminConversions: {
|
|
129493
129622
|
parameters: {
|
|
129494
129623
|
query?: {
|
|
@@ -193742,6 +193871,11 @@ export interface operations {
|
|
|
193742
193871
|
requestBody?: {
|
|
193743
193872
|
content: {
|
|
193744
193873
|
"application/json": {
|
|
193874
|
+
/**
|
|
193875
|
+
* @description The customer was told account credit covers this order and pressed Pay without choosing a card (CARDPAGE, DAY-0529). When `true` no card or other gateway is ever charged for this press: if credit no longer covers the whole order the answer is `422` with `details[0].code = CREDIT_NO_LONGER_COVERS`, nothing drawn and nothing charged, so the caller re-reads the order and lets the customer choose how to pay the rest. A balance that falls after that check declines the remainder (`payment_failed`, credit returned) instead of reaching the primary saved card. Omit, or send `false`, for the ordinary press. Anything that is not a JSON boolean is `422`.
|
|
193876
|
+
* @example true
|
|
193877
|
+
*/
|
|
193878
|
+
credit_only?: boolean;
|
|
193745
193879
|
/**
|
|
193746
193880
|
* @description Crypto is priced and invoiced in USD only (owner 2026-11-18, docs/311). When `gateway` is `nowpayments` and the unpaid order is in another currency, the exact USD total (minor units) the customer confirmed from `getOrderPaymentOptions.crypto_usd.total_minor`. The order is converted to USD in place only when this equals the engine's current quote; otherwise `422` with `details[0].code = USD_CONFIRMATION_REQUIRED` and `details[0].message` = the current exact USD total, nothing charged and nothing converted. Ignored for any other rail or a USD order.
|
|
193747
193881
|
* @example 6000
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zinn-digital/sdk",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1956",
|
|
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>",
|