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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/README.md +34 -0
  2. package/lib/credentials.d.ts +2 -2
  3. package/lib/credentials.d.ts.map +1 -1
  4. package/lib/credentials.js +2 -2
  5. package/lib/credentials.js.map +1 -1
  6. package/lib/errors.d.ts.map +1 -1
  7. package/lib/errors.js +1 -1
  8. package/lib/errors.js.map +1 -1
  9. package/lib/protocol.d.ts +4 -4
  10. package/lib/protocol.d.ts.map +1 -1
  11. package/lib/protocol.js +58 -62
  12. package/lib/protocol.js.map +1 -1
  13. package/lib/protocol.test.js +38 -7
  14. package/lib/protocol.test.js.map +1 -1
  15. package/lib/retry.d.ts +1 -1
  16. package/lib/retry.d.ts.map +1 -1
  17. package/lib/retry.js +1 -1
  18. package/lib/retry.js.map +1 -1
  19. package/lib/services/addons.d.ts +58 -8
  20. package/lib/services/addons.d.ts.map +1 -1
  21. package/lib/services/addons.js +40 -85
  22. package/lib/services/addons.js.map +1 -1
  23. package/lib/services/machines.d.ts +209 -60
  24. package/lib/services/machines.d.ts.map +1 -1
  25. package/lib/services/machines.js +316 -692
  26. package/lib/services/machines.js.map +1 -1
  27. package/lib/services/mpg.d.ts +2 -2
  28. package/lib/services/mpg.d.ts.map +1 -1
  29. package/lib/services/mpg.js +37 -153
  30. package/lib/services/mpg.js.map +1 -1
  31. package/lib/services/sprites.d.ts +687 -144
  32. package/lib/services/sprites.d.ts.map +1 -1
  33. package/lib/services/sprites.js +667 -183
  34. package/lib/services/sprites.js.map +1 -1
  35. package/lib/sprites-mint.test.js +4 -5
  36. package/lib/sprites-mint.test.js.map +1 -1
  37. package/lib/traits.d.ts.map +1 -1
  38. package/lib/traits.js.map +1 -1
  39. package/package.json +14 -12
  40. package/src/credentials.ts +8 -12
  41. package/src/errors.ts +6 -10
  42. package/src/protocol.test.ts +83 -43
  43. package/src/protocol.ts +119 -135
  44. package/src/retry.ts +2 -8
  45. package/src/services/addons.ts +135 -154
  46. package/src/services/machines.ts +694 -1222
  47. package/src/services/mpg.ts +59 -217
  48. package/src/services/sprites.ts +1573 -354
  49. package/src/sprites-mint.test.ts +25 -67
  50. package/src/traits.ts +5 -12
@@ -1,18 +1,19 @@
1
+ import * as API from "@distilled.cloud/core/api";
1
2
  // AUTO-GENERATED by scripts/generate.ts from .generated-specs. Do not edit.
2
3
  import * as S from "@distilled.cloud/core/schema";
3
- import * as API from "@distilled.cloud/core/api";
4
- import * as T from "../traits.js";
5
- import { FlyIoProtocol, } from "../protocol.js";
6
4
  import { BadRequest, Conflict, Forbidden, GatewayTimeout, NotFound, UnprocessableEntity, } from "../errors.js";
5
+ import { FlyIoProtocol } from "../protocol.js";
7
6
  import * as Retry from "../retry.js";
7
+ import * as T from "../traits.js";
8
+ export class MachineReplacing extends /*@__PURE__*/ /*@__PURE__*/ T.applyErrorMatchers(
9
+ /*@__PURE__*/ S.TaggedError()("MachineReplacing", {
10
+ message: S.String,
11
+ }), [{ status: 412, message: "failed_precondition: machine getting replaced, refusing to start" }]) {
12
+ }
8
13
  export class MachineStartFromCreatedState extends /*@__PURE__*/ /*@__PURE__*/ T.applyErrorMatchers(
9
14
  /*@__PURE__*/ S.TaggedError()("MachineStartFromCreatedState", {
10
15
  message: S.String,
11
- }), [
12
- {
13
- message: "failed_precondition: unable to start machine from current state: 'created'",
14
- },
15
- ]) {
16
+ }), [{ message: "failed_precondition: unable to start machine from current state: 'created'" }]) {
16
17
  }
17
18
  export class MachineWaitTimeout extends /*@__PURE__*/ /*@__PURE__*/ T.applyErrorMatchers(
18
19
  /*@__PURE__*/ S.TaggedError()("MachineWaitTimeout", {
@@ -25,17 +26,23 @@ export class MachineWaitTimeout extends /*@__PURE__*/ /*@__PURE__*/ T.applyError
25
26
  },
26
27
  ]) {
27
28
  }
29
+ export class NetworkNotFound extends /*@__PURE__*/ /*@__PURE__*/ T.applyErrorMatchers(
30
+ /*@__PURE__*/ S.TaggedError()("NetworkNotFound", {
31
+ message: S.String,
32
+ }), [{ status: 400, message: { includes: "network not found" } }]) {
33
+ }
34
+ export class VolumeAttached extends /*@__PURE__*/ /*@__PURE__*/ T.applyErrorMatchers(
35
+ /*@__PURE__*/ S.TaggedError()("VolumeAttached", {
36
+ message: S.String,
37
+ }), [{ message: { includes: "failed_precondition: volume is currently bound to machine:" } }]) {
38
+ }
28
39
  export const AuthenticateTokenRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
29
40
  header: S.optional(S.String),
30
- }).pipe(T.Http({ method: "POST", uri: "/v1/tokens/authenticate", code: 200 }))).annotate({
31
- identifier: "AuthenticateTokenRequest",
32
- });
41
+ }).pipe(T.Http({ method: "POST", uri: "/v1/tokens/authenticate", code: 200 }))).annotate({ identifier: "AuthenticateTokenRequest" });
33
42
  export const MacaroonCaveatSetCaveatsList = /*@__PURE__*/ S.Array(S.Unknown);
34
43
  export const MacaroonCaveatSet = /*@__PURE__*/ S.suspend(() => S.Struct({
35
44
  caveats: S.optional(MacaroonCaveatSetCaveatsList),
36
- })).annotate({
37
- identifier: "MacaroonCaveatSet",
38
- });
45
+ })).annotate({ identifier: "MacaroonCaveatSet" });
39
46
  export const MacaroonNonceKidList = /*@__PURE__*/ S.Array(S.Number);
40
47
  export const MacaroonNonceRndList = /*@__PURE__*/ S.Array(S.Number);
41
48
  export const MacaroonNonce = /*@__PURE__*/ S.suspend(() => S.Struct({
@@ -49,9 +56,7 @@ export const RootVerifiedToken = /*@__PURE__*/ S.suspend(() => S.Struct({
49
56
  header: S.optional(S.String),
50
57
  nonce: S.optional(MacaroonNonce),
51
58
  permission_token: S.optional(RootVerifiedTokenPermissionTokenList),
52
- })).annotate({
53
- identifier: "RootVerifiedToken",
54
- });
59
+ })).annotate({ identifier: "RootVerifiedToken" });
55
60
  export const AuthenticateTokenResponseBodyList = /*@__PURE__*/ S.Array(RootVerifiedToken);
56
61
  export const AuthenticateTokenResponse = /*@__PURE__*/ S.suspend(() => AuthenticateTokenResponseBodyList.pipe(T.RawResponseRoot())).annotate({
57
62
  identifier: "AuthenticateTokenResponse",
@@ -71,15 +76,11 @@ export const MainTokenAccess = /*@__PURE__*/ S.suspend(() => S.Struct({
71
76
  source_machine: S.optional(S.String),
72
77
  storage_object: S.optional(S.String),
73
78
  volume_id: S.optional(S.String),
74
- })).annotate({
75
- identifier: "MainTokenAccess",
76
- });
79
+ })).annotate({ identifier: "MainTokenAccess" });
77
80
  export const AuthorizeTokenRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
78
81
  access: S.optional(MainTokenAccess),
79
82
  header: S.optional(S.String),
80
- }).pipe(T.Http({ method: "POST", uri: "/v1/tokens/authorize", code: 200 }))).annotate({
81
- identifier: "AuthorizeTokenRequest",
82
- });
83
+ }).pipe(T.Http({ method: "POST", uri: "/v1/tokens/authorize", code: 200 }))).annotate({ identifier: "AuthorizeTokenRequest" });
83
84
  export const FlyioAccessCommandList = /*@__PURE__*/ S.Array(S.String);
84
85
  export const FlyioAccess = /*@__PURE__*/ S.suspend(() => S.Struct({
85
86
  action: S.optional(RessetAction),
@@ -101,17 +102,11 @@ export const FlyioAccess = /*@__PURE__*/ S.suspend(() => S.Struct({
101
102
  export const AuthorizeResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
102
103
  access: S.optional(FlyioAccess),
103
104
  verified_token: S.optional(RootVerifiedToken),
104
- })).annotate({
105
- identifier: "AuthorizeResponse",
106
- });
105
+ })).annotate({ identifier: "AuthorizeResponse" });
107
106
  export const CheckAppCertificateRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
108
107
  app_name: S.String.pipe(T.Label()),
109
108
  hostname: S.String.pipe(T.Label()),
110
- }).pipe(T.Http({
111
- method: "POST",
112
- uri: "/v1/apps/{app_name}/certificates/{hostname}/check",
113
- code: 200,
114
- }))).annotate({
109
+ }).pipe(T.Http({ method: "POST", uri: "/v1/apps/{app_name}/certificates/{hostname}/check", code: 200 }))).annotate({
115
110
  identifier: "CheckAppCertificateRequest",
116
111
  });
117
112
  export const IssuedCertificateType = S.String;
@@ -119,9 +114,7 @@ export const IssuedCertificate = /*@__PURE__*/ S.suspend(() => S.Struct({
119
114
  certificate_authority: S.optional(S.String),
120
115
  expires_at: S.optional(S.String),
121
116
  type: S.optional(IssuedCertificateType),
122
- })).annotate({
123
- identifier: "IssuedCertificate",
124
- });
117
+ })).annotate({ identifier: "IssuedCertificate" });
125
118
  export const CertificateEntryIssuedList = /*@__PURE__*/ S.Array(IssuedCertificate);
126
119
  export const CertificateEntrySource = S.String;
127
120
  export const CertificateEntryStatus = S.String;
@@ -132,9 +125,7 @@ export const CertificateEntry = /*@__PURE__*/ S.suspend(() => S.Struct({
132
125
  issuer: S.optional(S.String),
133
126
  source: S.optional(CertificateEntrySource),
134
127
  status: S.optional(CertificateEntryStatus),
135
- })).annotate({
136
- identifier: "CertificateEntry",
137
- });
128
+ })).annotate({ identifier: "CertificateEntry" });
138
129
  export const CertificateCheckResponseCertificatesList = /*@__PURE__*/ S.Array(CertificateEntry);
139
130
  export const DNSRecordsAList = /*@__PURE__*/ S.Array(S.String);
140
131
  export const DNSRecordsAaaaList = /*@__PURE__*/ S.Array(S.String);
@@ -159,26 +150,20 @@ export const OwnershipVerification = /*@__PURE__*/ S.suspend(() => S.Struct({
159
150
  app_value: S.optional(S.String),
160
151
  name: S.optional(S.String),
161
152
  org_value: S.optional(S.String),
162
- })).annotate({
163
- identifier: "OwnershipVerification",
164
- });
153
+ })).annotate({ identifier: "OwnershipVerification" });
165
154
  export const DNSRequirements = /*@__PURE__*/ S.suspend(() => S.Struct({
166
155
  a: S.optional(DNSRequirementsAList),
167
156
  aaaa: S.optional(DNSRequirementsAaaaList),
168
157
  acme_challenge: S.optional(AcmeChallenge),
169
158
  cname: S.optional(S.String),
170
159
  ownership: S.optional(OwnershipVerification),
171
- })).annotate({
172
- identifier: "DNSRequirements",
173
- });
160
+ })).annotate({ identifier: "DNSRequirements" });
174
161
  export const CertificateValidation = /*@__PURE__*/ S.suspend(() => S.Struct({
175
162
  alpn_configured: S.optional(S.Boolean),
176
163
  dns_configured: S.optional(S.Boolean),
177
164
  http_configured: S.optional(S.Boolean),
178
165
  ownership_txt_configured: S.optional(S.Boolean),
179
- })).annotate({
180
- identifier: "CertificateValidation",
181
- });
166
+ })).annotate({ identifier: "CertificateValidation" });
182
167
  export const CertificateValidationError = /*@__PURE__*/ S.suspend(() => S.Struct({
183
168
  code: S.optional(S.String),
184
169
  message: S.optional(S.String),
@@ -187,8 +172,7 @@ export const CertificateValidationError = /*@__PURE__*/ S.suspend(() => S.Struct
187
172
  })).annotate({
188
173
  identifier: "CertificateValidationError",
189
174
  });
190
- export const CertificateCheckResponseValidationErrorsList =
191
- /*@__PURE__*/ S.Array(CertificateValidationError);
175
+ export const CertificateCheckResponseValidationErrorsList = /*@__PURE__*/ S.Array(CertificateValidationError);
192
176
  export const CertificateCheckResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
193
177
  acme_requested: S.optional(S.Boolean),
194
178
  certificates: S.optional(CertificateCheckResponseCertificatesList),
@@ -201,41 +185,30 @@ export const CertificateCheckResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
201
185
  status: S.optional(S.String),
202
186
  validation: S.optional(CertificateValidation),
203
187
  validation_errors: S.optional(CertificateCheckResponseValidationErrorsList),
204
- })).annotate({
205
- identifier: "CertificateCheckResponse",
206
- });
188
+ })).annotate({ identifier: "CertificateCheckResponse" });
207
189
  export const CordonMachineRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
208
190
  app_name: S.String.pipe(T.Label()),
209
191
  machine_id: S.String.pipe(T.Label()),
210
- }).pipe(T.Http({
211
- method: "POST",
212
- uri: "/v1/apps/{app_name}/machines/{machine_id}/cordon",
213
- code: 200,
214
- }))).annotate({
215
- identifier: "CordonMachineRequest",
216
- });
192
+ lease_nonce: S.optional(S.String.pipe(T.Header("fly-machine-lease-nonce"))),
193
+ }).pipe(T.Http({ method: "POST", uri: "/v1/apps/{app_name}/machines/{machine_id}/cordon", code: 200 }))).annotate({ identifier: "CordonMachineRequest" });
217
194
  export const CordonMachineResponse = /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({
218
195
  identifier: "CordonMachineResponse",
219
196
  });
220
197
  export const CreateAppRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
221
198
  enable_subdomains: S.optional(S.Boolean),
199
+ idempotency_key: S.optional(S.String),
222
200
  name: S.optional(S.String),
223
201
  network: S.optional(S.String),
224
202
  org_slug: S.optional(S.String),
225
- }).pipe(T.Http({ method: "POST", uri: "/v1/apps", code: 200 }))).annotate({
226
- identifier: "CreateAppRequest",
227
- });
228
- export const CreateAppResponse = /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({
229
- identifier: "CreateAppResponse",
230
- });
203
+ }).pipe(T.Http({ method: "POST", uri: "/v1/apps", code: 200 }))).annotate({ identifier: "CreateAppRequest" });
204
+ export const CreateAppResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
205
+ created_at: S.optional(S.Number),
206
+ id: S.optional(S.String),
207
+ })).annotate({ identifier: "CreateAppResponse" });
231
208
  export const CreateAppAcmeCertificateRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
232
209
  app_name: S.String.pipe(T.Label()),
233
210
  hostname: S.optional(S.String),
234
- }).pipe(T.Http({
235
- method: "POST",
236
- uri: "/v1/apps/{app_name}/certificates/acme",
237
- code: 200,
238
- }))).annotate({
211
+ }).pipe(T.Http({ method: "POST", uri: "/v1/apps/{app_name}/certificates/acme", code: 200 }))).annotate({
239
212
  identifier: "CreateAppAcmeCertificateRequest",
240
213
  });
241
214
  export const CertificateDetailCertificatesList = /*@__PURE__*/ S.Array(CertificateEntry);
@@ -251,29 +224,19 @@ export const CertificateDetail = /*@__PURE__*/ S.suspend(() => S.Struct({
251
224
  status: S.optional(S.String),
252
225
  validation: S.optional(CertificateValidation),
253
226
  validation_errors: S.optional(CertificateDetailValidationErrorsList),
254
- })).annotate({
255
- identifier: "CertificateDetail",
256
- });
227
+ })).annotate({ identifier: "CertificateDetail" });
257
228
  export const CreateAppCustomCertificateRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
258
229
  app_name: S.String.pipe(T.Label()),
259
230
  fullchain: S.optional(S.String),
260
231
  hostname: S.optional(S.String),
261
232
  private_key: S.optional(S.String.pipe(T.SensitiveValue({}))),
262
- }).pipe(T.Http({
263
- method: "POST",
264
- uri: "/v1/apps/{app_name}/certificates/custom",
265
- code: 200,
266
- }))).annotate({
233
+ }).pipe(T.Http({ method: "POST", uri: "/v1/apps/{app_name}/certificates/custom", code: 200 }))).annotate({
267
234
  identifier: "CreateAppCustomCertificateRequest",
268
235
  });
