@leaflow/sdk 0.59.0 → 0.62.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.
@@ -0,0 +1,5 @@
1
+ /**
2
+ * This file was auto-generated by openapi-typescript.
3
+ * Do not make direct changes to the file.
4
+ */
5
+ export {};
@@ -3,5 +3,13 @@ export { client } from "./client.js";
3
3
  import type { operations } from "./schema.js";
4
4
  /** The success response body of `GET /api/v1/regions`. */
5
5
  export type ListRegionsResult = operations["list-regions"]["responses"][200]["content"]["application/json"];
6
- /** The success response body of `GET /api/v1/regions/{regionCode}/availability-zones`. */
6
+ /** The query parameters of `GET /api/v1/regions`. */
7
+ export type ListRegionsQuery = operations["list-regions"]["parameters"]["query"];
8
+ /** The success response body of `GET /api/v1/regions/{regionId}`. */
9
+ export type GetRegionResult = operations["get-region"]["responses"][200]["content"]["application/json"];
10
+ /** The success response body of `GET /api/v1/regions/{regionId}/availability-zones`. */
7
11
  export type ListAvailabilityZonesResult = operations["list-availability-zones"]["responses"][200]["content"]["application/json"];
12
+ /** The query parameters of `GET /api/v1/regions/{regionId}/availability-zones`. */
13
+ export type ListAvailabilityZonesQuery = operations["list-availability-zones"]["parameters"]["query"];
14
+ /** The success response body of `GET /api/v1/regions/{regionId}/availability-zones/{availabilityZoneId}`. */
15
+ export type GetAvailabilityZoneResult = operations["get-availability-zone"]["responses"][200]["content"]["application/json"];
@@ -11,10 +11,8 @@ export interface paths {
11
11
  cookie?: never;
12
12
  };
13
13
  /**
14
- * List available regions
15
- * @description Lists every region currently open to new orders, in display order.
16
- *
17
- * The list is the same for every caller and changes rarely.
14
+ * List regions
15
+ * @description Lists available, draining and retired regions; pending locations are visible only to operators. Filter status=available to offer new placement choices.
18
16
  */
19
17
  get: operations["list-regions"];
20
18
  put?: never;
@@ -25,21 +23,31 @@ export interface paths {
25
23
  patch?: never;
26
24
  trace?: never;
27
25
  };
