@distilled.cloud/fly-io 1.0.0-rc.8 → 1.0.0-rc.9

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.
@@ -7,7 +7,7 @@ import { BadRequest, Conflict, Forbidden, GatewayTimeout, NotFound, Unprocessabl
7
7
  import * as Retry from "../retry.js";
8
8
  export const AuthenticateTokenRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
9
9
  header: S.optional(S.String),
10
- }).pipe(T.Http({ method: "POST", uri: "/tokens/authenticate", code: 200 }))).annotate({
10
+ }).pipe(T.Http({ method: "POST", uri: "/v1/tokens/authenticate", code: 200 }))).annotate({
11
11
  identifier: "AuthenticateTokenRequest",
12
12
  });
13
13
  export const MacaroonCaveatSetCaveatsList = /*@__PURE__*/ S.Array(S.Unknown);
@@ -57,7 +57,7 @@ export const MainTokenAccess = /*@__PURE__*/ S.suspend(() => S.Struct({
57
57
  export const AuthorizeTokenRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
58
58
  access: S.optional(MainTokenAccess),
59
59
  header: S.optional(S.String),
60
- }).pipe(T.Http({ method: "POST", uri: "/tokens/authorize", code: 200 }))).annotate({
60
+ }).pipe(T.Http({ method: "POST", uri: "/v1/tokens/authorize", code: 200 }))).annotate({
61
61
  identifier: "AuthorizeTokenRequest",
62
62
  });
63
63
  export const FlyioAccessCommandList = /*@__PURE__*/ S.Array(S.String);
@@ -89,7 +89,7 @@ export const CheckAppCertificateRequest = /*@__PURE__*/ S.suspend(() => S.Struct
89
89
  hostname: S.String.pipe(T.Label()),
90
90
  }).pipe(T.Http({
91
91
  method: "POST",
92
- uri: "/apps/{app_name}/certificates/{hostname}/check",
92
+ uri: "/v1/apps/{app_name}/certificates/{hostname}/check",
93
93
  code: 200,
94
94
  }))).annotate({
95
95
  identifier: "CheckAppCertificateRequest",
@@ -189,7 +189,7 @@ export const CordonMachineRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
189
189
  machine_id: S.String.pipe(T.Label()),
190
190
  }).pipe(T.Http({
191
191
  method: "POST",
192
- uri: "/apps/{app_name}/machines/{machine_id}/cordon",
192
+ uri: "/v1/apps/{app_name}/machines/{machine_id}/cordon",
193
193
  code: 200,
194
194
  }))).annotate({
195
195
  identifier: "CordonMachineRequest",
@@ -202,7 +202,7 @@ export const CreateAppRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
202
202
  name: S.optional(S.String),
203
203
  network: S.optional(S.String),
204
204
  org_slug: S.optional(S.String),
205
- }).pipe(T.Http({ method: "POST", uri: "/apps", code: 200 }))).annotate({
205
+ }).pipe(T.Http({ method: "POST", uri: "/v1/apps", code: 200 }))).annotate({
206
206
  identifier: "CreateAppRequest",
207
207
  });
208
208
  export const CreateAppResponse = /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({
@@ -213,7 +213,7 @@ export const CreateAppAcmeCertificateRequest = /*@__PURE__*/ S.suspend(() => S.S
213
213
  hostname: S.optional(S.String),
214
214
  }).pipe(T.Http({
215
215
  method: "POST",
216
- uri: "/apps/{app_name}/certificates/acme",
216
+ uri: "/v1/apps/{app_name}/certificates/acme",
217
217
  code: 200,
218
218
  }))).annotate({
219
219
  identifier: "CreateAppAcmeCertificateRequest",
@@ -241,7 +241,7 @@ export const CreateAppCustomCertificateRequest = /*@__PURE__*/ S.suspend(() => S
241
241
  private_key: S.optional(S.String.pipe(T.SensitiveValue({}))),
242
242
  }).pipe(T.Http({
243
243
  method: "POST",
244
- uri: "/apps/{app_name}/certificates/custom",
244
+ uri: "/v1/apps/{app_name}/certificates/custom",
245
245
  code: 200,
246
246
  }))).annotate({
247
247
  identifier: "CreateAppCustomCertificateRequest",
@@ -249,7 +249,11 @@ export const CreateAppCustomCertificateRequest = /*@__PURE__*/ S.suspend(() => S
249
249
  export const CreateAppDeployTokenRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
250
250
  app_name: S.String.pipe(T.Label()),
251
251
  expiry: S.optional(S.String),
252
- }).pipe(T.Http({ method: "POST", uri: "/apps/{app_name}/deploy_token", code: 200 }))).annotate({
252
+ }).pipe(T.Http({
253
+ method: "POST",
254
+ uri: "/v1/apps/{app_name}/deploy_token",
255
+ code: 200,
256
+ }))).annotate({
253
257
  identifier: "CreateAppDeployTokenRequest",
254
258
  });
255
259
  export const CreateAppDeployTokenResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
@@ -257,28 +261,36 @@ export const CreateAppDeployTokenResponse = /*@__PURE__*/ S.suspend(() => S.Stru
257
261
  })).annotate({
258
262
  identifier: "CreateAppDeployTokenResponse",
259
263
  });
264
+ export const IPAssignmentType = /*@__PURE__*/ S.String;
260
265
  export const CreateAppIPAssignmentRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
261
266
  app_name: S.String.pipe(T.Label()),
262
267
  network: S.optional(S.String),
263
268
  org_slug: S.optional(S.String),
264
269
  region: S.optional(S.String),
265
270
  service_name: S.optional(S.String),
266
- type: S.optional(S.String),
271
+ type: S.optional(IPAssignmentType),
267
272
  }).pipe(T.Http({
268
273
  method: "POST",
269
- uri: "/apps/{app_name}/ip_assignments",
274
+ uri: "/v1/apps/{app_name}/ip_assignments",
270
275
  code: 200,
271
276
  }))).annotate({
272
277
  identifier: "CreateAppIPAssignmentRequest",
273
278
  });
274
- export const IPAssignment = /*@__PURE__*/ S.suspend(() => S.Struct({
279
+ export const IPPair = /*@__PURE__*/ S.suspend(() => S.Struct({
280
+ v4: S.optional(S.String),
281
+ v6: S.optional(S.String),
282
+ })).annotate({ identifier: "IPPair" });
283
+ export const AssignIPResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
275
284
  created_at: S.optional(S.String),
285
+ egress: S.optional(S.Boolean),
276
286
  ip: S.optional(S.String),
287
+ ip_pair: S.optional(IPPair),
277
288
  region: S.optional(S.String),
278
289
  service_name: S.optional(S.String),
279
290
  shared: S.optional(S.Boolean),
280
- type: S.optional(S.String),
281
- })).annotate({ identifier: "IPAssignment" });
291
+ })).annotate({
292
+ identifier: "AssignIPResponse",
293
+ });
282
294
  export const FlyMachineCacheDrive = /*@__PURE__*/ S.suspend(() => S.Struct({
283
295
  size_mb: S.optional(S.Number),
284
296
  })).annotate({
@@ -653,7 +665,7 @@ export const CreateMachineRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
653
665
  skip_launch: S.optional(S.Boolean),
654
666
  skip_secrets: S.optional(S.Boolean),
655
667
  skip_service_registration: S.optional(S.Boolean),
656
- }).pipe(T.Http({ method: "POST", uri: "/apps/{app_name}/machines", code: 200 }))).annotate({
668
+ }).pipe(T.Http({ method: "POST", uri: "/v1/apps/{app_name}/machines", code: 200 }))).annotate({
657
669
  identifier: "CreateMachineRequest",
658
670
  });
659
671
  export const CheckStatus = /*@__PURE__*/ S.suspend(() => S.Struct({
@@ -681,9 +693,15 @@ export const ImageRef = /*@__PURE__*/ S.suspend(() => S.Struct({
681
693
  repository: S.optional(S.String),
682
694
  tag: S.optional(S.String),
683
695
  })).annotate({ identifier: "ImageRef" });
696
+ export const StrippedLease = /*@__PURE__*/ S.suspend(() => S.Struct({
697
+ description: S.optional(S.String),
698
+ expires_at: S.optional(S.Number),
699
+ owner: S.optional(S.String),
700
+ })).annotate({ identifier: "StrippedLease" });
684
701
  export const Machine = /*@__PURE__*/ S.suspend(() => S.Struct({
685
702
  checks: S.optional(MachineChecksList),
686
703
  config: S.optional(FlyMachineConfig),
704
+ cordoned: S.optional(S.Boolean),
687
705
  created_at: S.optional(S.String),
688
706
  events: S.optional(MachineEventsList),
689
707
  host_status: S.optional(MachineHostStatus),
@@ -691,6 +709,7 @@ export const Machine = /*@__PURE__*/ S.suspend(() => S.Struct({
691
709
  image_ref: S.optional(ImageRef),
692
710
  incomplete_config: S.optional(FlyMachineConfig),
693
711
  instance_id: S.optional(S.String),
712
+ lease: S.optional(StrippedLease),
694
713
  name: S.optional(S.String),
695
714
  nonce: S.optional(S.String),
696
715
  private_ip: S.optional(S.String),
@@ -705,7 +724,7 @@ export const CreateMachineLeaseRequest = /*@__PURE__*/ S.suspend(() => S.Struct(
705
724
  ttl: S.optional(S.Number),
706
725
  }).pipe(T.Http({
707
726
  method: "POST",
708
- uri: "/apps/{app_name}/machines/{machine_id}/lease",
727
+ uri: "/v1/apps/{app_name}/machines/{machine_id}/lease",
709
728
  code: 200,
710
729
  }))).annotate({
711
730
  identifier: "CreateMachineLeaseRequest",
@@ -717,13 +736,164 @@ export const Lease = /*@__PURE__*/ S.suspend(() => S.Struct({
717
736
  owner: S.optional(S.String),
718
737
  version: S.optional(S.String),
719
738
  })).annotate({ identifier: "Lease" });
739
+ export const CreatePostgresRequestPgMajorVersion = /*@__PURE__*/ S.String;
740
+ export const CreatePostgresRequestPlan = /*@__PURE__*/ S.String;
741
+ export const CreatePostgresRequestPoolMode = /*@__PURE__*/ S.String;
742
+ export const CreatePostgresRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
743
+ disk_size_gb: S.optional(S.Number),
744
+ name: S.optional(S.String),
745
+ org_slug: S.String,
746
+ pg_major_version: S.optional(CreatePostgresRequestPgMajorVersion),
747
+ plan: CreatePostgresRequestPlan,
748
+ pool_mode: S.optional(CreatePostgresRequestPoolMode),
749
+ postgis_enabled: S.optional(S.Boolean),
750
+ region: S.String,
751
+ }).pipe(T.Http({ method: "POST", uri: "/v1/postgres", code: 200 }))).annotate({
752
+ identifier: "CreatePostgresRequest",
753
+ });
754
+ export const PostgresAttachedApp = /*@__PURE__*/ S.suspend(() => S.Struct({
755
+ name: S.optional(S.String),
756
+ })).annotate({
757
+ identifier: "PostgresAttachedApp",
758
+ });
759
+ export const PostgresClusterAttachedAppsList = /*@__PURE__*/ S.Array(PostgresAttachedApp);
760
+ export const PostgresClusterCpuKind = /*@__PURE__*/ S.String;
761
+ export const PostgresEndpoint = /*@__PURE__*/ S.suspend(() => S.Struct({
762
+ host: S.optional(S.String),
763
+ port: S.optional(S.Number),
764
+ })).annotate({
765
+ identifier: "PostgresEndpoint",
766
+ });
767
+ export const PostgresNodeEndpoints = /*@__PURE__*/ S.suspend(() => S.Struct({
768
+ direct: S.optional(PostgresEndpoint),
769
+ pooler: S.optional(PostgresEndpoint),
770
+ })).annotate({
771
+ identifier: "PostgresNodeEndpoints",
772
+ });
773
+ export const PostgresClusterEndpoints = /*@__PURE__*/ S.suspend(() => S.Struct({
774
+ primary: S.optional(PostgresNodeEndpoints),
775
+ })).annotate({
776
+ identifier: "PostgresClusterEndpoints",
777
+ });
778
+ export const OrganizationRef = /*@__PURE__*/ S.suspend(() => S.Struct({
779
+ name: S.optional(S.String),
780
+ slug: S.optional(S.String),
781
+ })).annotate({
782
+ identifier: "OrganizationRef",
783
+ });
784
+ export const PostgresClusterPgMajorVersion = /*@__PURE__*/ S.String;
785
+ export const PostgresClusterPlan = /*@__PURE__*/ S.String;
786
+ export const PostgresClusterStatus = /*@__PURE__*/ S.String;
787
+ export const PostgresCluster = /*@__PURE__*/ S.suspend(() => S.Struct({
788
+ attached_apps: S.optional(PostgresClusterAttachedAppsList),
789
+ cpu_kind: S.optional(PostgresClusterCpuKind),
790
+ cpus: S.optional(S.Number),
791
+ created_at: S.optional(S.String),
792
+ disk_size_gb: S.optional(S.Number),
793
+ endpoints: S.optional(PostgresClusterEndpoints),
794
+ id: S.optional(S.String),
795
+ memory_mb: S.optional(S.Number),
796
+ name: S.optional(S.String),
797
+ organization: S.optional(OrganizationRef),
798
+ pg_major_version: S.optional(PostgresClusterPgMajorVersion),
799
+ plan: S.optional(PostgresClusterPlan),
800
+ postgis_enabled: S.optional(S.Boolean),
801
+ region: S.optional(S.String),
802
+ replicas: S.optional(S.Number),
803
+ status: S.optional(PostgresClusterStatus),
804
+ })).annotate({
805
+ identifier: "PostgresCluster",
806
+ });
807
+ export const ShowPostgresClusterResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
808
+ data: S.optional(PostgresCluster),
809
+ })).annotate({
810
+ identifier: "ShowPostgresClusterResponse",
811
+ });
812
+ export const CreatePostgresAttachmentRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
813
+ postgres_cluster_id: S.String.pipe(T.Label()),
814
+ app_name: S.String,
815
+ }).pipe(T.Http({
816
+ method: "POST",
817
+ uri: "/v1/postgres/{postgres_cluster_id}/attachments",
818
+ code: 200,
819
+ }))).annotate({
820
+ identifier: "CreatePostgresAttachmentRequest",
821
+ });
822
+ export const PostgresAttachment = /*@__PURE__*/ S.suspend(() => S.Struct({
823
+ app_name: S.optional(S.String),
824
+ attached_at: S.optional(S.String),
825
+ postgres_cluster_id: S.optional(S.String),
826
+ })).annotate({
827
+ identifier: "PostgresAttachment",
828
+ });
829
+ export const CreatePostgresAttachmentResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
830
+ data: S.optional(PostgresAttachment),
831
+ })).annotate({
832
+ identifier: "CreatePostgresAttachmentResponse",
833
+ });
834
+ export const CreatePostgresBackupRequestType = /*@__PURE__*/ S.String;
835
+ export const CreatePostgresBackupRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
836
+ postgres_cluster_id: S.String.pipe(T.Label()),
837
+ type: CreatePostgresBackupRequestType,
838
+ }).pipe(T.Http({
839
+ method: "POST",
840
+ uri: "/v1/postgres/{postgres_cluster_id}/backups",
841
+ code: 200,
842
+ }))).annotate({
843
+ identifier: "CreatePostgresBackupRequest",
844
+ });
845
+ export const CreatePostgresBackupResponse = /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({
846
+ identifier: "CreatePostgresBackupResponse",
847
+ });
848
+ export const CreatePostgresDatabaseRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
849
+ postgres_cluster_id: S.String.pipe(T.Label()),
850
+ name: S.String,
851
+ }).pipe(T.Http({
852
+ method: "POST",
853
+ uri: "/v1/postgres/{postgres_cluster_id}/databases",
854
+ code: 200,
855
+ }))).annotate({
856
+ identifier: "CreatePostgresDatabaseRequest",
857
+ });
858
+ export const PostgresDatabase = /*@__PURE__*/ S.suspend(() => S.Struct({
859
+ name: S.optional(S.String),
860
+ })).annotate({
861
+ identifier: "PostgresDatabase",
862
+ });
863
+ export const PostgresDatabaseResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
864
+ data: S.optional(PostgresDatabase),
865
+ })).annotate({
866
+ identifier: "PostgresDatabaseResponse",
867
+ });
868
+ export const CreatePostgresUserRequestRole = /*@__PURE__*/ S.String;
869
+ export const CreatePostgresUserRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
870
+ postgres_cluster_id: S.String.pipe(T.Label()),
871
+ role: CreatePostgresUserRequestRole,
872
+ username: S.String,
873
+ }).pipe(T.Http({
874
+ method: "POST",
875
+ uri: "/v1/postgres/{postgres_cluster_id}/users",
876
+ code: 200,
877
+ }))).annotate({
878
+ identifier: "CreatePostgresUserRequest",
879
+ });
880
+ export const PostgresUserRole = /*@__PURE__*/ S.String;
881
+ export const PostgresUser = /*@__PURE__*/ S.suspend(() => S.Struct({
882
+ role: S.optional(PostgresUserRole),
883
+ username: S.optional(S.String),
884
+ })).annotate({ identifier: "PostgresUser" });
885
+ export const CreatePostgresUserResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
886
+ data: S.optional(PostgresUser),
887
+ })).annotate({
888
+ identifier: "CreatePostgresUserResponse",
889
+ });
720
890
  export const CreateSecretRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