269
236
  export const CreateAppDeployTokenRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
270
237
  app_name: S.String.pipe(T.Label()),
271
238
  expiry: S.optional(S.String),
272
- }).pipe(T.Http({
273
- method: "POST",
274
- uri: "/v1/apps/{app_name}/deploy_token",
275
- code: 200,
276
- }))).annotate({
239
+ }).pipe(T.Http({ method: "POST", uri: "/v1/apps/{app_name}/deploy_token", code: 200 }))).annotate({
277
240
  identifier: "CreateAppDeployTokenRequest",
278
241
  });
279
242
  export const CreateAppDeployTokenResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
@@ -289,40 +252,35 @@ export const CreateAppIPAssignmentRequest = /*@__PURE__*/ S.suspend(() => S.Stru
289
252
  region: S.optional(S.String),
290
253
  service_name: S.optional(S.String),
291
254
  type: S.optional(IPAssignmentType),
292
- }).pipe(T.Http({
293
- method: "POST",
294
- uri: "/v1/apps/{app_name}/ip_assignments",
295
- code: 200,
296
- }))).annotate({
255
+ }).pipe(T.Http({ method: "POST", uri: "/v1/apps/{app_name}/ip_assignments", code: 200 }))).annotate({
297
256
  identifier: "CreateAppIPAssignmentRequest",
298
257
  });
299
258
  export const IPPair = /*@__PURE__*/ S.suspend(() => S.Struct({
300
259
  v4: S.optional(S.String),
301
260
  v6: S.optional(S.String),
302
261
  })).annotate({ identifier: "IPPair" });
262
+ export const IPAssignmentNetwork = /*@__PURE__*/ S.suspend(() => S.Struct({
263
+ name: S.optional(S.String),
264
+ org_slug: S.optional(S.String),
265
+ })).annotate({ identifier: "IPAssignmentNetwork" });
303
266
  export const AssignIPResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
304
267
  created_at: S.optional(S.String),
305
268
  egress: S.optional(S.Boolean),
306
269
  ip: S.optional(S.String),
307
270
  ip_pair: S.optional(IPPair),
271
+ network: S.optional(S.NullOr(IPAssignmentNetwork)),
308
272
  region: S.optional(S.String),
309
273
  service_name: S.optional(S.String),
310
274
  shared: S.optional(S.Boolean),
311
- })).annotate({
312
- identifier: "AssignIPResponse",
313
- });
275
+ })).annotate({ identifier: "AssignIPResponse" });
314
276
  export const FlyMachineCacheDrive = /*@__PURE__*/ S.suspend(() => S.Struct({
315
277
  size_mb: S.optional(S.Number),
316
- })).annotate({
317
- identifier: "FlyMachineCacheDrive",
318
- });
278
+ })).annotate({ identifier: "FlyMachineCacheDrive" });
319
279
  export const FlyMachineHTTPHeaderValuesList = /*@__PURE__*/ S.Array(S.String);
320
280
  export const FlyMachineHTTPHeader = /*@__PURE__*/ S.suspend(() => S.Struct({
321
281
  name: S.optional(S.String),
322
282
  values: S.optional(FlyMachineHTTPHeaderValuesList),
323
- })).annotate({
324
- identifier: "FlyMachineHTTPHeader",
325
- });
283
+ })).annotate({ identifier: "FlyMachineHTTPHeader" });
326
284
  export const FlyMachineCheckHeadersList = /*@__PURE__*/ S.Array(FlyMachineHTTPHeader);
327
285
  export const FlyMachineCheckKind = S.String;
328
286
  export const FlyMachineCheck = /*@__PURE__*/ S.suspend(() => S.Struct({
@@ -338,18 +296,14 @@ export const FlyMachineCheck = /*@__PURE__*/ S.suspend(() => S.Struct({
338
296
  tls_server_name: S.optional(S.String),
339
297
  tls_skip_verify: S.optional(S.Boolean),
340
298
  type: S.optional(S.String),
341
- })).annotate({
342
- identifier: "FlyMachineCheck",
343
- });
299
+ })).annotate({ identifier: "FlyMachineCheck" });
344
300
  export const FlyMachineConfigChecksMap = /*@__PURE__*/ S.Record(S.String, FlyMachineCheck);
345
301
  export const FlyContainerConfigCmdList = /*@__PURE__*/ S.Array(S.String);
346
302
  export const FlyContainerDependencyCondition = S.String;
347
303
  export const FlyContainerDependency = /*@__PURE__*/ S.suspend(() => S.Struct({
348
304
  condition: S.optional(FlyContainerDependencyCondition),
349
305
  name: S.optional(S.String),
350
- })).annotate({
351
- identifier: "FlyContainerDependency",
352
- });
306
+ })).annotate({ identifier: "FlyContainerDependency" });
353
307
  export const FlyContainerConfigDependsOnList = /*@__PURE__*/ S.Array(FlyContainerDependency);
354
308
  export const FlyContainerConfigEntrypointList = /*@__PURE__*/ S.Array(S.String);
355
309
  export const FlyContainerConfigEnvMap = /*@__PURE__*/ S.Record(S.String, S.String);
@@ -371,9 +325,7 @@ export const FlyContainerConfigFilesList = /*@__PURE__*/ S.Array(FlyFile);
371
325
  export const FlyExecHealthcheckCommandList = /*@__PURE__*/ S.Array(S.String);
372
326
  export const FlyExecHealthcheck = /*@__PURE__*/ S.suspend(() => S.Struct({
373
327
  command: S.optional(FlyExecHealthcheckCommandList),
374
- })).annotate({
375
- identifier: "FlyExecHealthcheck",
376
- });
328
+ })).annotate({ identifier: "FlyExecHealthcheck" });
377
329
  export const FlyHTTPHealthcheckHeadersList = /*@__PURE__*/ S.Array(FlyMachineHTTPHeader);
378
330
  export const FlyContainerHealthcheckScheme = S.String;
379
331
  export const FlyHTTPHealthcheck = /*@__PURE__*/ S.suspend(() => S.Struct({
@@ -384,15 +336,11 @@ export const FlyHTTPHealthcheck = /*@__PURE__*/ S.suspend(() => S.Struct({
384
336
  scheme: S.optional(FlyContainerHealthcheckScheme),
385
337
  tls_server_name: S.optional(S.String),
386
338
  tls_skip_verify: S.optional(S.Boolean),
387
- })).annotate({
388
- identifier: "FlyHTTPHealthcheck",
389
- });
339
+ })).annotate({ identifier: "FlyHTTPHealthcheck" });
390
340
  export const FlyContainerHealthcheckKind = S.String;
391
341
  export const FlyTCPHealthcheck = /*@__PURE__*/ S.suspend(() => S.Struct({
392
342
  port: S.optional(S.Number),
393
- })).annotate({
394
- identifier: "FlyTCPHealthcheck",
395
- });
343
+ })).annotate({ identifier: "FlyTCPHealthcheck" });
396
344
  export const FlyUnhealthyPolicy = S.String;
397
345
  export const FlyContainerHealthcheck = /*@__PURE__*/ S.suspend(() => S.Struct({
398
346
  exec: S.optional(FlyExecHealthcheck),
@@ -406,24 +354,17 @@ export const FlyContainerHealthcheck = /*@__PURE__*/ S.suspend(() => S.Struct({
406
354
  tcp: S.optional(FlyTCPHealthcheck),
407
355
  timeout: S.optional(S.Number),
408
356
  unhealthy: S.optional(FlyUnhealthyPolicy),
409
- })).annotate({
410
- identifier: "FlyContainerHealthcheck",
411
- });
357
+ })).annotate({ identifier: "FlyContainerHealthcheck" });
412
358
  export const FlyContainerConfigHealthchecksList = /*@__PURE__*/ S.Array(FlyContainerHealthcheck);
413
359
  export const FlyMachineRestartPolicy = S.String;
414
360
  export const FlyMachineRestart = /*@__PURE__*/ S.suspend(() => S.Struct({
415
- gpu_bid_price: S.optional(S.Number),
416
361
  max_retries: S.optional(S.Number),
417
362
  policy: S.optional(FlyMachineRestartPolicy),
418
- })).annotate({
419
- identifier: "FlyMachineRestart",
420
- });
363
+ })).annotate({ identifier: "FlyMachineRestart" });
421
364
  export const FlyMachineSecret = /*@__PURE__*/ S.suspend(() => S.Struct({
422
365
  env_var: S.optional(S.String),
423
366
  name: S.optional(S.String),
424
- })).annotate({
425
- identifier: "FlyMachineSecret",
426
- });
367
+ })).annotate({ identifier: "FlyMachineSecret" });
427
368
  export const FlyContainerConfigSecretsList = /*@__PURE__*/ S.Array(FlyMachineSecret);
428
369
  export const FlyStopConfigSignal = S.String;
429
370
  export const FlyStopConfig = /*@__PURE__*/ S.suspend(() => S.Struct({
@@ -445,16 +386,12 @@ export const FlyContainerConfig = /*@__PURE__*/ S.suspend(() => S.Struct({
445
386
  secrets: S.optional(FlyContainerConfigSecretsList),
446
387
  stop: S.optional(FlyStopConfig),
447
388
  user: S.optional(S.String),
448
- })).annotate({
449
- identifier: "FlyContainerConfig",
450
- });
389
+ })).annotate({ identifier: "FlyContainerConfig" });
451
390
  export const FlyMachineConfigContainersList = /*@__PURE__*/ S.Array(FlyContainerConfig);
452
391
  export const FlyDnsForwardRule = /*@__PURE__*/ S.suspend(() => S.Struct({
453
392
  addr: S.optional(S.String),
454
393
  basename: S.optional(S.String),
455
- })).annotate({
456
- identifier: "FlyDnsForwardRule",
457
- });
394
+ })).annotate({ identifier: "FlyDnsForwardRule" });
458
395
  export const FlyDNSConfigDnsForwardRulesList = /*@__PURE__*/ S.Array(FlyDnsForwardRule);
459
396
  export const FlyDNSConfigNameserversList = /*@__PURE__*/ S.Array(S.String);
460
397
  export const FlyDnsOption = /*@__PURE__*/ S.suspend(() => S.Struct({
@@ -476,6 +413,7 @@ export const FlyMachineConfigEnvMap = /*@__PURE__*/ S.Record(S.String, S.String)
476
413
  export const FlyMachineConfigFilesList = /*@__PURE__*/ S.Array(FlyFile);
477
414
  export const FlyMachineGuestKernelArgsList = /*@__PURE__*/ S.Array(S.String);
478
415
  export const FlyMachineGuestPersistRootfs = S.String;
416
+ export const FlyMachineGuestRequiredHostFeaturesList = /*@__PURE__*/ S.Array(S.String);
479
417
  export const FlyMachineGuest = /*@__PURE__*/ S.suspend(() => S.Struct({
480
418
  cpu_kind: S.optional(S.String),
481
419
  cpus: S.optional(S.Number),
@@ -486,9 +424,8 @@ export const FlyMachineGuest = /*@__PURE__*/ S.suspend(() => S.Struct({
486
424
  max_memory_mb: S.optional(S.Number),
487
425
  memory_mb: S.optional(S.Number),
488
426
  persist_rootfs: S.optional(FlyMachineGuestPersistRootfs),
489
- })).annotate({
490
- identifier: "FlyMachineGuest",
491
- });
427
+ required_host_features: S.optional(FlyMachineGuestRequiredHostFeaturesList),
428
+ })).annotate({ identifier: "FlyMachineGuest" });
492
429
  export const FlyMachineInitCmdList = /*@__PURE__*/ S.Array(S.String);
493
430
  export const FlyMachineInitEntrypointList = /*@__PURE__*/ S.Array(S.String);
494
431
  export const FlyMachineInitExecList = /*@__PURE__*/ S.Array(S.String);
@@ -506,21 +443,19 @@ export const FlyMachineMetrics = /*@__PURE__*/ S.suspend(() => S.Struct({
506
443
  https: S.optional(S.Boolean),
507
444
  path: S.optional(S.String),
508
445
  port: S.optional(S.Number),
509
- })).annotate({
510
- identifier: "FlyMachineMetrics",
511
- });
446
+ })).annotate({ identifier: "FlyMachineMetrics" });
512
447
  export const FlyMachineMount = /*@__PURE__*/ S.suspend(() => S.Struct({
513
448
  add_size_gb: S.optional(S.Number),
449
+ add_size_percent: S.optional(S.Number),
514
450
  encrypted: S.optional(S.Boolean),
515
451
  extend_threshold_percent: S.optional(S.Number),
452
+ min_add_size_gb: S.optional(S.Number),
516
453
  name: S.optional(S.String),
517
454
  path: S.optional(S.String),
518
455
  size_gb: S.optional(S.Number),
519
456
  size_gb_limit: S.optional(S.Number),
520
457
  volume: S.optional(S.String),
521
- })).annotate({
522
- identifier: "FlyMachineMount",
523
- });
458
+ })).annotate({ identifier: "FlyMachineMount" });
524
459
  export const FlyMachineConfigMountsList = /*@__PURE__*/ S.Array(FlyMachineMount);
525
460
  export const FlyMachineProcessCmdList = /*@__PURE__*/ S.Array(S.String);
526
461
  export const FlyMachineProcessEntrypointList = /*@__PURE__*/ S.Array(S.String);
@@ -537,18 +472,18 @@ export const FlyMachineProcess = /*@__PURE__*/ S.suspend(() => S.Struct({
537
472
  ignore_app_secrets: S.optional(S.Boolean),
538
473
  secrets: S.optional(FlyMachineProcessSecretsList),
539
474
  user: S.optional(S.String),
540
- })).annotate({
541
- identifier: "FlyMachineProcess",
542
- });
475
+ })).annotate({ identifier: "FlyMachineProcess" });
543
476
  export const FlyMachineConfigProcessesList = /*@__PURE__*/ S.Array(FlyMachineProcess);
544
477
  export const FlyMachineRootfsPersist = S.String;
545
478
  export const FlyMachineRootfs = /*@__PURE__*/ S.suspend(() => S.Struct({
546
479
  persist: S.optional(FlyMachineRootfsPersist),
547
480
  size_gb: S.optional(S.Number),
548
- })).annotate({
549
- identifier: "FlyMachineRootfs",
550
- });
551
- export const FlyMachineServiceAutostop = S.String;
481
+ })).annotate({ identifier: "FlyMachineRootfs" });
482
+ export const FlyMachineServiceAutostopMode = S.String;
483
+ export const FlyMachineServiceAutostop = /*@__PURE__*/ S.Union([
484
+ FlyMachineServiceAutostopMode,
485
+ S.Boolean,
486
+ ]);
552
487
  export const FlyMachineServiceCheckHeadersList = /*@__PURE__*/ S.Array(FlyMachineHTTPHeader);
553
488
  export const FlyMachineServiceCheck = /*@__PURE__*/ S.suspend(() => S.Struct({
554
489
  grace_period: S.optional(S.String),
@@ -562,9 +497,7 @@ export const FlyMachineServiceCheck = /*@__PURE__*/ S.suspend(() => S.Struct({
562
497
  tls_server_name: S.optional(S.String),
563
498
  tls_skip_verify: S.optional(S.Boolean),
564
499
  type: S.optional(S.String),
565
- })).annotate({
566
- identifier: "FlyMachineServiceCheck",
567
- });
500
+ })).annotate({ identifier: "FlyMachineServiceCheck" });
568
501
  export const FlyMachineServiceChecksList = /*@__PURE__*/ S.Array(FlyMachineServiceCheck);
