@leaflow/sdk 0.175.0 → 0.177.1
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/canopy/v1/generated/models.d.ts +209 -9
- package/dist/canopy/v1/generated/models.js +27 -1
- package/dist/canopy/v1/generated/schemas.zod.d.ts +1 -1
- package/dist/canopy/v1/generated/schemas.zod.js +3 -1
- package/dist/canopy/v1/generated/validators/aPIKeyUsageListResponseBody.zod.d.ts +9 -0
- package/dist/canopy/v1/generated/validators/aPIKeyUsageResource.zod.d.ts +9 -0
- package/dist/canopy/v1/generated/validators/aPIKeyUsageResource.zod.js +5 -0
- package/dist/canopy/v1/generated/validators/audioCapabilities.zod.d.ts +51 -0
- package/dist/canopy/v1/generated/validators/audioCapabilities.zod.js +67 -0
- package/dist/canopy/v1/generated/validators/cursorPageRequestResource.zod.d.ts +10 -1
- package/dist/canopy/v1/generated/validators/endpointCapabilities.zod.d.ts +37 -0
- package/dist/canopy/v1/generated/validators/endpointCapabilities.zod.js +20 -0
- package/dist/canopy/v1/generated/validators/imageCapabilities.zod.d.ts +52 -0
- package/dist/canopy/v1/generated/validators/imageCapabilities.zod.js +69 -0
- package/dist/canopy/v1/generated/validators/mediaUsage.zod.d.ts +52 -0
- package/dist/canopy/v1/generated/validators/mediaUsage.zod.js +61 -0
- package/dist/canopy/v1/generated/validators/model.zod.d.ts +50 -0
- package/dist/canopy/v1/generated/validators/modelBilling.zod.d.ts +8 -1
- package/dist/canopy/v1/generated/validators/modelBilling.zod.js +2 -2
- package/dist/canopy/v1/generated/validators/modelCapabilities.zod.d.ts +37 -0
- package/dist/canopy/v1/generated/validators/modelEndpoint.zod.d.ts +13 -0
- package/dist/canopy/v1/generated/validators/modelEndpoint.zod.js +13 -0
- package/dist/canopy/v1/generated/validators/modelList.zod.d.ts +50 -0
- package/dist/canopy/v1/generated/validators/modelListResponseBody.zod.d.ts +58 -1
- package/dist/canopy/v1/generated/validators/modelMeter.zod.d.ts +8 -1
- package/dist/canopy/v1/generated/validators/modelMeter.zod.js +21 -2
- package/dist/canopy/v1/generated/validators/modelParameter.zod.d.ts +58 -0
- package/dist/canopy/v1/generated/validators/modelParameter.zod.js +57 -0
- package/dist/canopy/v1/generated/validators/modelResource.zod.d.ts +58 -1
- package/dist/canopy/v1/generated/validators/modelUsageListResponseBody.zod.d.ts +9 -0
- package/dist/canopy/v1/generated/validators/modelUsageResource.zod.d.ts +9 -0
- package/dist/canopy/v1/generated/validators/modelUsageResource.zod.js +5 -0
- package/dist/canopy/v1/generated/validators/requestResource.zod.d.ts +10 -1
- package/dist/canopy/v1/generated/validators/requestResource.zod.js +8 -1
- package/dist/canopy/v1/generated/validators/totalsResource.zod.d.ts +9 -0
- package/dist/canopy/v1/generated/validators/totalsResource.zod.js +5 -0
- package/dist/canopy/v1/generated/validators/usageBucketResource.zod.d.ts +9 -0
- package/dist/canopy/v1/generated/validators/usageBucketResource.zod.js +5 -0
- package/dist/canopy/v1/generated/validators/usageTimelineResponseBody.zod.d.ts +9 -0
- package/dist/canopy/v1/generated/validators/videoCapabilities.zod.d.ts +51 -0
- package/dist/canopy/v1/generated/validators/videoCapabilities.zod.js +69 -0
- package/dist/eventbus/v1/generated/functions.d.ts +336 -0
- package/dist/eventbus/v1/generated/functions.js +214 -0
- package/dist/eventbus/v1/generated/models.d.ts +364 -0
- package/dist/eventbus/v1/generated/models.js +8 -0
- package/dist/eventbus/v1/generated/schemas.zod.d.ts +138 -0
- package/dist/eventbus/v1/generated/schemas.zod.js +163 -0
- package/dist/eventbus/v1/generated/validators/createEventRequest.zod.d.ts +50 -0
- package/dist/eventbus/v1/generated/validators/createEventRequest.zod.js +59 -0
- package/dist/eventbus/v1/generated/validators/createVersionRequest.zod.d.ts +46 -0
- package/dist/eventbus/v1/generated/validators/createVersionRequest.zod.js +47 -0
- package/dist/eventbus/v1/generated/validators/cursorPagination.zod.d.ts +45 -0
- package/dist/eventbus/v1/generated/validators/cursorPagination.zod.js +45 -0
- package/dist/eventbus/v1/generated/validators/error.zod.d.ts +56 -0
- package/dist/eventbus/v1/generated/validators/error.zod.js +45 -0
- package/dist/eventbus/v1/generated/validators/errorStatus.zod.d.ts +54 -0
- package/dist/eventbus/v1/generated/validators/errorStatus.zod.js +69 -0
- package/dist/eventbus/v1/generated/validators/eventDetail.zod.d.ts +65 -0
- package/dist/eventbus/v1/generated/validators/eventDetail.zod.js +62 -0
- package/dist/eventbus/v1/generated/validators/eventList.zod.d.ts +58 -0
- package/dist/eventbus/v1/generated/validators/eventList.zod.js +50 -0
- package/dist/eventbus/v1/generated/validators/eventResource.zod.d.ts +55 -0
- package/dist/eventbus/v1/generated/validators/eventResource.zod.js +60 -0
- package/dist/eventbus/v1/generated/validators/eventStatus.zod.d.ts +45 -0
- package/dist/eventbus/v1/generated/validators/eventStatus.zod.js +42 -0
- package/dist/eventbus/v1/generated/validators/eventVersion.zod.d.ts +51 -0
- package/dist/eventbus/v1/generated/validators/eventVersion.zod.js +53 -0
- package/dist/eventbus/v1/generated/validators/fieldViolation.zod.d.ts +45 -0
- package/dist/eventbus/v1/generated/validators/fieldViolation.zod.js +48 -0
- package/dist/eventbus/v1/generated/validators/listEventsParams.zod.d.ts +55 -0
- package/dist/eventbus/v1/generated/validators/listEventsParams.zod.js +57 -0
- package/dist/eventbus/v1/generated/validators/offsetPagination.zod.d.ts +47 -0
- package/dist/eventbus/v1/generated/validators/offsetPagination.zod.js +47 -0
- package/dist/eventbus/v1/generated/validators/publishRequest.zod.d.ts +49 -0
- package/dist/eventbus/v1/generated/validators/publishRequest.zod.js +55 -0
- package/dist/eventbus/v1/generated/validators/publishResponse.zod.d.ts +47 -0
- package/dist/eventbus/v1/generated/validators/publishResponse.zod.js +47 -0
- package/dist/eventbus/v1/generated/validators/realtimeTicket.zod.d.ts +46 -0
- package/dist/eventbus/v1/generated/validators/realtimeTicket.zod.js +46 -0
- package/dist/eventbus/v1/generated/validators/updateEventRequest.zod.d.ts +51 -0
- package/dist/eventbus/v1/generated/validators/updateEventRequest.zod.js +54 -0
- package/dist/eventbus/v1/index.d.ts +3 -0
- package/dist/eventbus/v1/index.js +3 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/routes.d.ts +64 -0
- package/dist/routes.js +72 -0
- package/dist/swas/v1/generated/models.d.ts +18 -12
- package/dist/swas/v1/generated/schemas.zod.d.ts +0 -4
- package/dist/swas/v1/generated/validators/catalog.zod.d.ts +2 -2
- package/dist/swas/v1/generated/validators/instance.zod.d.ts +1 -1
- package/dist/swas/v1/generated/validators/instanceList.zod.d.ts +1 -1
- package/dist/swas/v1/generated/validators/instancePrice.zod.d.ts +2 -1
- package/dist/swas/v1/generated/validators/instancePrice.zod.js +7 -2
- package/dist/swas/v1/generated/validators/plan.zod.d.ts +2 -2
- package/dist/swas/v1/generated/validators/price.zod.d.ts +2 -1
- package/dist/swas/v1/generated/validators/price.zod.js +7 -2
- package/dist/swas/v1/generated/validators/priceOption.zod.d.ts +2 -1
- package/dist/swas/v1/generated/validators/priceOption.zod.js +8 -3
- package/dist/swas/v1/generated/validators/purchase.zod.js +1 -1
- package/dist/swas/v1/generated/validators/purchaseCreate.zod.d.ts +0 -4
- package/dist/swas/v1/generated/validators/purchaseCreate.zod.js +1 -3
- package/package.json +1 -1
- package/dist/swas/v1/generated/validators/expectedQuote.zod.d.ts +0 -14
- package/dist/swas/v1/generated/validators/expectedQuote.zod.js +0 -13
package/dist/routes.js
CHANGED
|
@@ -3102,6 +3102,78 @@ export const routes = [
|
|
|
3102
3102
|
securityScheme: "ScopedToken",
|
|
3103
3103
|
upstreamUrl: "https://dns.leaflow.cloud",
|
|
3104
3104
|
},
|
|
3105
|
+
{
|
|
3106
|
+
service: "eventbus",
|
|
3107
|
+
contract: "eventbus",
|
|
3108
|
+
method: "GET",
|
|
3109
|
+
path: "/api/v1/events",
|
|
3110
|
+
operationId: "list-events",
|
|
3111
|
+
securityScheme: "ScopedToken",
|
|
3112
|
+
upstreamUrl: "https://eventbus.leaflow.cloud",
|
|
3113
|
+
},
|
|
3114
|
+
{
|
|
3115
|
+
service: "eventbus",
|
|
3116
|
+
contract: "eventbus",
|
|
3117
|
+
method: "POST",
|
|
3118
|
+
path: "/api/v1/events",
|
|
3119
|
+
operationId: "create-event",
|
|
3120
|
+
securityScheme: "ScopedToken",
|
|
3121
|
+
upstreamUrl: "https://eventbus.leaflow.cloud",
|
|
3122
|
+
},
|
|
3123
|
+
{
|
|
3124
|
+
service: "eventbus",
|
|
3125
|
+
contract: "eventbus",
|
|
3126
|
+
method: "GET",
|
|
3127
|
+
path: "/api/v1/events/{eventName}",
|
|
3128
|
+
operationId: "get-event",
|
|
3129
|
+
securityScheme: "ScopedToken",
|
|
3130
|
+
upstreamUrl: "https://eventbus.leaflow.cloud",
|
|
3131
|
+
},
|
|
3132
|
+
{
|
|
3133
|
+
service: "eventbus",
|
|
3134
|
+
contract: "eventbus",
|
|
3135
|
+
method: "PATCH",
|
|
3136
|
+
path: "/api/v1/events/{eventName}",
|
|
3137
|
+
operationId: "update-event",
|
|
3138
|
+
securityScheme: "ScopedToken",
|
|
3139
|
+
upstreamUrl: "https://eventbus.leaflow.cloud",
|
|
3140
|
+
},
|
|
3141
|
+
{
|
|
3142
|
+
service: "eventbus",
|
|
3143
|
+
contract: "eventbus",
|
|
3144
|
+
method: "POST",
|
|
3145
|
+
path: "/api/v1/events/{eventName}/versions",
|
|
3146
|
+
operationId: "create-event-version",
|
|
3147
|
+
securityScheme: "ScopedToken",
|
|
3148
|
+
upstreamUrl: "https://eventbus.leaflow.cloud",
|
|
3149
|
+
},
|
|
3150
|
+
{
|
|
3151
|
+
service: "eventbus",
|
|
3152
|
+
contract: "eventbus",
|
|
3153
|
+
method: "GET",
|
|
3154
|
+
path: "/api/v1/events/{eventName}/versions/{version}",
|
|
3155
|
+
operationId: "get-event-version",
|
|
3156
|
+
securityScheme: "ScopedToken",
|
|
3157
|
+
upstreamUrl: "https://eventbus.leaflow.cloud",
|
|
3158
|
+
},
|
|
3159
|
+
{
|
|
3160
|
+
service: "eventbus",
|
|
3161
|
+
contract: "eventbus",
|
|
3162
|
+
method: "POST",
|
|
3163
|
+
path: "/api/v1/events/{eventName}:publish",
|
|
3164
|
+
operationId: "publish-event",
|
|
3165
|
+
securityScheme: "ScopedToken",
|
|
3166
|
+
upstreamUrl: "https://eventbus.leaflow.cloud",
|
|
3167
|
+
},
|
|
3168
|
+
{
|
|
3169
|
+
service: "eventbus",
|
|
3170
|
+
contract: "eventbus",
|
|
3171
|
+
method: "POST",
|
|
3172
|
+
path: "/api/v1/realtime/tickets",
|
|
3173
|
+
operationId: "create-realtime-ticket",
|
|
3174
|
+
securityScheme: "ScopedToken",
|
|
3175
|
+
upstreamUrl: "https://eventbus.leaflow.cloud",
|
|
3176
|
+
},
|
|
3105
3177
|
{
|
|
3106
3178
|
service: "iam",
|
|
3107
3179
|
contract: "iam",
|
|
@@ -21,10 +21,6 @@ export type Money = string;
|
|
|
21
21
|
* A non-negative decimal amount with at most 15 integer digits and 10 fractional digits.
|
|
22
22
|
*/
|
|
23
23
|
export type DecimalAmount = Money & string;
|
|
24
|
-
export interface ExpectedQuote {
|
|
25
|
-
currency: "USD";
|
|
26
|
-
amount: DecimalAmount;
|
|
27
|
-
}
|
|
28
24
|
export interface PurchaseCreate {
|
|
29
25
|
/**
|
|
30
26
|
* @minimum 1
|
|
@@ -37,7 +33,7 @@ export interface PurchaseCreate {
|
|
|
37
33
|
*/
|
|
38
34
|
provider_plan_id: string;
|
|
39
35
|
/**
|
|
40
|
-
* Selects a price from the requested plan and current catalog revision. The server resolves its immutable Billing terms, billing period and ownership; the client does not set the billing period.
|
|
36
|
+
* Selects a price from the requested plan and current catalog revision. The server resolves its immutable Billing terms, billing period and ownership; the client does not set the billing period. SWAS validates the Price selection only. Billing owns quotes, checkout confirmation and payment.
|
|
41
37
|
* @pattern ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
|
|
42
38
|
*/
|
|
43
39
|
billing_price_id: string;
|
|
@@ -47,8 +43,6 @@ export interface PurchaseCreate {
|
|
|
47
43
|
*/
|
|
48
44
|
image_id: string;
|
|
49
45
|
quantity: 1;
|
|
50
|
-
/** An assertion about the displayed quote, not an authoritative amount. The server obtains a new Billing quote and rejects a mismatch before accepting a purchase. */
|
|
51
|
-
expected_quote: ExpectedQuote;
|
|
52
46
|
/**
|
|
53
47
|
* @minLength 1
|
|
54
48
|
* @maxLength 128
|
|
@@ -73,7 +67,7 @@ export declare const PurchaseState: {
|
|
|
73
67
|
readonly provider_rejected: "provider_rejected";
|
|
74
68
|
};
|
|
75
69
|
/**
|
|
76
|
-
* Durable purchase progress. delivered and billing_settled describe different facts
|
|
70
|
+
* Durable purchase progress. The checkout_session_id identifies the Billing session for user quote, confirmation and payment. It is not ready while checkout creation is pending. SWAS does not quote or charge automatically. delivered and billing_settled describe different facts; acceptance is not delivery.
|
|
77
71
|
*/
|
|
78
72
|
export interface Purchase {
|
|
79
73
|
/** @pattern ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$ */
|
|
@@ -99,7 +93,11 @@ export interface Price {
|
|
|
99
93
|
/** @pattern ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$ */
|
|
100
94
|
billing_price_id: string;
|
|
101
95
|
currency: "USD";
|
|
102
|
-
|
|
96
|
+
/**
|
|
97
|
+
* Historical display metadata only. New responses omit this field; use Billing for quotes.
|
|
98
|
+
* @deprecated
|
|
99
|
+
*/
|
|
100
|
+
amount?: DecimalAmount;
|
|
103
101
|
period_months: PricePeriodMonths;
|
|
104
102
|
}
|
|
105
103
|
export type PriceOptionPeriodMonths = (typeof PriceOptionPeriodMonths)[keyof typeof PriceOptionPeriodMonths];
|
|
@@ -112,7 +110,7 @@ export declare const PriceOptionPeriodMonths: {
|
|
|
112
110
|
readonly NUMBER_36: 36;
|
|
113
111
|
};
|
|
114
112
|
/**
|
|
115
|
-
* A verified price option for one billing period. Its Billing price must currently be available, use period-end cancellation without an automatic refund, and match this provider plan and region. Archived snapshots, unknown periods and unverified prices are excluded. Selection does not bypass current permissions,
|
|
113
|
+
* A verified price option for one billing period. Its Billing price must currently be available, use period-end cancellation without an automatic refund, and match this provider plan and region. Archived snapshots, unknown periods and unverified prices are excluded. Selection does not bypass current permissions, Price validation or disabled purchase controls. Billing owns quotes and checkout amounts.
|
|
116
114
|
*/
|
|
117
115
|
export interface PriceOption {
|
|
118
116
|
/** @pattern ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$ */
|
|
@@ -120,7 +118,11 @@ export interface PriceOption {
|
|
|
120
118
|
/** @pattern ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$ */
|
|
121
119
|
billing_price_id: string;
|
|
122
120
|
currency: "USD";
|
|
123
|
-
|
|
121
|
+
/**
|
|
122
|
+
* Historical display metadata only. New responses omit this field; use Billing for quotes.
|
|
123
|
+
* @deprecated
|
|
124
|
+
*/
|
|
125
|
+
amount?: DecimalAmount;
|
|
124
126
|
period_months: PriceOptionPeriodMonths;
|
|
125
127
|
}
|
|
126
128
|
export interface Plan {
|
|
@@ -229,7 +231,11 @@ export declare const InstancePricePeriodMonths: {
|
|
|
229
231
|
};
|
|
230
232
|
export interface InstancePrice {
|
|
231
233
|
currency: "USD";
|
|
232
|
-
|
|
234
|
+
/**
|
|
235
|
+
* Historical display metadata only. Price-only purchases omit this field; use Billing for quotes.
|
|
236
|
+
* @deprecated
|
|
237
|
+
*/
|
|
238
|
+
amount?: DecimalAmount;
|
|
233
239
|
period_months: InstancePricePeriodMonths;
|
|
234
240
|
}
|
|
235
241
|
export declare const InstanceCapabilitiesValue: {
|
|
@@ -30,10 +30,6 @@ export declare const CreatePurchaseBody: zod.ZodObject<{
|
|
|
30
30
|
billing_price_id: zod.ZodUUID;
|
|
31
31
|
image_id: zod.ZodString;
|
|
32
32
|
quantity: zod.ZodLiteral<1>;
|
|
33
|
-
expected_quote: zod.ZodObject<{
|
|
34
|
-
currency: zod.ZodLiteral<"USD">;
|
|
35
|
-
amount: zod.ZodIntersection<zod.ZodString, zod.ZodString>;
|
|
36
|
-
}, zod.z.core.$strict>;
|
|
37
33
|
region_id: zod.ZodString;
|
|
38
34
|
}, zod.z.core.$strict>;
|
|
39
35
|
/**
|
|
@@ -17,14 +17,14 @@ export declare const Catalog: zod.ZodObject<{
|
|
|
17
17
|
billing_plan_id: zod.ZodUUID;
|
|
18
18
|
billing_price_id: zod.ZodUUID;
|
|
19
19
|
currency: zod.ZodLiteral<"USD">;
|
|
20
|
-
amount: zod.ZodIntersection<zod.ZodString, zod.ZodString
|
|
20
|
+
amount: zod.ZodOptional<zod.ZodIntersection<zod.ZodString, zod.ZodString>>;
|
|
21
21
|
period_months: zod.ZodUnion<readonly [zod.ZodUnion<readonly [zod.ZodLiteral<1>, zod.ZodLiteral<3>, zod.ZodLiteral<6>, zod.ZodLiteral<12>, zod.ZodLiteral<24>, zod.ZodLiteral<36>]>, zod.ZodNull]>;
|
|
22
22
|
}, zod.z.core.$strict>, zod.ZodNull]>;
|
|
23
23
|
prices: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
|
|
24
24
|
billing_plan_id: zod.ZodUUID;
|
|
25
25
|
billing_price_id: zod.ZodUUID;
|
|
26
26
|
currency: zod.ZodLiteral<"USD">;
|
|
27
|
-
amount: zod.ZodIntersection<zod.ZodString, zod.ZodString
|
|
27
|
+
amount: zod.ZodOptional<zod.ZodIntersection<zod.ZodString, zod.ZodString>>;
|
|
28
28
|
period_months: zod.ZodUnion<readonly [zod.ZodLiteral<1>, zod.ZodLiteral<3>, zod.ZodLiteral<6>, zod.ZodLiteral<12>, zod.ZodLiteral<24>, zod.ZodLiteral<36>]>;
|
|
29
29
|
}, zod.z.core.$strict>>>;
|
|
30
30
|
image_ids: zod.ZodArray<zod.ZodString>;
|
|
@@ -42,7 +42,7 @@ export declare const Instance: zod.ZodObject<{
|
|
|
42
42
|
expires_at: zod.ZodUnion<readonly [zod.z.ZodISODateTime, zod.ZodNull]>;
|
|
43
43
|
original_price: zod.ZodObject<{
|
|
44
44
|
currency: zod.ZodLiteral<"USD">;
|
|
45
|
-
amount: zod.ZodIntersection<zod.ZodString, zod.ZodString
|
|
45
|
+
amount: zod.ZodOptional<zod.ZodIntersection<zod.ZodString, zod.ZodString>>;
|
|
46
46
|
period_months: zod.ZodUnion<readonly [zod.ZodLiteral<1>, zod.ZodLiteral<3>, zod.ZodLiteral<6>, zod.ZodLiteral<12>, zod.ZodLiteral<24>, zod.ZodLiteral<36>]>;
|
|
47
47
|
}, zod.z.core.$strict>;
|
|
48
48
|
source_observed_at: zod.z.ZodISODateTime;
|
|
@@ -40,7 +40,7 @@ export declare const InstanceList: zod.ZodObject<{
|
|
|
40
40
|
expires_at: zod.ZodUnion<readonly [zod.z.ZodISODateTime, zod.ZodNull]>;
|
|
41
41
|
original_price: zod.ZodObject<{
|
|
42
42
|
currency: zod.ZodLiteral<"USD">;
|
|
43
|
-
amount: zod.ZodIntersection<zod.ZodString, zod.ZodString
|
|
43
|
+
amount: zod.ZodOptional<zod.ZodIntersection<zod.ZodString, zod.ZodString>>;
|
|
44
44
|
period_months: zod.ZodUnion<readonly [zod.ZodLiteral<1>, zod.ZodLiteral<3>, zod.ZodLiteral<6>, zod.ZodLiteral<12>, zod.ZodLiteral<24>, zod.ZodLiteral<36>]>;
|
|
45
45
|
}, zod.z.core.$strict>;
|
|
46
46
|
source_observed_at: zod.z.ZodISODateTime;
|
|
@@ -6,9 +6,10 @@
|
|
|
6
6
|
* OpenAPI spec version: 1.0.0
|
|
7
7
|
*/
|
|
8
8
|
import * as zod from "zod";
|
|
9
|
+
export declare const instancePriceAmountTwoRegExp: RegExp;
|
|
9
10
|
export declare const InstancePrice: zod.ZodObject<{
|
|
10
11
|
currency: zod.ZodLiteral<"USD">;
|
|
11
|
-
amount: zod.ZodIntersection<zod.ZodString, zod.ZodString
|
|
12
|
+
amount: zod.ZodOptional<zod.ZodIntersection<zod.ZodString, zod.ZodString>>;
|
|
12
13
|
period_months: zod.ZodUnion<readonly [zod.ZodLiteral<1>, zod.ZodLiteral<3>, zod.ZodLiteral<6>, zod.ZodLiteral<12>, zod.ZodLiteral<24>, zod.ZodLiteral<36>]>;
|
|
13
14
|
}, zod.z.core.$strict>;
|
|
14
15
|
export type InstancePrice = zod.input<typeof InstancePrice>;
|
|
@@ -6,10 +6,15 @@
|
|
|
6
6
|
* OpenAPI spec version: 1.0.0
|
|
7
7
|
*/
|
|
8
8
|
import * as zod from "zod";
|
|
9
|
-
|
|
9
|
+
export const instancePriceAmountTwoRegExp = new RegExp("^(0|[1-9][0-9]{0,14})(\\.[0-9]{1,10})?$");
|
|
10
10
|
export const InstancePrice = zod.strictObject({
|
|
11
11
|
currency: zod.literal("USD"),
|
|
12
|
-
amount:
|
|
12
|
+
amount: zod
|
|
13
|
+
.string()
|
|
14
|
+
.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.")
|
|
15
|
+
.and(zod.string().regex(instancePriceAmountTwoRegExp))
|
|
16
|
+
.optional()
|
|
17
|
+
.describe("Historical display metadata only. Price-only purchases omit this field; use Billing for quotes."),
|
|
13
18
|
period_months: zod.union([
|
|
14
19
|
zod.literal(1),
|
|
15
20
|
zod.literal(3),
|
|
@@ -19,14 +19,14 @@ export declare const Plan: zod.ZodObject<{
|
|
|
19
19
|
billing_plan_id: zod.ZodUUID;
|
|
20
20
|
billing_price_id: zod.ZodUUID;
|
|
21
21
|
currency: zod.ZodLiteral<"USD">;
|
|
22
|
-
amount: zod.ZodIntersection<zod.ZodString, zod.ZodString
|
|
22
|
+
amount: zod.ZodOptional<zod.ZodIntersection<zod.ZodString, zod.ZodString>>;
|
|
23
23
|
period_months: zod.ZodUnion<readonly [zod.ZodUnion<readonly [zod.ZodLiteral<1>, zod.ZodLiteral<3>, zod.ZodLiteral<6>, zod.ZodLiteral<12>, zod.ZodLiteral<24>, zod.ZodLiteral<36>]>, zod.ZodNull]>;
|
|
24
24
|
}, zod.z.core.$strict>, zod.ZodNull]>;
|
|
25
25
|
prices: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
|
|
26
26
|
billing_plan_id: zod.ZodUUID;
|
|
27
27
|
billing_price_id: zod.ZodUUID;
|
|
28
28
|
currency: zod.ZodLiteral<"USD">;
|
|
29
|
-
amount: zod.ZodIntersection<zod.ZodString, zod.ZodString
|
|
29
|
+
amount: zod.ZodOptional<zod.ZodIntersection<zod.ZodString, zod.ZodString>>;
|
|
30
30
|
period_months: zod.ZodUnion<readonly [zod.ZodLiteral<1>, zod.ZodLiteral<3>, zod.ZodLiteral<6>, zod.ZodLiteral<12>, zod.ZodLiteral<24>, zod.ZodLiteral<36>]>;
|
|
31
31
|
}, zod.z.core.$strict>>>;
|
|
32
32
|
image_ids: zod.ZodArray<zod.ZodString>;
|
|
@@ -8,11 +8,12 @@
|
|
|
8
8
|
import * as zod from "zod";
|
|
9
9
|
export declare const priceBillingPlanIdRegExp: RegExp;
|
|
10
10
|
export declare const priceBillingPriceIdRegExp: RegExp;
|
|
11
|
+
export declare const priceAmountTwoRegExp: RegExp;
|
|
11
12
|
export declare const Price: zod.ZodObject<{
|
|
12
13
|
billing_plan_id: zod.ZodUUID;
|
|
13
14
|
billing_price_id: zod.ZodUUID;
|
|
14
15
|
currency: zod.ZodLiteral<"USD">;
|
|
15
|
-
amount: zod.ZodIntersection<zod.ZodString, zod.ZodString
|
|
16
|
+
amount: zod.ZodOptional<zod.ZodIntersection<zod.ZodString, zod.ZodString>>;
|
|
16
17
|
period_months: zod.ZodUnion<readonly [zod.ZodUnion<readonly [zod.ZodLiteral<1>, zod.ZodLiteral<3>, zod.ZodLiteral<6>, zod.ZodLiteral<12>, zod.ZodLiteral<24>, zod.ZodLiteral<36>]>, zod.ZodNull]>;
|
|
17
18
|
}, zod.z.core.$strict>;
|
|
18
19
|
export type Price = zod.input<typeof Price>;
|
|
@@ -6,14 +6,19 @@
|
|
|
6
6
|
* OpenAPI spec version: 1.0.0
|
|
7
7
|
*/
|
|
8
8
|
import * as zod from "zod";
|
|
9
|
-
import { DecimalAmount } from "./decimalAmount.zod.js";
|
|
10
9
|
export const priceBillingPlanIdRegExp = new RegExp("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$");
|
|
11
10
|
export const priceBillingPriceIdRegExp = new RegExp("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$");
|
|
11
|
+
export const priceAmountTwoRegExp = new RegExp("^(0|[1-9][0-9]{0,14})(\\.[0-9]{1,10})?$");
|
|
12
12
|
export const Price = zod.strictObject({
|
|
13
13
|
billing_plan_id: zod.uuid().regex(priceBillingPlanIdRegExp),
|
|
14
14
|
billing_price_id: zod.uuid().regex(priceBillingPriceIdRegExp),
|
|
15
15
|
currency: zod.literal("USD"),
|
|
16
|
-
amount:
|
|
16
|
+
amount: zod
|
|
17
|
+
.string()
|
|
18
|
+
.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.")
|
|
19
|
+
.and(zod.string().regex(priceAmountTwoRegExp))
|
|
20
|
+
.optional()
|
|
21
|
+
.describe("Historical display metadata only. New responses omit this field; use Billing for quotes."),
|
|
17
22
|
period_months: zod.union([
|
|
18
23
|
zod.union([
|
|
19
24
|
zod.literal(1),
|
|
@@ -8,11 +8,12 @@
|
|
|
8
8
|
import * as zod from "zod";
|
|
9
9
|
export declare const priceOptionBillingPlanIdRegExp: RegExp;
|
|
10
10
|
export declare const priceOptionBillingPriceIdRegExp: RegExp;
|
|
11
|
+
export declare const priceOptionAmountTwoRegExp: RegExp;
|
|
11
12
|
export declare const PriceOption: zod.ZodObject<{
|
|
12
13
|
billing_plan_id: zod.ZodUUID;
|
|
13
14
|
billing_price_id: zod.ZodUUID;
|
|
14
15
|
currency: zod.ZodLiteral<"USD">;
|
|
15
|
-
amount: zod.ZodIntersection<zod.ZodString, zod.ZodString
|
|
16
|
+
amount: zod.ZodOptional<zod.ZodIntersection<zod.ZodString, zod.ZodString>>;
|
|
16
17
|
period_months: zod.ZodUnion<readonly [zod.ZodLiteral<1>, zod.ZodLiteral<3>, zod.ZodLiteral<6>, zod.ZodLiteral<12>, zod.ZodLiteral<24>, zod.ZodLiteral<36>]>;
|
|
17
18
|
}, zod.z.core.$strict>;
|
|
18
19
|
export type PriceOption = zod.input<typeof PriceOption>;
|
|
@@ -6,15 +6,20 @@
|
|
|
6
6
|
* OpenAPI spec version: 1.0.0
|
|
7
7
|
*/
|
|
8
8
|
import * as zod from "zod";
|
|
9
|
-
import { DecimalAmount } from "./decimalAmount.zod.js";
|
|
10
9
|
export const priceOptionBillingPlanIdRegExp = new RegExp("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$");
|
|
11
10
|
export const priceOptionBillingPriceIdRegExp = new RegExp("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$");
|
|
11
|
+
export const priceOptionAmountTwoRegExp = new RegExp("^(0|[1-9][0-9]{0,14})(\\.[0-9]{1,10})?$");
|
|
12
12
|
export const PriceOption = zod
|
|
13
13
|
.strictObject({
|
|
14
14
|
billing_plan_id: zod.uuid().regex(priceOptionBillingPlanIdRegExp),
|
|
15
15
|
billing_price_id: zod.uuid().regex(priceOptionBillingPriceIdRegExp),
|
|
16
16
|
currency: zod.literal("USD"),
|
|
17
|
-
amount:
|
|
17
|
+
amount: zod
|
|
18
|
+
.string()
|
|
19
|
+
.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.")
|
|
20
|
+
.and(zod.string().regex(priceOptionAmountTwoRegExp))
|
|
21
|
+
.optional()
|
|
22
|
+
.describe("Historical display metadata only. New responses omit this field; use Billing for quotes."),
|
|
18
23
|
period_months: zod.union([
|
|
19
24
|
zod.literal(1),
|
|
20
25
|
zod.literal(3),
|
|
@@ -24,4 +29,4 @@ export const PriceOption = zod
|
|
|
24
29
|
zod.literal(36),
|
|
25
30
|
]),
|
|
26
31
|
})
|
|
27
|
-
.describe("A verified price option for one billing period. Its Billing price must currently be available, use period-end cancellation without an automatic refund, and match this provider plan and region. Archived snapshots, unknown periods and unverified prices are excluded. Selection does not bypass current permissions,
|
|
32
|
+
.describe("A verified price option for one billing period. Its Billing price must currently be available, use period-end cancellation without an automatic refund, and match this provider plan and region. Archived snapshots, unknown periods and unverified prices are excluded. Selection does not bypass current permissions, Price validation or disabled purchase controls. Billing owns quotes and checkout amounts.");
|
|
@@ -31,4 +31,4 @@ export const Purchase = zod
|
|
|
31
31
|
delivered: zod.boolean(),
|
|
32
32
|
billing_settled: zod.boolean(),
|
|
33
33
|
})
|
|
34
|
-
.describe("Durable purchase progress. delivered and billing_settled describe different facts
|
|
34
|
+
.describe("Durable purchase progress. The checkout_session_id identifies the Billing session for user quote, confirmation and payment. It is not ready while checkout creation is pending. SWAS does not quote or charge automatically. delivered and billing_settled describe different facts; acceptance is not delivery.");
|
|
@@ -17,10 +17,6 @@ export declare const PurchaseCreate: zod.ZodObject<{
|
|
|
17
17
|
billing_price_id: zod.ZodUUID;
|
|
18
18
|
image_id: zod.ZodString;
|
|
19
19
|
quantity: zod.ZodLiteral<1>;
|
|
20
|
-
expected_quote: zod.ZodObject<{
|
|
21
|
-
currency: zod.ZodLiteral<"USD">;
|
|
22
|
-
amount: zod.ZodIntersection<zod.ZodString, zod.ZodString>;
|
|
23
|
-
}, zod.z.core.$strict>;
|
|
24
20
|
region_id: zod.ZodString;
|
|
25
21
|
}, zod.z.core.$strict>;
|
|
26
22
|
export type PurchaseCreate = zod.input<typeof PurchaseCreate>;
|
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
* OpenAPI spec version: 1.0.0
|
|
7
7
|
*/
|
|
8
8
|
import * as zod from "zod";
|
|
9
|
-
import { ExpectedQuote } from "./expectedQuote.zod.js";
|
|
10
9
|
export const purchaseCreateCatalogRevisionMax = 9007199254740991;
|
|
11
10
|
export const purchaseCreateProviderPlanIdMax = 256;
|
|
12
11
|
export const purchaseCreateBillingPriceIdRegExp = new RegExp("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$");
|
|
@@ -18,9 +17,8 @@ export const PurchaseCreate = zod.strictObject({
|
|
|
18
17
|
billing_price_id: zod
|
|
19
18
|
.uuid()
|
|
20
19
|
.regex(purchaseCreateBillingPriceIdRegExp)
|
|
21
|
-
.describe("Selects a price from the requested plan and current catalog revision. The server resolves its immutable Billing terms, billing period and ownership; the client does not set the billing period."),
|
|
20
|
+
.describe("Selects a price from the requested plan and current catalog revision. The server resolves its immutable Billing terms, billing period and ownership; the client does not set the billing period. SWAS validates the Price selection only. Billing owns quotes, checkout confirmation and payment."),
|
|
22
21
|
image_id: zod.string().min(1).max(purchaseCreateImageIdMax),
|
|
23
22
|
quantity: zod.literal(1),
|
|
24
|
-
expected_quote: ExpectedQuote.describe("An assertion about the displayed quote, not an authoritative amount. The server obtains a new Billing quote and rejects a mismatch before accepting a purchase."),
|
|
25
23
|
region_id: zod.string().min(1).max(purchaseCreateRegionIdMax),
|
|
26
24
|
});
|
package/package.json
CHANGED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Generated by orval 🍺
|
|
3
|
-
* Do not edit manually.
|
|
4
|
-
* Leaflow SWAS API
|
|
5
|
-
* Manage SWAS purchases and instances in the current project. Use an IAM scoped token for every request. Amounts are decimal strings in the stated currency; timestamps are UTC RFC 3339. Accepted requests may still be in progress. Read purchase, operation and refund progress separately.
|
|
6
|
-
* OpenAPI spec version: 1.0.0
|
|
7
|
-
*/
|
|
8
|
-
import * as zod from "zod";
|
|
9
|
-
export declare const ExpectedQuote: zod.ZodObject<{
|
|
10
|
-
currency: zod.ZodLiteral<"USD">;
|
|
11
|
-
amount: zod.ZodIntersection<zod.ZodString, zod.ZodString>;
|
|
12
|
-
}, zod.z.core.$strict>;
|
|
13
|
-
export type ExpectedQuote = zod.input<typeof ExpectedQuote>;
|
|
14
|
-
export type ExpectedQuoteOutput = zod.output<typeof ExpectedQuote>;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Generated by orval 🍺
|
|
3
|
-
* Do not edit manually.
|
|
4
|
-
* Leaflow SWAS API
|
|
5
|
-
* Manage SWAS purchases and instances in the current project. Use an IAM scoped token for every request. Amounts are decimal strings in the stated currency; timestamps are UTC RFC 3339. Accepted requests may still be in progress. Read purchase, operation and refund progress separately.
|
|
6
|
-
* OpenAPI spec version: 1.0.0
|
|
7
|
-
*/
|
|
8
|
-
import * as zod from "zod";
|
|
9
|
-
import { DecimalAmount } from "./decimalAmount.zod.js";
|
|
10
|
-
export const ExpectedQuote = zod.strictObject({
|
|
11
|
-
currency: zod.literal("USD"),
|
|
12
|
-
amount: DecimalAmount,
|
|
13
|
-
});
|