@leaflow/sdk 0.161.0 → 0.162.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.
Files changed (42) hide show
  1. package/dist/billing/type/cancellation/v1/generated/functions.d.ts +8 -0
  2. package/dist/billing/type/cancellation/v1/generated/functions.js +8 -0
  3. package/dist/billing/type/cancellation/v1/generated/models.d.ts +19 -0
  4. package/dist/billing/type/cancellation/v1/generated/models.js +4 -0
  5. package/dist/billing/type/cancellation/v1/generated/schemas.zod.d.ts +8 -0
  6. package/dist/billing/type/cancellation/v1/generated/schemas.zod.js +8 -0
  7. package/dist/billing/type/cancellation/v1/generated/validators/cancellationMode.zod.d.ts +14 -0
  8. package/dist/billing/type/cancellation/v1/generated/validators/cancellationMode.zod.js +11 -0
  9. package/dist/billing/v1/generated/models.d.ts +18 -11
  10. package/dist/billing/v1/generated/models.js +4 -4
  11. package/dist/billing/v1/generated/validators/cancelSubscriptionRequest.zod.js +2 -2
  12. package/dist/billing/v1/generated/validators/cancellation.zod.js +2 -2
  13. package/dist/billing/v1/generated/validators/cancellationCreate.zod.js +2 -2
  14. package/dist/billing/v1/generated/validators/cancellationMode.zod.d.ts +14 -0
  15. package/dist/billing/v1/generated/validators/cancellationMode.zod.js +11 -0
  16. package/dist/billing/v1/generated/validators/cancellationPreviewRequest.zod.js +2 -2
  17. package/dist/billing/v1/generated/validators/cancellationRefundPreview.zod.js +2 -2
  18. package/dist/billing/v1/generated/validators/subscriptionCancellation.zod.js +2 -1
  19. package/dist/compute/v1/generated/functions.d.ts +25 -25
  20. package/dist/compute/v1/generated/functions.js +101 -38
  21. package/dist/compute/v1/generated/models.d.ts +85 -10
  22. package/dist/compute/v1/generated/models.js +4 -4
  23. package/dist/compute/v1/generated/schemas.zod.d.ts +52 -10
  24. package/dist/compute/v1/generated/schemas.zod.js +52 -10
  25. package/dist/compute/v1/generated/validators/cancellationMode.zod.d.ts +30 -0
  26. package/dist/compute/v1/generated/validators/cancellationMode.zod.js +27 -0
  27. package/dist/compute/v1/generated/validators/deleteBackupCapacityPackParams.zod.d.ts +32 -0
  28. package/dist/compute/v1/generated/validators/deleteBackupCapacityPackParams.zod.js +30 -0
  29. package/dist/compute/v1/generated/validators/deleteBackupServiceParams.zod.d.ts +32 -0
  30. package/dist/compute/v1/generated/validators/deleteBackupServiceParams.zod.js +30 -0
  31. package/dist/compute/v1/generated/validators/deleteDiskParams.zod.d.ts +32 -0
  32. package/dist/compute/v1/generated/validators/deleteDiskParams.zod.js +30 -0
  33. package/dist/compute/v1/generated/validators/deleteImageParams.zod.d.ts +32 -0
  34. package/dist/compute/v1/generated/validators/deleteImageParams.zod.js +30 -0
  35. package/dist/compute/v1/generated/validators/deleteInstanceParams.zod.d.ts +32 -0
  36. package/dist/compute/v1/generated/validators/deleteInstanceParams.zod.js +30 -0
  37. package/dist/compute/v1/generated/validators/deleteSnapshotQuotaParams.zod.d.ts +32 -0
  38. package/dist/compute/v1/generated/validators/deleteSnapshotQuotaParams.zod.js +30 -0
  39. package/dist/compute/v1/generated/validators/releaseFloatingIpParams.zod.d.ts +32 -0
  40. package/dist/compute/v1/generated/validators/releaseFloatingIpParams.zod.js +30 -0
  41. package/dist/compute/v1/generated/validators/resourceCancellation.zod.js +2 -3
  42. package/package.json +1 -1
@@ -327,8 +327,17 @@ export const renameImage = async (imageId, renameImageRequestBody, options, fetc
327
327
  const data = body ? JSON.parse(body) : {};
328
328
  return { data, status: res.status, headers: res.headers };
329
329
  };