569
502
  export const FlyMachineServiceConcurrency = /*@__PURE__*/ S.suspend(() => S.Struct({
570
503
  hard_limit: S.optional(S.Number),
@@ -587,9 +520,7 @@ export const FlyHTTPResponseOptionsHeadersMap = /*@__PURE__*/ S.Record(S.String,
587
520
  export const FlyHTTPResponseOptions = /*@__PURE__*/ S.suspend(() => S.Struct({
588
521
  headers: S.optional(FlyHTTPResponseOptionsHeadersMap),
589
522
  pristine: S.optional(S.Boolean),
590
- })).annotate({
591
- identifier: "FlyHTTPResponseOptions",
592
- });
523
+ })).annotate({ identifier: "FlyHTTPResponseOptions" });
593
524
  export const FlyHTTPOptions = /*@__PURE__*/ S.suspend(() => S.Struct({
594
525
  compress: S.optional(S.Boolean),
595
526
  h2_backend: S.optional(S.Boolean),
@@ -600,9 +531,7 @@ export const FlyHTTPOptions = /*@__PURE__*/ S.suspend(() => S.Struct({
600
531
  })).annotate({ identifier: "FlyHTTPOptions" });
601
532
  export const FlyProxyProtoOptions = /*@__PURE__*/ S.suspend(() => S.Struct({
602
533
  version: S.optional(S.String),
603
- })).annotate({
604
- identifier: "FlyProxyProtoOptions",
605
- });
534
+ })).annotate({ identifier: "FlyProxyProtoOptions" });
606
535
  export const FlyTLSOptionsAlpnList = /*@__PURE__*/ S.Array(S.String);
607
536
  export const FlyTLSOptionsVersionsList = /*@__PURE__*/ S.Array(S.String);
608
537
  export const FlyTLSOptions = /*@__PURE__*/ S.suspend(() => S.Struct({
@@ -632,9 +561,7 @@ export const FlyMachineService = /*@__PURE__*/ S.suspend(() => S.Struct({
632
561
  min_machines_running: S.optional(S.Number),
633
562
  ports: S.optional(FlyMachineServicePortsList),
634
563
  protocol: S.optional(S.String),
635
- })).annotate({
636
- identifier: "FlyMachineService",
637
- });
564
+ })).annotate({ identifier: "FlyMachineService" });
638
565
  export const FlyMachineConfigServicesList = /*@__PURE__*/ S.Array(FlyMachineService);
639
566
  export const FlyMachineSpot = /*@__PURE__*/ S.suspend(() => S.Struct({
640
567
  max_price_fraction: S.optional(S.Number),
@@ -672,9 +599,7 @@ export const FlyMachineConfig = /*@__PURE__*/ S.suspend(() => S.Struct({
672
599
  standbys: S.optional(FlyMachineConfigStandbysList),
673
600
  statics: S.optional(FlyMachineConfigStaticsList),
674
601
  stop_config: S.optional(FlyStopConfig),
675
- })).annotate({
676
- identifier: "FlyMachineConfig",
677
- });
602
+ })).annotate({ identifier: "FlyMachineConfig" });
678
603
  export const CreateMachineRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
679
604
  app_name: S.String.pipe(T.Label()),
680
605
  config: S.optional(FlyMachineConfig),
@@ -685,9 +610,7 @@ export const CreateMachineRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
685
610
  skip_launch: S.optional(S.Boolean),
686
611
  skip_secrets: S.optional(S.Boolean),
687
612
  skip_service_registration: S.optional(S.Boolean),
688
- }).pipe(T.Http({ method: "POST", uri: "/v1/apps/{app_name}/machines", code: 200 }))).annotate({
689
- identifier: "CreateMachineRequest",
690
- });
613
+ }).pipe(T.Http({ method: "POST", uri: "/v1/apps/{app_name}/machines", code: 200 }))).annotate({ identifier: "CreateMachineRequest" });
691
614
  export const CheckStatus = /*@__PURE__*/ S.suspend(() => S.Struct({
692
615
  name: S.optional(S.String),
693
616
  output: S.optional(S.String),
@@ -704,6 +627,7 @@ export const MachineEvent = /*@__PURE__*/ S.suspend(() => S.Struct({
704
627
  type: S.optional(S.String),
705
628
  })).annotate({ identifier: "MachineEvent" });
706
629
  export const MachineEventsList = /*@__PURE__*/ S.Array(MachineEvent);
630
+ export const MachineHostFeaturesList = /*@__PURE__*/ S.Array(S.String);
707
631
  export const MachineHostStatus = S.String;
708
632
  export const ImageRefLabelsMap = /*@__PURE__*/ S.Record(S.String, S.String);
709
633
  export const ImageRef = /*@__PURE__*/ S.suspend(() => S.Struct({
@@ -724,6 +648,7 @@ export const Machine = /*@__PURE__*/ S.suspend(() => S.Struct({
724
648
  cordoned: S.optional(S.Boolean),
725
649
  created_at: S.optional(S.String),
726
650
  events: S.optional(MachineEventsList),
651
+ host_features: S.optional(MachineHostFeaturesList),
727
652
  host_status: S.optional(MachineHostStatus),
728
653
  id: S.optional(S.String),
729
654
  image_ref: S.optional(ImageRef),
@@ -736,17 +661,15 @@ export const Machine = /*@__PURE__*/ S.suspend(() => S.Struct({
736
661
  region: S.optional(S.String),
737
662
  state: S.optional(S.String),
738
663
  updated_at: S.optional(S.String),
664
+ version: S.optional(S.String),
739
665
  })).annotate({ identifier: "Machine" });
740
666
  export const CreateMachineLeaseRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
741
667
  app_name: S.String.pipe(T.Label()),
742
668
  machine_id: S.String.pipe(T.Label()),
743
669
  description: S.optional(S.String),
744
- ttl: S.optional(S.Number),
745
- }).pipe(T.Http({
746
- method: "POST",
747
- uri: "/v1/apps/{app_name}/machines/{machine_id}/lease",
748
- code: 200,
749
- }))).annotate({
670
+ ttl: S.optional(S.Number.pipe(T.Query())),
671
+ lease_nonce: S.optional(S.String.pipe(T.Header("fly-machine-lease-nonce"))),
672
+ }).pipe(T.Http({ method: "POST", uri: "/v1/apps/{app_name}/machines/{machine_id}/lease", code: 200 }))).annotate({
750
673
  identifier: "CreateMachineLeaseRequest",
751
674
  });
752
675
  export const Lease = /*@__PURE__*/ S.suspend(() => S.Struct({
@@ -756,6 +679,10 @@ export const Lease = /*@__PURE__*/ S.suspend(() => S.Struct({
756
679
  owner: S.optional(S.String),
757
680
  version: S.optional(S.String),
758
681
  })).annotate({ identifier: "Lease" });
682
+ export const MachineLease = /*@__PURE__*/ S.suspend(() => S.Struct({
683
+ status: S.optional(S.String),
684
+ data: S.optional(Lease),
685
+ })).annotate({ identifier: "MachineLease" });
759
686
  export const CreatePostgresRequestPgMajorVersion = S.String;
760
687
  export const CreatePostgresRequestPlan = S.String;
761
688
  export const CreatePostgresRequestPoolMode = S.String;
@@ -768,39 +695,27 @@ export const CreatePostgresRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
768
695
  pool_mode: S.optional(CreatePostgresRequestPoolMode),
769
696
  postgis_enabled: S.optional(S.Boolean),
770
697
  region: S.String,
771
- }).pipe(T.Http({ method: "POST", uri: "/v1/postgres", code: 200 }))).annotate({
772
- identifier: "CreatePostgresRequest",
773
- });
698
+ }).pipe(T.Http({ method: "POST", uri: "/v1/postgres", code: 200 }))).annotate({ identifier: "CreatePostgresRequest" });
774
699
  export const PostgresAttachedApp = /*@__PURE__*/ S.suspend(() => S.Struct({
775
700
  name: S.optional(S.String),
776
- })).annotate({
777
- identifier: "PostgresAttachedApp",
778
- });
701
+ })).annotate({ identifier: "PostgresAttachedApp" });
779
702
  export const PostgresClusterAttachedAppsList = /*@__PURE__*/ S.Array(PostgresAttachedApp);
780
703
  export const PostgresClusterCpuKind = S.String;
781
704
  export const PostgresEndpoint = /*@__PURE__*/ S.suspend(() => S.Struct({
782
705
  host: S.optional(S.String),
783
706
  port: S.optional(S.Number),
784
- })).annotate({
785
- identifier: "PostgresEndpoint",
786
- });
707
+ })).annotate({ identifier: "PostgresEndpoint" });
787
708
  export const PostgresNodeEndpoints = /*@__PURE__*/ S.suspend(() => S.Struct({
788
709
  direct: S.optional(PostgresEndpoint),
789
710
  pooler: S.optional(PostgresEndpoint),
790
- })).annotate({
791
- identifier: "PostgresNodeEndpoints",
792
- });
711
+ })).annotate({ identifier: "PostgresNodeEndpoints" });
793
712
  export const PostgresClusterEndpoints = /*@__PURE__*/ S.suspend(() => S.Struct({
794
713
  primary: S.optional(PostgresNodeEndpoints),
795
- })).annotate({
796
- identifier: "PostgresClusterEndpoints",
797
- });
714
+ })).annotate({ identifier: "PostgresClusterEndpoints" });
798
715
  export const OrganizationRef = /*@__PURE__*/ S.suspend(() => S.Struct({
799
716
  name: S.optional(S.String),
800
717
  slug: S.optional(S.String),
801
- })).annotate({
802
- identifier: "OrganizationRef",
803
- });
718
+ })).annotate({ identifier: "OrganizationRef" });
804
719
  export const PostgresClusterPgMajorVersion = S.String;
805
720
  export const PostgresClusterPlan = S.String;
806
721
  export const PostgresClusterStatus = S.String;
@@ -821,9 +736,9 @@ export const PostgresCluster = /*@__PURE__*/ S.suspend(() => S.Struct({
821
736
  region: S.optional(S.String),
822
737
  replicas: S.optional(S.Number),
823
738
  status: S.optional(PostgresClusterStatus),
824
- })).annotate({
825
- identifier: "PostgresCluster",
826
- });
739
+ storage_provisioned_bytes: S.optional(S.NullOr(S.Number)),
740
+ storage_used_bytes: S.optional(S.NullOr(S.Number)),
741
+ })).annotate({ identifier: "PostgresCluster" });
827
742
  export const ShowPostgresClusterResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
828
743
  data: S.optional(PostgresCluster),
829
744
  })).annotate({
@@ -832,20 +747,14 @@ export const ShowPostgresClusterResponse = /*@__PURE__*/ S.suspend(() => S.Struc
832
747
  export const CreatePostgresAttachmentRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
833
748
  postgres_cluster_id: S.String.pipe(T.Label()),
834
749
  app_name: S.String,
835
- }).pipe(T.Http({
836
- method: "POST",
837
- uri: "/v1/postgres/{postgres_cluster_id}/attachments",
838
- code: 200,
839
- }))).annotate({
750
+ }).pipe(T.Http({ method: "POST", uri: "/v1/postgres/{postgres_cluster_id}/attachments", code: 200 }))).annotate({
840
751
  identifier: "CreatePostgresAttachmentRequest",
841
752
  });
842
753
  export const PostgresAttachment = /*@__PURE__*/ S.suspend(() => S.Struct({
843
754
  app_name: S.optional(S.String),
844
755
  attached_at: S.optional(S.String),
845
756
  postgres_cluster_id: S.optional(S.String),
846
- })).annotate({
847
- identifier: "PostgresAttachment",
848
- });
757
+ })).annotate({ identifier: "PostgresAttachment" });
849
758
  export const CreatePostgresAttachmentResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
850
759
  data: S.optional(PostgresAttachment),
851
760
  })).annotate({
@@ -855,11 +764,7 @@ export const CreatePostgresBackupRequestType = S.String;
855
764
  export const CreatePostgresBackupRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
856
765
  postgres_cluster_id: S.String.pipe(T.Label()),
857
766
  type: CreatePostgresBackupRequestType,
858
- }).pipe(T.Http({
859
- method: "POST",
860
- uri: "/v1/postgres/{postgres_cluster_id}/backups",
861
- code: 200,
862
- }))).annotate({
767
+ }).pipe(T.Http({ method: "POST", uri: "/v1/postgres/{postgres_cluster_id}/backups", code: 200 }))).annotate({
863
768
  identifier: "CreatePostgresBackupRequest",
864
769
  });
865
770
  export const CreatePostgresBackupResponse = /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({
@@ -868,33 +773,21 @@ export const CreatePostgresBackupResponse = /*@__PURE__*/ S.suspend(() => S.Stru
868
773
  export const CreatePostgresDatabaseRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
869
774
  postgres_cluster_id: S.String.pipe(T.Label()),
870
775
  name: S.String,
871
- }).pipe(T.Http({
872
- method: "POST",
873
- uri: "/v1/postgres/{postgres_cluster_id}/databases",
874
- code: 200,
875
- }))).annotate({
776
+ }).pipe(T.Http({ method: "POST", uri: "/v1/postgres/{postgres_cluster_id}/databases", code: 200 }))).annotate({
876
777
  identifier: "CreatePostgresDatabaseRequest",
877
778
  });
878
779
  export const PostgresDatabase = /*@__PURE__*/ S.suspend(() => S.Struct({
879
780
  name: S.optional(S.String),
880
- })).annotate({
881
- identifier: "PostgresDatabase",
882
- });
781
+ })).annotate({ identifier: "PostgresDatabase" });
883
782
  export const PostgresDatabaseResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
884
783
  data: S.optional(PostgresDatabase),
885
- })).annotate({
886
- identifier: "PostgresDatabaseResponse",
887
- });
784
+ })).annotate({ identifier: "PostgresDatabaseResponse" });
888
785
  export const CreatePostgresUserRequestRole = S.String;
889
786
  export const CreatePostgresUserRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
890
787
  postgres_cluster_id: S.String.pipe(T.Label()),
891
788
  role: CreatePostgresUserRequestRole,
892
789
  username: S.String,
893
- }).pipe(T.Http({
894
- method: "POST",
895
- uri: "/v1/postgres/{postgres_cluster_id}/users",
896
- code: 200,
897
- }))).annotate({
790
+ }).pipe(T.Http({ method: "POST", uri: "/v1/postgres/{postgres_cluster_id}/users", code: 200 }))).annotate({
898
791
  identifier: "CreatePostgresUserRequest",
899
792
  });
900
793
  export const PostgresUserRole = S.String;
@@ -911,13 +804,7 @@ export const CreateSecretRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
911
804
  app_name: S.String.pipe(T.Label()),
912
805
  secret_name: S.String.pipe(T.Label()),
913
806
  value: S.optional(S.String),
914
- }).pipe(T.Http({
915
- method: "POST",
916
- uri: "/v1/apps/{app_name}/secrets/{secret_name}",
917
- code: 200,
918
- }))).annotate({
919
- identifier: "CreateSecretRequest",
920
- });
807
+ }).pipe(T.Http({ method: "POST", uri: "/v1/apps/{app_name}/secrets/{secret_name}", code: 200 }))).annotate({ identifier: "CreateSecretRequest" });
921
808
  export const SetAppSecretResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
922
809
  Version: S.optional(S.Number),
923
810
  created_at: S.optional(S.String),
@@ -926,9 +813,7 @@ export const SetAppSecretResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
926
813
  updated_at: S.optional(S.String),
927
814
  value: S.optional(S.String),
928
815
  version: S.optional(S.Number),
929
- })).annotate({
930
- identifier: "SetAppSecretResponse",
931
- });
816
+ })).annotate({ identifier: "SetAppSecretResponse" });
932
817
  export const CreateVolumeRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
933
818
  app_name: S.String.pipe(T.Label()),
934
819
  auto_backup_enabled: S.optional(S.Boolean),
@@ -944,10 +829,10 @@ export const CreateVolumeRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
944
829
  snapshot_retention: S.optional(S.Number),
945
830
  source_volume_id: S.optional(S.String),
946
831
  unique_zone_app_wide: S.optional(S.Boolean),
947
- }).pipe(T.Http({ method: "POST", uri: "/v1/apps/{app_name}/volumes", code: 200 }))).annotate({
948
- identifier: "CreateVolumeRequest",
949
- });
832
+ }).pipe(T.Http({ method: "POST", uri: "/v1/apps/{app_name}/volumes", code: 200 }))).annotate({ identifier: "CreateVolumeRequest" });
833
+ export const VolumeHostFeaturesList = /*@__PURE__*/ S.Array(S.String);
950
834
  export const VolumeHostStatus = S.String;
835
+ export const VolumeRequiredHostFeaturesList = /*@__PURE__*/ S.Array(S.String);
951
836
  export const VolumeType = S.String;
952
837
  export const Volume = /*@__PURE__*/ S.suspend(() => S.Struct({
953
838
  attached_alloc_id: S.optional(S.String),
@@ -962,10 +847,12 @@ export const Volume = /*@__PURE__*/ S.suspend(() => S.Struct({
962
847
  created_at: S.optional(S.String),
963
848
  encrypted: S.optional(S.Boolean),
964
849
  fstype: S.optional(S.String),
850
+ host_features: S.optional(VolumeHostFeaturesList),
965
851
  host_status: S.optional(VolumeHostStatus),
966
852
  id: S.optional(S.String),
967
853
  name: S.optional(S.String),
968
854
  region: S.optional(S.String),
855
+ required_host_features: S.optional(VolumeRequiredHostFeaturesList),
969
856
  size_gb: S.optional(S.Number),
970
857
  snapshot_retention: S.optional(S.Number),
971
858
  state: S.optional(S.String),
@@ -975,11 +862,7 @@ export const Volume = /*@__PURE__*/ S.suspend(() => S.Struct({
975
862
  export const CreateVolumeSnapshotRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
976
863
  app_name: S.String.pipe(T.Label()),
977
864
  volume_id: S.String.pipe(T.Label()),
978
- }).pipe(T.Http({
979
- method: "POST",
980
- uri: "/v1/apps/{app_name}/volumes/{volume_id}/snapshots",
981
- code: 200,
982
- }))).annotate({
865
+ }).pipe(T.Http({ method: "POST", uri: "/v1/apps/{app_name}/volumes/{volume_id}/snapshots", code: 200 }))).annotate({
983
866
  identifier: "CreateVolumeSnapshotRequest",
984
867
  });
985
868
  export const CreateVolumeSnapshotResponse = /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({
@@ -995,19 +878,13 @@ export const DecryptSecretKeyRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
995
878
  method: "POST",
996
879
  uri: "/v1/apps/{app_name}/secretkeys/{secret_name}/decrypt",
997
880
  code: 200,
998
- }))).annotate({
999
- identifier: "DecryptSecretKeyRequest",
1000
- });
881
+ }))).annotate({ identifier: "DecryptSecretKeyRequest" });
1001
882
  export const DecryptSecretkeyResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