721
891
  app_name: S.String.pipe(T.Label()),
722
892
  secret_name: S.String.pipe(T.Label()),
723
893
  value: S.optional(S.String),
724
894
  }).pipe(T.Http({
725
895
  method: "POST",
726
- uri: "/apps/{app_name}/secrets/{secret_name}",
896
+ uri: "/v1/apps/{app_name}/secrets/{secret_name}",
727
897
  code: 200,
728
898
  }))).annotate({
729
899
  identifier: "CreateSecretRequest",
@@ -754,7 +924,7 @@ export const CreateVolumeRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
754
924
  snapshot_retention: S.optional(S.Number),
755
925
  source_volume_id: S.optional(S.String),
756
926
  unique_zone_app_wide: S.optional(S.Boolean),
757
- }).pipe(T.Http({ method: "POST", uri: "/apps/{app_name}/volumes", code: 200 }))).annotate({
927
+ }).pipe(T.Http({ method: "POST", uri: "/v1/apps/{app_name}/volumes", code: 200 }))).annotate({
758
928
  identifier: "CreateVolumeRequest",
759
929
  });
760
930
  export const VolumeHostStatus = /*@__PURE__*/ S.String;
@@ -787,7 +957,7 @@ export const CreateVolumeSnapshotRequest = /*@__PURE__*/ S.suspend(() => S.Struc
787
957
  volume_id: S.String.pipe(T.Label()),
788
958
  }).pipe(T.Http({
789
959
  method: "POST",
790
- uri: "/apps/{app_name}/volumes/{volume_id}/snapshots",
960
+ uri: "/v1/apps/{app_name}/volumes/{volume_id}/snapshots",
791
961
  code: 200,
792
962
  }))).annotate({
793
963
  identifier: "CreateVolumeSnapshotRequest",
@@ -803,7 +973,7 @@ export const DecryptSecretKeyRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
803
973
  ciphertext: S.optional(S.String),
804
974
  }).pipe(T.Http({
805
975
  method: "POST",
806
- uri: "/apps/{app_name}/secretkeys/{secret_name}/decrypt",
976
+ uri: "/v1/apps/{app_name}/secretkeys/{secret_name}/decrypt",
807
977
  code: 200,
808
978
  }))).annotate({
809
979
  identifier: "DecryptSecretKeyRequest",
@@ -815,7 +985,7 @@ export const DecryptSecretkeyResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
815
985
  });
816
986
  export const DeleteAppRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
817
987
  app_name: S.String.pipe(T.Label()),
818
- }).pipe(T.Http({ method: "DELETE", uri: "/apps/{app_name}", code: 200 }))).annotate({
988
+ }).pipe(T.Http({ method: "DELETE", uri: "/v1/apps/{app_name}", code: 200 }))).annotate({
819
989
  identifier: "DeleteAppRequest",
820
990
  });
821
991
  export const DeleteAppResponse = /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({
@@ -826,7 +996,7 @@ export const DeleteAppAcmeCertificateRequest = /*@__PURE__*/ S.suspend(() => S.S
826
996
  hostname: S.String.pipe(T.Label()),
827
997
  }).pipe(T.Http({
828
998
  method: "DELETE",
829
- uri: "/apps/{app_name}/certificates/{hostname}/acme",
999
+ uri: "/v1/apps/{app_name}/certificates/{hostname}/acme",
830
1000
  code: 200,
831
1001
  }))).annotate({
832
1002
  identifier: "DeleteAppAcmeCertificateRequest",
@@ -836,7 +1006,7 @@ export const DeleteAppCertificateRequest = /*@__PURE__*/ S.suspend(() => S.Struc
836
1006
  hostname: S.String.pipe(T.Label()),
837
1007
  }).pipe(T.Http({
838
1008
  method: "DELETE",
839
- uri: "/apps/{app_name}/certificates/{hostname}",
1009
+ uri: "/v1/apps/{app_name}/certificates/{hostname}",
840
1010
  code: 200,
841
1011
  }))).annotate({
842
1012
  identifier: "DeleteAppCertificateRequest",
@@ -849,7 +1019,7 @@ export const DeleteAppCustomCertificateRequest = /*@__PURE__*/ S.suspend(() => S
849
1019
  hostname: S.String.pipe(T.Label()),
850
1020
  }).pipe(T.Http({
851
1021
  method: "DELETE",
852
- uri: "/apps/{app_name}/certificates/{hostname}/custom",
1022
+ uri: "/v1/apps/{app_name}/certificates/{hostname}/custom",
853
1023
  code: 200,
854
1024
  }))).annotate({
855
1025
  identifier: "DeleteAppCustomCertificateRequest",
@@ -878,7 +1048,7 @@ export const DeleteAppIPAssignmentRequest = /*@__PURE__*/ S.suspend(() => S.Stru
878
1048
  ip: S.String.pipe(T.Label()),
879
1049
  }).pipe(T.Http({
880
1050
  method: "DELETE",
881
- uri: "/apps/{app_name}/ip_assignments/{ip}",
1051
+ uri: "/v1/apps/{app_name}/ip_assignments/{ip}",
882
1052
  code: 200,
883
1053
  }))).annotate({
884
1054
  identifier: "DeleteAppIPAssignmentRequest",
@@ -892,7 +1062,7 @@ export const DeleteMachineRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
892
1062
  force: S.optional(S.Boolean.pipe(T.Query())),
893
1063
  }).pipe(T.Http({
894
1064
  method: "DELETE",
895
- uri: "/apps/{app_name}/machines/{machine_id}",
1065
+ uri: "/v1/apps/{app_name}/machines/{machine_id}",
896
1066
  code: 200,
897
1067
  }))).annotate({
898
1068
  identifier: "DeleteMachineRequest",
@@ -906,7 +1076,7 @@ export const DeleteMachineMetadataRequest = /*@__PURE__*/ S.suspend(() => S.Stru
906
1076
  key: S.String.pipe(T.Label()),
907
1077
  }).pipe(T.Http({
908
1078
  method: "DELETE",
909
- uri: "/apps/{app_name}/machines/{machine_id}/metadata/{key}",
1079
+ uri: "/v1/apps/{app_name}/machines/{machine_id}/metadata/{key}",
910
1080
  code: 200,
911
1081
  }))).annotate({
912
1082
  identifier: "DeleteMachineMetadataRequest",
@@ -914,12 +1084,60 @@ export const DeleteMachineMetadataRequest = /*@__PURE__*/ S.suspend(() => S.Stru
914
1084
  export const DeleteMachineMetadataResponse = /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({
915
1085
  identifier: "DeleteMachineMetadataResponse",
916
1086
  });
1087
+ export const DeletePostgresRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
1088
+ postgres_cluster_id: S.String.pipe(T.Label()),
1089
+ }).pipe(T.Http({
1090
+ method: "DELETE",
1091
+ uri: "/v1/postgres/{postgres_cluster_id}",
1092
+ code: 200,
1093
+ }))).annotate({
1094
+ identifier: "DeletePostgresRequest",
1095
+ });
1096
+ export const DeletePostgresResponse = /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({
1097
+ identifier: "DeletePostgresResponse",
1098
+ });
1099
+ export const DeletePostgresAttachmentRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
1100
+ postgres_cluster_id: S.String.pipe(T.Label()),
1101
+ app_name: S.String.pipe(T.Label()),
1102
+ }).pipe(T.Http({
1103
+ method: "DELETE",
1104
+ uri: "/v1/postgres/{postgres_cluster_id}/attachments/{app_name}",
1105
+ code: 200,
1106
+ }))).annotate({
1107
+ identifier: "DeletePostgresAttachmentRequest",
1108
+ });
1109
+ export const DeletePostgresAttachmentResponse = /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({
1110
+ identifier: "DeletePostgresAttachmentResponse",
1111
+ });
1112
+ export const DeletePostgresDatabaseRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
1113
+ postgres_cluster_id: S.String.pipe(T.Label()),
1114
+ database_name: S.String.pipe(T.Label()),
1115
+ }).pipe(T.Http({
1116
+ method: "DELETE",
1117
+ uri: "/v1/postgres/{postgres_cluster_id}/databases/{database_name}",
1118
+ code: 200,
1119
+ }))).annotate({
1120
+ identifier: "DeletePostgresDatabaseRequest",
1121
+ });
1122
+ export const DeletePostgresUserRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
1123
+ postgres_cluster_id: S.String.pipe(T.Label()),
1124
+ username: S.String.pipe(T.Label()),
1125
+ }).pipe(T.Http({
1126
+ method: "DELETE",
1127
+ uri: "/v1/postgres/{postgres_cluster_id}/users/{username}",
1128
+ code: 200,
1129
+ }))).annotate({
1130
+ identifier: "DeletePostgresUserRequest",
1131
+ });
1132
+ export const DeletePostgresUserResponse = /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({
1133
+ identifier: "DeletePostgresUserResponse",
1134
+ });
917
1135
  export const DeleteSecretRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
