@distilled.cloud/fly-io 1.0.0-rc.7 → 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.
@@ -25,7 +25,9 @@ export interface AuthenticateTokenRequest {
25
25
  export const AuthenticateTokenRequest = /*@__PURE__*/ S.suspend(() =>
26
26
  S.Struct({
27
27
  header: S.optional(S.String),
28
- }).pipe(T.Http({ method: "POST", uri: "/tokens/authenticate", code: 200 })),
28
+ }).pipe(
29
+ T.Http({ method: "POST", uri: "/v1/tokens/authenticate", code: 200 }),
30
+ ),
29
31
  ).annotate({
30
32
  identifier: "AuthenticateTokenRequest",
31
33
  }) as any as S.Schema<AuthenticateTokenRequest>;
@@ -165,7 +167,7 @@ export const AuthorizeTokenRequest = /*@__PURE__*/ S.suspend(() =>
165
167
  S.Struct({
166
168
  access: S.optional(MainTokenAccess),
167
169
  header: S.optional(S.String),
168
- }).pipe(T.Http({ method: "POST", uri: "/tokens/authorize", code: 200 })),
170
+ }).pipe(T.Http({ method: "POST", uri: "/v1/tokens/authorize", code: 200 })),
169
171
  ).annotate({
170
172
  identifier: "AuthorizeTokenRequest",
171
173
  }) as any as S.Schema<AuthorizeTokenRequest>;
@@ -238,7 +240,7 @@ export const CheckAppCertificateRequest = /*@__PURE__*/ S.suspend(() =>
238
240
  }).pipe(
239
241
  T.Http({
240
242
  method: "POST",
241
- uri: "/apps/{app_name}/certificates/{hostname}/check",
243
+ uri: "/v1/apps/{app_name}/certificates/{hostname}/check",
242
244
  code: 200,
243
245
  }),
244
246
  ),
@@ -485,7 +487,7 @@ export const CordonMachineRequest = /*@__PURE__*/ S.suspend(() =>
485
487
  }).pipe(
486
488
  T.Http({
487
489
  method: "POST",
488
- uri: "/apps/{app_name}/machines/{machine_id}/cordon",
490
+ uri: "/v1/apps/{app_name}/machines/{machine_id}/cordon",
489
491
  code: 200,
490
492
  }),
491
493
  ),
@@ -512,7 +514,7 @@ export const CreateAppRequest = /*@__PURE__*/ S.suspend(() =>
512
514
  name: S.optional(S.String),
513
515
  network: S.optional(S.String),
514
516
  org_slug: S.optional(S.String),
515
- }).pipe(T.Http({ method: "POST", uri: "/apps", code: 200 })),
517
+ }).pipe(T.Http({ method: "POST", uri: "/v1/apps", code: 200 })),
516
518
  ).annotate({
517
519
  identifier: "CreateAppRequest",
518
520
  }) as any as S.Schema<CreateAppRequest>;
@@ -536,7 +538,7 @@ export const CreateAppAcmeCertificateRequest = /*@__PURE__*/ S.suspend(() =>
536
538
  }).pipe(
537
539
  T.Http({
538
540
  method: "POST",
539
- uri: "/apps/{app_name}/certificates/acme",
541
+ uri: "/v1/apps/{app_name}/certificates/acme",
540
542
  code: 200,
541
543
  }),
542
544
  ),
@@ -600,7 +602,7 @@ export const CreateAppCustomCertificateRequest = /*@__PURE__*/ S.suspend(() =>
600
602
  }).pipe(
601
603
  T.Http({
602
604
  method: "POST",
603
- uri: "/apps/{app_name}/certificates/custom",
605
+ uri: "/v1/apps/{app_name}/certificates/custom",
604
606
  code: 200,
605
607
  }),
606
608
  ),
@@ -618,7 +620,11 @@ export const CreateAppDeployTokenRequest = /*@__PURE__*/ S.suspend(() =>
618
620
  app_name: S.String.pipe(T.Label()),
619
621
  expiry: S.optional(S.String),
620
622
  }).pipe(
621
- T.Http({ method: "POST", uri: "/apps/{app_name}/deploy_token", code: 200 }),
623
+ T.Http({
624
+ method: "POST",
625
+ uri: "/v1/apps/{app_name}/deploy_token",
626
+ code: 200,
627
+ }),
622
628
  ),