1002
883
  plaintext: S.optional(S.String.pipe(T.SensitiveValue({}))),
1003
- })).annotate({
1004
- identifier: "DecryptSecretkeyResponse",
1005
- });
884
+ })).annotate({ identifier: "DecryptSecretkeyResponse" });
1006
885
  export const DeleteAppRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
1007
886
  app_name: S.String.pipe(T.Label()),
1008
- }).pipe(T.Http({ method: "DELETE", uri: "/v1/apps/{app_name}", code: 200 }))).annotate({
1009
- identifier: "DeleteAppRequest",
1010
- });
887
+ }).pipe(T.Http({ method: "DELETE", uri: "/v1/apps/{app_name}", code: 200 }))).annotate({ identifier: "DeleteAppRequest" });
1011
888
  export const DeleteAppResponse = /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({
1012
889
  identifier: "DeleteAppResponse",
1013
890
  });
@@ -1024,11 +901,7 @@ export const DeleteAppAcmeCertificateRequest = /*@__PURE__*/ S.suspend(() => S.S
1024
901
  export const DeleteAppCertificateRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
1025
902
  app_name: S.String.pipe(T.Label()),
1026
903
  hostname: S.String.pipe(T.Label()),
1027
- }).pipe(T.Http({
1028
- method: "DELETE",
1029
- uri: "/v1/apps/{app_name}/certificates/{hostname}",
1030
- code: 200,
1031
- }))).annotate({
904
+ }).pipe(T.Http({ method: "DELETE", uri: "/v1/apps/{app_name}/certificates/{hostname}", code: 200 }))).annotate({
1032
905
  identifier: "DeleteAppCertificateRequest",
1033
906
  });
1034
907
  export const DeleteAppCertificateResponse = /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({
@@ -1044,10 +917,8 @@ export const DeleteAppCustomCertificateRequest = /*@__PURE__*/ S.suspend(() => S
1044
917
  }))).annotate({
1045
918
  identifier: "DeleteAppCustomCertificateRequest",
1046
919
  });
1047
- export const DestroyCustomCertificateResponseCertificatesList =
1048
- /*@__PURE__*/ S.Array(CertificateEntry);
1049
- export const DestroyCustomCertificateResponseValidationErrorsList =
1050
- /*@__PURE__*/ S.Array(CertificateValidationError);
920
+ export const DestroyCustomCertificateResponseCertificatesList = /*@__PURE__*/ S.Array(CertificateEntry);
921
+ export const DestroyCustomCertificateResponseValidationErrorsList = /*@__PURE__*/ S.Array(CertificateValidationError);
1051
922
  export const DestroyCustomCertificateResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
1052
923
  acme_requested: S.optional(S.Boolean),
1053
924
  certificates: S.optional(DestroyCustomCertificateResponseCertificatesList),
@@ -1066,11 +937,7 @@ export const DestroyCustomCertificateResponse = /*@__PURE__*/ S.suspend(() => S.
1066
937
  export const DeleteAppIPAssignmentRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
1067
938
  app_name: S.String.pipe(T.Label()),
1068
939
  ip: S.String.pipe(T.Label()),
1069
- }).pipe(T.Http({
1070
- method: "DELETE",
1071
- uri: "/v1/apps/{app_name}/ip_assignments/{ip}",
1072
- code: 200,
1073
- }))).annotate({
940
+ }).pipe(T.Http({ method: "DELETE", uri: "/v1/apps/{app_name}/ip_assignments/{ip}", code: 200 }))).annotate({
1074
941
  identifier: "DeleteAppIPAssignmentRequest",
1075
942
  });
1076
943
  export const DeleteAppIPAssignmentResponse = /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({
@@ -1080,13 +947,8 @@ export const DeleteMachineRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
1080
947
  app_name: S.String.pipe(T.Label()),
1081
948
  machine_id: S.String.pipe(T.Label()),
1082
949
  force: S.optional(S.Boolean.pipe(T.Query())),
1083
- }).pipe(T.Http({
1084
- method: "DELETE",
1085
- uri: "/v1/apps/{app_name}/machines/{machine_id}",
1086
- code: 200,
1087
- }))).annotate({
1088
- identifier: "DeleteMachineRequest",
1089
- });
950
+ lease_nonce: S.optional(S.String.pipe(T.Header("fly-machine-lease-nonce"))),
951
+ }).pipe(T.Http({ method: "DELETE", uri: "/v1/apps/{app_name}/machines/{machine_id}", code: 200 }))).annotate({ identifier: "DeleteMachineRequest" });
1090
952
  export const DeleteMachineResponse = /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({
1091
953
  identifier: "DeleteMachineResponse",
1092
954
  });
@@ -1106,13 +968,7 @@ export const DeleteMachineMetadataResponse = /*@__PURE__*/ S.suspend(() => S.Str
1106
968
  });
1107
969
  export const DeletePostgresRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
1108
970
  postgres_cluster_id: S.String.pipe(T.Label()),
1109
- }).pipe(T.Http({
1110
- method: "DELETE",
1111
- uri: "/v1/postgres/{postgres_cluster_id}",
1112
- code: 200,
1113
- }))).annotate({
1114
- identifier: "DeletePostgresRequest",
1115
- });
971
+ }).pipe(T.Http({ method: "DELETE", uri: "/v1/postgres/{postgres_cluster_id}", code: 200 }))).annotate({ identifier: "DeletePostgresRequest" });
1116
972
  export const DeletePostgresResponse = /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({
1117
973
  identifier: "DeletePostgresResponse",
1118
974
  });
@@ -1155,45 +1011,23 @@ export const DeletePostgresUserResponse = /*@__PURE__*/ S.suspend(() => S.Struct
1155
1011
  export const DeleteSecretRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
1156
1012
  app_name: S.String.pipe(T.Label()),
1157
1013
  secret_name: S.String.pipe(T.Label()),
1158
- }).pipe(T.Http({
1159
- method: "DELETE",
1160
- uri: "/v1/apps/{app_name}/secrets/{secret_name}",
1161
- code: 200,
1162
- }))).annotate({
1163
- identifier: "DeleteSecretRequest",
1164
- });
1014
+ }).pipe(T.Http({ method: "DELETE", uri: "/v1/apps/{app_name}/secrets/{secret_name}", code: 200 }))).annotate({ identifier: "DeleteSecretRequest" });
1165
1015
  export const DeleteAppSecretResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
1166
1016
  Version: S.optional(S.Number),
1167
1017
  version: S.optional(S.Number),
1168
- })).annotate({
1169
- identifier: "DeleteAppSecretResponse",
1170
- });
1018
+ })).annotate({ identifier: "DeleteAppSecretResponse" });
1171
1019
  export const DeleteSecretKeyRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
1172
1020
  app_name: S.String.pipe(T.Label()),
1173
1021
  secret_name: S.String.pipe(T.Label()),
1174
- }).pipe(T.Http({
1175
- method: "DELETE",
1176
- uri: "/v1/apps/{app_name}/secretkeys/{secret_name}",
1177
- code: 200,
1178
- }))).annotate({
1179
- identifier: "DeleteSecretKeyRequest",
1180
- });
1022
+ }).pipe(T.Http({ method: "DELETE", uri: "/v1/apps/{app_name}/secretkeys/{secret_name}", code: 200 }))).annotate({ identifier: "DeleteSecretKeyRequest" });
1181
1023
  export const DeleteSecretkeyResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
1182
1024
  Version: S.optional(S.Number),
1183
1025
  version: S.optional(S.Number),
1184
- })).annotate({
1185
- identifier: "DeleteSecretkeyResponse",
1186
- });
1026
+ })).annotate({ identifier: "DeleteSecretkeyResponse" });
1187
1027
  export const DeleteVolumeRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
1188
1028
  app_name: S.String.pipe(T.Label()),
1189
1029
  volume_id: S.String.pipe(T.Label()),
1190
- }).pipe(T.Http({
1191
- method: "DELETE",
1192
- uri: "/v1/apps/{app_name}/volumes/{volume_id}",
1193
- code: 200,
1194
- }))).annotate({
1195
- identifier: "DeleteVolumeRequest",
1196
- });
1030
+ }).pipe(T.Http({ method: "DELETE", uri: "/v1/apps/{app_name}/volumes/{volume_id}", code: 200 }))).annotate({ identifier: "DeleteVolumeRequest" });
1197
1031
  export const DisablePostgresExtensionRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
1198
1032
  postgres_cluster_id: S.String.pipe(T.Label()),
1199
1033
  database_name: S.String.pipe(T.Label()),
@@ -1222,9 +1056,7 @@ export const EnablePostgresExtensionRequest = /*@__PURE__*/ S.suspend(() => S.St
1222
1056
  }))).annotate({
1223
1057
  identifier: "EnablePostgresExtensionRequest",
1224
1058
  });
1225
- export const EnablePostgresExtensionResponse = /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({
1226
- identifier: "EnablePostgresExtensionResponse",
1227
- });
1059
+ export const EnablePostgresExtensionResponse = /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({ identifier: "EnablePostgresExtensionResponse" });
1228
1060
  export const EncryptSecretKeyRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
1229
1061
  app_name: S.String.pipe(T.Label()),
1230
1062
  secret_name: S.String.pipe(T.Label()),
@@ -1235,14 +1067,10 @@ export const EncryptSecretKeyRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
1235
1067
  method: "POST",
1236
1068
  uri: "/v1/apps/{app_name}/secretkeys/{secret_name}/encrypt",
1237
1069
  code: 200,
1238
- }))).annotate({
1239
- identifier: "EncryptSecretKeyRequest",
1240
- });
1070
+ }))).annotate({ identifier: "EncryptSecretKeyRequest" });
1241
1071
  export const EncryptSecretkeyResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
1242
1072
  ciphertext: S.optional(S.String),
1243
- })).annotate({
1244
- identifier: "EncryptSecretkeyResponse",
1245
- });
1073
+ })).annotate({ identifier: "EncryptSecretkeyResponse" });
1246
1074
  export const ExecMachineRequestCommandList = /*@__PURE__*/ S.Array(S.String);
1247
1075
  export const ExecMachineRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
1248
1076
  app_name: S.String.pipe(T.Label()),
@@ -1253,48 +1081,26 @@ export const ExecMachineRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
1253
1081
  machine: S.optional(S.Boolean),
1254
1082
  stdin: S.optional(S.String),
1255
1083
  timeout: S.optional(S.Number),
1256
- }).pipe(T.Http({
1257
- method: "POST",
1258
- uri: "/v1/apps/{app_name}/machines/{machine_id}/exec",
1259
- code: 200,
1260
- }))).annotate({
1261
- identifier: "ExecMachineRequest",
1262
- });
1084
+ }).pipe(T.Http({ method: "POST", uri: "/v1/apps/{app_name}/machines/{machine_id}/exec", code: 200 }))).annotate({ identifier: "ExecMachineRequest" });
1263
1085
  export const Flydv1ExecResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
1264
1086
  exit_code: S.optional(S.Number),
1265
1087
  exit_signal: S.optional(S.Number),
1266
1088
  stderr: S.optional(S.String),
1267
1089
  stdout: S.optional(S.String),
1268
- })).annotate({
1269
- identifier: "Flydv1ExecResponse",
1270
- });
1090
+ })).annotate({ identifier: "Flydv1ExecResponse" });
1271
1091
  export const ExtendVolumeRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
1272
1092
  app_name: S.String.pipe(T.Label()),
1273
1093
  volume_id: S.String.pipe(T.Label()),
1274
1094
  size_gb: S.optional(S.Number),
1275
- }).pipe(T.Http({
1276
- method: "PUT",
1277
- uri: "/v1/apps/{app_name}/volumes/{volume_id}/extend",
1278
- code: 200,
1279
- }))).annotate({
1280
- identifier: "ExtendVolumeRequest",
1281
- });
1095
+ }).pipe(T.Http({ method: "PUT", uri: "/v1/apps/{app_name}/volumes/{volume_id}/extend", code: 200 }))).annotate({ identifier: "ExtendVolumeRequest" });
1282
1096
  export const ExtendVolumeResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
1283
1097
  needs_restart: S.optional(S.Boolean),
1284
1098
  volume: S.optional(Volume),
1285
- })).annotate({
1286
- identifier: "ExtendVolumeResponse",
1287
- });
1099
+ })).annotate({ identifier: "ExtendVolumeResponse" });
1288
1100
  export const ForkPostgresRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
1289
1101
  postgres_cluster_id: S.String.pipe(T.Label()),
1290
1102
  name: S.optional(S.String),
1291
- }).pipe(T.Http({
1292
- method: "POST",
1293
- uri: "/v1/postgres/{postgres_cluster_id}/fork",
1294
- code: 200,
1295
- }))).annotate({
1296
- identifier: "ForkPostgresRequest",
1297
- });
1103
+ }).pipe(T.Http({ method: "POST", uri: "/v1/postgres/{postgres_cluster_id}/fork", code: 200 }))).annotate({ identifier: "ForkPostgresRequest" });
1298
1104
  export const GenerateSecretKeyRequestValueList = /*@__PURE__*/ S.Array(S.Number);
1299
1105
  export const GenerateSecretKeyRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
1300
1106
  app_name: S.String.pipe(T.Label()),
@@ -1305,9 +1111,7 @@ export const GenerateSecretKeyRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
1305
1111
  method: "POST",
1306
1112
  uri: "/v1/apps/{app_name}/secretkeys/{secret_name}/generate",
1307
1113
  code: 200,
1308
- }))).annotate({
1309
- identifier: "GenerateSecretKeyRequest",
1310
- });
1114
+ }))).annotate({ identifier: "GenerateSecretKeyRequest" });
1311
1115
  export const SetSecretkeyResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
1312
1116
  Version: S.optional(S.Number),
1313
1117
  created_at: S.optional(S.String),
@@ -1316,9 +1120,7 @@ export const SetSecretkeyResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
1316
1120
  type: S.optional(S.String),
1317
1121
  updated_at: S.optional(S.String),
1318
1122
  version: S.optional(S.Number),
1319
- })).annotate({
1320
- identifier: "SetSecretkeyResponse",
1321
- });
1123
+ })).annotate({ identifier: "SetSecretkeyResponse" });
1322
1124
  export const GetAppRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
1323
1125
  app_name: S.String.pipe(T.Label()),
1324
1126
  }).pipe(T.Http({ method: "GET", uri: "/v1/apps/{app_name}", code: 200 }))).annotate({ identifier: "GetAppRequest" });
@@ -1326,9 +1128,7 @@ export const AppOrganizationInfo = /*@__PURE__*/ S.suspend(() => S.Struct({
1326
1128
  internal_numeric_id: S.optional(S.Number),
1327
1129
  name: S.optional(S.String),
1328
1130
  slug: S.optional(S.String),
1329
- })).annotate({
1330
- identifier: "AppOrganizationInfo",
1331
- });
1131
+ })).annotate({ identifier: "AppOrganizationInfo" });
1332
1132
  export const App = /*@__PURE__*/ S.suspend(() => S.Struct({
1333
1133
  id: S.optional(S.String),
1334
1134
  internal_numeric_id: S.optional(S.Number),
@@ -1343,16 +1143,8 @@ export const App = /*@__PURE__*/ S.suspend(() => S.Struct({
1343
1143
  export const GetAppCertificateRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
1344
1144
  app_name: S.String.pipe(T.Label()),
1345
1145
  hostname: S.String.pipe(T.Label()),
1346
- }).pipe(T.Http({
1347
- method: "GET",
1348
- uri: "/v1/apps/{app_name}/certificates/{hostname}",
1349
- code: 200,
1350
- }))).annotate({
1351
- identifier: "GetAppCertificateRequest",
1352
- });
1353
- export const GetCurrentTokenRequest = /*@__PURE__*/ S.suspend(() => S.Struct({}).pipe(T.Http({ method: "GET", uri: "/v1/tokens/current", code: 200 }))).annotate({
1354
- identifier: "GetCurrentTokenRequest",
1355
- });
1146
+ }).pipe(T.Http({ method: "GET", uri: "/v1/apps/{app_name}/certificates/{hostname}", code: 200 }))).annotate({ identifier: "GetAppCertificateRequest" });
1147
+ export const GetCurrentTokenRequest = /*@__PURE__*/ S.suspend(() => S.Struct({}).pipe(T.Http({ method: "GET", uri: "/v1/tokens/current", code: 200 }))).annotate({ identifier: "GetCurrentTokenRequest" });
1356
1148
  export const MainTokenInfoAppsList = /*@__PURE__*/ S.Array(S.String);