918
1136
  app_name: S.String.pipe(T.Label()),
919
1137
  secret_name: S.String.pipe(T.Label()),
920
1138
  }).pipe(T.Http({
921
1139
  method: "DELETE",
922
- uri: "/apps/{app_name}/secrets/{secret_name}",
1140
+ uri: "/v1/apps/{app_name}/secrets/{secret_name}",
923
1141
  code: 200,
924
1142
  }))).annotate({
925
1143
  identifier: "DeleteSecretRequest",
@@ -935,7 +1153,7 @@ export const DeleteSecretKeyRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
935
1153
  secret_name: S.String.pipe(T.Label()),
936
1154
  }).pipe(T.Http({
937
1155
  method: "DELETE",
938
- uri: "/apps/{app_name}/secretkeys/{secret_name}",
1156
+ uri: "/v1/apps/{app_name}/secretkeys/{secret_name}",
939
1157
  code: 200,
940
1158
  }))).annotate({
941
1159
  identifier: "DeleteSecretKeyRequest",
@@ -951,11 +1169,42 @@ export const DeleteVolumeRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
951
1169
  volume_id: S.String.pipe(T.Label()),
952
1170
  }).pipe(T.Http({
953
1171
  method: "DELETE",
954
- uri: "/apps/{app_name}/volumes/{volume_id}",
1172
+ uri: "/v1/apps/{app_name}/volumes/{volume_id}",
955
1173
  code: 200,
956
1174
  }))).annotate({
957
1175
  identifier: "DeleteVolumeRequest",
958
1176
  });
1177
+ export const DisablePostgresExtensionRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
1178
+ postgres_cluster_id: S.String.pipe(T.Label()),
1179
+ database_name: S.String.pipe(T.Label()),
1180
+ extension_name: S.String.pipe(T.Label()),
1181
+ force: S.optional(S.Boolean.pipe(T.Query())),
1182
+ }).pipe(T.Http({
1183
+ method: "DELETE",
1184
+ uri: "/v1/postgres/{postgres_cluster_id}/databases/{database_name}/extensions/{extension_name}",
1185
+ code: 200,
1186
+ }))).annotate({
1187
+ identifier: "DisablePostgresExtensionRequest",
1188
+ });
1189
+ export const DisablePostgresExtensionResponse = /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({
1190
+ identifier: "DisablePostgresExtensionResponse",
1191
+ });
1192
+ export const EnablePostgresExtensionRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
1193
+ postgres_cluster_id: S.String.pipe(T.Label()),
1194
+ database_name: S.String.pipe(T.Label()),
1195
+ create_schema: S.optional(S.Boolean),
1196
+ name: S.String,
1197
+ schema: S.optional(S.String),
1198
+ }).pipe(T.Http({
1199
+ method: "POST",
1200
+ uri: "/v1/postgres/{postgres_cluster_id}/databases/{database_name}/extensions",
1201
+ code: 200,
1202
+ }))).annotate({
1203
+ identifier: "EnablePostgresExtensionRequest",
1204
+ });
1205
+ export const EnablePostgresExtensionResponse = /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({
1206
+ identifier: "EnablePostgresExtensionResponse",
1207
+ });
959
1208
  export const EncryptSecretKeyRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
960
1209
  app_name: S.String.pipe(T.Label()),
961
1210
  secret_name: S.String.pipe(T.Label()),
@@ -964,7 +1213,7 @@ export const EncryptSecretKeyRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
964
1213
  plaintext: S.optional(S.String.pipe(T.SensitiveValue({}))),
965
1214
  }).pipe(T.Http({
966
1215
  method: "POST",
967
- uri: "/apps/{app_name}/secretkeys/{secret_name}/encrypt",
1216
+ uri: "/v1/apps/{app_name}/secretkeys/{secret_name}/encrypt",
968
1217
  code: 200,
969
1218
  }))).annotate({
970
1219
  identifier: "EncryptSecretKeyRequest",
@@ -981,11 +1230,12 @@ export const ExecMachineRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
981
1230
  cmd: S.optional(S.String),
982
1231
  command: S.optional(ExecMachineRequestCommandList),
983
1232
  container: S.optional(S.String),
1233
+ machine: S.optional(S.Boolean),
984
1234
  stdin: S.optional(S.String),
985
1235
  timeout: S.optional(S.Number),
986
1236
  }).pipe(T.Http({
987
1237
  method: "POST",
988
- uri: "/apps/{app_name}/machines/{machine_id}/exec",
1238
+ uri: "/v1/apps/{app_name}/machines/{machine_id}/exec",
989
1239
  code: 200,
990
1240
  }))).annotate({
991
1241
  identifier: "ExecMachineRequest",
@@ -1004,7 +1254,7 @@ export const ExtendVolumeRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
1004
1254
  size_gb: S.optional(S.Number),
1005
1255
  }).pipe(T.Http({
1006
1256
  method: "PUT",
1007
- uri: "/apps/{app_name}/volumes/{volume_id}/extend",
1257
+ uri: "/v1/apps/{app_name}/volumes/{volume_id}/extend",
1008
1258
  code: 200,
1009
1259
  }))).annotate({
1010
1260
  identifier: "ExtendVolumeRequest",
@@ -1015,6 +1265,16 @@ export const ExtendVolumeResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
1015
1265
  })).annotate({
1016
1266
  identifier: "ExtendVolumeResponse",
1017
1267
  });
1268
+ export const ForkPostgresRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
1269
+ postgres_cluster_id: S.String.pipe(T.Label()),
1270
+ name: S.optional(S.String),
1271
+ }).pipe(T.Http({
1272
+ method: "POST",
1273
+ uri: "/v1/postgres/{postgres_cluster_id}/fork",
1274
+ code: 200,
1275
+ }))).annotate({
1276
+ identifier: "ForkPostgresRequest",
1277
+ });
1018
1278
  export const GenerateSecretKeyRequestValueList = /*@__PURE__*/ S.Array(S.Number);
1019
1279
  export const GenerateSecretKeyRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
1020
1280
  app_name: S.String.pipe(T.Label()),
@@ -1023,7 +1283,7 @@ export const GenerateSecretKeyRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
1023
1283
  value: S.optional(GenerateSecretKeyRequestValueList),
1024
1284
  }).pipe(T.Http({
1025
1285
  method: "POST",
1026
- uri: "/apps/{app_name}/secretkeys/{secret_name}/generate",
1286
+ uri: "/v1/apps/{app_name}/secretkeys/{secret_name}/generate",
1027
1287
  code: 200,
1028
1288
  }))).annotate({
1029
1289
  identifier: "GenerateSecretKeyRequest",
@@ -1041,7 +1301,7 @@ export const SetSecretkeyResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
1041
1301
  });
1042
1302
  export const GetAppRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
1043
1303
  app_name: S.String.pipe(T.Label()),
1044
- }).pipe(T.Http({ method: "GET", uri: "/apps/{app_name}", code: 200 }))).annotate({ identifier: "GetAppRequest" });
1304
+ }).pipe(T.Http({ method: "GET", uri: "/v1/apps/{app_name}", code: 200 }))).annotate({ identifier: "GetAppRequest" });
1045
1305
  export const AppOrganizationInfo = /*@__PURE__*/ S.suspend(() => S.Struct({
1046
1306
  internal_numeric_id: S.optional(S.Number),
1047
1307
  name: S.optional(S.String),
@@ -1055,6 +1315,7 @@ export const App = /*@__PURE__*/ S.suspend(() => S.Struct({
1055
1315
  machine_count: S.optional(S.Number),
1056
1316
  name: S.optional(S.String),
1057
1317
  network: S.optional(S.String),
1318
+ network_cidr: S.optional(S.String),
1058
1319
  organization: S.optional(AppOrganizationInfo),
1059
1320
  status: S.optional(S.String),
1060
1321
  volume_count: S.optional(S.Number),
@@ -1064,12 +1325,12 @@ export const GetAppCertificateRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
1064
1325
  hostname: S.String.pipe(T.Label()),
1065
1326
  }).pipe(T.Http({
1066
1327
  method: "GET",
1067
- uri: "/apps/{app_name}/certificates/{hostname}",
1328
+ uri: "/v1/apps/{app_name}/certificates/{hostname}",
1068
1329
  code: 200,
1069
1330
  }))).annotate({
1070
1331
  identifier: "GetAppCertificateRequest",
1071
1332
  });
1072
- export const GetCurrentTokenRequest = /*@__PURE__*/ S.suspend(() => S.Struct({}).pipe(T.Http({ method: "GET", uri: "/tokens/current", code: 200 }))).annotate({
1333
+ export const GetCurrentTokenRequest = /*@__PURE__*/ S.suspend(() => S.Struct({}).pipe(T.Http({ method: "GET", uri: "/v1/tokens/current", code: 200 }))).annotate({
1073
1334
  identifier: "GetCurrentTokenRequest",
1074
1335
  });
1075
1336
  export const MainTokenInfoAppsList = /*@__PURE__*/ S.Array(S.String);
@@ -1091,9 +1352,10 @@ export const CurrentTokenResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
1091
1352
  export const GetMachineRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
1092
1353
  app_name: S.String.pipe(T.Label()),
1093
1354
  machine_id: S.String.pipe(T.Label()),
1355
+ include_leases: S.optional(S.Boolean.pipe(T.Query())),
1094
1356
  }).pipe(T.Http({
1095
1357
  method: "GET",
1096
- uri: "/apps/{app_name}/machines/{machine_id}",
1358
+ uri: "/v1/apps/{app_name}/machines/{machine_id}",
1097
1359
  code: 200,
1098
1360
  }))).annotate({
1099
1361
  identifier: "GetMachineRequest",
@@ -1103,7 +1365,7 @@ export const GetMachineLeaseRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
1103
1365
  machine_id: S.String.pipe(T.Label()),
1104
1366
  }).pipe(T.Http({
1105
1367
  method: "GET",
1106
- uri: "/apps/{app_name}/machines/{machine_id}/lease",
1368
+ uri: "/v1/apps/{app_name}/machines/{machine_id}/lease",
1107
1369
  code: 200,
1108
1370
  }))).annotate({
1109
1371
  identifier: "GetMachineLeaseRequest",
@@ -1113,7 +1375,7 @@ export const GetMachineMemoryRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
1113
1375
  machine_id: S.String.pipe(T.Label()),
1114
1376
  }).pipe(T.Http({
1115
1377
  method: "GET",
1116
- uri: "/apps/{app_name}/machines/{machine_id}/memory",
1378
+ uri: "/v1/apps/{app_name}/machines/{machine_id}/memory",
1117
1379
  code: 200,
1118
1380
  }))).annotate({
1119
1381
  identifier: "GetMachineMemoryRequest",
@@ -1129,7 +1391,7 @@ export const GetMachineMetadataRequest = /*@__PURE__*/ S.suspend(() => S.Struct(
1129
1391
  machine_id: S.String.pipe(T.Label()),
1130
1392
  }).pipe(T.Http({
1131
1393
  method: "GET",
1132
- uri: "/apps/{app_name}/machines/{machine_id}/metadata",
1394
+ uri: "/v1/apps/{app_name}/machines/{machine_id}/metadata",
1133
1395
  code: 200,
1134
1396
  }))).annotate({
1135
1397
  identifier: "GetMachineMetadataRequest",
@@ -1144,7 +1406,7 @@ export const GetMachineMetadataKeyRequest = /*@__PURE__*/ S.suspend(() => S.Stru
1144
1406
  key: S.String.pipe(T.Label()),
1145
1407
  }).pipe(T.Http({
1146
1408
  method: "GET",
1147
- uri: "/apps/{app_name}/machines/{machine_id}/metadata/{key}",
1409
+ uri: "/v1/apps/{app_name}/machines/{machine_id}/metadata/{key}",
1148
1410
  code: 200,
1149
1411
  }))).annotate({
1150
1412
  identifier: "GetMachineMetadataKeyRequest",
@@ -1163,7 +1425,7 @@ export const GetPlacementsRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
1163
1425
  volume_name: S.optional(S.String),
1164
1426
  volume_size_bytes: S.optional(S.Number),
1165
1427
  weights: S.optional(PlacementWeights),
1166
- }).pipe(T.Http({ method: "POST", uri: "/platform/placements", code: 200 }))).annotate({
1428
+ }).pipe(T.Http({ method: "POST", uri: "/v1/platform/placements", code: 200 }))).annotate({
1167
1429
  identifier: "GetPlacementsRequest",
1168
1430
  });
