@leaflow/sdk 0.0.0-dev.125.ged02bc4 → 0.0.0-dev.129.g409f04f

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.
@@ -95,6 +95,26 @@ export interface paths {
95
95
  patch?: never;
96
96
  trace?: never;
97
97
  };
98
+ "/api/v1/disk-types/{diskTypeId}": {
99
+ parameters: {
100
+ query?: never;
101
+ header?: never;
102
+ path?: never;
103
+ cookie?: never;
104
+ };
105
+ /**
106
+ * Get a disk type
107
+ * @description Retrieve capacity and performance constraints for an existing disk, including system disk types and types withdrawn from sale.
108
+ */
109
+ get: operations["get-disk-type"];
110
+ put?: never;
111
+ post?: never;
112
+ delete?: never;
113
+ options?: never;
114
+ head?: never;
115
+ patch?: never;
116
+ trace?: never;
117
+ };
98
118
  "/api/v1/images": {
99
119
  parameters: {
100
120
  query?: never;
@@ -1291,6 +1311,12 @@ export interface components {
1291
1311
  code?: string;
1292
1312
  message: string;
1293
1313
  meta?: {
1314
+ /**
1315
+ * @description Present on every response whose `code` is `VALIDATION_FAILED`, and on no
1316
+ * other response.
1317
+ */
1318
+ violations?: components["schemas"]["Violation"][];
1319
+ } & {
1294
1320
  [key: string]: unknown;
1295
1321
  };
1296
1322
  /** Format: int64 */
@@ -2413,6 +2439,29 @@ export interface components {
2413
2439
  RenameSnapshotRequestBody: {
2414
2440
  name: string;
2415
2441
  };
2442
+ /**
2443
+ * @description A single mismatch between the request and the contract.
2444
+ *
2445
+ * Use `field` to locate the input, `rule` to decide what to tell the user, and
2446
+ * `reason` only for diagnostics.
2447
+ */
2448
+ Violation: {
2449
+ /**
2450
+ * @description Dot-separated path to the field, such as `name` or
2451
+ * `schedule.0.start_time_seconds`.
2452
+ */
2453
+ field: string;
2454
+ /**
2455
+ * @description The JSON Schema keyword that failed, such as `minLength`, `minimum` or
2456
+ * `pattern`.
2457
+ */
2458
+ rule: string;
2459
+ /**
2460
+ * @description The validator's own wording, in English. Intended for diagnostics; do not
2461
+ * display it to end users.
2462
+ */
2463
+ reason?: string;
2464
+ };
2416
2465
  };
2417
2466
  responses: never;
2418
2467
  parameters: never;
@@ -2648,6 +2697,37 @@ export interface operations {
2648
2697
  };
2649
2698
  };
2650
2699
  };
2700
+ "get-disk-type": {
2701
+ parameters: {
2702
+ query?: never;
2703
+ header?: never;
2704
+ path: {
2705
+ diskTypeId: string;
2706
+ };
2707
+ cookie?: never;
2708
+ };
2709
+ requestBody?: never;
2710
+ responses: {
2711
+ /** @description OK */
2712
+ 200: {
2713
+ headers: {
2714
+ [name: string]: unknown;
2715
+ };
2716
+ content: {
2717
+ "application/json": components["schemas"]["DiskTypeResource"];
2718
+ };
2719
+ };
2720
+ /** @description Error */
2721
+ default: {
2722
+ headers: {
2723
+ [name: string]: unknown;
2724
+ };
2725
+ content: {
2726
+ "application/json": components["schemas"]["Error"];
2727
+ };
2728
+ };
2729
+ };
2730
+ };
2651
2731
  "list-images": {
2652
2732
  parameters: {
2653
2733
  query: {
@@ -26,17 +26,17 @@ export type ListRecordsResult = operations["list-records"]["responses"][200]["co
26
26
  export type ListRecordsQuery = operations["list-records"]["parameters"]["query"];
27
27
  /** `GET /api/v1/zones/{zone}/records/{name}/{type}` 成功时的响应体。 */
28
28
  export type GetRecordSetResult = operations["get-record-set"]["responses"][200]["content"]["application/json"];
29
- /** `PATCH /api/v1/zones/{zone}/records/{name}/{type}` 成功时的响应体。 */
30
- export type ModifyRecordSetResult = operations["modify-record-set"]["responses"][200]["content"]["application/json"];
31
- /** `PATCH /api/v1/zones/{zone}/records/{name}/{type}` 的查询参数。 */
32
- export type ModifyRecordSetQuery = operations["modify-record-set"]["parameters"]["query"];
33
- /** `PATCH /api/v1/zones/{zone}/records/{name}/{type}` 的请求体。 */
34
- export type ModifyRecordSetBody = NonNullable<operations["modify-record-set"]["requestBody"]>["content"]["application/json"];
35
29
  /** `PUT /api/v1/zones/{zone}/records/{name}/{type}` 成功时的响应体。 */
36
30
  export type SetRecordSetResult = operations["set-record-set"]["responses"][200]["content"]["application/json"];
37
31
  /** `PUT /api/v1/zones/{zone}/records/{name}/{type}` 的查询参数。 */
38
32
  export type SetRecordSetQuery = operations["set-record-set"]["parameters"]["query"];
39
33
  /** `PUT /api/v1/zones/{zone}/records/{name}/{type}` 的请求体。 */
40
34
  export type SetRecordSetBody = NonNullable<operations["set-record-set"]["requestBody"]>["content"]["application/json"];
35
+ /** `PATCH /api/v1/zones/{zone}/records/{name}/{type}` 成功时的响应体。 */
36
+ export type ModifyRecordSetResult = operations["modify-record-set"]["responses"][200]["content"]["application/json"];
37
+ /** `PATCH /api/v1/zones/{zone}/records/{name}/{type}` 的查询参数。 */
38
+ export type ModifyRecordSetQuery = operations["modify-record-set"]["parameters"]["query"];
39
+ /** `PATCH /api/v1/zones/{zone}/records/{name}/{type}` 的请求体。 */
40
+ export type ModifyRecordSetBody = NonNullable<operations["modify-record-set"]["requestBody"]>["content"]["application/json"];
41
41
  /** `DELETE /api/v1/zones/{zone}/records/{name}/{type}` 的查询参数。 */
42
42
  export type DeleteRecordSetQuery = operations["delete-record-set"]["parameters"]["query"];
@@ -235,6 +235,12 @@ export interface components {
235
235
  code?: string;
236
236
  message: string;
237
237
  meta?: {
238
+ /**
239
+ * @description Present on every response whose `code` is `VALIDATION_FAILED`, and on no
240
+ * other response.
241
+ */
242
+ violations?: components["schemas"]["Violation"][];
243
+ } & {
238
244
  [key: string]: unknown;
239
245
  };
240
246
  /** Format: int64 */
@@ -444,6 +450,29 @@ export interface components {
444
450
  */
445
451
  ttl?: number;
446
452
  };
453
+ /**
454
+ * @description A single mismatch between the request and the contract.
455
+ *
456
+ * Use `field` to locate the input, `rule` to decide what to tell the user, and
457
+ * `reason` only for diagnostics.
458
+ */
459
+ Violation: {
460
+ /**
461
+ * @description Dot-separated path to the field, such as `name` or
462
+ * `schedule.0.start_time_seconds`.
463
+ */
464
+ field: string;
465
+ /**
466
+ * @description The JSON Schema keyword that failed, such as `minLength`, `minimum` or
467
+ * `pattern`.
468
+ */
469
+ rule: string;
470
+ /**
471
+ * @description The validator's own wording, in English. Intended for diagnostics; do not
472
+ * display it to end users.
473
+ */
474
+ reason?: string;
475
+ };
447
476
  };
448
477
  responses: never;
449
478
  parameters: never;
@@ -0,0 +1,6 @@
1
+ export type { paths, components, operations, webhooks } from "./schema.js";
2
+ import type { operations } from "./schema.js";
3
+ /** `GET /api/v1/regions` 成功时的响应体。 */
4
+ export type ListRegionsResult = operations["list-regions"]["responses"][200]["content"]["application/json"];
5
+ /** `GET /api/v1/regions/{regionCode}/availability-zones` 成功时的响应体。 */
6
+ export type ListAvailabilityZonesResult = operations["list-availability-zones"]["responses"][200]["content"]["application/json"];
@@ -0,0 +1,5 @@
1
+ // 由 scripts/generate-ts.mjs 生成,不要手改。
2
+ //
3
+ // 别名把 operations[...] 那串下标换成一个名字。原始的 paths / components / operations 也
4
+ // 一并导出:paths 是给 openapi-fetch 的 createClient<paths>() 用的。
5
+ export {};
@@ -0,0 +1,181 @@
1
+ /**
2
+ * This file was auto-generated by openapi-typescript.
3
+ * Do not make direct changes to the file.
4
+ */
5
+ export interface paths {
6
+ "/api/v1/regions": {
7
+ parameters: {
8
+ query?: never;
9
+ header?: never;
10
+ path?: never;
11
+ cookie?: never;
12
+ };
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.
18
+ */
19
+ get: operations["list-regions"];
20
+ put?: never;
21
+ post?: never;
22
+ delete?: never;
23
+ options?: never;
24
+ head?: never;
25
+ patch?: never;
26
+ trace?: never;
27
+ };
28
+ "/api/v1/regions/{regionCode}/availability-zones": {
29
+ parameters: {
30
+ query?: never;
31
+ header?: never;
32
+ path?: never;
33
+ cookie?: never;
34
+ };
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
+ */
43
+ get: operations["list-availability-zones"];
44
+ put?: never;
45
+ post?: never;
46
+ delete?: never;
47
+ options?: never;
48
+ head?: never;
49
+ patch?: never;
50
+ trace?: never;
51
+ };
52
+ }
53
+ export type webhooks = Record<string, never>;
54
+ export interface components {
55
+ schemas: {
56
+ Error: {
57
+ code?: string;
58
+ message: string;
59
+ meta?: {
60
+ /**
61
+ * @description Present on every response whose `code` is `VALIDATION_FAILED`, and on no
62
+ * other response.
63
+ */
64
+ violations?: components["schemas"]["Violation"][];
65
+ } & {
66
+ [key: string]: unknown;
67
+ };
68
+ /** Format: int64 */
69
+ status: number;
70
+ };
71
+ RegionResource: {
72
+ /** @description Stable identifier of the region, used wherever a region has to be named */
73
+ code: string;
74
+ /** @description ISO 3166-1 alpha-2 code of the country this region is in */
75
+ country_code: string;
76
+ name: string;
77
+ };
78
+ AvailabilityZoneResource: {
79
+ /** @description Stable identifier of the availability zone, used wherever an availability zone has to be named */
80
+ code: string;
81
+ name: string;
82
+ };
83
+ RegionListResponseBody: {
84
+ items: components["schemas"]["RegionResource"][] | null;
85
+ };
86
+ AvailabilityZoneListResponseBody: {
87
+ items: components["schemas"]["AvailabilityZoneResource"][] | null;
88
+ };
89
+ /**
90
+ * @description A single mismatch between the request and the contract.
91
+ *
92
+ * Use `field` to locate the input, `rule` to decide what to tell the user, and
93
+ * `reason` only for diagnostics.
94
+ */
95
+ Violation: {
96
+ /**
97
+ * @description Dot-separated path to the field, such as `name` or
98
+ * `schedule.0.start_time_seconds`.
99
+ */
100
+ field: string;
101
+ /**
102
+ * @description The JSON Schema keyword that failed, such as `minLength`, `minimum` or
103
+ * `pattern`.
104
+ */
105
+ rule: string;
106
+ /**
107
+ * @description The validator's own wording, in English. Intended for diagnostics; do not
108
+ * display it to end users.
109
+ */
110
+ reason?: string;
111
+ };
112
+ };
113
+ responses: never;
114
+ parameters: never;
115
+ requestBodies: never;
116
+ headers: never;
117
+ pathItems: never;
118
+ }
119
+ export type $defs = Record<string, never>;
120
+ export interface operations {
121
+ "list-regions": {
122
+ parameters: {
123
+ query?: never;
124
+ header?: never;
125
+ path?: never;
126
+ cookie?: never;
127
+ };
128
+ requestBody?: never;
129
+ responses: {
130
+ /** @description OK */
131
+ 200: {
132
+ headers: {
133
+ [name: string]: unknown;
134
+ };
135
+ content: {
136
+ "application/json": components["schemas"]["RegionListResponseBody"];
137
+ };
138
+ };
139
+ /** @description Error */
140
+ default: {
141
+ headers: {
142
+ [name: string]: unknown;
143
+ };
144
+ content: {
145
+ "application/json": components["schemas"]["Error"];
146
+ };
147
+ };
148
+ };
149
+ };
150
+ "list-availability-zones": {
151
+ parameters: {
152
+ query?: never;
153
+ header?: never;
154
+ path: {
155
+ regionCode: string;
156
+ };
157
+ cookie?: never;
158
+ };
159
+ requestBody?: never;
160
+ responses: {
161
+ /** @description OK */
162
+ 200: {
163
+ headers: {
164
+ [name: string]: unknown;
165
+ };
166
+ content: {
167
+ "application/json": components["schemas"]["AvailabilityZoneListResponseBody"];
168
+ };
169
+ };
170
+ /** @description Error */
171
+ default: {
172
+ headers: {
173
+ [name: string]: unknown;
174
+ };
175
+ content: {
176
+ "application/json": components["schemas"]["Error"];
177
+ };
178
+ };
179
+ };
180
+ };
181
+ }
@@ -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 {};
@@ -2,14 +2,14 @@ export type { paths, components, operations, webhooks } from "./schema.js";
2
2
  import type { operations } from "./schema.js";
3
3
  /** `GET /api/v1/permissions` 成功时的响应体。 */
4
4
  export type ListPermissionsResult = operations["list-permissions"]["responses"][200]["content"]["application/json"];
5
- /** `DELETE /api/v1/project` 成功时的响应体。 */
6
- export type DeleteProjectResult = operations["delete-project"]["responses"][200]["content"]["application/json"];
7
5
  /** `GET /api/v1/project` 成功时的响应体。 */
8
6
  export type GetProjectResult = operations["get-project"]["responses"][200]["content"]["application/json"];
9
7
  /** `PATCH /api/v1/project` 成功时的响应体。 */
10
8
  export type UpdateProjectResult = operations["update-project"]["responses"][200]["content"]["application/json"];
11
9
  /** `PATCH /api/v1/project` 的请求体。 */
12
10
  export type UpdateProjectBody = NonNullable<operations["update-project"]["requestBody"]>["content"]["application/json"];
11
+ /** `DELETE /api/v1/project` 成功时的响应体。 */
12
+ export type DeleteProjectResult = operations["delete-project"]["responses"][200]["content"]["application/json"];
13
13
  /** `GET /api/v1/membership` 成功时的响应体。 */
14
14
  export type GetProjectMembershipResult = operations["get-project-membership"]["responses"][200]["content"]["application/json"];
15
15
  /** `GET /api/v1/invitations` 成功时的响应体。 */
@@ -74,11 +74,11 @@ export type ListSshKeysQuery = operations["list-ssh-keys"]["parameters"]["query"
74
74
  export type CreateSshKeyResult = operations["create-ssh-key"]["responses"][201]["content"]["application/json"];
75
75
  /** `POST /api/v1/ssh-keys` 的请求体。 */
76
76
  export type CreateSshKeyBody = NonNullable<operations["create-ssh-key"]["requestBody"]>["content"]["application/json"];
77
- /** `DELETE /api/v1/ssh-keys/{keyId}` 成功时的响应体。 */
78
- export type RevokeSshKeyResult = operations["revoke-ssh-key"]["responses"][200]["content"]["application/json"];
79
77
  /** `GET /api/v1/ssh-keys/{keyId}` 成功时的响应体。 */
80
78
  export type GetSshKeyResult = operations["get-ssh-key"]["responses"][200]["content"]["application/json"];
81
79
  /** `PATCH /api/v1/ssh-keys/{keyId}` 成功时的响应体。 */
82
80
  export type RenameSshKeyResult = operations["rename-ssh-key"]["responses"][200]["content"]["application/json"];
83
81
  /** `PATCH /api/v1/ssh-keys/{keyId}` 的请求体。 */
84
82
  export type RenameSshKeyBody = NonNullable<operations["rename-ssh-key"]["requestBody"]>["content"]["application/json"];
83
+ /** `DELETE /api/v1/ssh-keys/{keyId}` 成功时的响应体。 */
84
+ export type RevokeSshKeyResult = operations["revoke-ssh-key"]["responses"][200]["content"]["application/json"];