623
629
  ).annotate({
624
630
  identifier: "CreateAppDeployTokenRequest",
@@ -635,6 +641,17 @@ export const CreateAppDeployTokenResponse = /*@__PURE__*/ S.suspend(() =>
635
641
  identifier: "CreateAppDeployTokenResponse",
636
642
  }) as any as S.Schema<CreateAppDeployTokenResponse>;
637
643
 
644
+ /** Type of IP address to allocate. "egress-pair" allocates both v4 and v6 egress IP addresses (recommended when using egress IPs). */
645
+ export type IPAssignmentType =
646
+ | "v4"
647
+ | "v6"
648
+ | "shared_v4"
649
+ | "private_v6"
650
+ | "egress_v4"
651
+ | "egress_v6"
652
+ | "egress_pair";
653
+ export const IPAssignmentType = /*@__PURE__*/ S.String;
654
+
638
655
  export interface CreateAppIPAssignmentRequest {
639
656
  /** Fly App Name */
640
657
  app_name: string;
@@ -642,7 +659,7 @@ export interface CreateAppIPAssignmentRequest {
642
659
  org_slug?: string;
643
660
  region?: string;
644
661
  service_name?: string;
645
- type?: string;
662
+ type?: IPAssignmentType | (string & {});
646
663
  }
647
664
  export const CreateAppIPAssignmentRequest = /*@__PURE__*/ S.suspend(() =>
648
665
  S.Struct({
@@ -651,11 +668,11 @@ export const CreateAppIPAssignmentRequest = /*@__PURE__*/ S.suspend(() =>
651
668
  org_slug: S.optional(S.String),
652
669
  region: S.optional(S.String),
653
670
  service_name: S.optional(S.String),
654
- type: S.optional(S.String),
671
+ type: S.optional(IPAssignmentType),
655
672
  }).pipe(
656
673
  T.Http({
657
674
  method: "POST",
658
- uri: "/apps/{app_name}/ip_assignments",
675
+ uri: "/v1/apps/{app_name}/ip_assignments",
659
676
  code: 200,
660
677
  }),
661
678
  ),
@@ -663,24 +680,40 @@ export const CreateAppIPAssignmentRequest = /*@__PURE__*/ S.suspend(() =>
663
680
  identifier: "CreateAppIPAssignmentRequest",
664
681
  }) as any as S.Schema<CreateAppIPAssignmentRequest>;
665
682
 
666
- export interface IPAssignment {
683
+ export interface IPPair {
684
+ v4?: string;
685
+ v6?: string;
686
+ }
687
+ export const IPPair = /*@__PURE__*/ S.suspend(() =>
688
+ S.Struct({
689
+ v4: S.optional(S.String),
690
+ v6: S.optional(S.String),
691
+ }),
692
+ ).annotate({ identifier: "IPPair" }) as any as S.Schema<IPPair>;
693
+
694
+ export interface AssignIPResponse {
667
695
  created_at?: string;
696
+ egress?: boolean;
668
697
  ip?: string;
698
+ /** ip_pair is returned when "egress-pair" IP type is requested; in this case, ip is null. */
699
+ ip_pair?: IPPair;
669
700
  region?: string;
670
701
  service_name?: string;
671
702
  shared?: boolean;
672
- type?: string;
673
703
  }
674
- export const IPAssignment = /*@__PURE__*/ S.suspend(() =>
704
+ export const AssignIPResponse = /*@__PURE__*/ S.suspend(() =>
675
705
  S.Struct({
676
706
  created_at: S.optional(S.String),
707
+ egress: S.optional(S.Boolean),
677
708
  ip: S.optional(S.String),
709
+ ip_pair: S.optional(IPPair),
678
710
  region: S.optional(S.String),
679
711
  service_name: S.optional(S.String),
680
712
  shared: S.optional(S.Boolean),
681
- type: S.optional(S.String),
682
713
  }),
683
- ).annotate({ identifier: "IPAssignment" }) as any as S.Schema<IPAssignment>;
714
+ ).annotate({
715
+ identifier: "AssignIPResponse",
716
+ }) as any as S.Schema<AssignIPResponse>;
684
717
 
685
718
  export interface FlyMachineCacheDrive {
686
719
  size_mb?: number;
@@ -1789,7 +1822,7 @@ export const CreateMachineRequest = /*@__PURE__*/ S.suspend(() =>
1789
1822
  skip_secrets: S.optional(S.Boolean),
1790
1823
  skip_service_registration: S.optional(S.Boolean),
1791
1824
  }).pipe(
1792
- T.Http({ method: "POST", uri: "/apps/{app_name}/machines", code: 200 }),
1825
+ T.Http({ method: "POST", uri: "/v1/apps/{app_name}/machines", code: 200 }),
1793
1826
  ),
1794
1827
  ).annotate({
1795
1828
  identifier: "CreateMachineRequest",
@@ -1865,9 +1898,23 @@ export const ImageRef = /*@__PURE__*/ S.suspend(() =>
1865
1898
  }),
1866
1899
  ).annotate({ identifier: "ImageRef" }) as any as S.Schema<ImageRef>;
1867
1900
 
1901
+ export interface StrippedLease {
1902
+ description?: string;
1903
+ expires_at?: number;
1904
+ owner?: string;
1905
+ }
1906
+ export const StrippedLease = /*@__PURE__*/ S.suspend(() =>
1907
+ S.Struct({
1908
+ description: S.optional(S.String),
1909
+ expires_at: S.optional(S.Number),
1910
+ owner: S.optional(S.String),
1911
+ }),
1912
+ ).annotate({ identifier: "StrippedLease" }) as any as S.Schema<StrippedLease>;
1913
+
1868
1914
  export interface Machine {
1869
1915
  checks?: MachineChecksList;
1870
1916
  config?: FlyMachineConfig;
1917
+ cordoned?: boolean;
1871
1918
  created_at?: string;
1872
1919
  events?: MachineEventsList;
1873
1920
  host_status?: MachineHostStatus;
@@ -1876,6 +1923,7 @@ export interface Machine {
1876
1923
  incomplete_config?: FlyMachineConfig;
1877
1924
  /** InstanceID is unique for each version of the machine */
1878
1925
  instance_id?: string;
1926
+ lease?: StrippedLease;
1879
1927
  name?: string;
1880
1928
  /** Nonce is only every returned on machine creation if a lease_duration was provided. */
1881
1929
  nonce?: string;
@@ -1889,6 +1937,7 @@ export const Machine = /*@__PURE__*/ S.suspend(() =>
1889
1937
  S.Struct({
1890
1938
  checks: S.optional(MachineChecksList),
1891
1939
  config: S.optional(FlyMachineConfig),
1940
+ cordoned: S.optional(S.Boolean),
1892
1941
  created_at: S.optional(S.String),
1893
1942
  events: S.optional(MachineEventsList),
1894
1943
  host_status: S.optional(MachineHostStatus),
@@ -1896,6 +1945,7 @@ export const Machine = /*@__PURE__*/ S.suspend(() =>
1896
1945
  image_ref: S.optional(ImageRef),
1897
1946
  incomplete_config: S.optional(FlyMachineConfig),
1898
1947
  instance_id: S.optional(S.String),
1948
+ lease: S.optional(StrippedLease),
1899
1949
  name: S.optional(S.String),
1900
1950
  nonce: S.optional(S.String),
1901
1951
  private_ip: S.optional(S.String),
@@ -1923,7 +1973,7 @@ export const CreateMachineLeaseRequest = /*@__PURE__*/ S.suspend(() =>
1923
1973
  }).pipe(
1924
1974
  T.Http({
1925
1975
  method: "POST",
1926
- uri: "/apps/{app_name}/machines/{machine_id}/lease",
1976
+ uri: "/v1/apps/{app_name}/machines/{machine_id}/lease",
1927
1977
  code: 200,
1928
1978
  }),
1929
1979
  ),
@@ -1953,6 +2003,410 @@ export const Lease = /*@__PURE__*/ S.suspend(() =>
1953
2003
  }),
1954
2004
  ).annotate({ identifier: "Lease" }) as any as S.Schema<Lease>;
1955
2005
 
2006
+ /** Postgres major version. */
2007
+ export type CreatePostgresRequestPgMajorVersion = "16" | "17";
2008
+ export const CreatePostgresRequestPgMajorVersion = /*@__PURE__*/ S.String;
2009
+
2010
+ /** Plan slug selecting CPU, memory, and disk sizing. */
2011
+ export type CreatePostgresRequestPlan =
2012
+ | "basic"
2013
+ | "starter"
2014
+ | "launch"
2015
+ | "scale"
2016
+ | "Performance";
2017
+ export const CreatePostgresRequestPlan = /*@__PURE__*/ S.String;
2018
+
2019
+ /** Connection pooler mode. */
2020
+ export type CreatePostgresRequestPoolMode = "session" | "transaction";
2021
+ export const CreatePostgresRequestPoolMode = /*@__PURE__*/ S.String;
2022
+
2023
+ export interface CreatePostgresRequest {
2024
+ /** Disk size in gigabytes. */
2025
+ disk_size_gb?: number;
2026
+ /** Name for the cluster. A name is generated when omitted. */
2027
+ name?: string;
2028
+ /** Slug of the organization that will own the cluster. */
2029
+ org_slug: string;
2030
+ /** Postgres major version. */
2031
+ pg_major_version?: CreatePostgresRequestPgMajorVersion | (string & {});
2032
+ /** Plan slug selecting CPU, memory, and disk sizing. */
2033
+ plan: CreatePostgresRequestPlan | (string & {});
2034
+ /** Connection pooler mode. */
2035
+ pool_mode?: CreatePostgresRequestPoolMode | (string & {});
2036
+ /** Enable PostGIS support, required to later enable PostGIS extensions. */
2037
+ postgis_enabled?: boolean;
2038
+ /** Fly region code where the cluster's primary runs. */
2039
+ region: string;
2040
+ }
2041
+ export const CreatePostgresRequest = /*@__PURE__*/ S.suspend(() =>
2042
+ S.Struct({
2043
+ disk_size_gb: S.optional(S.Number),
2044
+ name: S.optional(S.String),
2045
+ org_slug: S.String,
2046
+ pg_major_version: S.optional(CreatePostgresRequestPgMajorVersion),
2047
+ plan: CreatePostgresRequestPlan,
2048
+ pool_mode: S.optional(CreatePostgresRequestPoolMode),
2049
+ postgis_enabled: S.optional(S.Boolean),
2050
+ region: S.String,
2051
+ }).pipe(T.Http({ method: "POST", uri: "/v1/postgres", code: 200 })),
2052
+ ).annotate({
2053
+ identifier: "CreatePostgresRequest",
2054
+ }) as any as S.Schema<CreatePostgresRequest>;
2055
+
2056
+ export interface PostgresAttachedApp {
2057
+ /** Attached Fly app name. */
2058
+ name?: string;
2059
+ }
2060
+ export const PostgresAttachedApp = /*@__PURE__*/ S.suspend(() =>
2061
+ S.Struct({
2062
+ name: S.optional(S.String),
2063
+ }),
2064
+ ).annotate({
2065
+ identifier: "PostgresAttachedApp",
2066
+ }) as any as S.Schema<PostgresAttachedApp>;
2067
+
2068
+ /** Apps attached to the cluster. */
2069
+ export type PostgresClusterAttachedAppsList = Array<PostgresAttachedApp>;
2070
+ export const PostgresClusterAttachedAppsList = /*@__PURE__*/ S.Array(
2071
+ PostgresAttachedApp,
2072
+ ) as any as S.Schema<PostgresClusterAttachedAppsList>;
2073
+
2074
+ /** CPU class. */
2075
+ export type PostgresClusterCpuKind = "shared" | "performance";
2076
+ export const PostgresClusterCpuKind = /*@__PURE__*/ S.String;
2077
+
2078
+ export interface PostgresEndpoint {
2079
+ /** Hostname to connect to. */
2080
+ host?: string;
2081
+ /** TCP port. */
2082
+ port?: number;
2083
+ }
2084
+ export const PostgresEndpoint = /*@__PURE__*/ S.suspend(() =>
2085
+ S.Struct({
2086
+ host: S.optional(S.String),
2087
+ port: S.optional(S.Number),
2088
+ }),
2089
+ ).annotate({
2090
+ identifier: "PostgresEndpoint",
2091
+ }) as any as S.Schema<PostgresEndpoint>;
2092
+
2093
+ export interface PostgresNodeEndpoints {
2094
+ /** Unpooled connection to the cluster node. */
2095
+ direct?: PostgresEndpoint;
2096
+ /** Pooled connection to the cluster node (through PgBouncer). */
2097
+ pooler?: PostgresEndpoint;
2098
+ }
2099
+ export const PostgresNodeEndpoints = /*@__PURE__*/ S.suspend(() =>
2100
+ S.Struct({
2101
+ direct: S.optional(PostgresEndpoint),
2102
+ pooler: S.optional(PostgresEndpoint),
2103
+ }),
2104
+ ).annotate({
2105
+ identifier: "PostgresNodeEndpoints",
2106
+ }) as any as S.Schema<PostgresNodeEndpoints>;
2107
+
2108
+ export interface PostgresClusterEndpoints {
2109
+ /** Endpoints for connecting to the primary node. */
2110
+ primary?: PostgresNodeEndpoints;
2111
+ }
2112
+ export const PostgresClusterEndpoints = /*@__PURE__*/ S.suspend(() =>
2113
+ S.Struct({
2114
+ primary: S.optional(PostgresNodeEndpoints),
2115
+ }),
2116
+ ).annotate({
2117
+ identifier: "PostgresClusterEndpoints",
2118
+ }) as any as S.Schema<PostgresClusterEndpoints>;
2119
+
2120
+ export interface OrganizationRef {
2121
+ /** Organization name. */
2122
+ name?: string;
2123
+ /** Organization slug. */
2124
+ slug?: string;
2125
+ }
2126
+ export const OrganizationRef = /*@__PURE__*/ S.suspend(() =>
2127
+ S.Struct({
2128
+ name: S.optional(S.String),
2129
+ slug: S.optional(S.String),
2130
+ }),
2131
+ ).annotate({
2132
+ identifier: "OrganizationRef",
2133
+ }) as any as S.Schema<OrganizationRef>;
2134
+
2135
+ /** Postgres major version. */
2136
+ export type PostgresClusterPgMajorVersion = "16" | "17";
2137
+ export const PostgresClusterPgMajorVersion = /*@__PURE__*/ S.String;
2138
+
2139
+ /** Plan slug. */
2140
+ export type PostgresClusterPlan =
2141
+ | "basic"
2142
+ | "starter"
2143
+ | "launch"
2144
+ | "scale"
2145
+ | "Performance";
2146
+ export const PostgresClusterPlan = /*@__PURE__*/ S.String;
2147
+
2148
+ /** Current lifecycle status. */
2149
+ export type PostgresClusterStatus =
2150
+ | "creating"
2151
+ | "initializing"
2152
+ | "ready"
2153
+ | "deleting"
2154
+ | "deleted"
2155
+ | "failed";
2156
+ export const PostgresClusterStatus = /*@__PURE__*/ S.String;
2157
+
2158
+ export interface PostgresCluster {
2159
+ /** Apps attached to the cluster. */
2160
+ attached_apps?: PostgresClusterAttachedAppsList;
2161
+ /** CPU class. */
2162
+ cpu_kind?: PostgresClusterCpuKind;
2163
+ /** vCPUs per node. */
2164
+ cpus?: number;
2165
+ /** RFC 3339 creation timestamp. */
2166
+ created_at?: string;
2167
+ /** Disk size in gigabytes. */
2168
+ disk_size_gb?: number;
2169
+ /** Connection endpoints. Populated once the cluster is ready. */
2170
+ endpoints?: PostgresClusterEndpoints;
2171
+ /** Cluster ID. */
2172
+ id?: string;
2173
+ /** Memory per node in megabytes. */
2174
+ memory_mb?: number;
2175
+ /** Cluster name. */
2176
+ name?: string;
2177
+ organization?: OrganizationRef;
2178
+ /** Postgres major version. */
2179
+ pg_major_version?: PostgresClusterPgMajorVersion;
2180
+ /** Plan slug. */
2181
+ plan?: PostgresClusterPlan;
2182
+ /** Whether PostGIS support is enabled. */
2183
+ postgis_enabled?: boolean;
2184
+ /** Fly region code. */
2185
+ region?: string;
2186
+ /** Number of replicas. */
2187
+ replicas?: number;
2188
+ /** Current lifecycle status. */
2189
+ status?: PostgresClusterStatus;
2190
+ }
2191
+ export const PostgresCluster = /*@__PURE__*/ S.suspend(() =>
2192
+ S.Struct({
2193
+ attached_apps: S.optional(PostgresClusterAttachedAppsList),
2194
+ cpu_kind: S.optional(PostgresClusterCpuKind),
2195
+ cpus: S.optional(S.Number),
2196
+ created_at: S.optional(S.String),
2197
+ disk_size_gb: S.optional(S.Number),
2198
+ endpoints: S.optional(PostgresClusterEndpoints),
2199
+ id: S.optional(S.String),
2200
+ memory_mb: S.optional(S.Number),
2201
+ name: S.optional(S.String),
2202
+ organization: S.optional(OrganizationRef),
2203
+ pg_major_version: S.optional(PostgresClusterPgMajorVersion),
2204
+ plan: S.optional(PostgresClusterPlan),
2205
+ postgis_enabled: S.optional(S.Boolean),
2206
+ region: S.optional(S.String),
2207
+ replicas: S.optional(S.Number),
2208
+ status: S.optional(PostgresClusterStatus),
2209
+ }),
2210
+ ).annotate({
2211
+ identifier: "PostgresCluster",
2212
+ }) as any as S.Schema<PostgresCluster>;
2213
+
2214
+ export interface ShowPostgresClusterResponse {
2215
+ data?: PostgresCluster;
2216
+ }
2217
+ export const ShowPostgresClusterResponse = /*@__PURE__*/ S.suspend(() =>
2218
+ S.Struct({
2219
+ data: S.optional(PostgresCluster),
2220
+ }),
2221
+ ).annotate({
2222
+ identifier: "ShowPostgresClusterResponse",
2223
+ }) as any as S.Schema<ShowPostgresClusterResponse>;
2224
+
2225
+ export interface CreatePostgresAttachmentRequest {
2226
+ /** Managed Postgres Cluster ID */
2227
+ postgres_cluster_id: string;
2228
+ /** Name of the Fly app to attach. */
2229
+ app_name: string;
2230
+ }
2231
+ export const CreatePostgresAttachmentRequest = /*@__PURE__*/ S.suspend(() =>
2232
+ S.Struct({
2233
+ postgres_cluster_id: S.String.pipe(T.Label()),
2234
+ app_name: S.String,
2235
+ }).pipe(
2236
+ T.Http({
2237
+ method: "POST",
2238
+ uri: "/v1/postgres/{postgres_cluster_id}/attachments",
2239
+ code: 200,
2240
+ }),
2241
+ ),
2242
+ ).annotate({
2243
+ identifier: "CreatePostgresAttachmentRequest",
2244
+ }) as any as S.Schema<CreatePostgresAttachmentRequest>;
2245
+
2246
+ export interface PostgresAttachment {
2247
+ /** Attached Fly app name. */
2248
+ app_name?: string;
2249
+ /** RFC 3339 timestamp when the attachment was created. */
2250
+ attached_at?: string;
2251
+ /** Cluster ID the app is attached to. */
2252
+ postgres_cluster_id?: string;
2253
+ }
2254
+ export const PostgresAttachment = /*@__PURE__*/ S.suspend(() =>
2255
+ S.Struct({
2256
+ app_name: S.optional(S.String),
2257
+ attached_at: S.optional(S.String),
2258
+ postgres_cluster_id: S.optional(S.String),
2259
+ }),
2260
+ ).annotate({
2261
+ identifier: "PostgresAttachment",
2262
+ }) as any as S.Schema<PostgresAttachment>;
2263
+
2264
+ export interface CreatePostgresAttachmentResponse {
2265
+ data?: PostgresAttachment;
2266
+ }
2267
+ export const CreatePostgresAttachmentResponse = /*@__PURE__*/ S.suspend(() =>
2268
+ S.Struct({
2269
+ data: S.optional(PostgresAttachment),
2270
+ }),
2271
+ ).annotate({
2272
+ identifier: "CreatePostgresAttachmentResponse",
2273
+ }) as any as S.Schema<CreatePostgresAttachmentResponse>;
2274
+
2275
+ /** Backup type. */
2276
+ export type CreatePostgresBackupRequestType = "full" | "incr" | "diff";
2277
+ export const CreatePostgresBackupRequestType = /*@__PURE__*/ S.String;
2278
+
2279
+ export interface CreatePostgresBackupRequest {
2280
+ /** Managed Postgres Cluster ID */
2281
+ postgres_cluster_id: string;
2282
+ /** Backup type. */
2283
+ type: CreatePostgresBackupRequestType | (string & {});
2284
+ }
2285
+ export const CreatePostgresBackupRequest = /*@__PURE__*/ S.suspend(() =>
2286
+ S.Struct({
2287
+ postgres_cluster_id: S.String.pipe(T.Label()),
2288
+ type: CreatePostgresBackupRequestType,
2289
+ }).pipe(
2290
+ T.Http({
2291
+ method: "POST",
2292
+ uri: "/v1/postgres/{postgres_cluster_id}/backups",
2293
+ code: 200,
2294
+ }),
2295
+ ),
2296
+ ).annotate({
2297
+ identifier: "CreatePostgresBackupRequest",
2298
+ }) as any as S.Schema<CreatePostgresBackupRequest>;
2299
+
2300
+ export interface CreatePostgresBackupResponse {}
2301
+ export const CreatePostgresBackupResponse = /*@__PURE__*/ S.suspend(() =>
2302
+ S.Struct({}),
2303
+ ).annotate({
2304
+ identifier: "CreatePostgresBackupResponse",
2305
+ }) as any as S.Schema<CreatePostgresBackupResponse>;
2306
+
2307
+ export interface CreatePostgresDatabaseRequest {
2308
+ /** Managed Postgres Cluster ID */
2309
+ postgres_cluster_id: string;
2310
+ /** Name of the database to create. */
2311
+ name: string;
2312
+ }
2313
+ export const CreatePostgresDatabaseRequest = /*@__PURE__*/ S.suspend(() =>
2314
+ S.Struct({
2315
+ postgres_cluster_id: S.String.pipe(T.Label()),
2316
+ name: S.String,
2317
+ }).pipe(
2318
+ T.Http({
2319
+ method: "POST",
2320
+ uri: "/v1/postgres/{postgres_cluster_id}/databases",
2321
+ code: 200,
2322
+ }),
2323
+ ),
2324
+ ).annotate({
2325
+ identifier: "CreatePostgresDatabaseRequest",
2326
+ }) as any as S.Schema<CreatePostgresDatabaseRequest>;
2327
+
2328
+ export interface PostgresDatabase {
2329
+ /** Database name. */
2330
+ name?: string;
2331
+ }
2332
+ export const PostgresDatabase = /*@__PURE__*/ S.suspend(() =>
2333
+ S.Struct({
2334
+ name: S.optional(S.String),
2335
+ }),
2336
+ ).annotate({
2337
+ identifier: "PostgresDatabase",
2338
+ }) as any as S.Schema<PostgresDatabase>;
2339
+
2340
+ export interface PostgresDatabaseResponse {
2341
+ data?: PostgresDatabase;
2342
+ }
2343
+ export const PostgresDatabaseResponse = /*@__PURE__*/ S.suspend(() =>
2344
+ S.Struct({
2345
+ data: S.optional(PostgresDatabase),
2346
+ }),
2347
+ ).annotate({
2348
+ identifier: "PostgresDatabaseResponse",
2349
+ }) as any as S.Schema<PostgresDatabaseResponse>;
2350
+
2351
+ /** Role to grant the user. */
2352
+ export type CreatePostgresUserRequestRole =
2353
+ | "schema_admin"
2354
+ | "writer"
2355
+ | "reader";
2356
+ export const CreatePostgresUserRequestRole = /*@__PURE__*/ S.String;
2357
+
2358
+ export interface CreatePostgresUserRequest {
2359
+ /** Managed Postgres Cluster ID */
2360
+ postgres_cluster_id: string;
2361
+ /** Role to grant the user. */
2362
+ role: CreatePostgresUserRequestRole | (string & {});
2363
+ /** Name for the new user. */
2364
+ username: string;
2365
+ }
2366
+ export const CreatePostgresUserRequest = /*@__PURE__*/ S.suspend(() =>
2367
+ S.Struct({
2368
+ postgres_cluster_id: S.String.pipe(T.Label()),
2369
+ role: CreatePostgresUserRequestRole,
2370
+ username: S.String,
2371
+ }).pipe(
2372
+ T.Http({
2373
+ method: "POST",
2374
+ uri: "/v1/postgres/{postgres_cluster_id}/users",
2375
+ code: 200,
2376
+ }),
2377
+ ),
2378
+ ).annotate({
2379
+ identifier: "CreatePostgresUserRequest",
2380
+ }) as any as S.Schema<CreatePostgresUserRequest>;
2381
+
2382
+ /** User role. */
2383
+ export type PostgresUserRole = "schema_admin" | "writer" | "reader";
2384
+ export const PostgresUserRole = /*@__PURE__*/ S.String;
2385
+
2386
+ export interface PostgresUser {
2387
+ /** User role. */
2388
+ role?: PostgresUserRole;
2389
+ /** User name. */
2390
+ username?: string;
2391
+ }
2392
+ export const PostgresUser = /*@__PURE__*/ S.suspend(() =>
2393
+ S.Struct({
2394
+ role: S.optional(PostgresUserRole),
2395
+ username: S.optional(S.String),
2396
+ }),
2397
+ ).annotate({ identifier: "PostgresUser" }) as any as S.Schema<PostgresUser>;
2398
+
2399
+ export interface CreatePostgresUserResponse {
2400
+ data?: PostgresUser;
2401
+ }
2402
+ export const CreatePostgresUserResponse = /*@__PURE__*/ S.suspend(() =>
2403
+ S.Struct({
2404
+ data: S.optional(PostgresUser),
2405
+ }),
2406
+ ).annotate({
2407
+ identifier: "CreatePostgresUserResponse",
2408
+ }) as any as S.Schema<CreatePostgresUserResponse>;
2409
+
1956
2410
  export interface CreateSecretRequest {
1957
2411
  /** Fly App Name */
1958
2412
  app_name: string;
@@ -1968,7 +2422,7 @@ export const CreateSecretRequest = /*@__PURE__*/ S.suspend(() =>
1968
2422
  }).pipe(
1969
2423
  T.Http({
1970
2424
  method: "POST",
1971
- uri: "/apps/{app_name}/secrets/{secret_name}",
2425
+ uri: "/v1/apps/{app_name}/secrets/{secret_name}",
1972
2426
  code: 200,
1973
2427
  }),
1974
2428
  ),
@@ -2037,7 +2491,7 @@ export const CreateVolumeRequest = /*@__PURE__*/ S.suspend(() =>
2037
2491
  source_volume_id: S.optional(S.String),
2038
2492
  unique_zone_app_wide: S.optional(S.Boolean),
2039
2493
  }).pipe(
2040
- T.Http({ method: "POST", uri: "/apps/{app_name}/volumes", code: 200 }),
2494
+ T.Http({ method: "POST", uri: "/v1/apps/{app_name}/volumes", code: 200 }),
2041
2495
  ),
2042
2496
  ).annotate({
2043
2497
  identifier: "CreateVolumeRequest",
@@ -2111,7 +2565,7 @@ export const CreateVolumeSnapshotRequest = /*@__PURE__*/ S.suspend(() =>
2111
2565
  }).pipe(
2112
2566
  T.Http({
2113
2567
  method: "POST",
2114
- uri: "/apps/{app_name}/volumes/{volume_id}/snapshots",
2568
+ uri: "/v1/apps/{app_name}/volumes/{volume_id}/snapshots",
2115
2569
  code: 200,
2116
2570
  }),
2117
2571
  ),
@@ -2146,7 +2600,7 @@ export const DecryptSecretKeyRequest = /*@__PURE__*/ S.suspend(() =>
2146
2600
  }).pipe(
2147
2601
  T.Http({
2148
2602
  method: "POST",
2149
- uri: "/apps/{app_name}/secretkeys/{secret_name}/decrypt",
2603
+ uri: "/v1/apps/{app_name}/secretkeys/{secret_name}/decrypt",
2150
2604
  code: 200,
2151
2605
  }),
2152
2606
  ),
@@ -2172,7 +2626,7 @@ export interface DeleteAppRequest {
2172
2626
  export const DeleteAppRequest = /*@__PURE__*/ S.suspend(() =>
2173
2627
  S.Struct({
2174
2628
  app_name: S.String.pipe(T.Label()),
2175
- }).pipe(T.Http({ method: "DELETE", uri: "/apps/{app_name}", code: 200 })),
2629
+ }).pipe(T.Http({ method: "DELETE", uri: "/v1/apps/{app_name}", code: 200 })),
2176
2630
  ).annotate({
2177
2631
  identifier: "DeleteAppRequest",
2178
2632
  }) as any as S.Schema<DeleteAppRequest>;
@@ -2197,7 +2651,7 @@ export const DeleteAppAcmeCertificateRequest = /*@__PURE__*/ S.suspend(() =>
2197
2651
  }).pipe(
2198
2652
  T.Http({
2199
2653
  method: "DELETE",
2200
- uri: "/apps/{app_name}/certificates/{hostname}/acme",
2654
+ uri: "/v1/apps/{app_name}/certificates/{hostname}/acme",
2201
2655
  code: 200,
2202
2656
  }),
2203
2657
  ),
@@ -2218,7 +2672,7 @@ export const DeleteAppCertificateRequest = /*@__PURE__*/ S.suspend(() =>
2218
2672
  }).pipe(
2219
2673
  T.Http({
2220
2674
  method: "DELETE",
2221
- uri: "/apps/{app_name}/certificates/{hostname}",
2675
+ uri: "/v1/apps/{app_name}/certificates/{hostname}",
2222
2676
  code: 200,
2223
2677
  }),
2224
2678
  ),
@@ -2246,7 +2700,7 @@ export const DeleteAppCustomCertificateRequest = /*@__PURE__*/ S.suspend(() =>
2246
2700
  }).pipe(
2247
2701
  T.Http({
2248
2702
  method: "DELETE",
2249
- uri: "/apps/{app_name}/certificates/{hostname}/custom",
2703
+ uri: "/v1/apps/{app_name}/certificates/{hostname}/custom",
2250
2704
  code: 200,
2251
2705
  }),
2252
2706
  ),
@@ -2314,7 +2768,7 @@ export const DeleteAppIPAssignmentRequest = /*@__PURE__*/ S.suspend(() =>
2314
2768
  }).pipe(
2315
2769
  T.Http({
2316
2770
  method: "DELETE",
2317
- uri: "/apps/{app_name}/ip_assignments/{ip}",
2771
+ uri: "/v1/apps/{app_name}/ip_assignments/{ip}",
2318
2772
  code: 200,
2319
2773
  }),
2320
2774
  ),
@@ -2345,7 +2799,7 @@ export const DeleteMachineRequest = /*@__PURE__*/ S.suspend(() =>
2345
2799
  }).pipe(
2346
2800
  T.Http({
2347
2801
  method: "DELETE",
2348
- uri: "/apps/{app_name}/machines/{machine_id}",
2802
+ uri: "/v1/apps/{app_name}/machines/{machine_id}",
2349
2803
  code: 200,
2350
2804
  }),
2351
2805
  ),
@@ -2376,7 +2830,7 @@ export const DeleteMachineMetadataRequest = /*@__PURE__*/ S.suspend(() =>
2376
2830
  }).pipe(
2377
2831
  T.Http({
2378
2832
  method: "DELETE",
2379
- uri: "/apps/{app_name}/machines/{machine_id}/metadata/{key}",
2833
+ uri: "/v1/apps/{app_name}/machines/{machine_id}/metadata/{key}",
2380
2834
  code: 200,
2381
2835
  }),
2382
2836
  ),
@@ -2391,6 +2845,108 @@ export const DeleteMachineMetadataResponse = /*@__PURE__*/ S.suspend(() =>
2391
2845
  identifier: "DeleteMachineMetadataResponse",
2392
2846
  }) as any as S.Schema<DeleteMachineMetadataResponse>;
2393
2847
 