28
- "/api/v1/regions/{regionCode}/availability-zones": {
26
+ "/api/v1/regions/{regionId}": {
29
27
  parameters: {
30
28
  query?: never;
31
29
  header?: never;
32
30
  path?: never;
33
31
  cookie?: never;
34
32
  };
35
- /**
36
- * List the availability zones of a region
37
- * @description Lists every availability zone of this region that is currently open to new orders, in display order.
38
- *
39
- * Resources are generally required to share an availability zone in order to be attached to one another, so confirm the zone before creating either side.
40
- *
41
- * A region that exists but is not open to new orders is reported as not found, exactly as an unknown code is: both mean that nothing can be created there.
42
- */
33
+ /** Get region */
34
+ get: operations["get-region"];
35
+ put?: never;
36
+ post?: never;
37
+ delete?: never;
38
+ options?: never;
39
+ head?: never;
40
+ patch?: never;
41
+ trace?: never;
42
+ };
43
+ "/api/v1/regions/{regionId}/availability-zones": {
44
+ parameters: {
45
+ query?: never;
46
+ header?: never;
47
+ path?: never;
48
+ cookie?: never;
49
+ };
50
+ /** List availability zones */
43
51
  get: operations["list-availability-zones"];
44
52
  put?: never;
45
53
  post?: never;
@@ -49,6 +57,23 @@ export interface paths {
49
57
  patch?: never;
50
58
  trace?: never;
51
59
  };
60
+ "/api/v1/regions/{regionId}/availability-zones/{availabilityZoneId}": {
61
+ parameters: {
62
+ query?: never;
63
+ header?: never;
64
+ path?: never;
65
+ cookie?: never;
66
+ };
67
+ /** Get availability zone */
68
+ get: operations["get-availability-zone"];
69
+ put?: never;
70
+ post?: never;
71
+ delete?: never;
72
+ options?: never;
73
+ head?: never;
74
+ patch?: never;
75
+ trace?: never;
76
+ };
52
77
  }
53
78
  export type webhooks = Record<string, never>;
54
79
  export interface components {
@@ -66,23 +91,60 @@ export interface components {
66
91
  /** Format: int64 */
67
92
  status: number;
68
93
  };
69
- RegionResource: {
70
- /** @description Stable identifier of the region, used wherever a region has to be named */
71
- code: string;
72
- /** @description ISO 3166-1 alpha-2 code of the country this region is in */
73
- country_code: string;
94
+ Region: {
95
+ /** Format: uuid */
96
+ id: string;
97
+ lookup_key: string;
74
98
  name: string;
99
+ name_translations?: {
100
+ [key: string]: string;
101
+ };
102
+ country_code: string;
103
+ /** @enum {string} */
104
+ status: "pending" | "available" | "draining" | "retired";
105
+ /** Format: int64 */
106
+ sort: number;
107
+ /** Format: date-time */
108
+ created_at: string;
109
+ /** Format: date-time */
110
+ updated_at: string;
75
111
  };
76
- AvailabilityZoneResource: {
77
- /** @description Stable identifier of the availability zone, used wherever an availability zone has to be named */
78
- code: string;
112
+ AvailabilityZone: {
113
+ /** Format: uuid */
114
+ id: string;
115
+ /** Format: uuid */
116
+ region_id: string;
117
+ lookup_key: string;
79
118
  name: string;
119
+ name_translations?: {
120
+ [key: string]: string;
121
+ };
122
+ /** @enum {string} */
123
+ status: "pending" | "available" | "draining" | "retired";
124
+ /** Format: int64 */
125
+ sort: number;
126
+ /** Format: date-time */
127
+ created_at: string;
128
+ /** Format: date-time */
129
+ updated_at: string;
80
130
  };
81
- RegionListResponseBody: {
82
- items: components["schemas"]["RegionResource"][] | null;
131
+ RegionList: {
132
+ items: components["schemas"]["Region"][];
133
+ /** Format: int64 */
134
+ page: number;
135
+ /** Format: int64 */
136
+ page_size: number;
137
+ /** Format: int64 */
138
+ total_count?: number;
83
139
  };
84
- AvailabilityZoneListResponseBody: {
85
- items: components["schemas"]["AvailabilityZoneResource"][] | null;
140
+ AvailabilityZoneList: {
141
+ items: components["schemas"]["AvailabilityZone"][];
142
+ /** Format: int64 */
143
+ page: number;
144
+ /** Format: int64 */
145
+ page_size: number;
146
+ /** Format: int64 */
147
+ total_count?: number;
86
148
  };
87
149
  };
88
150
  responses: never;
@@ -95,7 +157,12 @@ export type $defs = Record<string, never>;
95
157
  export interface operations {
96
158
  "list-regions": {
97
159
  parameters: {
98
- query?: never;
160
+ query?: {
161
+ page?: number;
162
+ page_size?: number;
163
+ status?: "pending" | "available" | "draining" | "retired";
164
+ lookup_key?: string;
165
+ };
99
166
  header?: never;
100
167
  path?: never;
101
168
  cookie?: never;
@@ -108,7 +175,38 @@ export interface operations {
108
175
  [name: string]: unknown;
109
176
  };
110
177
  content: {
111
- "application/json": components["schemas"]["RegionListResponseBody"];
178
+ "application/json": components["schemas"]["RegionList"];
179
+ };
180
+ };
181
+ /** @description Error */
182
+ default: {
183
+ headers: {
184
+ [name: string]: unknown;
185
+ };
186
+ content: {
187
+ "application/json": components["schemas"]["Error"];
188
+ };
189
+ };
190
+ };
191
+ };
192
+ "get-region": {
193
+ parameters: {
194
+ query?: never;
195
+ header?: never;
196
+ path: {
197
+ regionId: string;
198
+ };
199
+ cookie?: never;
200
+ };
201
+ requestBody?: never;
202
+ responses: {
203
+ /** @description OK */
204
+ 200: {
205
+ headers: {
206
+ [name: string]: unknown;
207
+ };
208
+ content: {
209
+ "application/json": components["schemas"]["Region"];
112
210
  };
113
211
  };
114
212
  /** @description Error */
@@ -123,11 +221,48 @@ export interface operations {
123
221
  };
124
222
  };
125
223
  "list-availability-zones": {
224
+ parameters: {
225
+ query?: {
226
+ page?: number;
227
+ page_size?: number;
228
+ status?: "pending" | "available" | "draining" | "retired";
229
+ lookup_key?: string;
230
+ };
231
+ header?: never;
232
+ path: {
233
+ regionId: string;
234
+ };
235
+ cookie?: never;
236
+ };
237
+ requestBody?: never;
238
+ responses: {
239
+ /** @description OK */
240
+ 200: {
241
+ headers: {
242
+ [name: string]: unknown;
243
+ };
244
+ content: {
245
+ "application/json": components["schemas"]["AvailabilityZoneList"];
246
+ };
247
+ };
248
+ /** @description Error */
249
+ default: {
250
+ headers: {
251
+ [name: string]: unknown;
252
+ };
253
+ content: {
254
+ "application/json": components["schemas"]["Error"];
255
+ };
256
+ };
257
+ };
258
+ };
259
+ "get-availability-zone": {
126
260
  parameters: {
127
261
  query?: never;
128
262
  header?: never;
129
263
  path: {
130
- regionCode: string;
264
+ regionId: string;
265
+ availabilityZoneId: string;
131
266
  };
132
267
  cookie?: never;
133
268
  };
@@ -139,7 +274,7 @@ export interface operations {
139
274
  [name: string]: unknown;
140
275
  };
141
276
  content: {
142
- "application/json": components["schemas"]["AvailabilityZoneListResponseBody"];
277
+ "application/json": components["schemas"]["AvailabilityZone"];
143
278
  };
144
279
  };
145
280
  /** @description Error */
package/dist/index.d.ts CHANGED
@@ -4,9 +4,11 @@ export * as billing from "./billing/v1/index.js";
4
4
  export * as canopy from "./canopy/v1/index.js";
5
5
  export * as compute from "./compute/v1/index.js";
6
6
  export * as dns from "./dns/v1/index.js";
7
+ export * as fabric from "./fabric/v1/index.js";
7
8
  export * as fleet from "./fleet/v1/index.js";
8
9
  export * as iam from "./iam/v1/index.js";
9
10
  export * as monitoring from "./monitoring/v1/index.js";
10
11
  export * as notification from "./notification/v1/index.js";
12
+ export * as storage from "./storage/v1/index.js";
11
13
  export * as support from "./support/v1/index.js";
12
14
  export * as tunnel from "./tunnel/v1/index.js";
package/dist/index.js CHANGED
@@ -13,9 +13,11 @@ export * as billing from "./billing/v1/index.js";
13
13
  export * as canopy from "./canopy/v1/index.js";
14
14
  export * as compute from "./compute/v1/index.js";
15
15
  export * as dns from "./dns/v1/index.js";
16
+ export * as fabric from "./fabric/v1/index.js";
16
17
  export * as fleet from "./fleet/v1/index.js";
17
18
  export * as iam from "./iam/v1/index.js";
18
19
  export * as monitoring from "./monitoring/v1/index.js";
19
20
  export * as notification from "./notification/v1/index.js";
21
+ export * as storage from "./storage/v1/index.js";
20
22
  export * as support from "./support/v1/index.js";
21
23
  export * as tunnel from "./tunnel/v1/index.js";
@@ -0,0 +1,4 @@
1
+ import { type ClientOptions } from "openapi-fetch";
2
+ import type { paths } from "./schema.js";
3
+ /** A client for the storage service. Pass baseUrl to override the address. */
4
+ export declare function client(options?: ClientOptions): import("openapi-fetch").Client<paths, `${string}/${string}`>;
@@ -0,0 +1,7 @@
1
+ // Code generated from the contract's servers[0]. DO NOT EDIT.
2
+ import createClient, {} from "openapi-fetch";
3
+ const defaultBaseUrl = "https://storage.leaflow.cloud";
4
+ /** A client for the storage service. Pass baseUrl to override the address. */
5
+ export function client(options = {}) {
6
+ return createClient({ baseUrl: defaultBaseUrl, ...options });
7
+ }
@@ -0,0 +1,85 @@
1
+ export type { paths, components, operations, webhooks } from "./schema.js";
2
+ export { client } from "./client.js";
3
+ import type { operations } from "./schema.js";
4
+ /** The success response body of `GET /api/v1/backups`. */
5
+ export type ListBackupsResult = operations["list-backups"]["responses"][200]["content"]["application/json"];
6
+ /** The query parameters of `GET /api/v1/backups`. */
7
+ export type ListBackupsQuery = operations["list-backups"]["parameters"]["query"];
8
+ /** The success response body of `POST /api/v1/backups`. */
9
+ export type CreateBackupResult = operations["create-backup"]["responses"][202]["content"]["application/json"];
10
+ /** The request body of `POST /api/v1/backups`. */
11
+ export type CreateBackupBody = NonNullable<operations["create-backup"]["requestBody"]>["content"]["application/json"];
12
+ /** The success response body of `GET /api/v1/backups/{backupId}`. */
13
+ export type GetBackupResult = operations["get-backup"]["responses"][200]["content"]["application/json"];
14
+ /** The success response body of `PATCH /api/v1/backups/{backupId}`. */
15
+ export type RenameBackupResult = operations["rename-backup"]["responses"][200]["content"]["application/json"];
16
+ /** The request body of `PATCH /api/v1/backups/{backupId}`. */
17
+ export type RenameBackupBody = NonNullable<operations["rename-backup"]["requestBody"]>["content"]["application/json"];
18
+ /** The success response body of `POST /api/v1/backups/{backupId}/restore`. */
19
+ export type RestoreBackupResult = operations["restore-backup"]["responses"][202]["content"]["application/json"];
20
+ /** The request body of `POST /api/v1/backups/{backupId}/restore`. */
21
+ export type RestoreBackupBody = NonNullable<operations["restore-backup"]["requestBody"]>["content"]["application/json"];
22
+ /** The success response body of `GET /api/v1/disk-types`. */
23
+ export type ListDiskTypesResult = operations["list-disk-types"]["responses"][200]["content"]["application/json"];
24
+ /** The query parameters of `GET /api/v1/disk-types`. */
25
+ export type ListDiskTypesQuery = operations["list-disk-types"]["parameters"]["query"];
26
+ /** The success response body of `GET /api/v1/disk-types/{diskTypeId}`. */
27
+ export type GetDiskTypeResult = operations["get-disk-type"]["responses"][200]["content"]["application/json"];
28
+ /** The success response body of `GET /api/v1/disks`. */
29
+ export type ListDisksResult = operations["list-disks"]["responses"][200]["content"]["application/json"];
30
+ /** The query parameters of `GET /api/v1/disks`. */
31
+ export type ListDisksQuery = operations["list-disks"]["parameters"]["query"];
32
+ /** The success response body of `POST /api/v1/disks`. */
33
+ export type CreateDiskResult = operations["create-disk"]["responses"][202]["content"]["application/json"];
34
+ /** The request body of `POST /api/v1/disks`. */
35
+ export type CreateDiskBody = NonNullable<operations["create-disk"]["requestBody"]>["content"]["application/json"];
36
+ /** The success response body of `GET /api/v1/disks/{diskId}`. */
37
+ export type GetDiskResult = operations["get-disk"]["responses"][200]["content"]["application/json"];
38
+ /** The success response body of `PATCH /api/v1/disks/{diskId}`. */
39
+ export type RenameDiskResult = operations["rename-disk"]["responses"][200]["content"]["application/json"];
40
+ /** The request body of `PATCH /api/v1/disks/{diskId}`. */
41
+ export type RenameDiskBody = NonNullable<operations["rename-disk"]["requestBody"]>["content"]["application/json"];
42
+ /** The success response body of `POST /api/v1/disks/{diskId}/resize`. */
43
+ export type ResizeDiskResult = operations["resize-disk"]["responses"][202]["content"]["application/json"];
44
+ /** The request body of `POST /api/v1/disks/{diskId}/resize`. */
45
+ export type ResizeDiskBody = NonNullable<operations["resize-disk"]["requestBody"]>["content"]["application/json"];
46
+ /** The success response body of `POST /api/v1/disks/{diskId}/revert`. */
47
+ export type RevertDiskResult = operations["revert-disk"]["responses"][200]["content"]["application/json"];
48
+ /** The request body of `POST /api/v1/disks/{diskId}/revert`. */
49
+ export type RevertDiskBody = NonNullable<operations["revert-disk"]["requestBody"]>["content"]["application/json"];
50
+ /** The success response body of `GET /api/v1/operation-logs`. */
51
+ export type ListOperationLogsResult = operations["list-operation-logs"]["responses"][200]["content"]["application/json"];
52
+ /** The query parameters of `GET /api/v1/operation-logs`. */
53
+ export type ListOperationLogsQuery = operations["list-operation-logs"]["parameters"]["query"];
54
+ /** The success response body of `GET /api/v1/snapshots`. */
55
+ export type ListSnapshotsResult = operations["list-snapshots"]["responses"][200]["content"]["application/json"];
56
+ /** The query parameters of `GET /api/v1/snapshots`. */
57
+ export type ListSnapshotsQuery = operations["list-snapshots"]["parameters"]["query"];
58
+ /** The success response body of `POST /api/v1/snapshots`. */
59
+ export type CreateSnapshotResult = operations["create-snapshot"]["responses"][202]["content"]["application/json"];
60
+ /** The request body of `POST /api/v1/snapshots`. */
61
+ export type CreateSnapshotBody = NonNullable<operations["create-snapshot"]["requestBody"]>["content"]["application/json"];
62
+ /** The success response body of `GET /api/v1/snapshots/{snapshotId}`. */
63
+ export type GetSnapshotResult = operations["get-snapshot"]["responses"][200]["content"]["application/json"];
64
+ /** The success response body of `PATCH /api/v1/snapshots/{snapshotId}`. */
65
+ export type RenameSnapshotResult = operations["rename-snapshot"]["responses"][200]["content"]["application/json"];
66
+ /** The request body of `PATCH /api/v1/snapshots/{snapshotId}`. */
67
+ export type RenameSnapshotBody = NonNullable<operations["rename-snapshot"]["requestBody"]>["content"]["application/json"];
68
+ /** The success response body of `GET /api/v1/resource-usages`. */
69
+ export type ListResourceUsagesResult = operations["list-resource-usages"]["responses"][200]["content"]["application/json"];
70
+ /** The query parameters of `GET /api/v1/resource-usages`. */
71
+ export type ListResourceUsagesQuery = operations["list-resource-usages"]["parameters"]["query"];
72
+ /** The success response body of `GET /api/v1/resource-usages/{usageId}`. */
73
+ export type GetResourceUsageResult = operations["get-resource-usage"]["responses"][200]["content"]["application/json"];
74
+ /** The success response body of `GET /api/v1/resources/{resourceType}/{resourceId}/reclamation`. */
75
+ export type GetResourceReclamationResult = operations["get-resource-reclamation"]["responses"][200]["content"]["application/json"];
76
+ /** The success response body of `PUT /api/v1/resources/{resourceType}/{resourceId}/idle-policy`. */
77
+ export type SetResourceIdlePolicyResult = operations["set-resource-idle-policy"]["responses"][200]["content"]["application/json"];
78
+ /** The request body of `PUT /api/v1/resources/{resourceType}/{resourceId}/idle-policy`. */
79
+ export type SetResourceIdlePolicyBody = NonNullable<operations["set-resource-idle-policy"]["requestBody"]>["content"]["application/json"];
80
+ /** The success response body of `GET /api/v1/disks/{resourceId}/attachments`. */
81
+ export type ListDiskAttachmentsResult = operations["list-disk-attachments"]["responses"][200]["content"]["application/json"];
82
+ /** The query parameters of `GET /api/v1/disks/{resourceId}/attachments`. */
83
+ export type ListDiskAttachmentsQuery = operations["list-disk-attachments"]["parameters"]["query"];
84
+ /** The success response body of `GET /api/v1/attachments/{attachmentId}`. */
85
+ export type GetAttachmentResult = operations["get-attachment"]["responses"][200]["content"]["application/json"];
@@ -0,0 +1,5 @@
1
+ // Code generated by scripts/generate.mjs. DO NOT EDIT.
2
+ //
3
+ // The aliases replace the operations[...] subscript chain with a name. The raw paths /
4
+ // components / operations are exported as well: paths is what createClient<paths>() takes.
5
+ export { client } from "./client.js";