1169
1431
  export const PlacementRegionPlacement = /*@__PURE__*/ S.suspend(() => S.Struct({
@@ -1179,7 +1441,16 @@ export const MainGetPlacementsResponse = /*@__PURE__*/ S.suspend(() => S.Struct(
1179
1441
  })).annotate({
1180
1442
  identifier: "MainGetPlacementsResponse",
1181
1443
  });
1182
- export const GetRegionsRequest = /*@__PURE__*/ S.suspend(() => S.Struct({}).pipe(T.Http({ method: "GET", uri: "/platform/regions", code: 200 }))).annotate({
1444
+ export const GetPostgresRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
1445
+ postgres_cluster_id: S.String.pipe(T.Label()),
1446
+ }).pipe(T.Http({
1447
+ method: "GET",
1448
+ uri: "/v1/postgres/{postgres_cluster_id}",
1449
+ code: 200,
1450
+ }))).annotate({
1451
+ identifier: "GetPostgresRequest",
1452
+ });
1453
+ export const GetRegionsRequest = /*@__PURE__*/ S.suspend(() => S.Struct({}).pipe(T.Http({ method: "GET", uri: "/v1/platform/regions", code: 200 }))).annotate({
1183
1454
  identifier: "GetRegionsRequest",
1184
1455
  });
1185
1456
  export const MainRegionRow = /*@__PURE__*/ S.suspend(() => S.Struct({
@@ -1189,6 +1460,7 @@ export const MainRegionRow = /*@__PURE__*/ S.suspend(() => S.Struct({
1189
1460
  geo_region: S.optional(S.String),
1190
1461
  latitude: S.optional(S.Number),
1191
1462
  longitude: S.optional(S.Number),
1463
+ mpg_available: S.optional(S.Boolean),
1192
1464
  name: S.optional(S.String),
1193
1465
  requires_paid_plan: S.optional(S.Boolean),
1194
1466
  })).annotate({ identifier: "MainRegionRow" });
@@ -1206,7 +1478,7 @@ export const GetSecretRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
1206
1478
  show_secrets: S.optional(S.Boolean.pipe(T.Query())),
1207
1479
  }).pipe(T.Http({
1208
1480
  method: "GET",
1209
- uri: "/apps/{app_name}/secrets/{secret_name}",
1481
+ uri: "/v1/apps/{app_name}/secrets/{secret_name}",
1210
1482
  code: 200,
1211
1483
  }))).annotate({
1212
1484
  identifier: "GetSecretRequest",
@@ -1224,7 +1496,7 @@ export const GetSecretKeyRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
1224
1496
  min_version: S.optional(S.String.pipe(T.Query())),
1225
1497
  }).pipe(T.Http({
1226
1498
  method: "GET",
1227
- uri: "/apps/{app_name}/secretkeys/{secret_name}",
1499
+ uri: "/v1/apps/{app_name}/secretkeys/{secret_name}",
1228
1500
  code: 200,
1229
1501
  }))).annotate({
1230
1502
  identifier: "GetSecretKeyRequest",
@@ -1241,7 +1513,7 @@ export const GetVolumeByIdRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
1241
1513
  volume_id: S.String.pipe(T.Label()),
1242
1514
  }).pipe(T.Http({
1243
1515
  method: "GET",
1244
- uri: "/apps/{app_name}/volumes/{volume_id}",
1516
+ uri: "/v1/apps/{app_name}/volumes/{volume_id}",
1245
1517
  code: 200,
1246
1518
  }))).annotate({
1247
1519
  identifier: "GetVolumeByIdRequest",
@@ -1251,7 +1523,11 @@ export const ListAppCertificatesRequest = /*@__PURE__*/ S.suspend(() => S.Struct
1251
1523
  filter: S.optional(S.String.pipe(T.Query())),
1252
1524
  cursor: S.optional(S.String.pipe(T.Query())),
1253
1525
  limit: S.optional(S.Number.pipe(T.Query())),
1254
- }).pipe(T.Http({ method: "GET", uri: "/apps/{app_name}/certificates", code: 200 }))).annotate({
1526
+ }).pipe(T.Http({
1527
+ method: "GET",
1528
+ uri: "/v1/apps/{app_name}/certificates",
1529
+ code: 200,
1530
+ }))).annotate({
1255
1531
  identifier: "ListAppCertificatesRequest",
1256
1532
  });
1257
1533
  export const CertificateSummary = /*@__PURE__*/ S.suspend(() => S.Struct({
@@ -1283,11 +1559,20 @@ export const ListAppIPAssignmentsRequest = /*@__PURE__*/ S.suspend(() => S.Struc
1283
1559
  app_name: S.String.pipe(T.Label()),
1284
1560
  }).pipe(T.Http({
1285
1561
  method: "GET",
1286
- uri: "/apps/{app_name}/ip_assignments",
1562
+ uri: "/v1/apps/{app_name}/ip_assignments",
1287
1563
  code: 200,
1288
1564
  }))).annotate({
1289
1565
  identifier: "ListAppIPAssignmentsRequest",
1290
1566
  });
1567
+ export const IPAssignment = /*@__PURE__*/ S.suspend(() => S.Struct({
1568
+ created_at: S.optional(S.String),
1569
+ egress: S.optional(S.Boolean),
1570
+ ip: S.optional(S.String),
1571
+ region: S.optional(S.String),
1572
+ service_name: S.optional(S.String),
1573
+ shared: S.optional(S.Boolean),
1574
+ type: S.optional(S.String),
1575
+ })).annotate({ identifier: "IPAssignment" });
1291
1576
  export const ListIPAssignmentsResponseIpsList = /*@__PURE__*/ S.Array(IPAssignment);
1292
1577
  export const ListIPAssignmentsResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
1293
1578
  ips: S.optional(ListIPAssignmentsResponseIpsList),
@@ -1297,7 +1582,7 @@ export const ListIPAssignmentsResponse = /*@__PURE__*/ S.suspend(() => S.Struct(
1297
1582
  export const ListAppsRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
1298
1583
  org_slug: S.String.pipe(T.Query()),
1299
1584
  app_role: S.optional(S.String.pipe(T.Query())),
1300
- }).pipe(T.Http({ method: "GET", uri: "/apps", code: 200 }))).annotate({
1585
+ }).pipe(T.Http({ method: "GET", uri: "/v1/apps", code: 200 }))).annotate({
1301
1586
  identifier: "ListAppsRequest",
1302
1587
  });
1303
1588
  export const ListAppsResponseAppsList = /*@__PURE__*/ S.Array(App);
@@ -1313,7 +1598,7 @@ export const ListMachineEventsRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
1313
1598
  limit: S.optional(S.Number.pipe(T.Query())),
1314
1599
  }).pipe(T.Http({
1315
1600
  method: "GET",
1316
- uri: "/apps/{app_name}/machines/{machine_id}/events",
1601
+ uri: "/v1/apps/{app_name}/machines/{machine_id}/events",
1317
1602
  code: 200,
1318
1603
  }))).annotate({
1319
1604
  identifier: "ListMachineEventsRequest",
@@ -1329,7 +1614,7 @@ export const ListMachineProcessesRequest = /*@__PURE__*/ S.suspend(() => S.Struc
1329
1614
  order: S.optional(S.String.pipe(T.Query())),
1330
1615
  }).pipe(T.Http({
1331
1616
  method: "GET",
1332
- uri: "/apps/{app_name}/machines/{machine_id}/ps",
1617
+ uri: "/v1/apps/{app_name}/machines/{machine_id}/ps",
1333
1618
  code: 200,
1334
1619
  }))).annotate({
1335
1620
  identifier: "ListMachineProcessesRequest",
@@ -1356,35 +1641,19 @@ export const ListMachineProcessesResponse = /*@__PURE__*/ S.suspend(() => ListMa
1356
1641
  export const ListMachinesRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
1357
1642
  app_name: S.String.pipe(T.Label()),
1358
1643
  include_deleted: S.optional(S.Boolean.pipe(T.Query())),
1644
+ include_leases: S.optional(S.Boolean.pipe(T.Query())),
1359
1645
  region: S.optional(S.String.pipe(T.Query())),
1360
1646
  state: S.optional(S.String.pipe(T.Query())),
1361
1647
  summary: S.optional(S.Boolean.pipe(T.Query())),
1362
- }).pipe(T.Http({ method: "GET", uri: "/apps/{app_name}/machines", code: 200 }))).annotate({
1648
+ metadata__key_: S.optional(S.String.pipe(T.Query("metadata.{key}"))),
1649
+ }).pipe(T.Http({ method: "GET", uri: "/v1/apps/{app_name}/machines", code: 200 }))).annotate({
1363
1650
  identifier: "ListMachinesRequest",
1364
1651
  });
1365
1652
  export const ListMachinesResponseBodyList = /*@__PURE__*/ S.Array(Machine);
1366
1653
  export const ListMachinesResponse = /*@__PURE__*/ S.suspend(() => ListMachinesResponseBodyList.pipe(T.RawResponseRoot())).annotate({
1367
1654
  identifier: "ListMachinesResponse",
1368
1655
  });
1369
- export const ListMachineVersionsRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
1370
- app_name: S.String.pipe(T.Label()),
1371
- machine_id: S.String.pipe(T.Label()),
1372
- }).pipe(T.Http({
1373
- method: "GET",
1374
- uri: "/apps/{app_name}/machines/{machine_id}/versions",
1375
- code: 200,
1376
- }))).annotate({
1377
- identifier: "ListMachineVersionsRequest",
1378
- });
1379
- export const MachineVersion = /*@__PURE__*/ S.suspend(() => S.Struct({
1380
- user_config: S.optional(FlyMachineConfig),
1381
- version: S.optional(S.String),
1382
- })).annotate({ identifier: "MachineVersion" });
1383
- export const ListMachineVersionsResponseBodyList = /*@__PURE__*/ S.Array(MachineVersion);
1384
- export const ListMachineVersionsResponse = /*@__PURE__*/ S.suspend(() => ListMachineVersionsResponseBodyList.pipe(T.RawResponseRoot())).annotate({
1385
- identifier: "ListMachineVersionsResponse",
1386
- });
1387
- export const ListOrgMachinesRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
1656
+ export const ListMachinesOrgRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
1388
1657
  org_slug: S.String.pipe(T.Label()),
1389
1658
  include_deleted: S.optional(S.Boolean.pipe(T.Query())),
1390
1659
  region: S.optional(S.String.pipe(T.Query())),
@@ -1393,8 +1662,8 @@ export const ListOrgMachinesRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
1393
1662
  updated_after: S.optional(S.String.pipe(T.Query())),
1394
1663
  cursor: S.optional(S.String.pipe(T.Query())),
1395
1664
  limit: S.optional(S.Number.pipe(T.Query())),
1396
- }).pipe(T.Http({ method: "GET", uri: "/orgs/{org_slug}/machines", code: 200 }))).annotate({
1397
- identifier: "ListOrgMachinesRequest",
1665
+ }).pipe(T.Http({ method: "GET", uri: "/v1/orgs/{org_slug}/machines", code: 200 }))).annotate({
1666
+ identifier: "ListMachinesOrgRequest",
1398
1667
  });
1399
1668
  export const OrgMachinesResponseErrorRegionsList = /*@__PURE__*/ S.Array(S.String);
1400
1669
  export const MachineOverviewConfigMetadataMap = /*@__PURE__*/ S.Record(S.String, S.String);
@@ -1427,59 +1696,141 @@ export const OrgMachinesResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
1427
1696
  })).annotate({
1428
1697
  identifier: "OrgMachinesResponse",
1429
1698
  });
1430
- export const ListOrgVolumesRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
1431
- org_slug: S.String.pipe(T.Label()),
1432
- include_deleted: S.optional(S.Boolean.pipe(T.Query())),
1433
- region: S.optional(S.String.pipe(T.Query())),
1434
- state: S.optional(S.String.pipe(T.Query())),
1435
- summary: S.optional(S.Boolean.pipe(T.Query())),
1436
- updated_after: S.optional(S.String.pipe(T.Query())),
1437
- cursor: S.optional(S.String.pipe(T.Query())),
1438
- limit: S.optional(S.Number.pipe(T.Query())),
1439
- }).pipe(T.Http({ method: "GET", uri: "/orgs/{org_slug}/volumes", code: 200 }))).annotate({
1440
- identifier: "ListOrgVolumesRequest",
1699
+ export const ListMachineVersionsRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
1700
+ app_name: S.String.pipe(T.Label()),
1701
+ machine_id: S.String.pipe(T.Label()),
1702
+ }).pipe(T.Http({
1703
+ method: "GET",
1704
+ uri: "/v1/apps/{app_name}/machines/{machine_id}/versions",
1705
+ code: 200,
1706
+ }))).annotate({
1707
+ identifier: "ListMachineVersionsRequest",
1441
1708
  });
