@leaflow/sdk 0.104.0 → 0.106.0
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/billing/account/v1/index.d.ts +5 -5
- package/dist/billing/account/v1/schema.d.ts +22 -19
- package/dist/canopy/v1/index.d.ts +8 -0
- package/dist/canopy/v1/schema.d.ts +352 -1
- package/dist/compute/v1/schema.d.ts +12 -8
- package/dist/routes.d.ts +27 -3
- package/dist/routes.js +30 -3
- package/package.json +1 -1
|
@@ -28,15 +28,15 @@ export type ListPaymentOptionsResult = operations["list-payment-options"]["respo
|
|
|
28
28
|
/** The query parameters of `GET /account/v1/billing-accounts/{accountId}/payment-options`. */
|
|
29
29
|
export type ListPaymentOptionsQuery = operations["list-payment-options"]["parameters"]["query"];
|
|
30
30
|
/** The success response body of `GET /account/v1/projects`. */
|
|
31
|
-
export type
|
|
31
|
+
export type ListProjectAssignmentsResult = operations["list-project-assignments"]["responses"][200]["content"]["application/json"];
|
|
32
32
|
/** The query parameters of `GET /account/v1/projects`. */
|
|
33
|
-
export type
|
|
33
|
+
export type ListProjectAssignmentsQuery = operations["list-project-assignments"]["parameters"]["query"];
|
|
34
34
|
/** The success response body of `GET /account/v1/projects/{projectId}/billing-account`. */
|
|
35
|
-
export type
|
|
35
|
+
export type GetProjectAssignmentResult = operations["get-project-assignment"]["responses"][200]["content"]["application/json"];
|
|
36
36
|
/** The success response body of `PUT /account/v1/projects/{projectId}/billing-account`. */
|
|
37
|
-
export type
|
|
37
|
+
export type SetProjectAssignmentResult = operations["set-project-assignment"]["responses"][200]["content"]["application/json"];
|
|
38
38
|
/** The request body of `PUT /account/v1/projects/{projectId}/billing-account`. */
|
|
39
|
-
export type
|
|
39
|
+
export type SetProjectAssignmentBody = NonNullable<operations["set-project-assignment"]["requestBody"]>["content"]["application/json"];
|
|
40
40
|
/** The success response body of `GET /account/v1/top-ups`. */
|
|
41
41
|
export type ListTopUpsResult = operations["list-top-ups"]["responses"][200]["content"]["application/json"];
|
|
42
42
|
/** The query parameters of `GET /account/v1/top-ups`. */
|
|
@@ -149,8 +149,8 @@ export interface paths {
|
|
|
149
149
|
path?: never;
|
|
150
150
|
cookie?: never;
|
|
151
151
|
};
|
|
152
|
-
/** List
|
|
153
|
-
get: operations["list-
|
|
152
|
+
/** List project assignments */
|
|
153
|
+
get: operations["list-project-assignments"];
|
|
154
154
|
put?: never;
|
|
155
155
|
post?: never;
|
|
156
156
|
delete?: never;
|
|
@@ -169,12 +169,12 @@ export interface paths {
|
|
|
169
169
|
cookie?: never;
|
|
170
170
|
};
|
|
171
171
|
/**
|
|
172
|
-
* Get project
|
|
172
|
+
* Get project assignment
|
|
173
173
|
* @description Returns 404 when the project has no billing account. No resources can be created until one is linked.
|
|
174
174
|
*/
|
|
175
|
-
get: operations["get-project-
|
|
175
|
+
get: operations["get-project-assignment"];
|
|
176
176
|
/**
|
|
177
|
-
* Set project
|
|
177
|
+
* Set project assignment
|
|
178
178
|
* @description Charges already incurred remain with the billing account that was linked when they
|
|
179
179
|
* occurred, and are still invoiced to it. Metered resources are settled up to the moment of
|
|
180
180
|
* the change. Amounts owed by the previous billing account remain owed by it and do not
|
|
@@ -187,7 +187,7 @@ export interface paths {
|
|
|
187
187
|
* deleted, and while a subscription or an order in progress in the project uses a currency
|
|
188
188
|
* other than that of the new billing account.
|
|
189
189
|
*/
|
|
190
|
-
put: operations["set-project-
|
|
190
|
+
put: operations["set-project-assignment"];
|
|
191
191
|
post?: never;
|
|
192
192
|
/**
|
|
193
193
|
* Unlink project billing account
|
|
@@ -1200,9 +1200,11 @@ export interface components {
|
|
|
1200
1200
|
promotion_code?: string;
|
|
1201
1201
|
/**
|
|
1202
1202
|
* @description Quote.total in the order's currency, after discounts and tax but before applying credit
|
|
1203
|
-
* grants or balance.
|
|
1203
|
+
* grants or balance. Omit to skip the amount comparison; an explicit zero is compared.
|
|
1204
|
+
* A different total fails with BILLING_AMOUNT_CHANGED. Must be a non-negative decimal
|
|
1205
|
+
* string; empty strings, null, JSON numbers, signs and exponent notation are rejected.
|
|
1204
1206
|
*/
|
|
1205
|
-
expected_amount
|
|
1207
|
+
expected_amount?: components["schemas"]["Money"];
|
|
1206
1208
|
};
|
|
1207
1209
|
/**
|
|
1208
1210
|
* @description Price renewing a prepaid subscription. Give `price_id`, or `interval` with
|
|
@@ -1741,7 +1743,8 @@ export interface components {
|
|
|
1741
1743
|
first_purchase_only?: boolean;
|
|
1742
1744
|
amount: components["schemas"]["Money"];
|
|
1743
1745
|
};
|
|
1744
|
-
|
|
1746
|
+
/** @description A project's assignment to a billing account for the interval from effective_from to effective_to. An open-ended assignment has no end time. */
|
|
1747
|
+
ProjectAssignment: {
|
|
1745
1748
|
/** Format: uuid */
|
|
1746
1749
|
project_id: string;
|
|
1747
1750
|
/**
|
|
@@ -1758,11 +1761,11 @@ export interface components {
|
|
|
1758
1761
|
/** Format: date-time */
|
|
1759
1762
|
effective_to?: string | null;
|
|
1760
1763
|
};
|
|
1761
|
-
|
|
1762
|
-
items: components["schemas"]["
|
|
1764
|
+
ProjectAssignmentList: {
|
|
1765
|
+
items: components["schemas"]["ProjectAssignment"][];
|
|
1763
1766
|
pagination: components["schemas"]["OffsetPagination"];
|
|
1764
1767
|
};
|
|
1765
|
-
|
|
1768
|
+
SetProjectAssignmentRequest: {
|
|
1766
1769
|
/** Format: int64 */
|
|
1767
1770
|
billing_account_id: number;
|
|
1768
1771
|
};
|
|
@@ -3374,7 +3377,7 @@ export interface operations {
|
|
|
3374
3377
|
default: components["responses"]["Error"];
|
|
3375
3378
|
};
|
|
3376
3379
|
};
|
|
3377
|
-
"list-
|
|
3380
|
+
"list-project-assignments": {
|
|
3378
3381
|
parameters: {
|
|
3379
3382
|
query?: {
|
|
3380
3383
|
/** @description 1-based page number; the first page when omitted. */
|
|
@@ -3395,13 +3398,13 @@ export interface operations {
|
|
|
3395
3398
|
[name: string]: unknown;
|
|
3396
3399
|
};
|
|
3397
3400
|
content: {
|
|
3398
|
-
"application/json": components["schemas"]["
|
|
3401
|
+
"application/json": components["schemas"]["ProjectAssignmentList"];
|
|
3399
3402
|
};
|
|
3400
3403
|
};
|
|
3401
3404
|
default: components["responses"]["Error"];
|
|
3402
3405
|
};
|
|
3403
3406
|
};
|
|
3404
|
-
"get-project-
|
|
3407
|
+
"get-project-assignment": {
|
|
3405
3408
|
parameters: {
|
|
3406
3409
|
query?: never;
|
|
3407
3410
|
header?: never;
|
|
@@ -3418,13 +3421,13 @@ export interface operations {
|
|
|
3418
3421
|
[name: string]: unknown;
|
|
3419
3422
|
};
|
|
3420
3423
|
content: {
|
|
3421
|
-
"application/json": components["schemas"]["
|
|
3424
|
+
"application/json": components["schemas"]["ProjectAssignment"];
|
|
3422
3425
|
};
|
|
3423
3426
|
};
|
|
3424
3427
|
default: components["responses"]["Error"];
|
|
3425
3428
|
};
|
|
3426
3429
|
};
|
|
3427
|
-
"set-project-
|
|
3430
|
+
"set-project-assignment": {
|
|
3428
3431
|
parameters: {
|
|
3429
3432
|
query?: never;
|
|
3430
3433
|
header?: never;
|
|
@@ -3435,7 +3438,7 @@ export interface operations {
|
|
|
3435
3438
|
};
|
|
3436
3439
|
requestBody: {
|
|
3437
3440
|
content: {
|
|
3438
|
-
"application/json": components["schemas"]["
|
|
3441
|
+
"application/json": components["schemas"]["SetProjectAssignmentRequest"];
|
|
3439
3442
|
};
|
|
3440
3443
|
};
|
|
3441
3444
|
responses: {
|
|
@@ -3445,7 +3448,7 @@ export interface operations {
|
|
|
3445
3448
|
[name: string]: unknown;
|
|
3446
3449
|
};
|
|
3447
3450
|
content: {
|
|
3448
|
-
"application/json": components["schemas"]["
|
|
3451
|
+
"application/json": components["schemas"]["ProjectAssignment"];
|
|
3449
3452
|
};
|
|
3450
3453
|
};
|
|
3451
3454
|
default: components["responses"]["Error"];
|
|
@@ -31,6 +31,14 @@ export type ListRequestsResult = operations["list-requests"]["responses"][200]["
|
|
|
31
31
|
export type ListRequestsQuery = operations["list-requests"]["parameters"]["query"];
|
|
32
32
|
/** The success response body of `GET /api/v1/requests/{requestId}`. */
|
|
33
33
|
export type GetRequestResult = operations["get-request"]["responses"][200]["content"]["application/json"];
|
|
34
|
+
/** The success response body of `GET /api/v1/service`. */
|
|
35
|
+
export type GetServiceResult = operations["get-service"]["responses"][200]["content"]["application/json"];
|
|
36
|
+
/** The success response body of `POST /api/v1/service`. */
|
|
37
|
+
export type CreateServiceResult = operations["create-service"]["responses"][202]["content"]["application/json"];
|
|
38
|
+
/** The request body of `POST /api/v1/service`. */
|
|
39
|
+
export type CreateServiceBody = NonNullable<operations["create-service"]["requestBody"]>["content"]["application/json"];
|
|
40
|
+
/** The success response body of `POST /api/v1/service/quote`. */
|
|
41
|
+
export type CreateServiceQuoteResult = operations["create-service-quote"]["responses"][200]["content"]["application/json"];
|
|
34
42
|
/** The success response body of `GET /api/v1/usage/by-api-key`. */
|
|
35
43
|
export type ListUsageByApiKeyResult = operations["list-usage-by-api-key"]["responses"][200]["content"]["application/json"];
|
|
36
44
|
/** The query parameters of `GET /api/v1/usage/by-api-key`. */
|
|
@@ -127,6 +127,8 @@ export interface paths {
|
|
|
127
127
|
* @description A model that has been retired does not appear here, while it remains readable individually.
|
|
128
128
|
*
|
|
129
129
|
* `context_length` and `max_output_tokens` are advisory. The server does not truncate on their basis, and the request body is forwarded upstream unchanged.
|
|
130
|
+
*
|
|
131
|
+
* `pricing` states what requests to each model cost in the currency of the project's current billing account.
|
|
130
132
|
*/
|
|
131
133
|
get: operations["list-models"];
|
|
132
134
|
put?: never;
|
|
@@ -198,6 +200,56 @@ export interface paths {
|
|
|
198
200
|
patch?: never;
|
|
199
201
|
trace?: never;
|
|
200
202
|
};
|
|
203
|
+
"/api/v1/service": {
|
|
204
|
+
parameters: {
|
|
205
|
+
query?: never;
|
|
206
|
+
header?: never;
|
|
207
|
+
path?: never;
|
|
208
|
+
cookie?: never;
|
|
209
|
+
};
|
|
210
|
+
/**
|
|
211
|
+
* Get the model platform service
|
|
212
|
+
* @description The model platform service of the authenticated project. The forwarding endpoints accept its requests only while `status` is `active`; each request is then billed under `subscription_id`, per token, at the rates stated in each model's `pricing`.
|
|
213
|
+
*
|
|
214
|
+
* When the project is deleted, its API keys are revoked and the subscription is canceled; the service then reads `inactive` with `ended_at` set.
|
|
215
|
+
*/
|
|
216
|
+
get: operations["get-service"];
|
|
217
|
+
put?: never;
|
|
218
|
+
/**
|
|
219
|
+
* Enable the model platform service
|
|
220
|
+
* @description Purchases the model platform service for this project. The service itself has no charge; requests are billed under it postpaid, by the tokens they use. It takes no billing choice. Returns the service as `pending` with its order; it becomes `active` once the order is accepted, which for an order with nothing to pay happens without further action.
|
|
221
|
+
*
|
|
222
|
+
* Refused with 409 `SERVICE_ALREADY_ENABLED` while an enablement is pending or the service is active. A refusal of the order by Billing is returned with Billing's code, such as `BILLING_PRICE_UNAVAILABLE` when the service has no price in the currency of the project's billing account.
|
|
223
|
+
*/
|
|
224
|
+
post: operations["create-service"];
|
|
225
|
+
delete?: never;
|
|
226
|
+
options?: never;
|
|
227
|
+
head?: never;
|
|
228
|
+
patch?: never;
|
|
229
|
+
trace?: never;
|
|
230
|
+
};
|
|
231
|
+
"/api/v1/service/quote": {
|
|
232
|
+
parameters: {
|
|
233
|
+
query?: never;
|
|
234
|
+
header?: never;
|
|
235
|
+
path?: never;
|
|
236
|
+
cookie?: never;
|
|
237
|
+
};
|
|
238
|
+
get?: never;
|
|
239
|
+
put?: never;
|
|
240
|
+
/**
|
|
241
|
+
* Quote enabling the model platform service
|
|
242
|
+
* @description Prices what `create-service` would order, without ordering or creating anything; nothing is reserved or recorded. Billing evaluates applicable account discounts and tax as for automatic checkout. `total` is what automatic checkout would collect before credit grants and balance; give it as `checkout.expected_amount` to be refused rather than charged a different amount.
|
|
243
|
+
*
|
|
244
|
+
* Token usage is priced per model, as each model's `pricing` states, and is neither part of `total` nor projected: `estimated_usage_amount` is null. A request the purchase would refuse is refused the same way.
|
|
245
|
+
*/
|
|
246
|
+
post: operations["create-service-quote"];
|
|
247
|
+
delete?: never;
|
|
248
|
+
options?: never;
|
|
249
|
+
head?: never;
|
|
250
|
+
patch?: never;
|
|
251
|
+
trace?: never;
|
|
252
|
+
};
|
|
201
253
|
"/api/v1/usage/by-api-key": {
|
|
202
254
|
parameters: {
|
|
203
255
|
query?: never;
|
|
@@ -426,6 +478,8 @@ export interface components {
|
|
|
426
478
|
* @description The maximum output length. Advisory only
|
|
427
479
|
*/
|
|
428
480
|
max_output_tokens: number;
|
|
481
|
+
/** @description What requests to this model cost. Null when the project has no billing account. */
|
|
482
|
+
pricing: components["schemas"]["ModelPricing"] | null;
|
|
429
483
|
/** @description The values accepted for `reasoning_effort`. Empty means it is not supported */
|
|
430
484
|
reasoning_tiers: string[];
|
|
431
485
|
/** @enum {string} */
|
|
@@ -434,6 +488,24 @@ export interface components {
|
|
|
434
488
|
supports_tools: boolean;
|
|
435
489
|
supports_vision: boolean;
|
|
436
490
|
};
|
|
491
|
+
/**
|
|
492
|
+
* @description What requests to a model cost, as Billing prices them in the currency of the project's current billing account. These are list amounts before promotion codes, not a checkout guarantee; usage is billed afterwards under the service's subscription.
|
|
493
|
+
*
|
|
494
|
+
* Each token kind is priced on its own. `input` excludes cached input, which is `cache_read`, and `output` excludes reasoning the provider reports separately, which is `reasoning`; a request is billed for each kind it used.
|
|
495
|
+
*/
|
|
496
|
+
ModelPricing: {
|
|
497
|
+
currency: string;
|
|
498
|
+
/** @description One entry for each of the five token kinds, in the order input, output, cache_read, cache_write, reasoning. */
|
|
499
|
+
token_kinds: components["schemas"]["TokenPrice"][];
|
|
500
|
+
};
|
|
501
|
+
TokenPrice: {
|
|
502
|
+
/** @enum {string} */
|
|
503
|
+
token_kind: "input" | "output" | "cache_read" | "cache_write" | "reasoning";
|
|
504
|
+
/** @description The charge for `unit_quantity` tokens of this kind. Null when the kind has no rate in the currency, in which case the model cannot be billed for it. */
|
|
505
|
+
unit_amount: components["schemas"]["Money"] | null;
|
|
506
|
+
/** @description How many tokens `unit_amount` is for, such as `1000000`. Null when `unit_amount` is null. */
|
|
507
|
+
unit_quantity: string | null;
|
|
508
|
+
};
|
|
437
509
|
ModelListResponseBody: {
|
|
438
510
|
items: components["schemas"]["ModelResource"][];
|
|
439
511
|
};
|
|
@@ -567,8 +639,194 @@ export interface components {
|
|
|
567
639
|
UsageTimelineResponseBody: {
|
|
568
640
|
items: components["schemas"]["UsageBucketResource"][];
|
|
569
641
|
};
|
|
642
|
+
/** @description The model platform service of a project. */
|
|
643
|
+
ServiceResource: {
|
|
644
|
+
/**
|
|
645
|
+
* @description `inactive` has never been enabled or its subscription has ended; `pending` awaits acceptance of its order; `active` accepts requests on the forwarding endpoints; `failed` means the enablement failed, as `failure_reason` states. An `inactive` or `failed` service can be enabled again.
|
|
646
|
+
* @enum {string}
|
|
647
|
+
*/
|
|
648
|
+
status: "inactive" | "pending" | "active" | "failed";
|
|
649
|
+
/**
|
|
650
|
+
* @description Why the enablement failed; null unless `status` is `failed`. `order_declined` means Billing did not accept the order, for example because the billing account is suspended; `order_canceled` means the order was withdrawn; `order_expired` means its checkout was not confirmed in time.
|
|
651
|
+
* @enum {string|null}
|
|
652
|
+
*/
|
|
653
|
+
failure_reason: "order_declined" | "order_canceled" | "order_expired" | null;
|
|
654
|
+
/**
|
|
655
|
+
* Format: uuid
|
|
656
|
+
* @description The order that enabled the service, or that the latest enablement placed; null before any enablement.
|
|
657
|
+
*/
|
|
658
|
+
order_id: string | null;
|
|
659
|
+
/**
|
|
660
|
+
* Format: uuid
|
|
661
|
+
* @description The Billing subscription that requests are billed under; null before any enablement.
|
|
662
|
+
*/
|
|
663
|
+
subscription_id: string | null;
|
|
664
|
+
/**
|
|
665
|
+
* Format: date-time
|
|
666
|
+
* @description When the service became active and billing began; null until then.
|
|
667
|
+
*/
|
|
668
|
+
activated_at: string | null;
|
|
669
|
+
/**
|
|
670
|
+
* Format: date-time
|
|
671
|
+
* @description When the subscription ended; null unless it has.
|
|
672
|
+
*/
|
|
673
|
+
ended_at: string | null;
|
|
674
|
+
};
|
|
675
|
+
CreateServiceRequestBody: {
|
|
676
|
+
checkout?: components["schemas"]["CheckoutOptions"];
|
|
677
|
+
};
|
|
678
|
+
/** @description The service, `pending` until its order is accepted, and the order. */
|
|
679
|
+
CreateServiceResponseBody: {
|
|
680
|
+
service: components["schemas"]["ServiceResource"];
|
|
681
|
+
order: components["schemas"]["PlacedOrder"];
|
|
682
|
+
};
|
|
683
|
+
/**
|
|
684
|
+
* @description Shared checkout choices for a product purchase. Omitting this object or mode selects
|
|
685
|
+
* automatic checkout. Each purchase creates its own order. Promotion codes are supplied only to
|
|
686
|
+
* Billing quote and checkout operations. A service may retain a failed creation record when Billing
|
|
687
|
+
* refuses a purchase; no infrastructure is created for that refusal.
|
|
688
|
+
*/
|
|
689
|
+
CheckoutOptions: {
|
|
690
|
+
/** @default automatic */
|
|
691
|
+
mode?: components["schemas"]["CheckoutMode"];
|
|
692
|
+
/**
|
|
693
|
+
* @description Expected invoice total after discounts and tax, before applying credit grants or balance.
|
|
694
|
+
* A different total fails with BILLING_AMOUNT_CHANGED without charging or reserving a discount.
|
|
695
|
+
* Accepted only in automatic mode; with deferred it is refused with HTTP 400. For deferred
|
|
696
|
+
* checkout, confirm the amount through Billing.
|
|
697
|
+
*/
|
|
698
|
+
expected_amount?: components["schemas"]["Money"];
|
|
699
|
+
};
|
|
700
|
+
/** @description Identifies the purchase. Read the order for purchase progress and its invoice for amounts and payment status. */
|
|
701
|
+
PlacedOrder: {
|
|
702
|
+
/**
|
|
703
|
+
* Format: uuid
|
|
704
|
+
* @description The invoice for this purchase, which may still be a draft awaiting checkout. Null when no invoice has been created. Its presence or absence does not establish whether delivery may begin.
|
|
705
|
+
*/
|
|
706
|
+
invoice_id: string | null;
|
|
707
|
+
/**
|
|
708
|
+
* Format: uuid
|
|
709
|
+
* @description The order, including for purchases without an immediate charge. Payment alone does not imply that the service has completed delivery.
|
|
710
|
+
*/
|
|
711
|
+
order_id: string;
|
|
712
|
+
};
|
|
713
|
+
/**
|
|
714
|
+
* @description A price preview for the purchase described by a service, calculated by Billing. Nothing is saved,
|
|
715
|
+
* charged or reserved, and no discount redemption is consumed. Account discounts and tax are
|
|
716
|
+
* evaluated as for automatic checkout. Promotion codes are evaluated through Billing quote operations.
|
|
717
|
+
* All amounts use currency. This preview does not lock prices or guarantee discount availability.
|
|
718
|
+
*/
|
|
719
|
+
Quote: {
|
|
720
|
+
/** @description One line for each item the purchase would order, in the order it would order them. */
|
|
721
|
+
lines: components["schemas"]["QuotedLine"][];
|
|
722
|
+
/**
|
|
723
|
+
* @description Sum of line amounts before discounts, less tax already included in the discounted line
|
|
724
|
+
* amounts, as on an invoice. Null when any line cannot be priced.
|
|
725
|
+
*/
|
|
726
|
+
subtotal: components["schemas"]["Money"] | null;
|
|
727
|
+
/** @description Sum of line discounts. Null when any line cannot be priced. */
|
|
728
|
+
discount_amount: components["schemas"]["Money"] | null;
|
|
729
|
+
/** @description Sum of tax on the discounted line amounts. Null when any line cannot be priced. */
|
|
730
|
+
tax_amount: components["schemas"]["Money"] | null;
|
|
731
|
+
/**
|
|
732
|
+
* @description subtotal minus discount_amount plus tax_amount: what checkout collects, before applying
|
|
733
|
+
* credit grants or balance. Equals the sum of line totals and excludes estimated_usage_amount.
|
|
734
|
+
* Null when any line cannot be priced.
|
|
735
|
+
*/
|
|
736
|
+
total: components["schemas"]["Money"] | null;
|
|
737
|
+
/**
|
|
738
|
+
* @description Sum of the lines' estimated_usage_amount. A projection, not part of total and not collected at
|
|
739
|
+
* checkout. Null when no line is billed for usage or when any usage cannot be priced.
|
|
740
|
+
*/
|
|
741
|
+
estimated_usage_amount: components["schemas"]["Money"] | null;
|
|
742
|
+
currency: string;
|
|
743
|
+
/**
|
|
744
|
+
* Format: date-time
|
|
745
|
+
* @description Changes only; null otherwise. The instant the change is priced from. Pass it with the change so the
|
|
746
|
+
* order is priced from the same instant.
|
|
747
|
+
*/
|
|
748
|
+
proration_date: string | null;
|
|
749
|
+
/**
|
|
750
|
+
* @description Changes that lower the price only; null otherwise. What the change would return to the original
|
|
751
|
+
* payment sources, including the tax paid on it. total is zero for such a change.
|
|
752
|
+
*/
|
|
753
|
+
refundable_amount: components["schemas"]["Money"] | null;
|
|
754
|
+
};
|
|
755
|
+
/**
|
|
756
|
+
* @description A decimal string, in the currency stated alongside it.
|
|
757
|
+
*
|
|
758
|
+
* **The currency is not part of this type.** It is carried by a `currency` field next to the
|
|
759
|
+
* amount, or by the account the amount belongs to. Reading an amount without that field is
|
|
760
|
+
* reading a number with no unit.
|
|
761
|
+
*
|
|
762
|
+
* It is a string rather than a JSON number because a JSON number is a float in most parsers,
|
|
763
|
+
* and a float loses precision on the first arithmetic. Nothing on this platform puts an amount
|
|
764
|
+
* through a float.
|
|
765
|
+
* @example 10.2500000000
|
|
766
|
+
*/
|
|
767
|
+
Money: string;
|
|
768
|
+
/**
|
|
769
|
+
* @description automatic confirms checkout with applicable account discounts and collects payment from eligible
|
|
770
|
+
* credit grants and available balance. Insufficient funds fail the purchase with HTTP 422
|
|
771
|
+
* BILLING_INSUFFICIENT_FUNDS; no Billing order, charge or discount redemption is committed.
|
|
772
|
+
* deferred creates a pending_checkout order for subsequent confirmation and payment through Billing.
|
|
773
|
+
* No new discount redemption or payment is made when the order is created. An order whose total is
|
|
774
|
+
* zero, with nothing to pay or discount, completes checkout at placement in either mode.
|
|
775
|
+
* @enum {string}
|
|
776
|
+
*/
|
|
777
|
+
CheckoutMode: "automatic" | "deferred";
|
|
778
|
+
/**
|
|
779
|
+
* @description One calculated purchase line. Fixed purchase amounts are rounded as checkout rounds them.
|
|
780
|
+
* When priced is false, every monetary field is null. A priced line without an
|
|
781
|
+
* immediate charge has zero amounts; an unavailable unit price remains null.
|
|
782
|
+
*/
|
|
783
|
+
QuotedLine: {
|
|
784
|
+
/** @description Whether the line can be priced. When false, unpriced_reason states what is missing. */
|
|
785
|
+
priced: boolean;
|
|
786
|
+
/**
|
|
787
|
+
* @description Why no price was found; `none` while `priced` is true.
|
|
788
|
+
* @enum {string}
|
|
789
|
+
*/
|
|
790
|
+
unpriced_reason: "none" | "no_price";
|
|
791
|
+
plan_name: string;
|
|
792
|
+
/** @description Unit price before discounts, with tax included only where the price includes it. */
|
|
793
|
+
unit_amount: components["schemas"]["Money"] | null;
|
|
794
|
+
/** @description The quantity priced. */
|
|
795
|
+
quantity: string;
|
|
796
|
+
/**
|
|
797
|
+
* @description Before discounts, including any setup charges. Contains tax only where the price includes it.
|
|
798
|
+
* Zero for a priced order item with no immediate charge.
|
|
799
|
+
*/
|
|
800
|
+
amount: components["schemas"]["Money"] | null;
|
|
801
|
+
/** @description Total reduction on this line, including any committed recurring discount. */
|
|
802
|
+
discount_amount: components["schemas"]["Money"] | null;
|
|
803
|
+
/** @description Tax on the discounted amount, including any tax already contained in that amount. */
|
|
804
|
+
tax_amount: components["schemas"]["Money"] | null;
|
|
805
|
+
/** @description The part of tax_amount already contained in amount minus discount_amount. */
|
|
806
|
+
tax_included_amount: components["schemas"]["Money"] | null;
|
|
807
|
+
/** @description amount minus discount_amount plus tax_amount minus tax_included_amount. */
|
|
808
|
+
total: components["schemas"]["Money"] | null;
|
|
809
|
+
/**
|
|
810
|
+
* @description Projected charge for this line's future usage over the period stated by the quoting operation,
|
|
811
|
+
* at current rates, before discounts and tax and not rounded. Not part of amount or total and
|
|
812
|
+
* not collected at checkout. Null when the line is not billed for usage or its usage cannot be
|
|
813
|
+
* priced.
|
|
814
|
+
*/
|
|
815
|
+
estimated_usage_amount: components["schemas"]["Money"] | null;
|
|
816
|
+
currency: string;
|
|
817
|
+
};
|
|
818
|
+
};
|
|
819
|
+
responses: {
|
|
820
|
+
/** @description The request conflicts with the current state of the service. The codes are described where they apply. */
|
|
821
|
+
Conflict: {
|
|
822
|
+
headers: {
|
|
823
|
+
[name: string]: unknown;
|
|
824
|
+
};
|
|
825
|
+
content: {
|
|
826
|
+
"application/json": components["schemas"]["Error"];
|
|
827
|
+
};
|
|
828
|
+
};
|
|
570
829
|
};
|
|
571
|
-
responses: never;
|
|
572
830
|
parameters: never;
|
|
573
831
|
requestBodies: never;
|
|
574
832
|
headers: never;
|
|
@@ -939,6 +1197,99 @@ export interface operations {
|
|
|
939
1197
|
};
|
|
940
1198
|
};
|
|
941
1199
|
};
|
|
1200
|
+
"get-service": {
|
|
1201
|
+
parameters: {
|
|
1202
|
+
query?: never;
|
|
1203
|
+
header?: never;
|
|
1204
|
+
path?: never;
|
|
1205
|
+
cookie?: never;
|
|
1206
|
+
};
|
|
1207
|
+
requestBody?: never;
|
|
1208
|
+
responses: {
|
|
1209
|
+
/** @description OK */
|
|
1210
|
+
200: {
|
|
1211
|
+
headers: {
|
|
1212
|
+
[name: string]: unknown;
|
|
1213
|
+
};
|
|
1214
|
+
content: {
|
|
1215
|
+
"application/json": components["schemas"]["ServiceResource"];
|
|
1216
|
+
};
|
|
1217
|
+
};
|
|
1218
|
+
/** @description Error */
|
|
1219
|
+
default: {
|
|
1220
|
+
headers: {
|
|
1221
|
+
[name: string]: unknown;
|
|
1222
|
+
};
|
|
1223
|
+
content: {
|
|
1224
|
+
"application/json": components["schemas"]["Error"];
|
|
1225
|
+
};
|
|
1226
|
+
};
|
|
1227
|
+
};
|
|
1228
|
+
};
|
|
1229
|
+
"create-service": {
|
|
1230
|
+
parameters: {
|
|
1231
|
+
query?: never;
|
|
1232
|
+
header?: never;
|
|
1233
|
+
path?: never;
|
|
1234
|
+
cookie?: never;
|
|
1235
|
+
};
|
|
1236
|
+
requestBody: {
|
|
1237
|
+
content: {
|
|
1238
|
+
"application/json": components["schemas"]["CreateServiceRequestBody"];
|
|
1239
|
+
};
|
|
1240
|
+
};
|
|
1241
|
+
responses: {
|
|
1242
|
+
/** @description The service and its order were created; the service is not active yet. */
|
|
1243
|
+
202: {
|
|
1244
|
+
headers: {
|
|
1245
|
+
[name: string]: unknown;
|
|
1246
|
+
};
|
|
1247
|
+
content: {
|
|
1248
|
+
"application/json": components["schemas"]["CreateServiceResponseBody"];
|
|
1249
|
+
};
|
|
1250
|
+
};
|
|
1251
|
+
409: components["responses"]["Conflict"];
|
|
1252
|
+
/** @description Error */
|
|
1253
|
+
default: {
|
|
1254
|
+
headers: {
|
|
1255
|
+
[name: string]: unknown;
|
|
1256
|
+
};
|
|
1257
|
+
content: {
|
|
1258
|
+
"application/json": components["schemas"]["Error"];
|
|
1259
|
+
};
|
|
1260
|
+
};
|
|
1261
|
+
};
|
|
1262
|
+
};
|
|
1263
|
+
"create-service-quote": {
|
|
1264
|
+
parameters: {
|
|
1265
|
+
query?: never;
|
|
1266
|
+
header?: never;
|
|
1267
|
+
path?: never;
|
|
1268
|
+
cookie?: never;
|
|
1269
|
+
};
|
|
1270
|
+
requestBody?: never;
|
|
1271
|
+
responses: {
|
|
1272
|
+
/** @description OK */
|
|
1273
|
+
200: {
|
|
1274
|
+
headers: {
|
|
1275
|
+
[name: string]: unknown;
|
|
1276
|
+
};
|
|
1277
|
+
content: {
|
|
1278
|
+
"application/json": components["schemas"]["Quote"];
|
|
1279
|
+
};
|
|
1280
|
+
};
|
|
1281
|
+
409: components["responses"]["Conflict"];
|
|
1282
|
+
/** @description Error */
|
|
1283
|
+
default: {
|
|
1284
|
+
headers: {
|
|
1285
|
+
[name: string]: unknown;
|
|
1286
|
+
};
|
|
1287
|
+
content: {
|
|
1288
|
+
"application/json": components["schemas"]["Error"];
|
|
1289
|
+
};
|
|
1290
|
+
};
|
|
1291
|
+
};
|
|
1292
|
+
};
|
|
942
1293
|
"list-usage-by-api-key": {
|
|
943
1294
|
parameters: {
|
|
944
1295
|
query: {
|
|
@@ -108,7 +108,7 @@ export interface paths {
|
|
|
108
108
|
};
|
|
109
109
|
/**
|
|
110
110
|
* List disk types on sale
|
|
111
|
-
* @description Only disk types currently on sale are listed, both system disk types and data disk types; `
|
|
111
|
+
* @description Only disk types currently on sale are listed, both system disk types and data disk types; `purpose` narrows the list to one of the two. A withdrawn one disappears from here and can no longer be bought, while the disks already on it keep working and can still be resized.
|
|
112
112
|
*/
|
|
113
113
|
get: operations["list-disk-types"];
|
|
114
114
|
put?: never;
|
|
@@ -1905,13 +1905,17 @@ export interface components {
|
|
|
1905
1905
|
/** Format: date-time */
|
|
1906
1906
|
observed_at: string | null;
|
|
1907
1907
|
};
|
|
1908
|
+
/**
|
|
1909
|
+
* @description The intended purchase use of a disk type, not the current boot role or deletion policy of an individual disk.
|
|
1910
|
+
* @enum {string}
|
|
1911
|
+
*/
|
|
1912
|
+
DiskTypePurpose: "system" | "data";
|
|
1908
1913
|
DiskTypeResource: {
|
|
1909
1914
|
/** Format: uuid */
|
|
1910
1915
|
availability_zone_id: string;
|
|
1911
1916
|
/** Format: uuid */
|
|
1912
1917
|
id: string;
|
|
1913
|
-
|
|
1914
|
-
for_system: boolean;
|
|
1918
|
+
purpose: components["schemas"]["DiskTypePurpose"];
|
|
1915
1919
|
/**
|
|
1916
1920
|
* Format: int64
|
|
1917
1921
|
* @description IOPS a disk of `min_size_gb` gets. Null when this type is not rate-limited.
|
|
@@ -2123,7 +2127,7 @@ export interface components {
|
|
|
2123
2127
|
CreateDiskRequestBody: {
|
|
2124
2128
|
/**
|
|
2125
2129
|
* Format: uuid
|
|
2126
|
-
* @description A data disk type currently on sale, one whose `
|
|
2130
|
+
* @description A data disk type currently on sale, one whose `purpose` is `data`. A withdrawn one is rejected even though its identifier still resolves
|
|
2127
2131
|
*/
|
|
2128
2132
|
disk_type_id: string;
|
|
2129
2133
|
name: string;
|
|
@@ -3107,7 +3111,7 @@ export interface components {
|
|
|
3107
3111
|
CreateDiskQuoteRequestBody: {
|
|
3108
3112
|
/**
|
|
3109
3113
|
* Format: uuid
|
|
3110
|
-
* @description A data disk type currently on sale, one whose `
|
|
3114
|
+
* @description A data disk type currently on sale, one whose `purpose` is `data`. A withdrawn one is rejected even though its identifier still resolves
|
|
3111
3115
|
*/
|
|
3112
3116
|
disk_type_id: string;
|
|
3113
3117
|
name: string;
|
|
@@ -3312,7 +3316,7 @@ export interface components {
|
|
|
3312
3316
|
NewBootDisk: {
|
|
3313
3317
|
/**
|
|
3314
3318
|
* Format: uuid
|
|
3315
|
-
* @description A system disk type on sale in the availability zone of the instance, one whose `
|
|
3319
|
+
* @description A system disk type on sale in the availability zone of the instance, one whose `purpose` is `system`
|
|
3316
3320
|
*/
|
|
3317
3321
|
disk_type_id: string;
|
|
3318
3322
|
/** Format: int64 */
|
|
@@ -3888,8 +3892,8 @@ export interface operations {
|
|
|
3888
3892
|
parameters: {
|
|
3889
3893
|
query?: {
|
|
3890
3894
|
region_id?: string;
|
|
3891
|
-
/** @description
|
|
3892
|
-
|
|
3895
|
+
/** @description Filter by intended purchase use. Omit to include both system and data disk types. */
|
|
3896
|
+
purpose?: components["schemas"]["DiskTypePurpose"];
|
|
3893
3897
|
page?: components["parameters"]["Page"];
|
|
3894
3898
|
page_size?: components["parameters"]["PageSize"];
|
|
3895
3899
|
};
|
package/dist/routes.d.ts
CHANGED
|
@@ -667,7 +667,7 @@ export declare const routes: readonly [{
|
|
|
667
667
|
readonly contract: "billing/account";
|
|
668
668
|
readonly method: "GET";
|
|
669
669
|
readonly path: "/account/v1/projects";
|
|
670
|
-
readonly operationId: "list-
|
|
670
|
+
readonly operationId: "list-project-assignments";
|
|
671
671
|
readonly securityScheme: "AccessToken";
|
|
672
672
|
readonly upstreamUrl: "https://billing.leaflow.cloud";
|
|
673
673
|
}, {
|
|
@@ -675,7 +675,7 @@ export declare const routes: readonly [{
|
|
|
675
675
|
readonly contract: "billing/account";
|
|
676
676
|
readonly method: "GET";
|
|
677
677
|
readonly path: "/account/v1/projects/{projectId}/billing-account";
|
|
678
|
-
readonly operationId: "get-project-
|
|
678
|
+
readonly operationId: "get-project-assignment";
|
|
679
679
|
readonly securityScheme: "AccessToken";
|
|
680
680
|
readonly upstreamUrl: "https://billing.leaflow.cloud";
|
|
681
681
|
}, {
|
|
@@ -1067,7 +1067,7 @@ export declare const routes: readonly [{
|
|
|
1067
1067
|
readonly contract: "billing/account";
|
|
1068
1068
|
readonly method: "PUT";
|
|
1069
1069
|
readonly path: "/account/v1/projects/{projectId}/billing-account";
|
|
1070
|
-
readonly operationId: "set-project-
|
|
1070
|
+
readonly operationId: "set-project-assignment";
|
|
1071
1071
|
readonly securityScheme: "AccessToken";
|
|
1072
1072
|
readonly upstreamUrl: "https://billing.leaflow.cloud";
|
|
1073
1073
|
}, {
|
|
@@ -1134,6 +1134,14 @@ export declare const routes: readonly [{
|
|
|
1134
1134
|
readonly operationId: "get-request";
|
|
1135
1135
|
readonly securityScheme: "ScopedToken";
|
|
1136
1136
|
readonly upstreamUrl: "https://canopy.leaflow.cloud";
|
|
1137
|
+
}, {
|
|
1138
|
+
readonly service: "canopy";
|
|
1139
|
+
readonly contract: "canopy";
|
|
1140
|
+
readonly method: "GET";
|
|
1141
|
+
readonly path: "/api/v1/service";
|
|
1142
|
+
readonly operationId: "get-service";
|
|
1143
|
+
readonly securityScheme: "ScopedToken";
|
|
1144
|
+
readonly upstreamUrl: "https://canopy.leaflow.cloud";
|
|
1137
1145
|
}, {
|
|
1138
1146
|
readonly service: "canopy";
|
|
1139
1147
|
readonly contract: "canopy";
|
|
@@ -1206,6 +1214,22 @@ export declare const routes: readonly [{
|
|
|
1206
1214
|
readonly operationId: "revoke-api-key";
|
|
1207
1215
|
readonly securityScheme: "ScopedToken";
|
|
1208
1216
|
readonly upstreamUrl: "https://canopy.leaflow.cloud";
|
|
1217
|
+
}, {
|
|
1218
|
+
readonly service: "canopy";
|
|
1219
|
+
readonly contract: "canopy";
|
|
1220
|
+
readonly method: "POST";
|
|
1221
|
+
readonly path: "/api/v1/service";
|
|
1222
|
+
readonly operationId: "create-service";
|
|
1223
|
+
readonly securityScheme: "ScopedToken";
|
|
1224
|
+
readonly upstreamUrl: "https://canopy.leaflow.cloud";
|
|
1225
|
+
}, {
|
|
1226
|
+
readonly service: "canopy";
|
|
1227
|
+
readonly contract: "canopy";
|
|
1228
|
+
readonly method: "POST";
|
|
1229
|
+
readonly path: "/api/v1/service/quote";
|
|
1230
|
+
readonly operationId: "create-service-quote";
|
|
1231
|
+
readonly securityScheme: "ScopedToken";
|
|
1232
|
+
readonly upstreamUrl: "https://canopy.leaflow.cloud";
|
|
1209
1233
|
}, {
|
|
1210
1234
|
readonly service: "compute";
|
|
1211
1235
|
readonly contract: "compute";
|
package/dist/routes.js
CHANGED
|
@@ -752,7 +752,7 @@ export const routes = [
|
|
|
752
752
|
contract: "billing/account",
|
|
753
753
|
method: "GET",
|
|
754
754
|
path: "/account/v1/projects",
|
|
755
|
-
operationId: "list-
|
|
755
|
+
operationId: "list-project-assignments",
|
|
756
756
|
securityScheme: "AccessToken",
|
|
757
757
|
upstreamUrl: "https://billing.leaflow.cloud",
|
|
758
758
|
},
|
|
@@ -761,7 +761,7 @@ export const routes = [
|
|
|
761
761
|
contract: "billing/account",
|
|
762
762
|
method: "GET",
|
|
763
763
|
path: "/account/v1/projects/{projectId}/billing-account",
|
|
764
|
-
operationId: "get-project-
|
|
764
|
+
operationId: "get-project-assignment",
|
|
765
765
|
securityScheme: "AccessToken",
|
|
766
766
|
upstreamUrl: "https://billing.leaflow.cloud",
|
|
767
767
|
},
|
|
@@ -1202,7 +1202,7 @@ export const routes = [
|
|
|
1202
1202
|
contract: "billing/account",
|
|
1203
1203
|
method: "PUT",
|
|
1204
1204
|
path: "/account/v1/projects/{projectId}/billing-account",
|
|
1205
|
-
operationId: "set-project-
|
|
1205
|
+
operationId: "set-project-assignment",
|
|
1206
1206
|
securityScheme: "AccessToken",
|
|
1207
1207
|
upstreamUrl: "https://billing.leaflow.cloud",
|
|
1208
1208
|
},
|
|
@@ -1278,6 +1278,15 @@ export const routes = [
|
|
|
1278
1278
|
securityScheme: "ScopedToken",
|
|
1279
1279
|
upstreamUrl: "https://canopy.leaflow.cloud",
|
|
1280
1280
|
},
|
|
1281
|
+
{
|
|
1282
|
+
service: "canopy",
|
|
1283
|
+
contract: "canopy",
|
|
1284
|
+
method: "GET",
|
|
1285
|
+
path: "/api/v1/service",
|
|
1286
|
+
operationId: "get-service",
|
|
1287
|
+
securityScheme: "ScopedToken",
|
|
1288
|
+
upstreamUrl: "https://canopy.leaflow.cloud",
|
|
1289
|
+
},
|
|
1281
1290
|
{
|
|
1282
1291
|
service: "canopy",
|
|
1283
1292
|
contract: "canopy",
|
|
@@ -1359,6 +1368,24 @@ export const routes = [
|
|
|
1359
1368
|
securityScheme: "ScopedToken",
|
|
1360
1369
|
upstreamUrl: "https://canopy.leaflow.cloud",
|
|
1361
1370
|
},
|
|
1371
|
+
{
|
|
1372
|
+
service: "canopy",
|
|
1373
|
+
contract: "canopy",
|
|
1374
|
+
method: "POST",
|
|
1375
|
+
path: "/api/v1/service",
|
|
1376
|
+
operationId: "create-service",
|
|
1377
|
+
securityScheme: "ScopedToken",
|
|
1378
|
+
upstreamUrl: "https://canopy.leaflow.cloud",
|
|
1379
|
+
},
|
|
1380
|
+
{
|
|
1381
|
+
service: "canopy",
|
|
1382
|
+
contract: "canopy",
|
|
1383
|
+
method: "POST",
|
|
1384
|
+
path: "/api/v1/service/quote",
|
|
1385
|
+
operationId: "create-service-quote",
|
|
1386
|
+
securityScheme: "ScopedToken",
|
|
1387
|
+
upstreamUrl: "https://canopy.leaflow.cloud",
|
|
1388
|
+
},
|
|
1362
1389
|
{
|
|
1363
1390
|
service: "compute",
|
|
1364
1391
|
contract: "compute",
|