@leaflow/sdk 0.138.0 → 0.139.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/order/v1/generated/models.d.ts +13 -1
- package/dist/billing/type/order/v1/generated/models.js +7 -0
- package/dist/billing/type/order/v1/generated/validators/subscription.zod.d.ts +7 -1
- package/dist/billing/type/order/v1/generated/validators/subscription.zod.js +5 -1
- package/dist/billing/type/order/v1/generated/validators/subscriptionList.zod.d.ts +7 -1
- package/dist/billing/type/order/v1/generated/validators/subscriptionRestriction.zod.d.ts +17 -0
- package/dist/billing/type/order/v1/generated/validators/subscriptionRestriction.zod.js +17 -0
- package/dist/billing/v1/generated/models.d.ts +13 -1
- package/dist/billing/v1/generated/models.js +7 -0
- package/dist/billing/v1/generated/validators/subscription.zod.d.ts +7 -1
- package/dist/billing/v1/generated/validators/subscription.zod.js +5 -1
- package/dist/billing/v1/generated/validators/subscriptionList.zod.d.ts +7 -1
- package/dist/billing/v1/generated/validators/subscriptionRestriction.zod.d.ts +17 -0
- package/dist/billing/v1/generated/validators/subscriptionRestriction.zod.js +17 -0
- package/dist/canopy/v1/generated/models.d.ts +13 -1
- package/dist/canopy/v1/generated/models.js +7 -0
- package/dist/canopy/v1/generated/validators/subscription.zod.d.ts +7 -1
- package/dist/canopy/v1/generated/validators/subscription.zod.js +5 -1
- package/dist/canopy/v1/generated/validators/subscriptionList.zod.d.ts +7 -1
- package/dist/canopy/v1/generated/validators/subscriptionRestriction.zod.d.ts +40 -0
- package/dist/canopy/v1/generated/validators/subscriptionRestriction.zod.js +40 -0
- package/dist/membership/v1/generated/models.d.ts +13 -1
- package/dist/membership/v1/generated/models.js +7 -0
- package/dist/membership/v1/generated/validators/subscription.zod.d.ts +7 -1
- package/dist/membership/v1/generated/validators/subscription.zod.js +5 -1
- package/dist/membership/v1/generated/validators/subscriptionList.zod.d.ts +7 -1
- package/dist/membership/v1/generated/validators/subscriptionRestriction.zod.d.ts +17 -0
- package/dist/membership/v1/generated/validators/subscriptionRestriction.zod.js +17 -0
- package/package.json +1 -1
|
@@ -1898,6 +1898,17 @@ export declare const SubscriptionInterval: {
|
|
|
1898
1898
|
readonly month: "month";
|
|
1899
1899
|
readonly year: "year";
|
|
1900
1900
|
};
|
|
1901
|
+
/**
|
|
1902
|
+
* An operation Leaflow prevents on a subscription. billing.subscriptions.use stops the service. renew prevents renewal and payment of a renewal order. modify prevents placing a change order. cancel prevents cancellation. terminate prevents immediate termination.
|
|
1903
|
+
*/
|
|
1904
|
+
export type SubscriptionRestriction = (typeof SubscriptionRestriction)[keyof typeof SubscriptionRestriction];
|
|
1905
|
+
export declare const SubscriptionRestriction: {
|
|
1906
|
+
readonly billingsubscriptionsuse: "billing.subscriptions.use";
|
|
1907
|
+
readonly billingsubscriptionsrenew: "billing.subscriptions.renew";
|
|
1908
|
+
readonly billingsubscriptionsmodify: "billing.subscriptions.modify";
|
|
1909
|
+
readonly billingsubscriptionscancel: "billing.subscriptions.cancel";
|
|
1910
|
+
readonly billingsubscriptionsterminate: "billing.subscriptions.terminate";
|
|
1911
|
+
};
|
|
1901
1912
|
/**
|
|
1902
1913
|
* Follows the items. `pending` is not yet accepted and may be unpaid or paid; its invoice shows
|
|
1903
1914
|
* whether payment is still needed, and it can expire or be canceled. `accepted` is accepted with items still
|
|
@@ -2000,7 +2011,8 @@ export interface Subscription {
|
|
|
2000
2011
|
coupon?: ObjectIdentity;
|
|
2001
2012
|
/** @minimum 0 */
|
|
2002
2013
|
discounted_renewals_remaining?: number;
|
|
2003
|
-
|
|
2014
|
+
/** The operations currently prevented on the subscription, sorted. The subscription is suspended while this contains billing.subscriptions.use. */
|
|
2015
|
+
restrictions?: SubscriptionRestriction[];
|
|
2004
2016
|
billing_cycle_anchor?: string;
|
|
2005
2017
|
cancellation?: SubscriptionCancellation;
|
|
2006
2018
|
/** The accepted period-end change currently scheduled for this subscription. Null when no such change exists. */
|
|
@@ -220,6 +220,13 @@ export const SubscriptionInterval = {
|
|
|
220
220
|
month: "month",
|
|
221
221
|
year: "year",
|
|
222
222
|
};
|
|
223
|
+
export const SubscriptionRestriction = {
|
|
224
|
+
billingsubscriptionsuse: "billing.subscriptions.use",
|
|
225
|
+
billingsubscriptionsrenew: "billing.subscriptions.renew",
|
|
226
|
+
billingsubscriptionsmodify: "billing.subscriptions.modify",
|
|
227
|
+
billingsubscriptionscancel: "billing.subscriptions.cancel",
|
|
228
|
+
billingsubscriptionsterminate: "billing.subscriptions.terminate",
|
|
229
|
+
};
|
|
223
230
|
export const OrderStatus = {
|
|
224
231
|
pending: "pending",
|
|
225
232
|
accepted: "accepted",
|
|
@@ -38,7 +38,13 @@ export declare const Subscription: zod.ZodObject<{
|
|
|
38
38
|
name: zod.ZodString;
|
|
39
39
|
}, zod.z.core.$strict>>;
|
|
40
40
|
discounted_renewals_remaining: zod.ZodOptional<zod.ZodInt>;
|
|
41
|
-
|
|
41
|
+
restrictions: zod.ZodOptional<zod.ZodArray<zod.ZodEnum<{
|
|
42
|
+
"billing.subscriptions.use": "billing.subscriptions.use";
|
|
43
|
+
"billing.subscriptions.renew": "billing.subscriptions.renew";
|
|
44
|
+
"billing.subscriptions.modify": "billing.subscriptions.modify";
|
|
45
|
+
"billing.subscriptions.cancel": "billing.subscriptions.cancel";
|
|
46
|
+
"billing.subscriptions.terminate": "billing.subscriptions.terminate";
|
|
47
|
+
}>>>;
|
|
42
48
|
billing_cycle_anchor: zod.ZodOptional<zod.z.ZodISODateTime>;
|
|
43
49
|
cancellation: zod.ZodOptional<zod.ZodObject<{
|
|
44
50
|
reason: zod.ZodOptional<zod.ZodString>;
|
|
@@ -14,6 +14,7 @@ import { ProductID } from "./productID.zod.js";
|
|
|
14
14
|
import { RefundPolicy } from "./refundPolicy.zod.js";
|
|
15
15
|
import { ScheduledChange } from "./scheduledChange.zod.js";
|
|
16
16
|
import { SubscriptionCancellation } from "./subscriptionCancellation.zod.js";
|
|
17
|
+
import { SubscriptionRestriction } from "./subscriptionRestriction.zod.js";
|
|
17
18
|
import { TerminationPolicy } from "./terminationPolicy.zod.js";
|
|
18
19
|
export const subscriptionDiscountedRenewalsRemainingMin = 0;
|
|
19
20
|
export const Subscription = zod
|
|
@@ -35,7 +36,10 @@ export const Subscription = zod
|
|
|
35
36
|
.int()
|
|
36
37
|
.min(subscriptionDiscountedRenewalsRemainingMin)
|
|
37
38
|
.optional(),
|
|
38
|
-
|
|
39
|
+
restrictions: zod
|
|
40
|
+
.array(SubscriptionRestriction)
|
|
41
|
+
.optional()
|
|
42
|
+
.describe("The operations currently prevented on the subscription, sorted. The subscription is suspended while this contains billing.subscriptions.use."),
|
|
39
43
|
billing_cycle_anchor: zod.iso.datetime({ offset: true }).optional(),
|
|
40
44
|
cancellation: SubscriptionCancellation.optional(),
|
|
41
45
|
scheduled_change: zod
|
|
@@ -38,7 +38,13 @@ export declare const SubscriptionList: zod.ZodObject<{
|
|
|
38
38
|
name: zod.ZodString;
|
|
39
39
|
}, zod.z.core.$strict>>;
|
|
40
40
|
discounted_renewals_remaining: zod.ZodOptional<zod.ZodInt>;
|
|
41
|
-
|
|
41
|
+
restrictions: zod.ZodOptional<zod.ZodArray<zod.ZodEnum<{
|
|
42
|
+
"billing.subscriptions.use": "billing.subscriptions.use";
|
|
43
|
+
"billing.subscriptions.renew": "billing.subscriptions.renew";
|
|
44
|
+
"billing.subscriptions.modify": "billing.subscriptions.modify";
|
|
45
|
+
"billing.subscriptions.cancel": "billing.subscriptions.cancel";
|
|
46
|
+
"billing.subscriptions.terminate": "billing.subscriptions.terminate";
|
|
47
|
+
}>>>;
|
|
42
48
|
billing_cycle_anchor: zod.ZodOptional<zod.z.ZodISODateTime>;
|
|
43
49
|
cancellation: zod.ZodOptional<zod.ZodObject<{
|
|
44
50
|
reason: zod.ZodOptional<zod.ZodString>;
|
|
@@ -0,0 +1,17 @@
|
|
|
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 SubscriptionRestriction: zod.ZodEnum<{
|
|
10
|
+
"billing.subscriptions.use": "billing.subscriptions.use";
|
|
11
|
+
"billing.subscriptions.renew": "billing.subscriptions.renew";
|
|
12
|
+
"billing.subscriptions.modify": "billing.subscriptions.modify";
|
|
13
|
+
"billing.subscriptions.cancel": "billing.subscriptions.cancel";
|
|
14
|
+
"billing.subscriptions.terminate": "billing.subscriptions.terminate";
|
|
15
|
+
}>;
|
|
16
|
+
export type SubscriptionRestriction = zod.input<typeof SubscriptionRestriction>;
|
|
17
|
+
export type SubscriptionRestrictionOutput = zod.output<typeof SubscriptionRestriction>;
|
|
@@ -0,0 +1,17 @@
|
|
|
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 const SubscriptionRestriction = zod
|
|
10
|
+
.enum([
|
|
11
|
+
"billing.subscriptions.use",
|
|
12
|
+
"billing.subscriptions.renew",
|
|
13
|
+
"billing.subscriptions.modify",
|
|
14
|
+
"billing.subscriptions.cancel",
|
|
15
|
+
"billing.subscriptions.terminate",
|
|
16
|
+
])
|
|
17
|
+
.describe("An operation Leaflow prevents on a subscription. billing.subscriptions.use stops the service. renew prevents renewal and payment of a renewal order. modify prevents placing a change order. cancel prevents cancellation. terminate prevents immediate termination.");
|
|
@@ -1684,6 +1684,17 @@ export declare const SubscriptionInterval: {
|
|
|
1684
1684
|
readonly month: "month";
|
|
1685
1685
|
readonly year: "year";
|
|
1686
1686
|
};
|
|
1687
|
+
/**
|
|
1688
|
+
* An operation Leaflow prevents on a subscription. billing.subscriptions.use stops the service. renew prevents renewal and payment of a renewal order. modify prevents placing a change order. cancel prevents cancellation. terminate prevents immediate termination.
|
|
1689
|
+
*/
|
|
1690
|
+
export type SubscriptionRestriction = (typeof SubscriptionRestriction)[keyof typeof SubscriptionRestriction];
|
|
1691
|
+
export declare const SubscriptionRestriction: {
|
|
1692
|
+
readonly billingsubscriptionsuse: "billing.subscriptions.use";
|
|
1693
|
+
readonly billingsubscriptionsrenew: "billing.subscriptions.renew";
|
|
1694
|
+
readonly billingsubscriptionsmodify: "billing.subscriptions.modify";
|
|
1695
|
+
readonly billingsubscriptionscancel: "billing.subscriptions.cancel";
|
|
1696
|
+
readonly billingsubscriptionsterminate: "billing.subscriptions.terminate";
|
|
1697
|
+
};
|
|
1687
1698
|
/**
|
|
1688
1699
|
* Follows the items. `pending` is not yet accepted and may be unpaid or paid; its invoice shows
|
|
1689
1700
|
* whether payment is still needed, and it can expire or be canceled. `accepted` is accepted with items still
|
|
@@ -1786,7 +1797,8 @@ export interface Subscription {
|
|
|
1786
1797
|
coupon?: ObjectIdentity;
|
|
1787
1798
|
/** @minimum 0 */
|
|
1788
1799
|
discounted_renewals_remaining?: number;
|
|
1789
|
-
|
|
1800
|
+
/** The operations currently prevented on the subscription, sorted. The subscription is suspended while this contains billing.subscriptions.use. */
|
|
1801
|
+
restrictions?: SubscriptionRestriction[];
|
|
1790
1802
|
billing_cycle_anchor?: string;
|
|
1791
1803
|
cancellation?: SubscriptionCancellation;
|
|
1792
1804
|
/** The accepted period-end change currently scheduled for this subscription. Null when no such change exists. */
|
|
@@ -206,6 +206,13 @@ export const SubscriptionInterval = {
|
|
|
206
206
|
month: "month",
|
|
207
207
|
year: "year",
|
|
208
208
|
};
|
|
209
|
+
export const SubscriptionRestriction = {
|
|
210
|
+
billingsubscriptionsuse: "billing.subscriptions.use",
|
|
211
|
+
billingsubscriptionsrenew: "billing.subscriptions.renew",
|
|
212
|
+
billingsubscriptionsmodify: "billing.subscriptions.modify",
|
|
213
|
+
billingsubscriptionscancel: "billing.subscriptions.cancel",
|
|
214
|
+
billingsubscriptionsterminate: "billing.subscriptions.terminate",
|
|
215
|
+
};
|
|
209
216
|
export const OrderStatus = {
|
|
210
217
|
pending: "pending",
|
|
211
218
|
accepted: "accepted",
|
|
@@ -38,7 +38,13 @@ export declare const Subscription: zod.ZodObject<{
|
|
|
38
38
|
name: zod.ZodString;
|
|
39
39
|
}, zod.z.core.$strict>>;
|
|
40
40
|
discounted_renewals_remaining: zod.ZodOptional<zod.ZodInt>;
|
|
41
|
-
|
|
41
|
+
restrictions: zod.ZodOptional<zod.ZodArray<zod.ZodEnum<{
|
|
42
|
+
"billing.subscriptions.use": "billing.subscriptions.use";
|
|
43
|
+
"billing.subscriptions.renew": "billing.subscriptions.renew";
|
|
44
|
+
"billing.subscriptions.modify": "billing.subscriptions.modify";
|
|
45
|
+
"billing.subscriptions.cancel": "billing.subscriptions.cancel";
|
|
46
|
+
"billing.subscriptions.terminate": "billing.subscriptions.terminate";
|
|
47
|
+
}>>>;
|
|
42
48
|
billing_cycle_anchor: zod.ZodOptional<zod.z.ZodISODateTime>;
|
|
43
49
|
cancellation: zod.ZodOptional<zod.ZodObject<{
|
|
44
50
|
reason: zod.ZodOptional<zod.ZodString>;
|
|
@@ -14,6 +14,7 @@ import { ProductID } from "./productID.zod.js";
|
|
|
14
14
|
import { RefundPolicy } from "./refundPolicy.zod.js";
|
|
15
15
|
import { ScheduledChange } from "./scheduledChange.zod.js";
|
|
16
16
|
import { SubscriptionCancellation } from "./subscriptionCancellation.zod.js";
|
|
17
|
+
import { SubscriptionRestriction } from "./subscriptionRestriction.zod.js";
|
|
17
18
|
import { TerminationPolicy } from "./terminationPolicy.zod.js";
|
|
18
19
|
export const subscriptionDiscountedRenewalsRemainingMin = 0;
|
|
19
20
|
export const Subscription = zod
|
|
@@ -35,7 +36,10 @@ export const Subscription = zod
|
|
|
35
36
|
.int()
|
|
36
37
|
.min(subscriptionDiscountedRenewalsRemainingMin)
|
|
37
38
|
.optional(),
|
|
38
|
-
|
|
39
|
+
restrictions: zod
|
|
40
|
+
.array(SubscriptionRestriction)
|
|
41
|
+
.optional()
|
|
42
|
+
.describe("The operations currently prevented on the subscription, sorted. The subscription is suspended while this contains billing.subscriptions.use."),
|
|
39
43
|
billing_cycle_anchor: zod.iso.datetime({ offset: true }).optional(),
|
|
40
44
|
cancellation: SubscriptionCancellation.optional(),
|
|
41
45
|
scheduled_change: zod
|
|
@@ -38,7 +38,13 @@ export declare const SubscriptionList: zod.ZodObject<{
|
|
|
38
38
|
name: zod.ZodString;
|
|
39
39
|
}, zod.z.core.$strict>>;
|
|
40
40
|
discounted_renewals_remaining: zod.ZodOptional<zod.ZodInt>;
|
|
41
|
-
|
|
41
|
+
restrictions: zod.ZodOptional<zod.ZodArray<zod.ZodEnum<{
|
|
42
|
+
"billing.subscriptions.use": "billing.subscriptions.use";
|
|
43
|
+
"billing.subscriptions.renew": "billing.subscriptions.renew";
|
|
44
|
+
"billing.subscriptions.modify": "billing.subscriptions.modify";
|
|
45
|
+
"billing.subscriptions.cancel": "billing.subscriptions.cancel";
|
|
46
|
+
"billing.subscriptions.terminate": "billing.subscriptions.terminate";
|
|
47
|
+
}>>>;
|
|
42
48
|
billing_cycle_anchor: zod.ZodOptional<zod.z.ZodISODateTime>;
|
|
43
49
|
cancellation: zod.ZodOptional<zod.ZodObject<{
|
|
44
50
|
reason: zod.ZodOptional<zod.ZodString>;
|
|
@@ -0,0 +1,17 @@
|
|
|
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 SubscriptionRestriction: zod.ZodEnum<{
|
|
10
|
+
"billing.subscriptions.use": "billing.subscriptions.use";
|
|
11
|
+
"billing.subscriptions.renew": "billing.subscriptions.renew";
|
|
12
|
+
"billing.subscriptions.modify": "billing.subscriptions.modify";
|
|
13
|
+
"billing.subscriptions.cancel": "billing.subscriptions.cancel";
|
|
14
|
+
"billing.subscriptions.terminate": "billing.subscriptions.terminate";
|
|
15
|
+
}>;
|
|
16
|
+
export type SubscriptionRestriction = zod.input<typeof SubscriptionRestriction>;
|
|
17
|
+
export type SubscriptionRestrictionOutput = zod.output<typeof SubscriptionRestriction>;
|
|
@@ -0,0 +1,17 @@
|
|
|
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 const SubscriptionRestriction = zod
|
|
10
|
+
.enum([
|
|
11
|
+
"billing.subscriptions.use",
|
|
12
|
+
"billing.subscriptions.renew",
|
|
13
|
+
"billing.subscriptions.modify",
|
|
14
|
+
"billing.subscriptions.cancel",
|
|
15
|
+
"billing.subscriptions.terminate",
|
|
16
|
+
])
|
|
17
|
+
.describe("An operation Leaflow prevents on a subscription. billing.subscriptions.use stops the service. renew prevents renewal and payment of a renewal order. modify prevents placing a change order. cancel prevents cancellation. terminate prevents immediate termination.");
|
|
@@ -2371,6 +2371,17 @@ export declare const SubscriptionInterval: {
|
|
|
2371
2371
|
readonly month: "month";
|
|
2372
2372
|
readonly year: "year";
|
|
2373
2373
|
};
|
|
2374
|
+
/**
|
|
2375
|
+
* An operation Leaflow prevents on a subscription. billing.subscriptions.use stops the service. renew prevents renewal and payment of a renewal order. modify prevents placing a change order. cancel prevents cancellation. terminate prevents immediate termination.
|
|
2376
|
+
*/
|
|
2377
|
+
export type SubscriptionRestriction = (typeof SubscriptionRestriction)[keyof typeof SubscriptionRestriction];
|
|
2378
|
+
export declare const SubscriptionRestriction: {
|
|
2379
|
+
readonly billingsubscriptionsuse: "billing.subscriptions.use";
|
|
2380
|
+
readonly billingsubscriptionsrenew: "billing.subscriptions.renew";
|
|
2381
|
+
readonly billingsubscriptionsmodify: "billing.subscriptions.modify";
|
|
2382
|
+
readonly billingsubscriptionscancel: "billing.subscriptions.cancel";
|
|
2383
|
+
readonly billingsubscriptionsterminate: "billing.subscriptions.terminate";
|
|
2384
|
+
};
|
|
2374
2385
|
/**
|
|
2375
2386
|
* Follows the items. `pending` is not yet accepted and may be unpaid or paid; its invoice shows
|
|
2376
2387
|
* whether payment is still needed, and it can expire or be canceled. `accepted` is accepted with items still
|
|
@@ -2473,7 +2484,8 @@ export interface Subscription {
|
|
|
2473
2484
|
coupon?: ObjectIdentity;
|
|
2474
2485
|
/** @minimum 0 */
|
|
2475
2486
|
discounted_renewals_remaining?: number;
|
|
2476
|
-
|
|
2487
|
+
/** The operations currently prevented on the subscription, sorted. The subscription is suspended while this contains billing.subscriptions.use. */
|
|
2488
|
+
restrictions?: SubscriptionRestriction[];
|
|
2477
2489
|
billing_cycle_anchor?: string;
|
|
2478
2490
|
cancellation?: SubscriptionCancellation;
|
|
2479
2491
|
/** The accepted period-end change currently scheduled for this subscription. Null when no such change exists. */
|
|
@@ -269,6 +269,13 @@ export const SubscriptionInterval = {
|
|
|
269
269
|
month: "month",
|
|
270
270
|
year: "year",
|
|
271
271
|
};
|
|
272
|
+
export const SubscriptionRestriction = {
|
|
273
|
+
billingsubscriptionsuse: "billing.subscriptions.use",
|
|
274
|
+
billingsubscriptionsrenew: "billing.subscriptions.renew",
|
|
275
|
+
billingsubscriptionsmodify: "billing.subscriptions.modify",
|
|
276
|
+
billingsubscriptionscancel: "billing.subscriptions.cancel",
|
|
277
|
+
billingsubscriptionsterminate: "billing.subscriptions.terminate",
|
|
278
|
+
};
|
|
272
279
|
export const OrderStatus = {
|
|
273
280
|
pending: "pending",
|
|
274
281
|
accepted: "accepted",
|
|
@@ -61,7 +61,13 @@ export declare const Subscription: zod.ZodObject<{
|
|
|
61
61
|
name: zod.ZodString;
|
|
62
62
|
}, zod.z.core.$strict>>;
|
|
63
63
|
discounted_renewals_remaining: zod.ZodOptional<zod.ZodInt>;
|
|
64
|
-
|
|
64
|
+
restrictions: zod.ZodOptional<zod.ZodArray<zod.ZodEnum<{
|
|
65
|
+
"billing.subscriptions.use": "billing.subscriptions.use";
|
|
66
|
+
"billing.subscriptions.renew": "billing.subscriptions.renew";
|
|
67
|
+
"billing.subscriptions.modify": "billing.subscriptions.modify";
|
|
68
|
+
"billing.subscriptions.cancel": "billing.subscriptions.cancel";
|
|
69
|
+
"billing.subscriptions.terminate": "billing.subscriptions.terminate";
|
|
70
|
+
}>>>;
|
|
65
71
|
billing_cycle_anchor: zod.ZodOptional<zod.z.ZodISODateTime>;
|
|
66
72
|
cancellation: zod.ZodOptional<zod.ZodObject<{
|
|
67
73
|
reason: zod.ZodOptional<zod.ZodString>;
|
|
@@ -37,6 +37,7 @@ import { ProductID } from "./productID.zod.js";
|
|
|
37
37
|
import { RefundPolicy } from "./refundPolicy.zod.js";
|
|
38
38
|
import { ScheduledChange } from "./scheduledChange.zod.js";
|
|
39
39
|
import { SubscriptionCancellation } from "./subscriptionCancellation.zod.js";
|
|
40
|
+
import { SubscriptionRestriction } from "./subscriptionRestriction.zod.js";
|
|
40
41
|
import { TerminationPolicy } from "./terminationPolicy.zod.js";
|
|
41
42
|
export const subscriptionDiscountedRenewalsRemainingMin = 0;
|
|
42
43
|
export const Subscription = zod
|
|
@@ -58,7 +59,10 @@ export const Subscription = zod
|
|
|
58
59
|
.int()
|
|
59
60
|
.min(subscriptionDiscountedRenewalsRemainingMin)
|
|
60
61
|
.optional(),
|
|
61
|
-
|
|
62
|
+
restrictions: zod
|
|
63
|
+
.array(SubscriptionRestriction)
|
|
64
|
+
.optional()
|
|
65
|
+
.describe("The operations currently prevented on the subscription, sorted. The subscription is suspended while this contains billing.subscriptions.use."),
|
|
62
66
|
billing_cycle_anchor: zod.iso.datetime({ offset: true }).optional(),
|
|
63
67
|
cancellation: SubscriptionCancellation.optional(),
|
|
64
68
|
scheduled_change: zod
|
|
@@ -61,7 +61,13 @@ export declare const SubscriptionList: zod.ZodObject<{
|
|
|
61
61
|
name: zod.ZodString;
|
|
62
62
|
}, zod.z.core.$strict>>;
|
|
63
63
|
discounted_renewals_remaining: zod.ZodOptional<zod.ZodInt>;
|
|
64
|
-
|
|
64
|
+
restrictions: zod.ZodOptional<zod.ZodArray<zod.ZodEnum<{
|
|
65
|
+
"billing.subscriptions.use": "billing.subscriptions.use";
|
|
66
|
+
"billing.subscriptions.renew": "billing.subscriptions.renew";
|
|
67
|
+
"billing.subscriptions.modify": "billing.subscriptions.modify";
|
|
68
|
+
"billing.subscriptions.cancel": "billing.subscriptions.cancel";
|
|
69
|
+
"billing.subscriptions.terminate": "billing.subscriptions.terminate";
|
|
70
|
+
}>>>;
|
|
65
71
|
billing_cycle_anchor: zod.ZodOptional<zod.z.ZodISODateTime>;
|
|
66
72
|
cancellation: zod.ZodOptional<zod.ZodObject<{
|
|
67
73
|
reason: zod.ZodOptional<zod.ZodString>;
|
|
@@ -0,0 +1,40 @@
|
|
|
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 SubscriptionRestriction: zod.ZodEnum<{
|
|
33
|
+
"billing.subscriptions.use": "billing.subscriptions.use";
|
|
34
|
+
"billing.subscriptions.renew": "billing.subscriptions.renew";
|
|
35
|
+
"billing.subscriptions.modify": "billing.subscriptions.modify";
|
|
36
|
+
"billing.subscriptions.cancel": "billing.subscriptions.cancel";
|
|
37
|
+
"billing.subscriptions.terminate": "billing.subscriptions.terminate";
|
|
38
|
+
}>;
|
|
39
|
+
export type SubscriptionRestriction = zod.input<typeof SubscriptionRestriction>;
|
|
40
|
+
export type SubscriptionRestrictionOutput = zod.output<typeof SubscriptionRestriction>;
|
|
@@ -0,0 +1,40 @@
|
|
|
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 const SubscriptionRestriction = zod
|
|
33
|
+
.enum([
|
|
34
|
+
"billing.subscriptions.use",
|
|
35
|
+
"billing.subscriptions.renew",
|
|
36
|
+
"billing.subscriptions.modify",
|
|
37
|
+
"billing.subscriptions.cancel",
|
|
38
|
+
"billing.subscriptions.terminate",
|
|
39
|
+
])
|
|
40
|
+
.describe("An operation Leaflow prevents on a subscription. billing.subscriptions.use stops the service. renew prevents renewal and payment of a renewal order. modify prevents placing a change order. cancel prevents cancellation. terminate prevents immediate termination.");
|
|
@@ -2193,6 +2193,17 @@ export declare const SubscriptionInterval: {
|
|
|
2193
2193
|
readonly month: "month";
|
|
2194
2194
|
readonly year: "year";
|
|
2195
2195
|
};
|
|
2196
|
+
/**
|
|
2197
|
+
* An operation Leaflow prevents on a subscription. billing.subscriptions.use stops the service. renew prevents renewal and payment of a renewal order. modify prevents placing a change order. cancel prevents cancellation. terminate prevents immediate termination.
|
|
2198
|
+
*/
|
|
2199
|
+
export type SubscriptionRestriction = (typeof SubscriptionRestriction)[keyof typeof SubscriptionRestriction];
|
|
2200
|
+
export declare const SubscriptionRestriction: {
|
|
2201
|
+
readonly billingsubscriptionsuse: "billing.subscriptions.use";
|
|
2202
|
+
readonly billingsubscriptionsrenew: "billing.subscriptions.renew";
|
|
2203
|
+
readonly billingsubscriptionsmodify: "billing.subscriptions.modify";
|
|
2204
|
+
readonly billingsubscriptionscancel: "billing.subscriptions.cancel";
|
|
2205
|
+
readonly billingsubscriptionsterminate: "billing.subscriptions.terminate";
|
|
2206
|
+
};
|
|
2196
2207
|
/**
|
|
2197
2208
|
* Follows the items. `pending` is not yet accepted and may be unpaid or paid; its invoice shows
|
|
2198
2209
|
* whether payment is still needed, and it can expire or be canceled. `accepted` is accepted with items still
|
|
@@ -2295,7 +2306,8 @@ export interface Subscription {
|
|
|
2295
2306
|
coupon?: ObjectIdentity;
|
|
2296
2307
|
/** @minimum 0 */
|
|
2297
2308
|
discounted_renewals_remaining?: number;
|
|
2298
|
-
|
|
2309
|
+
/** The operations currently prevented on the subscription, sorted. The subscription is suspended while this contains billing.subscriptions.use. */
|
|
2310
|
+
restrictions?: SubscriptionRestriction[];
|
|
2299
2311
|
billing_cycle_anchor?: string;
|
|
2300
2312
|
cancellation?: SubscriptionCancellation;
|
|
2301
2313
|
/** The accepted period-end change currently scheduled for this subscription. Null when no such change exists. */
|
|
@@ -261,6 +261,13 @@ export const SubscriptionInterval = {
|
|
|
261
261
|
month: "month",
|
|
262
262
|
year: "year",
|
|
263
263
|
};
|
|
264
|
+
export const SubscriptionRestriction = {
|
|
265
|
+
billingsubscriptionsuse: "billing.subscriptions.use",
|
|
266
|
+
billingsubscriptionsrenew: "billing.subscriptions.renew",
|
|
267
|
+
billingsubscriptionsmodify: "billing.subscriptions.modify",
|
|
268
|
+
billingsubscriptionscancel: "billing.subscriptions.cancel",
|
|
269
|
+
billingsubscriptionsterminate: "billing.subscriptions.terminate",
|
|
270
|
+
};
|
|
264
271
|
export const OrderStatus = {
|
|
265
272
|
pending: "pending",
|
|
266
273
|
accepted: "accepted",
|
|
@@ -38,7 +38,13 @@ export declare const Subscription: zod.ZodObject<{
|
|
|
38
38
|
name: zod.ZodString;
|
|
39
39
|
}, zod.z.core.$strict>>;
|
|
40
40
|
discounted_renewals_remaining: zod.ZodOptional<zod.ZodInt>;
|
|
41
|
-
|
|
41
|
+
restrictions: zod.ZodOptional<zod.ZodArray<zod.ZodEnum<{
|
|
42
|
+
"billing.subscriptions.use": "billing.subscriptions.use";
|
|
43
|
+
"billing.subscriptions.renew": "billing.subscriptions.renew";
|
|
44
|
+
"billing.subscriptions.modify": "billing.subscriptions.modify";
|
|
45
|
+
"billing.subscriptions.cancel": "billing.subscriptions.cancel";
|
|
46
|
+
"billing.subscriptions.terminate": "billing.subscriptions.terminate";
|
|
47
|
+
}>>>;
|
|
42
48
|
billing_cycle_anchor: zod.ZodOptional<zod.z.ZodISODateTime>;
|
|
43
49
|
cancellation: zod.ZodOptional<zod.ZodObject<{
|
|
44
50
|
reason: zod.ZodOptional<zod.ZodString>;
|
|
@@ -14,6 +14,7 @@ import { ProductID } from "./productID.zod.js";
|
|
|
14
14
|
import { RefundPolicy } from "./refundPolicy.zod.js";
|
|
15
15
|
import { ScheduledChange } from "./scheduledChange.zod.js";
|
|
16
16
|
import { SubscriptionCancellation } from "./subscriptionCancellation.zod.js";
|
|
17
|
+
import { SubscriptionRestriction } from "./subscriptionRestriction.zod.js";
|
|
17
18
|
import { TerminationPolicy } from "./terminationPolicy.zod.js";
|
|
18
19
|
export const subscriptionDiscountedRenewalsRemainingMin = 0;
|
|
19
20
|
export const Subscription = zod
|
|
@@ -35,7 +36,10 @@ export const Subscription = zod
|
|
|
35
36
|
.int()
|
|
36
37
|
.min(subscriptionDiscountedRenewalsRemainingMin)
|
|
37
38
|
.optional(),
|
|
38
|
-
|
|
39
|
+
restrictions: zod
|
|
40
|
+
.array(SubscriptionRestriction)
|
|
41
|
+
.optional()
|
|
42
|
+
.describe("The operations currently prevented on the subscription, sorted. The subscription is suspended while this contains billing.subscriptions.use."),
|
|
39
43
|
billing_cycle_anchor: zod.iso.datetime({ offset: true }).optional(),
|
|
40
44
|
cancellation: SubscriptionCancellation.optional(),
|
|
41
45
|
scheduled_change: zod
|
|
@@ -38,7 +38,13 @@ export declare const SubscriptionList: zod.ZodObject<{
|
|
|
38
38
|
name: zod.ZodString;
|
|
39
39
|
}, zod.z.core.$strict>>;
|
|
40
40
|
discounted_renewals_remaining: zod.ZodOptional<zod.ZodInt>;
|
|
41
|
-
|
|
41
|
+
restrictions: zod.ZodOptional<zod.ZodArray<zod.ZodEnum<{
|
|
42
|
+
"billing.subscriptions.use": "billing.subscriptions.use";
|
|
43
|
+
"billing.subscriptions.renew": "billing.subscriptions.renew";
|
|
44
|
+
"billing.subscriptions.modify": "billing.subscriptions.modify";
|
|
45
|
+
"billing.subscriptions.cancel": "billing.subscriptions.cancel";
|
|
46
|
+
"billing.subscriptions.terminate": "billing.subscriptions.terminate";
|
|
47
|
+
}>>>;
|
|
42
48
|
billing_cycle_anchor: zod.ZodOptional<zod.z.ZodISODateTime>;
|
|
43
49
|
cancellation: zod.ZodOptional<zod.ZodObject<{
|
|
44
50
|
reason: zod.ZodOptional<zod.ZodString>;
|
|
@@ -0,0 +1,17 @@
|
|
|
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 SubscriptionRestriction: zod.ZodEnum<{
|
|
10
|
+
"billing.subscriptions.use": "billing.subscriptions.use";
|
|
11
|
+
"billing.subscriptions.renew": "billing.subscriptions.renew";
|
|
12
|
+
"billing.subscriptions.modify": "billing.subscriptions.modify";
|
|
13
|
+
"billing.subscriptions.cancel": "billing.subscriptions.cancel";
|
|
14
|
+
"billing.subscriptions.terminate": "billing.subscriptions.terminate";
|
|
15
|
+
}>;
|
|
16
|
+
export type SubscriptionRestriction = zod.input<typeof SubscriptionRestriction>;
|
|
17
|
+
export type SubscriptionRestrictionOutput = zod.output<typeof SubscriptionRestriction>;
|
|
@@ -0,0 +1,17 @@
|
|
|
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 const SubscriptionRestriction = zod
|
|
10
|
+
.enum([
|
|
11
|
+
"billing.subscriptions.use",
|
|
12
|
+
"billing.subscriptions.renew",
|
|
13
|
+
"billing.subscriptions.modify",
|
|
14
|
+
"billing.subscriptions.cancel",
|
|
15
|
+
"billing.subscriptions.terminate",
|
|
16
|
+
])
|
|
17
|
+
.describe("An operation Leaflow prevents on a subscription. billing.subscriptions.use stops the service. renew prevents renewal and payment of a renewal order. modify prevents placing a change order. cancel prevents cancellation. terminate prevents immediate termination.");
|