1442
- export const OrgVolumeHostStatus = /*@__PURE__*/ S.String;
1443
- export const OrgVolumeType = /*@__PURE__*/ S.String;
1444
- export const OrgVolume = /*@__PURE__*/ S.suspend(() => S.Struct({
1445
- app_name: S.optional(S.String),
1446
- attached_alloc_id: S.optional(S.String),
1447
- attached_machine_id: S.optional(S.String),
1448
- auto_backup_enabled: S.optional(S.Boolean),
1449
- block_size: S.optional(S.Number),
1450
- blocks: S.optional(S.Number),
1451
- blocks_avail: S.optional(S.Number),
1452
- blocks_free: S.optional(S.Number),
1453
- bytes_total: S.optional(S.Number),
1454
- bytes_used: S.optional(S.Number),
1709
+ export const MachineVersion = /*@__PURE__*/ S.suspend(() => S.Struct({
1710
+ user_config: S.optional(FlyMachineConfig),
1711
+ version: S.optional(S.String),
1712
+ })).annotate({ identifier: "MachineVersion" });
1713
+ export const ListMachineVersionsResponseBodyList = /*@__PURE__*/ S.Array(MachineVersion);
1714
+ export const ListMachineVersionsResponse = /*@__PURE__*/ S.suspend(() => ListMachineVersionsResponseBodyList.pipe(T.RawResponseRoot())).annotate({
1715
+ identifier: "ListMachineVersionsResponse",
1716
+ });
1717
+ export const ListPostgresRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
1718
+ org_slug: S.String.pipe(T.Query()),
1719
+ include_deleted: S.optional(S.Boolean.pipe(T.Query())),
1720
+ }).pipe(T.Http({ method: "GET", uri: "/v1/postgres", code: 200 }))).annotate({
1721
+ identifier: "ListPostgresRequest",
1722
+ });
1723
+ export const PostgresClusterSummaryAttachedAppsList = /*@__PURE__*/ S.Array(PostgresAttachedApp);
1724
+ export const PostgresClusterSummaryPlan = /*@__PURE__*/ S.String;
1725
+ export const PostgresClusterSummaryStatus = /*@__PURE__*/ S.String;
1726
+ export const PostgresClusterSummary = /*@__PURE__*/ S.suspend(() => S.Struct({
1727
+ attached_apps: S.optional(PostgresClusterSummaryAttachedAppsList),
1455
1728
  created_at: S.optional(S.String),
1456
- encrypted: S.optional(S.Boolean),
1457
- fstype: S.optional(S.String),
1458
- host_status: S.optional(OrgVolumeHostStatus),
1729
+ deleted_at: S.optional(S.String),
1459
1730
  id: S.optional(S.String),
1460
1731
  name: S.optional(S.String),
1732
+ plan: S.optional(PostgresClusterSummaryPlan),
1461
1733
  region: S.optional(S.String),
1462
- size_gb: S.optional(S.Number),
1463
- snapshot_retention: S.optional(S.Number),
1464
- state: S.optional(S.String),
1465
- type: S.optional(OrgVolumeType),
1466
- updated_at: S.optional(S.String),
1467
- zone: S.optional(S.String),
1468
- })).annotate({ identifier: "OrgVolume" });
1469
- export const OrgVolumesResponseVolumesList = /*@__PURE__*/ S.Array(OrgVolume);
1470
- export const OrgVolumesResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
1471
- last_updated_at: S.optional(S.String),
1472
- last_volume_id: S.optional(S.String),
1473
- next_cursor: S.optional(S.String),
1474
- volumes: S.optional(OrgVolumesResponseVolumesList),
1734
+ status: S.optional(PostgresClusterSummaryStatus),
1475
1735
  })).annotate({
1476
- identifier: "OrgVolumesResponse",
1736
+ identifier: "PostgresClusterSummary",
1737
+ });
1738
+ export const ListPostgresClustersResponseDataList = /*@__PURE__*/ S.Array(PostgresClusterSummary);
1739
+ export const ListPostgresClustersResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
1740
+ data: S.optional(ListPostgresClustersResponseDataList),
1741
+ })).annotate({
1742
+ identifier: "ListPostgresClustersResponse",
1743
+ });
1744
+ export const ListPostgresBackupsRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
1745
+ postgres_cluster_id: S.String.pipe(T.Label()),
1746
+ }).pipe(T.Http({
1747
+ method: "GET",
1748
+ uri: "/v1/postgres/{postgres_cluster_id}/backups",
1749
+ code: 200,
1750
+ }))).annotate({
1751
+ identifier: "ListPostgresBackupsRequest",
1752
+ });
1753
+ export const PostgresBackupType = /*@__PURE__*/ S.String;
1754
+ export const PostgresBackup = /*@__PURE__*/ S.suspend(() => S.Struct({
1755
+ finished_at: S.optional(S.String),
1756
+ id: S.optional(S.String),
1757
+ size_bytes: S.optional(S.Number),
1758
+ started_at: S.optional(S.String),
1759
+ status: S.optional(S.String),
1760
+ type: S.optional(PostgresBackupType),
1761
+ })).annotate({ identifier: "PostgresBackup" });
1762
+ export const ListPostgresBackupsResponseDataList = /*@__PURE__*/ S.Array(PostgresBackup);
1763
+ export const ListPostgresBackupsResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
1764
+ data: S.optional(ListPostgresBackupsResponseDataList),
1765
+ })).annotate({
1766
+ identifier: "ListPostgresBackupsResponse",
1767
+ });
1768
+ export const ListPostgresDatabasesRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
1769
+ postgres_cluster_id: S.String.pipe(T.Label()),
1770
+ }).pipe(T.Http({
1771
+ method: "GET",
1772
+ uri: "/v1/postgres/{postgres_cluster_id}/databases",
1773
+ code: 200,
1774
+ }))).annotate({
1775
+ identifier: "ListPostgresDatabasesRequest",
1776
+ });
1777
+ export const ListPostgresDatabasesResponseDataList = /*@__PURE__*/ S.Array(PostgresDatabase);
1778
+ export const ListPostgresDatabasesResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
1779
+ data: S.optional(ListPostgresDatabasesResponseDataList),
1780
+ })).annotate({
1781
+ identifier: "ListPostgresDatabasesResponse",
1782
+ });
1783
+ export const ListPostgresExtensionsRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
1784
+ postgres_cluster_id: S.String.pipe(T.Label()),
1785
+ database_name: S.String.pipe(T.Label()),
1786
+ }).pipe(T.Http({
1787
+ method: "GET",
1788
+ uri: "/v1/postgres/{postgres_cluster_id}/databases/{database_name}/extensions",
1789
+ code: 200,
1790
+ }))).annotate({
1791
+ identifier: "ListPostgresExtensionsRequest",
1792
+ });
1793
+ export const PostgresInstalledExtension = /*@__PURE__*/ S.suspend(() => S.Struct({
1794
+ schema: S.optional(S.String),
1795
+ version: S.optional(S.String),
1796
+ })).annotate({
1797
+ identifier: "PostgresInstalledExtension",
1798
+ });
1799
+ export const PostgresExtension = /*@__PURE__*/ S.suspend(() => S.Struct({
1800
+ default_version: S.optional(S.String),
1801
+ description: S.optional(S.String),
1802
+ installed: S.optional(PostgresInstalledExtension),
1803
+ name: S.optional(S.String),
1804
+ system: S.optional(S.Boolean),
1805
+ })).annotate({
1806
+ identifier: "PostgresExtension",
1807
+ });
1808
+ export const ListPostgresExtensionsResponseDataList = /*@__PURE__*/ S.Array(PostgresExtension);
1809
+ export const ListPostgresExtensionsResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
1810
+ data: S.optional(ListPostgresExtensionsResponseDataList),
1811
+ })).annotate({
1812
+ identifier: "ListPostgresExtensionsResponse",
1813
+ });
1814
+ export const ListPostgresUsersRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
1815
+ postgres_cluster_id: S.String.pipe(T.Label()),
1816
+ }).pipe(T.Http({
1817
+ method: "GET",
1818
+ uri: "/v1/postgres/{postgres_cluster_id}/users",
1819
+ code: 200,
1820
+ }))).annotate({
1821
+ identifier: "ListPostgresUsersRequest",
1822
+ });
1823
+ export const ListPostgresUsersResponseDataList = /*@__PURE__*/ S.Array(PostgresUser);
1824
+ export const ListPostgresUsersResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
1825
+ data: S.optional(ListPostgresUsersResponseDataList),
1826
+ })).annotate({
1827
+ identifier: "ListPostgresUsersResponse",
1477
1828
  });
1478
1829
  export const ListSecretKeysRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
1479
1830
  app_name: S.String.pipe(T.Label()),
1480
1831
  min_version: S.optional(S.String.pipe(T.Query())),
1481
1832
  types: S.optional(S.String.pipe(T.Query())),
1482
- }).pipe(T.Http({ method: "GET", uri: "/apps/{app_name}/secretkeys", code: 200 }))).annotate({
1833
+ }).pipe(T.Http({ method: "GET", uri: "/v1/apps/{app_name}/secretkeys", code: 200 }))).annotate({
1483
1834
  identifier: "ListSecretKeysRequest",
1484
1835
  });
1485
1836
  export const SecretKeysSecretKeysList = /*@__PURE__*/ S.Array(SecretKey);
@@ -1490,7 +1841,7 @@ export const ListSecretsRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
1490
1841
  app_name: S.String.pipe(T.Label()),
1491
1842
  min_version: S.optional(S.String.pipe(T.Query())),
1492
1843
  show_secrets: S.optional(S.Boolean.pipe(T.Query())),
1493
- }).pipe(T.Http({ method: "GET", uri: "/apps/{app_name}/secrets", code: 200 }))).annotate({
1844
+ }).pipe(T.Http({ method: "GET", uri: "/v1/apps/{app_name}/secrets", code: 200 }))).annotate({
1494
1845
  identifier: "ListSecretsRequest",
1495
1846
  });
1496
1847
  export const AppSecretsSecretsList = /*@__PURE__*/ S.Array(AppSecret);
@@ -1500,7 +1851,7 @@ export const AppSecrets = /*@__PURE__*/ S.suspend(() => S.Struct({
1500
1851
  export const ListVolumesRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
1501
1852
  app_name: S.String.pipe(T.Label()),
1502
1853
  summary: S.optional(S.Boolean.pipe(T.Query())),
1503
- }).pipe(T.Http({ method: "GET", uri: "/apps/{app_name}/volumes", code: 200 }))).annotate({
1854
+ }).pipe(T.Http({ method: "GET", uri: "/v1/apps/{app_name}/volumes", code: 200 }))).annotate({
1504
1855
  identifier: "ListVolumesRequest",
1505
1856
  });
1506
1857
  export const ListVolumesResponseBodyList = /*@__PURE__*/ S.Array(Volume);