2848
+ export interface DeletePostgresRequest {
2849
+ /** Managed Postgres Cluster ID */
2850
+ postgres_cluster_id: string;
2851
+ }
2852
+ export const DeletePostgresRequest = /*@__PURE__*/ S.suspend(() =>
2853
+ S.Struct({
2854
+ postgres_cluster_id: S.String.pipe(T.Label()),
2855
+ }).pipe(
2856
+ T.Http({
2857
+ method: "DELETE",
2858
+ uri: "/v1/postgres/{postgres_cluster_id}",
2859
+ code: 200,
2860
+ }),
2861
+ ),
2862
+ ).annotate({
2863
+ identifier: "DeletePostgresRequest",
2864
+ }) as any as S.Schema<DeletePostgresRequest>;
2865
+
2866
+ export interface DeletePostgresResponse {}
2867
+ export const DeletePostgresResponse = /*@__PURE__*/ S.suspend(() =>
2868
+ S.Struct({}),
2869
+ ).annotate({
2870
+ identifier: "DeletePostgresResponse",
2871
+ }) as any as S.Schema<DeletePostgresResponse>;
2872
+
2873
+ export interface DeletePostgresAttachmentRequest {
2874
+ /** Managed Postgres Cluster ID */
2875
+ postgres_cluster_id: string;
2876
+ /** Fly App Name */
2877
+ app_name: string;
2878
+ }
2879
+ export const DeletePostgresAttachmentRequest = /*@__PURE__*/ S.suspend(() =>
2880
+ S.Struct({
2881
+ postgres_cluster_id: S.String.pipe(T.Label()),
2882
+ app_name: S.String.pipe(T.Label()),
2883
+ }).pipe(
2884
+ T.Http({
2885
+ method: "DELETE",
2886
+ uri: "/v1/postgres/{postgres_cluster_id}/attachments/{app_name}",
2887
+ code: 200,
2888
+ }),
2889
+ ),
2890
+ ).annotate({
2891
+ identifier: "DeletePostgresAttachmentRequest",
2892
+ }) as any as S.Schema<DeletePostgresAttachmentRequest>;
2893
+
2894
+ export interface DeletePostgresAttachmentResponse {}
2895
+ export const DeletePostgresAttachmentResponse = /*@__PURE__*/ S.suspend(() =>
2896
+ S.Struct({}),
2897
+ ).annotate({
2898
+ identifier: "DeletePostgresAttachmentResponse",
2899
+ }) as any as S.Schema<DeletePostgresAttachmentResponse>;
2900
+
2901
+ export interface DeletePostgresDatabaseRequest {
2902
+ /** Managed Postgres Cluster ID */
2903
+ postgres_cluster_id: string;
2904
+ /** Database Name */
2905
+ database_name: string;
2906
+ }
2907
+ export const DeletePostgresDatabaseRequest = /*@__PURE__*/ S.suspend(() =>
2908
+ S.Struct({
2909
+ postgres_cluster_id: S.String.pipe(T.Label()),
2910
+ database_name: S.String.pipe(T.Label()),
2911
+ }).pipe(
2912
+ T.Http({
2913
+ method: "DELETE",
2914
+ uri: "/v1/postgres/{postgres_cluster_id}/databases/{database_name}",
2915
+ code: 200,
2916
+ }),
2917
+ ),
2918
+ ).annotate({
2919
+ identifier: "DeletePostgresDatabaseRequest",
2920
+ }) as any as S.Schema<DeletePostgresDatabaseRequest>;
2921
+
2922
+ export interface DeletePostgresUserRequest {
2923
+ /** Managed Postgres Cluster ID */
2924
+ postgres_cluster_id: string;
2925
+ /** Postgres User Name */
2926
+ username: string;
2927
+ }
2928
+ export const DeletePostgresUserRequest = /*@__PURE__*/ S.suspend(() =>
2929
+ S.Struct({
2930
+ postgres_cluster_id: S.String.pipe(T.Label()),
2931
+ username: S.String.pipe(T.Label()),
2932
+ }).pipe(
2933
+ T.Http({
2934
+ method: "DELETE",
2935
+ uri: "/v1/postgres/{postgres_cluster_id}/users/{username}",
2936
+ code: 200,
2937
+ }),
2938
+ ),
2939
+ ).annotate({
2940
+ identifier: "DeletePostgresUserRequest",
2941
+ }) as any as S.Schema<DeletePostgresUserRequest>;
2942
+
2943
+ export interface DeletePostgresUserResponse {}
2944
+ export const DeletePostgresUserResponse = /*@__PURE__*/ S.suspend(() =>
2945
+ S.Struct({}),
2946
+ ).annotate({
2947
+ identifier: "DeletePostgresUserResponse",
2948
+ }) as any as S.Schema<DeletePostgresUserResponse>;
2949
+
2394
2950
  export interface DeleteSecretRequest {
2395
2951
  /** Fly App Name */
2396
2952
  app_name: string;
@@ -2404,7 +2960,7 @@ export const DeleteSecretRequest = /*@__PURE__*/ S.suspend(() =>
2404
2960
  }).pipe(
2405
2961
  T.Http({
2406
2962
  method: "DELETE",
2407
- uri: "/apps/{app_name}/secrets/{secret_name}",
2963
+ uri: "/v1/apps/{app_name}/secrets/{secret_name}",
2408
2964
  code: 200,
2409
2965
  }),
2410
2966
  ),
@@ -2439,7 +2995,7 @@ export const DeleteSecretKeyRequest = /*@__PURE__*/ S.suspend(() =>
2439
2995
  }).pipe(
2440
2996
  T.Http({
2441
2997
  method: "DELETE",
2442
- uri: "/apps/{app_name}/secretkeys/{secret_name}",
2998
+ uri: "/v1/apps/{app_name}/secretkeys/{secret_name}",
2443
2999
  code: 200,
2444
3000
  }),
2445
3001
  ),
@@ -2474,7 +3030,7 @@ export const DeleteVolumeRequest = /*@__PURE__*/ S.suspend(() =>
2474
3030
  }).pipe(
2475
3031
  T.Http({
2476
3032
  method: "DELETE",
2477
- uri: "/apps/{app_name}/volumes/{volume_id}",
3033
+ uri: "/v1/apps/{app_name}/volumes/{volume_id}",
2478
3034
  code: 200,
2479
3035
  }),
2480
3036
  ),
@@ -2482,6 +3038,77 @@ export const DeleteVolumeRequest = /*@__PURE__*/ S.suspend(() =>
2482
3038
  identifier: "DeleteVolumeRequest",
2483
3039
  }) as any as S.Schema<DeleteVolumeRequest>;
2484
3040
 
3041
+ export interface DisablePostgresExtensionRequest {
3042
+ /** Managed Postgres Cluster ID */
3043
+ postgres_cluster_id: string;
3044
+ /** Database Name */
3045
+ database_name: string;
3046
+ /** Extension Name */
3047
+ extension_name: string;
3048
+ /** Also drop objects that depend on the extension */
3049
+ force?: boolean;
3050
+ }
3051
+ export const DisablePostgresExtensionRequest = /*@__PURE__*/ S.suspend(() =>
3052
+ S.Struct({
3053
+ postgres_cluster_id: S.String.pipe(T.Label()),
3054
+ database_name: S.String.pipe(T.Label()),
3055
+ extension_name: S.String.pipe(T.Label()),
3056
+ force: S.optional(S.Boolean.pipe(T.Query())),
3057
+ }).pipe(
3058
+ T.Http({
3059
+ method: "DELETE",
3060
+ uri: "/v1/postgres/{postgres_cluster_id}/databases/{database_name}/extensions/{extension_name}",
3061
+ code: 200,
3062
+ }),
3063
+ ),
3064
+ ).annotate({
3065
+ identifier: "DisablePostgresExtensionRequest",
3066
+ }) as any as S.Schema<DisablePostgresExtensionRequest>;
3067
+
3068
+ export interface DisablePostgresExtensionResponse {}
3069
+ export const DisablePostgresExtensionResponse = /*@__PURE__*/ S.suspend(() =>
3070
+ S.Struct({}),
3071
+ ).annotate({
3072
+ identifier: "DisablePostgresExtensionResponse",
3073
+ }) as any as S.Schema<DisablePostgresExtensionResponse>;
3074
+
3075
+ export interface EnablePostgresExtensionRequest {
3076
+ /** Managed Postgres Cluster ID */
3077
+ postgres_cluster_id: string;
3078
+ /** Database Name */
3079
+ database_name: string;
3080
+ /** Create the schema first if it does not exist. */
3081
+ create_schema?: boolean;
3082
+ /** Extension to enable. */
3083
+ name: string;
3084
+ /** Schema to install the extension into. Defaults to the database's default schema. */
3085
+ schema?: string;
3086
+ }
3087
+ export const EnablePostgresExtensionRequest = /*@__PURE__*/ S.suspend(() =>
3088
+ S.Struct({
3089
+ postgres_cluster_id: S.String.pipe(T.Label()),
3090
+ database_name: S.String.pipe(T.Label()),
3091
+ create_schema: S.optional(S.Boolean),
3092
+ name: S.String,
3093
+ schema: S.optional(S.String),
3094
+ }).pipe(
3095
+ T.Http({
3096
+ method: "POST",
3097
+ uri: "/v1/postgres/{postgres_cluster_id}/databases/{database_name}/extensions",
3098
+ code: 200,
3099
+ }),
3100
+ ),
3101
+ ).annotate({
3102
+ identifier: "EnablePostgresExtensionRequest",
3103
+ }) as any as S.Schema<EnablePostgresExtensionRequest>;
3104
+
3105
+ export interface EnablePostgresExtensionResponse {}
3106
+ export const EnablePostgresExtensionResponse = /*@__PURE__*/ S.suspend(() =>
3107
+ S.Struct({}),
3108
+ ).annotate({
3109
+ identifier: "EnablePostgresExtensionResponse",
3110
+ }) as any as S.Schema<EnablePostgresExtensionResponse>;
3111
+
2485
3112
  export interface EncryptSecretKeyRequest {
2486
3113
  /** Fly App Name */
2487
3114
  app_name: string;
@@ -2502,7 +3129,7 @@ export const EncryptSecretKeyRequest = /*@__PURE__*/ S.suspend(() =>
2502
3129
  }).pipe(
2503
3130
  T.Http({
2504
3131
  method: "POST",
2505
- uri: "/apps/{app_name}/secretkeys/{secret_name}/encrypt",
3132
+ uri: "/v1/apps/{app_name}/secretkeys/{secret_name}/encrypt",
2506
3133
  code: 200,
2507
3134
  }),
2508
3135
  ),
@@ -2535,6 +3162,8 @@ export interface ExecMachineRequest {
2535
3162
  cmd?: string;
2536
3163
  command?: ExecMachineRequestCommandList;
2537
3164
  container?: string;
3165
+ /** Machine runs the command in the machine's own namespace instead of in a container. It is mutually exclusive with Container. */
3166
+ machine?: boolean;
2538
3167
  stdin?: string;
2539
3168
  timeout?: number;
2540
3169
  }
@@ -2545,12 +3174,13 @@ export const ExecMachineRequest = /*@__PURE__*/ S.suspend(() =>
2545
3174
  cmd: S.optional(S.String),
2546
3175
  command: S.optional(ExecMachineRequestCommandList),
2547
3176
  container: S.optional(S.String),
3177
+ machine: S.optional(S.Boolean),
2548
3178
  stdin: S.optional(S.String),
2549
3179
  timeout: S.optional(S.Number),
2550
3180
  }).pipe(
2551
3181
  T.Http({
2552
3182
  method: "POST",
2553
- uri: "/apps/{app_name}/machines/{machine_id}/exec",
3183
+ uri: "/v1/apps/{app_name}/machines/{machine_id}/exec",
2554
3184
  code: 200,
2555
3185
  }),
2556
3186
  ),
@@ -2590,7 +3220,7 @@ export const ExtendVolumeRequest = /*@__PURE__*/ S.suspend(() =>
2590
3220
  }).pipe(
2591
3221
  T.Http({
2592
3222
  method: "PUT",
2593
- uri: "/apps/{app_name}/volumes/{volume_id}/extend",
3223
+ uri: "/v1/apps/{app_name}/volumes/{volume_id}/extend",
2594
3224
  code: 200,
2595
3225
  }),
2596
3226
  ),
@@ -2611,6 +3241,27 @@ export const ExtendVolumeResponse = /*@__PURE__*/ S.suspend(() =>
2611
3241
  identifier: "ExtendVolumeResponse",
2612
3242
  }) as any as S.Schema<ExtendVolumeResponse>;
2613
3243
 
3244
+ export interface ForkPostgresRequest {
3245
+ /** Managed Postgres Cluster ID */
3246
+ postgres_cluster_id: string;
3247
+ /** Name for the forked cluster. Defaults to the source name with a -fork suffix. */
3248
+ name?: string;
3249
+ }
3250
+ export const ForkPostgresRequest = /*@__PURE__*/ S.suspend(() =>
3251
+ S.Struct({
3252
+ postgres_cluster_id: S.String.pipe(T.Label()),
3253
+ name: S.optional(S.String),
3254
+ }).pipe(
3255
+ T.Http({
3256
+ method: "POST",
3257
+ uri: "/v1/postgres/{postgres_cluster_id}/fork",
3258
+ code: 200,
3259
+ }),
3260
+ ),
3261
+ ).annotate({
3262
+ identifier: "ForkPostgresRequest",
3263
+ }) as any as S.Schema<ForkPostgresRequest>;
3264
+
2614
3265
  export type GenerateSecretKeyRequestValueList = Array<number>;
2615
3266
  export const GenerateSecretKeyRequestValueList = /*@__PURE__*/ S.Array(
2616
3267
  S.Number,
@@ -2633,7 +3284,7 @@ export const GenerateSecretKeyRequest = /*@__PURE__*/ S.suspend(() =>
2633
3284
  }).pipe(
2634
3285
  T.Http({
2635
3286
  method: "POST",
2636
- uri: "/apps/{app_name}/secretkeys/{secret_name}/generate",
3287
+ uri: "/v1/apps/{app_name}/secretkeys/{secret_name}/generate",
2637
3288
  code: 200,
2638
3289
  }),
2639
3290
  ),
@@ -2672,7 +3323,7 @@ export interface GetAppRequest {
2672
3323
  export const GetAppRequest = /*@__PURE__*/ S.suspend(() =>
2673
3324
  S.Struct({
2674
3325
  app_name: S.String.pipe(T.Label()),
2675
- }).pipe(T.Http({ method: "GET", uri: "/apps/{app_name}", code: 200 })),
3326
+ }).pipe(T.Http({ method: "GET", uri: "/v1/apps/{app_name}", code: 200 })),
2676
3327
  ).annotate({ identifier: "GetAppRequest" }) as any as S.Schema<GetAppRequest>;
2677
3328
 
2678
3329
  export interface AppOrganizationInfo {
@@ -2696,6 +3347,7 @@ export interface App {
2696
3347
  machine_count?: number;
2697
3348
  name?: string;
2698
3349
  network?: string;
3350
+ network_cidr?: string;
2699
3351
  organization?: AppOrganizationInfo;
2700
3352
  status?: string;
2701
3353
  volume_count?: number;
@@ -2707,6 +3359,7 @@ export const App = /*@__PURE__*/ S.suspend(() =>
2707
3359
  machine_count: S.optional(S.Number),
2708
3360
  name: S.optional(S.String),
2709
3361
  network: S.optional(S.String),
3362
+ network_cidr: S.optional(S.String),
2710
3363
  organization: S.optional(AppOrganizationInfo),
2711
3364
  status: S.optional(S.String),
2712
3365
  volume_count: S.optional(S.Number),
@@ -2726,7 +3379,7 @@ export const GetAppCertificateRequest = /*@__PURE__*/ S.suspend(() =>
2726
3379
  }).pipe(
2727
3380
  T.Http({
2728
3381
  method: "GET",
2729
- uri: "/apps/{app_name}/certificates/{hostname}",
3382
+ uri: "/v1/apps/{app_name}/certificates/{hostname}",
2730
3383
  code: 200,
2731
3384
  }),
2732
3385
  ),
@@ -2737,7 +3390,7 @@ export const GetAppCertificateRequest = /*@__PURE__*/ S.suspend(() =>
2737
3390
  export interface GetCurrentTokenRequest {}
2738
3391
  export const GetCurrentTokenRequest = /*@__PURE__*/ S.suspend(() =>
2739
3392
  S.Struct({}).pipe(
2740
- T.Http({ method: "GET", uri: "/tokens/current", code: 200 }),
3393
+ T.Http({ method: "GET", uri: "/v1/tokens/current", code: 200 }),
2741
3394
  ),
2742
3395
  ).annotate({
2743
3396
  identifier: "GetCurrentTokenRequest",
@@ -2793,15 +3446,18 @@ export interface GetMachineRequest {
2793
3446
  app_name: string;
2794
3447
  /** Machine ID */
2795
3448
  machine_id: string;
3449
+ /** Include machine lease */
3450
+ include_leases?: boolean;
2796
3451
  }
2797
3452
  export const GetMachineRequest = /*@__PURE__*/ S.suspend(() =>
2798
3453
  S.Struct({
2799
3454
  app_name: S.String.pipe(T.Label()),
2800
3455
  machine_id: S.String.pipe(T.Label()),
3456
+ include_leases: S.optional(S.Boolean.pipe(T.Query())),
2801
3457
  }).pipe(
2802
3458
  T.Http({
2803
3459
  method: "GET",
2804
- uri: "/apps/{app_name}/machines/{machine_id}",
3460
+ uri: "/v1/apps/{app_name}/machines/{machine_id}",
2805
3461
  code: 200,
2806
3462
  }),
2807
3463
  ),
@@ -2822,7 +3478,7 @@ export const GetMachineLeaseRequest = /*@__PURE__*/ S.suspend(() =>
2822
3478
  }).pipe(
2823
3479
  T.Http({
2824
3480
  method: "GET",
2825
- uri: "/apps/{app_name}/machines/{machine_id}/lease",
3481
+ uri: "/v1/apps/{app_name}/machines/{machine_id}/lease",
2826
3482
  code: 200,
2827
3483
  }),
2828
3484
  ),
@@ -2843,7 +3499,7 @@ export const GetMachineMemoryRequest = /*@__PURE__*/ S.suspend(() =>
2843
3499
  }).pipe(
2844
3500
  T.Http({
2845
3501
  method: "GET",
2846
- uri: "/apps/{app_name}/machines/{machine_id}/memory",
3502
+ uri: "/v1/apps/{app_name}/machines/{machine_id}/memory",
2847
3503
  code: 200,
2848
3504
  }),
2849
3505
  ),
@@ -2877,7 +3533,7 @@ export const GetMachineMetadataRequest = /*@__PURE__*/ S.suspend(() =>
2877
3533
  }).pipe(
2878
3534
  T.Http({
2879
3535
  method: "GET",
2880
- uri: "/apps/{app_name}/machines/{machine_id}/metadata",
3536
+ uri: "/v1/apps/{app_name}/machines/{machine_id}/metadata",
2881
3537
  code: 200,
2882
3538
  }),
2883
3539
  ),
@@ -2916,7 +3572,7 @@ export const GetMachineMetadataKeyRequest = /*@__PURE__*/ S.suspend(() =>
2916
3572
  }).pipe(
2917
3573
  T.Http({
2918
3574
  method: "GET",
2919
- uri: "/apps/{app_name}/machines/{machine_id}/metadata/{key}",
3575
+ uri: "/v1/apps/{app_name}/machines/{machine_id}/metadata/{key}",
2920
3576
  code: 200,
2921
3577
  }),
2922
3578
  ),
@@ -2963,7 +3619,9 @@ export const GetPlacementsRequest = /*@__PURE__*/ S.suspend(() =>
2963
3619
  volume_name: S.optional(S.String),
2964
3620
  volume_size_bytes: S.optional(S.Number),
2965
3621
  weights: S.optional(PlacementWeights),
2966
- }).pipe(T.Http({ method: "POST", uri: "/platform/placements", code: 200 })),
3622
+ }).pipe(
3623
+ T.Http({ method: "POST", uri: "/v1/platform/placements", code: 200 }),
3624
+ ),
2967
3625
  ).annotate({
2968
3626
  identifier: "GetPlacementsRequest",
2969
3627
  }) as any as S.Schema<GetPlacementsRequest>;
