@distilled.cloud/fly-io 1.0.0-rc.12 → 1.0.0-rc.14

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 (50) hide show
  1. package/README.md +34 -0
  2. package/lib/credentials.d.ts +2 -2
  3. package/lib/credentials.d.ts.map +1 -1
  4. package/lib/credentials.js +2 -2
  5. package/lib/credentials.js.map +1 -1
  6. package/lib/errors.d.ts.map +1 -1
  7. package/lib/errors.js +1 -1
  8. package/lib/errors.js.map +1 -1
  9. package/lib/protocol.d.ts +4 -4
  10. package/lib/protocol.d.ts.map +1 -1
  11. package/lib/protocol.js +58 -62
  12. package/lib/protocol.js.map +1 -1
  13. package/lib/protocol.test.js +38 -7
  14. package/lib/protocol.test.js.map +1 -1
  15. package/lib/retry.d.ts +1 -1
  16. package/lib/retry.d.ts.map +1 -1
  17. package/lib/retry.js +1 -1
  18. package/lib/retry.js.map +1 -1
  19. package/lib/services/addons.d.ts +58 -8
  20. package/lib/services/addons.d.ts.map +1 -1
  21. package/lib/services/addons.js +40 -85
  22. package/lib/services/addons.js.map +1 -1
  23. package/lib/services/machines.d.ts +209 -60
  24. package/lib/services/machines.d.ts.map +1 -1
  25. package/lib/services/machines.js +316 -692
  26. package/lib/services/machines.js.map +1 -1
  27. package/lib/services/mpg.d.ts +2 -2
  28. package/lib/services/mpg.d.ts.map +1 -1
  29. package/lib/services/mpg.js +37 -153
  30. package/lib/services/mpg.js.map +1 -1
  31. package/lib/services/sprites.d.ts +687 -144
  32. package/lib/services/sprites.d.ts.map +1 -1
  33. package/lib/services/sprites.js +667 -183
  34. package/lib/services/sprites.js.map +1 -1
  35. package/lib/sprites-mint.test.js +4 -5
  36. package/lib/sprites-mint.test.js.map +1 -1
  37. package/lib/traits.d.ts.map +1 -1
  38. package/lib/traits.js.map +1 -1
  39. package/package.json +14 -12
  40. package/src/credentials.ts +8 -12
  41. package/src/errors.ts +6 -10
  42. package/src/protocol.test.ts +83 -43
  43. package/src/protocol.ts +119 -135
  44. package/src/retry.ts +2 -8
  45. package/src/services/addons.ts +135 -154
  46. package/src/services/machines.ts +694 -1222
  47. package/src/services/mpg.ts +59 -217
  48. package/src/services/sprites.ts +1573 -354
  49. package/src/sprites-mint.test.ts +25 -67
  50. package/src/traits.ts +5 -12
@@ -1,8 +1,13 @@
1
- import * as S from "@distilled.cloud/core/schema";
2
1
  import * as API from "@distilled.cloud/core/api";
3
- import { type FlyIoOpError, type FlyIoOpContext } from "../protocol.ts";
2
+ import * as S from "@distilled.cloud/core/schema";
4
3
  import { BadRequest, Conflict, Forbidden, GatewayTimeout, NotFound, UnprocessableEntity } from "../errors.ts";
4
+ import { type FlyIoOpError, type FlyIoOpContext } from "../protocol.ts";
5
5
  export type { FlyIoOpError, FlyIoOpContext };
6
+ declare const MachineReplacing_base: S.Class<MachineReplacing, S.TaggedStruct<"MachineReplacing", {
7
+ readonly message: any;
8
+ }>, import("effect/Cause").YieldableError>;
9
+ export declare class MachineReplacing extends /*@__PURE__*/ MachineReplacing_base {
10
+ }
6
11
  declare const MachineStartFromCreatedState_base: S.Class<MachineStartFromCreatedState, S.TaggedStruct<"MachineStartFromCreatedState", {
7
12
  readonly message: any;
8
13
  }>, import("effect/Cause").YieldableError>;
@@ -13,6 +18,16 @@ declare const MachineWaitTimeout_base: S.Class<MachineWaitTimeout, S.TaggedStruc
13
18
  }>, import("effect/Cause").YieldableError>;
14
19
  export declare class MachineWaitTimeout extends /*@__PURE__*/ MachineWaitTimeout_base {
15
20
  }
21
+ declare const NetworkNotFound_base: S.Class<NetworkNotFound, S.TaggedStruct<"NetworkNotFound", {
22
+ readonly message: any;
23
+ }>, import("effect/Cause").YieldableError>;
24
+ export declare class NetworkNotFound extends /*@__PURE__*/ NetworkNotFound_base {
25
+ }
26
+ declare const VolumeAttached_base: S.Class<VolumeAttached, S.TaggedStruct<"VolumeAttached", {
27
+ readonly message: any;
28
+ }>, import("effect/Cause").YieldableError>;
29
+ export declare class VolumeAttached extends /*@__PURE__*/ VolumeAttached_base {
30
+ }
16
31
  export interface AuthenticateTokenRequest {
17
32
  header?: string;
18
33
  }
@@ -216,6 +231,7 @@ export interface CordonMachineRequest {
216
231
  app_name: string;
217
232
  /** Machine ID */
218
233
  machine_id: string;
234
+ lease_nonce?: string;
219
235
  }
220
236
  export declare const CordonMachineRequest: S.Schema<CordonMachineRequest>;
