@leaflow/sdk 0.136.0 → 0.137.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/type/funds/v1/generated/functions.d.ts +8 -0
- package/dist/billing/type/funds/v1/generated/functions.js +8 -0
- package/dist/billing/type/funds/v1/generated/models.d.ts +38 -0
- package/dist/billing/type/funds/v1/generated/models.js +1 -0
- package/dist/billing/type/funds/v1/generated/schemas.zod.d.ts +8 -0
- package/dist/billing/type/funds/v1/generated/schemas.zod.js +8 -0
- package/dist/billing/type/funds/v1/generated/validators/funds.zod.d.ts +18 -0
- package/dist/billing/type/funds/v1/generated/validators/funds.zod.js +19 -0
- package/dist/billing/type/funds/v1/generated/validators/money.zod.d.ts +11 -0
- package/dist/billing/type/funds/v1/generated/validators/money.zod.js +11 -0
- package/dist/billing/type/order/v1/generated/models.d.ts +22 -0
- package/dist/billing/type/order/v1/generated/validators/funds.zod.d.ts +18 -0
- package/dist/billing/type/order/v1/generated/validators/funds.zod.js +19 -0
- package/dist/billing/type/order/v1/generated/validators/paymentPreview.zod.d.ts +8 -0
- package/dist/billing/type/order/v1/generated/validators/paymentPreview.zod.js +2 -0
- package/dist/billing/type/order/v1/generated/validators/quote.zod.d.ts +8 -0
- package/dist/billing/type/order/v1/generated/validators/quote.zod.js +2 -0
- package/dist/billing/type/quote/v1/generated/models.d.ts +21 -0
- package/dist/billing/type/quote/v1/generated/validators/funds.zod.d.ts +18 -0
- package/dist/billing/type/quote/v1/generated/validators/funds.zod.js +19 -0
- package/dist/billing/type/quote/v1/generated/validators/quote.zod.d.ts +8 -0
- package/dist/billing/type/quote/v1/generated/validators/quote.zod.js +2 -0
- package/dist/billing/v1/generated/models.d.ts +22 -0
- package/dist/billing/v1/generated/validators/funds.zod.d.ts +18 -0
- package/dist/billing/v1/generated/validators/funds.zod.js +19 -0
- package/dist/billing/v1/generated/validators/paymentPreview.zod.d.ts +8 -0
- package/dist/billing/v1/generated/validators/paymentPreview.zod.js +2 -0
- package/dist/billing/v1/generated/validators/quote.zod.d.ts +8 -0
- package/dist/billing/v1/generated/validators/quote.zod.js +2 -0
- package/dist/canopy/v1/generated/models.d.ts +24 -0
- package/dist/canopy/v1/generated/validators/funds.zod.d.ts +41 -0
- package/dist/canopy/v1/generated/validators/funds.zod.js +42 -0
- package/dist/canopy/v1/generated/validators/paymentPreview.zod.d.ts +8 -0
- package/dist/canopy/v1/generated/validators/paymentPreview.zod.js +2 -0
- package/dist/canopy/v1/generated/validators/quote.zod.d.ts +8 -0
- package/dist/canopy/v1/generated/validators/quote.zod.js +2 -0
- package/dist/canopy/v1/generated/validators/quote5f60d00.zod.d.ts +8 -0
- package/dist/canopy/v1/generated/validators/quote5f60d00.zod.js +2 -0
- package/dist/canopy/v1/generated/validators/quoteA200529.zod.d.ts +8 -0
- package/dist/compute/v1/generated/models.d.ts +21 -0
- package/dist/compute/v1/generated/validators/funds.zod.d.ts +34 -0
- package/dist/compute/v1/generated/validators/funds.zod.js +35 -0
- package/dist/compute/v1/generated/validators/quote.zod.d.ts +8 -0
- package/dist/compute/v1/generated/validators/quote.zod.js +2 -0
- package/dist/membership/v1/generated/models.d.ts +22 -0
- package/dist/membership/v1/generated/validators/funds.zod.d.ts +18 -0
- package/dist/membership/v1/generated/validators/funds.zod.js +19 -0
- package/dist/membership/v1/generated/validators/paymentPreview.zod.d.ts +8 -0
- package/dist/membership/v1/generated/validators/paymentPreview.zod.js +2 -0
- package/dist/membership/v1/generated/validators/quote.zod.d.ts +8 -0
- package/dist/membership/v1/generated/validators/quote.zod.js +2 -0
- package/package.json +1 -1
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval 🍺
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
* Purchase Funds
|
|
5
|
+
* Current account funds and the additional balance needed for a quoted purchase. Types only.
|
|
6
|
+
* OpenAPI spec version: v1
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* A decimal string, in the currency stated alongside it.
|
|
10
|
+
*
|
|
11
|
+
* **The currency is not part of this type.** It is carried by a `currency` field next to the
|
|
12
|
+
* amount, or by the account the amount belongs to. Reading an amount without that field is
|
|
13
|
+
* reading a number with no unit.
|
|
14
|
+
*
|
|
15
|
+
* It is a string rather than a JSON number because a JSON number is a float in most parsers,
|
|
16
|
+
* and a float loses precision on the first arithmetic. Nothing on this platform puts an amount
|
|
17
|
+
* through a float.
|
|
18
|
+
*/
|
|
19
|
+
export type Money = string;
|
|
20
|
+
/**
|
|
21
|
+
* Account funding for this purchase, calculated by Billing. Amounts use the enclosing response currency.
|
|
22
|
+
* Credit eligibility and all purchase requirements are already evaluated. Nothing is charged or reserved.
|
|
23
|
+
* A prepaid purchase may instead use an online payment method.
|
|
24
|
+
*/
|
|
25
|
+
export interface Funds {
|
|
26
|
+
/** Spendable balance after pending returns. */
|
|
27
|
+
available_balance_amount: Money;
|
|
28
|
+
/** Currently effective credits eligible for the quoted purchases or postpaid usage. Each grant is counted once. */
|
|
29
|
+
usable_credit_amount: Money;
|
|
30
|
+
/** Currently effective credits that cannot fund any quoted purchase or postpaid target. Unused eligible credits are not restricted. */
|
|
31
|
+
restricted_credit_amount: Money;
|
|
32
|
+
/** Minimum spendable balance needed after eligible credits, covering immediate charges and every new postpaid admission requirement. */
|
|
33
|
+
required_balance_amount: Money;
|
|
34
|
+
/** Additional balance needed now. Zero means account funds satisfy this quote. No funds are reserved. */
|
|
35
|
+
balance_shortfall_amount: Money;
|
|
36
|
+
/** Minimum recharge that covers the shortfall, respecting the currency minimum recharge and currency precision. Zero when no additional balance is needed. */
|
|
37
|
+
required_top_up_amount: Money;
|
|
38
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval 🍺
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
* Purchase Funds
|
|
5
|
+
* Current account funds and the additional balance needed for a quoted purchase. Types only.
|
|
6
|
+
* OpenAPI spec version: v1
|
|
7
|
+
*/
|
|
8
|
+
import * as zod from "zod";
|
|
9
|
+
export declare const Funds: zod.ZodObject<{
|
|
10
|
+
available_balance_amount: zod.ZodString;
|
|
11
|
+
usable_credit_amount: zod.ZodString;
|
|
12
|
+
restricted_credit_amount: zod.ZodString;
|
|
13
|
+
required_balance_amount: zod.ZodString;
|
|
14
|
+
balance_shortfall_amount: zod.ZodString;
|
|
15
|
+
required_top_up_amount: zod.ZodString;
|
|
16
|
+
}, zod.z.core.$strict>;
|
|
17
|
+
export type Funds = zod.input<typeof Funds>;
|
|
18
|
+
export type FundsOutput = zod.output<typeof Funds>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval 🍺
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
* Purchase Funds
|
|
5
|
+
* Current account funds and the additional balance needed for a quoted purchase. Types only.
|
|
6
|
+
* OpenAPI spec version: v1
|
|
7
|
+
*/
|
|
8
|
+
import * as zod from "zod";
|
|
9
|
+
import { Money } from "./money.zod.js";
|
|
10
|
+
export const Funds = zod
|
|
11
|
+
.strictObject({
|
|
12
|
+
available_balance_amount: Money.describe("Spendable balance after pending returns."),
|
|
13
|
+
usable_credit_amount: Money.describe("Currently effective credits eligible for the quoted purchases or postpaid usage. Each grant is counted once."),
|
|
14
|
+
restricted_credit_amount: Money.describe("Currently effective credits that cannot fund any quoted purchase or postpaid target. Unused eligible credits are not restricted."),
|
|
15
|
+
required_balance_amount: Money.describe("Minimum spendable balance needed after eligible credits, covering immediate charges and every new postpaid admission requirement."),
|
|
16
|
+
balance_shortfall_amount: Money.describe("Additional balance needed now. Zero means account funds satisfy this quote. No funds are reserved."),
|
|
17
|
+
required_top_up_amount: Money.describe("Minimum recharge that covers the shortfall, respecting the currency minimum recharge and currency precision. Zero when no additional balance is needed."),
|
|
18
|
+
})
|
|
19
|
+
.describe("Account funding for this purchase, calculated by Billing. Amounts use the enclosing response currency.\nCredit eligibility and all purchase requirements are already evaluated. Nothing is charged or reserved.\nA prepaid purchase may instead use an online payment method.\n");
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval 🍺
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
* Purchase Funds
|
|
5
|
+
* Current account funds and the additional balance needed for a quoted purchase. Types only.
|
|
6
|
+
* OpenAPI spec version: v1
|
|
7
|
+
*/
|
|
8
|
+
import * as zod from "zod";
|
|
9
|
+
export declare const Money: zod.ZodString;
|
|
10
|
+
export type Money = zod.input<typeof Money>;
|
|
11
|
+
export type MoneyOutput = zod.output<typeof Money>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval 🍺
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
* Purchase Funds
|
|
5
|
+
* Current account funds and the additional balance needed for a quoted purchase. Types only.
|
|
6
|
+
* OpenAPI spec version: v1
|
|
7
|
+
*/
|
|
8
|
+
import * as zod from "zod";
|
|
9
|
+
export const Money = zod
|
|
10
|
+
.string()
|
|
11
|
+
.describe("A decimal string, in the currency stated alongside it.\n\n**The currency is not part of this type.** It is carried by a `currency` field next to the\namount, or by the account the amount belongs to. Reading an amount without that field is\nreading a number with no unit.\n\nIt is a string rather than a JSON number because a JSON number is a float in most parsers,\nand a float loses precision on the first arithmetic. Nothing on this platform puts an amount\nthrough a float.");
|
|
@@ -384,6 +384,25 @@ export interface QuoteItem {
|
|
|
384
384
|
total: Money;
|
|
385
385
|
currency: string;
|
|
386
386
|
}
|
|
387
|
+
/**
|
|
388
|
+
* Account funding for this purchase, calculated by Billing. Amounts use the enclosing response currency.
|
|
389
|
+
* Credit eligibility and all purchase requirements are already evaluated. Nothing is charged or reserved.
|
|
390
|
+
* A prepaid purchase may instead use an online payment method.
|
|
391
|
+
*/
|
|
392
|
+
export interface Funds {
|
|
393
|
+
/** Spendable balance after pending returns. */
|
|
394
|
+
available_balance_amount: Money;
|
|
395
|
+
/** Currently effective credits eligible for the quoted purchases or postpaid usage. Each grant is counted once. */
|
|
396
|
+
usable_credit_amount: Money;
|
|
397
|
+
/** Currently effective credits that cannot fund any quoted purchase or postpaid target. Unused eligible credits are not restricted. */
|
|
398
|
+
restricted_credit_amount: Money;
|
|
399
|
+
/** Minimum spendable balance needed after eligible credits, covering immediate charges and every new postpaid admission requirement. */
|
|
400
|
+
required_balance_amount: Money;
|
|
401
|
+
/** Additional balance needed now. Zero means account funds satisfy this quote. No funds are reserved. */
|
|
402
|
+
balance_shortfall_amount: Money;
|
|
403
|
+
/** Minimum recharge that covers the shortfall, respecting the currency minimum recharge and currency precision. Zero when no additional balance is needed. */
|
|
404
|
+
required_top_up_amount: Money;
|
|
405
|
+
}
|
|
387
406
|
export type QuotedDiscountType = (typeof QuotedDiscountType)[keyof typeof QuotedDiscountType];
|
|
388
407
|
export declare const QuotedDiscountType: {
|
|
389
408
|
readonly promotion_code: "promotion_code";
|
|
@@ -502,6 +521,8 @@ export interface OrderRefundQuote {
|
|
|
502
521
|
* provides that order's checkout amount.
|
|
503
522
|
*/
|
|
504
523
|
export interface Quote {
|
|
524
|
+
/** Account funding for an existing-order checkout quote. Absent for usage estimates, refunds and cancellation previews. */
|
|
525
|
+
funds?: Funds;
|
|
505
526
|
subtotal: Money;
|
|
506
527
|
discount_amount: Money;
|
|
507
528
|
tax_amount: Money;
|
|
@@ -1282,6 +1303,7 @@ export interface PaymentPreviewInvoice {
|
|
|
1282
1303
|
* What paying would take, computed as paying computes it. Nothing is charged or reserved.
|
|
1283
1304
|
*/
|
|
1284
1305
|
export interface PaymentPreview {
|
|
1306
|
+
funds?: Funds;
|
|
1285
1307
|
currency: string;
|
|
1286
1308
|
/** What is outstanding before paying. */
|
|
1287
1309
|
amount_due: Money;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval 🍺
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
* Billing Order Types
|
|
5
|
+
* The Billing order a product purchase placed. Types only; this document declares no operations.
|
|
6
|
+
* OpenAPI spec version: v1
|
|
7
|
+
*/
|
|
8
|
+
import * as zod from "zod";
|
|
9
|
+
export declare const Funds: zod.ZodObject<{
|
|
10
|
+
available_balance_amount: zod.ZodString;
|
|
11
|
+
usable_credit_amount: zod.ZodString;
|
|
12
|
+
restricted_credit_amount: zod.ZodString;
|
|
13
|
+
required_balance_amount: zod.ZodString;
|
|
14
|
+
balance_shortfall_amount: zod.ZodString;
|
|
15
|
+
required_top_up_amount: zod.ZodString;
|
|
16
|
+
}, zod.z.core.$strict>;
|
|
17
|
+
export type Funds = zod.input<typeof Funds>;
|
|
18
|
+
export type FundsOutput = zod.output<typeof Funds>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval 🍺
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
* Billing Order Types
|
|
5
|
+
* The Billing order a product purchase placed. Types only; this document declares no operations.
|
|
6
|
+
* OpenAPI spec version: v1
|
|
7
|
+
*/
|
|
8
|
+
import * as zod from "zod";
|
|
9
|
+
import { Money } from "./money.zod.js";
|
|
10
|
+
export const Funds = zod
|
|
11
|
+
.strictObject({
|
|
12
|
+
available_balance_amount: Money.describe("Spendable balance after pending returns."),
|
|
13
|
+
usable_credit_amount: Money.describe("Currently effective credits eligible for the quoted purchases or postpaid usage. Each grant is counted once."),
|
|
14
|
+
restricted_credit_amount: Money.describe("Currently effective credits that cannot fund any quoted purchase or postpaid target. Unused eligible credits are not restricted."),
|
|
15
|
+
required_balance_amount: Money.describe("Minimum spendable balance needed after eligible credits, covering immediate charges and every new postpaid admission requirement."),
|
|
16
|
+
balance_shortfall_amount: Money.describe("Additional balance needed now. Zero means account funds satisfy this quote. No funds are reserved."),
|
|
17
|
+
required_top_up_amount: Money.describe("Minimum recharge that covers the shortfall, respecting the currency minimum recharge and currency precision. Zero when no additional balance is needed."),
|
|
18
|
+
})
|
|
19
|
+
.describe("Account funding for this purchase, calculated by Billing. Amounts use the enclosing response currency.\nCredit eligibility and all purchase requirements are already evaluated. Nothing is charged or reserved.\nA prepaid purchase may instead use an online payment method.\n");
|
|
@@ -7,6 +7,14 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import * as zod from "zod";
|
|
9
9
|
export declare const PaymentPreview: zod.ZodObject<{
|
|
10
|
+
funds: zod.ZodOptional<zod.ZodObject<{
|
|
11
|
+
available_balance_amount: zod.ZodString;
|
|
12
|
+
usable_credit_amount: zod.ZodString;
|
|
13
|
+
restricted_credit_amount: zod.ZodString;
|
|
14
|
+
required_balance_amount: zod.ZodString;
|
|
15
|
+
balance_shortfall_amount: zod.ZodString;
|
|
16
|
+
required_top_up_amount: zod.ZodString;
|
|
17
|
+
}, zod.z.core.$strict>>;
|
|
10
18
|
currency: zod.ZodString;
|
|
11
19
|
amount_due: zod.ZodString;
|
|
12
20
|
credit_applied: zod.ZodString;
|
|
@@ -7,10 +7,12 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import * as zod from "zod";
|
|
9
9
|
import { AppliedCredit } from "./appliedCredit.zod.js";
|
|
10
|
+
import { Funds } from "./funds.zod.js";
|
|
10
11
|
import { Money } from "./money.zod.js";
|
|
11
12
|
import { PaymentPreviewInvoice } from "./paymentPreviewInvoice.zod.js";
|
|
12
13
|
export const PaymentPreview = zod
|
|
13
14
|
.strictObject({
|
|
15
|
+
funds: Funds.optional(),
|
|
14
16
|
currency: zod.string(),
|
|
15
17
|
amount_due: Money.describe("What is outstanding before paying."),
|
|
16
18
|
credit_applied: Money.describe("What credit grants would pay. Grants restricted to other purchases pay nothing here."),
|
|
@@ -7,6 +7,14 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import * as zod from "zod";
|
|
9
9
|
export declare const Quote: zod.ZodObject<{
|
|
10
|
+
funds: zod.ZodOptional<zod.ZodObject<{
|
|
11
|
+
available_balance_amount: zod.ZodString;
|
|
12
|
+
usable_credit_amount: zod.ZodString;
|
|
13
|
+
restricted_credit_amount: zod.ZodString;
|
|
14
|
+
required_balance_amount: zod.ZodString;
|
|
15
|
+
balance_shortfall_amount: zod.ZodString;
|
|
16
|
+
required_top_up_amount: zod.ZodString;
|
|
17
|
+
}, zod.z.core.$strict>>;
|
|
10
18
|
subtotal: zod.ZodString;
|
|
11
19
|
discount_amount: zod.ZodString;
|
|
12
20
|
tax_amount: zod.ZodString;
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import * as zod from "zod";
|
|
9
9
|
import { CancellationRefundPreview } from "./cancellationRefundPreview.zod.js";
|
|
10
|
+
import { Funds } from "./funds.zod.js";
|
|
10
11
|
import { Money } from "./money.zod.js";
|
|
11
12
|
import { OrderRefundQuote } from "./orderRefundQuote.zod.js";
|
|
12
13
|
import { QuotedDiscount } from "./quotedDiscount.zod.js";
|
|
@@ -14,6 +15,7 @@ import { QuoteItem } from "./quoteItem.zod.js";
|
|
|
14
15
|
import { QuoteRenewalResult } from "./quoteRenewalResult.zod.js";
|
|
15
16
|
export const Quote = zod
|
|
16
17
|
.strictObject({
|
|
18
|
+
funds: Funds.optional().describe("Account funding for an existing-order checkout quote. Absent for usage estimates, refunds and cancellation previews."),
|
|
17
19
|
subtotal: Money,
|
|
18
20
|
discount_amount: Money,
|
|
19
21
|
tax_amount: Money,
|
|
@@ -17,6 +17,25 @@
|
|
|
17
17
|
* through a float.
|
|
18
18
|
*/
|
|
19
19
|
export type Money = string;
|
|
20
|
+
/**
|
|
21
|
+
* Account funding for this purchase, calculated by Billing. Amounts use the enclosing response currency.
|
|
22
|
+
* Credit eligibility and all purchase requirements are already evaluated. Nothing is charged or reserved.
|
|
23
|
+
* A prepaid purchase may instead use an online payment method.
|
|
24
|
+
*/
|
|
25
|
+
export interface Funds {
|
|
26
|
+
/** Spendable balance after pending returns. */
|
|
27
|
+
available_balance_amount: Money;
|
|
28
|
+
/** Currently effective credits eligible for the quoted purchases or postpaid usage. Each grant is counted once. */
|
|
29
|
+
usable_credit_amount: Money;
|
|
30
|
+
/** Currently effective credits that cannot fund any quoted purchase or postpaid target. Unused eligible credits are not restricted. */
|
|
31
|
+
restricted_credit_amount: Money;
|
|
32
|
+
/** Minimum spendable balance needed after eligible credits, covering immediate charges and every new postpaid admission requirement. */
|
|
33
|
+
required_balance_amount: Money;
|
|
34
|
+
/** Additional balance needed now. Zero means account funds satisfy this quote. No funds are reserved. */
|
|
35
|
+
balance_shortfall_amount: Money;
|
|
36
|
+
/** Minimum recharge that covers the shortfall, respecting the currency minimum recharge and currency precision. Zero when no additional balance is needed. */
|
|
37
|
+
required_top_up_amount: Money;
|
|
38
|
+
}
|
|
20
39
|
/**
|
|
21
40
|
* One calculated purchase line. Fixed purchase amounts are rounded as checkout rounds them.
|
|
22
41
|
* A line without an immediate charge has zero checkout amounts. unit_amount remains null when
|
|
@@ -62,11 +81,13 @@ export interface QuoteItem {
|
|
|
62
81
|
* error response; it never returns a partial quote with HTTP 200.
|
|
63
82
|
*/
|
|
64
83
|
export interface Quote {
|
|
84
|
+
funds: Funds;
|
|
65
85
|
/**
|
|
66
86
|
* Whether the account's current balance and eligible credits cover immediate charges
|
|
67
87
|
* and the currency's minimum top-up for every new postpaid item. False preserves this
|
|
68
88
|
* complete price preview. Nothing is reserved; checkout rechecks funds. Prepaid
|
|
69
89
|
* purchases may also use an online payment method.
|
|
90
|
+
* @deprecated
|
|
70
91
|
*/
|
|
71
92
|
funds_sufficient: boolean;
|
|
72
93
|
/** One line for each item the purchase would order, in the order it would order them. */
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval 🍺
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
* Quote Types
|
|
5
|
+
* Price previews returned before purchase confirmation. Types only; this document declares no operations.
|
|
6
|
+
* OpenAPI spec version: v1
|
|
7
|
+
*/
|
|
8
|
+
import * as zod from "zod";
|
|
9
|
+
export declare const Funds: zod.ZodObject<{
|
|
10
|
+
available_balance_amount: zod.ZodString;
|
|
11
|
+
usable_credit_amount: zod.ZodString;
|
|
12
|
+
restricted_credit_amount: zod.ZodString;
|
|
13
|
+
required_balance_amount: zod.ZodString;
|
|
14
|
+
balance_shortfall_amount: zod.ZodString;
|
|
15
|
+
required_top_up_amount: zod.ZodString;
|
|
16
|
+
}, zod.z.core.$strict>;
|
|
17
|
+
export type Funds = zod.input<typeof Funds>;
|
|
18
|
+
export type FundsOutput = zod.output<typeof Funds>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval 🍺
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
* Quote Types
|
|
5
|
+
* Price previews returned before purchase confirmation. Types only; this document declares no operations.
|
|
6
|
+
* OpenAPI spec version: v1
|
|
7
|
+
*/
|
|
8
|
+
import * as zod from "zod";
|
|
9
|
+
import { Money } from "./money.zod.js";
|
|
10
|
+
export const Funds = zod
|
|
11
|
+
.strictObject({
|
|
12
|
+
available_balance_amount: Money.describe("Spendable balance after pending returns."),
|
|
13
|
+
usable_credit_amount: Money.describe("Currently effective credits eligible for the quoted purchases or postpaid usage. Each grant is counted once."),
|
|
14
|
+
restricted_credit_amount: Money.describe("Currently effective credits that cannot fund any quoted purchase or postpaid target. Unused eligible credits are not restricted."),
|
|
15
|
+
required_balance_amount: Money.describe("Minimum spendable balance needed after eligible credits, covering immediate charges and every new postpaid admission requirement."),
|
|
16
|
+
balance_shortfall_amount: Money.describe("Additional balance needed now. Zero means account funds satisfy this quote. No funds are reserved."),
|
|
17
|
+
required_top_up_amount: Money.describe("Minimum recharge that covers the shortfall, respecting the currency minimum recharge and currency precision. Zero when no additional balance is needed."),
|
|
18
|
+
})
|
|
19
|
+
.describe("Account funding for this purchase, calculated by Billing. Amounts use the enclosing response currency.\nCredit eligibility and all purchase requirements are already evaluated. Nothing is charged or reserved.\nA prepaid purchase may instead use an online payment method.\n");
|
|
@@ -7,6 +7,14 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import * as zod from "zod";
|
|
9
9
|
export declare const Quote: zod.ZodObject<{
|
|
10
|
+
funds: zod.ZodObject<{
|
|
11
|
+
available_balance_amount: zod.ZodString;
|
|
12
|
+
usable_credit_amount: zod.ZodString;
|
|
13
|
+
restricted_credit_amount: zod.ZodString;
|
|
14
|
+
required_balance_amount: zod.ZodString;
|
|
15
|
+
balance_shortfall_amount: zod.ZodString;
|
|
16
|
+
required_top_up_amount: zod.ZodString;
|
|
17
|
+
}, zod.z.core.$strict>;
|
|
10
18
|
funds_sufficient: zod.ZodBoolean;
|
|
11
19
|
items: zod.ZodArray<zod.ZodObject<{
|
|
12
20
|
plan_name: zod.ZodString;
|
|
@@ -6,10 +6,12 @@
|
|
|
6
6
|
* OpenAPI spec version: v1
|
|
7
7
|
*/
|
|
8
8
|
import * as zod from "zod";
|
|
9
|
+
import { Funds } from "./funds.zod.js";
|
|
9
10
|
import { Money } from "./money.zod.js";
|
|
10
11
|
import { QuoteItem } from "./quoteItem.zod.js";
|
|
11
12
|
export const Quote = zod
|
|
12
13
|
.strictObject({
|
|
14
|
+
funds: Funds,
|
|
13
15
|
funds_sufficient: zod
|
|
14
16
|
.boolean()
|
|
15
17
|
.describe("Whether the account's current balance and eligible credits cover immediate charges\nand the currency's minimum top-up for every new postpaid item. False preserves this\ncomplete price preview. Nothing is reserved; checkout rechecks funds. Prepaid\npurchases may also use an online payment method."),
|
|
@@ -143,6 +143,25 @@ export interface QuoteItem {
|
|
|
143
143
|
total: Money;
|
|
144
144
|
currency: string;
|
|
145
145
|
}
|
|
146
|
+
/**
|
|
147
|
+
* Account funding for this purchase, calculated by Billing. Amounts use the enclosing response currency.
|
|
148
|
+
* Credit eligibility and all purchase requirements are already evaluated. Nothing is charged or reserved.
|
|
149
|
+
* A prepaid purchase may instead use an online payment method.
|
|
150
|
+
*/
|
|
151
|
+
export interface Funds {
|
|
152
|
+
/** Spendable balance after pending returns. */
|
|
153
|
+
available_balance_amount: Money;
|
|
154
|
+
/** Currently effective credits eligible for the quoted purchases or postpaid usage. Each grant is counted once. */
|
|
155
|
+
usable_credit_amount: Money;
|
|
156
|
+
/** Currently effective credits that cannot fund any quoted purchase or postpaid target. Unused eligible credits are not restricted. */
|
|
157
|
+
restricted_credit_amount: Money;
|
|
158
|
+
/** Minimum spendable balance needed after eligible credits, covering immediate charges and every new postpaid admission requirement. */
|
|
159
|
+
required_balance_amount: Money;
|
|
160
|
+
/** Additional balance needed now. Zero means account funds satisfy this quote. No funds are reserved. */
|
|
161
|
+
balance_shortfall_amount: Money;
|
|
162
|
+
/** Minimum recharge that covers the shortfall, respecting the currency minimum recharge and currency precision. Zero when no additional balance is needed. */
|
|
163
|
+
required_top_up_amount: Money;
|
|
164
|
+
}
|
|
146
165
|
export type QuotedDiscountType = (typeof QuotedDiscountType)[keyof typeof QuotedDiscountType];
|
|
147
166
|
export declare const QuotedDiscountType: {
|
|
148
167
|
readonly promotion_code: "promotion_code";
|
|
@@ -261,6 +280,8 @@ export interface OrderRefundQuote {
|
|
|
261
280
|
* provides that order's checkout amount.
|
|
262
281
|
*/
|
|
263
282
|
export interface Quote {
|
|
283
|
+
/** Account funding for an existing-order checkout quote. Absent for usage estimates, refunds and cancellation previews. */
|
|
284
|
+
funds?: Funds;
|
|
264
285
|
subtotal: Money;
|
|
265
286
|
discount_amount: Money;
|
|
266
287
|
tax_amount: Money;
|
|
@@ -1052,6 +1073,7 @@ export interface PaymentPreviewInvoice {
|
|
|
1052
1073
|
* What paying would take, computed as paying computes it. Nothing is charged or reserved.
|
|
1053
1074
|
*/
|
|
1054
1075
|
export interface PaymentPreview {
|
|
1076
|
+
funds?: Funds;
|
|
1055
1077
|
currency: string;
|
|
1056
1078
|
/** What is outstanding before paying. */
|
|
1057
1079
|
amount_due: Money;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval 🍺
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
* Leaflow Billing API
|
|
5
|
+
* Products, prices, orders, subscriptions and account billing. Financial operations require an account access token and billing-account authorization. Public catalogue operations declare no security requirement.
|
|
6
|
+
* OpenAPI spec version: v1
|
|
7
|
+
*/
|
|
8
|
+
import * as zod from "zod";
|
|
9
|
+
export declare const Funds: zod.ZodObject<{
|
|
10
|
+
available_balance_amount: zod.ZodString;
|
|
11
|
+
usable_credit_amount: zod.ZodString;
|
|
12
|
+
restricted_credit_amount: zod.ZodString;
|
|
13
|
+
required_balance_amount: zod.ZodString;
|
|
14
|
+
balance_shortfall_amount: zod.ZodString;
|
|
15
|
+
required_top_up_amount: zod.ZodString;
|
|
16
|
+
}, zod.z.core.$strict>;
|
|
17
|
+
export type Funds = zod.input<typeof Funds>;
|
|
18
|
+
export type FundsOutput = zod.output<typeof Funds>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval 🍺
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
* Leaflow Billing API
|
|
5
|
+
* Products, prices, orders, subscriptions and account billing. Financial operations require an account access token and billing-account authorization. Public catalogue operations declare no security requirement.
|
|
6
|
+
* OpenAPI spec version: v1
|
|
7
|
+
*/
|
|
8
|
+
import * as zod from "zod";
|
|
9
|
+
import { Money } from "./money.zod.js";
|
|
10
|
+
export const Funds = zod
|
|
11
|
+
.strictObject({
|
|
12
|
+
available_balance_amount: Money.describe("Spendable balance after pending returns."),
|
|
13
|
+
usable_credit_amount: Money.describe("Currently effective credits eligible for the quoted purchases or postpaid usage. Each grant is counted once."),
|
|
14
|
+
restricted_credit_amount: Money.describe("Currently effective credits that cannot fund any quoted purchase or postpaid target. Unused eligible credits are not restricted."),
|
|
15
|
+
required_balance_amount: Money.describe("Minimum spendable balance needed after eligible credits, covering immediate charges and every new postpaid admission requirement."),
|
|
16
|
+
balance_shortfall_amount: Money.describe("Additional balance needed now. Zero means account funds satisfy this quote. No funds are reserved."),
|
|
17
|
+
required_top_up_amount: Money.describe("Minimum recharge that covers the shortfall, respecting the currency minimum recharge and currency precision. Zero when no additional balance is needed."),
|
|
18
|
+
})
|
|
19
|
+
.describe("Account funding for this purchase, calculated by Billing. Amounts use the enclosing response currency.\nCredit eligibility and all purchase requirements are already evaluated. Nothing is charged or reserved.\nA prepaid purchase may instead use an online payment method.\n");
|
|
@@ -7,6 +7,14 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import * as zod from "zod";
|
|
9
9
|
export declare const PaymentPreview: zod.ZodObject<{
|
|
10
|
+
funds: zod.ZodOptional<zod.ZodObject<{
|
|
11
|
+
available_balance_amount: zod.ZodString;
|
|
12
|
+
usable_credit_amount: zod.ZodString;
|
|
13
|
+
restricted_credit_amount: zod.ZodString;
|
|
14
|
+
required_balance_amount: zod.ZodString;
|
|
15
|
+
balance_shortfall_amount: zod.ZodString;
|
|
16
|
+
required_top_up_amount: zod.ZodString;
|
|
17
|
+
}, zod.z.core.$strict>>;
|
|
10
18
|
currency: zod.ZodString;
|
|
11
19
|
amount_due: zod.ZodString;
|
|
12
20
|
credit_applied: zod.ZodString;
|
|
@@ -7,10 +7,12 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import * as zod from "zod";
|
|
9
9
|
import { AppliedCredit } from "./appliedCredit.zod.js";
|
|
10
|
+
import { Funds } from "./funds.zod.js";
|
|
10
11
|
import { Money } from "./money.zod.js";
|
|
11
12
|
import { PaymentPreviewInvoice } from "./paymentPreviewInvoice.zod.js";
|
|
12
13
|
export const PaymentPreview = zod
|
|
13
14
|
.strictObject({
|
|
15
|
+
funds: Funds.optional(),
|
|
14
16
|
currency: zod.string(),
|
|
15
17
|
amount_due: Money.describe("What is outstanding before paying."),
|
|
16
18
|
credit_applied: Money.describe("What credit grants would pay. Grants restricted to other purchases pay nothing here."),
|
|
@@ -7,6 +7,14 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import * as zod from "zod";
|
|
9
9
|
export declare const Quote: zod.ZodObject<{
|
|
10
|
+
funds: zod.ZodOptional<zod.ZodObject<{
|
|
11
|
+
available_balance_amount: zod.ZodString;
|
|
12
|
+
usable_credit_amount: zod.ZodString;
|
|
13
|
+
restricted_credit_amount: zod.ZodString;
|
|
14
|
+
required_balance_amount: zod.ZodString;
|
|
15
|
+
balance_shortfall_amount: zod.ZodString;
|
|
16
|
+
required_top_up_amount: zod.ZodString;
|
|
17
|
+
}, zod.z.core.$strict>>;
|
|
10
18
|
subtotal: zod.ZodString;
|
|
11
19
|
discount_amount: zod.ZodString;
|
|
12
20
|
tax_amount: zod.ZodString;
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import * as zod from "zod";
|
|
9
9
|
import { CancellationRefundPreview } from "./cancellationRefundPreview.zod.js";
|
|
10
|
+
import { Funds } from "./funds.zod.js";
|
|
10
11
|
import { Money } from "./money.zod.js";
|
|
11
12
|
import { OrderRefundQuote } from "./orderRefundQuote.zod.js";
|
|
12
13
|
import { QuotedDiscount } from "./quotedDiscount.zod.js";
|
|
@@ -14,6 +15,7 @@ import { QuoteItem } from "./quoteItem.zod.js";
|
|
|
14
15
|
import { QuoteRenewalResult } from "./quoteRenewalResult.zod.js";
|
|
15
16
|
export const Quote = zod
|
|
16
17
|
.strictObject({
|
|
18
|
+
funds: Funds.optional().describe("Account funding for an existing-order checkout quote. Absent for usage estimates, refunds and cancellation previews."),
|
|
17
19
|
subtotal: Money,
|
|
18
20
|
discount_amount: Money,
|
|
19
21
|
tax_amount: Money,
|
|
@@ -491,6 +491,25 @@ export interface CreateServiceResponseBody {
|
|
|
491
491
|
service: ServiceResource;
|
|
492
492
|
order: PlacedOrder;
|
|
493
493
|
}
|
|
494
|
+
/**
|
|
495
|
+
* Account funding for this purchase, calculated by Billing. Amounts use the enclosing response currency.
|
|
496
|
+
* Credit eligibility and all purchase requirements are already evaluated. Nothing is charged or reserved.
|
|
497
|
+
* A prepaid purchase may instead use an online payment method.
|
|
498
|
+
*/
|
|
499
|
+
export interface Funds {
|
|
500
|
+
/** Spendable balance after pending returns. */
|
|
501
|
+
available_balance_amount: Money;
|
|
502
|
+
/** Currently effective credits eligible for the quoted purchases or postpaid usage. Each grant is counted once. */
|
|
503
|
+
usable_credit_amount: Money;
|
|
504
|
+
/** Currently effective credits that cannot fund any quoted purchase or postpaid target. Unused eligible credits are not restricted. */
|
|
505
|
+
restricted_credit_amount: Money;
|
|
506
|
+
/** Minimum spendable balance needed after eligible credits, covering immediate charges and every new postpaid admission requirement. */
|
|
507
|
+
required_balance_amount: Money;
|
|
508
|
+
/** Additional balance needed now. Zero means account funds satisfy this quote. No funds are reserved. */
|
|
509
|
+
balance_shortfall_amount: Money;
|
|
510
|
+
/** Minimum recharge that covers the shortfall, respecting the currency minimum recharge and currency precision. Zero when no additional balance is needed. */
|
|
511
|
+
required_top_up_amount: Money;
|
|
512
|
+
}
|
|
494
513
|
/**
|
|
495
514
|
* One calculated purchase line. Fixed purchase amounts are rounded as checkout rounds them.
|
|
496
515
|
* A line without an immediate charge has zero checkout amounts. unit_amount remains null when
|
|
@@ -536,11 +555,13 @@ export interface QuoteItemDc1fddb {
|
|
|
536
555
|
* error response; it never returns a partial quote with HTTP 200.
|
|
537
556
|
*/
|
|
538
557
|
export interface Quote {
|
|
558
|
+
funds: Funds;
|
|
539
559
|
/**
|
|
540
560
|
* Whether the account's current balance and eligible credits cover immediate charges
|
|
541
561
|
* and the currency's minimum top-up for every new postpaid item. False preserves this
|
|
542
562
|
* complete price preview. Nothing is reserved; checkout rechecks funds. Prepaid
|
|
543
563
|
* purchases may also use an online payment method.
|
|
564
|
+
* @deprecated
|
|
544
565
|
*/
|
|
545
566
|
funds_sufficient: boolean;
|
|
546
567
|
/** One line for each item the purchase would order, in the order it would order them. */
|
|
@@ -996,6 +1017,8 @@ export interface OrderRefundQuote {
|
|
|
996
1017
|
* provides that order's checkout amount.
|
|
997
1018
|
*/
|
|
998
1019
|
export interface Quote5f60d00 {
|
|
1020
|
+
/** Account funding for an existing-order checkout quote. Absent for usage estimates, refunds and cancellation previews. */
|
|
1021
|
+
funds?: Funds;
|
|
999
1022
|
subtotal: Money;
|
|
1000
1023
|
discount_amount: Money;
|
|
1001
1024
|
tax_amount: Money;
|
|
@@ -1761,6 +1784,7 @@ export interface PaymentPreviewInvoice {
|
|
|
1761
1784
|
* What paying would take, computed as paying computes it. Nothing is charged or reserved.
|
|
1762
1785
|
*/
|
|
1763
1786
|
export interface PaymentPreview {
|
|
1787
|
+
funds?: Funds;
|
|
1764
1788
|
currency: string;
|
|
1765
1789
|
/** What is outstanding before paying. */
|
|
1766
1790
|
amount_due: Money;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval 🍺
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
* Leaflow Canopy API
|
|
5
|
+
* Management of API keys, together with the models available and the usage recorded against them.
|
|
6
|
+
*
|
|
7
|
+
* **These endpoints do not perform inference.** Requests are issued to the forwarding address, which accepts the OpenAI, Anthropic and Gemini request formats:
|
|
8
|
+
*
|
|
9
|
+
* ```
|
|
10
|
+
* POST /v1/chat/completions OpenAI
|
|
11
|
+
* POST /v1/messages Anthropic
|
|
12
|
+
* POST /v1beta/models/{model}:generateContent Gemini
|
|
13
|
+
* ```
|
|
14
|
+
*
|
|
15
|
+
* ## Authentication
|
|
16
|
+
*
|
|
17
|
+
* Every request carries a scoped token; see the `bearerAuth` security scheme.
|
|
18
|
+
*
|
|
19
|
+
* These management endpoints do not accept a Canopy API key. On this userapi host, the OpenAI-compatible `/v1/chat/completions`, `/v1/embeddings`, `/v1/models` and `/v1/models/{model}` endpoints accept the same project token; see the project inference contract. The separate API-key gateway continues to accept Canopy API keys.
|
|
20
|
+
*
|
|
21
|
+
* ## Conventions
|
|
22
|
+
*
|
|
23
|
+
* - **The plaintext of an API key is returned once.** The `secret` appears in the response that issues it and is returned by no other endpoint. A key that has been lost has to be revoked and reissued.
|
|
24
|
+
* - **Disabling and revoking are distinct.** A disabled key may be enabled again at any time, while a revocation is irreversible and is intended for a key that has been exposed. Neither removes the record, and the usage the key accrued remains readable.
|
|
25
|
+
* - **A usage query must carry a time range**, spanning no more than 31 days. `from` and `to` carry a timezone offset, which the server does not infer.
|
|
26
|
+
* - **The request and response bodies do not appear in the ledger.** They are not recorded. Quote the `upstream_request_id` from the response when reporting a problem.
|
|
27
|
+
* - **Usage may be estimated.** The upstream provider does not report usage on every request. Where it does not, `usage_source` is `estimated` and the figures are derived from the character classes of the payload, to within roughly fifteen per cent.
|
|
28
|
+
* - **The service is enabled before use.** A project enables the model platform once, through `create-service`; the forwarding endpoints refuse its requests until the service is `active`. Requests are then billed under the service's subscription by the tokens they use, at the rates stated in each model's `pricing`.
|
|
29
|
+
* OpenAPI spec version: 1.0.0
|
|
30
|
+
*/
|
|
31
|
+
import * as zod from "zod";
|
|
32
|
+
export declare const Funds: zod.ZodObject<{
|
|
33
|
+
available_balance_amount: zod.ZodString;
|
|
34
|
+
usable_credit_amount: zod.ZodString;
|
|
35
|
+
restricted_credit_amount: zod.ZodString;
|
|
36
|
+
required_balance_amount: zod.ZodString;
|
|
37
|
+
balance_shortfall_amount: zod.ZodString;
|
|
38
|
+
required_top_up_amount: zod.ZodString;
|
|
39
|
+
}, zod.z.core.$strict>;
|
|
40
|
+
export type Funds = zod.input<typeof Funds>;
|
|
41
|
+
export type FundsOutput = zod.output<typeof Funds>;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval 🍺
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
* Leaflow Canopy API
|
|
5
|
+
* Management of API keys, together with the models available and the usage recorded against them.
|
|
6
|
+
*
|
|
7
|
+
* **These endpoints do not perform inference.** Requests are issued to the forwarding address, which accepts the OpenAI, Anthropic and Gemini request formats:
|
|
8
|
+
*
|
|
9
|
+
* ```
|
|
10
|
+
* POST /v1/chat/completions OpenAI
|
|
11
|
+
* POST /v1/messages Anthropic
|
|
12
|
+
* POST /v1beta/models/{model}:generateContent Gemini
|
|
13
|
+
* ```
|
|
14
|
+
*
|
|
15
|
+
* ## Authentication
|
|
16
|
+
*
|
|
17
|
+
* Every request carries a scoped token; see the `bearerAuth` security scheme.
|
|
18
|
+
*
|
|
19
|
+
* These management endpoints do not accept a Canopy API key. On this userapi host, the OpenAI-compatible `/v1/chat/completions`, `/v1/embeddings`, `/v1/models` and `/v1/models/{model}` endpoints accept the same project token; see the project inference contract. The separate API-key gateway continues to accept Canopy API keys.
|
|
20
|
+
*
|
|
21
|
+
* ## Conventions
|
|
22
|
+
*
|
|
23
|
+
* - **The plaintext of an API key is returned once.** The `secret` appears in the response that issues it and is returned by no other endpoint. A key that has been lost has to be revoked and reissued.
|
|
24
|
+
* - **Disabling and revoking are distinct.** A disabled key may be enabled again at any time, while a revocation is irreversible and is intended for a key that has been exposed. Neither removes the record, and the usage the key accrued remains readable.
|
|
25
|
+
* - **A usage query must carry a time range**, spanning no more than 31 days. `from` and `to` carry a timezone offset, which the server does not infer.
|
|
26
|
+
* - **The request and response bodies do not appear in the ledger.** They are not recorded. Quote the `upstream_request_id` from the response when reporting a problem.
|
|
27
|
+
* - **Usage may be estimated.** The upstream provider does not report usage on every request. Where it does not, `usage_source` is `estimated` and the figures are derived from the character classes of the payload, to within roughly fifteen per cent.
|
|
28
|
+
* - **The service is enabled before use.** A project enables the model platform once, through `create-service`; the forwarding endpoints refuse its requests until the service is `active`. Requests are then billed under the service's subscription by the tokens they use, at the rates stated in each model's `pricing`.
|
|
29
|
+
* OpenAPI spec version: 1.0.0
|
|
30
|
+
*/
|
|
31
|
+
import * as zod from "zod";
|
|
32
|
+
import { Money } from "./money.zod.js";
|
|
33
|
+
export const Funds = zod
|
|
34
|
+
.strictObject({
|
|
35
|
+
available_balance_amount: Money.describe("Spendable balance after pending returns."),
|
|
36
|
+
usable_credit_amount: Money.describe("Currently effective credits eligible for the quoted purchases or postpaid usage. Each grant is counted once."),
|
|
37
|
+
restricted_credit_amount: Money.describe("Currently effective credits that cannot fund any quoted purchase or postpaid target. Unused eligible credits are not restricted."),
|
|
38
|
+
required_balance_amount: Money.describe("Minimum spendable balance needed after eligible credits, covering immediate charges and every new postpaid admission requirement."),
|
|
39
|
+
balance_shortfall_amount: Money.describe("Additional balance needed now. Zero means account funds satisfy this quote. No funds are reserved."),
|
|
40
|
+
required_top_up_amount: Money.describe("Minimum recharge that covers the shortfall, respecting the currency minimum recharge and currency precision. Zero when no additional balance is needed."),
|
|
41
|
+
})
|
|
42
|
+
.describe("Account funding for this purchase, calculated by Billing. Amounts use the enclosing response currency.\nCredit eligibility and all purchase requirements are already evaluated. Nothing is charged or reserved.\nA prepaid purchase may instead use an online payment method.\n");
|
|
@@ -30,6 +30,14 @@
|
|
|
30
30
|
*/
|
|
31
31
|
import * as zod from "zod";
|
|
32
32
|
export declare const PaymentPreview: zod.ZodObject<{
|
|
33
|
+
funds: zod.ZodOptional<zod.ZodObject<{
|
|
34
|
+
available_balance_amount: zod.ZodString;
|
|
35
|
+
usable_credit_amount: zod.ZodString;
|
|
36
|
+
restricted_credit_amount: zod.ZodString;
|
|
37
|
+
required_balance_amount: zod.ZodString;
|
|
38
|
+
balance_shortfall_amount: zod.ZodString;
|
|
39
|
+
required_top_up_amount: zod.ZodString;
|
|
40
|
+
}, zod.z.core.$strict>>;
|
|
33
41
|
currency: zod.ZodString;
|
|
34
42
|
amount_due: zod.ZodString;
|
|
35
43
|
credit_applied: zod.ZodString;
|
|
@@ -30,10 +30,12 @@
|
|
|
30
30
|
*/
|
|
31
31
|
import * as zod from "zod";
|
|
32
32
|
import { AppliedCredit } from "./appliedCredit.zod.js";
|
|
33
|
+
import { Funds } from "./funds.zod.js";
|
|
33
34
|
import { Money } from "./money.zod.js";
|
|
34
35
|
import { PaymentPreviewInvoice } from "./paymentPreviewInvoice.zod.js";
|
|
35
36
|
export const PaymentPreview = zod
|
|
36
37
|
.strictObject({
|
|
38
|
+
funds: Funds.optional(),
|
|
37
39
|
currency: zod.string(),
|
|
38
40
|
amount_due: Money.describe("What is outstanding before paying."),
|
|
39
41
|
credit_applied: Money.describe("What credit grants would pay. Grants restricted to other purchases pay nothing here."),
|
|
@@ -30,6 +30,14 @@
|
|
|
30
30
|
*/
|
|
31
31
|
import * as zod from "zod";
|
|
32
32
|
export declare const Quote: zod.ZodObject<{
|
|
33
|
+
funds: zod.ZodObject<{
|
|
34
|
+
available_balance_amount: zod.ZodString;
|
|
35
|
+
usable_credit_amount: zod.ZodString;
|
|
36
|
+
restricted_credit_amount: zod.ZodString;
|
|
37
|
+
required_balance_amount: zod.ZodString;
|
|
38
|
+
balance_shortfall_amount: zod.ZodString;
|
|
39
|
+
required_top_up_amount: zod.ZodString;
|
|
40
|
+
}, zod.z.core.$strict>;
|
|
33
41
|
funds_sufficient: zod.ZodBoolean;
|
|
34
42
|
items: zod.ZodArray<zod.ZodObject<{
|
|
35
43
|
plan_name: zod.ZodString;
|
|
@@ -29,10 +29,12 @@
|
|
|
29
29
|
* OpenAPI spec version: 1.0.0
|
|
30
30
|
*/
|
|
31
31
|
import * as zod from "zod";
|
|
32
|
+
import { Funds } from "./funds.zod.js";
|
|
32
33
|
import { Money } from "./money.zod.js";
|
|
33
34
|
import { QuoteItemDc1fddb } from "./quoteItemDc1fddb.zod.js";
|
|
34
35
|
export const Quote = zod
|
|
35
36
|
.strictObject({
|
|
37
|
+
funds: Funds,
|
|
36
38
|
funds_sufficient: zod
|
|
37
39
|
.boolean()
|
|
38
40
|
.describe("Whether the account's current balance and eligible credits cover immediate charges\nand the currency's minimum top-up for every new postpaid item. False preserves this\ncomplete price preview. Nothing is reserved; checkout rechecks funds. Prepaid\npurchases may also use an online payment method."),
|
|
@@ -30,6 +30,14 @@
|
|
|
30
30
|
*/
|
|
31
31
|
import * as zod from "zod";
|
|
32
32
|
export declare const Quote5f60d00: zod.ZodObject<{
|
|
33
|
+
funds: zod.ZodOptional<zod.ZodObject<{
|
|
34
|
+
available_balance_amount: zod.ZodString;
|
|
35
|
+
usable_credit_amount: zod.ZodString;
|
|
36
|
+
restricted_credit_amount: zod.ZodString;
|
|
37
|
+
required_balance_amount: zod.ZodString;
|
|
38
|
+
balance_shortfall_amount: zod.ZodString;
|
|
39
|
+
required_top_up_amount: zod.ZodString;
|
|
40
|
+
}, zod.z.core.$strict>>;
|
|
33
41
|
subtotal: zod.ZodString;
|
|
34
42
|
discount_amount: zod.ZodString;
|
|
35
43
|
tax_amount: zod.ZodString;
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
*/
|
|
31
31
|
import * as zod from "zod";
|
|
32
32
|
import { CancellationRefundPreview } from "./cancellationRefundPreview.zod.js";
|
|
33
|
+
import { Funds } from "./funds.zod.js";
|
|
33
34
|
import { Money } from "./money.zod.js";
|
|
34
35
|
import { OrderRefundQuote } from "./orderRefundQuote.zod.js";
|
|
35
36
|
import { QuotedDiscount } from "./quotedDiscount.zod.js";
|
|
@@ -37,6 +38,7 @@ import { QuoteItem } from "./quoteItem.zod.js";
|
|
|
37
38
|
import { QuoteRenewalResult } from "./quoteRenewalResult.zod.js";
|
|
38
39
|
export const Quote5f60d00 = zod
|
|
39
40
|
.strictObject({
|
|
41
|
+
funds: Funds.optional().describe("Account funding for an existing-order checkout quote. Absent for usage estimates, refunds and cancellation previews."),
|
|
40
42
|
subtotal: Money,
|
|
41
43
|
discount_amount: Money,
|
|
42
44
|
tax_amount: Money,
|
|
@@ -30,6 +30,14 @@
|
|
|
30
30
|
*/
|
|
31
31
|
import * as zod from "zod";
|
|
32
32
|
export declare const QuoteA200529: zod.ZodObject<{
|
|
33
|
+
funds: zod.ZodOptional<zod.ZodObject<{
|
|
34
|
+
available_balance_amount: zod.ZodString;
|
|
35
|
+
usable_credit_amount: zod.ZodString;
|
|
36
|
+
restricted_credit_amount: zod.ZodString;
|
|
37
|
+
required_balance_amount: zod.ZodString;
|
|
38
|
+
balance_shortfall_amount: zod.ZodString;
|
|
39
|
+
required_top_up_amount: zod.ZodString;
|
|
40
|
+
}, zod.z.core.$strict>>;
|
|
33
41
|
subtotal: zod.ZodString;
|
|
34
42
|
discount_amount: zod.ZodString;
|
|
35
43
|
tax_amount: zod.ZodString;
|
|
@@ -2302,6 +2302,25 @@ export interface SetFloatingIPBandwidthQuoteRequestBody {
|
|
|
2302
2302
|
*/
|
|
2303
2303
|
bandwidth_mbps: number;
|
|
2304
2304
|
}
|
|
2305
|
+
/**
|
|
2306
|
+
* Account funding for this purchase, calculated by Billing. Amounts use the enclosing response currency.
|
|
2307
|
+
* Credit eligibility and all purchase requirements are already evaluated. Nothing is charged or reserved.
|
|
2308
|
+
* A prepaid purchase may instead use an online payment method.
|
|
2309
|
+
*/
|
|
2310
|
+
export interface Funds {
|
|
2311
|
+
/** Spendable balance after pending returns. */
|
|
2312
|
+
available_balance_amount: Money;
|
|
2313
|
+
/** Currently effective credits eligible for the quoted purchases or postpaid usage. Each grant is counted once. */
|
|
2314
|
+
usable_credit_amount: Money;
|
|
2315
|
+
/** Currently effective credits that cannot fund any quoted purchase or postpaid target. Unused eligible credits are not restricted. */
|
|
2316
|
+
restricted_credit_amount: Money;
|
|
2317
|
+
/** Minimum spendable balance needed after eligible credits, covering immediate charges and every new postpaid admission requirement. */
|
|
2318
|
+
required_balance_amount: Money;
|
|
2319
|
+
/** Additional balance needed now. Zero means account funds satisfy this quote. No funds are reserved. */
|
|
2320
|
+
balance_shortfall_amount: Money;
|
|
2321
|
+
/** Minimum recharge that covers the shortfall, respecting the currency minimum recharge and currency precision. Zero when no additional balance is needed. */
|
|
2322
|
+
required_top_up_amount: Money;
|
|
2323
|
+
}
|
|
2305
2324
|
/**
|
|
2306
2325
|
* One calculated purchase line. Fixed purchase amounts are rounded as checkout rounds them.
|
|
2307
2326
|
* A line without an immediate charge has zero checkout amounts. unit_amount remains null when
|
|
@@ -2347,11 +2366,13 @@ export interface QuoteItem {
|
|
|
2347
2366
|
* error response; it never returns a partial quote with HTTP 200.
|
|
2348
2367
|
*/
|
|
2349
2368
|
export interface Quote {
|
|
2369
|
+
funds: Funds;
|
|
2350
2370
|
/**
|
|
2351
2371
|
* Whether the account's current balance and eligible credits cover immediate charges
|
|
2352
2372
|
* and the currency's minimum top-up for every new postpaid item. False preserves this
|
|
2353
2373
|
* complete price preview. Nothing is reserved; checkout rechecks funds. Prepaid
|
|
2354
2374
|
* purchases may also use an online payment method.
|
|
2375
|
+
* @deprecated
|
|
2355
2376
|
*/
|
|
2356
2377
|
funds_sufficient: boolean;
|
|
2357
2378
|
/** One line for each item the purchase would order, in the order it would order them. */
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval 🍺
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
* Leaflow Compute API
|
|
5
|
+
* Leaflow Compute user API for managing instances, disks, snapshots, backups, images, private networks, subnets, routes, security groups, network interfaces and floating IPs.
|
|
6
|
+
*
|
|
7
|
+
* ## Authentication
|
|
8
|
+
*
|
|
9
|
+
* Every request carries a scoped token; see the `scopedTokenAuth` security scheme.
|
|
10
|
+
*
|
|
11
|
+
* ## Conventions
|
|
12
|
+
*
|
|
13
|
+
* - **Purchases.** A purchase that creates resources returns them together with a PlacedOrder. They are readable at once and start as `pending`: the order has not been accepted, nothing exists in the cloud, no inventory such as an address is held, and fields known only after allocation, such as addresses, are null. Once Billing accepts the order, a resource becomes `provisioning` and then reaches its usual status, such as `active` or `available`. When the order is declined, canceled or expires, or creation fails, the resource ends `failed` and `failure_reason` states why; the charge for a resource that failed after acceptance is refunded. Read the order in Billing for checkout and payment progress.
|
|
14
|
+
* - **Pricing.** Catalog items, such as instance types, disk types and public IP pools, carry `pricing`: the prepaid and postpaid options Billing offers for them, in the currency of the project's current billing account, or null when the project has no billing account. They are list amounts before promotion codes, not a checkout guarantee. A purchase chooses one option with `billing`, which applies to all of its components. Every purchase and change has a quote operation beside it, at the same path followed by `/quote`, which returns what checkout would collect without ordering anything.
|
|
15
|
+
* - **Checkout.** Omit `checkout` for automatic checkout, which pays from eligible credit grants and balance when the order is placed; insufficient funds refuse the request with HTTP 422 `BILLING_INSUFFICIENT_FUNDS`, and nothing is created. With `checkout.mode` set to `deferred`, the resources are returned `pending` and nothing is created until checkout is confirmed and paid through Billing. An order whose total is zero, such as a postpaid purchase with nothing due now, completes checkout at placement in either mode and proceeds to provisioning.
|
|
16
|
+
* - **Operations.** Requests such as starting, stopping, attaching or deleting return HTTP 202 with the resource as it is when the request is accepted. While an operation runs, the resource's `operation` field names it; the field is null once the operation has finished, and the resource then shows the result. A resource with an operation in progress refuses another operation with HTTP 409 `COMPUTE_RESOURCE_BUSY`; an operation involving two resources, such as attaching a disk, is refused when either has one. A purchased change, such as a resize, is an operation from the moment its order is placed until it is applied or its order is canceled, including while it awaits checkout. Renaming and replacing labels or notes are not operations and are accepted at any time.
|
|
17
|
+
* - **Billing relationships.** A purchased resource records its `order_id`, `order_item_id` and `subscription_id`. The subscription is `pending` until the order is accepted, `provisioning` while the resource is created, and `active` once it is delivered. Bandwidth is a property of its floating IP, not a separate resource. Snapshots use a purchased per-region count quota, and backups are metered on the region's backup service; neither has an order or subscription of its own.
|
|
18
|
+
* - **Availability zones.** A disk and an instance must reside in the same availability zone to be attached. Instance types and disk types are each bound to one availability zone, so choosing a type determines the zone.
|
|
19
|
+
* - **IPv6 is not sold separately.** Once enabled on a private network, IPv6 addresses are assigned to the instances in that network automatically; they can be neither requested nor released individually.
|
|
20
|
+
* - **Floating IPs have a cooldown period.** A released address is neither available for re-allocation nor handed to another user for some time, so that DNS records and allow-lists still pointing at it do not break immediately.
|
|
21
|
+
* - **Passwords are returned once.** A password generated by the platform during creation or rebuild appears only in that response. Store it immediately.
|
|
22
|
+
* OpenAPI spec version: 1.0.0
|
|
23
|
+
*/
|
|
24
|
+
import * as zod from "zod";
|
|
25
|
+
export declare const Funds: zod.ZodObject<{
|
|
26
|
+
available_balance_amount: zod.ZodString;
|
|
27
|
+
usable_credit_amount: zod.ZodString;
|
|
28
|
+
restricted_credit_amount: zod.ZodString;
|
|
29
|
+
required_balance_amount: zod.ZodString;
|
|
30
|
+
balance_shortfall_amount: zod.ZodString;
|
|
31
|
+
required_top_up_amount: zod.ZodString;
|
|
32
|
+
}, zod.z.core.$strict>;
|
|
33
|
+
export type Funds = zod.input<typeof Funds>;
|
|
34
|
+
export type FundsOutput = zod.output<typeof Funds>;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval 🍺
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
* Leaflow Compute API
|
|
5
|
+
* Leaflow Compute user API for managing instances, disks, snapshots, backups, images, private networks, subnets, routes, security groups, network interfaces and floating IPs.
|
|
6
|
+
*
|
|
7
|
+
* ## Authentication
|
|
8
|
+
*
|
|
9
|
+
* Every request carries a scoped token; see the `scopedTokenAuth` security scheme.
|
|
10
|
+
*
|
|
11
|
+
* ## Conventions
|
|
12
|
+
*
|
|
13
|
+
* - **Purchases.** A purchase that creates resources returns them together with a PlacedOrder. They are readable at once and start as `pending`: the order has not been accepted, nothing exists in the cloud, no inventory such as an address is held, and fields known only after allocation, such as addresses, are null. Once Billing accepts the order, a resource becomes `provisioning` and then reaches its usual status, such as `active` or `available`. When the order is declined, canceled or expires, or creation fails, the resource ends `failed` and `failure_reason` states why; the charge for a resource that failed after acceptance is refunded. Read the order in Billing for checkout and payment progress.
|
|
14
|
+
* - **Pricing.** Catalog items, such as instance types, disk types and public IP pools, carry `pricing`: the prepaid and postpaid options Billing offers for them, in the currency of the project's current billing account, or null when the project has no billing account. They are list amounts before promotion codes, not a checkout guarantee. A purchase chooses one option with `billing`, which applies to all of its components. Every purchase and change has a quote operation beside it, at the same path followed by `/quote`, which returns what checkout would collect without ordering anything.
|
|
15
|
+
* - **Checkout.** Omit `checkout` for automatic checkout, which pays from eligible credit grants and balance when the order is placed; insufficient funds refuse the request with HTTP 422 `BILLING_INSUFFICIENT_FUNDS`, and nothing is created. With `checkout.mode` set to `deferred`, the resources are returned `pending` and nothing is created until checkout is confirmed and paid through Billing. An order whose total is zero, such as a postpaid purchase with nothing due now, completes checkout at placement in either mode and proceeds to provisioning.
|
|
16
|
+
* - **Operations.** Requests such as starting, stopping, attaching or deleting return HTTP 202 with the resource as it is when the request is accepted. While an operation runs, the resource's `operation` field names it; the field is null once the operation has finished, and the resource then shows the result. A resource with an operation in progress refuses another operation with HTTP 409 `COMPUTE_RESOURCE_BUSY`; an operation involving two resources, such as attaching a disk, is refused when either has one. A purchased change, such as a resize, is an operation from the moment its order is placed until it is applied or its order is canceled, including while it awaits checkout. Renaming and replacing labels or notes are not operations and are accepted at any time.
|
|
17
|
+
* - **Billing relationships.** A purchased resource records its `order_id`, `order_item_id` and `subscription_id`. The subscription is `pending` until the order is accepted, `provisioning` while the resource is created, and `active` once it is delivered. Bandwidth is a property of its floating IP, not a separate resource. Snapshots use a purchased per-region count quota, and backups are metered on the region's backup service; neither has an order or subscription of its own.
|
|
18
|
+
* - **Availability zones.** A disk and an instance must reside in the same availability zone to be attached. Instance types and disk types are each bound to one availability zone, so choosing a type determines the zone.
|
|
19
|
+
* - **IPv6 is not sold separately.** Once enabled on a private network, IPv6 addresses are assigned to the instances in that network automatically; they can be neither requested nor released individually.
|
|
20
|
+
* - **Floating IPs have a cooldown period.** A released address is neither available for re-allocation nor handed to another user for some time, so that DNS records and allow-lists still pointing at it do not break immediately.
|
|
21
|
+
* - **Passwords are returned once.** A password generated by the platform during creation or rebuild appears only in that response. Store it immediately.
|
|
22
|
+
* OpenAPI spec version: 1.0.0
|
|
23
|
+
*/
|
|
24
|
+
import * as zod from "zod";
|
|
25
|
+
import { Money } from "./money.zod.js";
|
|
26
|
+
export const Funds = zod
|
|
27
|
+
.strictObject({
|
|
28
|
+
available_balance_amount: Money.describe("Spendable balance after pending returns."),
|
|
29
|
+
usable_credit_amount: Money.describe("Currently effective credits eligible for the quoted purchases or postpaid usage. Each grant is counted once."),
|
|
30
|
+
restricted_credit_amount: Money.describe("Currently effective credits that cannot fund any quoted purchase or postpaid target. Unused eligible credits are not restricted."),
|
|
31
|
+
required_balance_amount: Money.describe("Minimum spendable balance needed after eligible credits, covering immediate charges and every new postpaid admission requirement."),
|
|
32
|
+
balance_shortfall_amount: Money.describe("Additional balance needed now. Zero means account funds satisfy this quote. No funds are reserved."),
|
|
33
|
+
required_top_up_amount: Money.describe("Minimum recharge that covers the shortfall, respecting the currency minimum recharge and currency precision. Zero when no additional balance is needed."),
|
|
34
|
+
})
|
|
35
|
+
.describe("Account funding for this purchase, calculated by Billing. Amounts use the enclosing response currency.\nCredit eligibility and all purchase requirements are already evaluated. Nothing is charged or reserved.\nA prepaid purchase may instead use an online payment method.\n");
|
|
@@ -23,6 +23,14 @@
|
|
|
23
23
|
*/
|
|
24
24
|
import * as zod from "zod";
|
|
25
25
|
export declare const Quote: zod.ZodObject<{
|
|
26
|
+
funds: zod.ZodObject<{
|
|
27
|
+
available_balance_amount: zod.ZodString;
|
|
28
|
+
usable_credit_amount: zod.ZodString;
|
|
29
|
+
restricted_credit_amount: zod.ZodString;
|
|
30
|
+
required_balance_amount: zod.ZodString;
|
|
31
|
+
balance_shortfall_amount: zod.ZodString;
|
|
32
|
+
required_top_up_amount: zod.ZodString;
|
|
33
|
+
}, zod.z.core.$strict>;
|
|
26
34
|
funds_sufficient: zod.ZodBoolean;
|
|
27
35
|
items: zod.ZodArray<zod.ZodObject<{
|
|
28
36
|
plan_name: zod.ZodString;
|
|
@@ -22,10 +22,12 @@
|
|
|
22
22
|
* OpenAPI spec version: 1.0.0
|
|
23
23
|
*/
|
|
24
24
|
import * as zod from "zod";
|
|
25
|
+
import { Funds } from "./funds.zod.js";
|
|
25
26
|
import { Money } from "./money.zod.js";
|
|
26
27
|
import { QuoteItem } from "./quoteItem.zod.js";
|
|
27
28
|
export const Quote = zod
|
|
28
29
|
.strictObject({
|
|
30
|
+
funds: Funds,
|
|
29
31
|
funds_sufficient: zod
|
|
30
32
|
.boolean()
|
|
31
33
|
.describe("Whether the account's current balance and eligible credits cover immediate charges\nand the currency's minimum top-up for every new postpaid item. False preserves this\ncomplete price preview. Nothing is reserved; checkout rechecks funds. Prepaid\npurchases may also use an online payment method."),
|
|
@@ -709,6 +709,25 @@ export interface QuoteItem {
|
|
|
709
709
|
total: Money;
|
|
710
710
|
currency: string;
|
|
711
711
|
}
|
|
712
|
+
/**
|
|
713
|
+
* Account funding for this purchase, calculated by Billing. Amounts use the enclosing response currency.
|
|
714
|
+
* Credit eligibility and all purchase requirements are already evaluated. Nothing is charged or reserved.
|
|
715
|
+
* A prepaid purchase may instead use an online payment method.
|
|
716
|
+
*/
|
|
717
|
+
export interface Funds {
|
|
718
|
+
/** Spendable balance after pending returns. */
|
|
719
|
+
available_balance_amount: Money;
|
|
720
|
+
/** Currently effective credits eligible for the quoted purchases or postpaid usage. Each grant is counted once. */
|
|
721
|
+
usable_credit_amount: Money;
|
|
722
|
+
/** Currently effective credits that cannot fund any quoted purchase or postpaid target. Unused eligible credits are not restricted. */
|
|
723
|
+
restricted_credit_amount: Money;
|
|
724
|
+
/** Minimum spendable balance needed after eligible credits, covering immediate charges and every new postpaid admission requirement. */
|
|
725
|
+
required_balance_amount: Money;
|
|
726
|
+
/** Additional balance needed now. Zero means account funds satisfy this quote. No funds are reserved. */
|
|
727
|
+
balance_shortfall_amount: Money;
|
|
728
|
+
/** Minimum recharge that covers the shortfall, respecting the currency minimum recharge and currency precision. Zero when no additional balance is needed. */
|
|
729
|
+
required_top_up_amount: Money;
|
|
730
|
+
}
|
|
712
731
|
export type QuotedDiscountType = (typeof QuotedDiscountType)[keyof typeof QuotedDiscountType];
|
|
713
732
|
export declare const QuotedDiscountType: {
|
|
714
733
|
readonly promotion_code: "promotion_code";
|
|
@@ -812,6 +831,8 @@ export interface OrderRefundQuote {
|
|
|
812
831
|
* provides that order's checkout amount.
|
|
813
832
|
*/
|
|
814
833
|
export interface Quote {
|
|
834
|
+
/** Account funding for an existing-order checkout quote. Absent for usage estimates, refunds and cancellation previews. */
|
|
835
|
+
funds?: Funds;
|
|
815
836
|
subtotal: Money;
|
|
816
837
|
discount_amount: Money;
|
|
817
838
|
tax_amount: Money;
|
|
@@ -1577,6 +1598,7 @@ export interface PaymentPreviewInvoice {
|
|
|
1577
1598
|
* What paying would take, computed as paying computes it. Nothing is charged or reserved.
|
|
1578
1599
|
*/
|
|
1579
1600
|
export interface PaymentPreview {
|
|
1601
|
+
funds?: Funds;
|
|
1580
1602
|
currency: string;
|
|
1581
1603
|
/** What is outstanding before paying. */
|
|
1582
1604
|
amount_due: Money;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval 🍺
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
* Leaflow Membership API
|
|
5
|
+
* Membership tiers and account memberships. Catalog queries support any configured currency; purchases use the billing account currency.
|
|
6
|
+
* OpenAPI spec version: 1.0.0
|
|
7
|
+
*/
|
|
8
|
+
import * as zod from "zod";
|
|
9
|
+
export declare const Funds: zod.ZodObject<{
|
|
10
|
+
available_balance_amount: zod.ZodString;
|
|
11
|
+
usable_credit_amount: zod.ZodString;
|
|
12
|
+
restricted_credit_amount: zod.ZodString;
|
|
13
|
+
required_balance_amount: zod.ZodString;
|
|
14
|
+
balance_shortfall_amount: zod.ZodString;
|
|
15
|
+
required_top_up_amount: zod.ZodString;
|
|
16
|
+
}, zod.z.core.$strict>;
|
|
17
|
+
export type Funds = zod.input<typeof Funds>;
|
|
18
|
+
export type FundsOutput = zod.output<typeof Funds>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval 🍺
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
* Leaflow Membership API
|
|
5
|
+
* Membership tiers and account memberships. Catalog queries support any configured currency; purchases use the billing account currency.
|
|
6
|
+
* OpenAPI spec version: 1.0.0
|
|
7
|
+
*/
|
|
8
|
+
import * as zod from "zod";
|
|
9
|
+
import { Money } from "./money.zod.js";
|
|
10
|
+
export const Funds = zod
|
|
11
|
+
.strictObject({
|
|
12
|
+
available_balance_amount: Money.describe("Spendable balance after pending returns."),
|
|
13
|
+
usable_credit_amount: Money.describe("Currently effective credits eligible for the quoted purchases or postpaid usage. Each grant is counted once."),
|
|
14
|
+
restricted_credit_amount: Money.describe("Currently effective credits that cannot fund any quoted purchase or postpaid target. Unused eligible credits are not restricted."),
|
|
15
|
+
required_balance_amount: Money.describe("Minimum spendable balance needed after eligible credits, covering immediate charges and every new postpaid admission requirement."),
|
|
16
|
+
balance_shortfall_amount: Money.describe("Additional balance needed now. Zero means account funds satisfy this quote. No funds are reserved."),
|
|
17
|
+
required_top_up_amount: Money.describe("Minimum recharge that covers the shortfall, respecting the currency minimum recharge and currency precision. Zero when no additional balance is needed."),
|
|
18
|
+
})
|
|
19
|
+
.describe("Account funding for this purchase, calculated by Billing. Amounts use the enclosing response currency.\nCredit eligibility and all purchase requirements are already evaluated. Nothing is charged or reserved.\nA prepaid purchase may instead use an online payment method.\n");
|
|
@@ -7,6 +7,14 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import * as zod from "zod";
|
|
9
9
|
export declare const PaymentPreview: zod.ZodObject<{
|
|
10
|
+
funds: zod.ZodOptional<zod.ZodObject<{
|
|
11
|
+
available_balance_amount: zod.ZodString;
|
|
12
|
+
usable_credit_amount: zod.ZodString;
|
|
13
|
+
restricted_credit_amount: zod.ZodString;
|
|
14
|
+
required_balance_amount: zod.ZodString;
|
|
15
|
+
balance_shortfall_amount: zod.ZodString;
|
|
16
|
+
required_top_up_amount: zod.ZodString;
|
|
17
|
+
}, zod.z.core.$strict>>;
|
|
10
18
|
currency: zod.ZodString;
|
|
11
19
|
amount_due: zod.ZodString;
|
|
12
20
|
credit_applied: zod.ZodString;
|
|
@@ -7,10 +7,12 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import * as zod from "zod";
|
|
9
9
|
import { AppliedCredit } from "./appliedCredit.zod.js";
|
|
10
|
+
import { Funds } from "./funds.zod.js";
|
|
10
11
|
import { Money } from "./money.zod.js";
|
|
11
12
|
import { PaymentPreviewInvoice } from "./paymentPreviewInvoice.zod.js";
|
|
12
13
|
export const PaymentPreview = zod
|
|
13
14
|
.strictObject({
|
|
15
|
+
funds: Funds.optional(),
|
|
14
16
|
currency: zod.string(),
|
|
15
17
|
amount_due: Money.describe("What is outstanding before paying."),
|
|
16
18
|
credit_applied: Money.describe("What credit grants would pay. Grants restricted to other purchases pay nothing here."),
|
|
@@ -7,6 +7,14 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import * as zod from "zod";
|
|
9
9
|
export declare const Quote: zod.ZodObject<{
|
|
10
|
+
funds: zod.ZodOptional<zod.ZodObject<{
|
|
11
|
+
available_balance_amount: zod.ZodString;
|
|
12
|
+
usable_credit_amount: zod.ZodString;
|
|
13
|
+
restricted_credit_amount: zod.ZodString;
|
|
14
|
+
required_balance_amount: zod.ZodString;
|
|
15
|
+
balance_shortfall_amount: zod.ZodString;
|
|
16
|
+
required_top_up_amount: zod.ZodString;
|
|
17
|
+
}, zod.z.core.$strict>>;
|
|
10
18
|
subtotal: zod.ZodString;
|
|
11
19
|
discount_amount: zod.ZodString;
|
|
12
20
|
tax_amount: zod.ZodString;
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import * as zod from "zod";
|
|
9
9
|
import { CancellationRefundPreview } from "./cancellationRefundPreview.zod.js";
|
|
10
|
+
import { Funds } from "./funds.zod.js";
|
|
10
11
|
import { Money } from "./money.zod.js";
|
|
11
12
|
import { OrderRefundQuote } from "./orderRefundQuote.zod.js";
|
|
12
13
|
import { QuotedDiscount } from "./quotedDiscount.zod.js";
|
|
@@ -14,6 +15,7 @@ import { QuoteItem } from "./quoteItem.zod.js";
|
|
|
14
15
|
import { QuoteRenewalResult } from "./quoteRenewalResult.zod.js";
|
|
15
16
|
export const Quote = zod
|
|
16
17
|
.strictObject({
|
|
18
|
+
funds: Funds.optional().describe("Account funding for an existing-order checkout quote. Absent for usage estimates, refunds and cancellation previews."),
|
|
17
19
|
subtotal: Money,
|
|
18
20
|
discount_amount: Money,
|
|
19
21
|
tax_amount: Money,
|