@@ -1512,7 +1863,7 @@ export const ListVolumeSnapshotsRequest = /*@__PURE__*/ S.suspend(() => S.Struct
1512
1863
  volume_id: S.String.pipe(T.Label()),
1513
1864
  }).pipe(T.Http({
1514
1865
  method: "GET",
1515
- uri: "/apps/{app_name}/volumes/{volume_id}/snapshots",
1866
+ uri: "/v1/apps/{app_name}/volumes/{volume_id}/snapshots",
1516
1867
  code: 200,
1517
1868
  }))).annotate({
1518
1869
  identifier: "ListVolumeSnapshotsRequest",
@@ -1530,6 +1881,67 @@ export const ListVolumeSnapshotsResponseBodyList = /*@__PURE__*/ S.Array(VolumeS
1530
1881
  export const ListVolumeSnapshotsResponse = /*@__PURE__*/ S.suspend(() => ListVolumeSnapshotsResponseBodyList.pipe(T.RawResponseRoot())).annotate({
1531
1882
  identifier: "ListVolumeSnapshotsResponse",
1532
1883
  });
1884
+ export const ListVolumesOrgRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
1885
+ org_slug: S.String.pipe(T.Label()),
1886
+ include_deleted: S.optional(S.Boolean.pipe(T.Query())),
1887
+ region: S.optional(S.String.pipe(T.Query())),
1888
+ state: S.optional(S.String.pipe(T.Query())),
1889
+ summary: S.optional(S.Boolean.pipe(T.Query())),
1890
+ updated_after: S.optional(S.String.pipe(T.Query())),
1891
+ cursor: S.optional(S.String.pipe(T.Query())),
1892
+ limit: S.optional(S.Number.pipe(T.Query())),
1893
+ }).pipe(T.Http({ method: "GET", uri: "/v1/orgs/{org_slug}/volumes", code: 200 }))).annotate({
1894
+ identifier: "ListVolumesOrgRequest",
1895
+ });
1896
+ export const OrgVolumeHostStatus = /*@__PURE__*/ S.String;
1897
+ export const OrgVolumeType = /*@__PURE__*/ S.String;
1898
+ export const OrgVolume = /*@__PURE__*/ S.suspend(() => S.Struct({
1899
+ app_name: S.optional(S.String),
1900
+ attached_alloc_id: S.optional(S.String),
1901
+ attached_machine_id: S.optional(S.String),
1902
+ auto_backup_enabled: S.optional(S.Boolean),
1903
+ block_size: S.optional(S.Number),
1904
+ blocks: S.optional(S.Number),
1905
+ blocks_avail: S.optional(S.Number),
1906
+ blocks_free: S.optional(S.Number),
1907
+ bytes_total: S.optional(S.Number),
1908
+ bytes_used: S.optional(S.Number),
1909
+ created_at: S.optional(S.String),
1910
+ encrypted: S.optional(S.Boolean),
1911
+ fstype: S.optional(S.String),
1912
+ host_status: S.optional(OrgVolumeHostStatus),
1913
+ id: S.optional(S.String),
1914
+ name: S.optional(S.String),
1915
+ region: S.optional(S.String),
1916
+ size_gb: S.optional(S.Number),
1917
+ snapshot_retention: S.optional(S.Number),
1918
+ state: S.optional(S.String),
1919
+ type: S.optional(OrgVolumeType),
1920
+ updated_at: S.optional(S.String),
1921
+ zone: S.optional(S.String),
1922
+ })).annotate({ identifier: "OrgVolume" });
1923
+ export const OrgVolumesResponseVolumesList = /*@__PURE__*/ S.Array(OrgVolume);
1924
+ export const OrgVolumesResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
1925
+ last_updated_at: S.optional(S.String),
1926
+ last_volume_id: S.optional(S.String),
1927
+ next_cursor: S.optional(S.String),
1928
+ volumes: S.optional(OrgVolumesResponseVolumesList),
1929
+ })).annotate({
1930
+ identifier: "OrgVolumesResponse",
1931
+ });
1932
+ export const MachinesReleaseLeaseRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
1933
+ app_name: S.String.pipe(T.Label()),
1934
+ machine_id: S.String.pipe(T.Label()),
1935
+ }).pipe(T.Http({
1936
+ method: "DELETE",
1937
+ uri: "/v1/apps/{app_name}/machines/{machine_id}/lease",
1938
+ code: 200,
1939
+ }))).annotate({
1940
+ identifier: "MachinesReleaseLeaseRequest",
1941
+ });
1942
+ export const MachinesReleaseLeaseResponse = /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({
1943
+ identifier: "MachinesReleaseLeaseResponse",
1944
+ });
1533
1945
  export const PatchMachineMetadataRequestMetadataMap = /*@__PURE__*/ S.Record(S.String, S.String);
1534
1946
  export const PatchMachineMetadataRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
1535
1947
  app_name: S.String.pipe(T.Label()),
@@ -1539,7 +1951,7 @@ export const PatchMachineMetadataRequest = /*@__PURE__*/ S.suspend(() => S.Struc
1539
1951
  updated_at: S.optional(S.String),
1540
1952
  }).pipe(T.Http({
1541
1953
  method: "PATCH",
1542
- uri: "/apps/{app_name}/machines/{machine_id}/metadata",
1954
+ uri: "/v1/apps/{app_name}/machines/{machine_id}/metadata",
1543
1955
  code: 200,
1544
1956
  }))).annotate({
1545
1957
  identifier: "PatchMachineMetadataRequest",
@@ -1547,13 +1959,34 @@ export const PatchMachineMetadataRequest = /*@__PURE__*/ S.suspend(() => S.Struc
1547
1959
  export const PatchMachineMetadataResponse = /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({
1548
1960
  identifier: "PatchMachineMetadataResponse",
1549
1961
  });
1962
+ export const PostgresUsersCredentialsRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
1963
+ postgres_cluster_id: S.String.pipe(T.Label()),
1964
+ username: S.String.pipe(T.Label()),
1965
+ }).pipe(T.Http({
1966
+ method: "GET",
1967
+ uri: "/v1/postgres/{postgres_cluster_id}/users/{username}/credentials",
1968
+ code: 200,
1969
+ }))).annotate({
1970
+ identifier: "PostgresUsersCredentialsRequest",
1971
+ });
1972
+ export const PostgresUserCredentials = /*@__PURE__*/ S.suspend(() => S.Struct({
1973
+ password: S.optional(S.String.pipe(T.SensitiveValue({}))),
1974
+ username: S.optional(S.String),
1975
+ })).annotate({
1976
+ identifier: "PostgresUserCredentials",
1977
+ });
1978
+ export const GetPostgresUserCredentialsResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
1979
+ data: S.optional(PostgresUserCredentials),
1980
+ })).annotate({
1981
+ identifier: "GetPostgresUserCredentialsResponse",
1982
+ });
1550
1983
  export const ReclaimMachineMemoryRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
1551
1984
  app_name: S.String.pipe(T.Label()),
1552
1985
  machine_id: S.String.pipe(T.Label()),
1553
1986
  amount_mb: S.optional(S.Number),
1554
1987
  }).pipe(T.Http({
1555
1988
  method: "POST",
1556
- uri: "/apps/{app_name}/machines/{machine_id}/memory/reclaim",
1989
+ uri: "/v1/apps/{app_name}/machines/{machine_id}/memory/reclaim",
1557
1990
  code: 200,
1558
1991
  }))).annotate({
1559
1992
  identifier: "ReclaimMachineMemoryRequest",
@@ -1563,20 +1996,7 @@ export const MainReclaimMemoryResponse = /*@__PURE__*/ S.suspend(() => S.Struct(
1563
1996
  })).annotate({
1564
1997
  identifier: "MainReclaimMemoryResponse",
1565
1998
  });
1566
- export const ReleaseMachineLeaseRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
1567
- app_name: S.String.pipe(T.Label()),
1568
- machine_id: S.String.pipe(T.Label()),
1569
- }).pipe(T.Http({
1570
- method: "DELETE",
1571
- uri: "/apps/{app_name}/machines/{machine_id}/lease",
1572
- code: 200,
1573
- }))).annotate({
1574
- identifier: "ReleaseMachineLeaseRequest",
1575
- });
1576
- export const ReleaseMachineLeaseResponse = /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({
1577
- identifier: "ReleaseMachineLeaseResponse",
1578
- });
1579
- export const RequestKmsTokenRequest = /*@__PURE__*/ S.suspend(() => S.Struct({}).pipe(T.Http({ method: "POST", uri: "/tokens/kms", code: 200 }))).annotate({
1999
+ export const RequestKmsTokenRequest = /*@__PURE__*/ S.suspend(() => S.Struct({}).pipe(T.Http({ method: "POST", uri: "/v1/tokens/kms", code: 200 }))).annotate({
1580
2000
  identifier: "RequestKmsTokenRequest",
1581
2001
  });
1582
2002
  export const RequestKmsTokenResponse = /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({
@@ -1585,7 +2005,7 @@ export const RequestKmsTokenResponse = /*@__PURE__*/ S.suspend(() => S.Struct({}
1585
2005
  export const RequestOidcTokenRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
1586
2006
  aud: S.optional(S.String),
1587
2007
  aws_principal_tags: S.optional(S.Boolean),
1588
- }).pipe(T.Http({ method: "POST", uri: "/tokens/oidc", code: 200 }))).annotate({
2008
+ }).pipe(T.Http({ method: "POST", uri: "/v1/tokens/oidc", code: 200 }))).annotate({
1589
2009
  identifier: "RequestOidcTokenRequest",
1590
2010
  });
1591
2011
  export const RequestOidcTokenResponse = /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({
@@ -1599,7 +2019,7 @@ export const RestartMachineRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
1599
2019
  signal: S.optional(RestartMachineRequestSignal.pipe(T.Query())),
1600
2020
  }).pipe(T.Http({
1601
2021
  method: "POST",
1602
- uri: "/apps/{app_name}/machines/{machine_id}/restart",
2022
+ uri: "/v1/apps/{app_name}/machines/{machine_id}/restart",
1603
2023
  code: 200,
1604
2024
  }))).annotate({
1605
2025
  identifier: "RestartMachineRequest",
@@ -1607,13 +2027,41 @@ export const RestartMachineRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
1607
2027
  export const RestartMachineResponse = /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({
1608
2028
  identifier: "RestartMachineResponse",
1609
2029
  });
2030
+ export const RestorePostgresRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
2031
+ postgres_cluster_id: S.String.pipe(T.Label()),
2032
+ backup_id: S.optional(S.String),
2033
+ name: S.optional(S.String),
2034
+ pitr_time: S.optional(S.String),
2035
+ }).pipe(T.Http({
2036
+ method: "POST",
2037
+ uri: "/v1/postgres/{postgres_cluster_id}/restore",
2038
+ code: 200,
2039
+ }))).annotate({
2040
+ identifier: "RestorePostgresRequest",
2041
+ });
2042
+ export const RotatePostgresUserPasswordRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
2043
+ postgres_cluster_id: S.String.pipe(T.Label()),
2044
+ username: S.String.pipe(T.Label()),
2045
+ kill_sessions: S.optional(S.Boolean),
2046
+ }).pipe(T.Http({
2047
+ method: "POST",
2048
+ uri: "/v1/postgres/{postgres_cluster_id}/users/{username}/rotate_password",
2049
+ code: 200,
2050
+ }))).annotate({
2051
+ identifier: "RotatePostgresUserPasswordRequest",
2052
+ });
2053
+ export const RotatePostgresPasswordResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
2054
+ data: S.optional(PostgresUserCredentials),
2055
+ })).annotate({
2056
+ identifier: "RotatePostgresPasswordResponse",
2057
+ });
1610
2058
  export const SetMachineMemoryLimitRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
1611
2059
  app_name: S.String.pipe(T.Label()),
1612
2060
  machine_id: S.String.pipe(T.Label()),
1613
2061
  limit_mb: S.optional(S.Number),
