@leaflow/sdk 0.0.0-dev.415.gb9e4b83 → 0.0.0-dev.418.ge62522e
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/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/routes.d.ts +80 -0
- package/dist/routes.js +90 -0
- package/dist/swas/v1/generated/functions.d.ts +418 -0
- package/dist/swas/v1/generated/functions.js +250 -0
- package/dist/swas/v1/generated/models.d.ts +384 -0
- package/dist/swas/v1/generated/models.js +87 -0
- package/dist/swas/v1/generated/schemas.zod.d.ts +117 -0
- package/dist/swas/v1/generated/schemas.zod.js +120 -0
- package/dist/swas/v1/generated/validators/catalog.zod.d.ts +32 -0
- package/dist/swas/v1/generated/validators/catalog.zod.js +16 -0
- package/dist/swas/v1/generated/validators/createPurchaseHeaders.zod.d.ts +14 -0
- package/dist/swas/v1/generated/validators/createPurchaseHeaders.zod.js +12 -0
- package/dist/swas/v1/generated/validators/cursorPagination.zod.d.ts +14 -0
- package/dist/swas/v1/generated/validators/cursorPagination.zod.js +14 -0
- package/dist/swas/v1/generated/validators/customerRefundProgress.zod.d.ts +16 -0
- package/dist/swas/v1/generated/validators/customerRefundProgress.zod.js +14 -0
- package/dist/swas/v1/generated/validators/decimalAmount.zod.d.ts +12 -0
- package/dist/swas/v1/generated/validators/decimalAmount.zod.js +11 -0
- package/dist/swas/v1/generated/validators/error.zod.d.ts +16 -0
- package/dist/swas/v1/generated/validators/error.zod.js +17 -0
- package/dist/swas/v1/generated/validators/expectedQuote.zod.d.ts +14 -0
- package/dist/swas/v1/generated/validators/expectedQuote.zod.js +13 -0
- package/dist/swas/v1/generated/validators/instance.zod.d.ts +58 -0
- package/dist/swas/v1/generated/validators/instance.zod.js +47 -0
- package/dist/swas/v1/generated/validators/instanceCapabilities.zod.d.ts +16 -0
- package/dist/swas/v1/generated/validators/instanceCapabilities.zod.js +14 -0
- package/dist/swas/v1/generated/validators/instanceList.zod.d.ts +62 -0
- package/dist/swas/v1/generated/validators/instanceList.zod.js +15 -0
- package/dist/swas/v1/generated/validators/instancePagination.zod.d.ts +15 -0
- package/dist/swas/v1/generated/validators/instancePagination.zod.js +10 -0
- package/dist/swas/v1/generated/validators/instancePrice.zod.d.ts +15 -0
- package/dist/swas/v1/generated/validators/instancePrice.zod.js +21 -0
- package/dist/swas/v1/generated/validators/listInstancesParams.zod.d.ts +20 -0
- package/dist/swas/v1/generated/validators/listInstancesParams.zod.js +22 -0
- package/dist/swas/v1/generated/validators/listPlansParams.zod.d.ts +14 -0
- package/dist/swas/v1/generated/validators/listPlansParams.zod.js +12 -0
- package/dist/swas/v1/generated/validators/managementOperation.zod.d.ts +36 -0
- package/dist/swas/v1/generated/validators/managementOperation.zod.js +21 -0
- package/dist/swas/v1/generated/validators/money.zod.d.ts +11 -0
- package/dist/swas/v1/generated/validators/money.zod.js +11 -0
- package/dist/swas/v1/generated/validators/offsetPagination.zod.d.ts +16 -0
- package/dist/swas/v1/generated/validators/offsetPagination.zod.js +16 -0
- package/dist/swas/v1/generated/validators/plan.zod.d.ts +29 -0
- package/dist/swas/v1/generated/validators/plan.zod.js +22 -0
- package/dist/swas/v1/generated/validators/price.zod.d.ts +19 -0
- package/dist/swas/v1/generated/validators/price.zod.js +28 -0
- package/dist/swas/v1/generated/validators/purchase.zod.d.ts +34 -0
- package/dist/swas/v1/generated/validators/purchase.zod.js +34 -0
- package/dist/swas/v1/generated/validators/purchaseCreate.zod.d.ts +27 -0
- package/dist/swas/v1/generated/validators/purchaseCreate.zod.js +23 -0
- package/dist/swas/v1/generated/validators/rebootCycle.zod.d.ts +14 -0
- package/dist/swas/v1/generated/validators/rebootCycle.zod.js +17 -0
- package/dist/swas/v1/generated/validators/rebootInstance.zod.d.ts +11 -0
- package/dist/swas/v1/generated/validators/rebootInstance.zod.js +9 -0
- package/dist/swas/v1/generated/validators/rebootInstanceHeaders.zod.d.ts +14 -0
- package/dist/swas/v1/generated/validators/rebootInstanceHeaders.zod.js +12 -0
- package/dist/swas/v1/generated/validators/refundProgress.zod.d.ts +33 -0
- package/dist/swas/v1/generated/validators/refundProgress.zod.js +27 -0
- package/dist/swas/v1/generated/validators/startInstance.zod.d.ts +11 -0
- package/dist/swas/v1/generated/validators/startInstance.zod.js +9 -0
- package/dist/swas/v1/generated/validators/startInstanceHeaders.zod.d.ts +14 -0
- package/dist/swas/v1/generated/validators/startInstanceHeaders.zod.js +12 -0
- package/dist/swas/v1/generated/validators/stopInstance.zod.d.ts +11 -0
- package/dist/swas/v1/generated/validators/stopInstance.zod.js +9 -0
- package/dist/swas/v1/generated/validators/stopInstanceHeaders.zod.d.ts +14 -0
- package/dist/swas/v1/generated/validators/stopInstanceHeaders.zod.js +12 -0
- package/dist/swas/v1/generated/validators/supplierRefundProgress.zod.d.ts +14 -0
- package/dist/swas/v1/generated/validators/supplierRefundProgress.zod.js +12 -0
- package/dist/swas/v1/index.d.ts +4 -0
- package/dist/swas/v1/index.js +4 -0
- package/dist/swas/v1/response-schemas.d.ts +18 -0
- package/dist/swas/v1/response-schemas.js +19 -0
- package/package.json +1 -1
|
@@ -0,0 +1,47 @@
|
|
|
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 { InstanceCapabilities } from "./instanceCapabilities.zod.js";
|
|
10
|
+
import { InstancePrice } from "./instancePrice.zod.js";
|
|
11
|
+
export const instanceRegionIdMax = 128;
|
|
12
|
+
export const instanceProviderPlanIdMax = 128;
|
|
13
|
+
export const instanceImageIdMax = 128;
|
|
14
|
+
export const instanceSyncRevisionMax = 9007199254740991;
|
|
15
|
+
export const Instance = zod.strictObject({
|
|
16
|
+
id: zod.uuid(),
|
|
17
|
+
purchase_id: zod.uuid(),
|
|
18
|
+
project_id: zod.uuid(),
|
|
19
|
+
region_id: zod.string().min(1).max(instanceRegionIdMax),
|
|
20
|
+
provider_plan_id: zod.string().max(instanceProviderPlanIdMax),
|
|
21
|
+
image_id: zod.string().max(instanceImageIdMax),
|
|
22
|
+
status: zod.enum([
|
|
23
|
+
"Pending",
|
|
24
|
+
"Starting",
|
|
25
|
+
"Running",
|
|
26
|
+
"Stopping",
|
|
27
|
+
"Stopped",
|
|
28
|
+
"Resetting",
|
|
29
|
+
"Upgrading",
|
|
30
|
+
"Disabled",
|
|
31
|
+
"Unknown",
|
|
32
|
+
]),
|
|
33
|
+
business_status: zod.enum(["Normal", "Expired", "Overdue", "Unknown"]),
|
|
34
|
+
observation: zod.enum(["present", "missing"]),
|
|
35
|
+
created_at: zod.union([
|
|
36
|
+
zod.iso.datetime({ offset: true }).describe("UTC RFC 3339 timestamp."),
|
|
37
|
+
zod.null(),
|
|
38
|
+
]),
|
|
39
|
+
expires_at: zod.union([
|
|
40
|
+
zod.iso.datetime({ offset: true }).describe("UTC RFC 3339 timestamp."),
|
|
41
|
+
zod.null(),
|
|
42
|
+
]),
|
|
43
|
+
original_price: InstancePrice,
|
|
44
|
+
source_observed_at: zod.iso.datetime({ offset: true }).describe("UTC RFC 3339 timestamp."),
|
|
45
|
+
sync_revision: zod.int().min(1).max(instanceSyncRevisionMax),
|
|
46
|
+
capabilities: InstanceCapabilities,
|
|
47
|
+
});
|
|
@@ -0,0 +1,16 @@
|
|
|
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 InstanceCapabilities: zod.ZodObject<{
|
|
10
|
+
manage: zod.ZodLiteral<false>;
|
|
11
|
+
customer_refund: zod.ZodLiteral<false>;
|
|
12
|
+
supplier_refund: zod.ZodLiteral<false>;
|
|
13
|
+
release: zod.ZodLiteral<false>;
|
|
14
|
+
}, zod.z.core.$strict>;
|
|
15
|
+
export type InstanceCapabilities = zod.input<typeof InstanceCapabilities>;
|
|
16
|
+
export type InstanceCapabilitiesOutput = zod.output<typeof InstanceCapabilities>;
|
|
@@ -0,0 +1,14 @@
|
|
|
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 const InstanceCapabilities = zod.strictObject({
|
|
10
|
+
manage: zod.literal(false),
|
|
11
|
+
customer_refund: zod.literal(false),
|
|
12
|
+
supplier_refund: zod.literal(false),
|
|
13
|
+
release: zod.literal(false),
|
|
14
|
+
});
|
|
@@ -0,0 +1,62 @@
|
|
|
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 instanceListItemsMax = 200;
|
|
10
|
+
export declare const InstanceList: zod.ZodObject<{
|
|
11
|
+
items: zod.ZodArray<zod.ZodObject<{
|
|
12
|
+
id: zod.ZodUUID;
|
|
13
|
+
purchase_id: zod.ZodUUID;
|
|
14
|
+
project_id: zod.ZodUUID;
|
|
15
|
+
region_id: zod.ZodString;
|
|
16
|
+
provider_plan_id: zod.ZodString;
|
|
17
|
+
image_id: zod.ZodString;
|
|
18
|
+
status: zod.ZodEnum<{
|
|
19
|
+
Pending: "Pending";
|
|
20
|
+
Starting: "Starting";
|
|
21
|
+
Running: "Running";
|
|
22
|
+
Stopping: "Stopping";
|
|
23
|
+
Stopped: "Stopped";
|
|
24
|
+
Resetting: "Resetting";
|
|
25
|
+
Upgrading: "Upgrading";
|
|
26
|
+
Disabled: "Disabled";
|
|
27
|
+
Unknown: "Unknown";
|
|
28
|
+
}>;
|
|
29
|
+
business_status: zod.ZodEnum<{
|
|
30
|
+
Unknown: "Unknown";
|
|
31
|
+
Normal: "Normal";
|
|
32
|
+
Expired: "Expired";
|
|
33
|
+
Overdue: "Overdue";
|
|
34
|
+
}>;
|
|
35
|
+
observation: zod.ZodEnum<{
|
|
36
|
+
present: "present";
|
|
37
|
+
missing: "missing";
|
|
38
|
+
}>;
|
|
39
|
+
created_at: zod.ZodUnion<readonly [zod.z.ZodISODateTime, zod.ZodNull]>;
|
|
40
|
+
expires_at: zod.ZodUnion<readonly [zod.z.ZodISODateTime, zod.ZodNull]>;
|
|
41
|
+
original_price: zod.ZodObject<{
|
|
42
|
+
currency: zod.ZodLiteral<"USD">;
|
|
43
|
+
amount: zod.ZodIntersection<zod.ZodString, zod.ZodString>;
|
|
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
|
+
}, zod.z.core.$strict>;
|
|
46
|
+
source_observed_at: zod.z.ZodISODateTime;
|
|
47
|
+
sync_revision: zod.ZodInt;
|
|
48
|
+
capabilities: zod.ZodObject<{
|
|
49
|
+
manage: zod.ZodLiteral<false>;
|
|
50
|
+
customer_refund: zod.ZodLiteral<false>;
|
|
51
|
+
supplier_refund: zod.ZodLiteral<false>;
|
|
52
|
+
release: zod.ZodLiteral<false>;
|
|
53
|
+
}, zod.z.core.$strict>;
|
|
54
|
+
}, zod.z.core.$strict>>;
|
|
55
|
+
pagination: zod.ZodObject<{
|
|
56
|
+
page: zod.ZodInt;
|
|
57
|
+
page_size: zod.ZodInt;
|
|
58
|
+
total_count: zod.ZodOptional<zod.ZodInt>;
|
|
59
|
+
}, zod.z.core.$strict>;
|
|
60
|
+
}, zod.z.core.$strict>;
|
|
61
|
+
export type InstanceList = zod.input<typeof InstanceList>;
|
|
62
|
+
export type InstanceListOutput = zod.output<typeof InstanceList>;
|
|
@@ -0,0 +1,15 @@
|
|
|
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 { Instance } from "./instance.zod.js";
|
|
10
|
+
import { InstancePagination } from "./instancePagination.zod.js";
|
|
11
|
+
export const instanceListItemsMax = 200;
|
|
12
|
+
export const InstanceList = zod.strictObject({
|
|
13
|
+
items: zod.array(Instance).max(instanceListItemsMax),
|
|
14
|
+
pagination: InstancePagination,
|
|
15
|
+
});
|
|
@@ -0,0 +1,15 @@
|
|
|
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 InstancePagination: zod.ZodObject<{
|
|
10
|
+
page: zod.ZodInt;
|
|
11
|
+
page_size: zod.ZodInt;
|
|
12
|
+
total_count: zod.ZodOptional<zod.ZodInt>;
|
|
13
|
+
}, zod.z.core.$strict>;
|
|
14
|
+
export type InstancePagination = zod.input<typeof InstancePagination>;
|
|
15
|
+
export type InstancePaginationOutput = zod.output<typeof InstancePagination>;
|
|
@@ -0,0 +1,10 @@
|
|
|
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 { OffsetPagination } from "./offsetPagination.zod.js";
|
|
10
|
+
export const InstancePagination = OffsetPagination;
|
|
@@ -0,0 +1,15 @@
|
|
|
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 InstancePrice: zod.ZodObject<{
|
|
10
|
+
currency: zod.ZodLiteral<"USD">;
|
|
11
|
+
amount: zod.ZodIntersection<zod.ZodString, zod.ZodString>;
|
|
12
|
+
period_months: zod.ZodUnion<readonly [zod.ZodLiteral<1>, zod.ZodLiteral<3>, zod.ZodLiteral<6>, zod.ZodLiteral<12>, zod.ZodLiteral<24>, zod.ZodLiteral<36>]>;
|
|
13
|
+
}, zod.z.core.$strict>;
|
|
14
|
+
export type InstancePrice = zod.input<typeof InstancePrice>;
|
|
15
|
+
export type InstancePriceOutput = zod.output<typeof InstancePrice>;
|
|
@@ -0,0 +1,21 @@
|
|
|
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 InstancePrice = zod.strictObject({
|
|
11
|
+
currency: zod.literal("USD"),
|
|
12
|
+
amount: DecimalAmount,
|
|
13
|
+
period_months: zod.union([
|
|
14
|
+
zod.literal(1),
|
|
15
|
+
zod.literal(3),
|
|
16
|
+
zod.literal(6),
|
|
17
|
+
zod.literal(12),
|
|
18
|
+
zod.literal(24),
|
|
19
|
+
zod.literal(36),
|
|
20
|
+
]),
|
|
21
|
+
});
|
|
@@ -0,0 +1,20 @@
|
|
|
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 listInstancesParamsRegionIdMax = 128;
|
|
10
|
+
export declare const listInstancesParamsPageDefault = 1;
|
|
11
|
+
export declare const listInstancesParamsPageMax = 2147483647;
|
|
12
|
+
export declare const listInstancesParamsPageSizeDefault = 50;
|
|
13
|
+
export declare const listInstancesParamsPageSizeMax = 200;
|
|
14
|
+
export declare const ListInstancesParams: zod.ZodObject<{
|
|
15
|
+
region_id: zod.ZodString;
|
|
16
|
+
page: zod.ZodDefault<zod.ZodInt>;
|
|
17
|
+
page_size: zod.ZodDefault<zod.ZodInt>;
|
|
18
|
+
}, zod.z.core.$strict>;
|
|
19
|
+
export type ListInstancesParams = zod.input<typeof ListInstancesParams>;
|
|
20
|
+
export type ListInstancesParamsOutput = zod.output<typeof ListInstancesParams>;
|
|
@@ -0,0 +1,22 @@
|
|
|
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 const listInstancesParamsRegionIdMax = 128;
|
|
10
|
+
export const listInstancesParamsPageDefault = 1;
|
|
11
|
+
export const listInstancesParamsPageMax = 2147483647;
|
|
12
|
+
export const listInstancesParamsPageSizeDefault = 50;
|
|
13
|
+
export const listInstancesParamsPageSizeMax = 200;
|
|
14
|
+
export const ListInstancesParams = zod.strictObject({
|
|
15
|
+
region_id: zod.string().min(1).max(listInstancesParamsRegionIdMax),
|
|
16
|
+
page: zod.int().min(1).max(listInstancesParamsPageMax).default(listInstancesParamsPageDefault),
|
|
17
|
+
page_size: zod
|
|
18
|
+
.int()
|
|
19
|
+
.min(1)
|
|
20
|
+
.max(listInstancesParamsPageSizeMax)
|
|
21
|
+
.default(listInstancesParamsPageSizeDefault),
|
|
22
|
+
});
|
|
@@ -0,0 +1,14 @@
|
|
|
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 listPlansParamsRegionIdMax = 128;
|
|
10
|
+
export declare const ListPlansParams: zod.ZodObject<{
|
|
11
|
+
region_id: zod.ZodString;
|
|
12
|
+
}, zod.z.core.$strict>;
|
|
13
|
+
export type ListPlansParams = zod.input<typeof ListPlansParams>;
|
|
14
|
+
export type ListPlansParamsOutput = zod.output<typeof ListPlansParams>;
|
|
@@ -0,0 +1,12 @@
|
|
|
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 const listPlansParamsRegionIdMax = 128;
|
|
10
|
+
export const ListPlansParams = zod.strictObject({
|
|
11
|
+
region_id: zod.string().min(1).max(listPlansParamsRegionIdMax),
|
|
12
|
+
});
|
|
@@ -0,0 +1,36 @@
|
|
|
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 ManagementOperation: zod.ZodObject<{
|
|
10
|
+
id: zod.ZodUUID;
|
|
11
|
+
purchase_id: zod.ZodUUID;
|
|
12
|
+
action: zod.ZodEnum<{
|
|
13
|
+
start: "start";
|
|
14
|
+
stop: "stop";
|
|
15
|
+
reboot: "reboot";
|
|
16
|
+
}>;
|
|
17
|
+
state: zod.ZodEnum<{
|
|
18
|
+
completed: "completed";
|
|
19
|
+
queued: "queued";
|
|
20
|
+
dispatch_unknown: "dispatch_unknown";
|
|
21
|
+
provider_ack: "provider_ack";
|
|
22
|
+
}>;
|
|
23
|
+
last_observed_status: zod.ZodEnum<{
|
|
24
|
+
Starting: "Starting";
|
|
25
|
+
Running: "Running";
|
|
26
|
+
Stopped: "Stopped";
|
|
27
|
+
}>;
|
|
28
|
+
created_at: zod.z.ZodISODateTime;
|
|
29
|
+
updated_at: zod.z.ZodISODateTime;
|
|
30
|
+
reboot_cycle: zod.ZodOptional<zod.ZodObject<{
|
|
31
|
+
starting_observed_at: zod.z.ZodISODateTime;
|
|
32
|
+
running_observed_at: zod.ZodUnion<readonly [zod.z.ZodISODateTime, zod.ZodNull]>;
|
|
33
|
+
}, zod.z.core.$strict>>;
|
|
34
|
+
}, zod.z.core.$strict>;
|
|
35
|
+
export type ManagementOperation = zod.input<typeof ManagementOperation>;
|
|
36
|
+
export type ManagementOperationOutput = zod.output<typeof ManagementOperation>;
|
|
@@ -0,0 +1,21 @@
|
|
|
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 { RebootCycle } from "./rebootCycle.zod.js";
|
|
10
|
+
export const ManagementOperation = zod
|
|
11
|
+
.strictObject({
|
|
12
|
+
id: zod.uuid(),
|
|
13
|
+
purchase_id: zod.uuid(),
|
|
14
|
+
action: zod.enum(["start", "stop", "reboot"]),
|
|
15
|
+
state: zod.enum(["queued", "dispatch_unknown", "provider_ack", "completed"]),
|
|
16
|
+
last_observed_status: zod.enum(["Stopped", "Running", "Starting"]),
|
|
17
|
+
created_at: zod.iso.datetime({ offset: true }).describe("UTC RFC 3339 timestamp."),
|
|
18
|
+
updated_at: zod.iso.datetime({ offset: true }).describe("UTC RFC 3339 timestamp."),
|
|
19
|
+
reboot_cycle: RebootCycle.optional(),
|
|
20
|
+
})
|
|
21
|
+
.describe("Read state to follow the operation. For a reboot, reboot_cycle records a Starting observation followed by a later Running observation. A missing cycle or null running time does not confirm completion.");
|
|
@@ -0,0 +1,11 @@
|
|
|
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 Money: zod.ZodString;
|
|
10
|
+
export type Money = zod.input<typeof Money>;
|
|
11
|
+
export type MoneyOutput = zod.output<typeof Money>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval 🍺
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
* 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 const Money = zod
|
|
10
|
+
.string()
|
|
11
|
+
.describe("A decimal string, in the currency stated alongside it.\n\n**The currency is not part of this type.** It is carried by a `currency` field next to the\namount, or by the account the amount belongs to. Reading an amount without that field is\nreading a number with no unit.\n\nIt is a string rather than a JSON number because a JSON number is a float in most parsers,\nand a float loses precision on the first arithmetic. Nothing on this platform puts an amount\nthrough a float.");
|
|
@@ -0,0 +1,16 @@
|
|
|
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 offsetPaginationTotalCountMin = 0;
|
|
10
|
+
export declare const OffsetPagination: zod.ZodObject<{
|
|
11
|
+
page: zod.ZodInt;
|
|
12
|
+
page_size: zod.ZodInt;
|
|
13
|
+
total_count: zod.ZodOptional<zod.ZodInt>;
|
|
14
|
+
}, zod.z.core.$strict>;
|
|
15
|
+
export type OffsetPagination = zod.input<typeof OffsetPagination>;
|
|
16
|
+
export type OffsetPaginationOutput = zod.output<typeof OffsetPagination>;
|
|
@@ -0,0 +1,16 @@
|
|
|
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 const offsetPaginationTotalCountMin = 0;
|
|
10
|
+
export const OffsetPagination = zod
|
|
11
|
+
.strictObject({
|
|
12
|
+
page: zod.int().min(1),
|
|
13
|
+
page_size: zod.int().min(1),
|
|
14
|
+
total_count: zod.int().min(offsetPaginationTotalCountMin).optional(),
|
|
15
|
+
})
|
|
16
|
+
.describe("Pagination metadata for stable numbered pages. total_count is returned only when the operation can determine it without an unbounded scan.");
|
|
@@ -0,0 +1,29 @@
|
|
|
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 planImageIdsMax = 256;
|
|
10
|
+
export declare const Plan: zod.ZodObject<{
|
|
11
|
+
provider_plan_id: zod.ZodString;
|
|
12
|
+
region_id: zod.ZodString;
|
|
13
|
+
name: zod.ZodString;
|
|
14
|
+
catalog_revision: zod.ZodInt;
|
|
15
|
+
buyable: zod.ZodBoolean;
|
|
16
|
+
price: zod.ZodUnion<readonly [zod.ZodObject<{
|
|
17
|
+
billing_plan_id: zod.ZodUUID;
|
|
18
|
+
billing_price_id: zod.ZodUUID;
|
|
19
|
+
currency: zod.ZodLiteral<"USD">;
|
|
20
|
+
amount: zod.ZodIntersection<zod.ZodString, zod.ZodString>;
|
|
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
|
+
}, zod.z.core.$strict>, zod.ZodNull]>;
|
|
23
|
+
image_ids: zod.ZodArray<zod.ZodString>;
|
|
24
|
+
cpu: zod.ZodInt;
|
|
25
|
+
memory_mb: zod.ZodInt;
|
|
26
|
+
disk_gb: zod.ZodInt;
|
|
27
|
+
}, zod.z.core.$strict>;
|
|
28
|
+
export type Plan = zod.input<typeof Plan>;
|
|
29
|
+
export type PlanOutput = zod.output<typeof Plan>;
|
|
@@ -0,0 +1,22 @@
|
|
|
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 { Price } from "./price.zod.js";
|
|
10
|
+
export const planImageIdsMax = 256;
|
|
11
|
+
export const Plan = zod.strictObject({
|
|
12
|
+
provider_plan_id: zod.string(),
|
|
13
|
+
region_id: zod.string(),
|
|
14
|
+
name: zod.string(),
|
|
15
|
+
catalog_revision: zod.int().min(1),
|
|
16
|
+
buyable: zod.boolean(),
|
|
17
|
+
price: zod.union([Price, zod.null()]),
|
|
18
|
+
image_ids: zod.array(zod.string()).min(1).max(planImageIdsMax),
|
|
19
|
+
cpu: zod.int().min(1),
|
|
20
|
+
memory_mb: zod.int().min(1),
|
|
21
|
+
disk_gb: zod.int().min(1),
|
|
22
|
+
});
|
|
@@ -0,0 +1,19 @@
|
|
|
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 priceBillingPlanIdRegExp: RegExp;
|
|
10
|
+
export declare const priceBillingPriceIdRegExp: RegExp;
|
|
11
|
+
export declare const Price: zod.ZodObject<{
|
|
12
|
+
billing_plan_id: zod.ZodUUID;
|
|
13
|
+
billing_price_id: zod.ZodUUID;
|
|
14
|
+
currency: zod.ZodLiteral<"USD">;
|
|
15
|
+
amount: zod.ZodIntersection<zod.ZodString, zod.ZodString>;
|
|
16
|
+
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
|
+
}, zod.z.core.$strict>;
|
|
18
|
+
export type Price = zod.input<typeof Price>;
|
|
19
|
+
export type PriceOutput = zod.output<typeof Price>;
|
|
@@ -0,0 +1,28 @@
|
|
|
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 priceBillingPlanIdRegExp = 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 priceBillingPriceIdRegExp = new RegExp("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$");
|
|
12
|
+
export const Price = zod.strictObject({
|
|
13
|
+
billing_plan_id: zod.uuid().regex(priceBillingPlanIdRegExp),
|
|
14
|
+
billing_price_id: zod.uuid().regex(priceBillingPriceIdRegExp),
|
|
15
|
+
currency: zod.literal("USD"),
|
|
16
|
+
amount: DecimalAmount,
|
|
17
|
+
period_months: zod.union([
|
|
18
|
+
zod.union([
|
|
19
|
+
zod.literal(1),
|
|
20
|
+
zod.literal(3),
|
|
21
|
+
zod.literal(6),
|
|
22
|
+
zod.literal(12),
|
|
23
|
+
zod.literal(24),
|
|
24
|
+
zod.literal(36),
|
|
25
|
+
]),
|
|
26
|
+
zod.null(),
|
|
27
|
+
]),
|
|
28
|
+
});
|
|
@@ -0,0 +1,34 @@
|
|
|
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 purchaseIdRegExp: RegExp;
|
|
10
|
+
export declare const purchaseCheckoutSessionIdRegExp: RegExp;
|
|
11
|
+
export declare const Purchase: zod.ZodObject<{
|
|
12
|
+
id: zod.ZodUUID;
|
|
13
|
+
state: zod.ZodEnum<{
|
|
14
|
+
completed: "completed";
|
|
15
|
+
accepted: "accepted";
|
|
16
|
+
rejected: "rejected";
|
|
17
|
+
submitted: "submitted";
|
|
18
|
+
checkout_create_reserved: "checkout_create_reserved";
|
|
19
|
+
checkout_unknown: "checkout_unknown";
|
|
20
|
+
checkout_open: "checkout_open";
|
|
21
|
+
order_ready: "order_ready";
|
|
22
|
+
accept_unknown: "accept_unknown";
|
|
23
|
+
create_unknown: "create_unknown";
|
|
24
|
+
awaiting_delivery: "awaiting_delivery";
|
|
25
|
+
delivered: "delivered";
|
|
26
|
+
settle_unknown: "settle_unknown";
|
|
27
|
+
provider_rejected: "provider_rejected";
|
|
28
|
+
}>;
|
|
29
|
+
checkout_session_id: zod.ZodUUID;
|
|
30
|
+
delivered: zod.ZodBoolean;
|
|
31
|
+
billing_settled: zod.ZodBoolean;
|
|
32
|
+
}, zod.z.core.$strict>;
|
|
33
|
+
export type Purchase = zod.input<typeof Purchase>;
|
|
34
|
+
export type PurchaseOutput = zod.output<typeof Purchase>;
|
|
@@ -0,0 +1,34 @@
|
|
|
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 const purchaseIdRegExp = new RegExp("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$");
|
|
10
|
+
export const purchaseCheckoutSessionIdRegExp = 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 Purchase = zod
|
|
12
|
+
.strictObject({
|
|
13
|
+
id: zod.uuid().regex(purchaseIdRegExp),
|
|
14
|
+
state: zod.enum([
|
|
15
|
+
"submitted",
|
|
16
|
+
"checkout_create_reserved",
|
|
17
|
+
"checkout_unknown",
|
|
18
|
+
"checkout_open",
|
|
19
|
+
"order_ready",
|
|
20
|
+
"accept_unknown",
|
|
21
|
+
"accepted",
|
|
22
|
+
"create_unknown",
|
|
23
|
+
"awaiting_delivery",
|
|
24
|
+
"delivered",
|
|
25
|
+
"settle_unknown",
|
|
26
|
+
"completed",
|
|
27
|
+
"rejected",
|
|
28
|
+
"provider_rejected",
|
|
29
|
+
]),
|
|
30
|
+
checkout_session_id: zod.uuid().regex(purchaseCheckoutSessionIdRegExp),
|
|
31
|
+
delivered: zod.boolean(),
|
|
32
|
+
billing_settled: zod.boolean(),
|
|
33
|
+
})
|
|
34
|
+
.describe("Durable purchase progress. delivered and billing_settled describe different facts. Acceptance is not cloud delivery or checkout completion.");
|
|
@@ -0,0 +1,27 @@
|
|
|
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 purchaseCreateCatalogRevisionMax = 9007199254740991;
|
|
10
|
+
export declare const purchaseCreateProviderPlanIdMax = 256;
|
|
11
|
+
export declare const purchaseCreateBillingPriceIdRegExp: RegExp;
|
|
12
|
+
export declare const purchaseCreateImageIdMax = 256;
|
|
13
|
+
export declare const purchaseCreateRegionIdMax = 128;
|
|
14
|
+
export declare const PurchaseCreate: zod.ZodObject<{
|
|
15
|
+
catalog_revision: zod.ZodInt;
|
|
16
|
+
provider_plan_id: zod.ZodString;
|
|
17
|
+
billing_price_id: zod.ZodUUID;
|
|
18
|
+
image_id: zod.ZodString;
|
|
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
|
+
region_id: zod.ZodString;
|
|
25
|
+
}, zod.z.core.$strict>;
|
|
26
|
+
export type PurchaseCreate = zod.input<typeof PurchaseCreate>;
|
|
27
|
+
export type PurchaseCreateOutput = zod.output<typeof PurchaseCreate>;
|
|
@@ -0,0 +1,23 @@
|
|
|
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 { ExpectedQuote } from "./expectedQuote.zod.js";
|
|
10
|
+
export const purchaseCreateCatalogRevisionMax = 9007199254740991;
|
|
11
|
+
export const purchaseCreateProviderPlanIdMax = 256;
|
|
12
|
+
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}$");
|
|
13
|
+
export const purchaseCreateImageIdMax = 256;
|
|
14
|
+
export const purchaseCreateRegionIdMax = 128;
|
|
15
|
+
export const PurchaseCreate = zod.strictObject({
|
|
16
|
+
catalog_revision: zod.int().min(1).max(purchaseCreateCatalogRevisionMax),
|
|
17
|
+
provider_plan_id: zod.string().min(1).max(purchaseCreateProviderPlanIdMax),
|
|
18
|
+
billing_price_id: zod.uuid().regex(purchaseCreateBillingPriceIdRegExp),
|
|
19
|
+
image_id: zod.string().min(1).max(purchaseCreateImageIdMax),
|
|
20
|
+
quantity: zod.literal(1),
|
|
21
|
+
expected_quote: ExpectedQuote,
|
|
22
|
+
region_id: zod.string().min(1).max(purchaseCreateRegionIdMax),
|
|
23
|
+
});
|