@zinn-digital/sdk 0.1.1950 → 0.1.1955
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 +153 -5
- 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;
|
|
@@ -27125,7 +27152,7 @@ export interface paths {
|
|
|
27125
27152
|
get: operations["getBillingProfile"];
|
|
27126
27153
|
/**
|
|
27127
27154
|
* Replace the organization's billing profile.
|
|
27128
|
-
* @description A full replace (PUT) of the editable "Bill to" fields; an omitted field resets to blank. `billing_address` (with its required `country`, needed for tax) is the one mandatory member. Editing changes only invoices issued **afterwards** — a past invoice snapshotted the buyer block at issue time and is never rewritten (docs/34 §1.1). `vat_status` is engine-owned (the validate-not-trust flow, §2.3) and is not accepted here
|
|
27155
|
+
* @description A full replace (PUT) of the editable "Bill to" fields; an omitted field resets to blank. `billing_address` (with its required `country`, needed for tax) is the one mandatory member. Editing changes only invoices issued **afterwards** — a past invoice snapshotted the buyer block at issue time and is never rewritten (docs/34 §1.1). `vat_status` is engine-owned (the validate-not-trust flow, §2.3) and is not accepted here. A changed `vat_number` (or a changed billing country with a number on file) is checked against the VAT registry **in this request**, bounded to three seconds, and the response carries the result: `valid` (VAT is removed on the next invoice where the reverse charge applies), `invalid`, or `pending` when the registry did not answer (VAT is charged and the number is re-checked daily). A number the registry cannot be asked about (for example a UK number) stays `unvalidated`. The save is never refused because a lookup failed. A `vat_number` whose country prefix names a different country from `billing_address.country` is refused with `422` (`XI` is accepted for `GB`, `EL` for `GR`). Requires `billing.invoice.manage` in the target organization.
|
|
27129
27156
|
*/
|
|
27130
27157
|
put: operations["updateBillingProfile"];
|
|
27131
27158
|
post?: never;
|
|
@@ -47290,10 +47317,12 @@ export interface paths {
|
|
|
47290
47317
|
put?: never;
|
|
47291
47318
|
/**
|
|
47292
47319
|
* What these net prices look like to a signed-out visitor, after VAT.
|
|
47293
|
-
* @description The anonymous half of `quoteTaxDisplay` (#1482). Same answer, one difference that matters: there is no organisation, so
|
|
47320
|
+
* @description The anonymous half of `quoteTaxDisplay` (#1482). Same answer, one difference that matters: there is no organisation, so a visitor is treated as a consumer **unless the server itself confirms the VAT number they typed**.
|
|
47294
47321
|
*
|
|
47295
47322
|
* ⛔ **This route accepts no buyer-validation flag, deliberately.** Reverse charge turns on a VIES-validated number and the seller carries the liability for granting it wrongly (`docs/34` §2.3), so a client-supplied validation claim would be a request to zero-rate a sale on the buyer's own say-so. Treating everyone as a consumer is also the safe direction: it over-states rather than under-states the tax due.
|
|
47296
47323
|
*
|
|
47324
|
+
* A visitor may send the `vat_number` they typed at checkout. The server asks the registry itself and prices on that answer, returned as `vat_check` with a signed `pin`. `POST /v1/public/checkout` takes the pin back as `billing.vat_pin` and prices the order on the same answer, so the quote and the order always agree. When the registry cannot be reached the quote is priced **with** VAT and says so (`vat_check.status: unavailable`); it never refuses the quote.
|
|
47325
|
+
*
|
|
47297
47326
|
* Country comes from the request body or Cloudflare's `CF-IPCountry`. The answer is always `estimated: true` — a pricing page runs on a geo hint, and the charge is rated again at checkout against real place-of-supply evidence.
|
|
47298
47327
|
*/
|
|
47299
47328
|
post: operations["quotePublicTaxDisplay"];
|
|
@@ -79233,7 +79262,7 @@ export interface components {
|
|
|
79233
79262
|
/** @example GB123456789 */
|
|
79234
79263
|
vat_number: string;
|
|
79235
79264
|
/**
|
|
79236
|
-
* @description State of the validate-not-trust check on `vat_number` (docs/34 §2.3). Read-only
|
|
79265
|
+
* @description State of the validate-not-trust check on `vat_number` (docs/34 §2.3). Read-only. A change to `vat_number` is checked at once: `valid` or `invalid` when the registry answered, `pending` when it did not (re-checked daily), `unvalidated` when the number cannot be checked. Only `valid` removes VAT.
|
|
79237
79266
|
* @example unvalidated
|
|
79238
79267
|
* @enum {string}
|
|
79239
79268
|
*/
|
|
@@ -83912,10 +83941,10 @@ export interface components {
|
|
|
83912
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. */
|
|
83913
83942
|
message: string;
|
|
83914
83943
|
/**
|
|
83915
|
-
* @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`.
|
|
83916
83945
|
* @enum {string|null}
|
|
83917
83946
|
*/
|
|
83918
|
-
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;
|
|
83919
83948
|
/** @description The values `message_code` interpolates; `ticket_id` for `build_failed_ticket`, otherwise empty. */
|
|
83920
83949
|
message_params?: {
|
|
83921
83950
|
[key: string]: string;
|
|
@@ -103389,7 +103418,10 @@ export interface components {
|
|
|
103389
103418
|
legal_name?: string;
|
|
103390
103419
|
postcode?: string;
|
|
103391
103420
|
region?: string;
|
|
103421
|
+
/** @description Optional. Stored on the new account's billing details. The order is priced on the answer `vat_pin` records, never on a fresh lookup, so it cannot differ from the quote the visitor saw. With no valid pin the number is saved, VAT is charged on this order, and the number is checked again within minutes for later invoices. A number whose country prefix names a country other than `country` is refused `422` (`vat_number_country_mismatch`). A UK number cannot be checked yet and VAT is charged. */
|
|
103392
103422
|
vat_number?: string;
|
|
103423
|
+
/** @description Optional. The `vat_check.pin` from `POST /v1/public/pricing/tax-quote` for this same `country` and `vat_number`. A pin that is missing, expired, tampered with or issued for another country or number is ignored (the order is priced with VAT); it never refuses the checkout. */
|
|
103424
|
+
vat_pin?: string;
|
|
103393
103425
|
};
|
|
103394
103426
|
PublicCart: {
|
|
103395
103427
|
currency: components["schemas"]["CurrencyCode"];
|
|
@@ -117850,6 +117882,16 @@ export interface components {
|
|
|
117850
117882
|
/** @description The single rate behind `notice`, or `0` where the basket carries more than one. A mixed basket (hosting at the buyer's rate, a website build at UK 20%) genuinely has no single rate, and naming one of them would be a false statement. */
|
|
117851
117883
|
rate_bps: number;
|
|
117852
117884
|
tax_total_minor: number;
|
|
117885
|
+
/** @description Present only when the public request carried a `vat_number`. What the server's own registry check said, and the figures above are priced on it. */
|
|
117886
|
+
vat_check?: {
|
|
117887
|
+
/** @description An opaque, signed, short-lived record of this answer. Send it back as `billing.vat_pin` on `POST /v1/public/checkout` with the same country and number, and the order is priced on exactly this answer, so the total shown and the total placed cannot differ. Without it the order is priced with VAT. */
|
|
117888
|
+
pin: string;
|
|
117889
|
+
/**
|
|
117890
|
+
* @description `confirmed`: the registry confirmed the number and the quote is priced as a business sale (reverse charge where the rules give one). `not_confirmed`: the registry says the number is not valid; VAT is shown. `unavailable`: the registry did not answer in time, or the lookup allowance is used up; VAT is shown and charged on this order, and the number is checked again within minutes so later invoices follow the confirmed answer. `not_checkable`: no registry can be asked about this country yet (a UK number); VAT is shown.
|
|
117891
|
+
* @enum {string}
|
|
117892
|
+
*/
|
|
117893
|
+
status: "confirmed" | "not_confirmed" | "unavailable" | "not_checkable";
|
|
117894
|
+
};
|
|
117853
117895
|
};
|
|
117854
117896
|
/** @description Net amounts the caller already holds, to be rated for display (#1482). ⛔ Nothing here re-prices: the amounts come from the catalogue and come back rated, so this cannot become a second source of prices. Send exactly one of `items` (display-only previews: bounded, never charged) or `cart_id` (signed-in route only: the server re-prices the caller's own cart exactly as `GET /v1/carts/{cartId}` does and builds the lines itself, so a checkout figure never rests on client amounts). Both together, or neither, is a 422. */
|
|
117855
117897
|
TaxQuoteRequest: {
|
|
@@ -117858,6 +117900,8 @@ export interface components {
|
|
|
117858
117900
|
* @description Signed-in route only (the public route refuses it with a 422). The caller's own open cart; the quote rates its server-repriced lines (`ref` = line id, net = the line's `line_total_minor`) in the cart's currency. Another organisation's cart is a 404. Mutually exclusive with `items`.
|
|
117859
117901
|
*/
|
|
117860
117902
|
cart_id?: string;
|
|
117903
|
+
/** @description Public route only, optional. The visitor's guest cart token; used only to bound how many VAT registry lookups one cart may cause. */
|
|
117904
|
+
cart_token?: string;
|
|
117861
117905
|
/** @description ISO 3166-1 alpha-2 destination. On the signed-in route this overrides the stored billing country (the customer may be pricing an address they have not saved). Omitted, the public route falls back to Cloudflare's `CF-IPCountry`; the signed-in route falls back to the stored billing country and then to `CF-IPCountry`, answering `estimated: true` for any figure not rated on the stored country (a signed-in customer with no saved address is shown the VAT their basket will carry rather than the net figure alone). */
|
|
117862
117906
|
country?: string;
|
|
117863
117907
|
/** @description ISO 4217. Defaults to the `docs/29` §3.1 resolution for the request. */
|
|
@@ -117881,6 +117925,8 @@ export interface components {
|
|
|
117881
117925
|
}[];
|
|
117882
117926
|
/** @description Absent means false. Which question is asked. `false` prices a BASKET exactly as its invoice will be rounded (VAT once per rate group, leftover cents by largest remainder), so the totals are what checkout charges: use it for a cart or checkout. `true` prices a LIST of independent items, each rated as its own one-item invoice, so an item shows the same cents whatever else is in the request: use it for a price list or plan table. The totals of a `per_item` quote are a sum of standalone prices, not a basket. Only a literal `true` enables it. */
|
|
117883
117927
|
per_item?: boolean;
|
|
117928
|
+
/** @description Public route only (the signed-in route prices on the stored billing profile and ignores it). The VAT number the visitor typed at checkout. It needs `country` in the body. A number that is malformed, longer than 32 characters, sent without a country, or whose prefix names another country is never sent to the registry and answers `vat_check.status: not_confirmed` (the quote itself is not refused; the checkout refuses a mismatched prefix with a `422`). The **server** asks the VAT registry (3 second cut-off; answers are cached by a hash of country and number, a confirmation for 24 hours, anything else for 10 minutes; lookups are rate-limited per visitor and per cart) and prices on its own answer: the caller never states whether the number is valid. The answer comes back as `vat_check`. */
|
|
117929
|
+
vat_number?: string;
|
|
117884
117930
|
};
|
|
117885
117931
|
/** @description One dated VAT rate for one country and category (docs/34 §2.4). */
|
|
117886
117932
|
TaxRate: {
|
|
@@ -129470,6 +129516,108 @@ export interface operations {
|
|
|
129470
129516
|
503: components["responses"]["ServiceUnavailable"];
|
|
129471
129517
|
};
|
|
129472
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
|
+
};
|
|
129473
129621
|
getAdminConversions: {
|
|
129474
129622
|
parameters: {
|
|
129475
129623
|
query?: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zinn-digital/sdk",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1955",
|
|
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>",
|