221
237
  export interface CordonMachineResponse {
@@ -223,12 +239,16 @@ export interface CordonMachineResponse {
223
239
  export declare const CordonMachineResponse: S.Schema<CordonMachineResponse>;
224
240
  export interface CreateAppRequest {
225
241
  enable_subdomains?: boolean;
242
+ /** When set, makes a retry of this exact request safe: a second create with the same key and the same name (or no name) returns the app the first request created, instead of erroring on a false name conflict or creating a duplicate. A second create with the same key but a *different* name is rejected outright; it won't silently hand back the first app. */
243
+ idempotency_key?: string;
226
244
  name?: string;
227
245
  network?: string;
228
246
  org_slug?: string;
229
247
  }
230
248
  export declare const CreateAppRequest: S.Schema<CreateAppRequest>;
231
249
  export interface CreateAppResponse {
250
+ created_at?: number;
251
+ id?: string;
232
252
  }
233
253
  export declare const CreateAppResponse: S.Schema<CreateAppResponse>;
234
254
  export interface CreateAppAcmeCertificateRequest {
@@ -290,12 +310,20 @@ export interface IPPair {
290
310
  v6?: string;
291
311
  }
292
312
  export declare const IPPair: S.Schema<IPPair>;
313
+ /** The 6PN network a Flycast (private_v6) address belongs to. Null for all other IP types. */
314
+ export interface IPAssignmentNetwork {
315
+ /** Network name; empty for the organization's default network. */
316
+ name?: string;
317
+ org_slug?: string;
318
+ }
319
+ export declare const IPAssignmentNetwork: S.Schema<IPAssignmentNetwork>;
293
320
  export interface AssignIPResponse {
294
321
  created_at?: string;
295
322
  egress?: boolean;
296
323
  ip?: string;
297
324
  /** ip_pair is returned when "egress-pair" IP type is requested; in this case, ip is null. */
298
325
  ip_pair?: IPPair;
326
+ network?: IPAssignmentNetwork | null;
299
327
  region?: string;
300
328
  service_name?: string;
301
329
  shared?: boolean;
@@ -471,16 +499,14 @@ export declare const FlyContainerHealthcheck: S.Schema<FlyContainerHealthcheck>;
471
499
  /** Healthchecks determine the health of your containers. Healthchecks can use HTTP, TCP or an Exec command. */
472
500
  export type FlyContainerConfigHealthchecksList = Array<FlyContainerHealthcheck>;
473
501
  export declare const FlyContainerConfigHealthchecksList: S.Schema<FlyContainerConfigHealthchecksList>;
474
- /** * no - Never try to restart a Machine automatically when its main process exits, whether that’s on purpose or on a crash. * always - Always restart a Machine automatically and never let it enter a stopped state, even when the main process exits cleanly. * on-failure - Try up to MaxRetries times to automatically restart the Machine if it exits with a non-zero exit code. Default when no explicit policy is set, and for Machines with schedules. * spot-price - Starts the Machine only when there is capacity and the spot price is less than or equal to the bid price. */
475
- export type FlyMachineRestartPolicy = "no" | "always" | "on-failure" | "spot-price";
502
+ /** * no - Never try to restart a Machine automatically when its main process exits, whether that’s on purpose or on a crash. * always - Always restart a Machine automatically and never let it enter a stopped state, even when the main process exits cleanly. * on-failure - Try up to MaxRetries times to automatically restart the Machine if it exits with a non-zero exit code. Default when no explicit policy is set, and for Machines with schedules. */
503
+ export type FlyMachineRestartPolicy = "no" | "always" | "on-failure";
476
504
  export declare const FlyMachineRestartPolicy: any;
477
505
  /** The Machine restart policy defines whether and how flyd restarts a Machine after its main process exits. See https://fly.io/docs/machines/guides-examples/machine-restart-policy/. */
478
506
  export interface FlyMachineRestart {
479
- /** GPU bid price for spot Machines. */
480
- gpu_bid_price?: number;
481
507
  /** When policy is on-failure, the maximum number of times to attempt to restart the Machine before letting it stop. */
482
508
  max_retries?: number;
483
- /** * no - Never try to restart a Machine automatically when its main process exits, whether that’s on purpose or on a crash. * always - Always restart a Machine automatically and never let it enter a stopped state, even when the main process exits cleanly. * on-failure - Try up to MaxRetries times to automatically restart the Machine if it exits with a non-zero exit code. Default when no explicit policy is set, and for Machines with schedules. * spot-price - Starts the Machine only when there is capacity and the spot price is less than or equal to the bid price. */
509
+ /** * no - Never try to restart a Machine automatically when its main process exits, whether that’s on purpose or on a crash. * always - Always restart a Machine automatically and never let it enter a stopped state, even when the main process exits cleanly. * on-failure - Try up to MaxRetries times to automatically restart the Machine if it exits with a non-zero exit code. Default when no explicit policy is set, and for Machines with schedules. */
484
510
  policy?: FlyMachineRestartPolicy | (string & {});
485
511
  }
486
512
  export declare const FlyMachineRestart: S.Schema<FlyMachineRestart>;
@@ -523,7 +549,7 @@ export interface FlyContainerConfig {
523
549
  image?: string;
524
550
  /** Name is used to identify the container in the machine. */
525
551
  name?: string;
526
- /** Restart is used to define the restart policy for the container. NOTE: spot-price is not supported for containers. */
552
+ /** Restart is used to define the restart policy for the container. */
527
553
  restart?: FlyMachineRestart;
528
554
  /** Secrets can be provided at the process level to explicitly indicate which secrets should be used for the process. If not provided, the secrets provided at the machine level will be used. */
529
555
  secrets?: FlyContainerConfigSecretsList;
@@ -576,6 +602,8 @@ export declare const FlyMachineGuestKernelArgsList: S.Schema<FlyMachineGuestKern
576
602
  /** Deprecated: use MachineConfig.Rootfs instead */
577
603
  export type FlyMachineGuestPersistRootfs = "never" | "always" | "restart";
578
604
  export declare const FlyMachineGuestPersistRootfs: any;
605
+ export type FlyMachineGuestRequiredHostFeaturesList = Array<string>;
606
+ export declare const FlyMachineGuestRequiredHostFeaturesList: S.Schema<FlyMachineGuestRequiredHostFeaturesList>;
579
607
  export interface FlyMachineGuest {
580
608
  cpu_kind?: string;
581
609
  cpus?: number;
@@ -587,6 +615,7 @@ export interface FlyMachineGuest {
587
615
  memory_mb?: number;
588
616
  /** Deprecated: use MachineConfig.Rootfs instead */
589
617
  persist_rootfs?: FlyMachineGuestPersistRootfs | (string & {});
618
+ required_host_features?: FlyMachineGuestRequiredHostFeaturesList;
590
619
  }
591
620
  export declare const FlyMachineGuest: S.Schema<FlyMachineGuest>;
592
621
  export type FlyMachineInitCmdList = Array<string>;
@@ -618,8 +647,12 @@ export interface FlyMachineMetrics {
618
647
  export declare const FlyMachineMetrics: S.Schema<FlyMachineMetrics>;
619
648
  export interface FlyMachineMount {
620
649
  add_size_gb?: number;
650
+ /** AddSizePercent grows by a percentage of the current size, rounded up to GiB. It is mutually exclusive with AddSizeGb. */
651
+ add_size_percent?: number;
621
652
  encrypted?: boolean;
622
653
  extend_threshold_percent?: number;
654
+ /** MinAddSizeGb is the minimum proportional growth in GiB (default 1). */
655
+ min_add_size_gb?: number;
623
656
  name?: string;
624
657
  path?: string;
625
658
  size_gb?: number;
@@ -669,8 +702,11 @@ export interface FlyMachineRootfs {
669
702
  }
670
703
  export declare const FlyMachineRootfs: S.Schema<FlyMachineRootfs>;
671
704
  /** Accepts a string (new format) or a boolean (old format). For backward compatibility with older clients, the API continues to use booleans for "off" and "stop" in responses. * "off" or false - Do not autostop the Machine. * "stop" or true - Automatically stop the Machine. * "suspend" - Automatically suspend the Machine, falling back to a full stop if this is not possible. */
672
- export type FlyMachineServiceAutostop = "off" | "stop" | "suspend";
673
- export declare const FlyMachineServiceAutostop: any;
705
+ export type FlyMachineServiceAutostopMode = "off" | "stop" | "suspend";
706
+ export declare const FlyMachineServiceAutostopMode: any;
707
+ /** Accepts off, stop, or suspend. For backward compatibility, responses encode off as false and stop as true. */
708
+ export type FlyMachineServiceAutostop = FlyMachineServiceAutostopMode | (string & {}) | boolean;
709
+ export declare const FlyMachineServiceAutostop: S.Codec<FlyMachineServiceAutostop>;
674
710
  export type FlyMachineServiceCheckHeadersList = Array<FlyMachineHTTPHeader>;
675
711
  export declare const FlyMachineServiceCheckHeadersList: S.Schema<FlyMachineServiceCheckHeadersList>;
676
712
  export interface FlyMachineServiceCheck {
@@ -771,7 +807,7 @@ export declare const FlyMachineServicePortsList: S.Schema<FlyMachineServicePorts
771
807
  export interface FlyMachineService {
772
808
  autostart?: boolean;
773
809
  /** Accepts a string (new format) or a boolean (old format). For backward compatibility with older clients, the API continues to use booleans for "off" and "stop" in responses. * "off" or false - Do not autostop the Machine. * "stop" or true - Automatically stop the Machine. * "suspend" - Automatically suspend the Machine, falling back to a full stop if this is not possible. */
774
- autostop?: FlyMachineServiceAutostop | (string & {});
810
+ autostop?: FlyMachineServiceAutostop;
775
811
  /** An optional list of service checks */
776
812
  checks?: FlyMachineServiceChecksList;
777
813
  concurrency?: FlyMachineServiceConcurrency;
@@ -873,6 +909,8 @@ export interface MachineEvent {
873
909
  export declare const MachineEvent: S.Schema<MachineEvent>;
874
910
  export type MachineEventsList = Array<MachineEvent>;
875
911
  export declare const MachineEventsList: S.Schema<MachineEventsList>;
912
+ export type MachineHostFeaturesList = Array<string>;
913
+ export declare const MachineHostFeaturesList: S.Schema<MachineHostFeaturesList>;
876
914
  export type MachineHostStatus = "ok" | "unknown" | "unreachable";
877
915
  export declare const MachineHostStatus: any;
878
916
  export type ImageRefLabelsMap = {
@@ -899,11 +937,12 @@ export interface Machine {
899
937
  cordoned?: boolean;
900
938
  created_at?: string;
901
939
  events?: MachineEventsList;
940
+ host_features?: MachineHostFeaturesList;
902
941
  host_status?: MachineHostStatus;
903
942
  id?: string;
904
943
  image_ref?: ImageRef;
905
944
  incomplete_config?: FlyMachineConfig;
906
- /** InstanceID is unique for each version of the machine */
945
+ /** InstanceID is the same value as `version`. Deprecated: use `version`. */
907
946
  instance_id?: string;
908
947
  lease?: StrippedLease;
909
948
  name?: string;
@@ -914,6 +953,8 @@ export interface Machine {
914
953
  region?: string;
915
954
  state?: string;
916
955
  updated_at?: string;
956
+ /** Version is unique for each version of the machine. Pass it as `current_version` when updating the Machine to reject the update if the Machine has changed since this version. */
957
+ version?: string;
917
958
  }
918
959
  export declare const Machine: S.Schema<Machine>;
919
960
  export interface CreateMachineLeaseRequest {
@@ -924,6 +965,8 @@ export interface CreateMachineLeaseRequest {
924
965
  description?: string;
925
966
  /** seconds lease will be valid */
926
967
  ttl?: number;
968
+ /** Existing lease nonce when refreshing; omit to acquire a new lease. Keep the nonce private. */
969
+ lease_nonce?: string;
927
970
  }
928
971
  export declare const CreateMachineLeaseRequest: S.Schema<CreateMachineLeaseRequest>;
929
972
  export interface Lease {
@@ -939,10 +982,15 @@ export interface Lease {
939
982
  version?: string;
940
983
  }
941
984
  export declare const Lease: S.Schema<Lease>;
985
+ export interface MachineLease {
986
+ status?: string;
987
+ data?: Lease;
988
+ }
989
+ export declare const MachineLease: S.Schema<MachineLease>;
942
990
  /** Postgres major version. */
943
991
  export type CreatePostgresRequestPgMajorVersion = "16" | "17";
944
992
  export declare const CreatePostgresRequestPgMajorVersion: any;
945
- /** Plan slug selecting CPU, memory, and disk sizing. */
993
+ /** Plan slug selecting CPU, memory, and disk sizing. Matched case-insensitively. */
946
994
  export type CreatePostgresRequestPlan = "basic" | "starter" | "launch" | "scale" | "Performance";
947
995
  export declare const CreatePostgresRequestPlan: any;
948
996
  /** Connection pooler mode. */
@@ -953,11 +1001,11 @@ export interface CreatePostgresRequest {
953
1001
  disk_size_gb?: number;
954
1002
  /** Name for the cluster. A name is generated when omitted. */
955
1003
  name?: string;
956
- /** Slug of the organization that will own the cluster. */
1004
+ /** Slug of the organization that will own the cluster, or "personal" for the caller's personal organization. */
957
1005
  org_slug: string;
958
1006
  /** Postgres major version. */
959
1007
  pg_major_version?: CreatePostgresRequestPgMajorVersion | (string & {});
960
- /** Plan slug selecting CPU, memory, and disk sizing. */
1008
+ /** Plan slug selecting CPU, memory, and disk sizing. Matched case-insensitively. */
961
1009
  plan: CreatePostgresRequestPlan | (string & {});
962
1010
  /** Connection pooler mode. */
963
1011
  pool_mode?: CreatePostgresRequestPoolMode | (string & {});
@@ -1022,7 +1070,7 @@ export interface PostgresCluster {
1022
1070
  cpus?: number;
1023
1071
  /** RFC 3339 creation timestamp. */
1024
1072
  created_at?: string;
1025
- /** Disk size in gigabytes. */
1073
+ /** Disk size in gigabytes, for one replica. */
1026
1074
  disk_size_gb?: number;
1027
1075
  /** Connection endpoints. Populated once the cluster is ready. */
1028
1076
  endpoints?: PostgresClusterEndpoints;
@@ -1045,6 +1093,10 @@ export interface PostgresCluster {
1045
1093
  replicas?: number;
1046
1094
  /** Current lifecycle status. */
1047
1095
  status?: PostgresClusterStatus;
1096
+ /** Storage provisioned, summed across the cluster's volumes and measured hourly. Null until first measured. */
1097
+ storage_provisioned_bytes?: number | null;
1098
+ /** Storage used, summed across the cluster's volumes and measured hourly. Null until first measured. */
1099
+ storage_used_bytes?: number | null;
1048
1100
  }
1049
1101
  export declare const PostgresCluster: S.Schema<PostgresCluster>;
1050
1102
  export interface ShowPostgresClusterResponse {
@@ -1087,7 +1139,7 @@ export declare const CreatePostgresBackupResponse: S.Schema<CreatePostgresBackup
1087
1139
  export interface CreatePostgresDatabaseRequest {
1088
1140
  /** Managed Postgres Cluster ID */
1089
1141
  postgres_cluster_id: string;
1090
- /** Name of the database to create. */
1142
+ /** Name of the database to create. Must start and end with an alphanumeric character and may contain hyphens and underscores, up to 63 characters. */
1091
1143
  name: string;
1092
1144
  }
1093
1145
  export declare const CreatePostgresDatabaseRequest: S.Schema<CreatePostgresDatabaseRequest>;
@@ -1108,7 +1160,7 @@ export interface CreatePostgresUserRequest {
1108
1160
  postgres_cluster_id: string;
1109
1161
  /** Role to grant the user. */
1110
1162
  role: CreatePostgresUserRequestRole | (string & {});
1111
- /** Name for the new user. */
1163
+ /** Name for the new user. Must start and end with a lowercase alphanumeric character and may contain hyphens and underscores, up to 63 characters. */
1112
1164
  username: string;
1113
1165
  }
1114
1166
  export declare const CreatePostgresUserRequest: S.Schema<CreatePostgresUserRequest>;
@@ -1166,8 +1218,12 @@ export interface CreateVolumeRequest {
1166
1218
  unique_zone_app_wide?: boolean;
1167
1219
  }
1168
1220
  export declare const CreateVolumeRequest: S.Schema<CreateVolumeRequest>;
1221
+ export type VolumeHostFeaturesList = Array<string>;
1222
+ export declare const VolumeHostFeaturesList: S.Schema<VolumeHostFeaturesList>;
1169
1223
  export type VolumeHostStatus = "ok" | "unknown" | "unreachable";
1170
1224
  export declare const VolumeHostStatus: any;
1225
+ export type VolumeRequiredHostFeaturesList = Array<string>;
1226
+ export declare const VolumeRequiredHostFeaturesList: S.Schema<VolumeRequiredHostFeaturesList>;
1171
1227
  export type VolumeType = "local" | "cache";
1172
1228
  export declare const VolumeType: any;
1173
1229
  export interface Volume {
@@ -1183,10 +1239,12 @@ export interface Volume {
1183
1239
  created_at?: string;
1184
1240
  encrypted?: boolean;
1185
1241
  fstype?: string;
1242
+ host_features?: VolumeHostFeaturesList;
1186
1243
  host_status?: VolumeHostStatus;
1187
1244
  id?: string;
1188
1245
  name?: string;
1189
1246
  region?: string;
1247
+ required_host_features?: VolumeRequiredHostFeaturesList;
1190
1248
  size_gb?: number;
1191
1249
  snapshot_retention?: number;
1192
1250
  state?: string;
@@ -1286,6 +1344,7 @@ export interface DeleteMachineRequest {
1286
1344
  machine_id: string;
1287
1345
  /** Force kill the machine if it's running */
1288
1346
  force?: boolean;
1347
+ lease_nonce?: string;
1289
1348
  }
1290
1349
  export declare const DeleteMachineRequest: S.Schema<DeleteMachineRequest>;
1291
1350
  export interface DeleteMachineResponse {
@@ -1541,6 +1600,8 @@ export interface GetMachineRequest {
1541
1600
  app_name: string;
1542
1601
  /** Machine ID */
1543
1602
  machine_id: string;
1603
+ /** 26-character Machine version ID; returns that version of the Machine instead of the current one */
1604
+ version?: string;
1544
1605
  /** Include machine lease */
1545
1606
  include_leases?: boolean;
1546
1607
  }
@@ -1734,6 +1795,7 @@ export interface IPAssignment {
1734
1795
  created_at?: string;
1735
1796
  egress?: boolean;
1736
1797
  ip?: string;
1798
+ network?: IPAssignmentNetwork | null;
1737
1799
  region?: string;
1738
1800
  service_name?: string;
1739
1801
  shared?: boolean;
@@ -1751,12 +1813,19 @@ export interface ListAppsRequest {
1751
1813
  org_slug: string;
1752
1814
  /** Filter apps by role */
1753
1815
  app_role?: string;
1816
+ /** The number of apps to fetch (must be between 1 and 5000). Providing a limit enables pagination. Without it, all apps are returned in one response. */
1817
+ limit?: number;
1818
+ /** Value of next_cursor from the previous page. Requires limit. Later pages only include apps that existed when the first page was requested. Apps created in the seconds before the first page was requested may be missing. Cursors expire 30 minutes after the first page was requested. */
1819
+ cursor?: string;
1754
1820
  }
1755
1821
  export declare const ListAppsRequest: S.Schema<ListAppsRequest>;
1756
1822
  export type ListAppsResponseAppsList = Array<App>;
1757
1823
  export declare const ListAppsResponseAppsList: S.Schema<ListAppsResponseAppsList>;
1758
1824
  export interface ListAppsResponse {
1759
1825
  apps?: ListAppsResponseAppsList;
1826
+ /** Pagination cursor for the next page. Absent when no more apps remain. Cursors expire 30 minutes after the first page was requested. */
1827
+ next_cursor?: string;
1828
+ /** The number of apps matching the request, across all pages. When paginating, it is counted once when the first page is requested and not updated afterwards, so it may differ slightly from the number of apps returned: it excludes apps created later and includes apps deleted while paginating. Apps created in the seconds before the first page may also be counted but missing from the pages. */
1760
1829
  total_apps?: number;
1761
1830
  }
1762
1831
  export declare const ListAppsResponse: S.Schema<ListAppsResponse>;
@@ -1821,6 +1890,10 @@ export interface ListMachinesRequest {
1821
1890
  summary?: boolean;
1822
1891
  /** Filter by a machine metadata key and exact value. Replace {key} with the metadata key, for example metadata.foo=bar. Specify multiple metadata filters to require all matches. */
1823
1892
  metadata__key_?: string;
1893
+ /** Value of the fly-next-cursor response header from the previous page. Requires limit. */
1894
+ cursor?: string;
1895
+ /** The number of machines to fetch (must be between 1 and 1000). Providing a limit enables pagination. This limit is advisory; responses may be shorter, or even empty, even when more machines remain. */
1896
+ limit?: number;
1824
1897
  }
1825
1898
  export declare const ListMachinesRequest: S.Schema<ListMachinesRequest>;
1826
1899
  export type ListMachinesResponseBodyList = Array<Machine>;
@@ -1898,7 +1971,7 @@ export declare const ListMachineVersionsResponseBodyList: S.Schema<ListMachineVe
1898
1971
  export type ListMachineVersionsResponse = ListMachineVersionsResponseBodyList;
1899
1972
  export declare const ListMachineVersionsResponse: S.Schema<ListMachineVersionsResponse>;
1900
1973
  export interface ListPostgresRequest {
1901
- /** Fly Organization Slug */
1974
+ /** Fly Organization Slug, or 'personal' for the caller's personal organization */
1902
1975
  org_slug: string;
1903
1976
  /** Include deleted clusters */
1904
1977
  include_deleted?: boolean;
@@ -1985,20 +2058,21 @@ export interface ListPostgresExtensionsRequest {
1985
2058
  database_name: string;
1986
2059
  }
1987
2060
  export declare const ListPostgresExtensionsRequest: S.Schema<ListPostgresExtensionsRequest>;
1988
- export interface PostgresInstalledExtension {
2061
+ /** Installation details, or null when the extension is not installed. */
2062
+ export interface PostgresExtensionInstalled {
1989
2063
  /** Schema the extension is installed into. */
1990
2064
  schema?: string;
1991
2065
  /** Installed version. */
1992
2066
  version?: string;
1993
2067
  }
1994
- export declare const PostgresInstalledExtension: S.Schema<PostgresInstalledExtension>;
2068
+ export declare const PostgresExtensionInstalled: S.Schema<PostgresExtensionInstalled>;
1995
2069
  export interface PostgresExtension {
1996
2070
  /** Default version installed when enabled. */
1997
2071
  default_version?: string;
1998
2072
  /** Human-readable description. */
1999
2073
  description?: string;
2000
2074
  /** Installation details, or null when the extension is not installed. */
2001
- installed?: PostgresInstalledExtension;
2075
+ installed?: PostgresExtensionInstalled | null;
2002
2076
  /** Extension name. */
2003
2077
  name?: string;
2004
2078
  /** Whether this is a system extension that cannot be disabled. */
@@ -2057,6 +2131,10 @@ export interface ListVolumesRequest {
2057
2131
  app_name: string;
2058
2132
  /** Only return summary info about volumes (omit blocks, block size, etc) */
2059
2133
  summary?: boolean;
2134
+ /** Value of the fly-next-cursor response header from the previous page. Requires limit. */
2135
+ cursor?: string;
2136
+ /** The number of volumes to fetch (must be between 1 and 1000). Providing a limit enables pagination. This limit is advisory; responses may be shorter, or even empty, even when more volumes remain. */
2137
+ limit?: number;
2060
2138
  }
2061
2139
  export declare const ListVolumesRequest: S.Schema<ListVolumesRequest>;
2062
2140
  export type ListVolumesResponseBodyList = Array<Volume>;
@@ -2103,8 +2181,12 @@ export interface ListVolumesOrgRequest {
2103
2181
  limit?: number;
2104
2182
  }
2105
2183
  export declare const ListVolumesOrgRequest: S.Schema<ListVolumesOrgRequest>;
2184
+ export type OrgVolumeHostFeaturesList = Array<string>;
2185
+ export declare const OrgVolumeHostFeaturesList: S.Schema<OrgVolumeHostFeaturesList>;
2106
2186
  export type OrgVolumeHostStatus = "ok" | "unknown" | "unreachable";
2107
2187
  export declare const OrgVolumeHostStatus: any;
2188
+ export type OrgVolumeRequiredHostFeaturesList = Array<string>;
2189
+ export declare const OrgVolumeRequiredHostFeaturesList: S.Schema<OrgVolumeRequiredHostFeaturesList>;
2108
2190
  export type OrgVolumeType = "local" | "cache";
2109
2191
  export declare const OrgVolumeType: any;
2110
2192
  export interface OrgVolume {
@@ -2121,10 +2203,12 @@ export interface OrgVolume {
2121
2203
  created_at?: string;
2122
2204
  encrypted?: boolean;
2123
2205
  fstype?: string;
2206
+ host_features?: OrgVolumeHostFeaturesList;
2124
2207
  host_status?: OrgVolumeHostStatus;
2125
2208
  id?: string;
2126
2209
  name?: string;
2127
2210
  region?: string;
2211
+ required_host_features?: OrgVolumeRequiredHostFeaturesList;
2128
2212
  size_gb?: number;
2129
2213
  snapshot_retention?: number;
2130
2214
  state?: string;
@@ -2147,6 +2231,8 @@ export interface MachinesReleaseLeaseRequest {
2147
2231
  app_name: string;
2148
2232
  /** Machine ID */
2149
2233
  machine_id: string;
2234
+ /** Nonce of the lease to release. Keep the nonce private. */
2235
+ lease_nonce: string;
2150
2236
  }
2151
2237
  export declare const MachinesReleaseLeaseRequest: S.Schema<MachinesReleaseLeaseRequest>;
2152
2238
  export interface MachinesReleaseLeaseResponse {
@@ -2169,6 +2255,76 @@ export declare const PatchMachineMetadataRequest: S.Schema<PatchMachineMetadataR
2169
2255
  export interface PatchMachineMetadataResponse {
2170
2256
  }
2171
2257
  export declare const PatchMachineMetadataResponse: S.Schema<PatchMachineMetadataResponse>;
2258
+ export interface PostgresQueriesActiveRequest {
2259
+ /** Managed Postgres Cluster ID */
2260
+ postgres_cluster_id: string;
2261
+ /** Database to inspect (must not be empty or whitespace-only) */
2262
+ database: string;
2263
+ }
2264
+ export declare const PostgresQueriesActiveRequest: S.Schema<PostgresQueriesActiveRequest>;
2265
+ export interface PostgresActiveQuery {
2266
+ /** Application connected to the backend. */
2267
+ application_name?: string;
2268
+ /** Client address. */
2269
+ client?: string;
2270
+ /** Database name. */
2271
+ database?: string;
2272
+ /** Query duration in seconds. */
2273
+ duration_seconds?: number;
2274
+ /** Process ID of the backend running the query. */
2275
+ pid?: number;
2276
+ /** Full query text. */
2277
+ query?: string;
2278
+ /** Current backend state. */
2279
+ state?: string;
2280
+ /** Time spent in the current state, in seconds. */
2281
+ state_duration_seconds?: number;
2282
+ /** User running the query. */
2283
+ user?: string;
2284
+ /** Event the backend is waiting for. */
2285
+ wait_event?: string;
2286
+ /** Type of event the backend is waiting for. */
2287
+ wait_event_type?: string;
2288
+ }
2289
+ export declare const PostgresActiveQuery: S.Schema<PostgresActiveQuery>;
2290
+ export type ListPostgresActiveQueriesResponseDataList = Array<PostgresActiveQuery>;
2291
+ export declare const ListPostgresActiveQueriesResponseDataList: S.Schema<ListPostgresActiveQueriesResponseDataList>;
2292
+ export interface ListPostgresActiveQueriesResponse {
2293
+ data?: ListPostgresActiveQueriesResponseDataList;
2294
+ }
2295
+ export declare const ListPostgresActiveQueriesResponse: S.Schema<ListPostgresActiveQueriesResponse>;
2296
+ export interface PostgresQueriesSlowRequest {
2297
+ /** Managed Postgres Cluster ID */
2298
+ postgres_cluster_id: string;
2299
+ /** Metrics lookback in seconds */
2300
+ range?: number;
2301
+ }
2302
+ export declare const PostgresQueriesSlowRequest: S.Schema<PostgresQueriesSlowRequest>;
2303
+ export interface PostgresSlowQuery {
2304
+ /** Cumulative number of executions. */
2305
+ calls?: number;
2306
+ /** Database name. */
2307
+ database?: string;
2308
+ /** Maximum execution time in seconds. */
2309
+ max_exec_time_seconds?: number;
2310
+ /** Mean execution time in seconds. */
2311
+ mean_exec_time_seconds?: number;
2312
+ /** Full query pattern. */
2313
+ query?: string;
2314
+ /** Query identifier. */
2315
+ query_id?: string;
2316
+ /** Cumulative total execution time in seconds. */
2317
+ total_exec_time_seconds?: number;
2318
+ /** User running the query. */
2319
+ user?: string;
2320
+ }
2321
+ export declare const PostgresSlowQuery: S.Schema<PostgresSlowQuery>;
2322
+ export type ListPostgresSlowQueriesResponseDataList = Array<PostgresSlowQuery>;
2323
+ export declare const ListPostgresSlowQueriesResponseDataList: S.Schema<ListPostgresSlowQueriesResponseDataList>;
2324
+ export interface ListPostgresSlowQueriesResponse {
2325
+ data?: ListPostgresSlowQueriesResponseDataList;
2326
+ }
2327
+ export declare const ListPostgresSlowQueriesResponse: S.Schema<ListPostgresSlowQueriesResponse>;
2172
2328
  export interface PostgresUsersCredentialsRequest {
2173
2329
  /** Managed Postgres Cluster ID */
2174
2330
  postgres_cluster_id: string;
@@ -2224,6 +2380,7 @@ export interface RestartMachineRequest {
2224
2380
  timeout?: string;
2225
2381
  /** Unix signal name */
2226
2382
  signal?: RestartMachineRequestSignal | (string & {});
2383
+ lease_nonce?: string;
2227
2384
  }
2228
2385
  export declare const RestartMachineRequest: S.Schema<RestartMachineRequest>;
2229
2386
  export interface RestartMachineResponse {
@@ -2304,6 +2461,7 @@ export interface StartMachineRequest {
2304
2461
  app_name: string;
2305
2462
  /** Machine ID */
2306
2463
  machine_id: string;
2464
+ lease_nonce?: string;
2307
2465
  }
2308
2466
  export declare const StartMachineRequest: S.Schema<StartMachineRequest>;
2309
2467
  export interface StartMachineResponse {
@@ -2318,6 +2476,7 @@ export interface StopMachineRequest {
2318
2476
  machine_id: string;
2319
2477
  signal?: StopMachineRequestSignal | (string & {});
2320
2478
  timeout?: string;
2479
+ lease_nonce?: string;
2321
2480
  }
2322
2481
  export declare const StopMachineRequest: S.Schema<StopMachineRequest>;
2323
2482
  export interface StopMachineResponse {
@@ -2328,6 +2487,7 @@ export interface SuspendMachineRequest {
2328
2487
  app_name: string;
2329
2488
  /** Machine ID */
2330
2489
  machine_id: string;
2490
+ lease_nonce?: string;
2331
2491
  }
2332
2492
  export declare const SuspendMachineRequest: S.Schema<SuspendMachineRequest>;
2333
2493
  export interface SuspendMachineResponse {
@@ -2338,6 +2498,7 @@ export interface UncordonMachineRequest {
2338
2498
  app_name: string;
2339
2499
  /** Machine ID */
2340
2500
  machine_id: string;
2501
+ lease_nonce?: string;
2341
2502
  }
2342
2503
  export declare const UncordonMachineRequest: S.Schema<UncordonMachineRequest>;
2343
2504
  export interface UncordonMachineResponse {
@@ -2350,6 +2511,7 @@ export interface UpdateMachineRequest {
2350
2511
  machine_id: string;
2351
2512
  /** An object defining the Machine configuration */
2352
2513
  config?: FlyMachineConfig;
2514
+ /** CurrentVersion is an optional optimistic-concurrency guard: the Machine's `version`, as returned by create, get or a previous update. When set and it is no longer the Machine's current version, the update is rejected with 409 Conflict and nothing changes. Omit it to update unconditionally. */
2353
2515
  current_version?: string;
2354
2516
  lease_ttl?: number;
2355
2517
  min_secrets_version?: number;
@@ -2360,25 +2522,9 @@ export interface UpdateMachineRequest {
2360
2522
  skip_launch?: boolean;
2361
2523
  skip_secrets?: boolean;
2362
2524
  skip_service_registration?: boolean;
2525
+ lease_nonce?: string;
2363
2526
  }
2364
2527
  export declare const UpdateMachineRequest: S.Schema<UpdateMachineRequest>;
2365
- export type UpdateMachineMetadataRequestMetadataMap = {
2366
- [key: string]: string | undefined;
2367
- };
2368
- export declare const UpdateMachineMetadataRequestMetadataMap: S.Schema<UpdateMachineMetadataRequestMetadataMap>;
2369
- export interface UpdateMachineMetadataRequest {
2370
- /** Fly App Name */
2371
- app_name: string;
2372
- /** Machine ID */
2373
- machine_id: string;
2374
- machine_version?: string;
2375
- metadata?: UpdateMachineMetadataRequestMetadataMap;
2376
- updated_at?: string;
2377
- }
2378
- export declare const UpdateMachineMetadataRequest: S.Schema<UpdateMachineMetadataRequest>;
2379
- export interface UpdateMachineMetadataResponse {
2380
- }
2381
- export declare const UpdateMachineMetadataResponse: S.Schema<UpdateMachineMetadataResponse>;
2382
2528
  /** New role for the user. */
2383
2529
  export type UpdatePostgresUserRoleRequestRole = "schema_admin" | "writer" | "reader";
2384
2530
  export declare const UpdatePostgresUserRoleRequestRole: any;
@@ -2485,7 +2631,7 @@ export declare const authorizeToken: API.OperationMethod<AuthorizeTokenRequest,
2485
2631
  export type CheckAppCertificateError = BadRequest | Forbidden | NotFound | FlyIoOpError;
2486
2632
  /** Check DNS and re-validate certificate */
2487
2633
  export declare const checkAppCertificate: API.OperationMethod<CheckAppCertificateRequest, CertificateCheckResponse, CheckAppCertificateError, FlyIoOpContext>;
2488
- export type CordonMachineError = BadRequest | Forbidden | NotFound | FlyIoOpError;
2634
+ export type CordonMachineError = BadRequest | Forbidden | NotFound | Conflict | FlyIoOpError;
2489
2635
  /** Cordon Machine “Cordoning” a Machine refers to disabling its services, so the Fly Proxy won’t route requests to it. In flyctl this is used by blue/green deployments; one set of Machines is started up with services disabled, and when they are all healthy, the services are enabled on the new Machines and disabled on the old ones. */
2490
2636
  export declare const cordonMachine: API.OperationMethod<CordonMachineRequest, CordonMachineResponse, CordonMachineError, FlyIoOpContext>;
2491
2637
  export type CreateAppError = BadRequest | Forbidden | NotFound | Conflict | UnprocessableEntity | FlyIoOpError;
@@ -2500,20 +2646,20 @@ export declare const createAppCustomCertificate: API.OperationMethod<CreateAppCu
2500
2646
  export type CreateAppDeployTokenError = BadRequest | Forbidden | NotFound | FlyIoOpError;
2501
2647
  /** Create App deploy token */
2502
2648
  export declare const createAppDeployToken: API.OperationMethod<CreateAppDeployTokenRequest, CreateAppDeployTokenResponse, CreateAppDeployTokenError, FlyIoOpContext>;
2503
- export type CreateAppIPAssignmentError = BadRequest | Forbidden | NotFound | Conflict | FlyIoOpError;
2649
+ export type CreateAppIPAssignmentError = BadRequest | Forbidden | NotFound | Conflict | NetworkNotFound | FlyIoOpError;
2504
2650
  /** Assign new IP address to app */
2505
2651
  export declare const createAppIPAssignment: API.OperationMethod<CreateAppIPAssignmentRequest, AssignIPResponse, CreateAppIPAssignmentError, FlyIoOpContext>;
2506
2652
  export type CreateMachineError = BadRequest | Forbidden | NotFound | Conflict | FlyIoOpError;
2507
2653
  /** Create Machine Create a Machine within a specific app using the details provided in the request body. **Important**: This request can fail, and you’re responsible for handling that failure. If you ask for a large Machine, or a Machine in a region we happen to be at capacity for, you might need to retry the request, or to fall back to another region. If you’re working directly with the Machines API, you’re taking some responsibility for your own orchestration! */
2508
2654
  export declare const createMachine: API.OperationMethod<CreateMachineRequest, Machine, CreateMachineError, FlyIoOpContext>;
2509
- export type CreateMachineLeaseError = BadRequest | Forbidden | NotFound | FlyIoOpError;
2655
+ export type CreateMachineLeaseError = BadRequest | Forbidden | NotFound | Conflict | FlyIoOpError;
2510
2656
  /** Create Lease Create a lease for a specific Machine within an app using the details provided in the request body. Machine leases can be used to obtain an exclusive lock on modifying a Machine. */
2511
- export declare const createMachineLease: API.OperationMethod<CreateMachineLeaseRequest, Lease, CreateMachineLeaseError, FlyIoOpContext>;
2657
+ export declare const createMachineLease: API.OperationMethod<CreateMachineLeaseRequest, MachineLease, CreateMachineLeaseError, FlyIoOpContext>;
2512
2658
  export type CreatePostgresError = BadRequest | NotFound | UnprocessableEntity | FlyIoOpError;
2513
- /** Create Postgres Cluster Create a Managed Postgres cluster for the organization named in the request body. Provisioning is asynchronous, and a name is generated when one is not supplied. */
2659
+ /** Create Postgres Cluster Create a Managed Postgres cluster for the organization named in the request body. Provisioning is asynchronous: poll `GET /v1/postgres/{id}` until `status == ready` before calling database, user, extension, or credential endpoints. */
2514
2660
  export declare const createPostgres: API.OperationMethod<CreatePostgresRequest, ShowPostgresClusterResponse, CreatePostgresError, FlyIoOpContext>;
2515
2661
  export type CreatePostgresAttachmentError = NotFound | FlyIoOpError;
2516
- /** Attach Cluster to App Attach a specific cluster to a Fly app. The attachment is created if it does not already exist. */
2662
+ /** Attach Cluster to App Record an attachment between a cluster and a Fly app. This endpoint records the relationship but does not set DATABASE_URL or other app secrets; configure the connection string separately. The attachment is created if it does not already exist. */
2517
2663
  export declare const createPostgresAttachment: API.OperationMethod<CreatePostgresAttachmentRequest, CreatePostgresAttachmentResponse, CreatePostgresAttachmentError, FlyIoOpContext>;
2518
2664
  export type CreatePostgresBackupError = NotFound | Conflict | FlyIoOpError;
2519
2665
  /** Create Backup Create a backup for a specific cluster. The backup runs asynchronously and is rejected if one is already in progress. */
@@ -2575,7 +2721,7 @@ export declare const deleteSecret: API.OperationMethod<DeleteSecretRequest, Dele
2575
2721
  export type DeleteSecretKeyError = Forbidden | NotFound | FlyIoOpError;
2576
2722
  /** Delete an app's secret key */
2577
2723
  export declare const deleteSecretKey: API.OperationMethod<DeleteSecretKeyRequest, DeleteSecretkeyResponse, DeleteSecretKeyError, FlyIoOpContext>;
2578
- export type DeleteVolumeError = Forbidden | NotFound | Conflict | FlyIoOpError;
2724
+ export type DeleteVolumeError = Forbidden | NotFound | Conflict | VolumeAttached | FlyIoOpError;
2579
2725
  /** Destroy Volume Delete a specific volume within an app by volume ID. */
2580
2726
  export declare const deleteVolume: API.OperationMethod<DeleteVolumeRequest, Volume, DeleteVolumeError, FlyIoOpContext>;
2581
2727
  export type DisablePostgresExtensionError = BadRequest | NotFound | UnprocessableEntity | FlyIoOpError;
@@ -2587,7 +2733,7 @@ export declare const enablePostgresExtension: API.OperationMethod<EnablePostgres
2587
2733
  export type EncryptSecretKeyError = BadRequest | Forbidden | NotFound | FlyIoOpError;
2588
2734
  /** Encrypt with a secret key */
2589
2735
  export declare const encryptSecretKey: API.OperationMethod<EncryptSecretKeyRequest, EncryptSecretkeyResponse, EncryptSecretKeyError, FlyIoOpContext>;
2590
- export type ExecMachineError = BadRequest | Forbidden | NotFound | FlyIoOpError;
2736
+ export type ExecMachineError = BadRequest | Forbidden | NotFound | Conflict | FlyIoOpError;
2591
2737
  /** Execute Command Execute a command on a specific Machine and return the raw command output bytes. */
2592
2738
  export declare const execMachine: API.OperationMethod<ExecMachineRequest, Flydv1ExecResponse, ExecMachineError, FlyIoOpContext>;
2593
2739
  export type ExtendVolumeError = BadRequest | Forbidden | NotFound | FlyIoOpError;
@@ -2613,7 +2759,7 @@ export type GetMachineError = Forbidden | NotFound | FlyIoOpError;
2613
2759
  export declare const getMachine: API.OperationMethod<GetMachineRequest, Machine, GetMachineError, FlyIoOpContext>;
2614
2760
  export type GetMachineLeaseError = Forbidden | NotFound | FlyIoOpError;
2615
2761
  /** Get Lease Retrieve the current lease of a specific Machine within an app. Machine leases can be used to obtain an exclusive lock on modifying a Machine. */
2616
- export declare const getMachineLease: API.OperationMethod<GetMachineLeaseRequest, Lease, GetMachineLeaseError, FlyIoOpContext>;
2762
+ export declare const getMachineLease: API.OperationMethod<GetMachineLeaseRequest, MachineLease, GetMachineLeaseError, FlyIoOpContext>;
2617
2763
  export type GetMachineMemoryError = Forbidden | NotFound | FlyIoOpError;
2618
2764
  /** Get Machine Memory Get current memory limit and available capacity for a machine */
2619
2765
  export declare const getMachineMemory: API.OperationMethod<GetMachineMemoryRequest, MainMemoryResponse, GetMachineMemoryError, FlyIoOpContext>;
@@ -2665,7 +2811,7 @@ export declare const listMachinesOrg: API.OperationMethod<ListMachinesOrgRequest
2665
2811
  export type ListMachineVersionsError = Forbidden | NotFound | FlyIoOpError;
2666
2812
  /** List Versions List all versions of the configuration for a specific Machine within an app. */
2667
2813
  export declare const listMachineVersions: API.OperationMethod<ListMachineVersionsRequest, ListMachineVersionsResponse, ListMachineVersionsError, FlyIoOpContext>;
2668
- export type ListPostgresError = NotFound | UnprocessableEntity | FlyIoOpError;
2814
+ export type ListPostgresError = BadRequest | NotFound | UnprocessableEntity | FlyIoOpError;
2669
2815
  /** List Postgres Clusters List Managed Postgres clusters for an organization. */
2670
2816
  export declare const listPostgres: API.OperationMethod<ListPostgresRequest, ListPostgresClustersResponse, ListPostgresError, FlyIoOpContext>;
2671
2817
  export type ListPostgresBackupsError = NotFound | FlyIoOpError;
@@ -2698,9 +2844,15 @@ export declare const listVolumesOrg: API.OperationMethod<ListVolumesOrgRequest,
2698
2844
  export type MachinesReleaseLeaseError = Forbidden | NotFound | FlyIoOpError;
2699
2845
  /** Release Lease Release the lease of a specific Machine within an app. Machine leases can be used to obtain an exclusive lock on modifying a Machine. */
2700
2846
  export declare const machinesReleaseLease: API.OperationMethod<MachinesReleaseLeaseRequest, MachinesReleaseLeaseResponse, MachinesReleaseLeaseError, FlyIoOpContext>;
2701
- export type PatchMachineMetadataError = BadRequest | FlyIoOpError;
2702
- /** Update Metadata (set/remove multiple keys) Update multiple metadata keys at once. Null values and empty strings remove keys. + If `machine_version` is provided and no longer matches the current machine version, returns 412 Precondition Failed. */
2847
+ export type PatchMachineMetadataError = BadRequest | Forbidden | NotFound | FlyIoOpError;
2848
+ /** Update Metadata (set/remove multiple keys) Update multiple metadata keys at once. Keys that are not in the request are left untouched. Null values and empty strings remove keys. + If `machine_version` is provided and no longer matches the current machine version, returns 412 Precondition Failed. */
2703
2849
  export declare const patchMachineMetadata: API.OperationMethod<PatchMachineMetadataRequest, PatchMachineMetadataResponse, PatchMachineMetadataError, FlyIoOpContext>;
2850
+ export type PostgresQueriesActiveError = NotFound | UnprocessableEntity | FlyIoOpError;
2851
+ /** List Active Queries List active queries in the supplied database. The database query parameter is required and must not be empty or whitespace-only. Returns full query text and durations in seconds. */
2852
+ export declare const postgresQueriesActive: API.OperationMethod<PostgresQueriesActiveRequest, ListPostgresActiveQueriesResponse, PostgresQueriesActiveError, FlyIoOpContext>;
2853
+ export type PostgresQueriesSlowError = NotFound | UnprocessableEntity | FlyIoOpError;
2854
+ /** List Slow Queries List the top 20 queries by cumulative total execution time, excluding the postgres database. Uses the latest available metrics within the lookback range; statistics are cumulative PostgreSQL counters, not deltas over that range. Returns full query text and execution times in seconds. */
2855
+ export declare const postgresQueriesSlow: API.OperationMethod<PostgresQueriesSlowRequest, ListPostgresSlowQueriesResponse, PostgresQueriesSlowError, FlyIoOpContext>;
2704
2856
  export type PostgresUsersCredentialsError = BadRequest | NotFound | FlyIoOpError;
2705
2857
  /** Get User Credentials Get the connection credentials for a specific Postgres user within a cluster. */
2706
2858
  export declare const postgresUsersCredentials: API.OperationMethod<PostgresUsersCredentialsRequest, GetPostgresUserCredentialsResponse, PostgresUsersCredentialsError, FlyIoOpContext>;
@@ -2708,12 +2860,12 @@ export type ReclaimMachineMemoryError = BadRequest | Forbidden | NotFound | FlyI
2708
2860
  /** Reclaim Machine Memory Trigger the balloon device to reclaim memory from a machine */
2709
2861
  export declare const reclaimMachineMemory: API.OperationMethod<ReclaimMachineMemoryRequest, MainReclaimMemoryResponse, ReclaimMachineMemoryError, FlyIoOpContext>;
2710
2862
  export type RequestKmsTokenError = BadRequest | Forbidden | NotFound | FlyIoOpError;
2711
- /** Request a Petsem token for accessing KMS This site hosts documentation generated from the Fly.io Machines API OpenAPI specification. Visit our complete [Machines API docs](https://fly.io/docs/machines/api/apps-resource/) for details about using the Apps resource. */
2863
+ /** Request a Petsem token for accessing KMS */
2712
2864
  export declare const requestKmsToken: API.OperationMethod<RequestKmsTokenRequest, RequestKmsTokenResponse, RequestKmsTokenError, FlyIoOpContext>;
2713
2865
  export type RequestOidcTokenError = BadRequest | Forbidden | NotFound | FlyIoOpError;
2714
2866
  /** Request an OIDC token Request an Open ID Connect token for your machine. Customize the audience claim with the `aud` parameter. This returns a JWT token. Learn more about [using OpenID Connect](/docs/reference/openid-connect/) on Fly.io. */
2715
2867
  export declare const requestOidcToken: API.OperationMethod<RequestOidcTokenRequest, RequestOidcTokenResponse, RequestOidcTokenError, FlyIoOpContext>;
2716
- export type RestartMachineError = BadRequest | Forbidden | NotFound | FlyIoOpError;
2868
+ export type RestartMachineError = BadRequest | Forbidden | NotFound | Conflict | FlyIoOpError;
2717
2869
  /** Restart Machine Restart a specific Machine within an app, with an optional timeout parameter. */
2718
2870
  export declare const restartMachine: API.OperationMethod<RestartMachineRequest, RestartMachineResponse, RestartMachineError, FlyIoOpContext>;
2719
2871
  export type RestorePostgresError = BadRequest | NotFound | UnprocessableEntity | FlyIoOpError;
@@ -2734,24 +2886,21 @@ export declare const signalMachine: API.OperationMethod<SignalMachineRequest, Si
2734
2886
  export type SignSecretKeyError = BadRequest | Forbidden | NotFound | FlyIoOpError;
2735
2887
  /** Sign with a secret key */
2736
2888
  export declare const signSecretKey: API.OperationMethod<SignSecretKeyRequest, SignSecretkeyResponse, SignSecretKeyError, FlyIoOpContext>;
2737
- export type StartMachineError = BadRequest | Forbidden | NotFound | Conflict | MachineStartFromCreatedState | FlyIoOpError;
2889
+ export type StartMachineError = BadRequest | Forbidden | NotFound | Conflict | MachineStartFromCreatedState | MachineReplacing | FlyIoOpError;
2738
2890
  /** Start Machine Start a specific Machine within an app. */
2739
2891
  export declare const startMachine: API.OperationMethod<StartMachineRequest, StartMachineResponse, StartMachineError, FlyIoOpContext>;
2740
- export type StopMachineError = BadRequest | Forbidden | NotFound | FlyIoOpError;
2892
+ export type StopMachineError = BadRequest | Forbidden | NotFound | Conflict | FlyIoOpError;
2741
2893
  /** Stop Machine Stop a specific Machine within an app, with an optional request body to specify signal and timeout. */
2742
2894
  export declare const stopMachine: API.OperationMethod<StopMachineRequest, StopMachineResponse, StopMachineError, FlyIoOpContext>;
2743
- export type SuspendMachineError = BadRequest | Forbidden | NotFound | FlyIoOpError;
2895
+ export type SuspendMachineError = BadRequest | Forbidden | NotFound | Conflict | FlyIoOpError;
2744
2896
  /** Suspend Machine Suspend a specific Machine within an app. The next start operation will attempt (but is not guaranteed) to resume the Machine from a snapshot taken at suspension time, rather than performing a cold boot. */
2745
2897
  export declare const suspendMachine: API.OperationMethod<SuspendMachineRequest, SuspendMachineResponse, SuspendMachineError, FlyIoOpContext>;
2746
- export type UncordonMachineError = BadRequest | Forbidden | NotFound | FlyIoOpError;
2898
+ export type UncordonMachineError = BadRequest | Forbidden | NotFound | Conflict | FlyIoOpError;
2747
2899
  /** Uncordon Machine “Cordoning” a Machine refers to disabling its services, so the Fly Proxy won’t route requests to it. In flyctl this is used by blue/green deployments; one set of Machines is started up with services disabled, and when they are all healthy, the services are enabled on the new Machines and disabled on the old ones. */
2748
2900
  export declare const uncordonMachine: API.OperationMethod<UncordonMachineRequest, UncordonMachineResponse, UncordonMachineError, FlyIoOpContext>;
2749
2901
  export type UpdateMachineError = BadRequest | Forbidden | NotFound | Conflict | FlyIoOpError;
2750
2902
  /** Update Machine Update a Machine's configuration using the details provided in the request body. */
2751
2903
  export declare const updateMachine: API.OperationMethod<UpdateMachineRequest, Machine, UpdateMachineError, FlyIoOpContext>;
2752
- export type UpdateMachineMetadataError = BadRequest | Forbidden | NotFound | FlyIoOpError;
2753
- /** Update Metadata (set/remove multiple keys) Update multiple metadata keys at once. Null values and empty strings remove keys. + If `machine_version` is provided and no longer matches the current machine version, returns 412 Precondition Failed. */
2754
- export declare const updateMachineMetadata: API.OperationMethod<UpdateMachineMetadataRequest, UpdateMachineMetadataResponse, UpdateMachineMetadataError, FlyIoOpContext>;
2755
2904
  export type UpdatePostgresUserRoleError = BadRequest | NotFound | UnprocessableEntity | FlyIoOpError;
2756
2905
  /** Update User Role Update a specific Postgres user's role within a cluster. */
2757
2906
  export declare const updatePostgresUserRole: API.OperationMethod<UpdatePostgresUserRoleRequest, UpdatePostgresUserRoleResponse, UpdatePostgresUserRoleError, FlyIoOpContext>;