@@ -3000,10 +3658,28 @@ export const MainGetPlacementsResponse = /*@__PURE__*/ S.suspend(() =>
3000
3658
  identifier: "MainGetPlacementsResponse",
3001
3659
  }) as any as S.Schema<MainGetPlacementsResponse>;
3002
3660
 
3661
+ export interface GetPostgresRequest {
3662
+ /** Managed Postgres Cluster ID */
3663
+ postgres_cluster_id: string;
3664
+ }
3665
+ export const GetPostgresRequest = /*@__PURE__*/ S.suspend(() =>
3666
+ S.Struct({
3667
+ postgres_cluster_id: S.String.pipe(T.Label()),
3668
+ }).pipe(
3669
+ T.Http({
3670
+ method: "GET",
3671
+ uri: "/v1/postgres/{postgres_cluster_id}",
3672
+ code: 200,
3673
+ }),
3674
+ ),
3675
+ ).annotate({
3676
+ identifier: "GetPostgresRequest",
3677
+ }) as any as S.Schema<GetPostgresRequest>;
3678
+
3003
3679
  export interface GetRegionsRequest {}
3004
3680
  export const GetRegionsRequest = /*@__PURE__*/ S.suspend(() =>
3005
3681
  S.Struct({}).pipe(
3006
- T.Http({ method: "GET", uri: "/platform/regions", code: 200 }),
3682
+ T.Http({ method: "GET", uri: "/v1/platform/regions", code: 200 }),
3007
3683
  ),
3008
3684
  ).annotate({
3009
3685
  identifier: "GetRegionsRequest",
@@ -3016,6 +3692,7 @@ export interface MainRegionRow {
3016
3692
  geo_region?: string;
3017
3693
  latitude?: number;
3018
3694
  longitude?: number;
3695
+ mpg_available?: boolean;
3019
3696
  name?: string;
3020
3697
  requires_paid_plan?: boolean;
3021
3698
  }
@@ -3027,6 +3704,7 @@ export const MainRegionRow = /*@__PURE__*/ S.suspend(() =>
3027
3704
  geo_region: S.optional(S.String),
3028
3705
  latitude: S.optional(S.Number),
3029
3706
  longitude: S.optional(S.Number),
3707
+ mpg_available: S.optional(S.Boolean),
3030
3708
  name: S.optional(S.String),
3031
3709
  requires_paid_plan: S.optional(S.Boolean),
3032
3710
  }),
@@ -3069,7 +3747,7 @@ export const GetSecretRequest = /*@__PURE__*/ S.suspend(() =>
3069
3747
  }).pipe(
3070
3748
  T.Http({
3071
3749
  method: "GET",
3072
- uri: "/apps/{app_name}/secrets/{secret_name}",
3750
+ uri: "/v1/apps/{app_name}/secrets/{secret_name}",
3073
3751
  code: 200,
3074
3752
  }),
3075
3753
  ),
@@ -3110,7 +3788,7 @@ export const GetSecretKeyRequest = /*@__PURE__*/ S.suspend(() =>
3110
3788
  }).pipe(
3111
3789
  T.Http({
3112
3790
  method: "GET",
3113
- uri: "/apps/{app_name}/secretkeys/{secret_name}",
3791
+ uri: "/v1/apps/{app_name}/secretkeys/{secret_name}",
3114
3792
  code: 200,
3115
3793
  }),
3116
3794
  ),
@@ -3148,7 +3826,7 @@ export const GetVolumeByIdRequest = /*@__PURE__*/ S.suspend(() =>
3148
3826
  }).pipe(
3149
3827
  T.Http({
3150
3828
  method: "GET",
3151
- uri: "/apps/{app_name}/volumes/{volume_id}",
3829
+ uri: "/v1/apps/{app_name}/volumes/{volume_id}",
3152
3830
  code: 200,
3153
3831
  }),
3154
3832
  ),
@@ -3173,7 +3851,11 @@ export const ListAppCertificatesRequest = /*@__PURE__*/ S.suspend(() =>
3173
3851
  cursor: S.optional(S.String.pipe(T.Query())),
3174
3852
  limit: S.optional(S.Number.pipe(T.Query())),
3175
3853
  }).pipe(
3176
- T.Http({ method: "GET", uri: "/apps/{app_name}/certificates", code: 200 }),
3854
+ T.Http({
3855
+ method: "GET",
3856
+ uri: "/v1/apps/{app_name}/certificates",
3857
+ code: 200,
3858
+ }),
3177
3859
  ),
3178
3860
  ).annotate({
3179
3861
  identifier: "ListAppCertificatesRequest",
@@ -3245,7 +3927,7 @@ export const ListAppIPAssignmentsRequest = /*@__PURE__*/ S.suspend(() =>
3245
3927
  }).pipe(
3246
3928
  T.Http({
3247
3929
  method: "GET",
3248
- uri: "/apps/{app_name}/ip_assignments",
3930
+ uri: "/v1/apps/{app_name}/ip_assignments",
3249
3931
  code: 200,
3250
3932
  }),
3251
3933
  ),
@@ -3253,6 +3935,27 @@ export const ListAppIPAssignmentsRequest = /*@__PURE__*/ S.suspend(() =>
3253
3935
  identifier: "ListAppIPAssignmentsRequest",
3254
3936
  }) as any as S.Schema<ListAppIPAssignmentsRequest>;
3255
3937
 
3938
+ export interface IPAssignment {
3939
+ created_at?: string;
3940
+ egress?: boolean;
3941
+ ip?: string;
3942
+ region?: string;
3943
+ service_name?: string;
3944
+ shared?: boolean;
3945
+ type?: string;
3946
+ }
3947
+ export const IPAssignment = /*@__PURE__*/ S.suspend(() =>
3948
+ S.Struct({
3949
+ created_at: S.optional(S.String),
3950
+ egress: S.optional(S.Boolean),
3951
+ ip: S.optional(S.String),
3952
+ region: S.optional(S.String),
3953
+ service_name: S.optional(S.String),
3954
+ shared: S.optional(S.Boolean),
3955
+ type: S.optional(S.String),
3956
+ }),
3957
+ ).annotate({ identifier: "IPAssignment" }) as any as S.Schema<IPAssignment>;
3958
+
3256
3959
  export type ListIPAssignmentsResponseIpsList = Array<IPAssignment>;
3257
3960
  export const ListIPAssignmentsResponseIpsList = /*@__PURE__*/ S.Array(
3258
3961
  IPAssignment,
@@ -3279,7 +3982,7 @@ export const ListAppsRequest = /*@__PURE__*/ S.suspend(() =>
3279
3982
  S.Struct({
3280
3983
  org_slug: S.String.pipe(T.Query()),
3281
3984
  app_role: S.optional(S.String.pipe(T.Query())),
3282
- }).pipe(T.Http({ method: "GET", uri: "/apps", code: 200 })),
3985
+ }).pipe(T.Http({ method: "GET", uri: "/v1/apps", code: 200 })),
3283
3986
  ).annotate({
3284
3987
  identifier: "ListAppsRequest",
3285
3988
  }) as any as S.Schema<ListAppsRequest>;
@@ -3318,7 +4021,7 @@ export const ListMachineEventsRequest = /*@__PURE__*/ S.suspend(() =>
3318
4021
  }).pipe(
3319
4022
  T.Http({
3320
4023
  method: "GET",
3321
- uri: "/apps/{app_name}/machines/{machine_id}/events",
4024
+ uri: "/v1/apps/{app_name}/machines/{machine_id}/events",
3322
4025
  code: 200,
3323
4026
  }),
3324
4027
  ),
@@ -3357,7 +4060,7 @@ export const ListMachineProcessesRequest = /*@__PURE__*/ S.suspend(() =>
3357
4060
  }).pipe(
3358
4061
  T.Http({
3359
4062
  method: "GET",
3360
- uri: "/apps/{app_name}/machines/{machine_id}/ps",
4063
+ uri: "/v1/apps/{app_name}/machines/{machine_id}/ps",
3361
4064
  code: 200,
3362
4065
  }),
3363
4066
  ),
@@ -3421,22 +4124,28 @@ export interface ListMachinesRequest {
3421
4124
  app_name: string;
3422
4125
  /** Include deleted machines */
3423
4126
  include_deleted?: boolean;
4127
+ /** Include machine leases */
4128
+ include_leases?: boolean;
3424
4129
  /** Region filter */
3425
4130
  region?: string;
3426
4131
  /** comma separated list of states to filter (created, started, stopped, suspended) */
3427
4132
  state?: string;
3428
4133
  /** Only return summary info about machines (omit config, checks, events, host_status, nonce, etc.) */
3429
4134
  summary?: boolean;
4135
+ /** 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. */
4136
+ metadata__key_?: string;
3430
4137
  }