1357
1149
  export const MainTokenInfo = /*@__PURE__*/ S.suspend(() => S.Struct({
1358
1150
  apps: S.optional(MainTokenInfoAppsList),
@@ -1366,54 +1158,29 @@ export const MainTokenInfo = /*@__PURE__*/ S.suspend(() => S.Struct({
1366
1158
  export const CurrentTokenResponseTokensList = /*@__PURE__*/ S.Array(MainTokenInfo);
1367
1159
  export const CurrentTokenResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
1368
1160
  tokens: S.optional(CurrentTokenResponseTokensList),
1369
- })).annotate({
1370
- identifier: "CurrentTokenResponse",
1371
- });
1161
+ })).annotate({ identifier: "CurrentTokenResponse" });
1372
1162
  export const GetMachineRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
1373
1163
  app_name: S.String.pipe(T.Label()),
1374
1164
  machine_id: S.String.pipe(T.Label()),
1165
+ version: S.optional(S.String.pipe(T.Query())),
1375
1166
  include_leases: S.optional(S.Boolean.pipe(T.Query())),
1376
- }).pipe(T.Http({
1377
- method: "GET",
1378
- uri: "/v1/apps/{app_name}/machines/{machine_id}",
1379
- code: 200,
1380
- }))).annotate({
1381
- identifier: "GetMachineRequest",
1382
- });
1167
+ }).pipe(T.Http({ method: "GET", uri: "/v1/apps/{app_name}/machines/{machine_id}", code: 200 }))).annotate({ identifier: "GetMachineRequest" });
1383
1168
  export const GetMachineLeaseRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
1384
1169
  app_name: S.String.pipe(T.Label()),
1385
1170
  machine_id: S.String.pipe(T.Label()),
1386
- }).pipe(T.Http({
1387
- method: "GET",
1388
- uri: "/v1/apps/{app_name}/machines/{machine_id}/lease",
1389
- code: 200,
1390
- }))).annotate({
1391
- identifier: "GetMachineLeaseRequest",
1392
- });
1171
+ }).pipe(T.Http({ method: "GET", uri: "/v1/apps/{app_name}/machines/{machine_id}/lease", code: 200 }))).annotate({ identifier: "GetMachineLeaseRequest" });
1393
1172
  export const GetMachineMemoryRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
1394
1173
  app_name: S.String.pipe(T.Label()),
1395
1174
  machine_id: S.String.pipe(T.Label()),
1396
- }).pipe(T.Http({
1397
- method: "GET",
1398
- uri: "/v1/apps/{app_name}/machines/{machine_id}/memory",
1399
- code: 200,
1400
- }))).annotate({
1401
- identifier: "GetMachineMemoryRequest",
1402
- });
1175
+ }).pipe(T.Http({ method: "GET", uri: "/v1/apps/{app_name}/machines/{machine_id}/memory", code: 200 }))).annotate({ identifier: "GetMachineMemoryRequest" });
1403
1176
  export const MainMemoryResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
1404
1177
  available_mb: S.optional(S.Number),
1405
1178
  limit_mb: S.optional(S.Number),
1406
- })).annotate({
1407
- identifier: "MainMemoryResponse",
1408
- });
1179
+ })).annotate({ identifier: "MainMemoryResponse" });
1409
1180
  export const GetMachineMetadataRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
1410
1181
  app_name: S.String.pipe(T.Label()),
1411
1182
  machine_id: S.String.pipe(T.Label()),
1412
- }).pipe(T.Http({
1413
- method: "GET",
1414
- uri: "/v1/apps/{app_name}/machines/{machine_id}/metadata",
1415
- code: 200,
1416
- }))).annotate({
1183
+ }).pipe(T.Http({ method: "GET", uri: "/v1/apps/{app_name}/machines/{machine_id}/metadata", code: 200 }))).annotate({
1417
1184
  identifier: "GetMachineMetadataRequest",
1418
1185
  });
1419
1186
  export const GetMachineMetadataResponseBodyMap = /*@__PURE__*/ S.Record(S.String, S.String);
@@ -1433,9 +1200,7 @@ export const GetMachineMetadataKeyRequest = /*@__PURE__*/ S.suspend(() => S.Stru
1433
1200
  });
1434
1201
  export const MetadataValueResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
1435
1202
  value: S.optional(S.String),
1436
- })).annotate({
1437
- identifier: "MetadataValueResponse",
1438
- });
1203
+ })).annotate({ identifier: "MetadataValueResponse" });
1439
1204
  export const PlacementWeights = /*@__PURE__*/ S.Record(S.String, S.Number);
1440
1205
  export const GetPlacementsRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
1441
1206
  compute: S.optional(FlyMachineGuest),
@@ -1445,16 +1210,12 @@ export const GetPlacementsRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
1445
1210
  volume_name: S.optional(S.String),
1446
1211
  volume_size_bytes: S.optional(S.Number),
1447
1212
  weights: S.optional(PlacementWeights),
1448
- }).pipe(T.Http({ method: "POST", uri: "/v1/platform/placements", code: 200 }))).annotate({
1449
- identifier: "GetPlacementsRequest",
1450
- });
1213
+ }).pipe(T.Http({ method: "POST", uri: "/v1/platform/placements", code: 200 }))).annotate({ identifier: "GetPlacementsRequest" });
1451
1214
  export const PlacementRegionPlacement = /*@__PURE__*/ S.suspend(() => S.Struct({
1452
1215
  concurrency: S.optional(S.Number),
1453
1216
  count: S.optional(S.Number),
1454
1217
  region: S.optional(S.String),
1455
- })).annotate({
1456
- identifier: "PlacementRegionPlacement",
1457
- });
1218
+ })).annotate({ identifier: "PlacementRegionPlacement" });
1458
1219
  export const MainGetPlacementsResponseRegionsList = /*@__PURE__*/ S.Array(PlacementRegionPlacement);
1459
1220
  export const MainGetPlacementsResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
1460
1221
  regions: S.optional(MainGetPlacementsResponseRegionsList),
@@ -1463,16 +1224,8 @@ export const MainGetPlacementsResponse = /*@__PURE__*/ S.suspend(() => S.Struct(
1463
1224
  });
1464
1225
  export const GetPostgresRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
1465
1226
  postgres_cluster_id: S.String.pipe(T.Label()),
1466
- }).pipe(T.Http({
1467
- method: "GET",
1468
- uri: "/v1/postgres/{postgres_cluster_id}",
1469
- code: 200,
1470
- }))).annotate({
1471
- identifier: "GetPostgresRequest",
1472
- });
1473
- export const GetRegionsRequest = /*@__PURE__*/ S.suspend(() => S.Struct({}).pipe(T.Http({ method: "GET", uri: "/v1/platform/regions", code: 200 }))).annotate({
1474
- identifier: "GetRegionsRequest",
1475
- });
1227
+ }).pipe(T.Http({ method: "GET", uri: "/v1/postgres/{postgres_cluster_id}", code: 200 }))).annotate({ identifier: "GetPostgresRequest" });
1228
+ export const GetRegionsRequest = /*@__PURE__*/ S.suspend(() => S.Struct({}).pipe(T.Http({ method: "GET", uri: "/v1/platform/regions", code: 200 }))).annotate({ identifier: "GetRegionsRequest" });
1476
1229
  export const MainRegionRow = /*@__PURE__*/ S.suspend(() => S.Struct({
1477
1230
  code: S.optional(S.String),
1478
1231
  deprecated: S.optional(S.Boolean),
@@ -1488,21 +1241,13 @@ export const MainRegionResponseRegionsList = /*@__PURE__*/ S.Array(MainRegionRow
1488
1241
  export const MainRegionResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
1489
1242
  nearest: S.optional(S.String),
1490
1243
  regions: S.optional(MainRegionResponseRegionsList),
1491
- })).annotate({
1492
- identifier: "MainRegionResponse",
1493
- });
1244
+ })).annotate({ identifier: "MainRegionResponse" });
1494
1245
  export const GetSecretRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
1495
1246
  app_name: S.String.pipe(T.Label()),
1496
1247
  secret_name: S.String.pipe(T.Label()),
1497
1248
  min_version: S.optional(S.String.pipe(T.Query())),
1498
1249
  show_secrets: S.optional(S.Boolean.pipe(T.Query())),
1499
- }).pipe(T.Http({
1500
- method: "GET",
1501
- uri: "/v1/apps/{app_name}/secrets/{secret_name}",
1502
- code: 200,
1503
- }))).annotate({
1504
- identifier: "GetSecretRequest",
1505
- });
1250
+ }).pipe(T.Http({ method: "GET", uri: "/v1/apps/{app_name}/secrets/{secret_name}", code: 200 }))).annotate({ identifier: "GetSecretRequest" });
1506
1251
  export const AppSecret = /*@__PURE__*/ S.suspend(() => S.Struct({
1507
1252
  created_at: S.optional(S.String),
1508
1253
  digest: S.optional(S.String),
@@ -1514,13 +1259,7 @@ export const GetSecretKeyRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
1514
1259
  app_name: S.String.pipe(T.Label()),
1515
1260
  secret_name: S.String.pipe(T.Label()),
1516
1261
  min_version: S.optional(S.String.pipe(T.Query())),
1517
- }).pipe(T.Http({
1518
- method: "GET",
1519
- uri: "/v1/apps/{app_name}/secretkeys/{secret_name}",
1520
- code: 200,
1521
- }))).annotate({
1522
- identifier: "GetSecretKeyRequest",
1523
- });
1262
+ }).pipe(T.Http({ method: "GET", uri: "/v1/apps/{app_name}/secretkeys/{secret_name}", code: 200 }))).annotate({ identifier: "GetSecretKeyRequest" });
1524
1263
  export const SecretKey = /*@__PURE__*/ S.suspend(() => S.Struct({
1525
1264
  created_at: S.optional(S.String),
1526
1265
  name: S.optional(S.String),
@@ -1531,23 +1270,13 @@ export const SecretKey = /*@__PURE__*/ S.suspend(() => S.Struct({
1531
1270
  export const GetVolumeByIdRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
1532
1271
  app_name: S.String.pipe(T.Label()),
1533
1272
  volume_id: S.String.pipe(T.Label()),
1534
- }).pipe(T.Http({
1535
- method: "GET",
1536
- uri: "/v1/apps/{app_name}/volumes/{volume_id}",
1537
- code: 200,
1538
- }))).annotate({
1539
- identifier: "GetVolumeByIdRequest",
1540
- });
1273
+ }).pipe(T.Http({ method: "GET", uri: "/v1/apps/{app_name}/volumes/{volume_id}", code: 200 }))).annotate({ identifier: "GetVolumeByIdRequest" });
1541
1274
  export const ListAppCertificatesRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
1542
1275
  app_name: S.String.pipe(T.Label()),
1543
1276
  filter: S.optional(S.String.pipe(T.Query())),
1544
1277
  cursor: S.optional(S.String.pipe(T.Query())),
1545
1278
  limit: S.optional(S.Number.pipe(T.Query())),
1546
- }).pipe(T.Http({
1547
- method: "GET",
1548
- uri: "/v1/apps/{app_name}/certificates",
1549
- code: 200,
1550
- }))).annotate({
1279
+ }).pipe(T.Http({ method: "GET", uri: "/v1/apps/{app_name}/certificates", code: 200 }))).annotate({
1551
1280
  identifier: "ListAppCertificatesRequest",
1552
1281
  });
1553
1282
  export const CertificateSummary = /*@__PURE__*/ S.suspend(() => S.Struct({
@@ -1564,30 +1293,23 @@ export const CertificateSummary = /*@__PURE__*/ S.suspend(() => S.Struct({
1564
1293
  ownership_txt_configured: S.optional(S.Boolean),
1565
1294
  status: S.optional(S.String),
1566
1295
  updated_at: S.optional(S.String),
1567
- })).annotate({
1568
- identifier: "CertificateSummary",
1569
- });
1296
+ })).annotate({ identifier: "CertificateSummary" });
1570
1297
  export const ListCertificatesResponseCertificatesList = /*@__PURE__*/ S.Array(CertificateSummary);
1571
1298
  export const ListCertificatesResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
1572
1299
  certificates: S.optional(ListCertificatesResponseCertificatesList),
1573
1300
  next_cursor: S.optional(S.String),
1574
1301
  total_count: S.optional(S.Number),
1575
- })).annotate({
1576
- identifier: "ListCertificatesResponse",
1577
- });
1302
+ })).annotate({ identifier: "ListCertificatesResponse" });
1578
1303
  export const ListAppIPAssignmentsRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
1579
1304
  app_name: S.String.pipe(T.Label()),
1580
- }).pipe(T.Http({
1581
- method: "GET",
1582
- uri: "/v1/apps/{app_name}/ip_assignments",
1583
- code: 200,
1584
- }))).annotate({
1305
+ }).pipe(T.Http({ method: "GET", uri: "/v1/apps/{app_name}/ip_assignments", code: 200 }))).annotate({
1585
1306
  identifier: "ListAppIPAssignmentsRequest",
1586
1307
  });
1587
1308
  export const IPAssignment = /*@__PURE__*/ S.suspend(() => S.Struct({
1588
1309
  created_at: S.optional(S.String),
1589
1310
  egress: S.optional(S.Boolean),
1590
1311
  ip: S.optional(S.String),
1312
+ network: S.optional(S.NullOr(IPAssignmentNetwork)),
1591
1313
  region: S.optional(S.String),
1592
1314
  service_name: S.optional(S.String),
1593
1315
  shared: S.optional(S.Boolean),
@@ -1602,27 +1324,20 @@ export const ListIPAssignmentsResponse = /*@__PURE__*/ S.suspend(() => S.Struct(
1602
1324
  export const ListAppsRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
1603
1325
  org_slug: S.String.pipe(T.Query()),
1604
1326
  app_role: S.optional(S.String.pipe(T.Query())),
1605
- }).pipe(T.Http({ method: "GET", uri: "/v1/apps", code: 200 }))).annotate({
1606
- identifier: "ListAppsRequest",
1607
- });
1327
+ limit: S.optional(S.Number.pipe(T.Query())),
1328
+ cursor: S.optional(S.String.pipe(T.Query())),
1329
+ }).pipe(T.Http({ method: "GET", uri: "/v1/apps", code: 200 }))).annotate({ identifier: "ListAppsRequest" });
1608
1330
  export const ListAppsResponseAppsList = /*@__PURE__*/ S.Array(App);
1609
1331
  export const ListAppsResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
1610
1332
  apps: S.optional(ListAppsResponseAppsList),
1333
+ next_cursor: S.optional(S.String),
1611
1334
  total_apps: S.optional(S.Number),
1612
- })).annotate({
1613
- identifier: "ListAppsResponse",
1614
- });
1335
+ })).annotate({ identifier: "ListAppsResponse" });
1615
1336
  export const ListMachineEventsRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
1616
1337
  app_name: S.String.pipe(T.Label()),
1617
1338
  machine_id: S.String.pipe(T.Label()),
1618
1339
  limit: S.optional(S.Number.pipe(T.Query())),
1619
- }).pipe(T.Http({
1620
- method: "GET",
1621
- uri: "/v1/apps/{app_name}/machines/{machine_id}/events",
1622
- code: 200,
1623
- }))).annotate({
1624
- identifier: "ListMachineEventsRequest",
1625
- });
1340
+ }).pipe(T.Http({ method: "GET", uri: "/v1/apps/{app_name}/machines/{machine_id}/events", code: 200 }))).annotate({ identifier: "ListMachineEventsRequest" });
1626
1341
  export const ListMachineEventsResponseBodyList = /*@__PURE__*/ S.Array(MachineEvent);
1627
1342
  export const ListMachineEventsResponse = /*@__PURE__*/ S.suspend(() => ListMachineEventsResponseBodyList.pipe(T.RawResponseRoot())).annotate({
1628
1343
  identifier: "ListMachineEventsResponse",
@@ -1632,11 +1347,7 @@ export const ListMachineProcessesRequest = /*@__PURE__*/ S.suspend(() => S.Struc
1632
1347
  machine_id: S.String.pipe(T.Label()),
1633
1348
  sort_by: S.optional(S.String.pipe(T.Query())),
1634
1349
  order: S.optional(S.String.pipe(T.Query())),
1635
- }).pipe(T.Http({
1636
- method: "GET",
1637
- uri: "/v1/apps/{app_name}/machines/{machine_id}/ps",
1638
- code: 200,
1639
- }))).annotate({
1350
+ }).pipe(T.Http({ method: "GET", uri: "/v1/apps/{app_name}/machines/{machine_id}/ps", code: 200 }))).annotate({
1640
1351
  identifier: "ListMachineProcessesRequest",
1641
1352
  });
1642
1353
  export const ListenSocket = /*@__PURE__*/ S.suspend(() => S.Struct({
@@ -1666,13 +1377,11 @@ export const ListMachinesRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
1666
1377
  state: S.optional(S.String.pipe(T.Query())),
1667
1378
  summary: S.optional(S.Boolean.pipe(T.Query())),
1668
1379
  metadata__key_: S.optional(S.String.pipe(T.Query("metadata.{key}"))),
1669
- }).pipe(T.Http({ method: "GET", uri: "/v1/apps/{app_name}/machines", code: 200 }))).annotate({
1670
- identifier: "ListMachinesRequest",
1671
- });
1380
+ cursor: S.optional(S.String.pipe(T.Query())),
1381
+ limit: S.optional(S.Number.pipe(T.Query())),
1382
+ }).pipe(T.Http({ method: "GET", uri: "/v1/apps/{app_name}/machines", code: 200 }))).annotate({ identifier: "ListMachinesRequest" });
1672
1383
  export const ListMachinesResponseBodyList = /*@__PURE__*/ S.Array(Machine);
