@leaflow/sdk 0.0.0-dev.544.gc6fb74a → 0.0.0-dev.548.ga512fa1
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/checkout/v1/generated/models.d.ts +2 -2
- package/dist/billing/type/checkout/v1/generated/validators/checkoutOptions.zod.js +1 -1
- package/dist/billing/v1/generated/functions.d.ts +2 -2
- package/dist/billing/v1/generated/functions.js +2 -2
- package/dist/billing/v1/generated/models.d.ts +29 -7
- package/dist/billing/v1/generated/schemas.zod.d.ts +2 -2
- package/dist/billing/v1/generated/schemas.zod.js +2 -2
- package/dist/billing/v1/generated/validators/checkoutOptions.zod.js +1 -1
- package/dist/billing/v1/generated/validators/checkoutSession.zod.d.ts +8 -107
- package/dist/billing/v1/generated/validators/checkoutSessionItem.zod.d.ts +1 -0
- package/dist/billing/v1/generated/validators/checkoutSessionItem.zod.js +4 -0
- package/dist/billing/v1/generated/validators/checkoutSessionList.zod.d.ts +8 -107
- package/dist/billing/v1/generated/validators/checkoutSessionResult.zod.d.ts +9 -107
- package/dist/billing/v1/generated/validators/checkoutSessionSubscription.zod.d.ts +1 -0
- package/dist/billing/v1/generated/validators/discount.zod.js +1 -1
- package/dist/billing/v1/generated/validators/invoiceItem.zod.js +4 -1
- package/dist/billing/v1/generated/validators/order.zod.d.ts +1 -0
- package/dist/billing/v1/generated/validators/orderItem.zod.d.ts +1 -0
- package/dist/billing/v1/generated/validators/orderItem.zod.js +4 -0
- package/dist/billing/v1/generated/validators/orderItemList.zod.d.ts +1 -0
- package/dist/billing/v1/generated/validators/orderList.zod.d.ts +1 -0
- package/dist/billing/v1/generated/validators/plan.zod.d.ts +1 -0
- package/dist/billing/v1/generated/validators/plan.zod.js +4 -0
- package/dist/billing/v1/generated/validators/planList.zod.d.ts +1 -0
- package/dist/billing/v1/generated/validators/scheduledChange.zod.d.ts +1 -0
- package/dist/billing/v1/generated/validators/scheduledChange.zod.js +4 -0
- package/dist/billing/v1/generated/validators/subscription.zod.d.ts +2 -0
- package/dist/billing/v1/generated/validators/subscriptionItem.zod.d.ts +2 -0
- package/dist/billing/v1/generated/validators/subscriptionItem.zod.js +4 -0
- package/dist/billing/v1/generated/validators/subscriptionList.zod.d.ts +2 -0
- package/dist/billing/v1/generated/validators/trialEndBehavior.zod.js +1 -1
- package/dist/billing/v1/generated/validators/trialGrant.zod.d.ts +7 -107
- package/dist/billing/v1/generated/validators/trialGrantList.zod.d.ts +7 -107
- package/dist/billing/v1/generated/validators/trialOffer.zod.d.ts +7 -107
- package/dist/billing/v1/generated/validators/trialOffer.zod.js +5 -3
- package/dist/billing/v1/generated/validators/trialOfferItem.zod.d.ts +19 -0
- package/dist/billing/v1/generated/validators/trialOfferItem.zod.js +21 -0
- package/dist/canopy/v1/generated/models.d.ts +2 -2
- package/dist/canopy/v1/generated/validators/checkoutOptions.zod.js +1 -1
- package/dist/compute/v2/generated/functions.d.ts +6 -6
- package/dist/compute/v2/generated/functions.js +6 -6
- package/dist/compute/v2/generated/models.d.ts +2 -2
- package/dist/compute/v2/generated/schemas.zod.d.ts +6 -6
- package/dist/compute/v2/generated/schemas.zod.js +6 -6
- package/dist/compute/v2/generated/validators/checkoutOptions.zod.js +1 -1
- package/dist/membership/v1/generated/models.d.ts +2 -2
- package/dist/membership/v1/generated/validators/checkoutOptions.zod.js +1 -1
- package/package.json +1 -1
|
@@ -33,7 +33,10 @@ export const InvoiceItem = zod.strictObject({
|
|
|
33
33
|
.describe("The project the charge was for and its current name. Absent when the line has no project or the project cannot be read; `project_id` still identifies it."),
|
|
34
34
|
resource_id: zod.string().optional(),
|
|
35
35
|
description: zod.string().describe("The line's wording as recorded when the invoice was issued."),
|
|
36
|
-
unit: zod
|
|
36
|
+
unit: zod
|
|
37
|
+
.string()
|
|
38
|
+
.optional()
|
|
39
|
+
.describe("What `quantity` counts: the plan's unit label for a licensed purchase line, such as GiB, or the meter's unit for a usage line. Empty when there is none."),
|
|
37
40
|
quantity: zod.string().optional(),
|
|
38
41
|
deducted_quantity: zod
|
|
39
42
|
.string()
|
|
@@ -129,6 +129,7 @@ export declare const Order: zod.ZodObject<{
|
|
|
129
129
|
plan_id: zod.ZodUUID;
|
|
130
130
|
plan_name: zod.ZodString;
|
|
131
131
|
quantity: zod.ZodString;
|
|
132
|
+
unit_label: zod.ZodOptional<zod.ZodString>;
|
|
132
133
|
unit_amount: zod.ZodOptional<zod.ZodString>;
|
|
133
134
|
gross_amount: zod.ZodOptional<zod.ZodString>;
|
|
134
135
|
discount_amount: zod.ZodOptional<zod.ZodString>;
|
|
@@ -58,6 +58,7 @@ export declare const OrderItem: zod.ZodObject<{
|
|
|
58
58
|
plan_id: zod.ZodUUID;
|
|
59
59
|
plan_name: zod.ZodString;
|
|
60
60
|
quantity: zod.ZodString;
|
|
61
|
+
unit_label: zod.ZodOptional<zod.ZodString>;
|
|
61
62
|
unit_amount: zod.ZodOptional<zod.ZodString>;
|
|
62
63
|
gross_amount: zod.ZodOptional<zod.ZodString>;
|
|
63
64
|
discount_amount: zod.ZodOptional<zod.ZodString>;
|
|
@@ -74,6 +74,10 @@ export const OrderItem = zod
|
|
|
74
74
|
plan_id: zod.uuid().describe("Which plan was bought."),
|
|
75
75
|
plan_name: zod.string().describe("The name when bought."),
|
|
76
76
|
quantity: zod.string(),
|
|
77
|
+
unit_label: zod
|
|
78
|
+
.string()
|
|
79
|
+
.optional()
|
|
80
|
+
.describe("The plan's unit label when the line was placed, which a licensed line's quantity counts, such as GiB or Mbps. Absent for a metered line and when the plan had none."),
|
|
77
81
|
unit_amount: Money.optional().describe("The unit amount of the price the line is charged under. Absent for a tiered price, and for an immediate change, which is charged as `gross_amount` describes."),
|
|
78
82
|
gross_amount: Money.optional().describe("Before discounts and setup fees: the price applied to the quantity, `unit_amount` times `quantity` for a per-\nunit price, raised by any minimum charge. For an immediate upgrade it is the new price for the rest of the\npaid period minus the amount paid for that time; a downgrade, or a change between equal period prices, charges\nnothing.\n\nUnder an inclusive tax rate it includes tax, shown in `tax_included_amount`, except for a renewal at agreed\nterms, whose amount excludes tax."),
|
|
79
83
|
discount_amount: Money.optional().describe("The reduction on this line, from the order's coupon and, for a renewal at agreed terms, from the subscription's carried discount. With a carried discount, `gross_amount` is `unit_amount` times `quantity`, except when the renewal order also uses an account coupon or the tax rate is inclusive: then `gross_amount` is the agreed amount, which already reflects the carried discount."),
|
|
@@ -58,6 +58,7 @@ export declare const OrderItemList: zod.ZodObject<{
|
|
|
58
58
|
plan_id: zod.ZodUUID;
|
|
59
59
|
plan_name: zod.ZodString;
|
|
60
60
|
quantity: zod.ZodString;
|
|
61
|
+
unit_label: zod.ZodOptional<zod.ZodString>;
|
|
61
62
|
unit_amount: zod.ZodOptional<zod.ZodString>;
|
|
62
63
|
gross_amount: zod.ZodOptional<zod.ZodString>;
|
|
63
64
|
discount_amount: zod.ZodOptional<zod.ZodString>;
|
|
@@ -130,6 +130,7 @@ export declare const OrderList: zod.ZodObject<{
|
|
|
130
130
|
plan_id: zod.ZodUUID;
|
|
131
131
|
plan_name: zod.ZodString;
|
|
132
132
|
quantity: zod.ZodString;
|
|
133
|
+
unit_label: zod.ZodOptional<zod.ZodString>;
|
|
133
134
|
unit_amount: zod.ZodOptional<zod.ZodString>;
|
|
134
135
|
gross_amount: zod.ZodOptional<zod.ZodString>;
|
|
135
136
|
discount_amount: zod.ZodOptional<zod.ZodString>;
|
|
@@ -26,6 +26,7 @@ export declare const Plan: zod.ZodObject<{
|
|
|
26
26
|
product_id: zod.ZodString;
|
|
27
27
|
name: zod.ZodString;
|
|
28
28
|
description: zod.ZodOptional<zod.ZodString>;
|
|
29
|
+
unit_label: zod.ZodOptional<zod.ZodString>;
|
|
29
30
|
}, zod.z.core.$strict>;
|
|
30
31
|
export type Plan = zod.input<typeof Plan>;
|
|
31
32
|
export type PlanOutput = zod.output<typeof Plan>;
|
|
@@ -20,4 +20,8 @@ export const Plan = zod.strictObject({
|
|
|
20
20
|
product_id: ProductId,
|
|
21
21
|
name: zod.string(),
|
|
22
22
|
description: zod.string().optional(),
|
|
23
|
+
unit_label: zod
|
|
24
|
+
.string()
|
|
25
|
+
.optional()
|
|
26
|
+
.describe("What a licensed quantity of the plan counts, as shown next to it, such as GiB or Mbps. Absent when the plan has none. Metered usage is measured in its meter's unit instead."),
|
|
23
27
|
});
|
|
@@ -27,6 +27,7 @@ export declare const PlanList: zod.ZodObject<{
|
|
|
27
27
|
product_id: zod.ZodString;
|
|
28
28
|
name: zod.ZodString;
|
|
29
29
|
description: zod.ZodOptional<zod.ZodString>;
|
|
30
|
+
unit_label: zod.ZodOptional<zod.ZodString>;
|
|
30
31
|
}, zod.z.core.$strict>>;
|
|
31
32
|
pagination: zod.ZodObject<{
|
|
32
33
|
page: zod.ZodInt;
|
|
@@ -21,6 +21,7 @@ export declare const ScheduledChange: zod.ZodObject<{
|
|
|
21
21
|
plan_name: zod.ZodString;
|
|
22
22
|
price_id: zod.ZodUUID;
|
|
23
23
|
quantity: zod.ZodString;
|
|
24
|
+
unit_label: zod.ZodOptional<zod.ZodString>;
|
|
24
25
|
recurring_amount: zod.ZodString;
|
|
25
26
|
currency: zod.ZodString;
|
|
26
27
|
interval: zod.ZodEnum<{
|
|
@@ -18,6 +18,10 @@ export const ScheduledChange = zod
|
|
|
18
18
|
plan_name: zod.string(),
|
|
19
19
|
price_id: zod.uuid(),
|
|
20
20
|
quantity: zod.string(),
|
|
21
|
+
unit_label: zod
|
|
22
|
+
.string()
|
|
23
|
+
.optional()
|
|
24
|
+
.describe("The plan's unit label when the change was placed, which a licensed quantity counts, such as GiB or Mbps. Absent for a metered item and when the plan had none."),
|
|
21
25
|
recurring_amount: zod.string().describe("The target licensed renewal amount before tax."),
|
|
22
26
|
currency: zod.string(),
|
|
23
27
|
interval: zod.enum(["day", "month", "year"]),
|
|
@@ -83,6 +83,7 @@ export declare const Subscription: zod.ZodObject<{
|
|
|
83
83
|
}>;
|
|
84
84
|
dimensions: zod.ZodRecord<zod.ZodString, zod.ZodString>;
|
|
85
85
|
quantity: zod.ZodString;
|
|
86
|
+
unit_label: zod.ZodOptional<zod.ZodString>;
|
|
86
87
|
recurring_amount: zod.ZodOptional<zod.ZodString>;
|
|
87
88
|
renewal_discounts_enabled: zod.ZodOptional<zod.ZodBoolean>;
|
|
88
89
|
cancellation_policy: zod.ZodOptional<zod.ZodEnum<{
|
|
@@ -147,6 +148,7 @@ export declare const Subscription: zod.ZodObject<{
|
|
|
147
148
|
plan_name: zod.ZodString;
|
|
148
149
|
price_id: zod.ZodUUID;
|
|
149
150
|
quantity: zod.ZodString;
|
|
151
|
+
unit_label: zod.ZodOptional<zod.ZodString>;
|
|
150
152
|
recurring_amount: zod.ZodString;
|
|
151
153
|
currency: zod.ZodString;
|
|
152
154
|
interval: zod.ZodEnum<{
|
|
@@ -23,6 +23,7 @@ export declare const SubscriptionItem: zod.ZodObject<{
|
|
|
23
23
|
}>;
|
|
24
24
|
dimensions: zod.ZodRecord<zod.ZodString, zod.ZodString>;
|
|
25
25
|
quantity: zod.ZodString;
|
|
26
|
+
unit_label: zod.ZodOptional<zod.ZodString>;
|
|
26
27
|
recurring_amount: zod.ZodOptional<zod.ZodString>;
|
|
27
28
|
renewal_discounts_enabled: zod.ZodOptional<zod.ZodBoolean>;
|
|
28
29
|
cancellation_policy: zod.ZodOptional<zod.ZodEnum<{
|
|
@@ -87,6 +88,7 @@ export declare const SubscriptionItem: zod.ZodObject<{
|
|
|
87
88
|
plan_name: zod.ZodString;
|
|
88
89
|
price_id: zod.ZodUUID;
|
|
89
90
|
quantity: zod.ZodString;
|
|
91
|
+
unit_label: zod.ZodOptional<zod.ZodString>;
|
|
90
92
|
recurring_amount: zod.ZodString;
|
|
91
93
|
currency: zod.ZodString;
|
|
92
94
|
interval: zod.ZodEnum<{
|
|
@@ -27,6 +27,10 @@ export const SubscriptionItem = zod
|
|
|
27
27
|
.record(zod.string(), zod.string())
|
|
28
28
|
.describe("The dimension values of what was bought, such as region and instance type. Empty when the purchase gave none."),
|
|
29
29
|
quantity: zod.string(),
|
|
30
|
+
unit_label: zod
|
|
31
|
+
.string()
|
|
32
|
+
.optional()
|
|
33
|
+
.describe("The plan's current unit label, which a licensed item's quantity counts, such as GiB or Mbps. Absent for a metered item and when the plan has none."),
|
|
30
34
|
recurring_amount: zod
|
|
31
35
|
.string()
|
|
32
36
|
.optional()
|
|
@@ -84,6 +84,7 @@ export declare const SubscriptionList: zod.ZodObject<{
|
|
|
84
84
|
}>;
|
|
85
85
|
dimensions: zod.ZodRecord<zod.ZodString, zod.ZodString>;
|
|
86
86
|
quantity: zod.ZodString;
|
|
87
|
+
unit_label: zod.ZodOptional<zod.ZodString>;
|
|
87
88
|
recurring_amount: zod.ZodOptional<zod.ZodString>;
|
|
88
89
|
renewal_discounts_enabled: zod.ZodOptional<zod.ZodBoolean>;
|
|
89
90
|
cancellation_policy: zod.ZodOptional<zod.ZodEnum<{
|
|
@@ -148,6 +149,7 @@ export declare const SubscriptionList: zod.ZodObject<{
|
|
|
148
149
|
plan_name: zod.ZodString;
|
|
149
150
|
price_id: zod.ZodUUID;
|
|
150
151
|
quantity: zod.ZodString;
|
|
152
|
+
unit_label: zod.ZodOptional<zod.ZodString>;
|
|
151
153
|
recurring_amount: zod.ZodString;
|
|
152
154
|
currency: zod.ZodString;
|
|
153
155
|
interval: zod.ZodEnum<{
|
|
@@ -13,5 +13,5 @@ export const TrialEndBehavior = zod.strictObject({
|
|
|
13
13
|
retention_seconds: zod
|
|
14
14
|
.int()
|
|
15
15
|
.nullable()
|
|
16
|
-
.describe("How long a subscription stopped at the end of its trial keeps its resources before they are reclaimed; null for the platform's retention period."),
|
|
16
|
+
.describe("How long a subscription stopped at the end of its trial keeps its resources before they are reclaimed; null for the platform's retention period. Must be null with `cancel`, which releases the resources when the trial ends."),
|
|
17
17
|
});
|
|
@@ -24,115 +24,15 @@ export declare const TrialGrant: zod.ZodObject<{
|
|
|
24
24
|
retention_seconds: zod.ZodNullable<zod.ZodInt>;
|
|
25
25
|
}, zod.z.core.$strict>;
|
|
26
26
|
}, zod.z.core.$strict>;
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
name: zod.ZodString;
|
|
31
|
-
description: zod.ZodOptional<zod.ZodString>;
|
|
32
|
-
}, zod.z.core.$strict>>>;
|
|
33
|
-
plans: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
|
|
34
|
-
id: zod.ZodUUID;
|
|
35
|
-
name: zod.ZodString;
|
|
36
|
-
active: zod.ZodBoolean;
|
|
37
|
-
}, zod.z.core.$strict>>>;
|
|
38
|
-
prices: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
|
|
39
|
-
product: zod.ZodObject<{
|
|
40
|
-
id: zod.ZodString;
|
|
41
|
-
name: zod.ZodString;
|
|
42
|
-
description: zod.ZodOptional<zod.ZodString>;
|
|
43
|
-
}, zod.z.core.$strict>;
|
|
44
|
-
plan: zod.ZodObject<{
|
|
45
|
-
lookup_key: zod.ZodOptional<zod.ZodString>;
|
|
46
|
-
id: zod.ZodUUID;
|
|
47
|
-
name: zod.ZodString;
|
|
48
|
-
}, zod.z.core.$strict>;
|
|
49
|
-
billing_scheme: zod.ZodOptional<zod.ZodEnum<{
|
|
50
|
-
per_unit: "per_unit";
|
|
51
|
-
tiered: "tiered";
|
|
52
|
-
}>>;
|
|
53
|
-
unit_quantity: zod.ZodString;
|
|
54
|
-
id: zod.ZodUUID;
|
|
55
|
-
currency: zod.ZodString;
|
|
56
|
-
type: zod.ZodEnum<{
|
|
57
|
-
one_time: "one_time";
|
|
58
|
-
recurring: "recurring";
|
|
59
|
-
}>;
|
|
60
|
-
usage_type: zod.ZodEnum<{
|
|
61
|
-
licensed: "licensed";
|
|
62
|
-
metered: "metered";
|
|
63
|
-
}>;
|
|
64
|
-
interval: zod.ZodEnum<{
|
|
65
|
-
none: "none";
|
|
66
|
-
day: "day";
|
|
67
|
-
month: "month";
|
|
68
|
-
year: "year";
|
|
69
|
-
}>;
|
|
70
|
-
interval_count: zod.ZodOptional<zod.ZodInt>;
|
|
71
|
-
unit_amount: zod.ZodOptional<zod.ZodString>;
|
|
72
|
-
active: zod.ZodBoolean;
|
|
73
|
-
}, zod.z.core.$strict>>>;
|
|
74
|
-
price_types: zod.ZodOptional<zod.ZodArray<zod.ZodEnum<{
|
|
75
|
-
one_time: "one_time";
|
|
76
|
-
recurring: "recurring";
|
|
77
|
-
}>>>;
|
|
78
|
-
usage_types: zod.ZodOptional<zod.ZodArray<zod.ZodEnum<{
|
|
79
|
-
licensed: "licensed";
|
|
80
|
-
metered: "metered";
|
|
81
|
-
}>>>;
|
|
82
|
-
operations: zod.ZodOptional<zod.ZodArray<zod.ZodEnum<{
|
|
83
|
-
new: "new";
|
|
84
|
-
renew: "renew";
|
|
85
|
-
modify: "modify";
|
|
86
|
-
}>>>;
|
|
87
|
-
min_term_months: zod.ZodOptional<zod.ZodInt>;
|
|
88
|
-
max_term_months: zod.ZodOptional<zod.ZodInt>;
|
|
89
|
-
excluded_products: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
|
|
90
|
-
id: zod.ZodString;
|
|
91
|
-
name: zod.ZodString;
|
|
92
|
-
description: zod.ZodOptional<zod.ZodString>;
|
|
93
|
-
}, zod.z.core.$strict>>>;
|
|
94
|
-
excluded_plans: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
|
|
27
|
+
items: zod.ZodArray<zod.ZodObject<{
|
|
28
|
+
plan: zod.ZodObject<{
|
|
29
|
+
lookup_key: zod.ZodOptional<zod.ZodString>;
|
|
95
30
|
id: zod.ZodUUID;
|
|
96
31
|
name: zod.ZodString;
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
id: zod.ZodString;
|
|
102
|
-
name: zod.ZodString;
|
|
103
|
-
description: zod.ZodOptional<zod.ZodString>;
|
|
104
|
-
}, zod.z.core.$strict>;
|
|
105
|
-
plan: zod.ZodObject<{
|
|
106
|
-
lookup_key: zod.ZodOptional<zod.ZodString>;
|
|
107
|
-
id: zod.ZodUUID;
|
|
108
|
-
name: zod.ZodString;
|
|
109
|
-
}, zod.z.core.$strict>;
|
|
110
|
-
billing_scheme: zod.ZodOptional<zod.ZodEnum<{
|
|
111
|
-
per_unit: "per_unit";
|
|
112
|
-
tiered: "tiered";
|
|
113
|
-
}>>;
|
|
114
|
-
unit_quantity: zod.ZodString;
|
|
115
|
-
id: zod.ZodUUID;
|
|
116
|
-
currency: zod.ZodString;
|
|
117
|
-
type: zod.ZodEnum<{
|
|
118
|
-
one_time: "one_time";
|
|
119
|
-
recurring: "recurring";
|
|
120
|
-
}>;
|
|
121
|
-
usage_type: zod.ZodEnum<{
|
|
122
|
-
licensed: "licensed";
|
|
123
|
-
metered: "metered";
|
|
124
|
-
}>;
|
|
125
|
-
interval: zod.ZodEnum<{
|
|
126
|
-
none: "none";
|
|
127
|
-
day: "day";
|
|
128
|
-
month: "month";
|
|
129
|
-
year: "year";
|
|
130
|
-
}>;
|
|
131
|
-
interval_count: zod.ZodOptional<zod.ZodInt>;
|
|
132
|
-
unit_amount: zod.ZodOptional<zod.ZodString>;
|
|
133
|
-
active: zod.ZodBoolean;
|
|
134
|
-
}, zod.z.core.$strict>>>;
|
|
135
|
-
}, zod.z.core.$strict>;
|
|
32
|
+
}, zod.z.core.$strict>;
|
|
33
|
+
max_quantity: zod.ZodString;
|
|
34
|
+
unit_label: zod.ZodOptional<zod.ZodString>;
|
|
35
|
+
}, zod.z.core.$strict>>;
|
|
136
36
|
}, zod.z.core.$strict>;
|
|
137
37
|
status: zod.ZodEnum<{
|
|
138
38
|
scheduled: "scheduled";
|
|
@@ -25,115 +25,15 @@ export declare const TrialGrantList: zod.ZodObject<{
|
|
|
25
25
|
retention_seconds: zod.ZodNullable<zod.ZodInt>;
|
|
26
26
|
}, zod.z.core.$strict>;
|
|
27
27
|
}, zod.z.core.$strict>;
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
name: zod.ZodString;
|
|
32
|
-
description: zod.ZodOptional<zod.ZodString>;
|
|
33
|
-
}, zod.z.core.$strict>>>;
|
|
34
|
-
plans: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
|
|
35
|
-
id: zod.ZodUUID;
|
|
36
|
-
name: zod.ZodString;
|
|
37
|
-
active: zod.ZodBoolean;
|
|
38
|
-
}, zod.z.core.$strict>>>;
|
|
39
|
-
prices: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
|
|
40
|
-
product: zod.ZodObject<{
|
|
41
|
-
id: zod.ZodString;
|
|
42
|
-
name: zod.ZodString;
|
|
43
|
-
description: zod.ZodOptional<zod.ZodString>;
|
|
44
|
-
}, zod.z.core.$strict>;
|
|
45
|
-
plan: zod.ZodObject<{
|
|
46
|
-
lookup_key: zod.ZodOptional<zod.ZodString>;
|
|
47
|
-
id: zod.ZodUUID;
|
|
48
|
-
name: zod.ZodString;
|
|
49
|
-
}, zod.z.core.$strict>;
|
|
50
|
-
billing_scheme: zod.ZodOptional<zod.ZodEnum<{
|
|
51
|
-
per_unit: "per_unit";
|
|
52
|
-
tiered: "tiered";
|
|
53
|
-
}>>;
|
|
54
|
-
unit_quantity: zod.ZodString;
|
|
55
|
-
id: zod.ZodUUID;
|
|
56
|
-
currency: zod.ZodString;
|
|
57
|
-
type: zod.ZodEnum<{
|
|
58
|
-
one_time: "one_time";
|
|
59
|
-
recurring: "recurring";
|
|
60
|
-
}>;
|
|
61
|
-
usage_type: zod.ZodEnum<{
|
|
62
|
-
licensed: "licensed";
|
|
63
|
-
metered: "metered";
|
|
64
|
-
}>;
|
|
65
|
-
interval: zod.ZodEnum<{
|
|
66
|
-
none: "none";
|
|
67
|
-
day: "day";
|
|
68
|
-
month: "month";
|
|
69
|
-
year: "year";
|
|
70
|
-
}>;
|
|
71
|
-
interval_count: zod.ZodOptional<zod.ZodInt>;
|
|
72
|
-
unit_amount: zod.ZodOptional<zod.ZodString>;
|
|
73
|
-
active: zod.ZodBoolean;
|
|
74
|
-
}, zod.z.core.$strict>>>;
|
|
75
|
-
price_types: zod.ZodOptional<zod.ZodArray<zod.ZodEnum<{
|
|
76
|
-
one_time: "one_time";
|
|
77
|
-
recurring: "recurring";
|
|
78
|
-
}>>>;
|
|
79
|
-
usage_types: zod.ZodOptional<zod.ZodArray<zod.ZodEnum<{
|
|
80
|
-
licensed: "licensed";
|
|
81
|
-
metered: "metered";
|
|
82
|
-
}>>>;
|
|
83
|
-
operations: zod.ZodOptional<zod.ZodArray<zod.ZodEnum<{
|
|
84
|
-
new: "new";
|
|
85
|
-
renew: "renew";
|
|
86
|
-
modify: "modify";
|
|
87
|
-
}>>>;
|
|
88
|
-
min_term_months: zod.ZodOptional<zod.ZodInt>;
|
|
89
|
-
max_term_months: zod.ZodOptional<zod.ZodInt>;
|
|
90
|
-
excluded_products: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
|
|
91
|
-
id: zod.ZodString;
|
|
92
|
-
name: zod.ZodString;
|
|
93
|
-
description: zod.ZodOptional<zod.ZodString>;
|
|
94
|
-
}, zod.z.core.$strict>>>;
|
|
95
|
-
excluded_plans: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
|
|
28
|
+
items: zod.ZodArray<zod.ZodObject<{
|
|
29
|
+
plan: zod.ZodObject<{
|
|
30
|
+
lookup_key: zod.ZodOptional<zod.ZodString>;
|
|
96
31
|
id: zod.ZodUUID;
|
|
97
32
|
name: zod.ZodString;
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
id: zod.ZodString;
|
|
103
|
-
name: zod.ZodString;
|
|
104
|
-
description: zod.ZodOptional<zod.ZodString>;
|
|
105
|
-
}, zod.z.core.$strict>;
|
|
106
|
-
plan: zod.ZodObject<{
|
|
107
|
-
lookup_key: zod.ZodOptional<zod.ZodString>;
|
|
108
|
-
id: zod.ZodUUID;
|
|
109
|
-
name: zod.ZodString;
|
|
110
|
-
}, zod.z.core.$strict>;
|
|
111
|
-
billing_scheme: zod.ZodOptional<zod.ZodEnum<{
|
|
112
|
-
per_unit: "per_unit";
|
|
113
|
-
tiered: "tiered";
|
|
114
|
-
}>>;
|
|
115
|
-
unit_quantity: zod.ZodString;
|
|
116
|
-
id: zod.ZodUUID;
|
|
117
|
-
currency: zod.ZodString;
|
|
118
|
-
type: zod.ZodEnum<{
|
|
119
|
-
one_time: "one_time";
|
|
120
|
-
recurring: "recurring";
|
|
121
|
-
}>;
|
|
122
|
-
usage_type: zod.ZodEnum<{
|
|
123
|
-
licensed: "licensed";
|
|
124
|
-
metered: "metered";
|
|
125
|
-
}>;
|
|
126
|
-
interval: zod.ZodEnum<{
|
|
127
|
-
none: "none";
|
|
128
|
-
day: "day";
|
|
129
|
-
month: "month";
|
|
130
|
-
year: "year";
|
|
131
|
-
}>;
|
|
132
|
-
interval_count: zod.ZodOptional<zod.ZodInt>;
|
|
133
|
-
unit_amount: zod.ZodOptional<zod.ZodString>;
|
|
134
|
-
active: zod.ZodBoolean;
|
|
135
|
-
}, zod.z.core.$strict>>>;
|
|
136
|
-
}, zod.z.core.$strict>;
|
|
33
|
+
}, zod.z.core.$strict>;
|
|
34
|
+
max_quantity: zod.ZodString;
|
|
35
|
+
unit_label: zod.ZodOptional<zod.ZodString>;
|
|
36
|
+
}, zod.z.core.$strict>>;
|
|
137
37
|
}, zod.z.core.$strict>;
|
|
138
38
|
status: zod.ZodEnum<{
|
|
139
39
|
scheduled: "scheduled";
|
|
@@ -22,115 +22,15 @@ export declare const TrialOffer: zod.ZodObject<{
|
|
|
22
22
|
retention_seconds: zod.ZodNullable<zod.ZodInt>;
|
|
23
23
|
}, zod.z.core.$strict>;
|
|
24
24
|
}, zod.z.core.$strict>;
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
name: zod.ZodString;
|
|
29
|
-
description: zod.ZodOptional<zod.ZodString>;
|
|
30
|
-
}, zod.z.core.$strict>>>;
|
|
31
|
-
plans: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
|
|
32
|
-
id: zod.ZodUUID;
|
|
33
|
-
name: zod.ZodString;
|
|
34
|
-
active: zod.ZodBoolean;
|
|
35
|
-
}, zod.z.core.$strict>>>;
|
|
36
|
-
prices: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
|
|
37
|
-
product: zod.ZodObject<{
|
|
38
|
-
id: zod.ZodString;
|
|
39
|
-
name: zod.ZodString;
|
|
40
|
-
description: zod.ZodOptional<zod.ZodString>;
|
|
41
|
-
}, zod.z.core.$strict>;
|
|
42
|
-
plan: zod.ZodObject<{
|
|
43
|
-
lookup_key: zod.ZodOptional<zod.ZodString>;
|
|
44
|
-
id: zod.ZodUUID;
|
|
45
|
-
name: zod.ZodString;
|
|
46
|
-
}, zod.z.core.$strict>;
|
|
47
|
-
billing_scheme: zod.ZodOptional<zod.ZodEnum<{
|
|
48
|
-
per_unit: "per_unit";
|
|
49
|
-
tiered: "tiered";
|
|
50
|
-
}>>;
|
|
51
|
-
unit_quantity: zod.ZodString;
|
|
52
|
-
id: zod.ZodUUID;
|
|
53
|
-
currency: zod.ZodString;
|
|
54
|
-
type: zod.ZodEnum<{
|
|
55
|
-
one_time: "one_time";
|
|
56
|
-
recurring: "recurring";
|
|
57
|
-
}>;
|
|
58
|
-
usage_type: zod.ZodEnum<{
|
|
59
|
-
licensed: "licensed";
|
|
60
|
-
metered: "metered";
|
|
61
|
-
}>;
|
|
62
|
-
interval: zod.ZodEnum<{
|
|
63
|
-
none: "none";
|
|
64
|
-
day: "day";
|
|
65
|
-
month: "month";
|
|
66
|
-
year: "year";
|
|
67
|
-
}>;
|
|
68
|
-
interval_count: zod.ZodOptional<zod.ZodInt>;
|
|
69
|
-
unit_amount: zod.ZodOptional<zod.ZodString>;
|
|
70
|
-
active: zod.ZodBoolean;
|
|
71
|
-
}, zod.z.core.$strict>>>;
|
|
72
|
-
price_types: zod.ZodOptional<zod.ZodArray<zod.ZodEnum<{
|
|
73
|
-
one_time: "one_time";
|
|
74
|
-
recurring: "recurring";
|
|
75
|
-
}>>>;
|
|
76
|
-
usage_types: zod.ZodOptional<zod.ZodArray<zod.ZodEnum<{
|
|
77
|
-
licensed: "licensed";
|
|
78
|
-
metered: "metered";
|
|
79
|
-
}>>>;
|
|
80
|
-
operations: zod.ZodOptional<zod.ZodArray<zod.ZodEnum<{
|
|
81
|
-
new: "new";
|
|
82
|
-
renew: "renew";
|
|
83
|
-
modify: "modify";
|
|
84
|
-
}>>>;
|
|
85
|
-
min_term_months: zod.ZodOptional<zod.ZodInt>;
|
|
86
|
-
max_term_months: zod.ZodOptional<zod.ZodInt>;
|
|
87
|
-
excluded_products: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
|
|
88
|
-
id: zod.ZodString;
|
|
89
|
-
name: zod.ZodString;
|
|
90
|
-
description: zod.ZodOptional<zod.ZodString>;
|
|
91
|
-
}, zod.z.core.$strict>>>;
|
|
92
|
-
excluded_plans: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
|
|
25
|
+
items: zod.ZodArray<zod.ZodObject<{
|
|
26
|
+
plan: zod.ZodObject<{
|
|
27
|
+
lookup_key: zod.ZodOptional<zod.ZodString>;
|
|
93
28
|
id: zod.ZodUUID;
|
|
94
29
|
name: zod.ZodString;
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
id: zod.ZodString;
|
|
100
|
-
name: zod.ZodString;
|
|
101
|
-
description: zod.ZodOptional<zod.ZodString>;
|
|
102
|
-
}, zod.z.core.$strict>;
|
|
103
|
-
plan: zod.ZodObject<{
|
|
104
|
-
lookup_key: zod.ZodOptional<zod.ZodString>;
|
|
105
|
-
id: zod.ZodUUID;
|
|
106
|
-
name: zod.ZodString;
|
|
107
|
-
}, zod.z.core.$strict>;
|
|
108
|
-
billing_scheme: zod.ZodOptional<zod.ZodEnum<{
|
|
109
|
-
per_unit: "per_unit";
|
|
110
|
-
tiered: "tiered";
|
|
111
|
-
}>>;
|
|
112
|
-
unit_quantity: zod.ZodString;
|
|
113
|
-
id: zod.ZodUUID;
|
|
114
|
-
currency: zod.ZodString;
|
|
115
|
-
type: zod.ZodEnum<{
|
|
116
|
-
one_time: "one_time";
|
|
117
|
-
recurring: "recurring";
|
|
118
|
-
}>;
|
|
119
|
-
usage_type: zod.ZodEnum<{
|
|
120
|
-
licensed: "licensed";
|
|
121
|
-
metered: "metered";
|
|
122
|
-
}>;
|
|
123
|
-
interval: zod.ZodEnum<{
|
|
124
|
-
none: "none";
|
|
125
|
-
day: "day";
|
|
126
|
-
month: "month";
|
|
127
|
-
year: "year";
|
|
128
|
-
}>;
|
|
129
|
-
interval_count: zod.ZodOptional<zod.ZodInt>;
|
|
130
|
-
unit_amount: zod.ZodOptional<zod.ZodString>;
|
|
131
|
-
active: zod.ZodBoolean;
|
|
132
|
-
}, zod.z.core.$strict>>>;
|
|
133
|
-
}, zod.z.core.$strict>;
|
|
30
|
+
}, zod.z.core.$strict>;
|
|
31
|
+
max_quantity: zod.ZodString;
|
|
32
|
+
unit_label: zod.ZodOptional<zod.ZodString>;
|
|
33
|
+
}, zod.z.core.$strict>>;
|
|
134
34
|
}, zod.z.core.$strict>;
|
|
135
35
|
export type TrialOffer = zod.input<typeof TrialOffer>;
|
|
136
36
|
export type TrialOfferOutput = zod.output<typeof TrialOffer>;
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* OpenAPI spec version: v1
|
|
7
7
|
*/
|
|
8
8
|
import * as zod from "zod";
|
|
9
|
-
import {
|
|
9
|
+
import { TrialOfferItem } from "./trialOfferItem.zod.js";
|
|
10
10
|
import { TrialSettings } from "./trialSettings.zod.js";
|
|
11
11
|
export const trialOfferTrialPeriodDaysMax = 730;
|
|
12
12
|
export const TrialOffer = zod
|
|
@@ -16,6 +16,8 @@ export const TrialOffer = zod
|
|
|
16
16
|
description: zod.string(),
|
|
17
17
|
trial_period_days: zod.int().min(1).max(trialOfferTrialPeriodDaysMax),
|
|
18
18
|
trial_settings: TrialSettings,
|
|
19
|
-
|
|
19
|
+
items: zod
|
|
20
|
+
.array(TrialOfferItem)
|
|
21
|
+
.describe("The plans a subscription on the trial may hold. An offer without items applies to no purchase."),
|
|
20
22
|
})
|
|
21
|
-
.describe("The terms of a free trial. The licensed items of the subscription it is used for are free for `trial_period_days`, while metered usage is charged as usual. When the trial ends it converts to paid if automatic renewal is on; otherwise `trial_settings` applies.");
|
|
23
|
+
.describe("The terms of a free trial. The licensed items of the subscription it is used for are free for `trial_period_days`, while metered usage is charged as usual. The subscription holds only the listed plans and no more of each than its `max_quantity`, both when it is bought and while the trial lasts. When the trial ends it converts to paid if automatic renewal is on; otherwise `trial_settings` applies.");
|
|
@@ -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. Operations on a billing account require an account access token. The account, its balance, payment options and checkout previews are also readable by members of the projects it currently pays for; changing the account and moving its funds need the owner. Members of a project, as each operation states, can also read the project's billing account, subscriptions and orders, complete and pay for its purchases, preview the checkout of purchases, changes and renewals, preview cancellations, and, with the project permission `billing:finance.manage` granted in IAM, renew, cancel and turn automatic renewal of its subscriptions on or off, change its billing account and read its costs. A member without the permission an operation needs is refused with 403 `PERMISSION_DENIED` and `meta.permission`; a caller who is not a member, with 403 `IAM_NOT_PROJECT_MEMBER`. Public catalogue operations declare no security requirement.
|
|
6
|
+
* OpenAPI spec version: v1
|
|
7
|
+
*/
|
|
8
|
+
import * as zod from "zod";
|
|
9
|
+
export declare const TrialOfferItem: zod.ZodObject<{
|
|
10
|
+
plan: zod.ZodObject<{
|
|
11
|
+
lookup_key: zod.ZodOptional<zod.ZodString>;
|
|
12
|
+
id: zod.ZodUUID;
|
|
13
|
+
name: zod.ZodString;
|
|
14
|
+
}, zod.z.core.$strict>;
|
|
15
|
+
max_quantity: zod.ZodString;
|
|
16
|
+
unit_label: zod.ZodOptional<zod.ZodString>;
|
|
17
|
+
}, zod.z.core.$strict>;
|
|
18
|
+
export type TrialOfferItem = zod.input<typeof TrialOfferItem>;
|
|
19
|
+
export type TrialOfferItemOutput = zod.output<typeof TrialOfferItem>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval 🍺
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
* Leaflow Billing API
|
|
5
|
+
* Products, prices, orders, subscriptions and account billing. Operations on a billing account require an account access token. The account, its balance, payment options and checkout previews are also readable by members of the projects it currently pays for; changing the account and moving its funds need the owner. Members of a project, as each operation states, can also read the project's billing account, subscriptions and orders, complete and pay for its purchases, preview the checkout of purchases, changes and renewals, preview cancellations, and, with the project permission `billing:finance.manage` granted in IAM, renew, cancel and turn automatic renewal of its subscriptions on or off, change its billing account and read its costs. A member without the permission an operation needs is refused with 403 `PERMISSION_DENIED` and `meta.permission`; a caller who is not a member, with 403 `IAM_NOT_PROJECT_MEMBER`. Public catalogue operations declare no security requirement.
|
|
6
|
+
* OpenAPI spec version: v1
|
|
7
|
+
*/
|
|
8
|
+
import * as zod from "zod";
|
|
9
|
+
import { ObjectIdentity } from "./objectIdentity.zod.js";
|
|
10
|
+
export const TrialOfferItem = zod
|
|
11
|
+
.strictObject({
|
|
12
|
+
plan: ObjectIdentity.describe("The plan, which may since have been archived."),
|
|
13
|
+
max_quantity: zod
|
|
14
|
+
.string()
|
|
15
|
+
.describe("The most the subscription's licensed items of this plan may hold together, in the plan's quantity unit, such as gibibytes of storage or megabits per second of bandwidth. Metered items of the plan are charged as usual and do not count towards it."),
|
|
16
|
+
unit_label: zod
|
|
17
|
+
.string()
|
|
18
|
+
.optional()
|
|
19
|
+
.describe("The plan's unit label, which `max_quantity` counts, such as GiB or Mbps. Absent when the plan has none."),
|
|
20
|
+
})
|
|
21
|
+
.describe("A plan a subscription on the trial may hold, and how much of it.");
|
|
@@ -984,8 +984,8 @@ export interface CheckoutOptions {
|
|
|
984
984
|
auto_renew?: boolean;
|
|
985
985
|
/**
|
|
986
986
|
* A free trial grant of the paying billing account that the customer chose to use. The first new
|
|
987
|
-
* subscription of the purchase whose lines the grant's offer
|
|
988
|
-
* no trial of its own, opens with the offer's free trial. Accepted only in automatic mode; with deferred it is refused with
|
|
987
|
+
* subscription of the purchase whose lines are all of plans the grant's offer lists, within each plan's
|
|
988
|
+
* max_quantity, and that has a licensed line and no trial of its own, opens with the offer's free trial. Accepted only in automatic mode; with deferred it is refused with
|
|
989
989
|
* HTTP 400, and the grant is chosen when completing the checkout through Billing. Refused with
|
|
990
990
|
* BILLING_TRIAL_GRANT_INAPPLICABLE when no subscription qualifies or the grant cannot be used now.
|
|
991
991
|
*/
|
|
@@ -72,6 +72,6 @@ export const CheckoutOptions = zod
|
|
|
72
72
|
trial_grant_id: zod
|
|
73
73
|
.uuid()
|
|
74
74
|
.optional()
|
|
75
|
-
.describe("A free trial grant of the paying billing account that the customer chose to use. The first new\nsubscription of the purchase whose lines the grant's offer
|
|
75
|
+
.describe("A free trial grant of the paying billing account that the customer chose to use. The first new\nsubscription of the purchase whose lines are all of plans the grant's offer lists, within each plan's\nmax_quantity, and that has a licensed line and no trial of its own, opens with the offer's free trial. Accepted only in automatic mode; with deferred it is refused with\nHTTP 400, and the grant is chosen when completing the checkout through Billing. Refused with\nBILLING_TRIAL_GRANT_INAPPLICABLE when no subscription qualifies or the grant cannot be used now."),
|
|
76
76
|
})
|
|
77
77
|
.describe("Shared checkout choices for a product purchase. The service may set them or forward its client's\nchoices unchanged; it does not need to read them, and Billing validates them. Omitting this object or\nmode selects automatic checkout. Each purchase creates its own Checkout Session. Promotion codes are supplied\nonly to Billing. A service may retain a failed creation record when Billing refuses a purchase; no\ninfrastructure is created for that refusal.");
|