330
- export const getDeleteImageUrl = (imageId) => {
331
- return `https://compute.leaflow.cloud/api/v1/images/${encodeURIComponent(String(imageId))}`;
330
+ export const getDeleteImageUrl = (imageId, params) => {
331
+ const normalizedParams = new URLSearchParams();
332
+ Object.entries(params || {}).forEach(([key, value]) => {
333
+ if (value !== undefined) {
334
+ normalizedParams.append(key, value === null ? "null" : String(value));
335
+ }
336
+ });
337
+ const stringifiedParams = normalizedParams.toString();
338
+ return stringifiedParams.length > 0
339
+ ? `https://compute.leaflow.cloud/api/v1/images/${encodeURIComponent(String(imageId))}?${stringifiedParams}`
340
+ : `https://compute.leaflow.cloud/api/v1/images/${encodeURIComponent(String(imageId))}`;
332
341
  };
333
342
  /**
334
343
  * Only a private image of this project can be deleted; any other image is reported as not found.
@@ -337,11 +346,11 @@ export const getDeleteImageUrl = (imageId) => {
337
346
  *
338
347
  * An image whose capture has not finished can be deleted; the capture is aborted. This is the one operation accepted while the `create` operation is in progress.
339
348
  *
340
- * When subscriptions pay for the image, its `release_subscription_ids`, this request cancels them in Billing, and the response carries that cancellation. Pay-as-you-go subscriptions, and prepaid ones whose terms allow it, are canceled at once and refunded under those terms, and release begins when Billing begins the cancellation. When any of them can only be canceled at the end of its paid period, all of them are canceled then, and the image is kept until `scheduled_at`. Deleting again while the cancellation is open returns it. Without subscriptions, deletion begins at once and `cancellation` is null.
349
+ * When subscriptions pay for the image, its `release_subscription_ids`, this request cancels them in Billing as `cancellation_mode` says, and the response carries that cancellation. Canceled now, they are refunded under their terms and release begins when Billing begins the cancellation; canceled at the end of their paid period, the image is kept until `scheduled_at`. Deleting again while the cancellation is open returns it. Without subscriptions, deletion begins at once and `cancellation` is null.
341
350
  * @summary Delete a private image
342
351
  */
343
- export const deleteImage = async (imageId, options, fetchFn) => {
344
- const res = await (fetchFn ?? fetch)(getDeleteImageUrl(imageId), {
352
+ export const deleteImage = async (imageId, params, options, fetchFn) => {
353
+ const res = await (fetchFn ?? fetch)(getDeleteImageUrl(imageId, params), {
345
354
  ...options,
346
355
  method: "DELETE",
347
356
  });
@@ -532,17 +541,26 @@ export const renameDisk = async (diskId, renameDiskRequestBody, options, fetchFn
532
541
  const data = body ? JSON.parse(body) : {};
533
542
  return { data, status: res.status, headers: res.headers };
534
543
  };
535
- export const getDeleteDiskUrl = (diskId) => {
536
- return `https://compute.leaflow.cloud/api/v1/disks/${encodeURIComponent(String(diskId))}`;
544
+ export const getDeleteDiskUrl = (diskId, params) => {
545
+ const normalizedParams = new URLSearchParams();
546
+ Object.entries(params || {}).forEach(([key, value]) => {
547
+ if (value !== undefined) {
548
+ normalizedParams.append(key, value === null ? "null" : String(value));
549
+ }
550
+ });
551
+ const stringifiedParams = normalizedParams.toString();
552
+ return stringifiedParams.length > 0
553
+ ? `https://compute.leaflow.cloud/api/v1/disks/${encodeURIComponent(String(diskId))}?${stringifiedParams}`
554
+ : `https://compute.leaflow.cloud/api/v1/disks/${encodeURIComponent(String(diskId))}`;
537
555
  };
538
556
  /**
539
557
  * Deletion is rejected while the disk is attached, or while snapshots created from it still exist.
540
558
  *
541
- * When subscriptions pay for the disk, its `release_subscription_ids`, this request cancels them in Billing, and the response carries that cancellation. Pay-as-you-go subscriptions, and prepaid ones whose terms allow it, are canceled at once and refunded under those terms, and release begins when Billing begins the cancellation. When any of them can only be canceled at the end of its paid period, all of them are canceled then, and the disk is kept until `scheduled_at`. Deleting again while the cancellation is open returns it. Without subscriptions, deletion begins at once and `cancellation` is null.
559
+ * When subscriptions pay for the disk, its `release_subscription_ids`, this request cancels them in Billing as `cancellation_mode` says, and the response carries that cancellation. Canceled now, they are refunded under their terms and release begins when Billing begins the cancellation; canceled at the end of their paid period, the disk is kept until `scheduled_at`. Deleting again while the cancellation is open returns it. Without subscriptions, deletion begins at once and `cancellation` is null.
542
560
  * @summary Delete a disk
543
561
  */
544
- export const deleteDisk = async (diskId, options, fetchFn) => {
545
- const res = await (fetchFn ?? fetch)(getDeleteDiskUrl(diskId), {
562
+ export const deleteDisk = async (diskId, params, options, fetchFn) => {
563
+ const res = await (fetchFn ?? fetch)(getDeleteDiskUrl(diskId, params), {
546
564
  ...options,
547
565
  method: "DELETE",
548
566
  });
@@ -704,17 +722,26 @@ export const getFloatingIp = async (floatingIpId, options, fetchFn) => {
704
722
  const data = body ? JSON.parse(body) : {};
705
723
  return { data, status: res.status, headers: res.headers };
706
724
  };
707
- export const getReleaseFloatingIpUrl = (floatingIpId) => {
708
- return `https://compute.leaflow.cloud/api/v1/floating-ips/${encodeURIComponent(String(floatingIpId))}`;
725
+ export const getReleaseFloatingIpUrl = (floatingIpId, params) => {
726
+ const normalizedParams = new URLSearchParams();
727
+ Object.entries(params || {}).forEach(([key, value]) => {
728
+ if (value !== undefined) {
729
+ normalizedParams.append(key, value === null ? "null" : String(value));
730
+ }
731
+ });
732
+ const stringifiedParams = normalizedParams.toString();
733
+ return stringifiedParams.length > 0
734
+ ? `https://compute.leaflow.cloud/api/v1/floating-ips/${encodeURIComponent(String(floatingIpId))}?${stringifiedParams}`
735
+ : `https://compute.leaflow.cloud/api/v1/floating-ips/${encodeURIComponent(String(floatingIpId))}`;
709
736
  };
710
737
  /**
711
738
  * Releases the floating IP after unbinding it. The floating IP shows the `delete` operation until it is released.
712
739
  *
713
- * When subscriptions pay for the address, its `release_subscription_ids`, this request cancels them in Billing, and the response carries that cancellation. Pay-as-you-go subscriptions, and prepaid ones whose terms allow it, are canceled at once and refunded under those terms, and release begins when Billing begins the cancellation. When any of them can only be canceled at the end of its paid period, all of them are canceled then, and the floating IP is kept until `scheduled_at`. Deleting again while the cancellation is open returns it. Without subscriptions, release begins at once and `cancellation` is null.
740
+ * When subscriptions pay for the address, its `release_subscription_ids`, this request cancels them in Billing as `cancellation_mode` says, and the response carries that cancellation. Canceled now, they are refunded under their terms and release begins when Billing begins the cancellation; canceled at the end of their paid period, the floating IP is kept until `scheduled_at`. Deleting again while the cancellation is open returns it. Without subscriptions, release begins at once and `cancellation` is null.
714
741
  * @summary Release a floating IP
715
742
  */
716
- export const releaseFloatingIp = async (floatingIpId, options, fetchFn) => {
717
- const res = await (fetchFn ?? fetch)(getReleaseFloatingIpUrl(floatingIpId), {
743
+ export const releaseFloatingIp = async (floatingIpId, params, options, fetchFn) => {
744
+ const res = await (fetchFn ?? fetch)(getReleaseFloatingIpUrl(floatingIpId, params), {
718
745
  ...options,
719
746
  method: "DELETE",
720
747
  });
@@ -921,19 +948,28 @@ export const renameInstance = async (instanceId, renameInstanceRequestBody, opti
921
948
  const data = body ? JSON.parse(body) : {};
922
949
  return { data, status: res.status, headers: res.headers };
923
950
  };
924
- export const getDeleteInstanceUrl = (instanceId) => {
925
- return `https://compute.leaflow.cloud/api/v1/instances/${encodeURIComponent(String(instanceId))}`;
951
+ export const getDeleteInstanceUrl = (instanceId, params) => {
952
+ const normalizedParams = new URLSearchParams();
953
+ Object.entries(params || {}).forEach(([key, value]) => {
954
+ if (value !== undefined) {
955
+ normalizedParams.append(key, value === null ? "null" : String(value));
956
+ }
957
+ });
958
+ const stringifiedParams = normalizedParams.toString();
959
+ return stringifiedParams.length > 0
960
+ ? `https://compute.leaflow.cloud/api/v1/instances/${encodeURIComponent(String(instanceId))}?${stringifiedParams}`
961
+ : `https://compute.leaflow.cloud/api/v1/instances/${encodeURIComponent(String(instanceId))}`;
926
962
  };
927
963
  /**
928
964
  * The system disk is deleted with the instance, and **snapshots created from the system disk are deleted with it**. Data disks are detached and kept, and their snapshots and backups are unaffected. The primary network interface is released with the instance.
929
965
  *
930
966
  * An instance being captured as a private image cannot be released. Wait for the capture to finish, or delete that image first.
931
967
  *
932
- * When subscriptions pay for the instance, or for a disk deleted with it, its `release_subscription_ids`, this request cancels them in Billing, and the response carries that cancellation. Pay-as-you-go subscriptions, and prepaid ones whose terms allow it, are canceled at once and refunded under those terms, and release begins when Billing begins the cancellation. When any of them can only be canceled at the end of its paid period, all of them are canceled then, and the instance is kept until `scheduled_at`. Deleting again while the cancellation is open returns it. Without subscriptions, release begins at once and `cancellation` is null.
968
+ * When subscriptions pay for the instance, or for a disk deleted with it, its `release_subscription_ids`, this request cancels them in Billing as `cancellation_mode` says, and the response carries that cancellation. Canceled now, they are refunded under their terms and release begins when Billing begins the cancellation; canceled at the end of their paid period, the instance is kept until `scheduled_at`. Deleting again while the cancellation is open returns it. Without subscriptions, release begins at once and `cancellation` is null.
933
969
  * @summary Release an instance
934
970
  */
935
- export const deleteInstance = async (instanceId, options, fetchFn) => {
936
- const res = await (fetchFn ?? fetch)(getDeleteInstanceUrl(instanceId), {
971
+ export const deleteInstance = async (instanceId, params, options, fetchFn) => {
972
+ const res = await (fetchFn ?? fetch)(getDeleteInstanceUrl(instanceId, params), {
937
973
  ...options,
938
974
  method: "DELETE",
939
975
  });
@@ -2236,17 +2272,26 @@ export const setSnapshotQuota = async (regionId, setSnapshotQuotaRequestBody, op
2236
2272
  const data = body ? JSON.parse(body) : {};
2237
2273
  return { data, status: res.status, headers: res.headers };
2238
2274
  };
2239
- export const getDeleteSnapshotQuotaUrl = (regionId) => {
2240
- return `https://compute.leaflow.cloud/api/v1/regions/${encodeURIComponent(String(regionId))}/snapshot-quota`;
2275
+ export const getDeleteSnapshotQuotaUrl = (regionId, params) => {
2276
+ const normalizedParams = new URLSearchParams();
2277
+ Object.entries(params || {}).forEach(([key, value]) => {
2278
+ if (value !== undefined) {
2279
+ normalizedParams.append(key, value === null ? "null" : String(value));
2280
+ }
2281
+ });
2282
+ const stringifiedParams = normalizedParams.toString();
2283
+ return stringifiedParams.length > 0
2284
+ ? `https://compute.leaflow.cloud/api/v1/regions/${encodeURIComponent(String(regionId))}/snapshot-quota?${stringifiedParams}`
2285
+ : `https://compute.leaflow.cloud/api/v1/regions/${encodeURIComponent(String(regionId))}/snapshot-quota`;
2241
2286
  };
2242
2287
  /**
2243
- * Cancels the quota's subscription in Billing and returns the cancellation. Refused with 409 `SNAPSHOT_QUOTA_IN_USE` while any snapshot exists in the region; delete the snapshots first. Refused with 409 `SNAPSHOT_QUOTA_NOT_ACTIVE` when no subscription pays for a quota in the region.
2288
+ * Cancels the quota's subscription in Billing as `cancellation_mode` says and returns the cancellation. Refused with 409 `SNAPSHOT_QUOTA_IN_USE` while any snapshot exists in the region; delete the snapshots first. Refused with 409 `SNAPSHOT_QUOTA_NOT_ACTIVE` when no subscription pays for a quota in the region.
2244
2289
  *
2245
- * Pay-as-you-go subscriptions, and prepaid ones whose terms allow it, are canceled at once and refunded under those terms. When the subscription can only be canceled at the end of its paid period, it is canceled then, and the quota stays in force until `scheduled_at`. Deleting again while the cancellation is open returns it.
2290
+ * Canceled now, it is refunded under its terms; canceled at the end of its paid period, the quota stays in force until `scheduled_at`. Deleting again while the cancellation is open returns it.
2246
2291
  * @summary Delete regional snapshot quota
2247
2292
  */
2248
- export const deleteSnapshotQuota = async (regionId, options, fetchFn) => {
2249
- const res = await (fetchFn ?? fetch)(getDeleteSnapshotQuotaUrl(regionId), {
2293
+ export const deleteSnapshotQuota = async (regionId, params, options, fetchFn) => {
2294
+ const res = await (fetchFn ?? fetch)(getDeleteSnapshotQuotaUrl(regionId, params), {
2250
2295
  ...options,
2251
2296
  method: "DELETE",
2252
2297
  });
@@ -2307,17 +2352,26 @@ export const createBackupService = async (regionId, createBackupServiceRequestBo
2307
2352
  const data = body ? JSON.parse(body) : {};
2308
2353
  return { data, status: res.status, headers: res.headers };
2309
2354
  };
2310
- export const getDeleteBackupServiceUrl = (regionId) => {
2311
- return `https://compute.leaflow.cloud/api/v1/regions/${encodeURIComponent(String(regionId))}/backup-service`;
2355
+ export const getDeleteBackupServiceUrl = (regionId, params) => {
2356
+ const normalizedParams = new URLSearchParams();
2357
+ Object.entries(params || {}).forEach(([key, value]) => {
2358
+ if (value !== undefined) {
2359
+ normalizedParams.append(key, value === null ? "null" : String(value));
2360
+ }
2361
+ });
2362
+ const stringifiedParams = normalizedParams.toString();
2363
+ return stringifiedParams.length > 0
2364
+ ? `https://compute.leaflow.cloud/api/v1/regions/${encodeURIComponent(String(regionId))}/backup-service?${stringifiedParams}`
2365
+ : `https://compute.leaflow.cloud/api/v1/regions/${encodeURIComponent(String(regionId))}/backup-service`;
2312
2366
  };
2313
2367
  /**
2314
- * Cancels the service's subscription in Billing and returns the cancellation. Refused with 409 `BACKUP_SERVICE_IN_USE` while any backup is retained in the region; delete the backups first. Capacity packs are deleted separately. Refused with 409 `BACKUP_SERVICE_NOT_ACTIVE` when no subscription pays for a service in the region.
2368
+ * Cancels the service's subscription in Billing as `cancellation_mode` says and returns the cancellation. Refused with 409 `BACKUP_SERVICE_IN_USE` while any backup is retained in the region; delete the backups first. Capacity packs are deleted separately. Refused with 409 `BACKUP_SERVICE_NOT_ACTIVE` when no subscription pays for a service in the region.
2315
2369
  *
2316
- * Pay-as-you-go subscriptions, and prepaid ones whose terms allow it, are canceled at once and refunded under those terms. When the subscription can only be canceled at the end of its paid period, it is canceled then, and the service stays in force until `scheduled_at`. Deleting again while the cancellation is open returns it.
2370
+ * Canceled now, it is refunded under its terms; canceled at the end of its paid period, the service stays in force until `scheduled_at`. Deleting again while the cancellation is open returns it.
2317
2371
  * @summary Delete the backup service of a region
2318
2372
  */
2319
- export const deleteBackupService = async (regionId, options, fetchFn) => {
2320
- const res = await (fetchFn ?? fetch)(getDeleteBackupServiceUrl(regionId), {
2373
+ export const deleteBackupService = async (regionId, params, options, fetchFn) => {
2374
+ const res = await (fetchFn ?? fetch)(getDeleteBackupServiceUrl(regionId, params), {
2321
2375
  ...options,
2322
2376
  method: "DELETE",
2323
2377
  });
@@ -2385,17 +2439,26 @@ export const createBackupCapacityPack = async (regionId, createBackupCapacityPac
2385
2439
  const data = body ? JSON.parse(body) : {};
2386
2440
  return { data, status: res.status, headers: res.headers };
2387
2441
  };
2388
- export const getDeleteBackupCapacityPackUrl = (regionId, packId) => {
2389
- return `https://compute.leaflow.cloud/api/v1/regions/${encodeURIComponent(String(regionId))}/backup-capacity-packs/${encodeURIComponent(String(packId))}`;
2442
+ export const getDeleteBackupCapacityPackUrl = (regionId, packId, params) => {
2443
+ const normalizedParams = new URLSearchParams();
2444
+ Object.entries(params || {}).forEach(([key, value]) => {
2445
+ if (value !== undefined) {
2446
+ normalizedParams.append(key, value === null ? "null" : String(value));
2447
+ }
2448
+ });
2449
+ const stringifiedParams = normalizedParams.toString();
2450
+ return stringifiedParams.length > 0
2451
+ ? `https://compute.leaflow.cloud/api/v1/regions/${encodeURIComponent(String(regionId))}/backup-capacity-packs/${encodeURIComponent(String(packId))}?${stringifiedParams}`
2452
+ : `https://compute.leaflow.cloud/api/v1/regions/${encodeURIComponent(String(regionId))}/backup-capacity-packs/${encodeURIComponent(String(packId))}`;
2390
2453
  };
2391
2454
  /**
2392
- * Cancels the pack's subscription in Billing and returns the cancellation. Refused with 404 `BACKUP_CAPACITY_PACK_NOT_FOUND` when the project has no pack of this ID in the region, and with 409 `BACKUP_CAPACITY_PACK_ENDED` when the pack has ended.
2455
+ * Cancels the pack's subscription in Billing as `cancellation_mode` says and returns the cancellation. Refused with 404 `BACKUP_CAPACITY_PACK_NOT_FOUND` when the project has no pack of this ID in the region, and with 409 `BACKUP_CAPACITY_PACK_ENDED` when the pack has ended.
2393
2456
  *
2394
- * Pay-as-you-go subscriptions, and prepaid ones whose terms allow it, are canceled at once and refunded under those terms. When the subscription can only be canceled at the end of its paid period, it is canceled then, and its coverage stays in force until `scheduled_at`. Deleting again while the cancellation is open returns it.
2457
+ * Canceled now, it is refunded under its terms; canceled at the end of its paid period, its coverage stays in force until `scheduled_at`. Deleting again while the cancellation is open returns it.
2395
2458
  * @summary Delete a backup capacity pack
2396
2459
  */
2397
- export const deleteBackupCapacityPack = async (regionId, packId, options, fetchFn) => {
2398
- const res = await (fetchFn ?? fetch)(getDeleteBackupCapacityPackUrl(regionId, packId), {
2460
+ export const deleteBackupCapacityPack = async (regionId, packId, params, options, fetchFn) => {
2461
+ const res = await (fetchFn ?? fetch)(getDeleteBackupCapacityPackUrl(regionId, packId, params), {
2399
2462
  ...options,
2400
2463
  method: "DELETE",
2401
2464
  });
@@ -144,14 +144,6 @@ export interface BillingComponent {
144
144
  /** What the line's metered price reads. Empty when the line is never metered or its usage is not estimated in advance. */
145
145
  meters: BillingMeter[];
146
146
  }
147
- /**
148
- * `immediate` releases the resource now and refunds under the subscriptions' terms; `period_end` keeps it until `scheduled_at`.
149
- */
150
- export type ResourceCancellationMode = (typeof ResourceCancellationMode)[keyof typeof ResourceCancellationMode];
151
- export declare const ResourceCancellationMode: {
152
- readonly immediate: "immediate";
153
- readonly period_end: "period_end";
154
- };
155
147
  /**
156
148
  * `requested` and `scheduled` have not begun release; `releasing` is releasing the resource.
157
149
  */
@@ -161,13 +153,25 @@ export declare const ResourceCancellationStatus: {
161
153
  readonly scheduled: "scheduled";
162
154
  readonly releasing: "releasing";
163
155
  };
156
+ /**
157
+ * When subscriptions end. immediate ends them now and refunds the unused value under their refund terms; period_end
158
+ * ends them at the end of their paid period. The cancellation terms fixed when a subscription was bought decide which
159
+ * modes it allows: a pay-as-you-go subscription ends only immediately, and a prepaid one whose terms allow only the
160
+ * end of its paid period ends only then. Billing refuses a mode the terms do not allow with HTTP 422
161
+ * BILLING_CANCELLATION_MODE_FIXED.
162
+ */
163
+ export type CancellationMode = (typeof CancellationMode)[keyof typeof CancellationMode];
164
+ export declare const CancellationMode: {
165
+ readonly immediate: "immediate";
166
+ readonly period_end: "period_end";
167
+ };
164
168
  /**
165
169
  * The Billing cancellation of the subscriptions that pay for a resource. Read it in Billing with `get-cancellation` for its refund and progress.
166
170
  */
167
171
  export interface ResourceCancellation {
168
172
  id: string;
169
- /** `immediate` releases the resource now and refunds under the subscriptions' terms; `period_end` keeps it until `scheduled_at`. */
170
- mode: ResourceCancellationMode;
173
+ /** `immediate` releases the resource now; `period_end` keeps it until `scheduled_at`. */
174
+ mode: CancellationMode;
171
175
  /** `requested` and `scheduled` have not begun release; `releasing` is releasing the resource. */
172
176
  status: ResourceCancellationStatus;
173
177
  /**
@@ -2366,6 +2370,7 @@ export interface CursorPagination {
2366
2370
  * apply.
2367
2371
  */
2368
2372
  export type ConflictResponse = Error;
2373
+ export type CancellationModeParameter = CancellationMode;
2369
2374
  export type ListBackupsParams = {
2370
2375
  /**
2371
2376
  * Return only the backups of this disk
@@ -2425,6 +2430,16 @@ export type ListImagesParams = {
2425
2430
  */
2426
2431
  page_size?: number;
2427
2432
  };
2433
+ export type DeleteImageParams = {
2434
+ /**
2435
+ * When subscriptions end. immediate ends them now and refunds the unused value under their refund terms; period_end
2436
+ * ends them at the end of their paid period. The cancellation terms fixed when a subscription was bought decide which
2437
+ * modes it allows: a pay-as-you-go subscription ends only immediately, and a prepaid one whose terms allow only the
2438
+ * end of its paid period ends only then. Billing refuses a mode the terms do not allow with HTTP 422
2439
+ * BILLING_CANCELLATION_MODE_FIXED.
2440
+ */
2441
+ cancellation_mode?: CancellationModeParameter;
2442
+ };
2428
2443
  export type ListInstanceTypesParams = {
2429
2444
  region_id?: string;
2430
2445
  /**
@@ -2487,6 +2502,16 @@ export type ListDisksParams = {
2487
2502
  */
2488
2503
  page_size?: number;
2489
2504
  };
2505
+ export type DeleteDiskParams = {
2506
+ /**
2507
+ * When subscriptions end. immediate ends them now and refunds the unused value under their refund terms; period_end
2508
+ * ends them at the end of their paid period. The cancellation terms fixed when a subscription was bought decide which
2509
+ * modes it allows: a pay-as-you-go subscription ends only immediately, and a prepaid one whose terms allow only the
2510
+ * end of its paid period ends only then. Billing refuses a mode the terms do not allow with HTTP 422
2511
+ * BILLING_CANCELLATION_MODE_FIXED.
2512
+ */
2513
+ cancellation_mode?: CancellationModeParameter;
2514
+ };
2490
2515
  export type ListFloatingIpsParams = {
2491
2516
  /**
2492
2517
  * 1-based page number. Defaults to 1.
@@ -2501,6 +2526,16 @@ export type ListFloatingIpsParams = {
2501
2526
  */
2502
2527
  page_size?: number;
2503
2528
  };
2529
+ export type ReleaseFloatingIpParams = {
2530
+ /**
2531
+ * When subscriptions end. immediate ends them now and refunds the unused value under their refund terms; period_end
2532
+ * ends them at the end of their paid period. The cancellation terms fixed when a subscription was bought decide which
2533
+ * modes it allows: a pay-as-you-go subscription ends only immediately, and a prepaid one whose terms allow only the
2534
+ * end of its paid period ends only then. Billing refuses a mode the terms do not allow with HTTP 422
2535
+ * BILLING_CANCELLATION_MODE_FIXED.
2536
+ */
2537
+ cancellation_mode?: CancellationModeParameter;
2538
+ };
2504
2539
  export type ListInstancesParams = {
2505
2540
  /**
2506
2541
  * A label to filter by, written as `key:value`
@@ -2520,6 +2555,16 @@ export type ListInstancesParams = {
2520
2555
  */
2521
2556
  page_size?: number;
2522
2557
  };
2558
+ export type DeleteInstanceParams = {
2559
+ /**
2560
+ * When subscriptions end. immediate ends them now and refunds the unused value under their refund terms; period_end
2561
+ * ends them at the end of their paid period. The cancellation terms fixed when a subscription was bought decide which
2562
+ * modes it allows: a pay-as-you-go subscription ends only immediately, and a prepaid one whose terms allow only the
2563
+ * end of its paid period ends only then. Billing refuses a mode the terms do not allow with HTTP 422
2564
+ * BILLING_CANCELLATION_MODE_FIXED.
2565
+ */
2566
+ cancellation_mode?: CancellationModeParameter;
2567
+ };
2523
2568
  export type GetInstanceConsoleOutputParams = {
2524
2569
  /**
2525
2570
  * Number of trailing lines to return; 0 returns the entire output
@@ -2675,6 +2720,26 @@ export type ListSecurityGroupRulesParams = {
2675
2720
  */
2676
2721
  page_size?: number;
2677
2722
  };
2723
+ export type DeleteSnapshotQuotaParams = {
2724
+ /**
2725
+ * When subscriptions end. immediate ends them now and refunds the unused value under their refund terms; period_end
2726
+ * ends them at the end of their paid period. The cancellation terms fixed when a subscription was bought decide which
2727
+ * modes it allows: a pay-as-you-go subscription ends only immediately, and a prepaid one whose terms allow only the
2728
+ * end of its paid period ends only then. Billing refuses a mode the terms do not allow with HTTP 422
2729
+ * BILLING_CANCELLATION_MODE_FIXED.
2730
+ */
2731
+ cancellation_mode?: CancellationModeParameter;
2732
+ };
2733
+ export type DeleteBackupServiceParams = {
2734
+ /**
2735
+ * When subscriptions end. immediate ends them now and refunds the unused value under their refund terms; period_end
2736
+ * ends them at the end of their paid period. The cancellation terms fixed when a subscription was bought decide which
2737
+ * modes it allows: a pay-as-you-go subscription ends only immediately, and a prepaid one whose terms allow only the
2738
+ * end of its paid period ends only then. Billing refuses a mode the terms do not allow with HTTP 422
2739
+ * BILLING_CANCELLATION_MODE_FIXED.
2740
+ */
2741
+ cancellation_mode?: CancellationModeParameter;
2742
+ };
2678
2743
  export type ListBackupCapacityPacksParams = {
2679
2744
  /**
2680
2745
  * 1-based page number. Defaults to 1.
@@ -2689,6 +2754,16 @@ export type ListBackupCapacityPacksParams = {
2689
2754
  */
2690
2755
  page_size?: number;
2691
2756
  };
2757
+ export type DeleteBackupCapacityPackParams = {
2758
+ /**
2759
+ * When subscriptions end. immediate ends them now and refunds the unused value under their refund terms; period_end
2760
+ * ends them at the end of their paid period. The cancellation terms fixed when a subscription was bought decide which
2761
+ * modes it allows: a pay-as-you-go subscription ends only immediately, and a prepaid one whose terms allow only the
2762
+ * end of its paid period ends only then. Billing refuses a mode the terms do not allow with HTTP 422
2763
+ * BILLING_CANCELLATION_MODE_FIXED.
2764
+ */
2765
+ cancellation_mode?: CancellationModeParameter;
2766
+ };
2692
2767
  export type ListSnapshotsParams = {
2693
2768
  /**
2694
2769
  * Return only the snapshots of this disk
@@ -22,15 +22,15 @@ export const BillingMeterQuantity = {
22
22
  bandwidth_mbps: "bandwidth_mbps",
23
23
  stored_gib: "stored_gib",
24
24
  };
25
- export const ResourceCancellationMode = {
26
- immediate: "immediate",
27
- period_end: "period_end",
28
- };
29
25
  export const ResourceCancellationStatus = {
30
26
  requested: "requested",
31
27
  scheduled: "scheduled",
32
28
  releasing: "releasing",
33
29
  };
30
+ export const CancellationMode = {
31
+ immediate: "immediate",
32
+ period_end: "period_end",
33
+ };
34
34
  export const InstanceResourceStatus = {
35
35
  pending: "pending",
36
36
  provisioning: "provisioning",
@@ -227,12 +227,18 @@ export declare const RenameImageBody: zod.ZodObject<{
227
227
  *
228
228
  * An image whose capture has not finished can be deleted; the capture is aborted. This is the one operation accepted while the `create` operation is in progress.
229
229
  *
230
- * When subscriptions pay for the image, its `release_subscription_ids`, this request cancels them in Billing, and the response carries that cancellation. Pay-as-you-go subscriptions, and prepaid ones whose terms allow it, are canceled at once and refunded under those terms, and release begins when Billing begins the cancellation. When any of them can only be canceled at the end of its paid period, all of them are canceled then, and the image is kept until `scheduled_at`. Deleting again while the cancellation is open returns it. Without subscriptions, deletion begins at once and `cancellation` is null.
230
+ * When subscriptions pay for the image, its `release_subscription_ids`, this request cancels them in Billing as `cancellation_mode` says, and the response carries that cancellation. Canceled now, they are refunded under their terms and release begins when Billing begins the cancellation; canceled at the end of their paid period, the image is kept until `scheduled_at`. Deleting again while the cancellation is open returns it. Without subscriptions, deletion begins at once and `cancellation` is null.
231
231
  * @summary Delete a private image
232
232
  */
233
233
  export declare const DeleteImageParams: zod.ZodObject<{
234
234
  imageId: zod.ZodUUID;
235
235
  }, zod.z.core.$strict>;
236
+ export declare const DeleteImageQueryParams: zod.ZodObject<{
237
+ cancellation_mode: zod.ZodOptional<zod.ZodEnum<{
238
+ immediate: "immediate";
239
+ period_end: "period_end";
240
+ }>>;
241
+ }, zod.z.core.$strict>;
236
242
  /**
237
243
  * Only instance types currently on sale are listed. A withdrawn one disappears from here and can no longer be ordered, while the instances already running it keep running.
238
244
  * @summary List instance types on sale
@@ -343,12 +349,18 @@ export declare const RenameDiskBody: zod.ZodObject<{
343
349
  /**
344
350
  * Deletion is rejected while the disk is attached, or while snapshots created from it still exist.
345
351
  *
346
- * When subscriptions pay for the disk, its `release_subscription_ids`, this request cancels them in Billing, and the response carries that cancellation. Pay-as-you-go subscriptions, and prepaid ones whose terms allow it, are canceled at once and refunded under those terms, and release begins when Billing begins the cancellation. When any of them can only be canceled at the end of its paid period, all of them are canceled then, and the disk is kept until `scheduled_at`. Deleting again while the cancellation is open returns it. Without subscriptions, deletion begins at once and `cancellation` is null.
352
+ * When subscriptions pay for the disk, its `release_subscription_ids`, this request cancels them in Billing as `cancellation_mode` says, and the response carries that cancellation. Canceled now, they are refunded under their terms and release begins when Billing begins the cancellation; canceled at the end of their paid period, the disk is kept until `scheduled_at`. Deleting again while the cancellation is open returns it. Without subscriptions, deletion begins at once and `cancellation` is null.
347
353
  * @summary Delete a disk
348
354
  */
349
355
  export declare const DeleteDiskParams: zod.ZodObject<{
350
356
  diskId: zod.ZodUUID;
351
357
  }, zod.z.core.$strict>;
358
+ export declare const DeleteDiskQueryParams: zod.ZodObject<{
359
+ cancellation_mode: zod.ZodOptional<zod.ZodEnum<{
360
+ immediate: "immediate";
361
+ period_end: "period_end";
362
+ }>>;
363
+ }, zod.z.core.$strict>;
352
364
  /**
353
365
  * Capacity can only be increased; shrinking is not supported. Returns the disk with the Checkout Session for the resize, which keeps the disk's usage type and period. The disk shows the `resize` operation until the resize is applied, its Checkout Session expires or its order is canceled, so other operations and a second resize are refused with `COMPUTE_RESOURCE_BUSY` meanwhile. The disk keeps its current size until the resize is applied; once `size_gb` shows the new size, extend the file system inside the instance. If checkout is not completed, the order is not accepted or the resize fails, the disk keeps its size and Billing shows the outcome.
354
366
  *
@@ -449,12 +461,18 @@ export declare const GetFloatingIpParams: zod.ZodObject<{
449
461
  /**
450
462
  * Releases the floating IP after unbinding it. The floating IP shows the `delete` operation until it is released.
451
463
  *
452
- * When subscriptions pay for the address, its `release_subscription_ids`, this request cancels them in Billing, and the response carries that cancellation. Pay-as-you-go subscriptions, and prepaid ones whose terms allow it, are canceled at once and refunded under those terms, and release begins when Billing begins the cancellation. When any of them can only be canceled at the end of its paid period, all of them are canceled then, and the floating IP is kept until `scheduled_at`. Deleting again while the cancellation is open returns it. Without subscriptions, release begins at once and `cancellation` is null.
464
+ * When subscriptions pay for the address, its `release_subscription_ids`, this request cancels them in Billing as `cancellation_mode` says, and the response carries that cancellation. Canceled now, they are refunded under their terms and release begins when Billing begins the cancellation; canceled at the end of their paid period, the floating IP is kept until `scheduled_at`. Deleting again while the cancellation is open returns it. Without subscriptions, release begins at once and `cancellation` is null.
453
465
  * @summary Release a floating IP
454
466
  */
455
467
  export declare const ReleaseFloatingIpParams: zod.ZodObject<{
456
468
  floatingIpId: zod.ZodUUID;
457
469
  }, zod.z.core.$strict>;
470
+ export declare const ReleaseFloatingIpQueryParams: zod.ZodObject<{
471
+ cancellation_mode: zod.ZodOptional<zod.ZodEnum<{
472
+ immediate: "immediate";
473
+ period_end: "period_end";
474
+ }>>;
475
+ }, zod.z.core.$strict>;
458
476
  /**
459
477
  * Changes the bandwidth of this floating IP through an order that keeps its usage type and period; no separate bandwidth resource is created. The limit applies to inbound and outbound traffic alike. The floating IP shows the `set_bandwidth` operation until the change is applied, its Checkout Session expires or its order is canceled, so other operations and a second change are refused with `COMPUTE_RESOURCE_BUSY` meanwhile. The current limit stays in effect until the change is applied. If checkout is not completed, the order is not accepted or the change fails, `bandwidth_mbps` keeps its value and Billing shows the outcome.
460
478
  *
@@ -632,12 +650,18 @@ export declare const RenameInstanceBody: zod.ZodObject<{
632
650
  *
633
651
  * An instance being captured as a private image cannot be released. Wait for the capture to finish, or delete that image first.
634
652
  *
635
- * When subscriptions pay for the instance, or for a disk deleted with it, its `release_subscription_ids`, this request cancels them in Billing, and the response carries that cancellation. Pay-as-you-go subscriptions, and prepaid ones whose terms allow it, are canceled at once and refunded under those terms, and release begins when Billing begins the cancellation. When any of them can only be canceled at the end of its paid period, all of them are canceled then, and the instance is kept until `scheduled_at`. Deleting again while the cancellation is open returns it. Without subscriptions, release begins at once and `cancellation` is null.
653
+ * When subscriptions pay for the instance, or for a disk deleted with it, its `release_subscription_ids`, this request cancels them in Billing as `cancellation_mode` says, and the response carries that cancellation. Canceled now, they are refunded under their terms and release begins when Billing begins the cancellation; canceled at the end of their paid period, the instance is kept until `scheduled_at`. Deleting again while the cancellation is open returns it. Without subscriptions, release begins at once and `cancellation` is null.
636
654
  * @summary Release an instance
637
655
  */
638
656
  export declare const DeleteInstanceParams: zod.ZodObject<{
639
657
  instanceId: zod.ZodUUID;
640
658
  }, zod.z.core.$strict>;
659
+ export declare const DeleteInstanceQueryParams: zod.ZodObject<{
660
+ cancellation_mode: zod.ZodOptional<zod.ZodEnum<{
661
+ immediate: "immediate";
662
+ period_end: "period_end";
663
+ }>>;
664
+ }, zod.z.core.$strict>;
641
665
  /**
642
666
  * Runs one command over SSH and returns what it wrote. **This is not a shell.** There is no terminal, no standard input and no way to answer a prompt: a command that waits for input produces nothing and is killed at the timeout. Chain steps with `&&`, or write a script and run that.
643
667
  *
@@ -1244,14 +1268,20 @@ export declare const SetSnapshotQuotaBody: zod.ZodObject<{
1244
1268
  proration_date: zod.ZodOptional<zod.z.ZodISODateTime>;
1245
1269
  }, zod.z.core.$strict>;
1246
1270
  /**
1247
- * Cancels the quota's subscription in Billing and returns the cancellation. Refused with 409 `SNAPSHOT_QUOTA_IN_USE` while any snapshot exists in the region; delete the snapshots first. Refused with 409 `SNAPSHOT_QUOTA_NOT_ACTIVE` when no subscription pays for a quota in the region.
1271
+ * Cancels the quota's subscription in Billing as `cancellation_mode` says and returns the cancellation. Refused with 409 `SNAPSHOT_QUOTA_IN_USE` while any snapshot exists in the region; delete the snapshots first. Refused with 409 `SNAPSHOT_QUOTA_NOT_ACTIVE` when no subscription pays for a quota in the region.
1248
1272
  *
1249
- * Pay-as-you-go subscriptions, and prepaid ones whose terms allow it, are canceled at once and refunded under those terms. When the subscription can only be canceled at the end of its paid period, it is canceled then, and the quota stays in force until `scheduled_at`. Deleting again while the cancellation is open returns it.
1273
+ * Canceled now, it is refunded under its terms; canceled at the end of its paid period, the quota stays in force until `scheduled_at`. Deleting again while the cancellation is open returns it.
1250
1274
  * @summary Delete regional snapshot quota
1251
1275
  */
1252
1276
  export declare const DeleteSnapshotQuotaParams: zod.ZodObject<{
1253
1277
  regionId: zod.ZodUUID;
1254
1278
  }, zod.z.core.$strict>;
1279
+ export declare const DeleteSnapshotQuotaQueryParams: zod.ZodObject<{
1280
+ cancellation_mode: zod.ZodOptional<zod.ZodEnum<{
1281
+ immediate: "immediate";
1282
+ period_end: "period_end";
1283
+ }>>;
1284
+ }, zod.z.core.$strict>;
1255
1285
  /**
1256
1286
  * The backup service of the authenticated project in this region. Backups can be created only while it is `active`. Each hour, Compute covers retained backup capacity up to the total `capacity_gib` of the capacity packs active in the region and meters only the excess on this service's subscription, per GiB-hour.
1257
1287
  *
@@ -1281,14 +1311,20 @@ export declare const CreateBackupServiceBody: zod.ZodObject<{
1281
1311
  }, zod.z.core.$strict>>;
1282
1312
  }, zod.z.core.$strict>;
1283
1313
  /**
1284
- * Cancels the service's subscription in Billing and returns the cancellation. Refused with 409 `BACKUP_SERVICE_IN_USE` while any backup is retained in the region; delete the backups first. Capacity packs are deleted separately. Refused with 409 `BACKUP_SERVICE_NOT_ACTIVE` when no subscription pays for a service in the region.
1314
+ * Cancels the service's subscription in Billing as `cancellation_mode` says and returns the cancellation. Refused with 409 `BACKUP_SERVICE_IN_USE` while any backup is retained in the region; delete the backups first. Capacity packs are deleted separately. Refused with 409 `BACKUP_SERVICE_NOT_ACTIVE` when no subscription pays for a service in the region.
1285
1315
  *
1286
- * Pay-as-you-go subscriptions, and prepaid ones whose terms allow it, are canceled at once and refunded under those terms. When the subscription can only be canceled at the end of its paid period, it is canceled then, and the service stays in force until `scheduled_at`. Deleting again while the cancellation is open returns it.
1316
+ * Canceled now, it is refunded under its terms; canceled at the end of its paid period, the service stays in force until `scheduled_at`. Deleting again while the cancellation is open returns it.
1287
1317
  * @summary Delete the backup service of a region
1288
1318
  */
1289
1319
  export declare const DeleteBackupServiceParams: zod.ZodObject<{
1290
1320
  regionId: zod.ZodUUID;
1291
1321
  }, zod.z.core.$strict>;
1322
+ export declare const DeleteBackupServiceQueryParams: zod.ZodObject<{
1323
+ cancellation_mode: zod.ZodOptional<zod.ZodEnum<{
1324
+ immediate: "immediate";
1325
+ period_end: "period_end";
1326
+ }>>;
1327
+ }, zod.z.core.$strict>;
1292
1328
  /**
1293
1329
  * The capacity packs of the authenticated project in this region, newest first, including ended ones.
1294
1330
  * @summary List backup capacity packs
@@ -1342,15 +1378,21 @@ export declare const CreateBackupCapacityPackBody: zod.ZodObject<{
1342
1378
  }, zod.z.core.$strict>>;
1343
1379
  }, zod.z.core.$strict>;
1344
1380
  /**
1345
- * Cancels the pack's subscription in Billing and returns the cancellation. Refused with 404 `BACKUP_CAPACITY_PACK_NOT_FOUND` when the project has no pack of this ID in the region, and with 409 `BACKUP_CAPACITY_PACK_ENDED` when the pack has ended.
1381
+ * Cancels the pack's subscription in Billing as `cancellation_mode` says and returns the cancellation. Refused with 404 `BACKUP_CAPACITY_PACK_NOT_FOUND` when the project has no pack of this ID in the region, and with 409 `BACKUP_CAPACITY_PACK_ENDED` when the pack has ended.
1346
1382
  *
1347
- * Pay-as-you-go subscriptions, and prepaid ones whose terms allow it, are canceled at once and refunded under those terms. When the subscription can only be canceled at the end of its paid period, it is canceled then, and its coverage stays in force until `scheduled_at`. Deleting again while the cancellation is open returns it.
1383
+ * Canceled now, it is refunded under its terms; canceled at the end of its paid period, its coverage stays in force until `scheduled_at`. Deleting again while the cancellation is open returns it.
1348
1384
  * @summary Delete a backup capacity pack
1349
1385
  */
1350
1386
  export declare const DeleteBackupCapacityPackParams: zod.ZodObject<{
1351
1387
  regionId: zod.ZodUUID;
1352
1388
  packId: zod.ZodUUID;
1353
1389
  }, zod.z.core.$strict>;
1390
+ export declare const DeleteBackupCapacityPackQueryParams: zod.ZodObject<{
1391
+ cancellation_mode: zod.ZodOptional<zod.ZodEnum<{
1392
+ immediate: "immediate";
1393
+ period_end: "period_end";
1394
+ }>>;
1395
+ }, zod.z.core.$strict>;
1354
1396
  /**
1355
1397
  * @summary List snapshots
1356
1398
  */