3431
4138
  export const ListMachinesRequest = /*@__PURE__*/ S.suspend(() =>
3432
4139
  S.Struct({
3433
4140
  app_name: S.String.pipe(T.Label()),
3434
4141
  include_deleted: S.optional(S.Boolean.pipe(T.Query())),
4142
+ include_leases: S.optional(S.Boolean.pipe(T.Query())),
3435
4143
  region: S.optional(S.String.pipe(T.Query())),
3436
4144
  state: S.optional(S.String.pipe(T.Query())),
3437
4145
  summary: S.optional(S.Boolean.pipe(T.Query())),
4146
+ metadata__key_: S.optional(S.String.pipe(T.Query("metadata.{key}"))),
3438
4147
  }).pipe(
3439
- T.Http({ method: "GET", uri: "/apps/{app_name}/machines", code: 200 }),
4148
+ T.Http({ method: "GET", uri: "/v1/apps/{app_name}/machines", code: 200 }),
3440
4149
  ),
3441
4150
  ).annotate({
3442
4151
  identifier: "ListMachinesRequest",
@@ -3454,51 +4163,7 @@ export const ListMachinesResponse = /*@__PURE__*/ S.suspend(() =>
3454
4163
  identifier: "ListMachinesResponse",
3455
4164
  }) as any as S.Schema<ListMachinesResponse>;
3456
4165
 
3457
- export interface ListMachineVersionsRequest {
3458
- /** Fly App Name */
3459
- app_name: string;
3460
- /** Machine ID */
3461
- machine_id: string;
3462
- }
3463
- export const ListMachineVersionsRequest = /*@__PURE__*/ S.suspend(() =>
3464
- S.Struct({
3465
- app_name: S.String.pipe(T.Label()),
3466
- machine_id: S.String.pipe(T.Label()),
3467
- }).pipe(
3468
- T.Http({
3469
- method: "GET",
3470
- uri: "/apps/{app_name}/machines/{machine_id}/versions",
3471
- code: 200,
3472
- }),
3473
- ),
3474
- ).annotate({
3475
- identifier: "ListMachineVersionsRequest",
3476
- }) as any as S.Schema<ListMachineVersionsRequest>;
3477
-
3478
- export interface MachineVersion {
3479
- user_config?: FlyMachineConfig;
3480
- version?: string;
3481
- }
3482
- export const MachineVersion = /*@__PURE__*/ S.suspend(() =>
3483
- S.Struct({
3484
- user_config: S.optional(FlyMachineConfig),
3485
- version: S.optional(S.String),
3486
- }),
3487
- ).annotate({ identifier: "MachineVersion" }) as any as S.Schema<MachineVersion>;
3488
-
3489
- export type ListMachineVersionsResponseBodyList = Array<MachineVersion>;
3490
- export const ListMachineVersionsResponseBodyList = /*@__PURE__*/ S.Array(
3491
- MachineVersion,
3492
- ) as any as S.Schema<ListMachineVersionsResponseBodyList>;
3493
-
3494
- export type ListMachineVersionsResponse = ListMachineVersionsResponseBodyList;
3495
- export const ListMachineVersionsResponse = /*@__PURE__*/ S.suspend(() =>
3496
- ListMachineVersionsResponseBodyList.pipe(T.RawResponseRoot()),
3497
- ).annotate({
3498
- identifier: "ListMachineVersionsResponse",
3499
- }) as any as S.Schema<ListMachineVersionsResponse>;
3500
-
3501
- export interface ListOrgMachinesRequest {
4166
+ export interface ListMachinesOrgRequest {
3502
4167
  /** Fly Organization Slug */
3503
4168
  org_slug: string;
3504
4169
  /** Include deleted machines */
@@ -3516,7 +4181,7 @@ export interface ListOrgMachinesRequest {
3516
4181
  /** The number of machines to fetch (max of 1000). This limit is advisory. Responses may be shorter, or even empty, even when more machines remain. If omitted, the maximum is used */
3517
4182
  limit?: number;
3518
4183
  }
3519
- export const ListOrgMachinesRequest = /*@__PURE__*/ S.suspend(() =>
4184
+ export const ListMachinesOrgRequest = /*@__PURE__*/ S.suspend(() =>
3520
4185
  S.Struct({
3521
4186
  org_slug: S.String.pipe(T.Label()),
3522
4187
  include_deleted: S.optional(S.Boolean.pipe(T.Query())),
@@ -3527,11 +4192,11 @@ export const ListOrgMachinesRequest = /*@__PURE__*/ S.suspend(() =>
3527
4192
  cursor: S.optional(S.String.pipe(T.Query())),
3528
4193
  limit: S.optional(S.Number.pipe(T.Query())),
3529
4194
  }).pipe(
3530
- T.Http({ method: "GET", uri: "/orgs/{org_slug}/machines", code: 200 }),
4195
+ T.Http({ method: "GET", uri: "/v1/orgs/{org_slug}/machines", code: 200 }),
3531
4196
  ),
3532
4197
  ).annotate({
3533
- identifier: "ListOrgMachinesRequest",
3534
- }) as any as S.Schema<ListOrgMachinesRequest>;
4198
+ identifier: "ListMachinesOrgRequest",
4199
+ }) as any as S.Schema<ListMachinesOrgRequest>;
3535
4200
 
3536
4201
  export type OrgMachinesResponseErrorRegionsList = Array<string>;
3537
4202
  export const OrgMachinesResponseErrorRegionsList = /*@__PURE__*/ S.Array(
@@ -3612,121 +4277,346 @@ export const OrgMachinesResponse = /*@__PURE__*/ S.suspend(() =>
3612
4277
  identifier: "OrgMachinesResponse",
3613
4278
  }) as any as S.Schema<OrgMachinesResponse>;
3614
4279
 
3615
- export interface ListOrgVolumesRequest {
3616
- /** Fly Organization Slug */
3617
- org_slug: string;
3618
- /** Include deleted volumes */
3619
- include_deleted?: boolean;
3620
- /** Region filter */
3621
- region?: string;
3622
- /** Comma separated list of volume states to filter */
3623
- state?: string;
3624
- /** Only return summary info about volumes (omit blocks, block size, etc) */
3625
- summary?: boolean;
3626
- /** Only return volumes updated after this time. Timestamp must be in the RFC 3339 format */
3627
- updated_after?: string;
3628
- /** Pagination cursor from previous response (takes precedence over updated_after) */
3629
- cursor?: string;
3630
- /** The number of volumes to fetch (max of 1000). This limit is advisory. Responses may be shorter, even when more volumes remain. If omitted, the maximum is used */
3631
- limit?: number;
4280
+ export interface ListMachineVersionsRequest {
4281
+ /** Fly App Name */
4282
+ app_name: string;
4283
+ /** Machine ID */
4284
+ machine_id: string;
3632
4285
  }
3633
- export const ListOrgVolumesRequest = /*@__PURE__*/ S.suspend(() =>
4286
+ export const ListMachineVersionsRequest = /*@__PURE__*/ S.suspend(() =>
3634
4287
  S.Struct({
3635
- org_slug: S.String.pipe(T.Label()),
3636
- include_deleted: S.optional(S.Boolean.pipe(T.Query())),
3637
- region: S.optional(S.String.pipe(T.Query())),
3638
- state: S.optional(S.String.pipe(T.Query())),
3639
- summary: S.optional(S.Boolean.pipe(T.Query())),
3640
- updated_after: S.optional(S.String.pipe(T.Query())),
3641
- cursor: S.optional(S.String.pipe(T.Query())),
3642
- limit: S.optional(S.Number.pipe(T.Query())),
4288
+ app_name: S.String.pipe(T.Label()),
4289
+ machine_id: S.String.pipe(T.Label()),
3643
4290
  }).pipe(
3644
- T.Http({ method: "GET", uri: "/orgs/{org_slug}/volumes", code: 200 }),
4291
+ T.Http({
4292
+ method: "GET",
4293
+ uri: "/v1/apps/{app_name}/machines/{machine_id}/versions",
4294
+ code: 200,
4295
+ }),
3645
4296
  ),
3646
4297
  ).annotate({
3647
- identifier: "ListOrgVolumesRequest",
3648
- }) as any as S.Schema<ListOrgVolumesRequest>;
4298
+ identifier: "ListMachineVersionsRequest",
4299
+ }) as any as S.Schema<ListMachineVersionsRequest>;
3649
4300
 
3650
- export type OrgVolumeHostStatus = "ok" | "unknown" | "unreachable";
3651
- export const OrgVolumeHostStatus = /*@__PURE__*/ S.String;
4301
+ export interface MachineVersion {
4302
+ user_config?: FlyMachineConfig;
4303
+ version?: string;
4304
+ }
4305
+ export const MachineVersion = /*@__PURE__*/ S.suspend(() =>
4306
+ S.Struct({
4307
+ user_config: S.optional(FlyMachineConfig),
4308
+ version: S.optional(S.String),
4309
+ }),
4310
+ ).annotate({ identifier: "MachineVersion" }) as any as S.Schema<MachineVersion>;
3652
4311
 
3653
- export type OrgVolumeType = "local" | "cache";
3654
- export const OrgVolumeType = /*@__PURE__*/ S.String;
4312
+ export type ListMachineVersionsResponseBodyList = Array<MachineVersion>;
4313
+ export const ListMachineVersionsResponseBodyList = /*@__PURE__*/ S.Array(
4314
+ MachineVersion,
4315
+ ) as any as S.Schema<ListMachineVersionsResponseBodyList>;
3655
4316
 
3656
- export interface OrgVolume {
3657
- app_name?: string;
3658
- attached_alloc_id?: string;
3659
- attached_machine_id?: string;
3660
- auto_backup_enabled?: boolean;
3661
- block_size?: number;
3662
- blocks?: number;
3663
- blocks_avail?: number;
3664
- blocks_free?: number;
3665
- bytes_total?: number;
3666
- bytes_used?: number;
4317
+ export type ListMachineVersionsResponse = ListMachineVersionsResponseBodyList;
4318
+ export const ListMachineVersionsResponse = /*@__PURE__*/ S.suspend(() =>
4319
+ ListMachineVersionsResponseBodyList.pipe(T.RawResponseRoot()),
4320
+ ).annotate({
4321
+ identifier: "ListMachineVersionsResponse",
4322
+ }) as any as S.Schema<ListMachineVersionsResponse>;
4323
+
4324
+ export interface ListPostgresRequest {
4325
+ /** Fly Organization Slug */
4326
+ org_slug: string;
4327
+ /** Include deleted clusters */
4328
+ include_deleted?: boolean;
4329
+ }
4330
+ export const ListPostgresRequest = /*@__PURE__*/ S.suspend(() =>
4331
+ S.Struct({
4332
+ org_slug: S.String.pipe(T.Query()),
4333
+ include_deleted: S.optional(S.Boolean.pipe(T.Query())),
4334
+ }).pipe(T.Http({ method: "GET", uri: "/v1/postgres", code: 200 })),
4335
+ ).annotate({
4336
+ identifier: "ListPostgresRequest",
4337
+ }) as any as S.Schema<ListPostgresRequest>;
4338
+
4339
+ /** Apps attached to the cluster. */
4340
+ export type PostgresClusterSummaryAttachedAppsList = Array<PostgresAttachedApp>;
4341
+ export const PostgresClusterSummaryAttachedAppsList = /*@__PURE__*/ S.Array(
4342
+ PostgresAttachedApp,
4343
+ ) as any as S.Schema<PostgresClusterSummaryAttachedAppsList>;
4344
+
4345
+ /** Plan slug. */
4346
+ export type PostgresClusterSummaryPlan =
4347
+ | "basic"
4348
+ | "starter"
4349
+ | "launch"
4350
+ | "scale"
4351
+ | "Performance";
4352
+ export const PostgresClusterSummaryPlan = /*@__PURE__*/ S.String;
4353
+
4354
+ /** Current lifecycle status. */
4355
+ export type PostgresClusterSummaryStatus =
4356
+ | "creating"
4357
+ | "initializing"
4358
+ | "ready"
4359
+ | "deleting"
4360
+ | "deleted"
4361
+ | "failed";
4362
+ export const PostgresClusterSummaryStatus = /*@__PURE__*/ S.String;
4363
+
4364
+ export interface PostgresClusterSummary {
4365
+ /** Apps attached to the cluster. */
4366
+ attached_apps?: PostgresClusterSummaryAttachedAppsList;
4367
+ /** RFC 3339 creation timestamp. */
3667
4368
  created_at?: string;
3668
- encrypted?: boolean;
3669
- fstype?: string;
3670
- host_status?: OrgVolumeHostStatus;
4369
+ /** RFC 3339 deletion timestamp; present for deleted clusters. */
4370
+ deleted_at?: string;
4371
+ /** Cluster ID. */
3671
4372
  id?: string;
4373
+ /** Cluster name. */
3672
4374
  name?: string;
4375
+ /** Plan slug. */
4376
+ plan?: PostgresClusterSummaryPlan;
4377
+ /** Fly region code. */
3673
4378
  region?: string;
3674
- size_gb?: number;
3675
- snapshot_retention?: number;
3676
- state?: string;
3677
- type?: OrgVolumeType;
3678
- updated_at?: string;
3679
- zone?: string;
4379
+ /** Current lifecycle status. */
4380
+ status?: PostgresClusterSummaryStatus;
3680
4381
  }
3681
- export const OrgVolume = /*@__PURE__*/ S.suspend(() =>
4382
+ export const PostgresClusterSummary = /*@__PURE__*/ S.suspend(() =>
3682
4383
  S.Struct({
3683
- app_name: S.optional(S.String),
3684
- attached_alloc_id: S.optional(S.String),
3685
- attached_machine_id: S.optional(S.String),
3686
- auto_backup_enabled: S.optional(S.Boolean),
3687
- block_size: S.optional(S.Number),
3688
- blocks: S.optional(S.Number),
3689
- blocks_avail: S.optional(S.Number),
3690
- blocks_free: S.optional(S.Number),
3691
- bytes_total: S.optional(S.Number),
3692
- bytes_used: S.optional(S.Number),
4384
+ attached_apps: S.optional(PostgresClusterSummaryAttachedAppsList),
3693
4385
  created_at: S.optional(S.String),
3694
- encrypted: S.optional(S.Boolean),
3695
- fstype: S.optional(S.String),
3696
- host_status: S.optional(OrgVolumeHostStatus),
4386
+ deleted_at: S.optional(S.String),
3697
4387
  id: S.optional(S.String),
3698
4388
  name: S.optional(S.String),
4389
+ plan: S.optional(PostgresClusterSummaryPlan),
3699
4390
  region: S.optional(S.String),
3700
- size_gb: S.optional(S.Number),
3701
- snapshot_retention: S.optional(S.Number),
3702
- state: S.optional(S.String),
3703
- type: S.optional(OrgVolumeType),
3704
- updated_at: S.optional(S.String),
3705
- zone: S.optional(S.String),
4391
+ status: S.optional(PostgresClusterSummaryStatus),
3706
4392
  }),
3707
- ).annotate({ identifier: "OrgVolume" }) as any as S.Schema<OrgVolume>;
4393
+ ).annotate({
4394
+ identifier: "PostgresClusterSummary",
4395
+ }) as any as S.Schema<PostgresClusterSummary>;
3708
4396
 
3709
- export type OrgVolumesResponseVolumesList = Array<OrgVolume>;
3710
- export const OrgVolumesResponseVolumesList = /*@__PURE__*/ S.Array(
3711
- OrgVolume,
3712
- ) as any as S.Schema<OrgVolumesResponseVolumesList>;
4397
+ export type ListPostgresClustersResponseDataList =
4398
+ Array<PostgresClusterSummary>;
4399
+ export const ListPostgresClustersResponseDataList = /*@__PURE__*/ S.Array(
4400
+ PostgresClusterSummary,
4401
+ ) as any as S.Schema<ListPostgresClustersResponseDataList>;
3713
4402
 
3714
- export interface OrgVolumesResponse {
3715
- last_updated_at?: string;
3716
- last_volume_id?: string;
3717
- next_cursor?: string;
3718
- volumes?: OrgVolumesResponseVolumesList;
4403
+ export interface ListPostgresClustersResponse {
4404
+ data?: ListPostgresClustersResponseDataList;
3719
4405
  }
3720
- export const OrgVolumesResponse = /*@__PURE__*/ S.suspend(() =>
4406
+ export const ListPostgresClustersResponse = /*@__PURE__*/ S.suspend(() =>
3721
4407
  S.Struct({
3722
- last_updated_at: S.optional(S.String),
3723
- last_volume_id: S.optional(S.String),
3724
- next_cursor: S.optional(S.String),
3725
- volumes: S.optional(OrgVolumesResponseVolumesList),
4408
+ data: S.optional(ListPostgresClustersResponseDataList),
3726
4409
  }),
3727
4410
  ).annotate({
3728
- identifier: "OrgVolumesResponse",
3729
- }) as any as S.Schema<OrgVolumesResponse>;
4411
+ identifier: "ListPostgresClustersResponse",
4412
+ }) as any as S.Schema<ListPostgresClustersResponse>;
4413
+
4414
+ export interface ListPostgresBackupsRequest {
4415
+ /** Managed Postgres Cluster ID */
4416
+ postgres_cluster_id: string;
4417
+ }
4418
+ export const ListPostgresBackupsRequest = /*@__PURE__*/ S.suspend(() =>
4419
+ S.Struct({
4420
+ postgres_cluster_id: S.String.pipe(T.Label()),
4421
+ }).pipe(
4422
+ T.Http({
4423
+ method: "GET",
4424
+ uri: "/v1/postgres/{postgres_cluster_id}/backups",
4425
+ code: 200,
4426
+ }),
4427
+ ),
4428
+ ).annotate({
4429
+ identifier: "ListPostgresBackupsRequest",
4430
+ }) as any as S.Schema<ListPostgresBackupsRequest>;
4431
+
4432
+ /** Backup type. */
4433
+ export type PostgresBackupType = "full" | "incr" | "diff";
4434
+ export const PostgresBackupType = /*@__PURE__*/ S.String;
4435
+
4436
+ export interface PostgresBackup {
4437
+ /** RFC 3339 stop timestamp. */
4438
+ finished_at?: string;
4439
+ /** Backup ID. */
4440
+ id?: string;
4441
+ /** Backup size in bytes. */
4442
+ size_bytes?: number;
4443
+ /** RFC 3339 start timestamp. */
4444
+ started_at?: string;
4445
+ /** Backup status. */
4446
+ status?: string;
4447
+ /** Backup type. */
4448
+ type?: PostgresBackupType;
4449
+ }
4450
+ export const PostgresBackup = /*@__PURE__*/ S.suspend(() =>
4451
+ S.Struct({
4452
+ finished_at: S.optional(S.String),
4453
+ id: S.optional(S.String),
4454
+ size_bytes: S.optional(S.Number),
4455
+ started_at: S.optional(S.String),
4456
+ status: S.optional(S.String),
4457
+ type: S.optional(PostgresBackupType),
4458
+ }),
4459
+ ).annotate({ identifier: "PostgresBackup" }) as any as S.Schema<PostgresBackup>;
4460
+
4461
+ export type ListPostgresBackupsResponseDataList = Array<PostgresBackup>;
4462
+ export const ListPostgresBackupsResponseDataList = /*@__PURE__*/ S.Array(
4463
+ PostgresBackup,
4464
+ ) as any as S.Schema<ListPostgresBackupsResponseDataList>;
4465
+
4466
+ export interface ListPostgresBackupsResponse {
4467
+ data?: ListPostgresBackupsResponseDataList;
4468
+ }
4469
+ export const ListPostgresBackupsResponse = /*@__PURE__*/ S.suspend(() =>
4470
+ S.Struct({
4471
+ data: S.optional(ListPostgresBackupsResponseDataList),
4472
+ }),
4473
+ ).annotate({
4474
+ identifier: "ListPostgresBackupsResponse",
4475
+ }) as any as S.Schema<ListPostgresBackupsResponse>;
4476
+
4477
+ export interface ListPostgresDatabasesRequest {
4478
+ /** Managed Postgres Cluster ID */
4479
+ postgres_cluster_id: string;
4480
+ }
4481
+ export const ListPostgresDatabasesRequest = /*@__PURE__*/ S.suspend(() =>
4482
+ S.Struct({
4483
+ postgres_cluster_id: S.String.pipe(T.Label()),
4484
+ }).pipe(
4485
+ T.Http({
4486
+ method: "GET",
4487
+ uri: "/v1/postgres/{postgres_cluster_id}/databases",
4488
+ code: 200,
4489
+ }),
4490
+ ),
4491
+ ).annotate({
4492
+ identifier: "ListPostgresDatabasesRequest",
4493
+ }) as any as S.Schema<ListPostgresDatabasesRequest>;
4494
+
4495
+ export type ListPostgresDatabasesResponseDataList = Array<PostgresDatabase>;
4496
+ export const ListPostgresDatabasesResponseDataList = /*@__PURE__*/ S.Array(
4497
+ PostgresDatabase,
4498
+ ) as any as S.Schema<ListPostgresDatabasesResponseDataList>;
4499
+
4500
+ export interface ListPostgresDatabasesResponse {
4501
+ data?: ListPostgresDatabasesResponseDataList;
4502
+ }
4503
+ export const ListPostgresDatabasesResponse = /*@__PURE__*/ S.suspend(() =>
4504
+ S.Struct({
4505
+ data: S.optional(ListPostgresDatabasesResponseDataList),
4506
+ }),
4507
+ ).annotate({
4508
+ identifier: "ListPostgresDatabasesResponse",
4509
+ }) as any as S.Schema<ListPostgresDatabasesResponse>;
4510
+
4511
+ export interface ListPostgresExtensionsRequest {
4512
+ /** Managed Postgres Cluster ID */
4513
+ postgres_cluster_id: string;
4514
+ /** Database Name */
4515
+ database_name: string;
4516
+ }
4517
+ export const ListPostgresExtensionsRequest = /*@__PURE__*/ S.suspend(() =>
4518
+ S.Struct({
4519
+ postgres_cluster_id: S.String.pipe(T.Label()),
4520
+ database_name: S.String.pipe(T.Label()),
4521
+ }).pipe(
4522
+ T.Http({
4523
+ method: "GET",
4524
+ uri: "/v1/postgres/{postgres_cluster_id}/databases/{database_name}/extensions",
4525
+ code: 200,
4526
+ }),
4527
+ ),
4528
+ ).annotate({
4529
+ identifier: "ListPostgresExtensionsRequest",
4530
+ }) as any as S.Schema<ListPostgresExtensionsRequest>;
4531
+
4532
+ export interface PostgresInstalledExtension {
4533
+ /** Schema the extension is installed into. */
4534
+ schema?: string;
4535
+ /** Installed version. */
4536
+ version?: string;
4537
+ }
4538
+ export const PostgresInstalledExtension = /*@__PURE__*/ S.suspend(() =>
4539
+ S.Struct({
4540
+ schema: S.optional(S.String),
4541
+ version: S.optional(S.String),
4542
+ }),
4543
+ ).annotate({
4544
+ identifier: "PostgresInstalledExtension",
4545
+ }) as any as S.Schema<PostgresInstalledExtension>;
4546
+
4547
+ export interface PostgresExtension {
4548
+ /** Default version installed when enabled. */
4549
+ default_version?: string;
4550
+ /** Human-readable description. */
4551
+ description?: string;
4552
+ /** Installation details, or null when the extension is not installed. */
4553
+ installed?: PostgresInstalledExtension;
4554
+ /** Extension name. */
4555
+ name?: string;
4556
+ /** Whether this is a system extension that cannot be disabled. */
4557
+ system?: boolean;
4558
+ }
4559
+ export const PostgresExtension = /*@__PURE__*/ S.suspend(() =>
4560
+ S.Struct({
4561
+ default_version: S.optional(S.String),
4562
+ description: S.optional(S.String),
4563
+ installed: S.optional(PostgresInstalledExtension),
4564
+ name: S.optional(S.String),
4565
+ system: S.optional(S.Boolean),
4566
+ }),
4567
+ ).annotate({
4568
+ identifier: "PostgresExtension",
4569
+ }) as any as S.Schema<PostgresExtension>;
4570
+
4571
+ export type ListPostgresExtensionsResponseDataList = Array<PostgresExtension>;
4572
+ export const ListPostgresExtensionsResponseDataList = /*@__PURE__*/ S.Array(
4573
+ PostgresExtension,
4574
+ ) as any as S.Schema<ListPostgresExtensionsResponseDataList>;
4575
+
4576
+ export interface ListPostgresExtensionsResponse {
4577
+ data?: ListPostgresExtensionsResponseDataList;
4578
+ }
4579
+ export const ListPostgresExtensionsResponse = /*@__PURE__*/ S.suspend(() =>
4580
+ S.Struct({
4581
+ data: S.optional(ListPostgresExtensionsResponseDataList),
4582
+ }),
4583
+ ).annotate({
4584
+ identifier: "ListPostgresExtensionsResponse",
4585
+ }) as any as S.Schema<ListPostgresExtensionsResponse>;
4586
+
4587
+ export interface ListPostgresUsersRequest {
4588
+ /** Managed Postgres Cluster ID */
4589
+ postgres_cluster_id: string;
4590
+ }
4591
+ export const ListPostgresUsersRequest = /*@__PURE__*/ S.suspend(() =>
4592
+ S.Struct({
4593
+ postgres_cluster_id: S.String.pipe(T.Label()),
4594
+ }).pipe(
4595
+ T.Http({
4596
+ method: "GET",
4597
+ uri: "/v1/postgres/{postgres_cluster_id}/users",
4598
+ code: 200,
4599
+ }),
4600
+ ),
4601
+ ).annotate({
4602
+ identifier: "ListPostgresUsersRequest",
4603
+ }) as any as S.Schema<ListPostgresUsersRequest>;
4604
+
4605
+ export type ListPostgresUsersResponseDataList = Array<PostgresUser>;
4606
+ export const ListPostgresUsersResponseDataList = /*@__PURE__*/ S.Array(
4607
+ PostgresUser,
4608
+ ) as any as S.Schema<ListPostgresUsersResponseDataList>;
4609
+
4610
+ export interface ListPostgresUsersResponse {
4611
+ data?: ListPostgresUsersResponseDataList;
4612
+ }
4613
+ export const ListPostgresUsersResponse = /*@__PURE__*/ S.suspend(() =>
4614
+ S.Struct({
4615
+ data: S.optional(ListPostgresUsersResponseDataList),
4616
+ }),
4617
+ ).annotate({
4618
+ identifier: "ListPostgresUsersResponse",
4619
+ }) as any as S.Schema<ListPostgresUsersResponse>;
3730
4620
 
3731
4621
  export interface ListSecretKeysRequest {
3732
4622
  /** Fly App Name */
@@ -3742,7 +4632,7 @@ export const ListSecretKeysRequest = /*@__PURE__*/ S.suspend(() =>
3742
4632
  min_version: S.optional(S.String.pipe(T.Query())),
3743
4633
  types: S.optional(S.String.pipe(T.Query())),
3744
4634
  }).pipe(
3745
- T.Http({ method: "GET", uri: "/apps/{app_name}/secretkeys", code: 200 }),
4635
+ T.Http({ method: "GET", uri: "/v1/apps/{app_name}/secretkeys", code: 200 }),
3746
4636
  ),
3747
4637
  ).annotate({
3748
4638
  identifier: "ListSecretKeysRequest",
@@ -3776,7 +4666,7 @@ export const ListSecretsRequest = /*@__PURE__*/ S.suspend(() =>
3776
4666
  min_version: S.optional(S.String.pipe(T.Query())),
3777
4667
  show_secrets: S.optional(S.Boolean.pipe(T.Query())),
3778
4668
  }).pipe(
3779
- T.Http({ method: "GET", uri: "/apps/{app_name}/secrets", code: 200 }),
4669
+ T.Http({ method: "GET", uri: "/v1/apps/{app_name}/secrets", code: 200 }),
3780
4670
  ),
3781
4671
  ).annotate({
3782
4672
  identifier: "ListSecretsRequest",
@@ -3807,7 +4697,7 @@ export const ListVolumesRequest = /*@__PURE__*/ S.suspend(() =>
3807
4697
  app_name: S.String.pipe(T.Label()),
3808
4698
  summary: S.optional(S.Boolean.pipe(T.Query())),
3809
4699
  }).pipe(
3810
- T.Http({ method: "GET", uri: "/apps/{app_name}/volumes", code: 200 }),
4700
+ T.Http({ method: "GET", uri: "/v1/apps/{app_name}/volumes", code: 200 }),
3811
4701
  ),
3812
4702
  ).annotate({
3813
4703
  identifier: "ListVolumesRequest",
@@ -3838,7 +4728,7 @@ export const ListVolumeSnapshotsRequest = /*@__PURE__*/ S.suspend(() =>
3838
4728
  }).pipe(
3839
4729
  T.Http({
3840
4730
  method: "GET",
3841
- uri: "/apps/{app_name}/volumes/{volume_id}/snapshots",
4731
+ uri: "/v1/apps/{app_name}/volumes/{volume_id}/snapshots",
3842
4732
  code: 200,
3843
4733
  }),
3844
4734
  ),
@@ -3879,6 +4769,150 @@ export const ListVolumeSnapshotsResponse = /*@__PURE__*/ S.suspend(() =>
3879
4769
  identifier: "ListVolumeSnapshotsResponse",
3880
4770
  }) as any as S.Schema<ListVolumeSnapshotsResponse>;
3881
4771
 
4772
+ export interface ListVolumesOrgRequest {
4773
+ /** Fly Organization Slug */
4774
+ org_slug: string;
4775
+ /** Include deleted volumes */
4776
+ include_deleted?: boolean;
4777
+ /** Region filter */
4778
+ region?: string;
4779
+ /** Comma separated list of volume states to filter */
4780
+ state?: string;
4781
+ /** Only return summary info about volumes (omit blocks, block size, etc) */
4782
+ summary?: boolean;
4783
+ /** Only return volumes updated after this time. Timestamp must be in the RFC 3339 format */
4784
+ updated_after?: string;
4785
+ /** Pagination cursor from previous response (takes precedence over updated_after) */
4786
+ cursor?: string;
4787
+ /** The number of volumes to fetch (max of 1000). This limit is advisory. Responses may be shorter, even when more volumes remain. If omitted, the maximum is used */
4788
+ limit?: number;
4789
+ }
4790
+ export const ListVolumesOrgRequest = /*@__PURE__*/ S.suspend(() =>
4791
+ S.Struct({
4792
+ org_slug: S.String.pipe(T.Label()),
4793
+ include_deleted: S.optional(S.Boolean.pipe(T.Query())),
4794
+ region: S.optional(S.String.pipe(T.Query())),
4795
+ state: S.optional(S.String.pipe(T.Query())),
4796
+ summary: S.optional(S.Boolean.pipe(T.Query())),
4797
+ updated_after: S.optional(S.String.pipe(T.Query())),
4798
+ cursor: S.optional(S.String.pipe(T.Query())),
4799
+ limit: S.optional(S.Number.pipe(T.Query())),
4800
+ }).pipe(
4801
+ T.Http({ method: "GET", uri: "/v1/orgs/{org_slug}/volumes", code: 200 }),
4802
+ ),
4803
+ ).annotate({
4804
+ identifier: "ListVolumesOrgRequest",
4805
+ }) as any as S.Schema<ListVolumesOrgRequest>;
4806
+
4807
+ export type OrgVolumeHostStatus = "ok" | "unknown" | "unreachable";
4808
+ export const OrgVolumeHostStatus = /*@__PURE__*/ S.String;
4809
+
4810
+ export type OrgVolumeType = "local" | "cache";
4811
+ export const OrgVolumeType = /*@__PURE__*/ S.String;
4812
+
4813
+ export interface OrgVolume {
4814
+ app_name?: string;
4815
+ attached_alloc_id?: string;
4816
+ attached_machine_id?: string;
4817
+ auto_backup_enabled?: boolean;
4818
+ block_size?: number;
4819
+ blocks?: number;
4820
+ blocks_avail?: number;
4821
+ blocks_free?: number;
4822
+ bytes_total?: number;
4823
+ bytes_used?: number;
4824
+ created_at?: string;
4825
+ encrypted?: boolean;
4826
+ fstype?: string;
4827
+ host_status?: OrgVolumeHostStatus;
4828
+ id?: string;
4829
+ name?: string;
4830
+ region?: string;
4831
+ size_gb?: number;
4832
+ snapshot_retention?: number;
4833
+ state?: string;
4834
+ type?: OrgVolumeType;
4835
+ updated_at?: string;
4836
+ zone?: string;
4837
+ }
4838
+ export const OrgVolume = /*@__PURE__*/ S.suspend(() =>
4839
+ S.Struct({
4840
+ app_name: S.optional(S.String),
4841
+ attached_alloc_id: S.optional(S.String),
4842
+ attached_machine_id: S.optional(S.String),
4843
+ auto_backup_enabled: S.optional(S.Boolean),
4844
+ block_size: S.optional(S.Number),
4845
+ blocks: S.optional(S.Number),
4846
+ blocks_avail: S.optional(S.Number),
4847
+ blocks_free: S.optional(S.Number),
4848
+ bytes_total: S.optional(S.Number),
4849
+ bytes_used: S.optional(S.Number),
4850
+ created_at: S.optional(S.String),
4851
+ encrypted: S.optional(S.Boolean),
4852
+ fstype: S.optional(S.String),
4853
+ host_status: S.optional(OrgVolumeHostStatus),
4854
+ id: S.optional(S.String),
4855
+ name: S.optional(S.String),
4856
+ region: S.optional(S.String),
4857
+ size_gb: S.optional(S.Number),
4858
+ snapshot_retention: S.optional(S.Number),
4859
+ state: S.optional(S.String),
4860
+ type: S.optional(OrgVolumeType),
4861
+ updated_at: S.optional(S.String),
4862
+ zone: S.optional(S.String),
4863
+ }),
4864
+ ).annotate({ identifier: "OrgVolume" }) as any as S.Schema<OrgVolume>;
4865
+
4866
+ export type OrgVolumesResponseVolumesList = Array<OrgVolume>;
4867
+ export const OrgVolumesResponseVolumesList = /*@__PURE__*/ S.Array(
4868
+ OrgVolume,
4869
+ ) as any as S.Schema<OrgVolumesResponseVolumesList>;
4870
+
4871
+ export interface OrgVolumesResponse {
4872
+ last_updated_at?: string;
4873
+ last_volume_id?: string;
4874
+ next_cursor?: string;
4875
+ volumes?: OrgVolumesResponseVolumesList;
4876
+ }
4877
+ export const OrgVolumesResponse = /*@__PURE__*/ S.suspend(() =>
4878
+ S.Struct({
4879
+ last_updated_at: S.optional(S.String),
4880
+ last_volume_id: S.optional(S.String),
4881
+ next_cursor: S.optional(S.String),
4882
+ volumes: S.optional(OrgVolumesResponseVolumesList),
4883
+ }),
4884
+ ).annotate({
4885
+ identifier: "OrgVolumesResponse",
4886
+ }) as any as S.Schema<OrgVolumesResponse>;
4887
+
4888
+ export interface MachinesReleaseLeaseRequest {
4889
+ /** Fly App Name */
4890
+ app_name: string;
4891
+ /** Machine ID */
4892
+ machine_id: string;
4893
+ }
4894
+ export const MachinesReleaseLeaseRequest = /*@__PURE__*/ S.suspend(() =>
4895
+ S.Struct({
4896
+ app_name: S.String.pipe(T.Label()),
4897
+ machine_id: S.String.pipe(T.Label()),
4898
+ }).pipe(
4899
+ T.Http({
4900
+ method: "DELETE",
4901
+ uri: "/v1/apps/{app_name}/machines/{machine_id}/lease",
4902
+ code: 200,
4903
+ }),
4904
+ ),
4905
+ ).annotate({
4906
+ identifier: "MachinesReleaseLeaseRequest",
4907
+ }) as any as S.Schema<MachinesReleaseLeaseRequest>;
4908
+
4909
+ export interface MachinesReleaseLeaseResponse {}
4910
+ export const MachinesReleaseLeaseResponse = /*@__PURE__*/ S.suspend(() =>
4911
+ S.Struct({}),
4912
+ ).annotate({
4913
+ identifier: "MachinesReleaseLeaseResponse",
4914
+ }) as any as S.Schema<MachinesReleaseLeaseResponse>;
4915
+
3882
4916
  export type PatchMachineMetadataRequestMetadataMap = {
3883
4917
  [key: string]: string | undefined;
3884
4918
  };
@@ -3906,7 +4940,7 @@ export const PatchMachineMetadataRequest = /*@__PURE__*/ S.suspend(() =>
3906
4940
  }).pipe(
3907
4941
  T.Http({
3908
4942
  method: "PATCH",
3909
- uri: "/apps/{app_name}/machines/{machine_id}/metadata",
4943
+ uri: "/v1/apps/{app_name}/machines/{machine_id}/metadata",
3910
4944
  code: 200,
3911
4945
  }),
3912
4946
  ),
@@ -3921,6 +4955,53 @@ export const PatchMachineMetadataResponse = /*@__PURE__*/ S.suspend(() =>
3921
4955
  identifier: "PatchMachineMetadataResponse",
3922
4956
  }) as any as S.Schema<PatchMachineMetadataResponse>;
3923
4957
 
4958
+ export interface PostgresUsersCredentialsRequest {
4959
+ /** Managed Postgres Cluster ID */
4960
+ postgres_cluster_id: string;
4961
+ /** Postgres User Name */
4962
+ username: string;
4963
+ }
4964
+ export const PostgresUsersCredentialsRequest = /*@__PURE__*/ S.suspend(() =>
4965
+ S.Struct({
4966
+ postgres_cluster_id: S.String.pipe(T.Label()),
4967
+ username: S.String.pipe(T.Label()),
4968
+ }).pipe(
4969
+ T.Http({
4970
+ method: "GET",
4971
+ uri: "/v1/postgres/{postgres_cluster_id}/users/{username}/credentials",
4972
+ code: 200,
4973
+ }),
4974
+ ),
4975
+ ).annotate({
4976
+ identifier: "PostgresUsersCredentialsRequest",
4977
+ }) as any as S.Schema<PostgresUsersCredentialsRequest>;
4978
+
4979
+ export interface PostgresUserCredentials {
4980
+ /** User password. */
4981
+ password?: string;
4982
+ /** User name. */
4983
+ username?: string;
4984
+ }
4985
+ export const PostgresUserCredentials = /*@__PURE__*/ S.suspend(() =>
4986
+ S.Struct({
4987
+ password: S.optional(S.String.pipe(T.SensitiveValue({}))),
4988
+ username: S.optional(S.String),
4989
+ }),
4990
+ ).annotate({
4991
+ identifier: "PostgresUserCredentials",
4992
+ }) as any as S.Schema<PostgresUserCredentials>;
4993
+
4994
+ export interface GetPostgresUserCredentialsResponse {
4995
+ data?: PostgresUserCredentials;
4996
+ }
4997
+ export const GetPostgresUserCredentialsResponse = /*@__PURE__*/ S.suspend(() =>
4998
+ S.Struct({
4999
+ data: S.optional(PostgresUserCredentials),
5000
+ }),
5001
+ ).annotate({
5002
+ identifier: "GetPostgresUserCredentialsResponse",
5003
+ }) as any as S.Schema<GetPostgresUserCredentialsResponse>;
5004
+
3924
5005
  export interface ReclaimMachineMemoryRequest {
3925
5006
  /** Fly App Name */
3926
5007
  app_name: string;
@@ -3936,7 +5017,7 @@ export const ReclaimMachineMemoryRequest = /*@__PURE__*/ S.suspend(() =>
3936
5017
  }).pipe(
3937
5018
  T.Http({
3938
5019
  method: "POST",
3939
- uri: "/apps/{app_name}/machines/{machine_id}/memory/reclaim",
5020
+ uri: "/v1/apps/{app_name}/machines/{machine_id}/memory/reclaim",
3940
5021
  code: 200,
3941
5022
  }),
3942
5023
  ),
@@ -3955,37 +5036,11 @@ export const MainReclaimMemoryResponse = /*@__PURE__*/ S.suspend(() =>
3955
5036
  identifier: "MainReclaimMemoryResponse",
3956
5037
  }) as any as S.Schema<MainReclaimMemoryResponse>;
