@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,87 @@
|
|
|
1
|
+
export const PurchaseState = {
|
|
2
|
+
submitted: "submitted",
|
|
3
|
+
checkout_create_reserved: "checkout_create_reserved",
|
|
4
|
+
checkout_unknown: "checkout_unknown",
|
|
5
|
+
checkout_open: "checkout_open",
|
|
6
|
+
order_ready: "order_ready",
|
|
7
|
+
accept_unknown: "accept_unknown",
|
|
8
|
+
accepted: "accepted",
|
|
9
|
+
create_unknown: "create_unknown",
|
|
10
|
+
awaiting_delivery: "awaiting_delivery",
|
|
11
|
+
delivered: "delivered",
|
|
12
|
+
settle_unknown: "settle_unknown",
|
|
13
|
+
completed: "completed",
|
|
14
|
+
rejected: "rejected",
|
|
15
|
+
provider_rejected: "provider_rejected",
|
|
16
|
+
};
|
|
17
|
+
export const PricePeriodMonths = {
|
|
18
|
+
NUMBER_1: 1,
|
|
19
|
+
NUMBER_3: 3,
|
|
20
|
+
NUMBER_6: 6,
|
|
21
|
+
NUMBER_12: 12,
|
|
22
|
+
NUMBER_24: 24,
|
|
23
|
+
NUMBER_36: 36,
|
|
24
|
+
};
|
|
25
|
+
export const InstancePricePeriodMonths = {
|
|
26
|
+
NUMBER_1: 1,
|
|
27
|
+
NUMBER_3: 3,
|
|
28
|
+
NUMBER_6: 6,
|
|
29
|
+
NUMBER_12: 12,
|
|
30
|
+
NUMBER_24: 24,
|
|
31
|
+
NUMBER_36: 36,
|
|
32
|
+
};
|
|
33
|
+
export const InstanceCapabilitiesValue = {
|
|
34
|
+
manage: false,
|
|
35
|
+
customer_refund: false,
|
|
36
|
+
supplier_refund: false,
|
|
37
|
+
release: false,
|
|
38
|
+
};
|
|
39
|
+
export const InstanceStatus = {
|
|
40
|
+
Pending: "Pending",
|
|
41
|
+
Starting: "Starting",
|
|
42
|
+
Running: "Running",
|
|
43
|
+
Stopping: "Stopping",
|
|
44
|
+
Stopped: "Stopped",
|
|
45
|
+
Resetting: "Resetting",
|
|
46
|
+
Upgrading: "Upgrading",
|
|
47
|
+
Disabled: "Disabled",
|
|
48
|
+
Unknown: "Unknown",
|
|
49
|
+
};
|
|
50
|
+
export const InstanceBusinessStatus = {
|
|
51
|
+
Normal: "Normal",
|
|
52
|
+
Expired: "Expired",
|
|
53
|
+
Overdue: "Overdue",
|
|
54
|
+
Unknown: "Unknown",
|
|
55
|
+
};
|
|
56
|
+
export const InstanceObservation = {
|
|
57
|
+
present: "present",
|
|
58
|
+
missing: "missing",
|
|
59
|
+
};
|
|
60
|
+
export const ManagementOperationAction = {
|
|
61
|
+
start: "start",
|
|
62
|
+
stop: "stop",
|
|
63
|
+
reboot: "reboot",
|
|
64
|
+
};
|
|
65
|
+
export const ManagementOperationState = {
|
|
66
|
+
queued: "queued",
|
|
67
|
+
dispatch_unknown: "dispatch_unknown",
|
|
68
|
+
provider_ack: "provider_ack",
|
|
69
|
+
completed: "completed",
|
|
70
|
+
};
|
|
71
|
+
export const ManagementOperationLastObservedStatus = {
|
|
72
|
+
Stopped: "Stopped",
|
|
73
|
+
Running: "Running",
|
|
74
|
+
Starting: "Starting",
|
|
75
|
+
};
|
|
76
|
+
export const SupplierRefundProgressValue = {
|
|
77
|
+
state: "not_observed",
|
|
78
|
+
reason: "supplier_refund_not_queried",
|
|
79
|
+
};
|
|
80
|
+
export const RefundProgressCancellationState = {
|
|
81
|
+
requested: "requested",
|
|
82
|
+
scheduled: "scheduled",
|
|
83
|
+
releasing: "releasing",
|
|
84
|
+
completed: "completed",
|
|
85
|
+
canceled: "canceled",
|
|
86
|
+
failed: "failed",
|
|
87
|
+
};
|
|
@@ -0,0 +1,117 @@
|
|
|
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
|
+
/**
|
|
10
|
+
* Lists available plans and prices for the requested region. A plan without a price is not available to buy.
|
|
11
|
+
* @summary List plans
|
|
12
|
+
*/
|
|
13
|
+
export declare const listPlansQueryRegionIdMax = 128;
|
|
14
|
+
export declare const ListPlansQueryParams: zod.ZodObject<{
|
|
15
|
+
region_id: zod.ZodString;
|
|
16
|
+
}, zod.z.core.$strict>;
|
|
17
|
+
/**
|
|
18
|
+
* Creates a purchase using the current catalog revision and expected price. Reuse the same Idempotency-Key after a timeout. Acceptance is not confirmation of payment or instance delivery.
|
|
19
|
+
* @summary Create purchase
|
|
20
|
+
*/
|
|
21
|
+
export declare const createPurchaseHeaderIdempotencyKeyMax = 128;
|
|
22
|
+
export declare const CreatePurchaseHeader: zod.ZodObject<{
|
|
23
|
+
"Idempotency-Key": zod.ZodString;
|
|
24
|
+
}, zod.z.core.$strict>;
|
|
25
|
+
export declare const CreatePurchaseBody: zod.ZodObject<{
|
|
26
|
+
catalog_revision: zod.ZodInt;
|
|
27
|
+
provider_plan_id: zod.ZodString;
|
|
28
|
+
billing_price_id: zod.ZodUUID;
|
|
29
|
+
image_id: zod.ZodString;
|
|
30
|
+
quantity: zod.ZodLiteral<1>;
|
|
31
|
+
expected_quote: zod.ZodObject<{
|
|
32
|
+
currency: zod.ZodLiteral<"USD">;
|
|
33
|
+
amount: zod.ZodIntersection<zod.ZodString, zod.ZodString>;
|
|
34
|
+
}, zod.z.core.$strict>;
|
|
35
|
+
region_id: zod.ZodString;
|
|
36
|
+
}, zod.z.core.$strict>;
|
|
37
|
+
/**
|
|
38
|
+
* Returns purchase, delivery and Billing progress. Payment and instance delivery may finish at different times.
|
|
39
|
+
* @summary Get purchase
|
|
40
|
+
*/
|
|
41
|
+
export declare const getPurchasePathPurchaseIdRegExp: RegExp;
|
|
42
|
+
export declare const GetPurchaseParams: zod.ZodObject<{
|
|
43
|
+
purchaseId: zod.ZodUUID;
|
|
44
|
+
}, zod.z.core.$strict>;
|
|
45
|
+
/**
|
|
46
|
+
* Lists the current project's instances in the requested region. Pagination uses page and page_size; total_count is returned when known.
|
|
47
|
+
* @summary List instances
|
|
48
|
+
*/
|
|
49
|
+
export declare const listInstancesQueryRegionIdMax = 128;
|
|
50
|
+
export declare const listInstancesQueryPageDefault = 1;
|
|
51
|
+
export declare const listInstancesQueryPageMax = 2147483647;
|
|
52
|
+
export declare const listInstancesQueryPageSizeDefault = 50;
|
|
53
|
+
export declare const listInstancesQueryPageSizeMax = 200;
|
|
54
|
+
export declare const ListInstancesQueryParams: zod.ZodObject<{
|
|
55
|
+
region_id: zod.ZodString;
|
|
56
|
+
page: zod.ZodDefault<zod.ZodInt>;
|
|
57
|
+
page_size: zod.ZodDefault<zod.ZodInt>;
|
|
58
|
+
}, zod.z.core.$strict>;
|
|
59
|
+
/**
|
|
60
|
+
* Returns an instance and its most recently observed status.
|
|
61
|
+
* @summary Get instance
|
|
62
|
+
*/
|
|
63
|
+
export declare const GetInstanceParams: zod.ZodObject<{
|
|
64
|
+
instanceId: zod.ZodUUID;
|
|
65
|
+
}, zod.z.core.$strict>;
|
|
66
|
+
/**
|
|
67
|
+
* Starts an existing instance. Returns an operation to poll; acceptance is not completion.
|
|
68
|
+
* @summary Start instance
|
|
69
|
+
*/
|
|
70
|
+
export declare const StartInstanceParams: zod.ZodObject<{
|
|
71
|
+
instanceId: zod.ZodUUID;
|
|
72
|
+
}, zod.z.core.$strict>;
|
|
73
|
+
export declare const startInstanceHeaderIdempotencyKeyMax = 128;
|
|
74
|
+
export declare const StartInstanceHeader: zod.ZodObject<{
|
|
75
|
+
"Idempotency-Key": zod.ZodString;
|
|
76
|
+
}, zod.z.core.$strict>;
|
|
77
|
+
export declare const StartInstanceBody: zod.ZodObject<{}, zod.z.core.$strict>;
|
|
78
|
+
/**
|
|
79
|
+
* Returns management progress for the specified instance. Unknown progress is not confirmation of success; do not repeat an operation solely because its outcome is unknown.
|
|
80
|
+
* @summary Get instance operation
|
|
81
|
+
*/
|
|
82
|
+
export declare const GetInstanceOperationParams: zod.ZodObject<{
|
|
83
|
+
instanceId: zod.ZodUUID;
|
|
84
|
+
operationId: zod.ZodUUID;
|
|
85
|
+
}, zod.z.core.$strict>;
|
|
86
|
+
/**
|
|
87
|
+
* Stops an existing instance. Returns an operation to poll; acceptance is not completion.
|
|
88
|
+
* @summary Stop instance
|
|
89
|
+
*/
|
|
90
|
+
export declare const StopInstanceParams: zod.ZodObject<{
|
|
91
|
+
instanceId: zod.ZodUUID;
|
|
92
|
+
}, zod.z.core.$strict>;
|
|
93
|
+
export declare const stopInstanceHeaderIdempotencyKeyMax = 128;
|
|
94
|
+
export declare const StopInstanceHeader: zod.ZodObject<{
|
|
95
|
+
"Idempotency-Key": zod.ZodString;
|
|
96
|
+
}, zod.z.core.$strict>;
|
|
97
|
+
export declare const StopInstanceBody: zod.ZodObject<{}, zod.z.core.$strict>;
|
|
98
|
+
/**
|
|
99
|
+
* Returns cancellation and refund progress for the specified instance. Unknown refund amounts and currencies are null. A completed cancellation does not confirm that money has been returned.
|
|
100
|
+
* @summary Get cancellation refund progress
|
|
101
|
+
*/
|
|
102
|
+
export declare const GetCancellationRefundProgressParams: zod.ZodObject<{
|
|
103
|
+
instanceId: zod.ZodUUID;
|
|
104
|
+
cancellationId: zod.ZodUUID;
|
|
105
|
+
}, zod.z.core.$strict>;
|
|
106
|
+
/**
|
|
107
|
+
* Reboots an existing instance. Returns an operation to poll; an unchanged Running status does not confirm completion.
|
|
108
|
+
* @summary Reboot instance
|
|
109
|
+
*/
|
|
110
|
+
export declare const RebootInstanceParams: zod.ZodObject<{
|
|
111
|
+
instanceId: zod.ZodUUID;
|
|
112
|
+
}, zod.z.core.$strict>;
|
|
113
|
+
export declare const rebootInstanceHeaderIdempotencyKeyMax = 128;
|
|
114
|
+
export declare const RebootInstanceHeader: zod.ZodObject<{
|
|
115
|
+
"Idempotency-Key": zod.ZodString;
|
|
116
|
+
}, zod.z.core.$strict>;
|
|
117
|
+
export declare const RebootInstanceBody: zod.ZodObject<{}, zod.z.core.$strict>;
|
|
@@ -0,0 +1,120 @@
|
|
|
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 { PurchaseCreate } from "./validators/purchaseCreate.zod.js";
|
|
10
|
+
import { RebootInstance } from "./validators/rebootInstance.zod.js";
|
|
11
|
+
import { StartInstance } from "./validators/startInstance.zod.js";
|
|
12
|
+
import { StopInstance } from "./validators/stopInstance.zod.js";
|
|
13
|
+
/**
|
|
14
|
+
* Lists available plans and prices for the requested region. A plan without a price is not available to buy.
|
|
15
|
+
* @summary List plans
|
|
16
|
+
*/
|
|
17
|
+
export const listPlansQueryRegionIdMax = 128;
|
|
18
|
+
export const ListPlansQueryParams = zod.strictObject({
|
|
19
|
+
region_id: zod.string().min(1).max(listPlansQueryRegionIdMax),
|
|
20
|
+
});
|
|
21
|
+
/**
|
|
22
|
+
* Creates a purchase using the current catalog revision and expected price. Reuse the same Idempotency-Key after a timeout. Acceptance is not confirmation of payment or instance delivery.
|
|
23
|
+
* @summary Create purchase
|
|
24
|
+
*/
|
|
25
|
+
export const createPurchaseHeaderIdempotencyKeyMax = 128;
|
|
26
|
+
export const CreatePurchaseHeader = zod.strictObject({
|
|
27
|
+
"Idempotency-Key": zod.string().min(1).max(createPurchaseHeaderIdempotencyKeyMax),
|
|
28
|
+
});
|
|
29
|
+
export const CreatePurchaseBody = PurchaseCreate;
|
|
30
|
+
/**
|
|
31
|
+
* Returns purchase, delivery and Billing progress. Payment and instance delivery may finish at different times.
|
|
32
|
+
* @summary Get purchase
|
|
33
|
+
*/
|
|
34
|
+
export const getPurchasePathPurchaseIdRegExp = new RegExp("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$");
|
|
35
|
+
export const GetPurchaseParams = zod.strictObject({
|
|
36
|
+
purchaseId: zod.uuid().regex(getPurchasePathPurchaseIdRegExp),
|
|
37
|
+
});
|
|
38
|
+
/**
|
|
39
|
+
* Lists the current project's instances in the requested region. Pagination uses page and page_size; total_count is returned when known.
|
|
40
|
+
* @summary List instances
|
|
41
|
+
*/
|
|
42
|
+
export const listInstancesQueryRegionIdMax = 128;
|
|
43
|
+
export const listInstancesQueryPageDefault = 1;
|
|
44
|
+
export const listInstancesQueryPageMax = 2147483647;
|
|
45
|
+
export const listInstancesQueryPageSizeDefault = 50;
|
|
46
|
+
export const listInstancesQueryPageSizeMax = 200;
|
|
47
|
+
export const ListInstancesQueryParams = zod.strictObject({
|
|
48
|
+
region_id: zod.string().min(1).max(listInstancesQueryRegionIdMax),
|
|
49
|
+
page: zod
|
|
50
|
+
.int()
|
|
51
|
+
.min(1)
|
|
52
|
+
.max(listInstancesQueryPageMax)
|
|
53
|
+
.default(listInstancesQueryPageDefault)
|
|
54
|
+
.describe("1-based page number. Defaults to 1."),
|
|
55
|
+
page_size: zod
|
|
56
|
+
.int()
|
|
57
|
+
.min(1)
|
|
58
|
+
.max(listInstancesQueryPageSizeMax)
|
|
59
|
+
.default(listInstancesQueryPageSizeDefault)
|
|
60
|
+
.describe("Items per page. Defaults to 50; at most 200."),
|
|
61
|
+
});
|
|
62
|
+
/**
|
|
63
|
+
* Returns an instance and its most recently observed status.
|
|
64
|
+
* @summary Get instance
|
|
65
|
+
*/
|
|
66
|
+
export const GetInstanceParams = zod.strictObject({
|
|
67
|
+
instanceId: zod.uuid(),
|
|
68
|
+
});
|
|
69
|
+
/**
|
|
70
|
+
* Starts an existing instance. Returns an operation to poll; acceptance is not completion.
|
|
71
|
+
* @summary Start instance
|
|
72
|
+
*/
|
|
73
|
+
export const StartInstanceParams = zod.strictObject({
|
|
74
|
+
instanceId: zod.uuid(),
|
|
75
|
+
});
|
|
76
|
+
export const startInstanceHeaderIdempotencyKeyMax = 128;
|
|
77
|
+
export const StartInstanceHeader = zod.strictObject({
|
|
78
|
+
"Idempotency-Key": zod.string().min(1).max(startInstanceHeaderIdempotencyKeyMax),
|
|
79
|
+
});
|
|
80
|
+
export const StartInstanceBody = StartInstance;
|
|
81
|
+
/**
|
|
82
|
+
* Returns management progress for the specified instance. Unknown progress is not confirmation of success; do not repeat an operation solely because its outcome is unknown.
|
|
83
|
+
* @summary Get instance operation
|
|
84
|
+
*/
|
|
85
|
+
export const GetInstanceOperationParams = zod.strictObject({
|
|
86
|
+
instanceId: zod.uuid(),
|
|
87
|
+
operationId: zod.uuid(),
|
|
88
|
+
});
|
|
89
|
+
/**
|
|
90
|
+
* Stops an existing instance. Returns an operation to poll; acceptance is not completion.
|
|
91
|
+
* @summary Stop instance
|
|
92
|
+
*/
|
|
93
|
+
export const StopInstanceParams = zod.strictObject({
|
|
94
|
+
instanceId: zod.uuid(),
|
|
95
|
+
});
|
|
96
|
+
export const stopInstanceHeaderIdempotencyKeyMax = 128;
|
|
97
|
+
export const StopInstanceHeader = zod.strictObject({
|
|
98
|
+
"Idempotency-Key": zod.string().min(1).max(stopInstanceHeaderIdempotencyKeyMax),
|
|
99
|
+
});
|
|
100
|
+
export const StopInstanceBody = StopInstance;
|
|
101
|
+
/**
|
|
102
|
+
* Returns cancellation and refund progress for the specified instance. Unknown refund amounts and currencies are null. A completed cancellation does not confirm that money has been returned.
|
|
103
|
+
* @summary Get cancellation refund progress
|
|
104
|
+
*/
|
|
105
|
+
export const GetCancellationRefundProgressParams = zod.strictObject({
|
|
106
|
+
instanceId: zod.uuid(),
|
|
107
|
+
cancellationId: zod.uuid(),
|
|
108
|
+
});
|
|
109
|
+
/**
|
|
110
|
+
* Reboots an existing instance. Returns an operation to poll; an unchanged Running status does not confirm completion.
|
|
111
|
+
* @summary Reboot instance
|
|
112
|
+
*/
|
|
113
|
+
export const RebootInstanceParams = zod.strictObject({
|
|
114
|
+
instanceId: zod.uuid(),
|
|
115
|
+
});
|
|
116
|
+
export const rebootInstanceHeaderIdempotencyKeyMax = 128;
|
|
117
|
+
export const RebootInstanceHeader = zod.strictObject({
|
|
118
|
+
"Idempotency-Key": zod.string().min(1).max(rebootInstanceHeaderIdempotencyKeyMax),
|
|
119
|
+
});
|
|
120
|
+
export const RebootInstanceBody = RebootInstance;
|
|
@@ -0,0 +1,32 @@
|
|
|
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 Catalog: zod.ZodObject<{
|
|
10
|
+
items: zod.ZodArray<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
|
+
source_observed_at: zod.z.ZodISODateTime;
|
|
29
|
+
complete: zod.ZodBoolean;
|
|
30
|
+
}, zod.z.core.$strict>;
|
|
31
|
+
export type Catalog = zod.input<typeof Catalog>;
|
|
32
|
+
export type CatalogOutput = zod.output<typeof Catalog>;
|
|
@@ -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
|
+
import { Plan } from "./plan.zod.js";
|
|
10
|
+
export const Catalog = zod
|
|
11
|
+
.strictObject({
|
|
12
|
+
items: zod.array(Plan),
|
|
13
|
+
source_observed_at: zod.iso.datetime({ offset: true }).describe("UTC RFC 3339 timestamp."),
|
|
14
|
+
complete: zod.boolean(),
|
|
15
|
+
})
|
|
16
|
+
.describe("Bounded catalog snapshot for one requested region. Incomplete or unavailable price information is not a purchasable offer.");
|
|
@@ -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 createPurchaseHeadersIdempotencyKeyMax = 128;
|
|
10
|
+
export declare const CreatePurchaseHeaders: zod.ZodObject<{
|
|
11
|
+
"Idempotency-Key": zod.ZodString;
|
|
12
|
+
}, zod.z.core.$strict>;
|
|
13
|
+
export type CreatePurchaseHeaders = zod.input<typeof CreatePurchaseHeaders>;
|
|
14
|
+
export type CreatePurchaseHeadersOutput = zod.output<typeof CreatePurchaseHeaders>;
|
|
@@ -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 createPurchaseHeadersIdempotencyKeyMax = 128;
|
|
10
|
+
export const CreatePurchaseHeaders = zod.strictObject({
|
|
11
|
+
"Idempotency-Key": zod.string().min(1).max(createPurchaseHeadersIdempotencyKeyMax),
|
|
12
|
+
});
|
|
@@ -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 CursorPagination: zod.ZodObject<{
|
|
10
|
+
page_size: zod.ZodInt;
|
|
11
|
+
next_cursor: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
|
|
12
|
+
}, zod.z.core.$strict>;
|
|
13
|
+
export type CursorPagination = zod.input<typeof CursorPagination>;
|
|
14
|
+
export type CursorPaginationOutput = zod.output<typeof CursorPagination>;
|
|
@@ -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 CursorPagination = zod
|
|
10
|
+
.strictObject({
|
|
11
|
+
page_size: zod.int().min(1),
|
|
12
|
+
next_cursor: zod.string().nullish(),
|
|
13
|
+
})
|
|
14
|
+
.describe("Pagination metadata for keyset traversal. Pass next_cursor as cursor to read the following page; null means there is no following page.");
|
|
@@ -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 CustomerRefundProgress: zod.ZodObject<{
|
|
10
|
+
state: zod.ZodLiteral<"unknown">;
|
|
11
|
+
reason: zod.ZodLiteral<"billing_refund_reader_unavailable">;
|
|
12
|
+
amount: zod.ZodNull;
|
|
13
|
+
currency: zod.ZodNull;
|
|
14
|
+
}, zod.z.core.$strict>;
|
|
15
|
+
export type CustomerRefundProgress = zod.input<typeof CustomerRefundProgress>;
|
|
16
|
+
export type CustomerRefundProgressOutput = zod.output<typeof CustomerRefundProgress>;
|
|
@@ -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 CustomerRefundProgress = zod.strictObject({
|
|
10
|
+
state: zod.literal("unknown"),
|
|
11
|
+
reason: zod.literal("billing_refund_reader_unavailable"),
|
|
12
|
+
amount: zod.null(),
|
|
13
|
+
currency: zod.null(),
|
|
14
|
+
});
|
|
@@ -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 declare const decimalAmountTwoRegExp: RegExp;
|
|
10
|
+
export declare const DecimalAmount: zod.ZodIntersection<zod.ZodString, zod.ZodString>;
|
|
11
|
+
export type DecimalAmount = zod.input<typeof DecimalAmount>;
|
|
12
|
+
export type DecimalAmountOutput = zod.output<typeof DecimalAmount>;
|
|
@@ -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
|
+
import { Money } from "./money.zod.js";
|
|
10
|
+
export const decimalAmountTwoRegExp = new RegExp("^(0|[1-9][0-9]{0,14})(\\.[0-9]{1,10})?$");
|
|
11
|
+
export const DecimalAmount = Money.and(zod.string().regex(decimalAmountTwoRegExp)).describe("A non-negative decimal amount with at most 15 integer digits and 10 fractional digits.");
|
|
@@ -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 Error: zod.ZodObject<{
|
|
10
|
+
code: zod.ZodOptional<zod.ZodString>;
|
|
11
|
+
message: zod.ZodString;
|
|
12
|
+
meta: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodUnknown>>;
|
|
13
|
+
status: zod.ZodInt;
|
|
14
|
+
}, zod.z.core.$strict>;
|
|
15
|
+
export type Error = zod.input<typeof Error>;
|
|
16
|
+
export type ErrorOutput = zod.output<typeof Error>;
|
|
@@ -0,0 +1,17 @@
|
|
|
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 Error = zod.strictObject({
|
|
10
|
+
code: zod.string().optional(),
|
|
11
|
+
message: zod.string(),
|
|
12
|
+
meta: zod
|
|
13
|
+
.record(zod.string(), zod.unknown())
|
|
14
|
+
.optional()
|
|
15
|
+
.describe("What a given `code` carries alongside the message. The keys depend on the code,\nand a client that does not recognise one ignores it."),
|
|
16
|
+
status: zod.int(),
|
|
17
|
+
});
|
|
@@ -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 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>;
|
|
@@ -0,0 +1,13 @@
|
|
|
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
|
+
});
|
|
@@ -0,0 +1,58 @@
|
|
|
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 instanceRegionIdMax = 128;
|
|
10
|
+
export declare const instanceProviderPlanIdMax = 128;
|
|
11
|
+
export declare const instanceImageIdMax = 128;
|
|
12
|
+
export declare const instanceSyncRevisionMax = 9007199254740991;
|
|
13
|
+
export declare const Instance: zod.ZodObject<{
|
|
14
|
+
id: zod.ZodUUID;
|
|
15
|
+
purchase_id: zod.ZodUUID;
|
|
16
|
+
project_id: zod.ZodUUID;
|
|
17
|
+
region_id: zod.ZodString;
|
|
18
|
+
provider_plan_id: zod.ZodString;
|
|
19
|
+
image_id: zod.ZodString;
|
|
20
|
+
status: zod.ZodEnum<{
|
|
21
|
+
Pending: "Pending";
|
|
22
|
+
Starting: "Starting";
|
|
23
|
+
Running: "Running";
|
|
24
|
+
Stopping: "Stopping";
|
|
25
|
+
Stopped: "Stopped";
|
|
26
|
+
Resetting: "Resetting";
|
|
27
|
+
Upgrading: "Upgrading";
|
|
28
|
+
Disabled: "Disabled";
|
|
29
|
+
Unknown: "Unknown";
|
|
30
|
+
}>;
|
|
31
|
+
business_status: zod.ZodEnum<{
|
|
32
|
+
Unknown: "Unknown";
|
|
33
|
+
Normal: "Normal";
|
|
34
|
+
Expired: "Expired";
|
|
35
|
+
Overdue: "Overdue";
|
|
36
|
+
}>;
|
|
37
|
+
observation: zod.ZodEnum<{
|
|
38
|
+
present: "present";
|
|
39
|
+
missing: "missing";
|
|
40
|
+
}>;
|
|
41
|
+
created_at: zod.ZodUnion<readonly [zod.z.ZodISODateTime, zod.ZodNull]>;
|
|
42
|
+
expires_at: zod.ZodUnion<readonly [zod.z.ZodISODateTime, zod.ZodNull]>;
|
|
43
|
+
original_price: zod.ZodObject<{
|
|
44
|
+
currency: zod.ZodLiteral<"USD">;
|
|
45
|
+
amount: zod.ZodIntersection<zod.ZodString, zod.ZodString>;
|
|
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
|
+
}, zod.z.core.$strict>;
|
|
48
|
+
source_observed_at: zod.z.ZodISODateTime;
|
|
49
|
+
sync_revision: zod.ZodInt;
|
|
50
|
+
capabilities: zod.ZodObject<{
|
|
51
|
+
manage: zod.ZodLiteral<false>;
|
|
52
|
+
customer_refund: zod.ZodLiteral<false>;
|
|
53
|
+
supplier_refund: zod.ZodLiteral<false>;
|
|
54
|
+
release: zod.ZodLiteral<false>;
|
|
55
|
+
}, zod.z.core.$strict>;
|
|
56
|
+
}, zod.z.core.$strict>;
|
|
57
|
+
export type Instance = zod.input<typeof Instance>;
|
|
58
|
+
export type InstanceOutput = zod.output<typeof Instance>;
|