1673
- export const ListMachinesResponse = /*@__PURE__*/ S.suspend(() => ListMachinesResponseBodyList.pipe(T.RawResponseRoot())).annotate({
1674
- identifier: "ListMachinesResponse",
1675
- });
1384
+ export const ListMachinesResponse = /*@__PURE__*/ S.suspend(() => ListMachinesResponseBodyList.pipe(T.RawResponseRoot())).annotate({ identifier: "ListMachinesResponse" });
1676
1385
  export const ListMachinesOrgRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
1677
1386
  org_slug: S.String.pipe(T.Label()),
1678
1387
  include_deleted: S.optional(S.Boolean.pipe(T.Query())),
@@ -1682,18 +1391,14 @@ export const ListMachinesOrgRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
1682
1391
  updated_after: S.optional(S.String.pipe(T.Query())),
1683
1392
  cursor: S.optional(S.String.pipe(T.Query())),
1684
1393
  limit: S.optional(S.Number.pipe(T.Query())),
1685
- }).pipe(T.Http({ method: "GET", uri: "/v1/orgs/{org_slug}/machines", code: 200 }))).annotate({
1686
- identifier: "ListMachinesOrgRequest",
1687
- });
1394
+ }).pipe(T.Http({ method: "GET", uri: "/v1/orgs/{org_slug}/machines", code: 200 }))).annotate({ identifier: "ListMachinesOrgRequest" });
1688
1395
  export const OrgMachinesResponseErrorRegionsList = /*@__PURE__*/ S.Array(S.String);
1689
1396
  export const MachineOverviewConfigMetadataMap = /*@__PURE__*/ S.Record(S.String, S.String);
1690
1397
  export const MachineOverviewConfig = /*@__PURE__*/ S.suspend(() => S.Struct({
1691
1398
  guest: S.optional(FlyMachineGuest),
1692
1399
  image: S.optional(S.String),
1693
1400
  metadata: S.optional(MachineOverviewConfigMetadataMap),
1694
- })).annotate({
1695
- identifier: "MachineOverviewConfig",
1696
- });
1401
+ })).annotate({ identifier: "MachineOverviewConfig" });
1697
1402
  export const OrgMachine = /*@__PURE__*/ S.suspend(() => S.Struct({
1698
1403
  app_name: S.optional(S.String),
1699
1404
  config: S.optional(MachineOverviewConfig),
@@ -1713,17 +1418,11 @@ export const OrgMachinesResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
1713
1418
  last_updated_at: S.optional(S.String),
1714
1419
  machines: S.optional(OrgMachinesResponseMachinesList),
1715
1420
  next_cursor: S.optional(S.String),
1716
- })).annotate({
1717
- identifier: "OrgMachinesResponse",
1718
- });
1421
+ })).annotate({ identifier: "OrgMachinesResponse" });
1719
1422
  export const ListMachineVersionsRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
1720
1423
  app_name: S.String.pipe(T.Label()),
1721
1424
  machine_id: S.String.pipe(T.Label()),
1722
- }).pipe(T.Http({
1723
- method: "GET",
1724
- uri: "/v1/apps/{app_name}/machines/{machine_id}/versions",
1725
- code: 200,
1726
- }))).annotate({
1425
+ }).pipe(T.Http({ method: "GET", uri: "/v1/apps/{app_name}/machines/{machine_id}/versions", code: 200 }))).annotate({
1727
1426
  identifier: "ListMachineVersionsRequest",
1728
1427
  });
1729
1428
  export const MachineVersion = /*@__PURE__*/ S.suspend(() => S.Struct({
@@ -1737,9 +1436,7 @@ export const ListMachineVersionsResponse = /*@__PURE__*/ S.suspend(() => ListMac
1737
1436
  export const ListPostgresRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
1738
1437
  org_slug: S.String.pipe(T.Query()),
1739
1438
  include_deleted: S.optional(S.Boolean.pipe(T.Query())),
1740
- }).pipe(T.Http({ method: "GET", uri: "/v1/postgres", code: 200 }))).annotate({
1741
- identifier: "ListPostgresRequest",
1742
- });
1439
+ }).pipe(T.Http({ method: "GET", uri: "/v1/postgres", code: 200 }))).annotate({ identifier: "ListPostgresRequest" });
1743
1440
  export const PostgresClusterSummaryAttachedAppsList = /*@__PURE__*/ S.Array(PostgresAttachedApp);
1744
1441
  export const PostgresClusterSummaryPlan = S.String;
1745
1442
  export const PostgresClusterSummaryStatus = S.String;
@@ -1752,9 +1449,7 @@ export const PostgresClusterSummary = /*@__PURE__*/ S.suspend(() => S.Struct({
1752
1449
  plan: S.optional(PostgresClusterSummaryPlan),
1753
1450
  region: S.optional(S.String),
1754
1451
  status: S.optional(PostgresClusterSummaryStatus),
1755
- })).annotate({
1756
- identifier: "PostgresClusterSummary",
1757
- });
1452
+ })).annotate({ identifier: "PostgresClusterSummary" });
1758
1453
  export const ListPostgresClustersResponseDataList = /*@__PURE__*/ S.Array(PostgresClusterSummary);
1759
1454
  export const ListPostgresClustersResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
1760
1455
  data: S.optional(ListPostgresClustersResponseDataList),
@@ -1763,11 +1458,7 @@ export const ListPostgresClustersResponse = /*@__PURE__*/ S.suspend(() => S.Stru
1763
1458
  });
1764
1459
  export const ListPostgresBackupsRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
1765
1460
  postgres_cluster_id: S.String.pipe(T.Label()),
1766
- }).pipe(T.Http({
1767
- method: "GET",
1768
- uri: "/v1/postgres/{postgres_cluster_id}/backups",
1769
- code: 200,
1770
- }))).annotate({
1461
+ }).pipe(T.Http({ method: "GET", uri: "/v1/postgres/{postgres_cluster_id}/backups", code: 200 }))).annotate({
1771
1462
  identifier: "ListPostgresBackupsRequest",
1772
1463
  });
1773
1464
  export const PostgresBackupType = S.String;
@@ -1787,11 +1478,7 @@ export const ListPostgresBackupsResponse = /*@__PURE__*/ S.suspend(() => S.Struc
1787
1478
  });
1788
1479
  export const ListPostgresDatabasesRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
1789
1480
  postgres_cluster_id: S.String.pipe(T.Label()),
1790
- }).pipe(T.Http({
1791
- method: "GET",
1792
- uri: "/v1/postgres/{postgres_cluster_id}/databases",
1793
- code: 200,
1794
- }))).annotate({
1481
+ }).pipe(T.Http({ method: "GET", uri: "/v1/postgres/{postgres_cluster_id}/databases", code: 200 }))).annotate({
1795
1482
  identifier: "ListPostgresDatabasesRequest",
1796
1483
  });
1797
1484
  export const ListPostgresDatabasesResponseDataList = /*@__PURE__*/ S.Array(PostgresDatabase);
@@ -1810,21 +1497,19 @@ export const ListPostgresExtensionsRequest = /*@__PURE__*/ S.suspend(() => S.Str
1810
1497
  }))).annotate({
1811
1498
  identifier: "ListPostgresExtensionsRequest",
1812
1499
  });
1813
- export const PostgresInstalledExtension = /*@__PURE__*/ S.suspend(() => S.Struct({
1500
+ export const PostgresExtensionInstalled = /*@__PURE__*/ S.suspend(() => S.Struct({
1814
1501
  schema: S.optional(S.String),
1815
1502
  version: S.optional(S.String),
1816
1503
  })).annotate({
1817
- identifier: "PostgresInstalledExtension",
1504
+ identifier: "PostgresExtensionInstalled",
1818
1505
  });
1819
1506
  export const PostgresExtension = /*@__PURE__*/ S.suspend(() => S.Struct({
1820
1507
  default_version: S.optional(S.String),
1821
1508
  description: S.optional(S.String),
1822
- installed: S.optional(PostgresInstalledExtension),
1509
+ installed: S.optional(S.NullOr(PostgresExtensionInstalled)),
1823
1510
  name: S.optional(S.String),
1824
1511
  system: S.optional(S.Boolean),
1825
- })).annotate({
1826
- identifier: "PostgresExtension",
1827
- });
1512
+ })).annotate({ identifier: "PostgresExtension" });
1828
1513
  export const ListPostgresExtensionsResponseDataList = /*@__PURE__*/ S.Array(PostgresExtension);
1829
1514
  export const ListPostgresExtensionsResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
1830
1515
  data: S.optional(ListPostgresExtensionsResponseDataList),
@@ -1833,13 +1518,7 @@ export const ListPostgresExtensionsResponse = /*@__PURE__*/ S.suspend(() => S.St
1833
1518
  });
1834
1519
  export const ListPostgresUsersRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
1835
1520
  postgres_cluster_id: S.String.pipe(T.Label()),
1836
- }).pipe(T.Http({
1837
- method: "GET",
1838
- uri: "/v1/postgres/{postgres_cluster_id}/users",
1839
- code: 200,
1840
- }))).annotate({
1841
- identifier: "ListPostgresUsersRequest",
1842
- });
1521
+ }).pipe(T.Http({ method: "GET", uri: "/v1/postgres/{postgres_cluster_id}/users", code: 200 }))).annotate({ identifier: "ListPostgresUsersRequest" });
1843
1522
  export const ListPostgresUsersResponseDataList = /*@__PURE__*/ S.Array(PostgresUser);
1844
1523
  export const ListPostgresUsersResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
1845
1524
  data: S.optional(ListPostgresUsersResponseDataList),
@@ -1850,9 +1529,7 @@ export const ListSecretKeysRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
1850
1529
  app_name: S.String.pipe(T.Label()),
1851
1530
  min_version: S.optional(S.String.pipe(T.Query())),
1852
1531
  types: S.optional(S.String.pipe(T.Query())),
1853
- }).pipe(T.Http({ method: "GET", uri: "/v1/apps/{app_name}/secretkeys", code: 200 }))).annotate({
1854
- identifier: "ListSecretKeysRequest",
1855
- });
1532
+ }).pipe(T.Http({ method: "GET", uri: "/v1/apps/{app_name}/secretkeys", code: 200 }))).annotate({ identifier: "ListSecretKeysRequest" });
1856
1533
  export const SecretKeysSecretKeysList = /*@__PURE__*/ S.Array(SecretKey);
1857
1534
  export const SecretKeys = /*@__PURE__*/ S.suspend(() => S.Struct({
1858
1535
  secret_keys: S.optional(SecretKeysSecretKeysList),
@@ -1861,9 +1538,7 @@ export const ListSecretsRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
1861
1538
  app_name: S.String.pipe(T.Label()),
1862
1539
  min_version: S.optional(S.String.pipe(T.Query())),
1863
1540
  show_secrets: S.optional(S.Boolean.pipe(T.Query())),
1864
- }).pipe(T.Http({ method: "GET", uri: "/v1/apps/{app_name}/secrets", code: 200 }))).annotate({
1865
- identifier: "ListSecretsRequest",
1866
- });
1541
+ }).pipe(T.Http({ method: "GET", uri: "/v1/apps/{app_name}/secrets", code: 200 }))).annotate({ identifier: "ListSecretsRequest" });
1867
1542
  export const AppSecretsSecretsList = /*@__PURE__*/ S.Array(AppSecret);
1868
1543
  export const AppSecrets = /*@__PURE__*/ S.suspend(() => S.Struct({
1869
1544
  secrets: S.optional(AppSecretsSecretsList),
@@ -1871,21 +1546,15 @@ export const AppSecrets = /*@__PURE__*/ S.suspend(() => S.Struct({
1871
1546
  export const ListVolumesRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
1872
1547
  app_name: S.String.pipe(T.Label()),
1873
1548
  summary: S.optional(S.Boolean.pipe(T.Query())),
1874
- }).pipe(T.Http({ method: "GET", uri: "/v1/apps/{app_name}/volumes", code: 200 }))).annotate({
1875
- identifier: "ListVolumesRequest",
1876
- });
1549
+ cursor: S.optional(S.String.pipe(T.Query())),
1550
+ limit: S.optional(S.Number.pipe(T.Query())),
1551
+ }).pipe(T.Http({ method: "GET", uri: "/v1/apps/{app_name}/volumes", code: 200 }))).annotate({ identifier: "ListVolumesRequest" });
1877
1552
  export const ListVolumesResponseBodyList = /*@__PURE__*/ S.Array(Volume);
1878
- export const ListVolumesResponse = /*@__PURE__*/ S.suspend(() => ListVolumesResponseBodyList.pipe(T.RawResponseRoot())).annotate({
1879
- identifier: "ListVolumesResponse",
1880
- });
1553
+ export const ListVolumesResponse = /*@__PURE__*/ S.suspend(() => ListVolumesResponseBodyList.pipe(T.RawResponseRoot())).annotate({ identifier: "ListVolumesResponse" });
1881
1554
  export const ListVolumeSnapshotsRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
1882
1555
  app_name: S.String.pipe(T.Label()),
1883
1556
  volume_id: S.String.pipe(T.Label()),
1884
- }).pipe(T.Http({
1885
- method: "GET",
1886
- uri: "/v1/apps/{app_name}/volumes/{volume_id}/snapshots",
1887
- code: 200,
1888
- }))).annotate({
1557
+ }).pipe(T.Http({ method: "GET", uri: "/v1/apps/{app_name}/volumes/{volume_id}/snapshots", code: 200 }))).annotate({
1889
1558
  identifier: "ListVolumeSnapshotsRequest",
1890
1559
  });
1891
1560
  export const VolumeSnapshot = /*@__PURE__*/ S.suspend(() => S.Struct({
@@ -1910,10 +1579,10 @@ export const ListVolumesOrgRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
1910
1579
  updated_after: S.optional(S.String.pipe(T.Query())),
1911
1580
  cursor: S.optional(S.String.pipe(T.Query())),
1912
1581
  limit: S.optional(S.Number.pipe(T.Query())),
1913
- }).pipe(T.Http({ method: "GET", uri: "/v1/orgs/{org_slug}/volumes", code: 200 }))).annotate({
1914
- identifier: "ListVolumesOrgRequest",
1915
- });
1582
+ }).pipe(T.Http({ method: "GET", uri: "/v1/orgs/{org_slug}/volumes", code: 200 }))).annotate({ identifier: "ListVolumesOrgRequest" });
1583
+ export const OrgVolumeHostFeaturesList = /*@__PURE__*/ S.Array(S.String);
1916
1584
  export const OrgVolumeHostStatus = S.String;
1585
+ export const OrgVolumeRequiredHostFeaturesList = /*@__PURE__*/ S.Array(S.String);
1917
1586
  export const OrgVolumeType = S.String;
1918
1587
  export const OrgVolume = /*@__PURE__*/ S.suspend(() => S.Struct({
1919
1588
  app_name: S.optional(S.String),
@@ -1929,10 +1598,12 @@ export const OrgVolume = /*@__PURE__*/ S.suspend(() => S.Struct({
1929
1598
  created_at: S.optional(S.String),
1930
1599
  encrypted: S.optional(S.Boolean),
1931
1600
  fstype: S.optional(S.String),
1601
+ host_features: S.optional(OrgVolumeHostFeaturesList),
1932
1602
  host_status: S.optional(OrgVolumeHostStatus),
1933
1603
  id: S.optional(S.String),
1934
1604
  name: S.optional(S.String),
1935
1605
  region: S.optional(S.String),
1606
+ required_host_features: S.optional(OrgVolumeRequiredHostFeaturesList),
1936
1607
  size_gb: S.optional(S.Number),
1937
1608
  snapshot_retention: S.optional(S.Number),
1938
1609
  state: S.optional(S.String),
@@ -1946,17 +1617,12 @@ export const OrgVolumesResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
1946
1617
  last_volume_id: S.optional(S.String),
1947
1618
  next_cursor: S.optional(S.String),
1948
1619
  volumes: S.optional(OrgVolumesResponseVolumesList),
1949
- })).annotate({
1950
- identifier: "OrgVolumesResponse",
1951
- });
1620
+ })).annotate({ identifier: "OrgVolumesResponse" });
1952
1621
  export const MachinesReleaseLeaseRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
1953
1622
  app_name: S.String.pipe(T.Label()),
1954
1623
  machine_id: S.String.pipe(T.Label()),
1955
- }).pipe(T.Http({
1956
- method: "DELETE",
1957
- uri: "/v1/apps/{app_name}/machines/{machine_id}/lease",
1958
- code: 200,
1959
- }))).annotate({
1624
+ lease_nonce: S.String.pipe(T.Header("fly-machine-lease-nonce")),
1625
+ }).pipe(T.Http({ method: "DELETE", uri: "/v1/apps/{app_name}/machines/{machine_id}/lease", code: 200 }))).annotate({
1960
1626
  identifier: "MachinesReleaseLeaseRequest",
1961
1627
  });
