@leaflow/sdk 0.70.0 → 0.71.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.
@@ -71,6 +71,8 @@ export type AllocateFloatingIpResult = operations["allocate-floating-ip"]["respo
71
71
  export type AllocateFloatingIpBody = NonNullable<operations["allocate-floating-ip"]["requestBody"]>["content"]["application/json"];
72
72
  /** The success response body of `GET /api/v1/floating-ips/{floatingIpId}`. */
73
73
  export type GetFloatingIpResult = operations["get-floating-ip"]["responses"][200]["content"]["application/json"];
74
+ /** The success response body of `DELETE /api/v1/floating-ips/{floatingIpId}`. */
75
+ export type ReleaseFloatingIpResult = operations["release-floating-ip"]["responses"][202]["content"]["application/json"];
74
76
  /** The success response body of `PUT /api/v1/floating-ips/{floatingIpId}/bandwidth`. */
75
77
  export type SetFloatingIpBandwidthResult = operations["set-floating-ip-bandwidth"]["responses"][200]["content"]["application/json"];
76
78
  /** The request body of `PUT /api/v1/floating-ips/{floatingIpId}/bandwidth`. */
@@ -334,7 +334,7 @@ export interface paths {
334
334
  post?: never;
335
335
  /**
336
336
  * Release a floating IP
337
- * @description A released address enters a cooldown period before it is allocated again, so that DNS records and allow-lists still pointing at it do not break immediately. **The same address therefore cannot be re-allocated** for some time after release. Proceed with care.
337
+ * @description Releases the floating IP after unbinding it. Completion is reported by the returned task.
338
338
  */
339
339
  delete: operations["release-floating-ip"];
340
340
  options?: never;
@@ -1337,11 +1337,6 @@ export interface components {
1337
1337
  status: number;
1338
1338
  };
1339
1339
  BackupResource: {
1340
- /**
1341
- * Format: uuid
1342
- * @description Availability zone of the source disk. A restore may target another zone in the same region
1343
- */
1344
- availability_zone_id: string;
1345
1340
  /** Format: date-time */
1346
1341
  created_at: string;
1347
1342
  /** Format: uuid */
@@ -1362,14 +1357,23 @@ export interface components {
1362
1357
  /** @enum {string} */
1363
1358
  status: "provisioning" | "available" | "restoring" | "deleting" | "error";
1364
1359
  /** Format: uuid */
1365
- order_id?: string | null;
1360
+ order_id: string | null;
1366
1361
  /** Format: uuid */
1367
- price_id?: string | null;
1362
+ price_id: string | null;
1368
1363
  /** Format: uuid */
1369
- subscription_item_id?: string | null;
1364
+ subscription_item_id: string | null;
1370
1365
  /** @enum {string|null} */
1371
- access_state?: "pending" | "enabled" | "suspended" | "reclaimed" | null;
1372
- task?: components["schemas"]["Task"] | null;
1366
+ access_state: "pending" | "enabled" | "suspended" | "reclaimed" | null;
1367
+ task: components["schemas"]["Task"] | null;
1368
+ /** Format: int64 */
1369
+ generation: number;
1370
+ /** Format: date-time */
1371
+ observed_at: string | null;
1372
+ /**
1373
+ * Format: uuid
1374
+ * @description Availability zone of the source disk. A restore may target another zone in the same region
1375
+ */
1376
+ source_availability_zone_id: string;
1373
1377
  };
1374
1378
  BackupListResponseBody: {
1375
1379
  items: components["schemas"]["BackupResource"][] | null;
@@ -1432,27 +1436,20 @@ export interface components {
1432
1436
  throughput_bytes_per_sec: number | null;
1433
1437
  /** @enum {string} */
1434
1438
  status: "provisioning" | "available" | "attaching" | "in_use" | "detaching" | "resizing" | "reverting" | "restoring" | "releasing" | "deleting" | "error";
1435
- /**
1436
- * @description How this disk is paid for. `postpaid` is billed by the hour for as long as it exists;
1437
- * `prepaid` was bought outright for a term.
1438
- *
1439
- * **Not the term.** How long it was bought for belongs to the order, not to the disk:
1440
- * renewing can change it, and a machine bought for a year and then renewed for a month is
1441
- * still a prepaid machine. Ask billing for the term and the expiry — they live there, and
1442
- * they are the only two values a renewal moves.
1443
- * @enum {string}
1444
- */
1445
- charge_type: "postpaid" | "prepaid";
1446
1439
  /** Format: uuid */
1447
- order_id?: string | null;
1440
+ order_id: string | null;
1448
1441
  /** Format: uuid */
1449
- price_id?: string | null;
1442
+ price_id: string | null;
1450
1443
  /** Format: uuid */
1451
- subscription_item_id?: string | null;
1444
+ subscription_item_id: string | null;
1452
1445
  /** @enum {string|null} */
1453
- access_state?: "pending" | "enabled" | "suspended" | "reclaimed" | null;
1454
- task?: components["schemas"]["Task"] | null;
1446
+ access_state: "pending" | "enabled" | "suspended" | "reclaimed" | null;
1447
+ task: components["schemas"]["Task"] | null;
1455
1448
  attachment?: components["schemas"]["DiskAttachment"] | null;
1449
+ /** Format: int64 */
1450
+ generation: number;
1451
+ /** Format: date-time */
1452
+ observed_at: string | null;
1456
1453
  };
1457
1454
  DiskTypeResource: {
1458
1455
  /** Format: uuid */
@@ -1498,53 +1495,20 @@ export interface components {
1498
1495
  * @description Throughput a disk of `max_size_gb` gets, in bytes per second. Null when this type is not rate-limited
1499
1496
  */
1500
1497
  throughput_at_max_size: number | null;
1501
- /**
1502
- * @description Whether any capacity is left in this type's pool.
1503
- *
1504
- * The same shape as on an instance type, but it answers less here: a disk is sold by the
1505
- * GiB, so "not sold out" does not mean the size being asked for fits. `remaining` is the
1506
- * field that decides that, and this one only says whether the pool is empty outright.
1507
- *
1508
- * It reflects a limit set by operations, not what the storage backend physically has —
1509
- * raising the limit does not create capacity, and a type that is not sold out can still fail
1510
- * to create if the backend is full.
1511
- *
1512
- * Advisory: it is read when the list is built, and capacity can be taken between that read
1513
- * and the order. The order is what actually refuses.
1514
- */
1515
- sold_out: boolean;
1516
- /**
1517
- * Format: int64
1518
- * @description How much capacity is left, **in GiB**. Absent when this type is not limited at all.
1519
- *
1520
- * Unlike an instance type, where this is a count of machines, here it is an amount of
1521
- * storage — and it is the number that bounds the size a customer may ask for. A picker that
1522
- * offers sizes above it produces orders that are refused after the customer has chosen
1523
- * everything else.
1524
- *
1525
- * Absent is not zero and not "unknown": a type with no limit simply has no number to show.
1526
- * Reporting it as a number would need a sentinel, and any sentinel eventually gets compared
1527
- * against a real size.
1528
- */
1529
- remaining?: number;
1530
- /**
1531
- * @description What buying this type outright costs, per term. Empty means this type is only sold by the
1532
- * hour.
1533
- *
1534
- * **The amount is per GiB for the whole term**, not the price of one disk: a disk's size is
1535
- * chosen by the customer, so the total is this figure times the size. That differs from an
1536
- * instance type, where the same field is the price of one machine — the unit follows what
1537
- * the product is sold by, and the order is priced the same way.
1538
- *
1539
- * Advisory, like `sold_out`: it is read when the list is built. The order is what fixes the
1540
- * price, and it refuses rather than falling back to hourly if the term is not sold.
1541
- */
1542
- prepaid_prices?: components["schemas"]["PrepaidPrice"][];
1543
1498
  /** Format: uuid */
1544
- product_id?: string | null;
1499
+ product_id: string | null;
1545
1500
  /** Format: uuid */
1546
- plan_id?: string | null;
1547
- lookup_key?: string;
1501
+ plan_id: string | null;
1502
+ lookup_key: string;
1503
+ name_translations: {
1504
+ [key: string]: string;
1505
+ };
1506
+ /** Format: uuid */
1507
+ snapshot_plan_id: string | null;
1508
+ /** Format: uuid */
1509
+ backup_plan_id: string | null;
1510
+ /** Format: uuid */
1511
+ private_image_plan_id: string | null;
1548
1512
  };
1549
1513
  DiskTypeListResponseBody: {
1550
1514
  items: components["schemas"]["DiskTypeResource"][] | null;
@@ -1577,19 +1541,6 @@ export interface components {
1577
1541
  /** Format: int64 */
1578
1542
  total_count?: number;
1579
1543
  };
1580
- PrepaidPrice: {
1581
- /**
1582
- * @description An ISO 8601 duration (P1M, P1Y). A duration rather than a number of months: months are not
1583
- * the same length, and storing a number leaves whoever reads it to decide what it means.
1584
- */
1585
- term: string;
1586
- /**
1587
- * @description A decimal string, not a float. Money that survives a round trip through binary floating
1588
- * point is money that stops adding up.
1589
- */
1590
- amount: string;
1591
- currency: string;
1592
- };
1593
1544
  InstanceTypeResource: {
1594
1545
  /** Format: uuid */
1595
1546
  availability_zone_id: string;
@@ -1630,10 +1581,13 @@ export interface components {
1630
1581
  /** Format: int64 */
1631
1582
  vcpus: number;
1632
1583
  /** Format: uuid */
1633
- product_id?: string | null;
1584
+ product_id: string | null;
1634
1585
  /** Format: uuid */
1635
1586
  plan_id: string | null;
1636
- lookup_key?: string;
1587
+ lookup_key: string;
1588
+ name_translations: {
1589
+ [key: string]: string;
1590
+ };
1637
1591
  };
1638
1592
  InstanceTypeListResponseBody: {
1639
1593
  items: components["schemas"]["InstanceTypeResource"][];
@@ -1704,14 +1658,10 @@ export interface components {
1704
1658
  };
1705
1659
  FloatingIPResource: {
1706
1660
  address: string;
1707
- attached_fixed_ip: string | null;
1708
- attached_port_id: string | null;
1709
1661
  /** Format: int64 */
1710
1662
  bandwidth_mbps: number | null;
1711
1663
  /** Format: date-time */
1712
1664
  created_at: string;
1713
- /** Format: date-time */
1714
- detached_at: string | null;
1715
1665
  /** Format: uuid */
1716
1666
  id: string;
1717
1667
  /** Format: uuid */
@@ -1719,22 +1669,27 @@ export interface components {
1719
1669
  /** @enum {string} */
1720
1670
  status: "pending" | "available" | "deleting" | "error" | "unknown";
1721
1671
  /** Format: uuid */
1722
- order_id?: string | null;
1672
+ order_id: string | null;
1723
1673
  /** Format: uuid */
1724
- price_id?: string | null;
1674
+ price_id: string | null;
1725
1675
  /** Format: uuid */
1726
- subscription_item_id?: string | null;
1676
+ subscription_item_id: string | null;
1727
1677
  /** @enum {string|null} */
1728
- access_state?: "pending" | "enabled" | "suspended" | "reclaimed" | null;
1729
- task?: components["schemas"]["Task"] | null;
1678
+ access_state: "pending" | "enabled" | "suspended" | "reclaimed" | null;
1679
+ task: components["schemas"]["Task"] | null;
1730
1680
  /** Format: uuid */
1731
- bandwidth_order_id?: string | null;
1681
+ bandwidth_order_id: string | null;
1732
1682
  /** Format: uuid */
1733
- bandwidth_price_id?: string | null;
1683
+ bandwidth_price_id: string | null;
1734
1684
  /** Format: uuid */
1735
- bandwidth_subscription_item_id?: string | null;
1685
+ bandwidth_subscription_item_id: string | null;
1736
1686
  /** @enum {string|null} */
1737
- bandwidth_access_state?: "pending" | "enabled" | "suspended" | "reclaimed" | null;
1687
+ bandwidth_access_state: "pending" | "enabled" | "suspended" | "reclaimed" | null;
1688
+ /** Format: int64 */
1689
+ generation: number;
1690
+ /** Format: date-time */
1691
+ observed_at: string | null;
1692
+ binding: components["schemas"]["IPv4Binding"] | null;
1738
1693
  };
1739
1694
  FloatingIPListResponseBody: {
1740
1695
  items: components["schemas"]["FloatingIPResource"][] | null;
@@ -1812,7 +1767,7 @@ export interface components {
1812
1767
  private_image_id: string | null;
1813
1768
  /** @description Private address of the instance */
1814
1769
  private_ip: string | null;
1815
- /** @description Private network of the primary network interface */
1770
+ /** Format: uuid */
1816
1771
  private_network_id: string | null;
1817
1772
  /** @description Floating IPv4 addresses bound to the primary network interface; an empty array when none are bound */
1818
1773
  public_ips: string[] | null;
@@ -1820,7 +1775,7 @@ export interface components {
1820
1775
  region_id: string;
1821
1776
  /** @enum {string} */
1822
1777
  status: "pending" | "building" | "active" | "stopped" | "paused" | "suspended" | "shelved" | "shelved_offloaded" | "rescued" | "resized" | "deleting" | "deleted" | "error" | "unknown";
1823
- /** @description Subnet of the primary network interface */
1778
+ /** Format: uuid */
1824
1779
  subnet_id: string | null;
1825
1780
  /** Format: date-time */
1826
1781
  updated_at: string;
@@ -1832,21 +1787,18 @@ export interface components {
1832
1787
  task_state: string;
1833
1788
  /** Format: int64 */
1834
1789
  generation: number;
1835
- /**
1836
- * Format: date-time
1837
- * @description Timestamp of the last successful provider observation. An unreachable provider does not erase the last observation or prove deletion.
1838
- */
1839
- observed_at?: string;
1790
+ /** Format: date-time */
1791
+ observed_at: string | null;
1840
1792
  restrictions: components["schemas"]["InstanceRestriction"][];
1841
- task?: components["schemas"]["Task"] | null;
1793
+ task: components["schemas"]["Task"] | null;
1842
1794
  /** Format: uuid */
1843
1795
  order_id: string | null;
1844
1796
  /** Format: uuid */
1845
- price_id?: string | null;
1797
+ price_id: string | null;
1846
1798
  /** Format: uuid */
1847
- subscription_item_id?: string | null;
1799
+ subscription_item_id: string | null;
1848
1800
  /** @enum {string|null} */
1849
- access_state?: "pending" | "enabled" | "suspended" | "reclaimed" | null;
1801
+ access_state: "pending" | "enabled" | "suspended" | "reclaimed" | null;
1850
1802
  /**
1851
1803
  * Format: uuid
1852
1804
  * @description Non-empty when the instance was created from a disk you already had, instead of from an image
@@ -2032,6 +1984,12 @@ export interface components {
2032
1984
  public_ips: string[] | null;
2033
1985
  addresses?: components["schemas"]["PortAddress"][];
2034
1986
  attachment?: components["schemas"]["PortAttachment"] | null;
1987
+ /** @enum {string} */
1988
+ status: "pending" | "available" | "deleting" | "error" | "unknown";
1989
+ /** Format: int64 */
1990
+ generation: number;
1991
+ /** Format: date-time */
1992
+ observed_at: string | null;
2035
1993
  };
2036
1994
  PortListResponseBody: {
2037
1995
  items: components["schemas"]["PortResource"][] | null;
@@ -2128,14 +2086,18 @@ export interface components {
2128
2086
  /** @description False means a new password can only be set by rebuilding an instance created from this image */
2129
2087
  supports_password_reset: boolean;
2130
2088
  /** Format: uuid */
2131
- order_id?: string | null;
2089
+ order_id: string | null;
2132
2090
  /** Format: uuid */
2133
- price_id?: string | null;
2091
+ price_id: string | null;
2134
2092
  /** Format: uuid */
2135
- subscription_item_id?: string | null;
2093
+ subscription_item_id: string | null;
2136
2094
  /** @enum {string|null} */
2137
- access_state?: "pending" | "enabled" | "suspended" | "reclaimed" | null;
2138
- task?: components["schemas"]["Task"] | null;
2095
+ access_state: "pending" | "enabled" | "suspended" | "reclaimed" | null;
2096
+ task: components["schemas"]["Task"] | null;
2097
+ /** Format: int64 */
2098
+ generation: number;
2099
+ /** Format: date-time */
2100
+ observed_at: string | null;
2139
2101
  };
2140
2102
  PrivateImageListResponseBody: {
2141
2103
  items: components["schemas"]["PrivateImageResource"][];
@@ -2333,14 +2295,18 @@ export interface components {
2333
2295
  /** @enum {string} */
2334
2296
  status: "provisioning" | "available" | "restoring" | "deleting" | "error";
2335
2297
  /** Format: uuid */
2336
- order_id?: string | null;
2298
+ order_id: string | null;
2337
2299
  /** Format: uuid */
2338
- price_id?: string | null;
2300
+ price_id: string | null;
2339
2301
  /** Format: uuid */
2340
- subscription_item_id?: string | null;
2302
+ subscription_item_id: string | null;
2341
2303
  /** @enum {string|null} */
2342
- access_state?: "pending" | "enabled" | "suspended" | "reclaimed" | null;
2343
- task?: components["schemas"]["Task"] | null;
2304
+ access_state: "pending" | "enabled" | "suspended" | "reclaimed" | null;
2305
+ task: components["schemas"]["Task"] | null;
2306
+ /** Format: int64 */
2307
+ generation: number;
2308
+ /** Format: date-time */
2309
+ observed_at: string | null;
2344
2310
  };
2345
2311
  SnapshotListResponseBody: {
2346
2312
  items: components["schemas"]["SnapshotResource"][] | null;
@@ -2473,6 +2439,7 @@ export interface components {
2473
2439
  detached_at: string | null;
2474
2440
  /** Format: date-time */
2475
2441
  released_at: string | null;
2442
+ device: string | null;
2476
2443
  };
2477
2444
  DiskAttachmentList: {
2478
2445
  items: components["schemas"]["DiskAttachment"][];
@@ -2537,6 +2504,24 @@ export interface components {
2537
2504
  /** Format: int64 */
2538
2505
  total_count?: number;
2539
2506
  };
2507
+ IPv4Binding: {
2508
+ /** Format: uuid */
2509
+ id: string;
2510
+ /** Format: uuid */
2511
+ ipv4_allocation_id: string;
2512
+ /** Format: uuid */
2513
+ port_address_id: string;
2514
+ address: string;
2515
+ fixed_ip: string;
2516
+ /** @enum {string} */
2517
+ state: "binding" | "bound" | "unbinding" | "released" | "unknown";
2518
+ /** Format: date-time */
2519
+ bound_at: string | null;
2520
+ /** Format: date-time */
2521
+ unbound_at: string | null;
2522
+ /** Format: date-time */
2523
+ released_at: string | null;
2524
+ };
2540
2525
  /** @description Requested funding split. This does not select a card or payment provider; complete payment through Billing. */
2541
2526
  PaymentPlan: {
2542
2527
  balance_amount: string;
@@ -3318,12 +3303,14 @@ export interface operations {
3318
3303
  };
3319
3304
  requestBody?: never;
3320
3305
  responses: {
3321
- /** @description No Content */
3322
- 204: {
3306
+ /** @description The release has been accepted. */
3307
+ 202: {
3323
3308
  headers: {
3324
3309
  [name: string]: unknown;
3325
3310
  };
3326
- content?: never;
3311
+ content: {
3312
+ "application/json": components["schemas"]["Task"];
3313
+ };
3327
3314
  };
3328
3315
  /** @description Error */
3329
3316
  default: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leaflow/sdk",
3
- "version": "0.70.0",
3
+ "version": "0.71.0",
4
4
  "description": "Leaflow 平台 API 的 TypeScript SDK",
5
5
  "license": "MIT",
6
6
  "repository": {