3957
5038
 
3958
- export interface ReleaseMachineLeaseRequest {
3959
- /** Fly App Name */
3960
- app_name: string;
3961
- /** Machine ID */
3962
- machine_id: string;
3963
- }
3964
- export const ReleaseMachineLeaseRequest = /*@__PURE__*/ S.suspend(() =>
3965
- S.Struct({
3966
- app_name: S.String.pipe(T.Label()),
3967
- machine_id: S.String.pipe(T.Label()),
3968
- }).pipe(
3969
- T.Http({
3970
- method: "DELETE",
3971
- uri: "/apps/{app_name}/machines/{machine_id}/lease",
3972
- code: 200,
3973
- }),
3974
- ),
3975
- ).annotate({
3976
- identifier: "ReleaseMachineLeaseRequest",
3977
- }) as any as S.Schema<ReleaseMachineLeaseRequest>;
3978
-
3979
- export interface ReleaseMachineLeaseResponse {}
3980
- export const ReleaseMachineLeaseResponse = /*@__PURE__*/ S.suspend(() =>
3981
- S.Struct({}),
3982
- ).annotate({
3983
- identifier: "ReleaseMachineLeaseResponse",
3984
- }) as any as S.Schema<ReleaseMachineLeaseResponse>;
3985
-
3986
5039
  export interface RequestKmsTokenRequest {}
3987
5040
  export const RequestKmsTokenRequest = /*@__PURE__*/ S.suspend(() =>
3988
- S.Struct({}).pipe(T.Http({ method: "POST", uri: "/tokens/kms", code: 200 })),
5041
+ S.Struct({}).pipe(
5042
+ T.Http({ method: "POST", uri: "/v1/tokens/kms", code: 200 }),
5043
+ ),
3989
5044
  ).annotate({
3990
5045
  identifier: "RequestKmsTokenRequest",
3991
5046
  }) as any as S.Schema<RequestKmsTokenRequest>;
@@ -4005,7 +5060,7 @@ export const RequestOidcTokenRequest = /*@__PURE__*/ S.suspend(() =>
4005
5060
  S.Struct({
4006
5061
  aud: S.optional(S.String),
4007
5062
  aws_principal_tags: S.optional(S.Boolean),
4008
- }).pipe(T.Http({ method: "POST", uri: "/tokens/oidc", code: 200 })),
5063
+ }).pipe(T.Http({ method: "POST", uri: "/v1/tokens/oidc", code: 200 })),
4009
5064
  ).annotate({
4010
5065
  identifier: "RequestOidcTokenRequest",
4011
5066
  }) as any as S.Schema<RequestOidcTokenRequest>;
@@ -4046,7 +5101,7 @@ export const RestartMachineRequest = /*@__PURE__*/ S.suspend(() =>
4046
5101
  }).pipe(
4047
5102
  T.Http({
4048
5103
  method: "POST",
4049
- uri: "/apps/{app_name}/machines/{machine_id}/restart",
5104
+ uri: "/v1/apps/{app_name}/machines/{machine_id}/restart",
4050
5105
  code: 200,
4051
5106
  }),
4052
5107
  ),
@@ -4061,6 +5116,68 @@ export const RestartMachineResponse = /*@__PURE__*/ S.suspend(() =>
4061
5116
  identifier: "RestartMachineResponse",
4062
5117
  }) as any as S.Schema<RestartMachineResponse>;
4063
5118
 
5119
+ export interface RestorePostgresRequest {
5120
+ /** Managed Postgres Cluster ID */
5121
+ postgres_cluster_id: string;
5122
+ /** Backup label to restore from, as returned by the backups list. Mutually exclusive with pitr_time. */
5123
+ backup_id?: string;
5124
+ /** Name for the restored cluster. Defaults to a generated name derived from the source cluster and backup/point in time when omitted or blank. */
5125
+ name?: string;
5126
+ /** Point in time to restore to, as an RFC3339 timestamp with an explicit offset from UTC (e.g. Z or +02:00). Normalized to UTC and must fall within the cluster's PITR recovery window. Mutually exclusive with backup_id. */
5127
+ pitr_time?: string;
5128
+ }
5129
+ export const RestorePostgresRequest = /*@__PURE__*/ S.suspend(() =>
5130
+ S.Struct({
5131
+ postgres_cluster_id: S.String.pipe(T.Label()),
5132
+ backup_id: S.optional(S.String),
5133
+ name: S.optional(S.String),
5134
+ pitr_time: S.optional(S.String),
5135
+ }).pipe(
5136
+ T.Http({
5137
+ method: "POST",
5138
+ uri: "/v1/postgres/{postgres_cluster_id}/restore",
5139
+ code: 200,
5140
+ }),
5141
+ ),
5142
+ ).annotate({
5143
+ identifier: "RestorePostgresRequest",
5144
+ }) as any as S.Schema<RestorePostgresRequest>;
5145
+
5146
+ export interface RotatePostgresUserPasswordRequest {
5147
+ /** Managed Postgres Cluster ID */
5148
+ postgres_cluster_id: string;
5149
+ /** Postgres User Name */
5150
+ username: string;
5151
+ /** Terminate the user's existing sessions after rotating. */
5152
+ kill_sessions?: boolean;
5153
+ }
5154
+ export const RotatePostgresUserPasswordRequest = /*@__PURE__*/ S.suspend(() =>
5155
+ S.Struct({
5156
+ postgres_cluster_id: S.String.pipe(T.Label()),
5157
+ username: S.String.pipe(T.Label()),
5158
+ kill_sessions: S.optional(S.Boolean),
5159
+ }).pipe(
5160
+ T.Http({
5161
+ method: "POST",
5162
+ uri: "/v1/postgres/{postgres_cluster_id}/users/{username}/rotate_password",
5163
+ code: 200,
5164
+ }),
5165
+ ),
5166
+ ).annotate({
5167
+ identifier: "RotatePostgresUserPasswordRequest",
5168
+ }) as any as S.Schema<RotatePostgresUserPasswordRequest>;
5169
+
5170
+ export interface RotatePostgresPasswordResponse {
5171
+ data?: PostgresUserCredentials;
5172
+ }
5173
+ export const RotatePostgresPasswordResponse = /*@__PURE__*/ S.suspend(() =>
5174
+ S.Struct({
5175
+ data: S.optional(PostgresUserCredentials),
5176
+ }),
5177
+ ).annotate({
5178
+ identifier: "RotatePostgresPasswordResponse",
5179
+ }) as any as S.Schema<RotatePostgresPasswordResponse>;
5180
+
4064
5181
  export interface SetMachineMemoryLimitRequest {
4065
5182
  /** Fly App Name */
4066
5183
  app_name: string;
@@ -4076,7 +5193,7 @@ export const SetMachineMemoryLimitRequest = /*@__PURE__*/ S.suspend(() =>
4076
5193
  }).pipe(
4077
5194
  T.Http({
4078
5195
  method: "PUT",
4079
- uri: "/apps/{app_name}/machines/{machine_id}/memory",
5196
+ uri: "/v1/apps/{app_name}/machines/{machine_id}/memory",
4080
5197
  code: 200,
4081
5198
  }),
4082
5199
  ),
