@leaflow/sdk 0.170.0 → 0.172.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (85) hide show
  1. package/dist/compute/v2/generated/functions.d.ts +1 -1
  2. package/dist/compute/v2/generated/functions.js +1 -1
  3. package/dist/compute/v2/generated/models.d.ts +3 -5
  4. package/dist/compute/v2/generated/schemas.zod.d.ts +1 -1
  5. package/dist/compute/v2/generated/schemas.zod.js +1 -1
  6. package/dist/compute/v2/generated/validators/createElasticIPRequestBody.zod.js +1 -1
  7. package/dist/compute/v2/generated/validators/elasticIPLine.zod.d.ts +0 -1
  8. package/dist/compute/v2/generated/validators/elasticIPLine.zod.js +0 -3
  9. package/dist/compute/v2/generated/validators/elasticIPLineListResponseBody.zod.d.ts +0 -1
  10. package/dist/compute/v2/generated/validators/newElasticIP.zod.js +1 -1
  11. package/dist/index.d.ts +1 -0
  12. package/dist/index.js +1 -0
  13. package/dist/routes.d.ts +80 -0
  14. package/dist/routes.js +90 -0
  15. package/dist/swas/v1/generated/functions.d.ts +418 -0
  16. package/dist/swas/v1/generated/functions.js +250 -0
  17. package/dist/swas/v1/generated/models.d.ts +384 -0
  18. package/dist/swas/v1/generated/models.js +87 -0
  19. package/dist/swas/v1/generated/schemas.zod.d.ts +117 -0
  20. package/dist/swas/v1/generated/schemas.zod.js +120 -0
  21. package/dist/swas/v1/generated/validators/catalog.zod.d.ts +32 -0
  22. package/dist/swas/v1/generated/validators/catalog.zod.js +16 -0
  23. package/dist/swas/v1/generated/validators/createPurchaseHeaders.zod.d.ts +14 -0
  24. package/dist/swas/v1/generated/validators/createPurchaseHeaders.zod.js +12 -0
  25. package/dist/swas/v1/generated/validators/cursorPagination.zod.d.ts +14 -0
  26. package/dist/swas/v1/generated/validators/cursorPagination.zod.js +14 -0
  27. package/dist/swas/v1/generated/validators/customerRefundProgress.zod.d.ts +16 -0
  28. package/dist/swas/v1/generated/validators/customerRefundProgress.zod.js +14 -0
  29. package/dist/swas/v1/generated/validators/decimalAmount.zod.d.ts +12 -0
  30. package/dist/swas/v1/generated/validators/decimalAmount.zod.js +11 -0
  31. package/dist/swas/v1/generated/validators/error.zod.d.ts +16 -0
  32. package/dist/swas/v1/generated/validators/error.zod.js +17 -0
  33. package/dist/swas/v1/generated/validators/expectedQuote.zod.d.ts +14 -0
  34. package/dist/swas/v1/generated/validators/expectedQuote.zod.js +13 -0
  35. package/dist/swas/v1/generated/validators/instance.zod.d.ts +58 -0
  36. package/dist/swas/v1/generated/validators/instance.zod.js +47 -0
  37. package/dist/swas/v1/generated/validators/instanceCapabilities.zod.d.ts +16 -0
  38. package/dist/swas/v1/generated/validators/instanceCapabilities.zod.js +14 -0
  39. package/dist/swas/v1/generated/validators/instanceList.zod.d.ts +62 -0
  40. package/dist/swas/v1/generated/validators/instanceList.zod.js +15 -0
  41. package/dist/swas/v1/generated/validators/instancePagination.zod.d.ts +15 -0
  42. package/dist/swas/v1/generated/validators/instancePagination.zod.js +10 -0
  43. package/dist/swas/v1/generated/validators/instancePrice.zod.d.ts +15 -0
  44. package/dist/swas/v1/generated/validators/instancePrice.zod.js +21 -0
  45. package/dist/swas/v1/generated/validators/listInstancesParams.zod.d.ts +20 -0
  46. package/dist/swas/v1/generated/validators/listInstancesParams.zod.js +22 -0
  47. package/dist/swas/v1/generated/validators/listPlansParams.zod.d.ts +14 -0
  48. package/dist/swas/v1/generated/validators/listPlansParams.zod.js +12 -0
  49. package/dist/swas/v1/generated/validators/managementOperation.zod.d.ts +36 -0
  50. package/dist/swas/v1/generated/validators/managementOperation.zod.js +21 -0
  51. package/dist/swas/v1/generated/validators/money.zod.d.ts +11 -0
  52. package/dist/swas/v1/generated/validators/money.zod.js +11 -0
  53. package/dist/swas/v1/generated/validators/offsetPagination.zod.d.ts +16 -0
  54. package/dist/swas/v1/generated/validators/offsetPagination.zod.js +16 -0
  55. package/dist/swas/v1/generated/validators/plan.zod.d.ts +29 -0
  56. package/dist/swas/v1/generated/validators/plan.zod.js +22 -0
  57. package/dist/swas/v1/generated/validators/price.zod.d.ts +19 -0
  58. package/dist/swas/v1/generated/validators/price.zod.js +28 -0
  59. package/dist/swas/v1/generated/validators/purchase.zod.d.ts +34 -0
  60. package/dist/swas/v1/generated/validators/purchase.zod.js +34 -0
  61. package/dist/swas/v1/generated/validators/purchaseCreate.zod.d.ts +27 -0
  62. package/dist/swas/v1/generated/validators/purchaseCreate.zod.js +23 -0
  63. package/dist/swas/v1/generated/validators/rebootCycle.zod.d.ts +14 -0
  64. package/dist/swas/v1/generated/validators/rebootCycle.zod.js +17 -0
  65. package/dist/swas/v1/generated/validators/rebootInstance.zod.d.ts +11 -0
  66. package/dist/swas/v1/generated/validators/rebootInstance.zod.js +9 -0
  67. package/dist/swas/v1/generated/validators/rebootInstanceHeaders.zod.d.ts +14 -0
  68. package/dist/swas/v1/generated/validators/rebootInstanceHeaders.zod.js +12 -0
  69. package/dist/swas/v1/generated/validators/refundProgress.zod.d.ts +33 -0
  70. package/dist/swas/v1/generated/validators/refundProgress.zod.js +27 -0
  71. package/dist/swas/v1/generated/validators/startInstance.zod.d.ts +11 -0
  72. package/dist/swas/v1/generated/validators/startInstance.zod.js +9 -0
  73. package/dist/swas/v1/generated/validators/startInstanceHeaders.zod.d.ts +14 -0
  74. package/dist/swas/v1/generated/validators/startInstanceHeaders.zod.js +12 -0
  75. package/dist/swas/v1/generated/validators/stopInstance.zod.d.ts +11 -0
  76. package/dist/swas/v1/generated/validators/stopInstance.zod.js +9 -0
  77. package/dist/swas/v1/generated/validators/stopInstanceHeaders.zod.d.ts +14 -0
  78. package/dist/swas/v1/generated/validators/stopInstanceHeaders.zod.js +12 -0
  79. package/dist/swas/v1/generated/validators/supplierRefundProgress.zod.d.ts +14 -0
  80. package/dist/swas/v1/generated/validators/supplierRefundProgress.zod.js +12 -0
  81. package/dist/swas/v1/index.d.ts +4 -0
  82. package/dist/swas/v1/index.js +4 -0
  83. package/dist/swas/v1/response-schemas.d.ts +18 -0
  84. package/dist/swas/v1/response-schemas.js +19 -0
  85. package/package.json +1 -1
@@ -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>;
@@ -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
+ });