@leaflow/sdk 0.0.0-dev.222.g62628b3 → 0.0.0-dev.226.g0b19393

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.
@@ -133,10 +133,6 @@ export type RebuildInstanceBody = NonNullable<operations["rebuild-instance"]["re
133
133
  export type ResizeInstanceResult = operations["resize-instance"]["responses"][202]["content"]["application/json"];
134
134
  /** The request body of `POST /api/v1/instances/{instanceId}/resize`. */
135
135
  export type ResizeInstanceBody = NonNullable<operations["resize-instance"]["requestBody"]>["content"]["application/json"];
136
- /** The success response body of `POST /api/v1/instances/{instanceId}/resize/confirm`. */
137
- export type ConfirmInstanceResizeResult = operations["confirm-instance-resize"]["responses"][202]["content"]["application/json"];
138
- /** The success response body of `POST /api/v1/instances/{instanceId}/resize/revert`. */
139
- export type RevertInstanceResizeResult = operations["revert-instance-resize"]["responses"][202]["content"]["application/json"];
140
136
  /** The success response body of `POST /api/v1/instances/{instanceId}/start`. */
141
137
  export type StartInstanceResult = operations["start-instance"]["responses"][202]["content"]["application/json"];
142
138
  /** The request body of `POST /api/v1/instances/{instanceId}/start`. */
@@ -332,6 +332,8 @@ export interface paths {
332
332
  *
333
333
  * IPv6 is not requested through this endpoint. IPv6 addresses are assigned to instances by the private network; enable IPv6 on that network instead.
334
334
  *
335
+ * Refused with `PRIVATE_NETWORK_UNAVAILABLE`, before any order is created, when the private network's `status` is not `available`. `meta.private_network_id` names it.
336
+ *
335
337
  * Replays return HTTP 201 for the original operation. See the idempotency conventions for conflicts and terminal outcomes.
336
338
  */
337
339
  post: operations["allocate-floating-ip"];
@@ -432,6 +434,8 @@ export interface paths {
432
434
  *
433
435
  * A request for several instances is all or nothing: if any instance cannot be created, every instance of that request is released, the order fails, and any payment for it is refunded. Each instance is named after this request with a number appended, and each has its own task.
434
436
  *
437
+ * The network is checked before the order is created, and a request it refuses orders and charges nothing. It is refused with `PRIVATE_NETWORK_UNAVAILABLE` when the private network's `status` is not `available`, `SUBNET_UNAVAILABLE` or `SECURITY_GROUP_UNAVAILABLE` when the subnet or a security group is not ready, `SECURITY_GROUP_OTHER_PRIVATE_NETWORK` when a security group belongs to another private network, and `PORT_UNAVAILABLE` when the port's `status` is not `available`. `meta` names the resource.
438
+ *
435
439
  * Replays return HTTP 202 for the original operation. See the idempotency conventions for conflicts and terminal outcomes.
436
440
  */
437
441
  post: operations["launch-instance"];
@@ -692,53 +696,11 @@ export interface paths {
692
696
  * Resize an instance
693
697
  * @description Creates a Billing change order, including for metered pricing. The price must belong to the Billing Plan of the target instance type; applicable contract pricing is resolved by Billing. The resize is applied after the order's invoice is paid, or without waiting when the order has no immediate invoice. Do not submit a new purchase after paying, and reuse the original idempotency key after an uncertain response.
694
698
  *
695
- * Replays return HTTP 202 for the original operation. See the idempotency conventions for conflicts and terminal outcomes.
696
- */
697
- post: operations["resize-instance"];
698
- delete?: never;
699
- options?: never;
700
- head?: never;
701
- patch?: never;
702
- trace?: never;
703
- };
704
- "/api/v1/instances/{instanceId}/resize/confirm": {
705
- parameters: {
706
- query?: never;
707
- header?: never;
708
- path?: never;
709
- cookie?: never;
710
- };
711
- get?: never;
712
- put?: never;
713
- /**
714
- * Confirm a resize
715
- * @description Releases the resources held by the previous size. `pending_instance_type_id` becomes the type in effect and is billed from then on.
716
- *
717
- * Replays return HTTP 202 for the original operation. See the idempotency conventions for conflicts and terminal outcomes.
718
- */
719
- post: operations["confirm-instance-resize"];
720
- delete?: never;
721
- options?: never;
722
- head?: never;
723
- patch?: never;
724
- trace?: never;
725
- };
726
- "/api/v1/instances/{instanceId}/resize/revert": {
727
- parameters: {
728
- query?: never;
729
- header?: never;
730
- path?: never;
731
- cookie?: never;
732
- };
733
- get?: never;
734
- put?: never;
735
- /**
736
- * Revert a resize
737
- * @description The instance returns to its previous size, `pending_instance_type_id` is discarded, and billing is unaffected by the resize.
699
+ * The new instance type takes effect, and is billed from then on, when the returned task succeeds. A completed resize is final and cannot be reverted; to return to the previous type, submit another resize.
738
700
  *
739
701
  * Replays return HTTP 202 for the original operation. See the idempotency conventions for conflicts and terminal outcomes.
740
702
  */
741
- post: operations["revert-instance-resize"];
703
+ post: operations["resize-instance"];
742
704
  delete?: never;
743
705
  options?: never;
744
706
  head?: never;
@@ -1955,7 +1917,7 @@ export interface components {
1955
1917
  /** Format: uuid */
1956
1918
  region_id: string;
1957
1919
  /** @enum {string} */
1958
- status: "pending" | "building" | "active" | "stopped" | "paused" | "suspended" | "shelved" | "shelved_offloaded" | "rescued" | "resized" | "deleting" | "deleted" | "error" | "unknown";
1920
+ status: "pending" | "building" | "active" | "stopped" | "paused" | "suspended" | "shelved" | "shelved_offloaded" | "rescued" | "deleting" | "deleted" | "error" | "unknown";
1959
1921
  /** Format: uuid */
1960
1922
  subnet_id: string | null;
1961
1923
  /** Format: date-time */
@@ -2315,7 +2277,10 @@ export interface components {
2315
2277
  name: string;
2316
2278
  /** Format: uuid */
2317
2279
  region_id: string;
2318
- /** @enum {string} */
2280
+ /**
2281
+ * @description Only `available` accepts new instances, interfaces and floating IPs
2282
+ * @enum {string}
2283
+ */
2319
2284
  status: "pending" | "available" | "deleting" | "error" | "unknown";
2320
2285
  /** Format: date-time */
2321
2286
  updated_at: string;
@@ -4198,92 +4163,6 @@ export interface operations {
4198
4163
  };
4199
4164
  };
4200
4165
  };
4201
- "confirm-instance-resize": {
4202
- parameters: {
4203
- query?: never;
4204
- header: {
4205
- /** @description Reuse the same key for retries of the same action. A different request with the same key is rejected. */
4206
- "Idempotency-Key": string;
4207
- };
4208
- path: {
4209
- instanceId: string;
4210
- };
4211
- cookie?: never;
4212
- };
4213
- requestBody?: never;
4214
- responses: {
4215
- /** @description The action was accepted. Wait for the returned task to finish. */
4216
- 202: {
4217
- headers: {
4218
- [name: string]: unknown;
4219
- };
4220
- content: {
4221
- "application/json": components["schemas"]["Task"];
4222
- };
4223
- };
4224
- /** @description The idempotency key was already used with different parameters in this scope. */
4225
- 409: {
4226
- headers: {
4227
- [name: string]: unknown;
4228
- };
4229
- content: {
4230
- "application/json": components["schemas"]["Error"];
4231
- };
4232
- };
4233
- /** @description Error */
4234
- default: {
4235
- headers: {
4236
- [name: string]: unknown;
4237
- };
4238
- content: {
4239
- "application/json": components["schemas"]["Error"];
4240
- };
4241
- };
4242
- };
4243
- };
4244
- "revert-instance-resize": {
4245
- parameters: {
4246
- query?: never;
4247
- header: {
4248
- /** @description Reuse the same key for retries of the same action. A different request with the same key is rejected. */
4249
- "Idempotency-Key": string;
4250
- };
4251
- path: {
4252
- instanceId: string;
4253
- };
4254
- cookie?: never;
4255
- };
4256
- requestBody?: never;
4257
- responses: {
4258
- /** @description The action was accepted. Wait for the returned task to finish. */
4259
- 202: {
4260
- headers: {
4261
- [name: string]: unknown;
4262
- };
4263
- content: {
4264
- "application/json": components["schemas"]["Task"];
4265
- };
4266
- };
4267
- /** @description The idempotency key was already used with different parameters in this scope. */
4268
- 409: {
4269
- headers: {
4270
- [name: string]: unknown;
4271
- };
4272
- content: {
4273
- "application/json": components["schemas"]["Error"];
4274
- };
4275
- };
4276
- /** @description Error */
4277
- default: {
4278
- headers: {
4279
- [name: string]: unknown;
4280
- };
4281
- content: {
4282
- "application/json": components["schemas"]["Error"];
4283
- };
4284
- };
4285
- };
4286
- };
4287
4166
  "start-instance": {
4288
4167
  parameters: {
4289
4168
  query?: never;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leaflow/sdk",
3
- "version": "0.0.0-dev.222.g62628b3",
3
+ "version": "0.0.0-dev.226.g0b19393",
4
4
  "description": "Leaflow 平台 API 的 TypeScript SDK",
5
5
  "license": "MIT",
6
6
  "repository": {