@@ -4106,7 +5223,7 @@ export const SetSecretKeyRequest = /*@__PURE__*/ S.suspend(() =>
4106
5223
  }).pipe(
4107
5224
  T.Http({
4108
5225
  method: "POST",
4109
- uri: "/apps/{app_name}/secretkeys/{secret_name}",
5226
+ uri: "/v1/apps/{app_name}/secretkeys/{secret_name}",
4110
5227
  code: 200,
4111
5228
  }),
4112
5229
  ),
@@ -4146,7 +5263,7 @@ export const SignalMachineRequest = /*@__PURE__*/ S.suspend(() =>
4146
5263
  }).pipe(
4147
5264
  T.Http({
4148
5265
  method: "POST",
4149
- uri: "/apps/{app_name}/machines/{machine_id}/signal",
5266
+ uri: "/v1/apps/{app_name}/machines/{machine_id}/signal",
4150
5267
  code: 200,
4151
5268
  }),
4152
5269
  ),
@@ -4179,7 +5296,7 @@ export const SignSecretKeyRequest = /*@__PURE__*/ S.suspend(() =>
4179
5296
  }).pipe(
4180
5297
  T.Http({
4181
5298
  method: "POST",
4182
- uri: "/apps/{app_name}/secretkeys/{secret_name}/sign",
5299
+ uri: "/v1/apps/{app_name}/secretkeys/{secret_name}/sign",
4183
5300
  code: 200,
4184
5301
  }),
4185
5302
  ),
@@ -4211,7 +5328,7 @@ export const StartMachineRequest = /*@__PURE__*/ S.suspend(() =>
4211
5328
  }).pipe(
4212
5329
  T.Http({
4213
5330
  method: "POST",
4214
- uri: "/apps/{app_name}/machines/{machine_id}/start",
5331
+ uri: "/v1/apps/{app_name}/machines/{machine_id}/start",
4215
5332
  code: 200,
4216
5333
  }),
4217
5334
  ),
@@ -4253,7 +5370,7 @@ export const StopMachineRequest = /*@__PURE__*/ S.suspend(() =>
4253
5370
  }).pipe(
4254
5371
  T.Http({
4255
5372
  method: "POST",
4256
- uri: "/apps/{app_name}/machines/{machine_id}/stop",
5373
+ uri: "/v1/apps/{app_name}/machines/{machine_id}/stop",
4257
5374
  code: 200,
4258
5375
  }),
4259
5376
  ),
@@ -4281,7 +5398,7 @@ export const SuspendMachineRequest = /*@__PURE__*/ S.suspend(() =>
4281
5398
  }).pipe(
4282
5399
  T.Http({
4283
5400
  method: "POST",
4284
- uri: "/apps/{app_name}/machines/{machine_id}/suspend",
5401
+ uri: "/v1/apps/{app_name}/machines/{machine_id}/suspend",
4285
5402
  code: 200,
4286
5403
  }),
4287
5404
  ),
@@ -4309,7 +5426,7 @@ export const UncordonMachineRequest = /*@__PURE__*/ S.suspend(() =>
4309
5426
  }).pipe(
4310
5427
  T.Http({
4311
5428
  method: "POST",
4312
- uri: "/apps/{app_name}/machines/{machine_id}/uncordon",
5429
+ uri: "/v1/apps/{app_name}/machines/{machine_id}/uncordon",
4313
5430
  code: 200,
4314
5431
  }),
4315
5432
  ),
@@ -4358,7 +5475,7 @@ export const UpdateMachineRequest = /*@__PURE__*/ S.suspend(() =>
4358
5475
  }).pipe(
4359
5476
  T.Http({
4360
5477
  method: "POST",
4361
- uri: "/apps/{app_name}/machines/{machine_id}",
5478
+ uri: "/v1/apps/{app_name}/machines/{machine_id}",
4362
5479
  code: 200,
4363
5480
  }),
4364
5481
  ),
@@ -4393,7 +5510,7 @@ export const UpdateMachineMetadataRequest = /*@__PURE__*/ S.suspend(() =>
4393
5510
  }).pipe(
4394
5511
  T.Http({
4395
5512
  method: "PUT",
4396
- uri: "/apps/{app_name}/machines/{machine_id}/metadata",
5513
+ uri: "/v1/apps/{app_name}/machines/{machine_id}/metadata",
4397
5514
  code: 200,
4398
5515
  }),
4399
5516
  ),
@@ -4408,6 +5525,44 @@ export const UpdateMachineMetadataResponse = /*@__PURE__*/ S.suspend(() =>
4408
5525
  identifier: "UpdateMachineMetadataResponse",
4409
5526
  }) as any as S.Schema<UpdateMachineMetadataResponse>;
4410
5527
 
5528
+ /** New role for the user. */
5529
+ export type UpdatePostgresUserRoleRequestRole =
5530
+ | "schema_admin"
5531
+ | "writer"
5532
+ | "reader";
5533
+ export const UpdatePostgresUserRoleRequestRole = /*@__PURE__*/ S.String;
5534
+
5535
+ export interface UpdatePostgresUserRoleRequest {
5536
+ /** Managed Postgres Cluster ID */
5537
+ postgres_cluster_id: string;
5538
+ /** Postgres User Name */
5539
+ username: string;
5540
+ /** New role for the user. */
5541
+ role: UpdatePostgresUserRoleRequestRole | (string & {});
5542
+ }
5543
+ export const UpdatePostgresUserRoleRequest = /*@__PURE__*/ S.suspend(() =>
5544
+ S.Struct({
5545
+ postgres_cluster_id: S.String.pipe(T.Label()),
5546
+ username: S.String.pipe(T.Label()),
5547
+ role: UpdatePostgresUserRoleRequestRole,
5548
+ }).pipe(
5549
+ T.Http({
5550
+ method: "PATCH",
5551
+ uri: "/v1/postgres/{postgres_cluster_id}/users/{username}",
5552
+ code: 200,
5553
+ }),
5554
+ ),
5555
+ ).annotate({
5556
+ identifier: "UpdatePostgresUserRoleRequest",
5557
+ }) as any as S.Schema<UpdatePostgresUserRoleRequest>;
5558
+
5559
+ export interface UpdatePostgresUserRoleResponse {}
5560
+ export const UpdatePostgresUserRoleResponse = /*@__PURE__*/ S.suspend(() =>
5561
+ S.Struct({}),
5562
+ ).annotate({
5563
+ identifier: "UpdatePostgresUserRoleResponse",
5564
+ }) as any as S.Schema<UpdatePostgresUserRoleResponse>;
5565
+
4411
5566
  export type UpdateSecretsRequestValuesMap = {
4412
5567
  [key: string]: string | undefined;
4413
5568
  };
@@ -4426,7 +5581,7 @@ export const UpdateSecretsRequest = /*@__PURE__*/ S.suspend(() =>
4426
5581
  app_name: S.String.pipe(T.Label()),
4427
5582
  values: S.optional(UpdateSecretsRequestValuesMap),
4428
5583
  }).pipe(
4429
- T.Http({ method: "POST", uri: "/apps/{app_name}/secrets", code: 200 }),
5584
+ T.Http({ method: "POST", uri: "/v1/apps/{app_name}/secrets", code: 200 }),
4430
5585
  ),
4431
5586
  ).annotate({
4432
5587
  identifier: "UpdateSecretsRequest",
@@ -4470,7 +5625,7 @@ export const UpdateVolumeRequest = /*@__PURE__*/ S.suspend(() =>
4470
5625
  }).pipe(
4471
5626
  T.Http({
4472
5627
  method: "PUT",
4473
- uri: "/apps/{app_name}/volumes/{volume_id}",
5628
+ uri: "/v1/apps/{app_name}/volumes/{volume_id}",
4474
5629
  code: 200,
4475
5630
  }),
4476
5631
  ),
@@ -4498,7 +5653,7 @@ export const UpsertMachineMetadataRequest = /*@__PURE__*/ S.suspend(() =>
4498
5653
  }).pipe(
4499
5654
  T.Http({
4500
5655
  method: "POST",
4501
- uri: "/apps/{app_name}/machines/{machine_id}/metadata/{key}",
5656
+ uri: "/v1/apps/{app_name}/machines/{machine_id}/metadata/{key}",
4502
5657
  code: 200,
4503
5658
  }),
4504
5659
  ),
@@ -4533,7 +5688,7 @@ export const VerifySecretKeyRequest = /*@__PURE__*/ S.suspend(() =>
4533
5688
  }).pipe(
4534
5689
  T.Http({
4535
5690
  method: "POST",
4536
- uri: "/apps/{app_name}/secretkeys/{secret_name}/verify",
5691
+ uri: "/v1/apps/{app_name}/secretkeys/{secret_name}/verify",
4537
5692
  code: 200,
4538
5693
  }),
4539
5694
  ),
@@ -4585,7 +5740,7 @@ export const WaitMachineRequest = /*@__PURE__*/ S.suspend(() =>
4585
5740
  }).pipe(
4586
5741
  T.Http({
4587
5742
  method: "GET",
4588
- uri: "/apps/{app_name}/machines/{machine_id}/wait",
5743
+ uri: "/v1/apps/{app_name}/machines/{machine_id}/wait",
4589
5744
  code: 200,
4590
5745
  }),
4591
5746
  ),
@@ -4769,12 +5924,12 @@ export type CreateAppIPAssignmentError =
4769
5924
  /** Assign new IP address to app */
4770
5925
  export const createAppIPAssignment: API.OperationMethod<
4771
5926
  CreateAppIPAssignmentRequest,
4772
- IPAssignment,
5927
+ AssignIPResponse,
4773
5928
  CreateAppIPAssignmentError,
4774
5929
  FlyIoOpContext
4775
5930
  > = /*@__PURE__*/ API.make(() => ({
4776
5931
  input: CreateAppIPAssignmentRequest,
4777
- output: IPAssignment,
5932
+ output: AssignIPResponse,
4778
5933
  errors: [BadRequest, Forbidden, NotFound, Conflict],
4779
5934
  protocol: FlyIoProtocol,
4780
5935
  retry: Retry.Retry,
@@ -4819,6 +5974,94 @@ export const createMachineLease: API.OperationMethod<
4819
5974
  retry: Retry.Retry,
4820
5975
  }));
4821
5976
 
5977
+ export type CreatePostgresError =
5978
+ | BadRequest
5979
+ | NotFound
5980
+ | UnprocessableEntity
5981
+ | FlyIoOpError;
5982
+ /** 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. */
5983
+ export const createPostgres: API.OperationMethod<
5984
+ CreatePostgresRequest,
5985
+ ShowPostgresClusterResponse,
5986
+ CreatePostgresError,
5987
+ FlyIoOpContext
5988
+ > = /*@__PURE__*/ API.make(() => ({
5989
+ input: CreatePostgresRequest,
5990
+ output: ShowPostgresClusterResponse,
5991
+ errors: [BadRequest, NotFound, UnprocessableEntity],
5992
+ protocol: FlyIoProtocol,
5993
+ retry: Retry.Retry,
5994
+ }));
5995
+
5996
+ export type CreatePostgresAttachmentError = NotFound | FlyIoOpError;
5997
+ /** Attach Cluster to App Attach a specific cluster to a Fly app. The attachment is created if it does not already exist. */
5998
+ export const createPostgresAttachment: API.OperationMethod<
5999
+ CreatePostgresAttachmentRequest,
6000
+ CreatePostgresAttachmentResponse,
6001
+ CreatePostgresAttachmentError,
6002
+ FlyIoOpContext
6003
+ > = /*@__PURE__*/ API.make(() => ({
6004
+ input: CreatePostgresAttachmentRequest,
6005
+ output: CreatePostgresAttachmentResponse,
6006
+ errors: [NotFound],
6007
+ protocol: FlyIoProtocol,
6008
+ retry: Retry.Retry,
6009
+ }));
6010
+
6011
+ export type CreatePostgresBackupError = NotFound | Conflict | FlyIoOpError;
6012
+ /** Create Backup Create a backup for a specific cluster. The backup runs asynchronously and is rejected if one is already in progress. */
6013
+ export const createPostgresBackup: API.OperationMethod<
6014
+ CreatePostgresBackupRequest,
6015
+ CreatePostgresBackupResponse,
6016
+ CreatePostgresBackupError,
6017
+ FlyIoOpContext
6018
+ > = /*@__PURE__*/ API.make(() => ({
6019
+ input: CreatePostgresBackupRequest,
6020
+ output: CreatePostgresBackupResponse,
6021
+ errors: [NotFound, Conflict],
6022
+ protocol: FlyIoProtocol,
6023
+ retry: Retry.Retry,
6024
+ }));
6025
+
6026
+ export type CreatePostgresDatabaseError =
6027
+ | BadRequest
6028
+ | NotFound
6029
+ | UnprocessableEntity
6030
+ | FlyIoOpError;
6031
+ /** Create Database Create a database within a specific cluster. */
6032
+ export const createPostgresDatabase: API.OperationMethod<
6033
+ CreatePostgresDatabaseRequest,
6034
+ PostgresDatabaseResponse,
6035
+ CreatePostgresDatabaseError,
6036
+ FlyIoOpContext
6037
+ > = /*@__PURE__*/ API.make(() => ({
6038
+ input: CreatePostgresDatabaseRequest,
6039
+ output: PostgresDatabaseResponse,
6040
+ errors: [BadRequest, NotFound, UnprocessableEntity],
6041
+ protocol: FlyIoProtocol,
6042
+ retry: Retry.Retry,
6043
+ }));
6044
+
6045
+ export type CreatePostgresUserError =
6046
+ | BadRequest
6047
+ | NotFound
6048
+ | Conflict
6049
+ | UnprocessableEntity
6050
+ | FlyIoOpError;
6051
+ /** Create User Create a Postgres user within a specific cluster. Fetch the generated password from the credentials endpoint. */
6052
+ export const createPostgresUser: API.OperationMethod<
6053
+ CreatePostgresUserRequest,
6054
+ CreatePostgresUserResponse,
6055
+ CreatePostgresUserError,
6056
+ FlyIoOpContext
6057
+ > = /*@__PURE__*/ API.make(() => ({
6058
+ input: CreatePostgresUserRequest,
6059
+ output: CreatePostgresUserResponse,
6060
+ errors: [BadRequest, NotFound, Conflict, UnprocessableEntity],
6061
+ protocol: FlyIoProtocol,
6062
+ retry: Retry.Retry,
6063
+ }));
6064
+
4822
6065
  export type CreateSecretError =
4823
6066
  | BadRequest
4824
6067
  | Forbidden
@@ -5006,6 +6249,66 @@ export const deleteMachineMetadata: API.OperationMethod<
5006
6249
  retry: Retry.Retry,
5007
6250
  }));
5008
6251
 
6252
+ export type DeletePostgresError = NotFound | FlyIoOpError;
6253
+ /** Delete Postgres Cluster Delete a Managed Postgres cluster. The cluster is marked for deletion and removed asynchronously. */
6254
+ export const deletePostgres: API.OperationMethod<
6255
+ DeletePostgresRequest,
6256
+ DeletePostgresResponse,
6257
+ DeletePostgresError,
6258
+ FlyIoOpContext
6259
+ > = /*@__PURE__*/ API.make(() => ({
6260
+ input: DeletePostgresRequest,
6261
+ output: DeletePostgresResponse,
6262
+ errors: [NotFound],
6263
+ protocol: FlyIoProtocol,
6264
+ retry: Retry.Retry,
6265
+ }));
6266
+
6267
+ export type DeletePostgresAttachmentError = NotFound | FlyIoOpError;
6268
+ /** Detach Cluster from App Detach a specific cluster from a Fly app. */
6269
+ export const deletePostgresAttachment: API.OperationMethod<
6270
+ DeletePostgresAttachmentRequest,
6271
+ DeletePostgresAttachmentResponse,
6272
+ DeletePostgresAttachmentError,
6273
+ FlyIoOpContext
6274
+ > = /*@__PURE__*/ API.make(() => ({
6275
+ input: DeletePostgresAttachmentRequest,
6276
+ output: DeletePostgresAttachmentResponse,
6277
+ errors: [NotFound],
6278
+ protocol: FlyIoProtocol,
6279
+ retry: Retry.Retry,
6280
+ }));
6281
+
6282
+ export type DeletePostgresDatabaseError = BadRequest | NotFound | FlyIoOpError;
6283
+ /** Drop Database Delete a specific database within a cluster, along with objects that depend on it. */
6284
+ export const deletePostgresDatabase: API.OperationMethod<
6285
+ DeletePostgresDatabaseRequest,
6286
+ PostgresDatabaseResponse,
6287
+ DeletePostgresDatabaseError,
6288
+ FlyIoOpContext
6289
+ > = /*@__PURE__*/ API.make(() => ({
6290
+ input: DeletePostgresDatabaseRequest,
6291
+ output: PostgresDatabaseResponse,
6292
+ errors: [BadRequest, NotFound],
6293
+ protocol: FlyIoProtocol,
6294
+ retry: Retry.Retry,
6295
+ }));
6296
+
6297
+ export type DeletePostgresUserError = BadRequest | NotFound | FlyIoOpError;
6298
+ /** Delete User Delete a specific Postgres user within a cluster. */
6299
+ export const deletePostgresUser: API.OperationMethod<
6300
+ DeletePostgresUserRequest,
6301
+ DeletePostgresUserResponse,
6302
+ DeletePostgresUserError,
6303
+ FlyIoOpContext
6304
+ > = /*@__PURE__*/ API.make(() => ({
6305
+ input: DeletePostgresUserRequest,
6306
+ output: DeletePostgresUserResponse,
6307
+ errors: [BadRequest, NotFound],
6308
+ protocol: FlyIoProtocol,
6309
+ retry: Retry.Retry,
6310
+ }));
6311
+
5009
6312
  export type DeleteSecretError = Forbidden | NotFound | FlyIoOpError;
5010
6313
  /** Delete an app secret */
5011
6314
  export const deleteSecret: API.OperationMethod<
