@leaflow/sdk 0.0.0-dev.244.g3e062f3 → 0.0.0-dev.246.g0d0d647

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.
@@ -9,6 +9,10 @@ export type ListBackupsQuery = operations["list-backups"]["parameters"]["query"]
9
9
  export type CreateBackupResult = operations["create-backup"]["responses"][201]["content"]["application/json"];
10
10
  /** The request body of `POST /api/v1/backups`. */
11
11
  export type CreateBackupBody = NonNullable<operations["create-backup"]["requestBody"]>["content"]["application/json"];
12
+ /** The success response body of `POST /api/v1/backups/quote`. */
13
+ export type CreateBackupQuoteResult = operations["create-backup-quote"]["responses"][200]["content"]["application/json"];
14
+ /** The request body of `POST /api/v1/backups/quote`. */
15
+ export type CreateBackupQuoteBody = NonNullable<operations["create-backup-quote"]["requestBody"]>["content"]["application/json"];
12
16
  /** The success response body of `GET /api/v1/backups/{backupId}`. */
13
17
  export type GetBackupResult = operations["get-backup"]["responses"][200]["content"]["application/json"];
14
18
  /** The success response body of `PATCH /api/v1/backups/{backupId}`. */
@@ -31,6 +35,22 @@ export type GetDiskTypeResult = operations["get-disk-type"]["responses"][200]["c
31
35
  export type ListImagesResult = operations["list-images"]["responses"][200]["content"]["application/json"];
32
36
  /** The query parameters of `GET /api/v1/images`. */
33
37
  export type ListImagesQuery = operations["list-images"]["parameters"]["query"];
38
+ /** The success response body of `POST /api/v1/images`. */
39
+ export type CreateImageResult = operations["create-image"]["responses"][201]["content"]["application/json"];
40
+ /** The request body of `POST /api/v1/images`. */
41
+ export type CreateImageBody = NonNullable<operations["create-image"]["requestBody"]>["content"]["application/json"];
42
+ /** The success response body of `POST /api/v1/images/quote`. */
43
+ export type CreateImageQuoteResult = operations["create-image-quote"]["responses"][200]["content"]["application/json"];
44
+ /** The request body of `POST /api/v1/images/quote`. */
45
+ export type CreateImageQuoteBody = NonNullable<operations["create-image-quote"]["requestBody"]>["content"]["application/json"];
46
+ /** The success response body of `GET /api/v1/images/{imageId}`. */
47
+ export type GetImageResult = operations["get-image"]["responses"][200]["content"]["application/json"];
48
+ /** The success response body of `PATCH /api/v1/images/{imageId}`. */
49
+ export type RenameImageResult = operations["rename-image"]["responses"][200]["content"]["application/json"];
50
+ /** The request body of `PATCH /api/v1/images/{imageId}`. */
51
+ export type RenameImageBody = NonNullable<operations["rename-image"]["requestBody"]>["content"]["application/json"];
52
+ /** The success response body of `DELETE /api/v1/images/{imageId}`. */
53
+ export type DeleteImageResult = operations["delete-image"]["responses"][202]["content"]["application/json"];
34
54
  /** The success response body of `GET /api/v1/instance-types`. */
35
55
  export type ListInstanceTypesResult = operations["list-instance-types"]["responses"][200]["content"]["application/json"];
36
56
  /** The query parameters of `GET /api/v1/instance-types`. */
@@ -177,22 +197,6 @@ export type ListPortsResult = operations["list-ports"]["responses"][200]["conten
177
197
  export type CreatePortResult = operations["create-port"]["responses"][201]["content"]["application/json"];
178
198
  /** The request body of `POST /api/v1/ports`. */
179
199
  export type CreatePortBody = NonNullable<operations["create-port"]["requestBody"]>["content"]["application/json"];
180
- /** The success response body of `GET /api/v1/private-images`. */
181
- export type ListPrivateImagesResult = operations["list-private-images"]["responses"][200]["content"]["application/json"];
182
- /** The query parameters of `GET /api/v1/private-images`. */
183
- export type ListPrivateImagesQuery = operations["list-private-images"]["parameters"]["query"];
184
- /** The success response body of `POST /api/v1/private-images`. */
185
- export type CreatePrivateImageResult = operations["create-private-image"]["responses"][201]["content"]["application/json"];
186
- /** The request body of `POST /api/v1/private-images`. */
187
- export type CreatePrivateImageBody = NonNullable<operations["create-private-image"]["requestBody"]>["content"]["application/json"];
188
- /** The success response body of `GET /api/v1/private-images/{privateImageId}`. */
189
- export type GetPrivateImageResult = operations["get-private-image"]["responses"][200]["content"]["application/json"];
190
- /** The success response body of `PATCH /api/v1/private-images/{privateImageId}`. */
191
- export type RenamePrivateImageResult = operations["rename-private-image"]["responses"][200]["content"]["application/json"];
192
- /** The request body of `PATCH /api/v1/private-images/{privateImageId}`. */
193
- export type RenamePrivateImageBody = NonNullable<operations["rename-private-image"]["requestBody"]>["content"]["application/json"];
194
- /** The success response body of `DELETE /api/v1/private-images/{privateImageId}`. */
195
- export type DeletePrivateImageResult = operations["delete-private-image"]["responses"][202]["content"]["application/json"];
196
200
  /** The success response body of `GET /api/v1/private-networks`. */
197
201
  export type ListPrivateNetworksResult = operations["list-private-networks"]["responses"][200]["content"]["application/json"];
198
202
  /** The query parameters of `GET /api/v1/private-networks`. */
@@ -20,6 +20,8 @@ export interface paths {
20
20
  * Disks attached to a running instance, including system disks, can be backed up.
21
21
  *
22
22
  * The duration depends on the amount of data. The backup is not complete when this endpoint returns; track the returned task.
23
+ *
24
+ * The backup is billed for its size, at the backup price of its region. Obtain a price with `create-backup-quote` first.
23
25
  */
24
26
  post: operations["create-backup"];
25
27
  delete?: never;
@@ -28,6 +30,30 @@ export interface paths {
28
30
  patch?: never;
29
31
  trace?: never;
30
32
  };
33
+ "/api/v1/backups/quote": {
34
+ parameters: {
35
+ query?: never;
36
+ header?: never;
37
+ path?: never;
38
+ cookie?: never;
39
+ };
40
+ get?: never;
41
+ put?: never;
42
+ /**
43
+ * Quote a backup
44
+ * @description Prices the backup `create-backup` would order for the same disk, without ordering anything. Nothing is reserved and nothing is recorded, so this may be called as often as required.
45
+ *
46
+ * The quantity priced is the size of the disk. When `price_id` is omitted, a price of the region's backup offering is selected; the returned line names it, and that `price_id` is the one to order with.
47
+ *
48
+ * Prices may change between quoting and ordering. An order is charged at the price in effect when it is placed, so a quote should be refreshed before a final confirmation is shown.
49
+ */
50
+ post: operations["create-backup-quote"];
51
+ delete?: never;
52
+ options?: never;
53
+ head?: never;
54
+ patch?: never;
55
+ trace?: never;
56
+ };
31
57
  "/api/v1/backups/{backupId}": {
32
58
  parameters: {
33
59
  query?: never;
@@ -125,20 +151,99 @@ export interface paths {
125
151
  cookie?: never;
126
152
  };
127
153
  /**
128
- * List images on sale
129
- * @description An image whose `min_ram_mb` exceeds the memory of the selected instance type cannot boot. Filter the options accordingly.
154
+ * List images
155
+ * @description Lists the public images on sale together with the private images of this project. `visibility` narrows the list to one of the two.
156
+ *
157
+ * A public image is offered to every project. Only public images currently on sale are listed: one the platform withdraws disappears from here and can no longer install new instances, while the instances already running it keep running and can still be rebuilt onto it.
130
158
  *
131
- * Only images currently on sale are listed. An image the platform withdraws disappears from here and can no longer install new instances, while the instances already running it keep running and can still be rebuilt onto it.
159
+ * A private image belongs to this project, which captured it from one of its instances, and is listed in every status, including while its capture is in progress and after the capture failed.
160
+ *
161
+ * An image can only be used in the region that holds it. An image whose `min_ram_mb` exceeds the memory of the selected instance type cannot boot; filter the options accordingly.
132
162
  */
133
163
  get: operations["list-images"];
134
164
  put?: never;
135
- post?: never;
165
+ /**
166
+ * Capture an instance as a private image
167
+ * @description Creates a private image of this project from the system disk of the instance; data disks are not included. The resulting image can create instances and rebuild them, and remains usable after the source instance is released.
168
+ *
169
+ * **The image reflects the moment the capture started. Later changes to the instance are not included.**
170
+ *
171
+ * The capture has two phases, reported by the status of the image:
172
+ *
173
+ * - `provisioning` — the system disk is being read, usually for tens of seconds. The instance remains usable during this phase, although stopping it first is recommended for consistency.
174
+ * - `uploading` — no longer tied to the system disk. **The instance may be started at this point; there is no need to wait for the capture to finish.** The duration of this phase is proportional to the size of the system disk, roughly 3 minutes for 20 GB.
175
+ *
176
+ * The file system of a running instance may be captured mid-write, in which case the image is equivalent to the disk contents after a power loss. Where consistency matters, stop the instance before starting the capture and start it again once the status becomes `uploading`.
177
+ *
178
+ * The instance can be started, stopped and used normally during the capture, but cannot be released.
179
+ *
180
+ * The image is billed for the storage it occupies, at the private image price of its region. Obtain a price with `create-image-quote` first.
181
+ */
182
+ post: operations["create-image"];
183
+ delete?: never;
184
+ options?: never;
185
+ head?: never;
186
+ patch?: never;
187
+ trace?: never;
188
+ };
189
+ "/api/v1/images/quote": {
190
+ parameters: {
191
+ query?: never;
192
+ header?: never;
193
+ path?: never;
194
+ cookie?: never;
195
+ };
196
+ get?: never;
197
+ put?: never;
198
+ /**
199
+ * Quote capturing an instance as a private image
200
+ * @description Prices the capture `create-image` would order for the same instance, without ordering anything. Nothing is reserved and nothing is recorded, so this may be called as often as required.
201
+ *
202
+ * The quantity priced is the size of the system disk, which is the most the image can occupy. When `price_id` is omitted, a price of the region's private image offering is selected; the returned line names it, and that `price_id` is the one to order with.
203
+ *
204
+ * Prices may change between quoting and ordering. An order is charged at the price in effect when it is placed, so a quote should be refreshed before a final confirmation is shown.
205
+ */
206
+ post: operations["create-image-quote"];
136
207
  delete?: never;
137
208
  options?: never;
138
209
  head?: never;
139
210
  patch?: never;
140
211
  trace?: never;
141
212
  };
213
+ "/api/v1/images/{imageId}": {
214
+ parameters: {
215
+ query?: never;
216
+ header?: never;
217
+ path?: never;
218
+ cookie?: never;
219
+ };
220
+ /**
221
+ * Retrieve an image
222
+ * @description Returns a public image, or a private image of this project; any other image is reported as not found. Use this endpoint to poll capture progress. When `status` is `error`, `failure` states the reason.
223
+ */
224
+ get: operations["get-image"];
225
+ put?: never;
226
+ post?: never;
227
+ /**
228
+ * Delete a private image
229
+ * @description Only a private image of this project can be deleted; any other image is reported as not found.
230
+ *
231
+ * Deletion is rejected while instances created from the image still exist, as they need it in order to be rebuilt.
232
+ *
233
+ * An image whose capture has not finished can be deleted; the capture is aborted.
234
+ *
235
+ * Refused with `COMPUTE_RESOURCE_SUBSCRIBED` while a subscription pays for the image, including a pay-as-you-go subscription. `meta.resource_id` names the image. It is released by canceling the subscriptions listed in `meta.subscription_ids` through Billing, the same set as its `release_subscription_ids`.
236
+ */
237
+ delete: operations["delete-image"];
238
+ options?: never;
239
+ head?: never;
240
+ /**
241
+ * Rename a private image
242
+ * @description Only a private image of this project can be renamed; any other image is reported as not found.
243
+ */
244
+ patch: operations["rename-image"];
245
+ trace?: never;
246
+ };
142
247
  "/api/v1/instance-types": {
143
248
  parameters: {
144
249
  query?: never;
@@ -410,7 +515,7 @@ export interface paths {
410
515
  * Create instances
411
516
  * @description Creates a Billing order, including for metered pricing. The price must belong to the resource’s Billing Plan; applicable contract pricing is resolved by Billing. The instances are created 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. After an uncertain response, look the order up before submitting again.
412
517
  *
413
- * Exactly one of image_id, private_image_id or boot_disk_id is required, and exactly one of port_id or subnet_id. Existing ports, boot disks or floating IPs require count=1. Image boots require boot_disk; existing disks retain their own subscription. Instances, disks and public IPs keep their own subscription items on the same order.
518
+ * Exactly one of image_id or boot_disk_id is required, and exactly one of port_id or subnet_id. Existing ports, boot disks or floating IPs require count=1. Image boots require boot_disk; existing disks retain their own subscription. Instances, disks and public IPs keep their own subscription items on the same order.
414
519
  *
415
520
  * 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.
416
521
  *
@@ -905,67 +1010,6 @@ export interface paths {
905
1010
  patch?: never;
906
1011
  trace?: never;
907
1012
  };
908
- "/api/v1/private-images": {
909
- parameters: {
910
- query?: never;
911
- header?: never;
912
- path?: never;
913
- cookie?: never;
914
- };
915
- /** List private images */
916
- get: operations["list-private-images"];
917
- put?: never;
918
- /**
919
- * Capture an instance as a private image
920
- * @description Captured from the system disk of the instance; data disks are not included. The resulting image can create instances and rebuild them, and remains usable after the source instance is released.
921
- *
922
- * **The image reflects the moment the capture started. Later changes to the instance are not included.**
923
- *
924
- * The capture has two phases, reported by the status of the image:
925
- *
926
- * - `provisioning` — the system disk is being read, usually for tens of seconds. The instance remains usable during this phase, although stopping it first is recommended for consistency.
927
- * - `uploading` — no longer tied to the system disk. **The instance may be started at this point; there is no need to wait for the capture to finish.** The duration of this phase is proportional to the size of the system disk, roughly 3 minutes for 20 GB.
928
- *
929
- * The file system of a running instance may be captured mid-write, in which case the image is equivalent to the disk contents after a power loss. Where consistency matters, stop the instance before starting the capture and start it again once the status becomes `uploading`.
930
- *
931
- * The instance can be started, stopped and used normally during the capture, but cannot be released.
932
- */
933
- post: operations["create-private-image"];
934
- delete?: never;
935
- options?: never;
936
- head?: never;
937
- patch?: never;
938
- trace?: never;
939
- };
940
- "/api/v1/private-images/{privateImageId}": {
941
- parameters: {
942
- query?: never;
943
- header?: never;
944
- path?: never;
945
- cookie?: never;
946
- };
947
- /**
948
- * Retrieve a private image
949
- * @description Use this endpoint to poll capture progress. When `status` is `error`, `failure` states the reason.
950
- */
951
- get: operations["get-private-image"];
952
- put?: never;
953
- post?: never;
954
- /**
955
- * Delete a private image
956
- * @description Deletion is rejected while instances created from the image still exist, as they need it in order to be rebuilt.
957
- *
958
- * An image whose capture has not finished can be deleted; the capture is aborted.
959
- *
960
- * Refused with `COMPUTE_RESOURCE_SUBSCRIBED` while a subscription pays for the image, including a pay-as-you-go subscription. `meta.resource_id` names the image. It is released by canceling the subscriptions listed in `meta.subscription_ids` through Billing, the same set as its `release_subscription_ids`.
961
- */
962
- delete: operations["delete-private-image"];
963
- options?: never;
964
- head?: never;
965
- /** Rename a private image */
966
- patch: operations["rename-private-image"];
967
- trace?: never;
968
- };
969
1013
  "/api/v1/private-networks": {
970
1014
  parameters: {
971
1015
  query?: never;
@@ -1481,6 +1525,19 @@ export interface components {
1481
1525
  price_id: string;
1482
1526
  order: components["schemas"]["OrderOptions"];
1483
1527
  };
1528
+ /** @description The fields of `CreateBackupRequestBody` that decide the price */
1529
+ CreateBackupQuoteRequestBody: {
1530
+ /**
1531
+ * Format: uuid
1532
+ * @description The disk that would be backed up
1533
+ */
1534
+ disk_id: string;
1535
+ /**
1536
+ * Format: uuid
1537
+ * @description A price of the region's backup offering. One is selected when omitted
1538
+ */
1539
+ price_id?: string;
1540
+ };
1484
1541
  RenameBackupRequestBody: {
1485
1542
  name: string;
1486
1543
  };
@@ -1604,31 +1661,76 @@ export interface components {
1604
1661
  plan_id: string | null;
1605
1662
  /** Format: uuid */
1606
1663
  snapshot_plan_id: string | null;
1607
- /** Format: uuid */
1608
- backup_plan_id: string | null;
1609
- /** Format: uuid */
1610
- private_image_plan_id: string | null;
1611
1664
  };
1612
1665
  DiskTypeListResponseBody: {
1613
1666
  items: components["schemas"]["DiskTypeResource"][] | null;
1614
1667
  };
1668
+ /**
1669
+ * @description Who can see and use an image. `public` — offered to every project by the platform. `private` — usable only by the project that owns it.
1670
+ * @enum {string}
1671
+ */
1672
+ ImageVisibility: "public" | "private";
1673
+ /** @description An image that installs the system of an instance. Fields that describe a capture or its billing apply only to private images and are null, zero or empty for public ones. */
1615
1674
  ImageResource: {
1616
- architecture: string;
1617
1675
  /** Format: uuid */
1618
1676
  id: string;
1677
+ /** Format: uuid */
1678
+ region_id: string;
1679
+ visibility: components["schemas"]["ImageVisibility"];
1680
+ name: string;
1681
+ os_family: string;
1682
+ os_version: string;
1683
+ architecture: string;
1619
1684
  /** @description The account this image lets you log in as. The password set at creation belongs to this account */
1620
1685
  login_username: string;
1621
- /** Format: int64 */
1686
+ /**
1687
+ * Format: int64
1688
+ * @description The system disk of an instance created from this image cannot be smaller than this
1689
+ */
1622
1690
  min_disk_gb: number;
1623
- /** Format: int64 */
1691
+ /**
1692
+ * Format: int64
1693
+ * @description The instance type of an instance created from this image must have at least this much memory
1694
+ */
1624
1695
  min_ram_mb: number;
1625
- name: string;
1626
- os_family: string;
1627
- os_version: string;
1628
- /** Format: uuid */
1629
- region_id: string;
1630
1696
  /** @description False means a new password can only be set by rebuilding an instance created from this image */
1631
1697
  supports_password_reset: boolean;
1698
+ /**
1699
+ * @description Only `available` images can install instances. A public image is always `available`; a private image goes through `provisioning` and `uploading` while it is captured.
1700
+ * @enum {string}
1701
+ */
1702
+ status: "provisioning" | "uploading" | "available" | "deleting" | "error";
1703
+ /** @description Reason the capture failed; non-empty only when `status` is `error` */
1704
+ failure: string | null;
1705
+ /**
1706
+ * Format: int64
1707
+ * @description Storage occupied by a private image, which is what it is billed for; 0 until its capture completes, and 0 for public images
1708
+ */
1709
+ size_bytes: number;
1710
+ /**
1711
+ * Format: uuid
1712
+ * @description The instance a private image was captured from. The image remains usable after that instance is released. Null for public images
1713
+ */
1714
+ source_instance_id: string | null;
1715
+ /** Format: date-time */
1716
+ created_at: string;
1717
+ /** Format: uuid */
1718
+ order_id: string | null;
1719
+ /** Format: uuid */
1720
+ price_id: string | null;
1721
+ /** Format: uuid */
1722
+ subscription_item_id: string | null;
1723
+ /** @description The subscriptions a cancellation through Billing has to cover to release this private image: its own. Subscriptions that have ended are not listed, and the list is empty when no subscription pays for it, and for public images. */
1724
+ release_subscription_ids: string[];
1725
+ /** @description The subscriptions of `release_subscription_ids`, in the same order, each with the resource it pays for, so that each line of a cancellation can name what it releases. */
1726
+ release_set: components["schemas"]["ReleaseSetItem"][];
1727
+ /** @enum {string|null} */
1728
+ access_state: "pending" | "enabled" | "suspended" | "reclaimed" | null;
1729
+ task: components["schemas"]["Task"] | null;
1730
+ /** Format: int64 */
1731
+ generation: number;
1732
+ /** Format: date-time */
1733
+ observed_at: string | null;
1632
1734
  };
1633
1735
  ImageListResponseBody: {
1634
1736
  items: components["schemas"]["ImageResource"][];
@@ -1849,7 +1951,7 @@ export interface components {
1849
1951
  id: string;
1850
1952
  /**
1851
1953
  * Format: uuid
1852
- * @description Non-empty when the instance was created from a platform image
1954
+ * @description Non-empty when the instance was created from an image, public or private
1853
1955
  */
1854
1956
  image_id: string | null;
1855
1957
  /**
@@ -1868,11 +1970,6 @@ export interface components {
1868
1970
  name: string;
1869
1971
  /** @description A free-text note about this instance. Empty when never set */
1870
1972
  notes: string;
1871
- /**
1872
- * Format: uuid
1873
- * @description Non-empty when the instance was created from a private image
1874
- */
1875
- private_image_id: string | null;
1876
1973
  /** @description Private address of the instance */
1877
1974
  private_ip: string | null;
1878
1975
  /** Format: uuid */
@@ -1952,12 +2049,12 @@ export interface components {
1952
2049
  generate_password?: boolean;
1953
2050
  /**
1954
2051
  * Format: uuid
1955
- * @description Boot a disk you already have instead of installing an image. The disk must be available, unattached, and in the same availability zone as the instance type. Exactly one of this, `image_id` and `private_image_id`
2052
+ * @description Boot a disk you already have instead of installing an image. The disk must be available, unattached, and in the same availability zone as the instance type. Exactly one of this and `image_id`
1956
2053
  */
1957
2054
  boot_disk_id?: string;
1958
2055
  /**
1959
2056
  * Format: uuid
1960
- * @description A platform image, and it must be one currently on sale. Exactly one of this, `private_image_id` and `boot_disk_id`
2057
+ * @description A public image currently on sale, or an available private image of this project. Exactly one of this and `boot_disk_id`
1961
2058
  */
1962
2059
  image_id?: string;
1963
2060
  /**
@@ -1975,11 +2072,6 @@ export interface components {
1975
2072
  * @description Use an existing network interface, which may already have a floating IP bound. Exactly one of this and `subnet_id`; only one instance can be created when it is used
1976
2073
  */
1977
2074
  port_id?: string;
1978
- /**
1979
- * Format: uuid
1980
- * @description A private image. Exactly one of this, `image_id` and `boot_disk_id`
1981
- */
1982
- private_image_id?: string;
1983
2075
  /** @description Required when a primary network interface is created, at least one; the default security group is not applied automatically. Ignored together with `port_id`, as the security groups of that interface were fixed when it was created */
1984
2076
  security_group_ids?: string[] | null;
1985
2077
  /**
@@ -2054,15 +2146,10 @@ export interface components {
2054
2146
  generate_password?: boolean;
2055
2147
  /**
2056
2148
  * Format: uuid
2057
- * @description A platform image, which must be on sale unless it is the one this instance already runs. Exactly one of this and `private_image_id`
2149
+ * @description A public image, which must be on sale unless it is the one this instance already runs, or an available private image of this project
2058
2150
  */
2059
- image_id?: string;
2151
+ image_id: string;
2060
2152
  password?: string;
2061
- /**
2062
- * Format: uuid
2063
- * @description A private image. Exactly one of this and `image_id`
2064
- */
2065
- private_image_id?: string;
2066
2153
  };
2067
2154
  RebuildInstanceResponseBody: {
2068
2155
  instance: components["schemas"]["InstanceResource"];
@@ -2160,94 +2247,41 @@ export interface components {
2160
2247
  /** @description The private address to assign. Allocated automatically when omitted */
2161
2248
  address?: string;
2162
2249
  };
2163
- PrivateImageResource: {
2164
- architecture: string;
2165
- /** Format: date-time */
2166
- created_at: string;
2167
- /** @description Reason the capture failed; non-empty only when `status` is `error` */
2168
- failure: string | null;
2169
- /** Format: uuid */
2170
- id: string;
2171
- /** @description The account this image lets you log in as. The password set at creation belongs to this account */
2172
- login_username: string;
2173
- /**
2174
- * Format: int64
2175
- * @description The system disk of an instance created from this image cannot be smaller than this
2176
- */
2177
- min_disk_gb: number;
2250
+ CreateImageRequestBody: {
2178
2251
  /**
2179
- * Format: int64
2180
- * @description The instance type of an instance created from this image must have at least this much memory
2252
+ * Format: uuid
2253
+ * @description Captured from the system disk of this instance; data disks are not included
2181
2254
  */
2182
- min_ram_mb: number;
2255
+ instance_id: string;
2183
2256
  name: string;
2184
- os_family: string;
2185
- os_version: string;
2186
2257
  /** Format: uuid */
2187
- region_id: string;
2258
+ price_id: string;
2259
+ order: components["schemas"]["OrderOptions"];
2260
+ };
2261
+ /** @description The fields of `CreateImageRequestBody` that decide the price */
2262
+ CreateImageQuoteRequestBody: {
2188
2263
  /**
2189
- * Format: int64
2190
- * @description Storage occupied by the image; 0 until the capture completes
2264
+ * Format: uuid
2265
+ * @description The instance whose system disk would be captured
2191
2266
  */
2192
- size_bytes: number;
2267
+ instance_id: string;
2193
2268
  /**
2194
2269
  * Format: uuid
2195
- * @description The instance this image was captured from. The image remains usable after that instance is released
2270
+ * @description A price of the region's private image offering. One is selected when omitted
2196
2271
  */
2197
- source_instance_id: string | null;
2198
- /** @enum {string} */
2199
- status: "provisioning" | "uploading" | "available" | "deleting" | "error";
2200
- /** @description False means a new password can only be set by rebuilding an instance created from this image */
2201
- supports_password_reset: boolean;
2202
- /** Format: uuid */
2203
- order_id: string | null;
2272
+ price_id?: string;
2273
+ };
2274
+ RenameImageRequestBody: {
2275
+ name: string;
2276
+ };
2277
+ PrivateNetworkResource: {
2278
+ cidr: string;
2279
+ /** Format: date-time */
2280
+ created_at: string;
2281
+ has_internet_gateway: boolean;
2204
2282
  /** Format: uuid */
2205
- price_id: string | null;
2206
- /** Format: uuid */
2207
- subscription_item_id: string | null;
2208
- /** @description The subscriptions a cancellation through Billing has to cover to release this private image: its own. Subscriptions that have ended are not listed, and the list is empty when no subscription pays for any of them. */
2209
- release_subscription_ids: string[];
2210
- /** @description The subscriptions of `release_subscription_ids`, in the same order, each with the resource it pays for, so that each line of a cancellation can name what it releases. */
2211
- release_set: components["schemas"]["ReleaseSetItem"][];
2212
- /** @enum {string|null} */
2213
- access_state: "pending" | "enabled" | "suspended" | "reclaimed" | null;
2214
- task: components["schemas"]["Task"] | null;
2215
- /** Format: int64 */
2216
- generation: number;
2217
- /** Format: date-time */
2218
- observed_at: string | null;
2219
- };
2220
- PrivateImageListResponseBody: {
2221
- items: components["schemas"]["PrivateImageResource"][];
2222
- /** Format: int64 */
2223
- page: number;
2224
- /** Format: int64 */
2225
- page_size: number;
2226
- /** Format: int64 */
2227
- total_count?: number;
2228
- };
2229
- CreatePrivateImageRequestBody: {
2230
- /**
2231
- * Format: uuid
2232
- * @description Captured from the system disk of this instance; data disks are not included
2233
- */
2234
- instance_id: string;
2235
- name: string;
2236
- /** Format: uuid */
2237
- price_id: string;
2238
- order: components["schemas"]["OrderOptions"];
2239
- };
2240
- RenamePrivateImageRequestBody: {
2241
- name: string;
2242
- };
2243
- PrivateNetworkResource: {
2244
- cidr: string;
2245
- /** Format: date-time */
2246
- created_at: string;
2247
- has_internet_gateway: boolean;
2248
- /** Format: uuid */
2249
- id: string;
2250
- name: string;
2283
+ id: string;
2284
+ name: string;
2251
2285
  /** Format: uuid */
2252
2286
  region_id: string;
2253
2287
  /**
@@ -2480,6 +2514,14 @@ export interface components {
2480
2514
  */
2481
2515
  order_id: string;
2482
2516
  };
2517
+ /** @description What a purchase would be charged, priced as a service would order it, without ordering anything. Nothing is reserved and nothing is recorded. */
2518
+ PurchaseQuote: {
2519
+ /** @description One line for each item the purchase would order, in the order it would order them. */
2520
+ lines: components["schemas"]["PurchaseQuoteLine"][];
2521
+ /** @description What would be owed for the whole purchase. Null when any line could not be priced: what would be owed is not knowable then. */
2522
+ total: components["schemas"]["Money"] | null;
2523
+ currency: string;
2524
+ };
2483
2525
  /** @description Identifies the Compute task and the Billing order of a purchase. Work on the purchase starts after the order's invoice is paid, or without waiting when the order has no immediate invoice. Track the task for completion. */
2484
2526
  PurchaseResult: {
2485
2527
  /**
@@ -2676,12 +2718,47 @@ export interface components {
2676
2718
  /** @description A resource a release set releases. */
2677
2719
  ReleaseResource: {
2678
2720
  /** @enum {string} */
2679
- type: "instance" | "disk" | "snapshot" | "backup" | "private_image" | "floating_ip";
2721
+ type: "instance" | "disk" | "snapshot" | "backup" | "image" | "floating_ip";
2680
2722
  /** Format: uuid */
2681
2723
  id: string;
2682
2724
  /** @description The resource's name. A floating IP is named by its address. */
2683
2725
  name: string;
2684
2726
  };
2727
+ /**
2728
+ * @description A decimal string, in the currency stated alongside it.
2729
+ *
2730
+ * **The currency is not part of this type.** It is carried by a `currency` field next to the
2731
+ * amount, or by the account the amount belongs to. Reading an amount without that field is
2732
+ * reading a number with no unit.
2733
+ *
2734
+ * It is a string rather than a JSON number because a JSON number is a float in most parsers,
2735
+ * and a float loses precision on the first arithmetic. Nothing on this platform puts an amount
2736
+ * through a float.
2737
+ * @example 10.2500000000
2738
+ */
2739
+ Money: string;
2740
+ PurchaseQuoteLine: {
2741
+ /** @description Whether a price was found for this line. When false, `price_id`, `unit_amount` and `amount` are null and `unpriced_reason` states what is missing. */
2742
+ priced: boolean;
2743
+ /**
2744
+ * @description Why no price was found; `none` while `priced` is true.
2745
+ * @enum {string}
2746
+ */
2747
+ unpriced_reason: "none" | "no_price" | "no_rate_card" | "no_meter" | "no_dimensions" | "no_effective_rule";
2748
+ /**
2749
+ * Format: uuid
2750
+ * @description The price selected, including when the request left the choice to the service. Order with this price.
2751
+ */
2752
+ price_id: string | null;
2753
+ plan_name: string;
2754
+ unit_amount: components["schemas"]["Money"] | null;
2755
+ /** @description The quantity priced. */
2756
+ quantity: string;
2757
+ /** @description Not rounded. Round only for display. */
2758
+ amount: components["schemas"]["Money"] | null;
2759
+ tax_amount: components["schemas"]["Money"] | null;
2760
+ currency: string;
2761
+ };
2685
2762
  };
2686
2763
  responses: never;
2687
2764
  parameters: never;
@@ -2756,6 +2833,39 @@ export interface operations {
2756
2833
  };
2757
2834
  };
2758
2835
  };
2836
+ "create-backup-quote": {
2837
+ parameters: {
2838
+ query?: never;
2839
+ header?: never;
2840
+ path?: never;
2841
+ cookie?: never;
2842
+ };
2843
+ requestBody: {
2844
+ content: {
2845
+ "application/json": components["schemas"]["CreateBackupQuoteRequestBody"];
2846
+ };
2847
+ };
2848
+ responses: {
2849
+ /** @description OK */
2850
+ 200: {
2851
+ headers: {
2852
+ [name: string]: unknown;
2853
+ };
2854
+ content: {
2855
+ "application/json": components["schemas"]["PurchaseQuote"];
2856
+ };
2857
+ };
2858
+ /** @description Error */
2859
+ default: {
2860
+ headers: {
2861
+ [name: string]: unknown;
2862
+ };
2863
+ content: {
2864
+ "application/json": components["schemas"]["Error"];
2865
+ };
2866
+ };
2867
+ };
2868
+ };
2759
2869
  "get-backup": {
2760
2870
  parameters: {
2761
2871
  query?: never;
@@ -2963,8 +3073,11 @@ export interface operations {
2963
3073
  };
2964
3074
  "list-images": {
2965
3075
  parameters: {
2966
- query: {
2967
- region_id: string;
3076
+ query?: {
3077
+ /** @description Return only the images of this region */
3078
+ region_id?: string;
3079
+ /** @description Return only public or only private images. Both are returned when omitted */
3080
+ visibility?: components["schemas"]["ImageVisibility"];
2968
3081
  page?: number;
2969
3082
  page_size?: number;
2970
3083
  };
@@ -2994,6 +3107,178 @@ export interface operations {
2994
3107
  };
2995
3108
  };
2996
3109
  };
3110
+ "create-image": {
3111
+ parameters: {
3112
+ query?: never;
3113
+ header?: never;
3114
+ path?: never;
3115
+ cookie?: never;
3116
+ };
3117
+ requestBody: {
3118
+ content: {
3119
+ "application/json": components["schemas"]["CreateImageRequestBody"];
3120
+ };
3121
+ };
3122
+ responses: {
3123
+ /** @description Created */
3124
+ 201: {
3125
+ headers: {
3126
+ [name: string]: unknown;
3127
+ };
3128
+ content: {
3129
+ "application/json": components["schemas"]["PurchaseResult"];
3130
+ };
3131
+ };
3132
+ /** @description Error */
3133
+ default: {
3134
+ headers: {
3135
+ [name: string]: unknown;
3136
+ };
3137
+ content: {
3138
+ "application/json": components["schemas"]["Error"];
3139
+ };
3140
+ };
3141
+ };
3142
+ };
3143
+ "create-image-quote": {
3144
+ parameters: {
3145
+ query?: never;
3146
+ header?: never;
3147
+ path?: never;
3148
+ cookie?: never;
3149
+ };
3150
+ requestBody: {
3151
+ content: {
3152
+ "application/json": components["schemas"]["CreateImageQuoteRequestBody"];
3153
+ };
3154
+ };
3155
+ responses: {
3156
+ /** @description OK */
3157
+ 200: {
3158
+ headers: {
3159
+ [name: string]: unknown;
3160
+ };
3161
+ content: {
3162
+ "application/json": components["schemas"]["PurchaseQuote"];
3163
+ };
3164
+ };
3165
+ /** @description Error */
3166
+ default: {
3167
+ headers: {
3168
+ [name: string]: unknown;
3169
+ };
3170
+ content: {
3171
+ "application/json": components["schemas"]["Error"];
3172
+ };
3173
+ };
3174
+ };
3175
+ };
3176
+ "get-image": {
3177
+ parameters: {
3178
+ query?: never;
3179
+ header?: never;
3180
+ path: {
3181
+ imageId: string;
3182
+ };
3183
+ cookie?: never;
3184
+ };
3185
+ requestBody?: never;
3186
+ responses: {
3187
+ /** @description OK */
3188
+ 200: {
3189
+ headers: {
3190
+ [name: string]: unknown;
3191
+ };
3192
+ content: {
3193
+ "application/json": components["schemas"]["ImageResource"];
3194
+ };
3195
+ };
3196
+ /** @description Error */
3197
+ default: {
3198
+ headers: {
3199
+ [name: string]: unknown;
3200
+ };
3201
+ content: {
3202
+ "application/json": components["schemas"]["Error"];
3203
+ };
3204
+ };
3205
+ };
3206
+ };
3207
+ "delete-image": {
3208
+ parameters: {
3209
+ query?: never;
3210
+ header?: never;
3211
+ path: {
3212
+ imageId: string;
3213
+ };
3214
+ cookie?: never;
3215
+ };
3216
+ requestBody?: never;
3217
+ responses: {
3218
+ /** @description The action was accepted. Wait for the returned task to finish. */
3219
+ 202: {
3220
+ headers: {
3221
+ [name: string]: unknown;
3222
+ };
3223
+ content: {
3224
+ "application/json": components["schemas"]["Task"];
3225
+ };
3226
+ };
3227
+ /** @description The deletion was refused. */
3228
+ 409: {
3229
+ headers: {
3230
+ [name: string]: unknown;
3231
+ };
3232
+ content: {
3233
+ "application/json": components["schemas"]["Error"];
3234
+ };
3235
+ };
3236
+ /** @description Error */
3237
+ default: {
3238
+ headers: {
3239
+ [name: string]: unknown;
3240
+ };
3241
+ content: {
3242
+ "application/json": components["schemas"]["Error"];
3243
+ };
3244
+ };
3245
+ };
3246
+ };
3247
+ "rename-image": {
3248
+ parameters: {
3249
+ query?: never;
3250
+ header?: never;
3251
+ path: {
3252
+ imageId: string;
3253
+ };
3254
+ cookie?: never;
3255
+ };
3256
+ requestBody: {
3257
+ content: {
3258
+ "application/json": components["schemas"]["RenameImageRequestBody"];
3259
+ };
3260
+ };
3261
+ responses: {
3262
+ /** @description OK */
3263
+ 200: {
3264
+ headers: {
3265
+ [name: string]: unknown;
3266
+ };
3267
+ content: {
3268
+ "application/json": components["schemas"]["ImageResource"];
3269
+ };
3270
+ };
3271
+ /** @description Error */
3272
+ default: {
3273
+ headers: {
3274
+ [name: string]: unknown;
3275
+ };
3276
+ content: {
3277
+ "application/json": components["schemas"]["Error"];
3278
+ };
3279
+ };
3280
+ };
3281
+ };
2997
3282
  "list-instance-types": {
2998
3283
  parameters: {
2999
3284
  query: {
@@ -4510,179 +4795,6 @@ export interface operations {
4510
4795
  };
4511
4796
  };
4512
4797
  };
4513
- "list-private-images": {
4514
- parameters: {
4515
- query?: {
4516
- /** @description Return only the images of this region. An image can only be used in the region that holds it */
4517
- region_id?: string;
4518
- page?: number;
4519
- page_size?: number;
4520
- };
4521
- header?: never;
4522
- path?: never;
4523
- cookie?: never;
4524
- };
4525
- requestBody?: never;
4526
- responses: {
4527
- /** @description OK */
4528
- 200: {
4529
- headers: {
4530
- [name: string]: unknown;
4531
- };
4532
- content: {
4533
- "application/json": components["schemas"]["PrivateImageListResponseBody"];
4534
- };
4535
- };
4536
- /** @description Error */
4537
- default: {
4538
- headers: {
4539
- [name: string]: unknown;
4540
- };
4541
- content: {
4542
- "application/json": components["schemas"]["Error"];
4543
- };
4544
- };
4545
- };
4546
- };
4547
- "create-private-image": {
4548
- parameters: {
4549
- query?: never;
4550
- header?: never;
4551
- path?: never;
4552
- cookie?: never;
4553
- };
4554
- requestBody: {
4555
- content: {
4556
- "application/json": components["schemas"]["CreatePrivateImageRequestBody"];
4557
- };
4558
- };
4559
- responses: {
4560
- /** @description Created */
4561
- 201: {
4562
- headers: {
4563
- [name: string]: unknown;
4564
- };
4565
- content: {
4566
- "application/json": components["schemas"]["PurchaseResult"];
4567
- };
4568
- };
4569
- /** @description Error */
4570
- default: {
4571
- headers: {
4572
- [name: string]: unknown;
4573
- };
4574
- content: {
4575
- "application/json": components["schemas"]["Error"];
4576
- };
4577
- };
4578
- };
4579
- };
4580
- "get-private-image": {
4581
- parameters: {
4582
- query?: never;
4583
- header?: never;
4584
- path: {
4585
- privateImageId: string;
4586
- };
4587
- cookie?: never;
4588
- };
4589
- requestBody?: never;
4590
- responses: {
4591
- /** @description OK */
4592
- 200: {
4593
- headers: {
4594
- [name: string]: unknown;
4595
- };
4596
- content: {
4597
- "application/json": components["schemas"]["PrivateImageResource"];
4598
- };
4599
- };
4600
- /** @description Error */
4601
- default: {
4602
- headers: {
4603
- [name: string]: unknown;
4604
- };
4605
- content: {
4606
- "application/json": components["schemas"]["Error"];
4607
- };
4608
- };
4609
- };
4610
- };
4611
- "delete-private-image": {
4612
- parameters: {
4613
- query?: never;
4614
- header?: never;
4615
- path: {
4616
- privateImageId: string;
4617
- };
4618
- cookie?: never;
4619
- };
4620
- requestBody?: never;
4621
- responses: {
4622
- /** @description The action was accepted. Wait for the returned task to finish. */
4623
- 202: {
4624
- headers: {
4625
- [name: string]: unknown;
4626
- };
4627
- content: {
4628
- "application/json": components["schemas"]["Task"];
4629
- };
4630
- };
4631
- /** @description The deletion was refused. */
4632
- 409: {
4633
- headers: {
4634
- [name: string]: unknown;
4635
- };
4636
- content: {
4637
- "application/json": components["schemas"]["Error"];
4638
- };
4639
- };
4640
- /** @description Error */
4641
- default: {
4642
- headers: {
4643
- [name: string]: unknown;
4644
- };
4645
- content: {
4646
- "application/json": components["schemas"]["Error"];
4647
- };
4648
- };
4649
- };
4650
- };
4651
- "rename-private-image": {
4652
- parameters: {
4653
- query?: never;
4654
- header?: never;
4655
- path: {
4656
- privateImageId: string;
4657
- };
4658
- cookie?: never;
4659
- };
4660
- requestBody: {
4661
- content: {
4662
- "application/json": components["schemas"]["RenamePrivateImageRequestBody"];
4663
- };
4664
- };
4665
- responses: {
4666
- /** @description OK */
4667
- 200: {
4668
- headers: {
4669
- [name: string]: unknown;
4670
- };
4671
- content: {
4672
- "application/json": components["schemas"]["PrivateImageResource"];
4673
- };
4674
- };
4675
- /** @description Error */
4676
- default: {
4677
- headers: {
4678
- [name: string]: unknown;
4679
- };
4680
- content: {
4681
- "application/json": components["schemas"]["Error"];
4682
- };
4683
- };
4684
- };
4685
- };
4686
4798
  "list-private-networks": {
4687
4799
  parameters: {
4688
4800
  query?: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leaflow/sdk",
3
- "version": "0.0.0-dev.244.g3e062f3",
3
+ "version": "0.0.0-dev.246.g0d0d647",
4
4
  "description": "Leaflow 平台 API 的 TypeScript SDK",
5
5
  "license": "MIT",
6
6
  "repository": {