1614
2062
  }).pipe(T.Http({
1615
2063
  method: "PUT",
1616
- uri: "/apps/{app_name}/machines/{machine_id}/memory",
2064
+ uri: "/v1/apps/{app_name}/machines/{machine_id}/memory",
1617
2065
  code: 200,
1618
2066
  }))).annotate({
1619
2067
  identifier: "SetMachineMemoryLimitRequest",
@@ -1626,7 +2074,7 @@ export const SetSecretKeyRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
1626
2074
  value: S.optional(SetSecretKeyRequestValueList),
1627
2075
  }).pipe(T.Http({
1628
2076
  method: "POST",
1629
- uri: "/apps/{app_name}/secretkeys/{secret_name}",
2077
+ uri: "/v1/apps/{app_name}/secretkeys/{secret_name}",
1630
2078
  code: 200,
1631
2079
  }))).annotate({
1632
2080
  identifier: "SetSecretKeyRequest",
@@ -1638,7 +2086,7 @@ export const SignalMachineRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
1638
2086
  signal: S.optional(SignalMachineRequestSignal),
1639
2087
  }).pipe(T.Http({
1640
2088
  method: "POST",
1641
- uri: "/apps/{app_name}/machines/{machine_id}/signal",
2089
+ uri: "/v1/apps/{app_name}/machines/{machine_id}/signal",
1642
2090
  code: 200,
1643
2091
  }))).annotate({
1644
2092
  identifier: "SignalMachineRequest",
@@ -1653,7 +2101,7 @@ export const SignSecretKeyRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
1653
2101
  plaintext: S.optional(S.String.pipe(T.SensitiveValue({}))),
1654
2102
  }).pipe(T.Http({
1655
2103
  method: "POST",
1656
- uri: "/apps/{app_name}/secretkeys/{secret_name}/sign",
2104
+ uri: "/v1/apps/{app_name}/secretkeys/{secret_name}/sign",
1657
2105
  code: 200,
1658
2106
  }))).annotate({
1659
2107
  identifier: "SignSecretKeyRequest",
@@ -1668,7 +2116,7 @@ export const StartMachineRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
1668
2116
  machine_id: S.String.pipe(T.Label()),
1669
2117
  }).pipe(T.Http({
1670
2118
  method: "POST",
1671
- uri: "/apps/{app_name}/machines/{machine_id}/start",
2119
+ uri: "/v1/apps/{app_name}/machines/{machine_id}/start",
1672
2120
  code: 200,
1673
2121
  }))).annotate({
1674
2122
  identifier: "StartMachineRequest",
@@ -1684,7 +2132,7 @@ export const StopMachineRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
1684
2132
  timeout: S.optional(S.String),
1685
2133
  }).pipe(T.Http({
1686
2134
  method: "POST",
1687
- uri: "/apps/{app_name}/machines/{machine_id}/stop",
2135
+ uri: "/v1/apps/{app_name}/machines/{machine_id}/stop",
1688
2136
  code: 200,
1689
2137
  }))).annotate({
1690
2138
  identifier: "StopMachineRequest",
@@ -1697,7 +2145,7 @@ export const SuspendMachineRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
1697
2145
  machine_id: S.String.pipe(T.Label()),
1698
2146
  }).pipe(T.Http({
1699
2147
  method: "POST",
1700
- uri: "/apps/{app_name}/machines/{machine_id}/suspend",
2148
+ uri: "/v1/apps/{app_name}/machines/{machine_id}/suspend",
1701
2149
  code: 200,
1702
2150
  }))).annotate({
1703
2151
  identifier: "SuspendMachineRequest",
@@ -1710,7 +2158,7 @@ export const UncordonMachineRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
1710
2158
  machine_id: S.String.pipe(T.Label()),
1711
2159
  }).pipe(T.Http({
1712
2160
  method: "POST",
1713
- uri: "/apps/{app_name}/machines/{machine_id}/uncordon",
2161
+ uri: "/v1/apps/{app_name}/machines/{machine_id}/uncordon",
1714
2162
  code: 200,
1715
2163
  }))).annotate({
1716
2164
  identifier: "UncordonMachineRequest",
@@ -1732,7 +2180,7 @@ export const UpdateMachineRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
1732
2180
  skip_service_registration: S.optional(S.Boolean),
1733
2181
  }).pipe(T.Http({
1734
2182
  method: "POST",
1735
- uri: "/apps/{app_name}/machines/{machine_id}",
2183
+ uri: "/v1/apps/{app_name}/machines/{machine_id}",
1736
2184
  code: 200,
1737
2185
  }))).annotate({
1738
2186
  identifier: "UpdateMachineRequest",
@@ -1746,7 +2194,7 @@ export const UpdateMachineMetadataRequest = /*@__PURE__*/ S.suspend(() => S.Stru
1746
2194
  updated_at: S.optional(S.String),
1747
2195
  }).pipe(T.Http({
1748
2196
  method: "PUT",
1749
- uri: "/apps/{app_name}/machines/{machine_id}/metadata",
2197
+ uri: "/v1/apps/{app_name}/machines/{machine_id}/metadata",
1750
2198
  code: 200,
1751
2199
  }))).annotate({
1752
2200
  identifier: "UpdateMachineMetadataRequest",
@@ -1754,11 +2202,26 @@ export const UpdateMachineMetadataRequest = /*@__PURE__*/ S.suspend(() => S.Stru
1754
2202
  export const UpdateMachineMetadataResponse = /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({
1755
2203
  identifier: "UpdateMachineMetadataResponse",
1756
2204
  });
2205
+ export const UpdatePostgresUserRoleRequestRole = /*@__PURE__*/ S.String;
2206
+ export const UpdatePostgresUserRoleRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
2207
+ postgres_cluster_id: S.String.pipe(T.Label()),
2208
+ username: S.String.pipe(T.Label()),
2209
+ role: UpdatePostgresUserRoleRequestRole,
2210
+ }).pipe(T.Http({
2211
+ method: "PATCH",
2212
+ uri: "/v1/postgres/{postgres_cluster_id}/users/{username}",
2213
+ code: 200,
2214
+ }))).annotate({
2215
+ identifier: "UpdatePostgresUserRoleRequest",
2216
+ });
2217
+ export const UpdatePostgresUserRoleResponse = /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({
2218
+ identifier: "UpdatePostgresUserRoleResponse",
2219
+ });
1757
2220
  export const UpdateSecretsRequestValuesMap = /*@__PURE__*/ S.Record(S.String, S.String);
1758
2221
  export const UpdateSecretsRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
1759
2222
  app_name: S.String.pipe(T.Label()),
1760
2223
  values: S.optional(UpdateSecretsRequestValuesMap),
1761
- }).pipe(T.Http({ method: "POST", uri: "/apps/{app_name}/secrets", code: 200 }))).annotate({
2224
+ }).pipe(T.Http({ method: "POST", uri: "/v1/apps/{app_name}/secrets", code: 200 }))).annotate({
1762
2225
  identifier: "UpdateSecretsRequest",
1763
2226
  });
1764
2227
  export const AppSecretsUpdateRespSecretsList = /*@__PURE__*/ S.Array(AppSecret);
@@ -1776,7 +2239,7 @@ export const UpdateVolumeRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
1776
2239
  snapshot_retention: S.optional(S.Number),