1962
1628
  export const MachinesReleaseLeaseResponse = /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({
@@ -1979,6 +1645,53 @@ export const PatchMachineMetadataRequest = /*@__PURE__*/ S.suspend(() => S.Struc
1979
1645
  export const PatchMachineMetadataResponse = /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({
1980
1646
  identifier: "PatchMachineMetadataResponse",
1981
1647
  });
1648
+ export const PostgresQueriesActiveRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
1649
+ postgres_cluster_id: S.String.pipe(T.Label()),
1650
+ database: S.String.pipe(T.Query()),
1651
+ }).pipe(T.Http({ method: "GET", uri: "/v1/postgres/{postgres_cluster_id}/queries/active", code: 200 }))).annotate({
1652
+ identifier: "PostgresQueriesActiveRequest",
1653
+ });
1654
+ export const PostgresActiveQuery = /*@__PURE__*/ S.suspend(() => S.Struct({
1655
+ application_name: S.optional(S.String),
1656
+ client: S.optional(S.String),
1657
+ database: S.optional(S.String),
1658
+ duration_seconds: S.optional(S.Number),
1659
+ pid: S.optional(S.Number),
1660
+ query: S.optional(S.String),
1661
+ state: S.optional(S.String),
1662
+ state_duration_seconds: S.optional(S.Number),
1663
+ user: S.optional(S.String),
1664
+ wait_event: S.optional(S.String),
1665
+ wait_event_type: S.optional(S.String),
1666
+ })).annotate({ identifier: "PostgresActiveQuery" });
1667
+ export const ListPostgresActiveQueriesResponseDataList = /*@__PURE__*/ S.Array(PostgresActiveQuery);
1668
+ export const ListPostgresActiveQueriesResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
1669
+ data: S.optional(ListPostgresActiveQueriesResponseDataList),
1670
+ })).annotate({
1671
+ identifier: "ListPostgresActiveQueriesResponse",
1672
+ });
1673
+ export const PostgresQueriesSlowRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
1674
+ postgres_cluster_id: S.String.pipe(T.Label()),
1675
+ range: S.optional(S.Number.pipe(T.Query())),
1676
+ }).pipe(T.Http({ method: "GET", uri: "/v1/postgres/{postgres_cluster_id}/queries/slow", code: 200 }))).annotate({
1677
+ identifier: "PostgresQueriesSlowRequest",
1678
+ });
1679
+ export const PostgresSlowQuery = /*@__PURE__*/ S.suspend(() => S.Struct({
1680
+ calls: S.optional(S.Number),
1681
+ database: S.optional(S.String),
1682
+ max_exec_time_seconds: S.optional(S.Number),
1683
+ mean_exec_time_seconds: S.optional(S.Number),
1684
+ query: S.optional(S.String),
1685
+ query_id: S.optional(S.String),
1686
+ total_exec_time_seconds: S.optional(S.Number),
1687
+ user: S.optional(S.String),
1688
+ })).annotate({ identifier: "PostgresSlowQuery" });
1689
+ export const ListPostgresSlowQueriesResponseDataList = /*@__PURE__*/ S.Array(PostgresSlowQuery);
1690
+ export const ListPostgresSlowQueriesResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
1691
+ data: S.optional(ListPostgresSlowQueriesResponseDataList),
1692
+ })).annotate({
1693
+ identifier: "ListPostgresSlowQueriesResponse",
1694
+ });
1982
1695
  export const PostgresUsersCredentialsRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
1983
1696
  postgres_cluster_id: S.String.pipe(T.Label()),
1984
1697
  username: S.String.pipe(T.Label()),
@@ -1992,9 +1705,7 @@ export const PostgresUsersCredentialsRequest = /*@__PURE__*/ S.suspend(() => S.S
1992
1705
  export const PostgresUserCredentials = /*@__PURE__*/ S.suspend(() => S.Struct({
1993
1706
  password: S.optional(S.String.pipe(T.SensitiveValue({}))),
1994
1707
  username: S.optional(S.String),
1995
- })).annotate({
1996
- identifier: "PostgresUserCredentials",
1997
- });
1708
+ })).annotate({ identifier: "PostgresUserCredentials" });
1998
1709
  export const GetPostgresUserCredentialsResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
1999
1710
  data: S.optional(PostgresUserCredentials),
2000
1711
  })).annotate({
@@ -2016,18 +1727,14 @@ export const MainReclaimMemoryResponse = /*@__PURE__*/ S.suspend(() => S.Struct(
2016
1727
  })).annotate({
2017
1728
  identifier: "MainReclaimMemoryResponse",
2018
1729
  });
2019
- export const RequestKmsTokenRequest = /*@__PURE__*/ S.suspend(() => S.Struct({}).pipe(T.Http({ method: "POST", uri: "/v1/tokens/kms", code: 200 }))).annotate({
2020
- identifier: "RequestKmsTokenRequest",
2021
- });
1730
+ export const RequestKmsTokenRequest = /*@__PURE__*/ S.suspend(() => S.Struct({}).pipe(T.Http({ method: "POST", uri: "/v1/tokens/kms", code: 200 }))).annotate({ identifier: "RequestKmsTokenRequest" });
2022
1731
  export const RequestKmsTokenResponse = /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({
2023
1732
  identifier: "RequestKmsTokenResponse",
2024
1733
  });
2025
1734
  export const RequestOidcTokenRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
2026
1735
  aud: S.optional(S.String),
2027
1736
  aws_principal_tags: S.optional(S.Boolean),
2028
- }).pipe(T.Http({ method: "POST", uri: "/v1/tokens/oidc", code: 200 }))).annotate({
2029
- identifier: "RequestOidcTokenRequest",
2030
- });
1737
+ }).pipe(T.Http({ method: "POST", uri: "/v1/tokens/oidc", code: 200 }))).annotate({ identifier: "RequestOidcTokenRequest" });
2031
1738
  export const RequestOidcTokenResponse = /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({
2032
1739
  identifier: "RequestOidcTokenResponse",
2033
1740
  });
@@ -2037,13 +1744,8 @@ export const RestartMachineRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
2037
1744
  machine_id: S.String.pipe(T.Label()),
2038
1745
  timeout: S.optional(S.String.pipe(T.Query())),
2039
1746
  signal: S.optional(RestartMachineRequestSignal.pipe(T.Query())),
2040
- }).pipe(T.Http({
2041
- method: "POST",
2042
- uri: "/v1/apps/{app_name}/machines/{machine_id}/restart",
2043
- code: 200,
2044
- }))).annotate({
2045
- identifier: "RestartMachineRequest",
2046
- });
1747
+ lease_nonce: S.optional(S.String.pipe(T.Header("fly-machine-lease-nonce"))),
1748
+ }).pipe(T.Http({ method: "POST", uri: "/v1/apps/{app_name}/machines/{machine_id}/restart", code: 200 }))).annotate({ identifier: "RestartMachineRequest" });
2047
1749
  export const RestartMachineResponse = /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({
2048
1750
  identifier: "RestartMachineResponse",
2049
1751
  });
@@ -2052,13 +1754,7 @@ export const RestorePostgresRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
2052
1754
  backup_id: S.optional(S.String),
2053
1755
  name: S.optional(S.String),
2054
1756
  pitr_time: S.optional(S.String),
2055
- }).pipe(T.Http({
2056
- method: "POST",
2057
- uri: "/v1/postgres/{postgres_cluster_id}/restore",
2058
- code: 200,
2059
- }))).annotate({
2060
- identifier: "RestorePostgresRequest",
2061
- });
1757
+ }).pipe(T.Http({ method: "POST", uri: "/v1/postgres/{postgres_cluster_id}/restore", code: 200 }))).annotate({ identifier: "RestorePostgresRequest" });
2062
1758
  export const RotatePostgresUserPasswordRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
2063
1759
  postgres_cluster_id: S.String.pipe(T.Label()),
2064
1760
  username: S.String.pipe(T.Label()),
@@ -2079,11 +1775,7 @@ export const SetMachineMemoryLimitRequest = /*@__PURE__*/ S.suspend(() => S.Stru
2079
1775
  app_name: S.String.pipe(T.Label()),
2080
1776
  machine_id: S.String.pipe(T.Label()),
2081
1777
  limit_mb: S.optional(S.Number),
2082
- }).pipe(T.Http({
2083
- method: "PUT",
2084
- uri: "/v1/apps/{app_name}/machines/{machine_id}/memory",
2085
- code: 200,
2086
- }))).annotate({
1778
+ }).pipe(T.Http({ method: "PUT", uri: "/v1/apps/{app_name}/machines/{machine_id}/memory", code: 200 }))).annotate({
2087
1779
  identifier: "SetMachineMemoryLimitRequest",
2088
1780
  });
2089
1781
  export const SetSecretKeyRequestValueList = /*@__PURE__*/ S.Array(S.Number);
@@ -2092,25 +1784,13 @@ export const SetSecretKeyRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
2092
1784
  secret_name: S.String.pipe(T.Label()),
2093
1785
  type: S.optional(S.String),
2094
1786
  value: S.optional(SetSecretKeyRequestValueList),
2095
- }).pipe(T.Http({
2096
- method: "POST",
2097
- uri: "/v1/apps/{app_name}/secretkeys/{secret_name}",
2098
- code: 200,
2099
- }))).annotate({
2100
- identifier: "SetSecretKeyRequest",
2101
- });
1787
+ }).pipe(T.Http({ method: "POST", uri: "/v1/apps/{app_name}/secretkeys/{secret_name}", code: 200 }))).annotate({ identifier: "SetSecretKeyRequest" });
2102
1788
  export const SignalMachineRequestSignal = S.String;
2103
1789
  export const SignalMachineRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
2104
1790
  app_name: S.String.pipe(T.Label()),
2105
1791
  machine_id: S.String.pipe(T.Label()),
2106
1792
  signal: S.optional(SignalMachineRequestSignal),
2107
- }).pipe(T.Http({
2108
- method: "POST",
2109
- uri: "/v1/apps/{app_name}/machines/{machine_id}/signal",
2110
- code: 200,
2111
- }))).annotate({
2112
- identifier: "SignalMachineRequest",
2113
- });
1793
+ }).pipe(T.Http({ method: "POST", uri: "/v1/apps/{app_name}/machines/{machine_id}/signal", code: 200 }))).annotate({ identifier: "SignalMachineRequest" });
2114
1794
  export const SignalMachineResponse = /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({
2115
1795
  identifier: "SignalMachineResponse",
2116
1796
  });
@@ -2119,28 +1799,15 @@ export const SignSecretKeyRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
2119
1799
  secret_name: S.String.pipe(T.Label()),
2120
1800
  min_version: S.optional(S.String.pipe(T.Query())),
2121
1801
  plaintext: S.optional(S.String.pipe(T.SensitiveValue({}))),
2122
- }).pipe(T.Http({
2123
- method: "POST",
2124
- uri: "/v1/apps/{app_name}/secretkeys/{secret_name}/sign",
2125
- code: 200,
2126
- }))).annotate({
2127
- identifier: "SignSecretKeyRequest",
2128
- });
1802
+ }).pipe(T.Http({ method: "POST", uri: "/v1/apps/{app_name}/secretkeys/{secret_name}/sign", code: 200 }))).annotate({ identifier: "SignSecretKeyRequest" });
2129
1803
  export const SignSecretkeyResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
2130
1804
  signature: S.optional(S.String),
2131
- })).annotate({
2132
- identifier: "SignSecretkeyResponse",
2133
- });
1805
+ })).annotate({ identifier: "SignSecretkeyResponse" });
2134
1806
  export const StartMachineRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
2135
1807
  app_name: S.String.pipe(T.Label()),
2136
1808
  machine_id: S.String.pipe(T.Label()),
2137
- }).pipe(T.Http({
2138
- method: "POST",
2139
- uri: "/v1/apps/{app_name}/machines/{machine_id}/start",
2140
- code: 200,
2141
- }))).annotate({
2142
- identifier: "StartMachineRequest",
2143
- });
1809
+ lease_nonce: S.optional(S.String.pipe(T.Header("fly-machine-lease-nonce"))),
1810
+ }).pipe(T.Http({ method: "POST", uri: "/v1/apps/{app_name}/machines/{machine_id}/start", code: 200 }))).annotate({ identifier: "StartMachineRequest" });
2144
1811
  export const StartMachineResponse = /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({
2145
1812
  identifier: "StartMachineResponse",
2146
1813
  });
@@ -2150,39 +1817,28 @@ export const StopMachineRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
2150
1817
  machine_id: S.String.pipe(T.Label()),
2151
1818
  signal: S.optional(StopMachineRequestSignal),
2152
1819
  timeout: S.optional(S.String),
2153
- }).pipe(T.Http({
2154
- method: "POST",
2155
- uri: "/v1/apps/{app_name}/machines/{machine_id}/stop",
2156
- code: 200,
2157
- }))).annotate({
2158
- identifier: "StopMachineRequest",
2159
- });
1820
+ lease_nonce: S.optional(S.String.pipe(T.Header("fly-machine-lease-nonce"))),
1821
+ }).pipe(T.Http({ method: "POST", uri: "/v1/apps/{app_name}/machines/{machine_id}/stop", code: 200 }))).annotate({ identifier: "StopMachineRequest" });
2160
1822
  export const StopMachineResponse = /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({
2161
1823
  identifier: "StopMachineResponse",
2162
1824
  });
2163
1825
  export const SuspendMachineRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
2164
1826
  app_name: S.String.pipe(T.Label()),
2165
1827
  machine_id: S.String.pipe(T.Label()),
2166
- }).pipe(T.Http({
2167
- method: "POST",
2168
- uri: "/v1/apps/{app_name}/machines/{machine_id}/suspend",
2169
- code: 200,
2170
- }))).annotate({
2171
- identifier: "SuspendMachineRequest",
2172
- });
1828
+ lease_nonce: S.optional(S.String.pipe(T.Header("fly-machine-lease-nonce"))),
1829
+ }).pipe(T.Http({ method: "POST", uri: "/v1/apps/{app_name}/machines/{machine_id}/suspend", code: 200 }))).annotate({ identifier: "SuspendMachineRequest" });
2173
1830
  export const SuspendMachineResponse = /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({
2174
1831
  identifier: "SuspendMachineResponse",
2175
1832
  });
2176
1833
  export const UncordonMachineRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
2177
1834
  app_name: S.String.pipe(T.Label()),
2178
1835
  machine_id: S.String.pipe(T.Label()),
1836
+ lease_nonce: S.optional(S.String.pipe(T.Header("fly-machine-lease-nonce"))),
2179
1837
  }).pipe(T.Http({
2180
1838
  method: "POST",
2181
1839
  uri: "/v1/apps/{app_name}/machines/{machine_id}/uncordon",
2182
1840
  code: 200,
2183
- }))).annotate({
2184
- identifier: "UncordonMachineRequest",
2185
- });
1841
+ }))).annotate({ identifier: "UncordonMachineRequest" });
2186
1842
  export const UncordonMachineResponse = /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({
2187
1843
  identifier: "UncordonMachineResponse",
2188
1844
  });
@@ -2198,30 +1854,8 @@ export const UpdateMachineRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
2198
1854
  skip_launch: S.optional(S.Boolean),
2199
1855
  skip_secrets: S.optional(S.Boolean),
2200
1856
  skip_service_registration: S.optional(S.Boolean),
2201
- }).pipe(T.Http({
2202
- method: "POST",
2203
- uri: "/v1/apps/{app_name}/machines/{machine_id}",
2204
- code: 200,
2205
- }))).annotate({
2206
- identifier: "UpdateMachineRequest",
2207
- });
2208
- export const UpdateMachineMetadataRequestMetadataMap = /*@__PURE__*/ S.Record(S.String, S.String);
2209
- export const UpdateMachineMetadataRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
2210
- app_name: S.String.pipe(T.Label()),
2211
- machine_id: S.String.pipe(T.Label()),
2212
- machine_version: S.optional(S.String),
2213
- metadata: S.optional(UpdateMachineMetadataRequestMetadataMap),
2214
- updated_at: S.optional(S.String),
2215
- }).pipe(T.Http({
2216
- method: "PUT",
2217
- uri: "/v1/apps/{app_name}/machines/{machine_id}/metadata",
2218
- code: 200,
2219
- }))).annotate({
2220
- identifier: "UpdateMachineMetadataRequest",
2221
- });
2222
- export const UpdateMachineMetadataResponse = /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({
2223
- identifier: "UpdateMachineMetadataResponse",
2224
- });
1857
+ lease_nonce: S.optional(S.String.pipe(T.Header("fly-machine-lease-nonce"))),
1858
+ }).pipe(T.Http({ method: "POST", uri: "/v1/apps/{app_name}/machines/{machine_id}", code: 200 }))).annotate({ identifier: "UpdateMachineRequest" });
2225
1859
  export const UpdatePostgresUserRoleRequestRole = S.String;
2226
1860
  export const UpdatePostgresUserRoleRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