@@ -5051,6 +6354,45 @@ export const deleteVolume: API.OperationMethod<
5051
6354
  retry: Retry.Retry,
5052
6355
  }));
5053
6356
 
6357
+ export type DisablePostgresExtensionError =
6358
+ | BadRequest
6359
+ | NotFound
6360
+ | UnprocessableEntity
6361
+ | FlyIoOpError;
6362
+ /** Disable Extension Disable a specific Postgres extension within a database, optionally dropping objects that depend on it. System extensions cannot be disabled. */
6363
+ export const disablePostgresExtension: API.OperationMethod<
6364
+ DisablePostgresExtensionRequest,
6365
+ DisablePostgresExtensionResponse,
6366
+ DisablePostgresExtensionError,
6367
+ FlyIoOpContext
6368
+ > = /*@__PURE__*/ API.make(() => ({
6369
+ input: DisablePostgresExtensionRequest,
6370
+ output: DisablePostgresExtensionResponse,
6371
+ errors: [BadRequest, NotFound, UnprocessableEntity],
6372
+ protocol: FlyIoProtocol,
6373
+ retry: Retry.Retry,
6374
+ }));
6375
+
6376
+ export type EnablePostgresExtensionError =
6377
+ | BadRequest
6378
+ | NotFound
6379
+ | Conflict
6380
+ | UnprocessableEntity
6381
+ | FlyIoOpError;
6382
+ /** Enable Extension Enable a Postgres extension within a specific database. PostGIS extensions require a PostGIS-enabled cluster. */
6383
+ export const enablePostgresExtension: API.OperationMethod<
6384
+ EnablePostgresExtensionRequest,
6385
+ EnablePostgresExtensionResponse,
6386
+ EnablePostgresExtensionError,
6387
+ FlyIoOpContext
6388
+ > = /*@__PURE__*/ API.make(() => ({
6389
+ input: EnablePostgresExtensionRequest,
6390
+ output: EnablePostgresExtensionResponse,
6391
+ errors: [BadRequest, NotFound, Conflict, UnprocessableEntity],
6392
+ protocol: FlyIoProtocol,
6393
+ retry: Retry.Retry,
6394
+ }));
6395
+
5054
6396
  export type EncryptSecretKeyError =
5055
6397
  | BadRequest
5056
6398
  | Forbidden
@@ -5104,6 +6446,26 @@ export const extendVolume: API.OperationMethod<
5104
6446
  retry: Retry.Retry,
5105
6447
  }));
5106
6448
 
6449
+ export type ForkPostgresError =
6450
+ | BadRequest
6451
+ | NotFound
6452
+ | Conflict
6453
+ | UnprocessableEntity
6454
+ | FlyIoOpError;
6455
+ /** 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. */
6456
+ export const forkPostgres: API.OperationMethod<
6457
+ ForkPostgresRequest,
6458
+ ShowPostgresClusterResponse,
6459
+ ForkPostgresError,
6460
+ FlyIoOpContext
6461
+ > = /*@__PURE__*/ API.make(() => ({
6462
+ input: ForkPostgresRequest,
6463
+ output: ShowPostgresClusterResponse,
6464
+ errors: [BadRequest, NotFound, Conflict, UnprocessableEntity],
6465
+ protocol: FlyIoProtocol,
6466
+ retry: Retry.Retry,
6467
+ }));
6468
+
5107
6469
  export type GenerateSecretKeyError =
5108
6470
  | BadRequest
5109
6471
  | Forbidden
@@ -5154,7 +6516,7 @@ export const getAppCertificate: API.OperationMethod<
5154
6516
  retry: Retry.Retry,
5155
6517
  }));
5156
6518
 
5157
- export type GetCurrentTokenError = FlyIoOpError;
6519
+ export type GetCurrentTokenError = Forbidden | FlyIoOpError;
5158
6520
  /** Get Current Token Information Get information about the current macaroon token(s), including organizations, apps, user identity hashes, and machine restrictions */
5159
6521
  export const getCurrentToken: API.OperationMethod<
5160
6522
  GetCurrentTokenRequest,
@@ -5164,7 +6526,7 @@ export const getCurrentToken: API.OperationMethod<
5164
6526
  > = /*@__PURE__*/ API.make(() => ({
5165
6527
  input: GetCurrentTokenRequest,
5166
6528
  output: CurrentTokenResponse,
5167
- errors: [],
6529
+ errors: [Forbidden],
5168
6530
  protocol: FlyIoProtocol,
5169
6531
  retry: Retry.Retry,
5170
6532
  }));
@@ -5259,6 +6621,21 @@ export const getPlacements: API.OperationMethod<
5259
6621
  retry: Retry.Retry,
5260
6622
  }));
5261
6623
 
6624
+ export type GetPostgresError = NotFound | FlyIoOpError;
6625
+ /** Get Postgres Cluster Get details of a specific Managed Postgres cluster. */
6626
+ export const getPostgres: API.OperationMethod<
6627
+ GetPostgresRequest,
6628
+ ShowPostgresClusterResponse,
6629
+ GetPostgresError,
6630
+ FlyIoOpContext
6631
+ > = /*@__PURE__*/ API.make(() => ({
6632
+ input: GetPostgresRequest,
6633
+ output: ShowPostgresClusterResponse,
6634
+ errors: [NotFound],
6635
+ protocol: FlyIoProtocol,
6636
+ retry: Retry.Retry,
6637
+ }));
6638
+
5262
6639
  export type GetRegionsError = Forbidden | FlyIoOpError;
5263
6640
  /** Get Regions List all regions on the platform with their details. */
5264
6641
  export const getRegions: API.OperationMethod<
@@ -5413,6 +6790,21 @@ export const listMachines: API.OperationMethod<
5413
6790
  retry: Retry.Retry,
5414
6791
  }));
5415
6792
 
6793
+ export type ListMachinesOrgError = Forbidden | NotFound | FlyIoOpError;
6794
+ /** 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. */
6795
+ export const listMachinesOrg: API.OperationMethod<
6796
+ ListMachinesOrgRequest,
6797
+ OrgMachinesResponse,
6798
+ ListMachinesOrgError,
6799
+ FlyIoOpContext
6800
+ > = /*@__PURE__*/ API.make(() => ({
6801
+ input: ListMachinesOrgRequest,
6802
+ output: OrgMachinesResponse,
6803
+ errors: [Forbidden, NotFound],
6804
+ protocol: FlyIoProtocol,
6805
+ retry: Retry.Retry,
6806
+ }));
6807
+
5416
6808
  export type ListMachineVersionsError = Forbidden | NotFound | FlyIoOpError;
5417
6809
  /** List Versions List all versions of the configuration for a specific Machine within an app. */
5418
6810
  export const listMachineVersions: API.OperationMethod<
@@ -5428,32 +6820,77 @@ export const listMachineVersions: API.OperationMethod<
5428
6820
  retry: Retry.Retry,
5429
6821
  }));
5430
6822
 
5431
- export type ListOrgMachinesError = Forbidden | NotFound | FlyIoOpError;
5432
- /** 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. */
5433
- export const listOrgMachines: API.OperationMethod<
5434
- ListOrgMachinesRequest,
5435
- OrgMachinesResponse,
5436
- ListOrgMachinesError,
6823
+ export type ListPostgresError = NotFound | UnprocessableEntity | FlyIoOpError;
6824
+ /** List Postgres Clusters List Managed Postgres clusters for an organization. */
6825
+ export const listPostgres: API.OperationMethod<
6826
+ ListPostgresRequest,
6827
+ ListPostgresClustersResponse,
6828
+ ListPostgresError,
5437
6829
  FlyIoOpContext
5438
6830
  > = /*@__PURE__*/ API.make(() => ({
5439
- input: ListOrgMachinesRequest,
5440
- output: OrgMachinesResponse,
5441
- errors: [Forbidden, NotFound],
6831
+ input: ListPostgresRequest,
6832
+ output: ListPostgresClustersResponse,
6833
+ errors: [NotFound, UnprocessableEntity],
5442
6834
  protocol: FlyIoProtocol,
5443
6835
  retry: Retry.Retry,
5444
6836
  }));
5445
6837
 
5446
- export type ListOrgVolumesError = FlyIoOpError;
5447
- /** List All Volumes List all volumes for an organization with optional filters and cursor-based pagination. */
5448
- export const listOrgVolumes: API.OperationMethod<
5449
- ListOrgVolumesRequest,
5450
- OrgVolumesResponse,
5451
- ListOrgVolumesError,
6838
+ export type ListPostgresBackupsError = NotFound | FlyIoOpError;
6839
+ /** List Backups List all backups associated with a specific cluster. */
6840
+ export const listPostgresBackups: API.OperationMethod<
6841
+ ListPostgresBackupsRequest,
6842
+ ListPostgresBackupsResponse,
6843
+ ListPostgresBackupsError,
5452
6844
  FlyIoOpContext
5453
6845
  > = /*@__PURE__*/ API.make(() => ({
5454
- input: ListOrgVolumesRequest,
5455
- output: OrgVolumesResponse,
5456
- errors: [],
6846
+ input: ListPostgresBackupsRequest,
6847
+ output: ListPostgresBackupsResponse,
6848
+ errors: [NotFound],
6849
+ protocol: FlyIoProtocol,
6850
+ retry: Retry.Retry,
6851
+ }));
6852
+
6853
+ export type ListPostgresDatabasesError = NotFound | FlyIoOpError;
6854
+ /** List Databases List all databases within a specific cluster. */
6855
+ export const listPostgresDatabases: API.OperationMethod<
6856
+ ListPostgresDatabasesRequest,
6857
+ ListPostgresDatabasesResponse,
6858
+ ListPostgresDatabasesError,
6859
+ FlyIoOpContext
6860
+ > = /*@__PURE__*/ API.make(() => ({
6861
+ input: ListPostgresDatabasesRequest,
6862
+ output: ListPostgresDatabasesResponse,
6863
+ errors: [NotFound],
6864
+ protocol: FlyIoProtocol,
6865
+ retry: Retry.Retry,
6866
+ }));
6867
+
6868
+ export type ListPostgresExtensionsError = BadRequest | NotFound | FlyIoOpError;
6869
+ /** List Extensions List all extensions available within a specific database, indicating which are installed. */
6870
+ export const listPostgresExtensions: API.OperationMethod<
6871
+ ListPostgresExtensionsRequest,
6872
+ ListPostgresExtensionsResponse,
6873
+ ListPostgresExtensionsError,
6874
+ FlyIoOpContext
6875
+ > = /*@__PURE__*/ API.make(() => ({
6876
+ input: ListPostgresExtensionsRequest,
6877
+ output: ListPostgresExtensionsResponse,
6878
+ errors: [BadRequest, NotFound],
6879
+ protocol: FlyIoProtocol,
6880
+ retry: Retry.Retry,
6881
+ }));
6882
+
6883
+ export type ListPostgresUsersError = NotFound | FlyIoOpError;
6884
+ /** List Users List all Postgres users within a specific cluster. */
6885
+ export const listPostgresUsers: API.OperationMethod<
6886
+ ListPostgresUsersRequest,
6887
+ ListPostgresUsersResponse,
6888
+ ListPostgresUsersError,
6889
+ FlyIoOpContext
6890
+ > = /*@__PURE__*/ API.make(() => ({
6891
+ input: ListPostgresUsersRequest,
6892
+ output: ListPostgresUsersResponse,
6893
+ errors: [NotFound],
5457
6894
  protocol: FlyIoProtocol,
5458
6895
  retry: Retry.Retry,
5459
6896
  }));
@@ -5518,6 +6955,36 @@ export const listVolumeSnapshots: API.OperationMethod<
5518
6955
  retry: Retry.Retry,
5519
6956
  }));
5520
6957
 
6958
+ export type ListVolumesOrgError = FlyIoOpError;
6959
+ /** List All Volumes List all volumes for an organization with optional filters and cursor-based pagination. */
6960
+ export const listVolumesOrg: API.OperationMethod<
6961
+ ListVolumesOrgRequest,
6962
+ OrgVolumesResponse,
6963
+ ListVolumesOrgError,
6964
+ FlyIoOpContext
6965
+ > = /*@__PURE__*/ API.make(() => ({
6966
+ input: ListVolumesOrgRequest,
6967
+ output: OrgVolumesResponse,
6968
+ errors: [],
6969
+ protocol: FlyIoProtocol,
6970
+ retry: Retry.Retry,
6971
+ }));
6972
+
6973
+ export type MachinesReleaseLeaseError = Forbidden | NotFound | FlyIoOpError;
6974
+ /** 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. */
6975
+ export const machinesReleaseLease: API.OperationMethod<
6976
+ MachinesReleaseLeaseRequest,
6977
+ MachinesReleaseLeaseResponse,
6978
+ MachinesReleaseLeaseError,
6979
+ FlyIoOpContext
6980
+ > = /*@__PURE__*/ API.make(() => ({
6981
+ input: MachinesReleaseLeaseRequest,
6982
+ output: MachinesReleaseLeaseResponse,
6983
+ errors: [Forbidden, NotFound],
6984
+ protocol: FlyIoProtocol,
6985
+ retry: Retry.Retry,
6986
+ }));
6987
+
5521
6988
  export type PatchMachineMetadataError = BadRequest | FlyIoOpError;
5522
6989
  /** 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. */
5523
6990
  export const patchMachineMetadata: API.OperationMethod<
@@ -5533,6 +7000,24 @@ export const patchMachineMetadata: API.OperationMethod<
5533
7000
  retry: Retry.Retry,
5534
7001
  }));
5535
7002
 
7003
+ export type PostgresUsersCredentialsError =
7004
+ | BadRequest
7005
+ | NotFound
7006
+ | FlyIoOpError;
7007
+ /** Get User Credentials Get the connection credentials for a specific Postgres user within a cluster. */
7008
+ export const postgresUsersCredentials: API.OperationMethod<
7009
+ PostgresUsersCredentialsRequest,
7010
+ GetPostgresUserCredentialsResponse,
7011
+ PostgresUsersCredentialsError,
7012
+ FlyIoOpContext
7013
+ > = /*@__PURE__*/ API.make(() => ({
7014
+ input: PostgresUsersCredentialsRequest,
7015
+ output: GetPostgresUserCredentialsResponse,
7016
+ errors: [BadRequest, NotFound],
7017
+ protocol: FlyIoProtocol,
7018
+ retry: Retry.Retry,
7019
+ }));
7020
+
5536
7021
  export type ReclaimMachineMemoryError =
5537
7022
  | BadRequest
5538
7023
  | Forbidden
@@ -5552,21 +7037,6 @@ export const reclaimMachineMemory: API.OperationMethod<
5552
7037
  retry: Retry.Retry,
5553
7038
  }));
5554
7039
 
5555
- export type ReleaseMachineLeaseError = Forbidden | NotFound | FlyIoOpError;
5556
- /** 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. */
5557
- export const releaseMachineLease: API.OperationMethod<
5558
- ReleaseMachineLeaseRequest,
5559
- ReleaseMachineLeaseResponse,
5560
- ReleaseMachineLeaseError,
5561
- FlyIoOpContext
5562
- > = /*@__PURE__*/ API.make(() => ({
5563
- input: ReleaseMachineLeaseRequest,
5564
- output: ReleaseMachineLeaseResponse,
5565
- errors: [Forbidden, NotFound],
5566
- protocol: FlyIoProtocol,
5567
- retry: Retry.Retry,
5568
- }));
5569
-
5570
7040
  export type RequestKmsTokenError =
5571
7041
  | BadRequest
5572
7042
  | Forbidden
@@ -5624,6 +7094,44 @@ export const restartMachine: API.OperationMethod<
5624
7094
  retry: Retry.Retry,
5625
7095
  }));
5626
7096
 
7097
+ export type RestorePostgresError =
7098
+ | BadRequest
7099
+ | NotFound
7100
+ | UnprocessableEntity
7101
+ | FlyIoOpError;
7102
+ /** 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. */
7103
+ export const restorePostgres: API.OperationMethod<
7104
+ RestorePostgresRequest,
7105
+ ShowPostgresClusterResponse,
7106
+ RestorePostgresError,
7107
+ FlyIoOpContext
7108
+ > = /*@__PURE__*/ API.make(() => ({
7109
+ input: RestorePostgresRequest,
7110
+ output: ShowPostgresClusterResponse,
7111
+ errors: [BadRequest, NotFound, UnprocessableEntity],
7112
+ protocol: FlyIoProtocol,
7113
+ retry: Retry.Retry,
7114
+ }));
7115
+
7116
+ export type RotatePostgresUserPasswordError =
7117
+ | BadRequest
7118
+ | NotFound
7119
+ | UnprocessableEntity
7120
+ | FlyIoOpError;
7121
+ /** Rotate User Password Rotate a specific Postgres user's password within a cluster, optionally terminating the user's existing sessions. */
7122
+ export const rotatePostgresUserPassword: API.OperationMethod<
7123
+ RotatePostgresUserPasswordRequest,
7124
+ RotatePostgresPasswordResponse,
7125
+ RotatePostgresUserPasswordError,
7126
+ FlyIoOpContext
7127
+ > = /*@__PURE__*/ API.make(() => ({
7128
+ input: RotatePostgresUserPasswordRequest,
7129
+ output: RotatePostgresPasswordResponse,
7130
+ errors: [BadRequest, NotFound, UnprocessableEntity],
7131
+ protocol: FlyIoProtocol,
7132
+ retry: Retry.Retry,
7133
+ }));
7134
+
5627
7135
  export type SetMachineMemoryLimitError =
5628
7136
  | BadRequest
5629
7137
  | Forbidden
@@ -5813,6 +7321,25 @@ export const updateMachineMetadata: API.OperationMethod<
5813
7321
  retry: Retry.Retry,
5814
7322
  }));
5815
7323
 
7324
+ export type UpdatePostgresUserRoleError =
7325
+ | BadRequest
7326
+ | NotFound
7327
+ | UnprocessableEntity
7328
+ | FlyIoOpError;
7329
+ /** Update User Role Update a specific Postgres user's role within a cluster. */
7330
+ export const updatePostgresUserRole: API.OperationMethod<
7331
+ UpdatePostgresUserRoleRequest,
7332
+ UpdatePostgresUserRoleResponse,
7333
+ UpdatePostgresUserRoleError,
7334
+ FlyIoOpContext
7335
+ > = /*@__PURE__*/ API.make(() => ({
7336
+ input: UpdatePostgresUserRoleRequest,
7337
+ output: UpdatePostgresUserRoleResponse,
7338
+ errors: [BadRequest, NotFound, UnprocessableEntity],
7339
+ protocol: FlyIoProtocol,
7340
+ retry: Retry.Retry,
7341
+ }));
7342
+
5816
7343
  export type UpdateSecretsError =
5817
7344
  | BadRequest
5818
7345
  | Forbidden