1777
2240
  }).pipe(T.Http({
1778
2241
  method: "PUT",
1779
- uri: "/apps/{app_name}/volumes/{volume_id}",
2242
+ uri: "/v1/apps/{app_name}/volumes/{volume_id}",
1780
2243
  code: 200,
1781
2244
  }))).annotate({
1782
2245
  identifier: "UpdateVolumeRequest",
@@ -1789,7 +2252,7 @@ export const UpsertMachineMetadataRequest = /*@__PURE__*/ S.suspend(() => S.Stru
1789
2252
  value: S.optional(S.String),
1790
2253
  }).pipe(T.Http({
1791
2254
  method: "POST",
1792
- uri: "/apps/{app_name}/machines/{machine_id}/metadata/{key}",
2255
+ uri: "/v1/apps/{app_name}/machines/{machine_id}/metadata/{key}",
1793
2256
  code: 200,
1794
2257
  }))).annotate({
1795
2258
  identifier: "UpsertMachineMetadataRequest",
@@ -1805,7 +2268,7 @@ export const VerifySecretKeyRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
1805
2268
  signature: S.optional(S.String),
1806
2269
  }).pipe(T.Http({
1807
2270
  method: "POST",
1808
- uri: "/apps/{app_name}/secretkeys/{secret_name}/verify",
2271
+ uri: "/v1/apps/{app_name}/secretkeys/{secret_name}/verify",
1809
2272
  code: 200,
1810
2273
  }))).annotate({
1811
2274
  identifier: "VerifySecretKeyRequest",
@@ -1824,7 +2287,7 @@ export const WaitMachineRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
1824
2287
  state: S.optional(WaitMachineRequestState.pipe(T.Query())),
1825
2288
  }).pipe(T.Http({
1826
2289
  method: "GET",
1827
- uri: "/apps/{app_name}/machines/{machine_id}/wait",
2290
+ uri: "/v1/apps/{app_name}/machines/{machine_id}/wait",
1828
2291
  code: 200,
1829
2292
  }))).annotate({
1830
2293
  identifier: "WaitMachineRequest",
@@ -1904,7 +2367,7 @@ export const createAppDeployToken = /*@__PURE__*/ API.make(() => ({
1904
2367
  /** Assign new IP address to app */
1905
2368
  export const createAppIPAssignment = /*@__PURE__*/ API.make(() => ({
1906
2369
  input: CreateAppIPAssignmentRequest,
1907
- output: IPAssignment,
2370
+ output: AssignIPResponse,
1908
2371
  errors: [BadRequest, Forbidden, NotFound, Conflict],
1909
2372
  protocol: FlyIoProtocol,
1910
2373
  retry: Retry.Retry,
@@ -1925,6 +2388,46 @@ export const createMachineLease = /*@__PURE__*/ API.make(() => ({
1925
2388
  protocol: FlyIoProtocol,
1926
2389
  retry: Retry.Retry,
1927
2390
  }));
2391
+ /** 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. */
2392
+ export const createPostgres = /*@__PURE__*/ API.make(() => ({
2393
+ input: CreatePostgresRequest,
2394
+ output: ShowPostgresClusterResponse,
2395
+ errors: [BadRequest, NotFound, UnprocessableEntity],
2396
+ protocol: FlyIoProtocol,
2397
+ retry: Retry.Retry,
2398
+ }));
2399
+ /** Attach Cluster to App Attach a specific cluster to a Fly app. The attachment is created if it does not already exist. */
2400
+ export const createPostgresAttachment = /*@__PURE__*/ API.make(() => ({
2401
+ input: CreatePostgresAttachmentRequest,
2402
+ output: CreatePostgresAttachmentResponse,
2403
+ errors: [NotFound],
2404
+ protocol: FlyIoProtocol,
2405
+ retry: Retry.Retry,
2406
+ }));
2407
+ /** Create Backup Create a backup for a specific cluster. The backup runs asynchronously and is rejected if one is already in progress. */
2408
+ export const createPostgresBackup = /*@__PURE__*/ API.make(() => ({
2409
+ input: CreatePostgresBackupRequest,
2410
+ output: CreatePostgresBackupResponse,
2411
+ errors: [NotFound, Conflict],
2412
+ protocol: FlyIoProtocol,
2413
+ retry: Retry.Retry,
2414
+ }));
2415
+ /** Create Database Create a database within a specific cluster. */
2416
+ export const createPostgresDatabase = /*@__PURE__*/ API.make(() => ({
2417
+ input: CreatePostgresDatabaseRequest,
2418
+ output: PostgresDatabaseResponse,
2419
+ errors: [BadRequest, NotFound, UnprocessableEntity],
2420
+ protocol: FlyIoProtocol,
2421
+ retry: Retry.Retry,
2422
+ }));
2423
+ /** Create User Create a Postgres user within a specific cluster. Fetch the generated password from the credentials endpoint. */
2424
+ export const createPostgresUser = /*@__PURE__*/ API.make(() => ({
2425
+ input: CreatePostgresUserRequest,
2426
+ output: CreatePostgresUserResponse,
2427
+ errors: [BadRequest, NotFound, Conflict, UnprocessableEntity],
2428
+ protocol: FlyIoProtocol,
2429
+ retry: Retry.Retry,
2430
+ }));
1928
2431
  /** Create or update Secret */
1929
2432
  export const createSecret = /*@__PURE__*/ API.make(() => ({
1930
2433
  input: CreateSecretRequest,
@@ -2013,6 +2516,38 @@ export const deleteMachineMetadata = /*@__PURE__*/ API.make(() => ({
2013
2516
  protocol: FlyIoProtocol,
2014
2517
  retry: Retry.Retry,
2015
2518
  }));
2519
+ /** Delete Postgres Cluster Delete a Managed Postgres cluster. The cluster is marked for deletion and removed asynchronously. */
2520
+ export const deletePostgres = /*@__PURE__*/ API.make(() => ({
2521
+ input: DeletePostgresRequest,
2522
+ output: DeletePostgresResponse,
2523
+ errors: [NotFound],
2524
+ protocol: FlyIoProtocol,
2525
+ retry: Retry.Retry,
2526
+ }));
2527
+ /** Detach Cluster from App Detach a specific cluster from a Fly app. */
2528
+ export const deletePostgresAttachment = /*@__PURE__*/ API.make(() => ({
2529
+ input: DeletePostgresAttachmentRequest,
2530
+ output: DeletePostgresAttachmentResponse,
2531
+ errors: [NotFound],
2532
+ protocol: FlyIoProtocol,
2533
+ retry: Retry.Retry,
2534
+ }));
2535
+ /** Drop Database Delete a specific database within a cluster, along with objects that depend on it. */
2536
+ export const deletePostgresDatabase = /*@__PURE__*/ API.make(() => ({
2537
+ input: DeletePostgresDatabaseRequest,
2538
+ output: PostgresDatabaseResponse,
2539
+ errors: [BadRequest, NotFound],
2540
+ protocol: FlyIoProtocol,
2541
+ retry: Retry.Retry,
2542
+ }));
2543
+ /** Delete User Delete a specific Postgres user within a cluster. */
2544
+ export const deletePostgresUser = /*@__PURE__*/ API.make(() => ({
2545
+ input: DeletePostgresUserRequest,
2546
+ output: DeletePostgresUserResponse,
2547
+ errors: [BadRequest, NotFound],
2548
+ protocol: FlyIoProtocol,
2549
+ retry: Retry.Retry,
2550
+ }));
2016
2551
  /** Delete an app secret */
2017
2552
  export const deleteSecret = /*@__PURE__*/ API.make(() => ({
2018
2553
  input: DeleteSecretRequest,
@@ -2037,6 +2572,22 @@ export const deleteVolume = /*@__PURE__*/ API.make(() => ({
2037
2572
  protocol: FlyIoProtocol,
2038
2573
  retry: Retry.Retry,
2039
2574
  }));
2575
+ /** Disable Extension Disable a specific Postgres extension within a database, optionally dropping objects that depend on it. System extensions cannot be disabled. */
2576
+ export const disablePostgresExtension = /*@__PURE__*/ API.make(() => ({
2577
+ input: DisablePostgresExtensionRequest,
2578
+ output: DisablePostgresExtensionResponse,
2579
+ errors: [BadRequest, NotFound, UnprocessableEntity],
2580
+ protocol: FlyIoProtocol,
2581
+ retry: Retry.Retry,
2582
+ }));
2583
+ /** Enable Extension Enable a Postgres extension within a specific database. PostGIS extensions require a PostGIS-enabled cluster. */
2584
+ export const enablePostgresExtension = /*@__PURE__*/ API.make(() => ({
2585
+ input: EnablePostgresExtensionRequest,
2586
+ output: EnablePostgresExtensionResponse,
2587
+ errors: [BadRequest, NotFound, Conflict, UnprocessableEntity],
2588
+ protocol: FlyIoProtocol,
2589
+ retry: Retry.Retry,
2590
+ }));
2040
2591
  /** Encrypt with a secret key */
2041
2592
  export const encryptSecretKey = /*@__PURE__*/ API.make(() => ({
2042
2593
  input: EncryptSecretKeyRequest,
@@ -2061,6 +2612,14 @@ export const extendVolume = /*@__PURE__*/ API.make(() => ({
2061
2612
  protocol: FlyIoProtocol,
2062
2613
  retry: Retry.Retry,
2063
2614
  }));
2615
+ /** Fork Cluster to New Cluster Fork a ready Managed Postgres cluster into a new cluster that inherits the source's settings. The source cluster is left unchanged, and the fork is provisioned asynchronously. */
2616
+ export const forkPostgres = /*@__PURE__*/ API.make(() => ({
2617
+ input: ForkPostgresRequest,
2618
+ output: ShowPostgresClusterResponse,
2619
+ errors: [BadRequest, NotFound, Conflict, UnprocessableEntity],
2620
+ protocol: FlyIoProtocol,
2621
+ retry: Retry.Retry,
2622
+ }));
2064
2623
  /** Generate a random secret key */
2065
2624
  export const generateSecretKey = /*@__PURE__*/ API.make(() => ({
2066
2625
  input: GenerateSecretKeyRequest,
@@ -2089,7 +2648,7 @@ export const getAppCertificate = /*@__PURE__*/ API.make(() => ({
2089
2648
  export const getCurrentToken = /*@__PURE__*/ API.make(() => ({
2090
2649
  input: GetCurrentTokenRequest,
2091
2650
  output: CurrentTokenResponse,
2092
- errors: [],
2651
+ errors: [Forbidden],
2093
2652
  protocol: FlyIoProtocol,
2094
2653
  retry: Retry.Retry,
2095
2654
  }));
@@ -2141,6 +2700,14 @@ export const getPlacements = /*@__PURE__*/ API.make(() => ({
2141
2700
  protocol: FlyIoProtocol,
2142
2701
  retry: Retry.Retry,
2143
2702
  }));
2703
+ /** Get Postgres Cluster Get details of a specific Managed Postgres cluster. */
2704
+ export const getPostgres = /*@__PURE__*/ API.make(() => ({
2705
+ input: GetPostgresRequest,
2706
+ output: ShowPostgresClusterResponse,
2707
+ errors: [NotFound],
2708
+ protocol: FlyIoProtocol,
2709
+ retry: Retry.Retry,
2710
+ }));
2144
2711
  /** Get Regions List all regions on the platform with their details. */
2145
2712
  export const getRegions = /*@__PURE__*/ API.make(() => ({
2146
2713
  input: GetRegionsRequest,
@@ -2221,6 +2788,14 @@ export const listMachines = /*@__PURE__*/ API.make(() => ({
2221
2788
  protocol: FlyIoProtocol,
2222
2789
  retry: Retry.Retry,
2223
2790
  }));
2791
+ /** List All Machines List all Machines associated with a specific organization. Machines are sorted by their `updated_at` timestamps, oldest to newest. This API call represents "a point in time". Recent machine changes, including creations and destructions, may take time to propagate. When polling with `updated_after`, offset your timestamps to catch late-arriving events. */
2792
+ export const listMachinesOrg = /*@__PURE__*/ API.make(() => ({
2793
+ input: ListMachinesOrgRequest,
2794
+ output: OrgMachinesResponse,
2795
+ errors: [Forbidden, NotFound],
2796
+ protocol: FlyIoProtocol,
2797
+ retry: Retry.Retry,
2798
+ }));
2224
2799
  /** List Versions List all versions of the configuration for a specific Machine within an app. */
2225
2800
  export const listMachineVersions = /*@__PURE__*/ API.make(() => ({
2226
2801
  input: ListMachineVersionsRequest,
@@ -2229,19 +2804,43 @@ export const listMachineVersions = /*@__PURE__*/ API.make(() => ({
2229
2804
  protocol: FlyIoProtocol,
2230
2805
  retry: Retry.Retry,
2231
2806
  }));
2232
- /** List All Machines List all Machines associated with a specific organization. Machines are sorted by their `updated_at` timestamps, oldest to newest. This API call represents "a point in time". Recent machine changes, including creations and destructions, may take time to propagate. When polling with `updated_after`, offset your timestamps to catch late-arriving events. */
2233
- export const listOrgMachines = /*@__PURE__*/ API.make(() => ({
2234
- input: ListOrgMachinesRequest,
2235
- output: OrgMachinesResponse,
2236
- errors: [Forbidden, NotFound],
2807
+ /** List Postgres Clusters List Managed Postgres clusters for an organization. */
2808
+ export const listPostgres = /*@__PURE__*/ API.make(() => ({
2809
+ input: ListPostgresRequest,
2810
+ output: ListPostgresClustersResponse,
2811
+ errors: [NotFound, UnprocessableEntity],
2237
2812
  protocol: FlyIoProtocol,
2238
2813
  retry: Retry.Retry,
2239
2814
  }));
2240
- /** List All Volumes List all volumes for an organization with optional filters and cursor-based pagination. */
2241
- export const listOrgVolumes = /*@__PURE__*/ API.make(() => ({
2242
- input: ListOrgVolumesRequest,
2243
- output: OrgVolumesResponse,
2244
- errors: [],
2815
+ /** List Backups List all backups associated with a specific cluster. */
2816
+ export const listPostgresBackups = /*@__PURE__*/ API.make(() => ({
2817
+ input: ListPostgresBackupsRequest,
2818
+ output: ListPostgresBackupsResponse,
2819
+ errors: [NotFound],
2820
+ protocol: FlyIoProtocol,
2821
+ retry: Retry.Retry,
2822
+ }));
2823
+ /** List Databases List all databases within a specific cluster. */
2824
+ export const listPostgresDatabases = /*@__PURE__*/ API.make(() => ({
2825
+ input: ListPostgresDatabasesRequest,
2826
+ output: ListPostgresDatabasesResponse,
2827
+ errors: [NotFound],
2828
+ protocol: FlyIoProtocol,
2829
+ retry: Retry.Retry,
2830
+ }));
2831
+ /** List Extensions List all extensions available within a specific database, indicating which are installed. */
2832
+ export const listPostgresExtensions = /*@__PURE__*/ API.make(() => ({
2833
+ input: ListPostgresExtensionsRequest,
2834
+ output: ListPostgresExtensionsResponse,
2835
+ errors: [BadRequest, NotFound],
2836
+ protocol: FlyIoProtocol,
2837
+ retry: Retry.Retry,
2838
+ }));
2839
+ /** List Users List all Postgres users within a specific cluster. */
2840
+ export const listPostgresUsers = /*@__PURE__*/ API.make(() => ({
2841
+ input: ListPostgresUsersRequest,
2842
+ output: ListPostgresUsersResponse,
2843
+ errors: [NotFound],
2245
2844
  protocol: FlyIoProtocol,
2246
2845
  retry: Retry.Retry,
2247
2846
  }));
@@ -2277,6 +2876,22 @@ export const listVolumeSnapshots = /*@__PURE__*/ API.make(() => ({
2277
2876
  protocol: FlyIoProtocol,
2278
2877
  retry: Retry.Retry,
2279
2878
  }));
2879
+ /** List All Volumes List all volumes for an organization with optional filters and cursor-based pagination. */
2880
+ export const listVolumesOrg = /*@__PURE__*/ API.make(() => ({
2881
+ input: ListVolumesOrgRequest,
2882
+ output: OrgVolumesResponse,
2883
+ errors: [],
2884
+ protocol: FlyIoProtocol,
2885
+ retry: Retry.Retry,
2886
+ }));
2887
+ /** 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. */
2888
+ export const machinesReleaseLease = /*@__PURE__*/ API.make(() => ({
2889
+ input: MachinesReleaseLeaseRequest,
2890
+ output: MachinesReleaseLeaseResponse,
2891
+ errors: [Forbidden, NotFound],
2892
+ protocol: FlyIoProtocol,
2893
+ retry: Retry.Retry,
2894
+ }));
2280
2895
  /** 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. */
2281
2896
  export const patchMachineMetadata = /*@__PURE__*/ API.make(() => ({
2282
2897
  input: PatchMachineMetadataRequest,
@@ -2285,6 +2900,14 @@ export const patchMachineMetadata = /*@__PURE__*/ API.make(() => ({
2285
2900
  protocol: FlyIoProtocol,
2286
2901
  retry: Retry.Retry,
2287
2902
  }));
2903
+ /** Get User Credentials Get the connection credentials for a specific Postgres user within a cluster. */
2904
+ export const postgresUsersCredentials = /*@__PURE__*/ API.make(() => ({
2905
+ input: PostgresUsersCredentialsRequest,
2906
+ output: GetPostgresUserCredentialsResponse,
2907
+ errors: [BadRequest, NotFound],
2908
+ protocol: FlyIoProtocol,
2909
+ retry: Retry.Retry,
2910
+ }));
2288
2911
  /** Reclaim Machine Memory Trigger the balloon device to reclaim memory from a machine */
2289
2912
  export const reclaimMachineMemory = /*@__PURE__*/ API.make(() => ({
2290
2913
  input: ReclaimMachineMemoryRequest,
@@ -2293,14 +2916,6 @@ export const reclaimMachineMemory = /*@__PURE__*/ API.make(() => ({
2293
2916
  protocol: FlyIoProtocol,
2294
2917
  retry: Retry.Retry,
2295
2918
  }));
2296
- /** 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. */
2297
- export const releaseMachineLease = /*@__PURE__*/ API.make(() => ({
2298
- input: ReleaseMachineLeaseRequest,
2299
- output: ReleaseMachineLeaseResponse,
2300
- errors: [Forbidden, NotFound],
2301
- protocol: FlyIoProtocol,
2302
- retry: Retry.Retry,
2303
- }));
2304
2919
  /** 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. */
2305
2920
  export const requestKmsToken = /*@__PURE__*/ API.make(() => ({
2306
2921
  input: RequestKmsTokenRequest,
@@ -2325,6 +2940,22 @@ export const restartMachine = /*@__PURE__*/ API.make(() => ({
2325
2940
  protocol: FlyIoProtocol,
2326
2941
  retry: Retry.Retry,
2327
2942
  }));
2943
+ /** Restore Backup or Point in Time to New Cluster Restore a backup, or a point in time within the cluster's PITR recovery window, into a new Managed Postgres cluster. The source cluster is left unchanged, and a new cluster is provisioned asynchronously. */
2944
+ export const restorePostgres = /*@__PURE__*/ API.make(() => ({
2945
+ input: RestorePostgresRequest,
2946
+ output: ShowPostgresClusterResponse,
2947
+ errors: [BadRequest, NotFound, UnprocessableEntity],
2948
+ protocol: FlyIoProtocol,
2949
+ retry: Retry.Retry,
2950
+ }));
2951
+ /** Rotate User Password Rotate a specific Postgres user's password within a cluster, optionally terminating the user's existing sessions. */
2952
+ export const rotatePostgresUserPassword = /*@__PURE__*/ API.make(() => ({
2953
+ input: RotatePostgresUserPasswordRequest,
2954
+ output: RotatePostgresPasswordResponse,
2955
+ errors: [BadRequest, NotFound, UnprocessableEntity],
2956
+ protocol: FlyIoProtocol,
2957
+ retry: Retry.Retry,
2958
+ }));
2328
2959
  /** Set Machine Memory Limit Set the memory limit for a machine using the balloon device */
2329
2960
  export const setMachineMemoryLimit = /*@__PURE__*/ API.make(() => ({
2330
2961
  input: SetMachineMemoryLimitRequest,
@@ -2405,6 +3036,14 @@ export const updateMachineMetadata = /*@__PURE__*/ API.make(() => ({
2405
3036
  protocol: FlyIoProtocol,
2406
3037
  retry: Retry.Retry,
2407
3038
  }));
3039
+ /** Update User Role Update a specific Postgres user's role within a cluster. */
3040
+ export const updatePostgresUserRole = /*@__PURE__*/ API.make(() => ({
3041
+ input: UpdatePostgresUserRoleRequest,
3042
+ output: UpdatePostgresUserRoleResponse,
3043
+ errors: [BadRequest, NotFound, UnprocessableEntity],
3044
+ protocol: FlyIoProtocol,
3045
+ retry: Retry.Retry,
3046
+ }));
2408
3047
  /** Update app secrets belonging to an app */
2409
3048
  export const updateSecrets = /*@__PURE__*/ API.make(() => ({
2410
3049
  input: UpdateSecretsRequest,