2227
1861
  postgres_cluster_id: S.String.pipe(T.Label()),
@@ -2241,29 +1875,19 @@ export const UpdateSecretsRequestValuesMap = /*@__PURE__*/ S.Record(S.String, S.
2241
1875
  export const UpdateSecretsRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
2242
1876
  app_name: S.String.pipe(T.Label()),
2243
1877
  values: S.optional(UpdateSecretsRequestValuesMap),
2244
- }).pipe(T.Http({ method: "POST", uri: "/v1/apps/{app_name}/secrets", code: 200 }))).annotate({
2245
- identifier: "UpdateSecretsRequest",
2246
- });
1878
+ }).pipe(T.Http({ method: "POST", uri: "/v1/apps/{app_name}/secrets", code: 200 }))).annotate({ identifier: "UpdateSecretsRequest" });
2247
1879
  export const AppSecretsUpdateRespSecretsList = /*@__PURE__*/ S.Array(AppSecret);
2248
1880
  export const AppSecretsUpdateResp = /*@__PURE__*/ S.suspend(() => S.Struct({
2249
1881
  Version: S.optional(S.Number),
2250
1882
  secrets: S.optional(AppSecretsUpdateRespSecretsList),
2251
1883
  version: S.optional(S.Number),
2252
- })).annotate({
2253
- identifier: "AppSecretsUpdateResp",
2254
- });
1884
+ })).annotate({ identifier: "AppSecretsUpdateResp" });
2255
1885
  export const UpdateVolumeRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
2256
1886
  app_name: S.String.pipe(T.Label()),
2257
1887
  volume_id: S.String.pipe(T.Label()),
2258
1888
  auto_backup_enabled: S.optional(S.Boolean),
2259
1889
  snapshot_retention: S.optional(S.Number),
2260
- }).pipe(T.Http({
2261
- method: "PUT",
2262
- uri: "/v1/apps/{app_name}/volumes/{volume_id}",
2263
- code: 200,
2264
- }))).annotate({
2265
- identifier: "UpdateVolumeRequest",
2266
- });
1890
+ }).pipe(T.Http({ method: "PUT", uri: "/v1/apps/{app_name}/volumes/{volume_id}", code: 200 }))).annotate({ identifier: "UpdateVolumeRequest" });
2267
1891
  export const UpsertMachineMetadataRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
2268
1892
  app_name: S.String.pipe(T.Label()),
2269
1893
  machine_id: S.String.pipe(T.Label()),
@@ -2290,9 +1914,7 @@ export const VerifySecretKeyRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
2290
1914
  method: "POST",
2291
1915
  uri: "/v1/apps/{app_name}/secretkeys/{secret_name}/verify",
2292
1916
  code: 200,
2293
- }))).annotate({
2294
- identifier: "VerifySecretKeyRequest",
2295
- });
1917
+ }))).annotate({ identifier: "VerifySecretKeyRequest" });
2296
1918
  export const VerifySecretKeyResponse = /*@__PURE__*/ S.suspend(() => S.Struct({})).annotate({
2297
1919
  identifier: "VerifySecretKeyResponse",
2298
1920
  });
@@ -2305,21 +1927,13 @@ export const WaitMachineRequest = /*@__PURE__*/ S.suspend(() => S.Struct({
2305
1927
  from_event_id: S.optional(S.String.pipe(T.Query())),
2306
1928
  timeout: S.optional(S.Number.pipe(T.Query())),
2307
1929
  state: S.optional(WaitMachineRequestState.pipe(T.Query())),
2308
- }).pipe(T.Http({
2309
- method: "GET",
2310
- uri: "/v1/apps/{app_name}/machines/{machine_id}/wait",
2311
- code: 200,
2312
- }))).annotate({
2313
- identifier: "WaitMachineRequest",
2314
- });
1930
+ }).pipe(T.Http({ method: "GET", uri: "/v1/apps/{app_name}/machines/{machine_id}/wait", code: 200 }))).annotate({ identifier: "WaitMachineRequest" });
2315
1931
  export const WaitMachineResponse = /*@__PURE__*/ S.suspend(() => S.Struct({
2316
1932
  event_id: S.optional(S.String),
2317
1933
  ok: S.optional(S.Boolean),
2318
1934
  state: S.optional(S.String),
2319
1935
  version: S.optional(S.String),
2320
- })).annotate({
2321
- identifier: "WaitMachineResponse",
2322
- });
1936
+ })).annotate({ identifier: "WaitMachineResponse" });
2323
1937
  /** Authenticate token header Verify a token header without checking resource access. */
2324
1938
  export const authenticateToken = /*@__PURE__*/ API.make(() => ({
2325
1939
  input: AuthenticateTokenRequest,
@@ -2348,7 +1962,7 @@ export const checkAppCertificate = /*@__PURE__*/ API.make(() => ({
2348
1962
  export const cordonMachine = /*@__PURE__*/ API.make(() => ({
2349
1963
  input: CordonMachineRequest,
2350
1964
  output: CordonMachineResponse,
2351
- errors: [BadRequest, Forbidden, NotFound],
1965
+ errors: [BadRequest, Forbidden, NotFound, Conflict],
2352
1966
  protocol: FlyIoProtocol,
2353
1967
  retry: Retry.Retry,
2354
1968
  }));
@@ -2388,7 +2002,7 @@ export const createAppDeployToken = /*@__PURE__*/ API.make(() => ({
2388
2002
  export const createAppIPAssignment = /*@__PURE__*/ API.make(() => ({
2389
2003
  input: CreateAppIPAssignmentRequest,
2390
2004
  output: AssignIPResponse,
2391
- errors: [BadRequest, Forbidden, NotFound, Conflict],
2005
+ errors: [BadRequest, Forbidden, NotFound, Conflict, NetworkNotFound],
2392
2006
  protocol: FlyIoProtocol,
2393
2007
  retry: Retry.Retry,
2394
2008
  }));
@@ -2403,12 +2017,12 @@ export const createMachine = /*@__PURE__*/ API.make(() => ({
2403
2017
  /** Create Lease Create a lease for a specific Machine within an app using the details provided in the request body. Machine leases can be used to obtain an exclusive lock on modifying a Machine. */
2404
2018
  export const createMachineLease = /*@__PURE__*/ API.make(() => ({
2405
2019
  input: CreateMachineLeaseRequest,
2406
- output: Lease,
2407
- errors: [BadRequest, Forbidden, NotFound],
2020
+ output: MachineLease,
2021
+ errors: [BadRequest, Forbidden, NotFound, Conflict],
2408
2022
  protocol: FlyIoProtocol,
2409
2023
  retry: Retry.Retry,
2410
2024
  }));
2411
- /** 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. */
2025
+ /** Create Postgres Cluster Create a Managed Postgres cluster for the organization named in the request body. Provisioning is asynchronous: poll `GET /v1/postgres/{id}` until `status == ready` before calling database, user, extension, or credential endpoints. */
2412
2026
  export const createPostgres = /*@__PURE__*/ API.make(() => ({
2413
2027
  input: CreatePostgresRequest,
2414
2028
  output: ShowPostgresClusterResponse,
@@ -2416,7 +2030,7 @@ export const createPostgres = /*@__PURE__*/ API.make(() => ({
2416
2030
  protocol: FlyIoProtocol,
2417
2031
  retry: Retry.Retry,
2418
2032
  }));
2419
- /** Attach Cluster to App Attach a specific cluster to a Fly app. The attachment is created if it does not already exist. */
2033
+ /** Attach Cluster to App Record an attachment between a cluster and a Fly app. This endpoint records the relationship but does not set DATABASE_URL or other app secrets; configure the connection string separately. The attachment is created if it does not already exist. */
2420
2034
  export const createPostgresAttachment = /*@__PURE__*/ API.make(() => ({
2421
2035
  input: CreatePostgresAttachmentRequest,
2422
2036
  output: CreatePostgresAttachmentResponse,
@@ -2588,7 +2202,7 @@ export const deleteSecretKey = /*@__PURE__*/ API.make(() => ({
2588
2202
  export const deleteVolume = /*@__PURE__*/ API.make(() => ({
2589
2203
  input: DeleteVolumeRequest,
2590
2204
  output: Volume,
2591
- errors: [Forbidden, NotFound, Conflict],
2205
+ errors: [Forbidden, NotFound, Conflict, VolumeAttached],
2592
2206
  protocol: FlyIoProtocol,
2593
2207
  retry: Retry.Retry,
2594
2208
  }));
@@ -2620,7 +2234,7 @@ export const encryptSecretKey = /*@__PURE__*/ API.make(() => ({
2620
2234
  export const execMachine = /*@__PURE__*/ API.make(() => ({
2621
2235
  input: ExecMachineRequest,
2622
2236
  output: Flydv1ExecResponse,
2623
- errors: [BadRequest, Forbidden, NotFound],
2237
+ errors: [BadRequest, Forbidden, NotFound, Conflict],
2624
2238
  protocol: FlyIoProtocol,
2625
2239
  retry: Retry.Retry,
2626
2240
  }));
@@ -2649,7 +2263,8 @@ export const generateSecretKey = /*@__PURE__*/ API.make(() => ({
2649
2263
  retry: Retry.Retry,
2650
2264
  }));
2651
2265
  /** Get App Retrieve details about a specific app by its name. */
2652
- export const getApp = /*@__PURE__*/ API.make(() => ({
2266
+ export const getApp =
2267
+ /*@__PURE__*/ API.make(() => ({
2653
2268
  input: GetAppRequest,
2654
2269
  output: App,
2655
2270
  errors: [Forbidden, NotFound],
@@ -2683,7 +2298,7 @@ export const getMachine = /*@__PURE__*/ API.make(() => ({
2683
2298
  /** Get Lease Retrieve the current lease of a specific Machine within an app. Machine leases can be used to obtain an exclusive lock on modifying a Machine. */
2684
2299
  export const getMachineLease = /*@__PURE__*/ API.make(() => ({
2685
2300
  input: GetMachineLeaseRequest,
2686
- output: Lease,
2301
+ output: MachineLease,
2687
2302
  errors: [Forbidden, NotFound],
2688
2303
  protocol: FlyIoProtocol,
2689
2304
  retry: Retry.Retry,
@@ -2828,7 +2443,7 @@ export const listMachineVersions = /*@__PURE__*/ API.make(() => ({
2828
2443
  export const listPostgres = /*@__PURE__*/ API.make(() => ({
2829
2444
  input: ListPostgresRequest,
2830
2445
  output: ListPostgresClustersResponse,
2831
- errors: [NotFound, UnprocessableEntity],
2446
+ errors: [BadRequest, NotFound, UnprocessableEntity],
2832
2447
  protocol: FlyIoProtocol,
2833
2448
  retry: Retry.Retry,
2834
2449
  }));
@@ -2912,11 +2527,27 @@ export const machinesReleaseLease = /*@__PURE__*/ API.make(() => ({
2912
2527
  protocol: FlyIoProtocol,
2913
2528
  retry: Retry.Retry,
2914
2529
  }));
2915
- /** 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. */
2530
+ /** Update Metadata (set/remove multiple keys) Update multiple metadata keys at once. Keys that are not in the request are left untouched. Null values and empty strings remove keys. + If `machine_version` is provided and no longer matches the current machine version, returns 412 Precondition Failed. */
2916
2531
  export const patchMachineMetadata = /*@__PURE__*/ API.make(() => ({
2917
2532
  input: PatchMachineMetadataRequest,
2918
2533
  output: PatchMachineMetadataResponse,
2919
- errors: [BadRequest],
2534
+ errors: [BadRequest, Forbidden, NotFound],
2535
+ protocol: FlyIoProtocol,
2536
+ retry: Retry.Retry,
2537
+ }));
2538
+ /** List Active Queries List active queries in the supplied database. The database query parameter is required and must not be empty or whitespace-only. Returns full query text and durations in seconds. */
2539
+ export const postgresQueriesActive = /*@__PURE__*/ API.make(() => ({
2540
+ input: PostgresQueriesActiveRequest,
2541
+ output: ListPostgresActiveQueriesResponse,
2542
+ errors: [NotFound, UnprocessableEntity],
2543
+ protocol: FlyIoProtocol,
2544
+ retry: Retry.Retry,
2545
+ }));
2546
+ /** List Slow Queries List the top 20 queries by cumulative total execution time, excluding the postgres database. Uses the latest available metrics within the lookback range; statistics are cumulative PostgreSQL counters, not deltas over that range. Returns full query text and execution times in seconds. */
2547
+ export const postgresQueriesSlow = /*@__PURE__*/ API.make(() => ({
2548
+ input: PostgresQueriesSlowRequest,
2549
+ output: ListPostgresSlowQueriesResponse,
2550
+ errors: [NotFound, UnprocessableEntity],
2920
2551
  protocol: FlyIoProtocol,
2921
2552
  retry: Retry.Retry,
2922
2553
  }));
@@ -2936,7 +2567,7 @@ export const reclaimMachineMemory = /*@__PURE__*/ API.make(() => ({
2936
2567
  protocol: FlyIoProtocol,
2937
2568
  retry: Retry.Retry,
2938
2569
  }));
2939
- /** Request a Petsem token for accessing KMS This site hosts documentation generated from the Fly.io Machines API OpenAPI specification. Visit our complete [Machines API docs](https://fly.io/docs/machines/api/apps-resource/) for details about using the Apps resource. */
2570
+ /** Request a Petsem token for accessing KMS */
2940
2571
  export const requestKmsToken = /*@__PURE__*/ API.make(() => ({
2941
2572
  input: RequestKmsTokenRequest,
2942
2573
  output: RequestKmsTokenResponse,
@@ -2956,7 +2587,7 @@ export const requestOidcToken = /*@__PURE__*/ API.make(() => ({
2956
2587
  export const restartMachine = /*@__PURE__*/ API.make(() => ({
2957
2588
  input: RestartMachineRequest,
2958
2589
  output: RestartMachineResponse,
2959
- errors: [BadRequest, Forbidden, NotFound],
2590
+ errors: [BadRequest, Forbidden, NotFound, Conflict],
2960
2591
  protocol: FlyIoProtocol,
2961
2592
  retry: Retry.Retry,
2962
2593
  }));
@@ -3018,6 +2649,7 @@ export const startMachine = /*@__PURE__*/ API.make(() => ({
3018
2649
  NotFound,
3019
2650
  Conflict,
3020
2651
  MachineStartFromCreatedState,
2652
+ MachineReplacing,
3021
2653
  ],
3022
2654
  protocol: FlyIoProtocol,
3023
2655
  retry: Retry.Retry,
@@ -3026,7 +2658,7 @@ export const startMachine = /*@__PURE__*/ API.make(() => ({
3026
2658
  export const stopMachine = /*@__PURE__*/ API.make(() => ({
3027
2659
  input: StopMachineRequest,
3028
2660
  output: StopMachineResponse,
3029
- errors: [BadRequest, Forbidden, NotFound],
2661
+ errors: [BadRequest, Forbidden, NotFound, Conflict],
3030
2662
  protocol: FlyIoProtocol,
3031
2663
  retry: Retry.Retry,
3032
2664
  }));
@@ -3034,7 +2666,7 @@ export const stopMachine = /*@__PURE__*/ API.make(() => ({
3034
2666
  export const suspendMachine = /*@__PURE__*/ API.make(() => ({
3035
2667
  input: SuspendMachineRequest,
3036
2668
  output: SuspendMachineResponse,
3037
- errors: [BadRequest, Forbidden, NotFound],
2669
+ errors: [BadRequest, Forbidden, NotFound, Conflict],
3038
2670
  protocol: FlyIoProtocol,
3039
2671
  retry: Retry.Retry,
3040
2672
  }));
@@ -3042,7 +2674,7 @@ export const suspendMachine = /*@__PURE__*/ API.make(() => ({
3042
2674
  export const uncordonMachine = /*@__PURE__*/ API.make(() => ({
3043
2675
  input: UncordonMachineRequest,
3044
2676
  output: UncordonMachineResponse,
3045
- errors: [BadRequest, Forbidden, NotFound],
2677
+ errors: [BadRequest, Forbidden, NotFound, Conflict],
3046
2678
  protocol: FlyIoProtocol,
3047
2679
  retry: Retry.Retry,
3048
2680
  }));
@@ -3054,14 +2686,6 @@ export const updateMachine = /*@__PURE__*/ API.make(() => ({
3054
2686
  protocol: FlyIoProtocol,
3055
2687
  retry: Retry.Retry,
3056
2688
  }));
3057
- /** 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. */
3058
- export const updateMachineMetadata = /*@__PURE__*/ API.make(() => ({
3059
- input: UpdateMachineMetadataRequest,
3060
- output: UpdateMachineMetadataResponse,
3061
- errors: [BadRequest, Forbidden, NotFound],
3062
- protocol: FlyIoProtocol,
3063
- retry: Retry.Retry,
3064
- }));
3065
2689
  /** Update User Role Update a specific Postgres user's role within a cluster. */
3066
2690
  export const updatePostgresUserRole = /*@__PURE__*/ API.make(() => ({
3067
2691
  input: UpdatePostgresUserRoleRequest,