@townco/fly 0.1.1

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.
@@ -0,0 +1,2974 @@
1
+ // This file is auto-generated by @hey-api/openapi-ts
2
+
3
+ export type ClientOptions = {
4
+ baseUrl: "https://api.machines.dev/v1" | (string & {});
5
+ };
6
+
7
+ export type App = {
8
+ id?: string;
9
+ internal_numeric_id?: number;
10
+ machine_count?: number;
11
+ name?: string;
12
+ network?: string;
13
+ organization?: AppOrganizationInfo;
14
+ status?: string;
15
+ volume_count?: number;
16
+ };
17
+
18
+ export type AppOrganizationInfo = {
19
+ internal_numeric_id?: number;
20
+ name?: string;
21
+ slug?: string;
22
+ };
23
+
24
+ export type AppSecret = {
25
+ created_at?: string;
26
+ digest?: string;
27
+ name?: string;
28
+ updated_at?: string;
29
+ value?: string;
30
+ };
31
+
32
+ export type AppSecrets = {
33
+ secrets?: Array<AppSecret>;
34
+ };
35
+
36
+ export type AppSecretsUpdateRequest = {
37
+ values?: {
38
+ [key: string]: string;
39
+ };
40
+ };
41
+
42
+ export type AppSecretsUpdateResp = {
43
+ /**
44
+ * DEPRECATED
45
+ */
46
+ Version?: number;
47
+ secrets?: Array<AppSecret>;
48
+ version?: number;
49
+ };
50
+
51
+ export type CheckStatus = {
52
+ name?: string;
53
+ output?: string;
54
+ status?: string;
55
+ updated_at?: string;
56
+ };
57
+
58
+ export type CreateAppDeployTokenRequest = {
59
+ expiry?: string;
60
+ };
61
+
62
+ export type CreateAppRequest = {
63
+ enable_subdomains?: boolean;
64
+ name?: string;
65
+ network?: string;
66
+ org_slug?: string;
67
+ };
68
+
69
+ export type CreateAppResponse = {
70
+ token?: string;
71
+ };
72
+
73
+ export type CreateLeaseRequest = {
74
+ description?: string;
75
+ /**
76
+ * seconds lease will be valid
77
+ */
78
+ ttl?: number;
79
+ };
80
+
81
+ export type CreateMachineRequest = {
82
+ /**
83
+ * An object defining the Machine configuration
84
+ */
85
+ config?: FlyMachineConfig;
86
+ lease_ttl?: number;
87
+ lsvd?: boolean;
88
+ min_secrets_version?: number;
89
+ /**
90
+ * Unique name for this Machine. If omitted, one is generated for you
91
+ */
92
+ name?: string;
93
+ /**
94
+ * The target region. Omitting this param launches in the same region as your WireGuard peer connection (somewhere near you).
95
+ */
96
+ region?: string;
97
+ skip_launch?: boolean;
98
+ skip_secrets?: boolean;
99
+ skip_service_registration?: boolean;
100
+ };
101
+
102
+ /**
103
+ * Optional parameters
104
+ */
105
+ export type CreateOidcTokenRequest = {
106
+ aud?: string;
107
+ aws_principal_tags?: boolean;
108
+ };
109
+
110
+ export type CreateVolumeRequest = {
111
+ /**
112
+ * enable scheduled automatic snapshots. Defaults to `true`
113
+ */
114
+ auto_backup_enabled?: boolean;
115
+ compute?: FlyMachineGuest;
116
+ compute_image?: string;
117
+ encrypted?: boolean;
118
+ fstype?: string;
119
+ name?: string;
120
+ region?: string;
121
+ require_unique_zone?: boolean;
122
+ size_gb?: number;
123
+ /**
124
+ * restore from snapshot
125
+ */
126
+ snapshot_id?: string;
127
+ snapshot_retention?: number;
128
+ /**
129
+ * fork from remote volume
130
+ */
131
+ source_volume_id?: string;
132
+ unique_zone_app_wide?: boolean;
133
+ };
134
+
135
+ export type CurrentTokenResponse = {
136
+ tokens?: Array<MainTokenInfo>;
137
+ };
138
+
139
+ export type DecryptSecretkeyRequest = {
140
+ associated_data?: Array<number>;
141
+ ciphertext?: Array<number>;
142
+ };
143
+
144
+ export type DecryptSecretkeyResponse = {
145
+ plaintext?: Array<number>;
146
+ };
147
+
148
+ export type DeleteAppSecretResponse = {
149
+ /**
150
+ * DEPRECATED
151
+ */
152
+ Version?: number;
153
+ version?: number;
154
+ };
155
+
156
+ export type DeleteSecretkeyResponse = {
157
+ /**
158
+ * DEPRECATED
159
+ */
160
+ Version?: number;
161
+ version?: number;
162
+ };
163
+
164
+ export type EncryptSecretkeyRequest = {
165
+ associated_data?: Array<number>;
166
+ plaintext?: Array<number>;
167
+ };
168
+
169
+ export type EncryptSecretkeyResponse = {
170
+ ciphertext?: Array<number>;
171
+ };
172
+
173
+ export type ErrorResponse = {
174
+ /**
175
+ * Deprecated
176
+ */
177
+ details?: {
178
+ [key: string]: unknown;
179
+ };
180
+ error?: string;
181
+ status?: MainStatusCode;
182
+ };
183
+
184
+ export type ExtendVolumeRequest = {
185
+ size_gb?: number;
186
+ };
187
+
188
+ export type ExtendVolumeResponse = {
189
+ needs_restart?: boolean;
190
+ volume?: Volume;
191
+ };
192
+
193
+ export type IpAssignment = {
194
+ created_at?: string;
195
+ ip?: string;
196
+ region?: string;
197
+ service_name?: string;
198
+ shared?: boolean;
199
+ };
200
+
201
+ export type ImageRef = {
202
+ digest?: string;
203
+ labels?: {
204
+ [key: string]: string;
205
+ };
206
+ registry?: string;
207
+ repository?: string;
208
+ tag?: string;
209
+ };
210
+
211
+ export type Lease = {
212
+ /**
213
+ * Description or reason for the Lease.
214
+ */
215
+ description?: string;
216
+ /**
217
+ * ExpiresAt is the unix timestamp in UTC to denote when the Lease will no longer be valid.
218
+ */
219
+ expires_at?: number;
220
+ /**
221
+ * Nonce is the unique ID autogenerated and associated with the Lease.
222
+ */
223
+ nonce?: string;
224
+ /**
225
+ * Owner is the user identifier which acquired the Lease.
226
+ */
227
+ owner?: string;
228
+ /**
229
+ * Machine version
230
+ */
231
+ version?: string;
232
+ };
233
+
234
+ export type ListAppsResponse = {
235
+ apps?: Array<App>;
236
+ total_apps?: number;
237
+ };
238
+
239
+ export type ListenSocket = {
240
+ address?: string;
241
+ proto?: string;
242
+ };
243
+
244
+ export type Machine = {
245
+ checks?: Array<CheckStatus>;
246
+ config?: FlyMachineConfig;
247
+ created_at?: string;
248
+ events?: Array<MachineEvent>;
249
+ host_status?: "ok" | "unknown" | "unreachable";
250
+ id?: string;
251
+ image_ref?: ImageRef;
252
+ incomplete_config?: FlyMachineConfig;
253
+ /**
254
+ * InstanceID is unique for each version of the machine
255
+ */
256
+ instance_id?: string;
257
+ name?: string;
258
+ /**
259
+ * Nonce is only every returned on machine creation if a lease_duration was provided.
260
+ */
261
+ nonce?: string;
262
+ /**
263
+ * PrivateIP is the internal 6PN address of the machine.
264
+ */
265
+ private_ip?: string;
266
+ region?: string;
267
+ state?: string;
268
+ updated_at?: string;
269
+ };
270
+
271
+ export type MachineEvent = {
272
+ id?: string;
273
+ request?: {
274
+ [key: string]: unknown;
275
+ };
276
+ source?: string;
277
+ status?: string;
278
+ timestamp?: number;
279
+ type?: string;
280
+ };
281
+
282
+ export type MachineExecRequest = {
283
+ /**
284
+ * Deprecated: use Command instead
285
+ */
286
+ cmd?: string;
287
+ command?: Array<string>;
288
+ container?: string;
289
+ stdin?: string;
290
+ timeout?: number;
291
+ };
292
+
293
+ export type MachineVersion = {
294
+ user_config?: FlyMachineConfig;
295
+ version?: string;
296
+ };
297
+
298
+ export type ProcessStat = {
299
+ command?: string;
300
+ cpu?: number;
301
+ directory?: string;
302
+ listen_sockets?: Array<ListenSocket>;
303
+ pid?: number;
304
+ rss?: number;
305
+ rtime?: number;
306
+ stime?: number;
307
+ };
308
+
309
+ export type SecretKey = {
310
+ created_at?: string;
311
+ name?: string;
312
+ public_key?: Array<number>;
313
+ type?: string;
314
+ updated_at?: string;
315
+ };
316
+
317
+ export type SecretKeys = {
318
+ secret_keys?: Array<SecretKey>;
319
+ };
320
+
321
+ export type SetAppSecretRequest = {
322
+ value?: string;
323
+ };
324
+
325
+ export type SetAppSecretResponse = {
326
+ /**
327
+ * DEPRECATED
328
+ */
329
+ Version?: number;
330
+ created_at?: string;
331
+ digest?: string;
332
+ name?: string;
333
+ updated_at?: string;
334
+ value?: string;
335
+ version?: number;
336
+ };
337
+
338
+ export type SetSecretkeyRequest = {
339
+ type?: string;
340
+ value?: Array<number>;
341
+ };
342
+
343
+ export type SetSecretkeyResponse = {
344
+ /**
345
+ * DEPRECATED
346
+ */
347
+ Version?: number;
348
+ created_at?: string;
349
+ name?: string;
350
+ public_key?: Array<number>;
351
+ type?: string;
352
+ updated_at?: string;
353
+ version?: number;
354
+ };
355
+
356
+ export type SignSecretkeyRequest = {
357
+ plaintext?: Array<number>;
358
+ };
359
+
360
+ export type SignSecretkeyResponse = {
361
+ signature?: Array<number>;
362
+ };
363
+
364
+ export type SignalRequest = {
365
+ signal?:
366
+ | "SIGABRT"
367
+ | "SIGALRM"
368
+ | "SIGFPE"
369
+ | "SIGHUP"
370
+ | "SIGILL"
371
+ | "SIGINT"
372
+ | "SIGKILL"
373
+ | "SIGPIPE"
374
+ | "SIGQUIT"
375
+ | "SIGSEGV"
376
+ | "SIGTERM"
377
+ | "SIGTRAP"
378
+ | "SIGUSR1";
379
+ };
380
+
381
+ export type StopRequest = {
382
+ signal?: string;
383
+ timeout?: FlyDuration;
384
+ };
385
+
386
+ export type UpdateMachineRequest = {
387
+ /**
388
+ * An object defining the Machine configuration
389
+ */
390
+ config?: FlyMachineConfig;
391
+ current_version?: string;
392
+ lease_ttl?: number;
393
+ lsvd?: boolean;
394
+ min_secrets_version?: number;
395
+ /**
396
+ * Unique name for this Machine. If omitted, one is generated for you
397
+ */
398
+ name?: string;
399
+ /**
400
+ * The target region. Omitting this param launches in the same region as your WireGuard peer connection (somewhere near you).
401
+ */
402
+ region?: string;
403
+ skip_launch?: boolean;
404
+ skip_secrets?: boolean;
405
+ skip_service_registration?: boolean;
406
+ };
407
+
408
+ export type UpdateVolumeRequest = {
409
+ auto_backup_enabled?: boolean;
410
+ snapshot_retention?: number;
411
+ };
412
+
413
+ export type VerifySecretkeyRequest = {
414
+ plaintext?: Array<number>;
415
+ signature?: Array<number>;
416
+ };
417
+
418
+ export type Volume = {
419
+ attached_alloc_id?: string;
420
+ attached_machine_id?: string;
421
+ auto_backup_enabled?: boolean;
422
+ block_size?: number;
423
+ blocks?: number;
424
+ blocks_avail?: number;
425
+ blocks_free?: number;
426
+ bytes_total?: number;
427
+ bytes_used?: number;
428
+ created_at?: string;
429
+ encrypted?: boolean;
430
+ fstype?: string;
431
+ host_status?: "ok" | "unknown" | "unreachable";
432
+ id?: string;
433
+ name?: string;
434
+ region?: string;
435
+ size_gb?: number;
436
+ snapshot_retention?: number;
437
+ state?: string;
438
+ zone?: string;
439
+ };
440
+
441
+ export type VolumeSnapshot = {
442
+ created_at?: string;
443
+ digest?: string;
444
+ id?: string;
445
+ retention_days?: number;
446
+ size?: number;
447
+ status?: string;
448
+ volume_size?: number;
449
+ };
450
+
451
+ export type AssignIpRequest = {
452
+ network?: string;
453
+ org_slug?: string;
454
+ region?: string;
455
+ service_name?: string;
456
+ type?: string;
457
+ };
458
+
459
+ export type FlyContainerConfig = {
460
+ /**
461
+ * CmdOverride is used to override the default command of the image.
462
+ */
463
+ cmd?: Array<string>;
464
+ /**
465
+ * DependsOn can be used to define dependencies between containers. The container will only be
466
+ * started after all of its dependent conditions have been satisfied.
467
+ */
468
+ depends_on?: Array<FlyContainerDependency>;
469
+ /**
470
+ * EntrypointOverride is used to override the default entrypoint of the image.
471
+ */
472
+ entrypoint?: Array<string>;
473
+ /**
474
+ * ExtraEnv is used to add additional environment variables to the container.
475
+ */
476
+ env?: {
477
+ [key: string]: string;
478
+ };
479
+ /**
480
+ * EnvFrom can be provided to set environment variables from machine fields.
481
+ */
482
+ env_from?: Array<FlyEnvFrom>;
483
+ /**
484
+ * Image Config overrides - these fields are used to override the image configuration.
485
+ * If not provided, the image configuration will be used.
486
+ * ExecOverride is used to override the default command of the image.
487
+ */
488
+ exec?: Array<string>;
489
+ /**
490
+ * Files are files that will be written to the container file system.
491
+ */
492
+ files?: Array<FlyFile>;
493
+ /**
494
+ * Healthchecks determine the health of your containers. Healthchecks can use HTTP, TCP or an Exec command.
495
+ */
496
+ healthchecks?: Array<FlyContainerHealthcheck>;
497
+ /**
498
+ * Image is the docker image to run.
499
+ */
500
+ image?: string;
501
+ /**
502
+ * Name is used to identify the container in the machine.
503
+ */
504
+ name?: string;
505
+ /**
506
+ * Restart is used to define the restart policy for the container. NOTE: spot-price is not
507
+ * supported for containers.
508
+ */
509
+ restart?: FlyMachineRestart;
510
+ /**
511
+ * Secrets can be provided at the process level to explicitly indicate which secrets should be
512
+ * used for the process. If not provided, the secrets provided at the machine level will be used.
513
+ */
514
+ secrets?: Array<FlyMachineSecret>;
515
+ /**
516
+ * Stop is used to define the signal and timeout for stopping the container.
517
+ */
518
+ stop?: FlyStopConfig;
519
+ /**
520
+ * UserOverride is used to override the default user of the image.
521
+ */
522
+ user?: string;
523
+ };
524
+
525
+ export type FlyContainerDependency = {
526
+ condition?: FlyContainerDependencyCondition;
527
+ name?: string;
528
+ };
529
+
530
+ export type FlyContainerDependencyCondition =
531
+ | "exited_successfully"
532
+ | "healthy"
533
+ | "started";
534
+
535
+ export type FlyContainerHealthcheck = {
536
+ exec?: FlyExecHealthcheck;
537
+ /**
538
+ * The number of times the check must fail before considering the container unhealthy.
539
+ */
540
+ failure_threshold?: number;
541
+ /**
542
+ * The time in seconds to wait after a container starts before checking its health.
543
+ */
544
+ grace_period?: number;
545
+ http?: FlyHttpHealthcheck;
546
+ /**
547
+ * The time in seconds between executing the defined check.
548
+ */
549
+ interval?: number;
550
+ /**
551
+ * Kind of healthcheck (readiness, liveness)
552
+ */
553
+ kind?: FlyContainerHealthcheckKind;
554
+ /**
555
+ * The name of the check. Must be unique within the container.
556
+ */
557
+ name?: string;
558
+ /**
559
+ * The number of times the check must succeeed before considering the container healthy.
560
+ */
561
+ success_threshold?: number;
562
+ tcp?: FlyTcpHealthcheck;
563
+ /**
564
+ * The time in seconds to wait for the check to complete.
565
+ */
566
+ timeout?: number;
567
+ /**
568
+ * Unhealthy policy that determines what action to take if a container is deemed unhealthy
569
+ */
570
+ unhealthy?: FlyUnhealthyPolicy;
571
+ };
572
+
573
+ export type FlyContainerHealthcheckKind = "readiness" | "liveness";
574
+
575
+ export type FlyContainerHealthcheckScheme = "http" | "https";
576
+
577
+ export type FlyDnsConfig = {
578
+ dns_forward_rules?: Array<FlyDnsForwardRule>;
579
+ hostname?: string;
580
+ hostname_fqdn?: string;
581
+ nameservers?: Array<string>;
582
+ options?: Array<FlyDnsOption>;
583
+ searches?: Array<string>;
584
+ skip_registration?: boolean;
585
+ };
586
+
587
+ export type FlyDuration = {
588
+ "time.Duration"?: number;
589
+ };
590
+
591
+ /**
592
+ * EnvVar defines an environment variable to be populated from a machine field, env_var
593
+ */
594
+ export type FlyEnvFrom = {
595
+ /**
596
+ * EnvVar is required and is the name of the environment variable that will be set from the
597
+ * secret. It must be a valid environment variable name.
598
+ */
599
+ env_var?: string;
600
+ /**
601
+ * FieldRef selects a field of the Machine: supports id, version, app_name, private_ip, region, image.
602
+ */
603
+ field_ref?: "id" | "version" | "app_name" | "private_ip" | "region" | "image";
604
+ };
605
+
606
+ export type FlyExecHealthcheck = {
607
+ /**
608
+ * The command to run to check the health of the container (e.g. ["cat", "/tmp/healthy"])
609
+ */
610
+ command?: Array<string>;
611
+ };
612
+
613
+ /**
614
+ * A file that will be written to the Machine. One of RawValue or SecretName must be set.
615
+ */
616
+ export type FlyFile = {
617
+ /**
618
+ * GuestPath is the path on the machine where the file will be written and must be an absolute path.
619
+ * For example: /full/path/to/file.json
620
+ */
621
+ guest_path?: string;
622
+ /**
623
+ * The name of an image to use the OCI image config as the file contents.
624
+ */
625
+ image_config?: string;
626
+ /**
627
+ * Mode bits used to set permissions on this file as accepted by chmod(2).
628
+ */
629
+ mode?: number;
630
+ /**
631
+ * The base64 encoded string of the file contents.
632
+ */
633
+ raw_value?: string;
634
+ /**
635
+ * The name of the secret that contains the base64 encoded file contents.
636
+ */
637
+ secret_name?: string;
638
+ };
639
+
640
+ export type FlyHttpHealthcheck = {
641
+ /**
642
+ * Additional headers to send with the request
643
+ */
644
+ headers?: Array<FlyMachineHttpHeader>;
645
+ /**
646
+ * The HTTP method to use to when making the request
647
+ */
648
+ method?: string;
649
+ /**
650
+ * The path to send the request to
651
+ */
652
+ path?: string;
653
+ /**
654
+ * The port to connect to, often the same as internal_port
655
+ */
656
+ port?: number;
657
+ /**
658
+ * Whether to use http or https
659
+ */
660
+ scheme?: FlyContainerHealthcheckScheme;
661
+ /**
662
+ * If the protocol is https, the hostname to use for TLS certificate validation
663
+ */
664
+ tls_server_name?: string;
665
+ /**
666
+ * If the protocol is https, whether or not to verify the TLS certificate
667
+ */
668
+ tls_skip_verify?: boolean;
669
+ };
670
+
671
+ export type FlyHttpOptions = {
672
+ compress?: boolean;
673
+ h2_backend?: boolean;
674
+ headers_read_timeout?: number;
675
+ idle_timeout?: number;
676
+ replay_cache?: Array<FlyReplayCache>;
677
+ response?: FlyHttpResponseOptions;
678
+ };
679
+
680
+ export type FlyHttpResponseOptions = {
681
+ headers?: {
682
+ [key: string]: {
683
+ [key: string]: unknown;
684
+ };
685
+ };
686
+ pristine?: boolean;
687
+ };
688
+
689
+ export type FlyMachineCheck = {
690
+ /**
691
+ * The time to wait after a VM starts before checking its health
692
+ */
693
+ grace_period?: FlyDuration;
694
+ headers?: Array<FlyMachineHttpHeader>;
695
+ /**
696
+ * The time between connectivity checks
697
+ */
698
+ interval?: FlyDuration;
699
+ /**
700
+ * Kind of the check (informational, readiness)
701
+ */
702
+ kind?: "informational" | "readiness";
703
+ /**
704
+ * For http checks, the HTTP method to use to when making the request
705
+ */
706
+ method?: string;
707
+ /**
708
+ * For http checks, the path to send the request to
709
+ */
710
+ path?: string;
711
+ /**
712
+ * The port to connect to, often the same as internal_port
713
+ */
714
+ port?: number;
715
+ /**
716
+ * For http checks, whether to use http or https
717
+ */
718
+ protocol?: string;
719
+ /**
720
+ * The maximum time a connection can take before being reported as failing its health check
721
+ */
722
+ timeout?: FlyDuration;
723
+ /**
724
+ * If the protocol is https, the hostname to use for TLS certificate validation
725
+ */
726
+ tls_server_name?: string;
727
+ /**
728
+ * For http checks with https protocol, whether or not to verify the TLS certificate
729
+ */
730
+ tls_skip_verify?: boolean;
731
+ /**
732
+ * tcp or http
733
+ */
734
+ type?: string;
735
+ };
736
+
737
+ export type FlyMachineConfig = {
738
+ /**
739
+ * Optional boolean telling the Machine to destroy itself once it’s complete (default false)
740
+ */
741
+ auto_destroy?: boolean;
742
+ /**
743
+ * An optional object that defines one or more named top-level checks. The key for each check is the check name.
744
+ */
745
+ checks?: {
746
+ [key: string]: FlyMachineCheck;
747
+ };
748
+ /**
749
+ * Containers are a list of containers that will run in the machine. Currently restricted to
750
+ * only specific organizations.
751
+ */
752
+ containers?: Array<FlyContainerConfig>;
753
+ /**
754
+ * Deprecated: use Service.Autostart instead
755
+ */
756
+ disable_machine_autostart?: boolean;
757
+ dns?: FlyDnsConfig;
758
+ /**
759
+ * An object filled with key/value pairs to be set as environment variables
760
+ */
761
+ env?: {
762
+ [key: string]: string;
763
+ };
764
+ files?: Array<FlyFile>;
765
+ guest?: FlyMachineGuest;
766
+ /**
767
+ * The docker image to run
768
+ */
769
+ image?: string;
770
+ init?: FlyMachineInit;
771
+ metadata?: {
772
+ [key: string]: string;
773
+ };
774
+ metrics?: FlyMachineMetrics;
775
+ mounts?: Array<FlyMachineMount>;
776
+ processes?: Array<FlyMachineProcess>;
777
+ restart?: FlyMachineRestart;
778
+ schedule?: string;
779
+ services?: Array<FlyMachineService>;
780
+ /**
781
+ * Deprecated: use Guest instead
782
+ */
783
+ size?: string;
784
+ /**
785
+ * Standbys enable a machine to be a standby for another. In the event of a hardware failure,
786
+ * the standby machine will be started.
787
+ */
788
+ standbys?: Array<string>;
789
+ statics?: Array<FlyStatic>;
790
+ stop_config?: FlyStopConfig;
791
+ };
792
+
793
+ export type FlyMachineGuest = {
794
+ cpu_kind?: string;
795
+ cpus?: number;
796
+ gpu_kind?: string;
797
+ gpus?: number;
798
+ host_dedication_id?: string;
799
+ kernel_args?: Array<string>;
800
+ memory_mb?: number;
801
+ persist_rootfs?: "never" | "always" | "restart";
802
+ };
803
+
804
+ /**
805
+ * For http checks, an array of objects with string field Name and array of strings field Values. The key/value pairs specify header and header values that will get passed with the check call.
806
+ */
807
+ export type FlyMachineHttpHeader = {
808
+ /**
809
+ * The header name
810
+ */
811
+ name?: string;
812
+ /**
813
+ * The header value
814
+ */
815
+ values?: Array<string>;
816
+ };
817
+
818
+ export type FlyMachineInit = {
819
+ cmd?: Array<string>;
820
+ entrypoint?: Array<string>;
821
+ exec?: Array<string>;
822
+ kernel_args?: Array<string>;
823
+ swap_size_mb?: number;
824
+ tty?: boolean;
825
+ };
826
+
827
+ export type FlyMachineMetrics = {
828
+ https?: boolean;
829
+ path?: string;
830
+ port?: number;
831
+ };
832
+
833
+ export type FlyMachineMount = {
834
+ add_size_gb?: number;
835
+ encrypted?: boolean;
836
+ extend_threshold_percent?: number;
837
+ name?: string;
838
+ path?: string;
839
+ size_gb?: number;
840
+ size_gb_limit?: number;
841
+ volume?: string;
842
+ };
843
+
844
+ export type FlyMachinePort = {
845
+ end_port?: number;
846
+ force_https?: boolean;
847
+ handlers?: Array<string>;
848
+ http_options?: FlyHttpOptions;
849
+ port?: number;
850
+ proxy_proto_options?: FlyProxyProtoOptions;
851
+ start_port?: number;
852
+ tls_options?: FlyTlsOptions;
853
+ };
854
+
855
+ export type FlyMachineProcess = {
856
+ cmd?: Array<string>;
857
+ entrypoint?: Array<string>;
858
+ env?: {
859
+ [key: string]: string;
860
+ };
861
+ /**
862
+ * EnvFrom can be provided to set environment variables from machine fields.
863
+ */
864
+ env_from?: Array<FlyEnvFrom>;
865
+ exec?: Array<string>;
866
+ /**
867
+ * IgnoreAppSecrets can be set to true to ignore the secrets for the App the Machine belongs to
868
+ * and only use the secrets provided at the process level. The default/legacy behavior is to use
869
+ * the secrets provided at the App level.
870
+ */
871
+ ignore_app_secrets?: boolean;
872
+ /**
873
+ * Secrets can be provided at the process level to explicitly indicate which secrets should be
874
+ * used for the process. If not provided, the secrets provided at the machine level will be used.
875
+ */
876
+ secrets?: Array<FlyMachineSecret>;
877
+ user?: string;
878
+ };
879
+
880
+ /**
881
+ * The Machine restart policy defines whether and how flyd restarts a Machine after its main process exits. See https://fly.io/docs/machines/guides-examples/machine-restart-policy/.
882
+ */
883
+ export type FlyMachineRestart = {
884
+ /**
885
+ * GPU bid price for spot Machines.
886
+ */
887
+ gpu_bid_price?: number;
888
+ /**
889
+ * When policy is on-failure, the maximum number of times to attempt to restart the Machine before letting it stop.
890
+ */
891
+ max_retries?: number;
892
+ /**
893
+ * * no - Never try to restart a Machine automatically when its main process exits, whether that’s on purpose or on a crash.
894
+ * * always - Always restart a Machine automatically and never let it enter a stopped state, even when the main process exits cleanly.
895
+ * * on-failure - Try up to MaxRetries times to automatically restart the Machine if it exits with a non-zero exit code. Default when no explicit policy is set, and for Machines with schedules.
896
+ * * spot-price - Starts the Machine only when there is capacity and the spot price is less than or equal to the bid price.
897
+ */
898
+ policy?: "no" | "always" | "on-failure" | "spot-price";
899
+ };
900
+
901
+ /**
902
+ * A Secret needing to be set in the environment of the Machine. env_var is required
903
+ */
904
+ export type FlyMachineSecret = {
905
+ /**
906
+ * EnvVar is required and is the name of the environment variable that will be set from the
907
+ * secret. It must be a valid environment variable name.
908
+ */
909
+ env_var?: string;
910
+ /**
911
+ * Name is optional and when provided is used to reference a secret name where the EnvVar is
912
+ * different from what was set as the secret name.
913
+ */
914
+ name?: string;
915
+ };
916
+
917
+ export type FlyMachineService = {
918
+ autostart?: boolean;
919
+ /**
920
+ * Accepts a string (new format) or a boolean (old format). For backward compatibility with older clients, the API continues to use booleans for "off" and "stop" in responses.
921
+ * * "off" or false - Do not autostop the Machine.
922
+ * * "stop" or true - Automatically stop the Machine.
923
+ * * "suspend" - Automatically suspend the Machine, falling back to a full stop if this is not possible.
924
+ */
925
+ autostop?: "off" | "stop" | "suspend";
926
+ /**
927
+ * An optional list of service checks
928
+ */
929
+ checks?: Array<FlyMachineServiceCheck>;
930
+ concurrency?: FlyMachineServiceConcurrency;
931
+ force_instance_description?: string;
932
+ force_instance_key?: string;
933
+ internal_port?: number;
934
+ min_machines_running?: number;
935
+ ports?: Array<FlyMachinePort>;
936
+ protocol?: string;
937
+ };
938
+
939
+ export type FlyMachineServiceCheck = {
940
+ /**
941
+ * The time to wait after a VM starts before checking its health
942
+ */
943
+ grace_period?: FlyDuration;
944
+ headers?: Array<FlyMachineHttpHeader>;
945
+ /**
946
+ * The time between connectivity checks
947
+ */
948
+ interval?: FlyDuration;
949
+ /**
950
+ * For http checks, the HTTP method to use to when making the request
951
+ */
952
+ method?: string;
953
+ /**
954
+ * For http checks, the path to send the request to
955
+ */
956
+ path?: string;
957
+ /**
958
+ * The port to connect to, often the same as internal_port
959
+ */
960
+ port?: number;
961
+ /**
962
+ * For http checks, whether to use http or https
963
+ */
964
+ protocol?: string;
965
+ /**
966
+ * The maximum time a connection can take before being reported as failing its health check
967
+ */
968
+ timeout?: FlyDuration;
969
+ /**
970
+ * If the protocol is https, the hostname to use for TLS certificate validation
971
+ */
972
+ tls_server_name?: string;
973
+ /**
974
+ * For http checks with https protocol, whether or not to verify the TLS certificate
975
+ */
976
+ tls_skip_verify?: boolean;
977
+ /**
978
+ * tcp or http
979
+ */
980
+ type?: string;
981
+ };
982
+
983
+ export type FlyMachineServiceConcurrency = {
984
+ hard_limit?: number;
985
+ soft_limit?: number;
986
+ type?: string;
987
+ };
988
+
989
+ export type FlyProxyProtoOptions = {
990
+ version?: string;
991
+ };
992
+
993
+ export type FlyReplayCache = {
994
+ allow_bypass?: boolean;
995
+ /**
996
+ * Name of the cookie or header to key the cache on
997
+ */
998
+ name?: string;
999
+ path_prefix?: string;
1000
+ ttl_seconds?: number;
1001
+ /**
1002
+ * Currently either "cookie" or "header"
1003
+ */
1004
+ type?: "cookie" | "header";
1005
+ };
1006
+
1007
+ export type FlyStatic = {
1008
+ guest_path: string;
1009
+ index_document?: string;
1010
+ tigris_bucket?: string;
1011
+ url_prefix: string;
1012
+ };
1013
+
1014
+ export type FlyStopConfig = {
1015
+ signal?: string;
1016
+ timeout?: FlyDuration;
1017
+ };
1018
+
1019
+ export type FlyTcpHealthcheck = {
1020
+ /**
1021
+ * The port to connect to, often the same as internal_port
1022
+ */
1023
+ port?: number;
1024
+ };
1025
+
1026
+ export type FlyTlsOptions = {
1027
+ alpn?: Array<string>;
1028
+ default_self_signed?: boolean;
1029
+ versions?: Array<string>;
1030
+ };
1031
+
1032
+ export type FlyUnhealthyPolicy = "stop";
1033
+
1034
+ export type FlyDnsForwardRule = {
1035
+ addr?: string;
1036
+ basename?: string;
1037
+ };
1038
+
1039
+ export type FlyDnsOption = {
1040
+ name?: string;
1041
+ value?: string;
1042
+ };
1043
+
1044
+ export type Flydv1ExecResponse = {
1045
+ exit_code?: number;
1046
+ exit_signal?: number;
1047
+ stderr?: string;
1048
+ stdout?: string;
1049
+ };
1050
+
1051
+ export type ListIpAssignmentsResponse = {
1052
+ ips?: Array<IpAssignment>;
1053
+ };
1054
+
1055
+ export type MainGetPlacementsRequest = {
1056
+ /**
1057
+ * Resource requirements for the Machine to simulate. Defaults to a performance-1x machine
1058
+ */
1059
+ compute?: FlyMachineGuest;
1060
+ /**
1061
+ * Number of machines to simulate placement.
1062
+ * Defaults to 0, which returns the org-specific limit for each region.
1063
+ */
1064
+ count?: number;
1065
+ org_slug: string;
1066
+ /**
1067
+ * Region expression for placement as a comma-delimited set of regions or aliases.
1068
+ * Defaults to "[region],any", to prefer the API endpoint's local region with any other region as fallback.
1069
+ */
1070
+ region?: string;
1071
+ volume_name?: string;
1072
+ volume_size_bytes?: number;
1073
+ /**
1074
+ * Optional weights to override default placement preferences.
1075
+ */
1076
+ weights?: PlacementWeights;
1077
+ };
1078
+
1079
+ export type MainGetPlacementsResponse = {
1080
+ regions?: Array<PlacementRegionPlacement>;
1081
+ };
1082
+
1083
+ export type MainReclaimMemoryRequest = {
1084
+ amount_mb?: number;
1085
+ };
1086
+
1087
+ export type MainReclaimMemoryResponse = {
1088
+ actual_mb?: number;
1089
+ };
1090
+
1091
+ export type MainRegionResponse = {
1092
+ nearest?: string;
1093
+ regions?: Array<ReadsGetCapacityPerRegionRow>;
1094
+ };
1095
+
1096
+ export type MainStatusCode = "unknown" | "insufficient_capacity";
1097
+
1098
+ export type MainTokenInfo = {
1099
+ apps?: Array<string>;
1100
+ org_slug?: string;
1101
+ organization?: string;
1102
+ /**
1103
+ * Machine the token is restricted to (FromMachine caveat)
1104
+ */
1105
+ restricted_to_machine?: string;
1106
+ /**
1107
+ * Machine making the request
1108
+ */
1109
+ source_machine_id?: string;
1110
+ token_id?: string;
1111
+ /**
1112
+ * User identifier if token is for a user
1113
+ */
1114
+ user?: string;
1115
+ };
1116
+
1117
+ export type PlacementRegionPlacement = {
1118
+ /**
1119
+ * Hint on the number of machines in this region can be created concurrently.
1120
+ * Equal to the number of unique hosts selected for placement.
1121
+ */
1122
+ concurrency?: number;
1123
+ count?: number;
1124
+ region?: string;
1125
+ };
1126
+
1127
+ export type PlacementWeights = {
1128
+ [key: string]: number;
1129
+ };
1130
+
1131
+ export type ReadsGetCapacityPerRegionRow = {
1132
+ capacity?: number;
1133
+ code?: string;
1134
+ deprecated?: boolean;
1135
+ gateway_available?: boolean;
1136
+ geo_region?: string;
1137
+ latitude?: number;
1138
+ longitude?: number;
1139
+ name?: string;
1140
+ requires_paid_plan?: boolean;
1141
+ };
1142
+
1143
+ export type AppsListData = {
1144
+ body?: never;
1145
+ path?: never;
1146
+ query: {
1147
+ /**
1148
+ * The org slug, or 'personal', to filter apps
1149
+ */
1150
+ org_slug: string;
1151
+ /**
1152
+ * Filter apps by role
1153
+ */
1154
+ app_role?: string;
1155
+ };
1156
+ url: "/apps";
1157
+ };
1158
+
1159
+ export type AppsListResponses = {
1160
+ /**
1161
+ * OK
1162
+ */
1163
+ 200: ListAppsResponse;
1164
+ };
1165
+
1166
+ export type AppsListResponse = AppsListResponses[keyof AppsListResponses];
1167
+
1168
+ export type AppsCreateData = {
1169
+ /**
1170
+ * App body
1171
+ */
1172
+ body: CreateAppRequest;
1173
+ path?: never;
1174
+ query?: never;
1175
+ url: "/apps";
1176
+ };
1177
+
1178
+ export type AppsCreateErrors = {
1179
+ /**
1180
+ * Bad Request
1181
+ */
1182
+ 400: ErrorResponse;
1183
+ };
1184
+
1185
+ export type AppsCreateError = AppsCreateErrors[keyof AppsCreateErrors];
1186
+
1187
+ export type AppsCreateResponses = {
1188
+ /**
1189
+ * Created
1190
+ */
1191
+ 201: unknown;
1192
+ };
1193
+
1194
+ export type AppsDeleteData = {
1195
+ body?: never;
1196
+ path: {
1197
+ /**
1198
+ * Fly App Name
1199
+ */
1200
+ app_name: string;
1201
+ };
1202
+ query?: never;
1203
+ url: "/apps/{app_name}";
1204
+ };
1205
+
1206
+ export type AppsDeleteResponses = {
1207
+ /**
1208
+ * Accepted
1209
+ */
1210
+ 202: unknown;
1211
+ };
1212
+
1213
+ export type AppsShowData = {
1214
+ body?: never;
1215
+ path: {
1216
+ /**
1217
+ * Fly App Name
1218
+ */
1219
+ app_name: string;
1220
+ };
1221
+ query?: never;
1222
+ url: "/apps/{app_name}";
1223
+ };
1224
+
1225
+ export type AppsShowResponses = {
1226
+ /**
1227
+ * OK
1228
+ */
1229
+ 200: App;
1230
+ };
1231
+
1232
+ export type AppsShowResponse = AppsShowResponses[keyof AppsShowResponses];
1233
+
1234
+ export type AppCreateDeployTokenData = {
1235
+ /**
1236
+ * Request body
1237
+ */
1238
+ body: CreateAppDeployTokenRequest;
1239
+ path: {
1240
+ /**
1241
+ * Fly App Name
1242
+ */
1243
+ app_name: string;
1244
+ };
1245
+ query?: never;
1246
+ url: "/apps/{app_name}/deploy_token";
1247
+ };
1248
+
1249
+ export type AppCreateDeployTokenResponses = {
1250
+ /**
1251
+ * OK
1252
+ */
1253
+ 200: CreateAppResponse;
1254
+ };
1255
+
1256
+ export type AppCreateDeployTokenResponse =
1257
+ AppCreateDeployTokenResponses[keyof AppCreateDeployTokenResponses];
1258
+
1259
+ export type AppIpAssignmentsListData = {
1260
+ body?: never;
1261
+ path?: never;
1262
+ query?: never;
1263
+ url: "/apps/{app_name}/ip_assignments";
1264
+ };
1265
+
1266
+ export type AppIpAssignmentsListResponses = {
1267
+ /**
1268
+ * OK
1269
+ */
1270
+ 200: ListIpAssignmentsResponse;
1271
+ };
1272
+
1273
+ export type AppIpAssignmentsListResponse =
1274
+ AppIpAssignmentsListResponses[keyof AppIpAssignmentsListResponses];
1275
+
1276
+ export type AppIpAssignmentsCreateData = {
1277
+ /**
1278
+ * Assign IP request
1279
+ */
1280
+ body: AssignIpRequest;
1281
+ path?: never;
1282
+ query?: never;
1283
+ url: "/apps/{app_name}/ip_assignments";
1284
+ };
1285
+
1286
+ export type AppIpAssignmentsCreateResponses = {
1287
+ /**
1288
+ * OK
1289
+ */
1290
+ 200: IpAssignment;
1291
+ };
1292
+
1293
+ export type AppIpAssignmentsCreateResponse =
1294
+ AppIpAssignmentsCreateResponses[keyof AppIpAssignmentsCreateResponses];
1295
+
1296
+ export type AppIpAssignmentsDeleteData = {
1297
+ body?: never;
1298
+ path?: never;
1299
+ query?: never;
1300
+ url: "/apps/{app_name}/ip_assignments/{ip}";
1301
+ };
1302
+
1303
+ export type AppIpAssignmentsDeleteResponses = {
1304
+ /**
1305
+ * No Content
1306
+ */
1307
+ 204: void;
1308
+ };
1309
+
1310
+ export type AppIpAssignmentsDeleteResponse =
1311
+ AppIpAssignmentsDeleteResponses[keyof AppIpAssignmentsDeleteResponses];
1312
+
1313
+ export type MachinesListData = {
1314
+ body?: never;
1315
+ path: {
1316
+ /**
1317
+ * Fly App Name
1318
+ */
1319
+ app_name: string;
1320
+ };
1321
+ query?: {
1322
+ /**
1323
+ * Include deleted machines
1324
+ */
1325
+ include_deleted?: boolean;
1326
+ /**
1327
+ * Region filter
1328
+ */
1329
+ region?: string;
1330
+ /**
1331
+ * comma separated list of states to filter (created, started, stopped, suspended)
1332
+ */
1333
+ state?: string;
1334
+ /**
1335
+ * Only return summary info about machines (omit config, checks, events, host_status, nonce, etc.)
1336
+ */
1337
+ summary?: boolean;
1338
+ };
1339
+ url: "/apps/{app_name}/machines";
1340
+ };
1341
+
1342
+ export type MachinesListResponses = {
1343
+ /**
1344
+ * OK
1345
+ */
1346
+ 200: Array<Machine>;
1347
+ };
1348
+
1349
+ export type MachinesListResponse =
1350
+ MachinesListResponses[keyof MachinesListResponses];
1351
+
1352
+ export type MachinesCreateData = {
1353
+ /**
1354
+ * Create machine request
1355
+ */
1356
+ body: CreateMachineRequest;
1357
+ path: {
1358
+ /**
1359
+ * Fly App Name
1360
+ */
1361
+ app_name: string;
1362
+ };
1363
+ query?: never;
1364
+ url: "/apps/{app_name}/machines";
1365
+ };
1366
+
1367
+ export type MachinesCreateResponses = {
1368
+ /**
1369
+ * OK
1370
+ */
1371
+ 200: Machine;
1372
+ };
1373
+
1374
+ export type MachinesCreateResponse =
1375
+ MachinesCreateResponses[keyof MachinesCreateResponses];
1376
+
1377
+ export type MachinesDeleteData = {
1378
+ body?: never;
1379
+ path: {
1380
+ /**
1381
+ * Fly App Name
1382
+ */
1383
+ app_name: string;
1384
+ /**
1385
+ * Machine ID
1386
+ */
1387
+ machine_id: string;
1388
+ };
1389
+ query?: {
1390
+ /**
1391
+ * Force kill the machine if it's running
1392
+ */
1393
+ force?: boolean;
1394
+ };
1395
+ url: "/apps/{app_name}/machines/{machine_id}";
1396
+ };
1397
+
1398
+ export type MachinesDeleteResponses = {
1399
+ /**
1400
+ * OK
1401
+ */
1402
+ 200: unknown;
1403
+ };
1404
+
1405
+ export type MachinesShowData = {
1406
+ body?: never;
1407
+ path: {
1408
+ /**
1409
+ * Fly App Name
1410
+ */
1411
+ app_name: string;
1412
+ /**
1413
+ * Machine ID
1414
+ */
1415
+ machine_id: string;
1416
+ };
1417
+ query?: never;
1418
+ url: "/apps/{app_name}/machines/{machine_id}";
1419
+ };
1420
+
1421
+ export type MachinesShowResponses = {
1422
+ /**
1423
+ * OK
1424
+ */
1425
+ 200: Machine;
1426
+ };
1427
+
1428
+ export type MachinesShowResponse =
1429
+ MachinesShowResponses[keyof MachinesShowResponses];
1430
+
1431
+ export type MachinesUpdateData = {
1432
+ /**
1433
+ * Request body
1434
+ */
1435
+ body: UpdateMachineRequest;
1436
+ path: {
1437
+ /**
1438
+ * Fly App Name
1439
+ */
1440
+ app_name: string;
1441
+ /**
1442
+ * Machine ID
1443
+ */
1444
+ machine_id: string;
1445
+ };
1446
+ query?: never;
1447
+ url: "/apps/{app_name}/machines/{machine_id}";
1448
+ };
1449
+
1450
+ export type MachinesUpdateErrors = {
1451
+ /**
1452
+ * Bad Request
1453
+ */
1454
+ 400: ErrorResponse;
1455
+ };
1456
+
1457
+ export type MachinesUpdateError =
1458
+ MachinesUpdateErrors[keyof MachinesUpdateErrors];
1459
+
1460
+ export type MachinesUpdateResponses = {
1461
+ /**
1462
+ * OK
1463
+ */
1464
+ 200: Machine;
1465
+ };
1466
+
1467
+ export type MachinesUpdateResponse =
1468
+ MachinesUpdateResponses[keyof MachinesUpdateResponses];
1469
+
1470
+ export type MachinesCordonData = {
1471
+ body?: never;
1472
+ path: {
1473
+ /**
1474
+ * Fly App Name
1475
+ */
1476
+ app_name: string;
1477
+ /**
1478
+ * Machine ID
1479
+ */
1480
+ machine_id: string;
1481
+ };
1482
+ query?: never;
1483
+ url: "/apps/{app_name}/machines/{machine_id}/cordon";
1484
+ };
1485
+
1486
+ export type MachinesCordonResponses = {
1487
+ /**
1488
+ * OK
1489
+ */
1490
+ 200: unknown;
1491
+ };
1492
+
1493
+ export type MachinesListEventsData = {
1494
+ body?: never;
1495
+ path: {
1496
+ /**
1497
+ * Fly App Name
1498
+ */
1499
+ app_name: string;
1500
+ /**
1501
+ * Machine ID
1502
+ */
1503
+ machine_id: string;
1504
+ };
1505
+ query?: {
1506
+ /**
1507
+ * The number of events to fetch (max of 50). If omitted, this is set to 20 by default.
1508
+ */
1509
+ limit?: number;
1510
+ };
1511
+ url: "/apps/{app_name}/machines/{machine_id}/events";
1512
+ };
1513
+
1514
+ export type MachinesListEventsResponses = {
1515
+ /**
1516
+ * OK
1517
+ */
1518
+ 200: Array<MachineEvent>;
1519
+ };
1520
+
1521
+ export type MachinesListEventsResponse =
1522
+ MachinesListEventsResponses[keyof MachinesListEventsResponses];
1523
+
1524
+ export type MachinesExecData = {
1525
+ /**
1526
+ * Request body
1527
+ */
1528
+ body: MachineExecRequest;
1529
+ path: {
1530
+ /**
1531
+ * Fly App Name
1532
+ */
1533
+ app_name: string;
1534
+ /**
1535
+ * Machine ID
1536
+ */
1537
+ machine_id: string;
1538
+ };
1539
+ query?: never;
1540
+ url: "/apps/{app_name}/machines/{machine_id}/exec";
1541
+ };
1542
+
1543
+ export type MachinesExecErrors = {
1544
+ /**
1545
+ * Bad Request
1546
+ */
1547
+ 400: ErrorResponse;
1548
+ };
1549
+
1550
+ export type MachinesExecError = MachinesExecErrors[keyof MachinesExecErrors];
1551
+
1552
+ export type MachinesExecResponses = {
1553
+ /**
1554
+ * stdout, stderr, exit code, and exit signal are returned
1555
+ */
1556
+ 200: Flydv1ExecResponse;
1557
+ };
1558
+
1559
+ export type MachinesExecResponse =
1560
+ MachinesExecResponses[keyof MachinesExecResponses];
1561
+
1562
+ export type MachinesReleaseLeaseData = {
1563
+ body?: never;
1564
+ headers: {
1565
+ /**
1566
+ * Existing lease nonce
1567
+ */
1568
+ "fly-machine-lease-nonce": string;
1569
+ };
1570
+ path: {
1571
+ /**
1572
+ * Fly App Name
1573
+ */
1574
+ app_name: string;
1575
+ /**
1576
+ * Machine ID
1577
+ */
1578
+ machine_id: string;
1579
+ };
1580
+ query?: never;
1581
+ url: "/apps/{app_name}/machines/{machine_id}/lease";
1582
+ };
1583
+
1584
+ export type MachinesReleaseLeaseResponses = {
1585
+ /**
1586
+ * OK
1587
+ */
1588
+ 200: unknown;
1589
+ };
1590
+
1591
+ export type MachinesShowLeaseData = {
1592
+ body?: never;
1593
+ path: {
1594
+ /**
1595
+ * Fly App Name
1596
+ */
1597
+ app_name: string;
1598
+ /**
1599
+ * Machine ID
1600
+ */
1601
+ machine_id: string;
1602
+ };
1603
+ query?: never;
1604
+ url: "/apps/{app_name}/machines/{machine_id}/lease";
1605
+ };
1606
+
1607
+ export type MachinesShowLeaseResponses = {
1608
+ /**
1609
+ * OK
1610
+ */
1611
+ 200: Lease;
1612
+ };
1613
+
1614
+ export type MachinesShowLeaseResponse =
1615
+ MachinesShowLeaseResponses[keyof MachinesShowLeaseResponses];
1616
+
1617
+ export type MachinesCreateLeaseData = {
1618
+ /**
1619
+ * Request body
1620
+ */
1621
+ body: CreateLeaseRequest;
1622
+ headers?: {
1623
+ /**
1624
+ * Existing lease nonce to refresh by ttl, empty or non-existent to create a new lease
1625
+ */
1626
+ "fly-machine-lease-nonce"?: string;
1627
+ };
1628
+ path: {
1629
+ /**
1630
+ * Fly App Name
1631
+ */
1632
+ app_name: string;
1633
+ /**
1634
+ * Machine ID
1635
+ */
1636
+ machine_id: string;
1637
+ };
1638
+ query?: never;
1639
+ url: "/apps/{app_name}/machines/{machine_id}/lease";
1640
+ };
1641
+
1642
+ export type MachinesCreateLeaseResponses = {
1643
+ /**
1644
+ * OK
1645
+ */
1646
+ 200: Lease;
1647
+ };
1648
+
1649
+ export type MachinesCreateLeaseResponse =
1650
+ MachinesCreateLeaseResponses[keyof MachinesCreateLeaseResponses];
1651
+
1652
+ export type MachinesReclaimMemoryData = {
1653
+ /**
1654
+ * Reclaim memory request
1655
+ */
1656
+ body: MainReclaimMemoryRequest;
1657
+ path: {
1658
+ /**
1659
+ * Fly App Name
1660
+ */
1661
+ app_name: string;
1662
+ /**
1663
+ * Machine ID
1664
+ */
1665
+ machine_id: string;
1666
+ };
1667
+ query?: never;
1668
+ url: "/apps/{app_name}/machines/{machine_id}/memory/reclaim";
1669
+ };
1670
+
1671
+ export type MachinesReclaimMemoryResponses = {
1672
+ /**
1673
+ * OK
1674
+ */
1675
+ 200: MainReclaimMemoryResponse;
1676
+ };
1677
+
1678
+ export type MachinesReclaimMemoryResponse =
1679
+ MachinesReclaimMemoryResponses[keyof MachinesReclaimMemoryResponses];
1680
+
1681
+ export type MachinesShowMetadataData = {
1682
+ body?: never;
1683
+ path: {
1684
+ /**
1685
+ * Fly App Name
1686
+ */
1687
+ app_name: string;
1688
+ /**
1689
+ * Machine ID
1690
+ */
1691
+ machine_id: string;
1692
+ };
1693
+ query?: never;
1694
+ url: "/apps/{app_name}/machines/{machine_id}/metadata";
1695
+ };
1696
+
1697
+ export type MachinesShowMetadataResponses = {
1698
+ /**
1699
+ * OK
1700
+ */
1701
+ 200: {
1702
+ [key: string]: string;
1703
+ };
1704
+ };
1705
+
1706
+ export type MachinesShowMetadataResponse =
1707
+ MachinesShowMetadataResponses[keyof MachinesShowMetadataResponses];
1708
+
1709
+ export type MachinesPatchMetadataData = {
1710
+ body?: never;
1711
+ path: {
1712
+ /**
1713
+ * Fly App Name
1714
+ */
1715
+ app_name: string;
1716
+ /**
1717
+ * Machine ID
1718
+ */
1719
+ machine_id: string;
1720
+ };
1721
+ query?: never;
1722
+ url: "/apps/{app_name}/machines/{machine_id}/metadata";
1723
+ };
1724
+
1725
+ export type MachinesPatchMetadataErrors = {
1726
+ /**
1727
+ * Bad Request
1728
+ */
1729
+ 400: ErrorResponse;
1730
+ };
1731
+
1732
+ export type MachinesPatchMetadataError =
1733
+ MachinesPatchMetadataErrors[keyof MachinesPatchMetadataErrors];
1734
+
1735
+ export type MachinesPatchMetadataResponses = {
1736
+ /**
1737
+ * No Content
1738
+ */
1739
+ 204: void;
1740
+ };
1741
+
1742
+ export type MachinesPatchMetadataResponse =
1743
+ MachinesPatchMetadataResponses[keyof MachinesPatchMetadataResponses];
1744
+
1745
+ export type MachinesDeleteMetadataData = {
1746
+ body?: never;
1747
+ path: {
1748
+ /**
1749
+ * Fly App Name
1750
+ */
1751
+ app_name: string;
1752
+ /**
1753
+ * Machine ID
1754
+ */
1755
+ machine_id: string;
1756
+ /**
1757
+ * Metadata Key
1758
+ */
1759
+ key: string;
1760
+ };
1761
+ query?: never;
1762
+ url: "/apps/{app_name}/machines/{machine_id}/metadata/{key}";
1763
+ };
1764
+
1765
+ export type MachinesDeleteMetadataResponses = {
1766
+ /**
1767
+ * No Content
1768
+ */
1769
+ 204: void;
1770
+ };
1771
+
1772
+ export type MachinesDeleteMetadataResponse =
1773
+ MachinesDeleteMetadataResponses[keyof MachinesDeleteMetadataResponses];
1774
+
1775
+ export type MachinesUpdateMetadataData = {
1776
+ body?: never;
1777
+ path: {
1778
+ /**
1779
+ * Fly App Name
1780
+ */
1781
+ app_name: string;
1782
+ /**
1783
+ * Machine ID
1784
+ */
1785
+ machine_id: string;
1786
+ /**
1787
+ * Metadata Key
1788
+ */
1789
+ key: string;
1790
+ };
1791
+ query?: never;
1792
+ url: "/apps/{app_name}/machines/{machine_id}/metadata/{key}";
1793
+ };
1794
+
1795
+ export type MachinesUpdateMetadataErrors = {
1796
+ /**
1797
+ * Bad Request
1798
+ */
1799
+ 400: ErrorResponse;
1800
+ };
1801
+
1802
+ export type MachinesUpdateMetadataError =
1803
+ MachinesUpdateMetadataErrors[keyof MachinesUpdateMetadataErrors];
1804
+
1805
+ export type MachinesUpdateMetadataResponses = {
1806
+ /**
1807
+ * No Content
1808
+ */
1809
+ 204: void;
1810
+ };
1811
+
1812
+ export type MachinesUpdateMetadataResponse =
1813
+ MachinesUpdateMetadataResponses[keyof MachinesUpdateMetadataResponses];
1814
+
1815
+ export type MachinesListProcessesData = {
1816
+ body?: never;
1817
+ path: {
1818
+ /**
1819
+ * Fly App Name
1820
+ */
1821
+ app_name: string;
1822
+ /**
1823
+ * Machine ID
1824
+ */
1825
+ machine_id: string;
1826
+ };
1827
+ query?: {
1828
+ /**
1829
+ * Sort by
1830
+ */
1831
+ sort_by?: string;
1832
+ /**
1833
+ * Order
1834
+ */
1835
+ order?: string;
1836
+ };
1837
+ url: "/apps/{app_name}/machines/{machine_id}/ps";
1838
+ };
1839
+
1840
+ export type MachinesListProcessesErrors = {
1841
+ /**
1842
+ * Bad Request
1843
+ */
1844
+ 400: ErrorResponse;
1845
+ };
1846
+
1847
+ export type MachinesListProcessesError =
1848
+ MachinesListProcessesErrors[keyof MachinesListProcessesErrors];
1849
+
1850
+ export type MachinesListProcessesResponses = {
1851
+ /**
1852
+ * OK
1853
+ */
1854
+ 200: Array<ProcessStat>;
1855
+ };
1856
+
1857
+ export type MachinesListProcessesResponse =
1858
+ MachinesListProcessesResponses[keyof MachinesListProcessesResponses];
1859
+
1860
+ export type MachinesRestartData = {
1861
+ body?: never;
1862
+ path: {
1863
+ /**
1864
+ * Fly App Name
1865
+ */
1866
+ app_name: string;
1867
+ /**
1868
+ * Machine ID
1869
+ */
1870
+ machine_id: string;
1871
+ };
1872
+ query?: {
1873
+ /**
1874
+ * Restart timeout as a Go duration string or number of seconds
1875
+ */
1876
+ timeout?: string;
1877
+ /**
1878
+ * Unix signal name
1879
+ */
1880
+ signal?: string;
1881
+ };
1882
+ url: "/apps/{app_name}/machines/{machine_id}/restart";
1883
+ };
1884
+
1885
+ export type MachinesRestartErrors = {
1886
+ /**
1887
+ * Bad Request
1888
+ */
1889
+ 400: ErrorResponse;
1890
+ };
1891
+
1892
+ export type MachinesRestartError =
1893
+ MachinesRestartErrors[keyof MachinesRestartErrors];
1894
+
1895
+ export type MachinesRestartResponses = {
1896
+ /**
1897
+ * OK
1898
+ */
1899
+ 200: unknown;
1900
+ };
1901
+
1902
+ export type MachinesSignalData = {
1903
+ /**
1904
+ * Request body
1905
+ */
1906
+ body: SignalRequest;
1907
+ path: {
1908
+ /**
1909
+ * Fly App Name
1910
+ */
1911
+ app_name: string;
1912
+ /**
1913
+ * Machine ID
1914
+ */
1915
+ machine_id: string;
1916
+ };
1917
+ query?: never;
1918
+ url: "/apps/{app_name}/machines/{machine_id}/signal";
1919
+ };
1920
+
1921
+ export type MachinesSignalErrors = {
1922
+ /**
1923
+ * Bad Request
1924
+ */
1925
+ 400: ErrorResponse;
1926
+ };
1927
+
1928
+ export type MachinesSignalError =
1929
+ MachinesSignalErrors[keyof MachinesSignalErrors];
1930
+
1931
+ export type MachinesSignalResponses = {
1932
+ /**
1933
+ * OK
1934
+ */
1935
+ 200: unknown;
1936
+ };
1937
+
1938
+ export type MachinesStartData = {
1939
+ body?: never;
1940
+ path: {
1941
+ /**
1942
+ * Fly App Name
1943
+ */
1944
+ app_name: string;
1945
+ /**
1946
+ * Machine ID
1947
+ */
1948
+ machine_id: string;
1949
+ };
1950
+ query?: never;
1951
+ url: "/apps/{app_name}/machines/{machine_id}/start";
1952
+ };
1953
+
1954
+ export type MachinesStartResponses = {
1955
+ /**
1956
+ * OK
1957
+ */
1958
+ 200: unknown;
1959
+ };
1960
+
1961
+ export type MachinesStopData = {
1962
+ /**
1963
+ * Optional request body
1964
+ */
1965
+ body?: StopRequest;
1966
+ path: {
1967
+ /**
1968
+ * Fly App Name
1969
+ */
1970
+ app_name: string;
1971
+ /**
1972
+ * Machine ID
1973
+ */
1974
+ machine_id: string;
1975
+ };
1976
+ query?: never;
1977
+ url: "/apps/{app_name}/machines/{machine_id}/stop";
1978
+ };
1979
+
1980
+ export type MachinesStopErrors = {
1981
+ /**
1982
+ * Bad Request
1983
+ */
1984
+ 400: ErrorResponse;
1985
+ };
1986
+
1987
+ export type MachinesStopError = MachinesStopErrors[keyof MachinesStopErrors];
1988
+
1989
+ export type MachinesStopResponses = {
1990
+ /**
1991
+ * OK
1992
+ */
1993
+ 200: unknown;
1994
+ };
1995
+
1996
+ export type MachinesSuspendData = {
1997
+ body?: never;
1998
+ path: {
1999
+ /**
2000
+ * Fly App Name
2001
+ */
2002
+ app_name: string;
2003
+ /**
2004
+ * Machine ID
2005
+ */
2006
+ machine_id: string;
2007
+ };
2008
+ query?: never;
2009
+ url: "/apps/{app_name}/machines/{machine_id}/suspend";
2010
+ };
2011
+
2012
+ export type MachinesSuspendResponses = {
2013
+ /**
2014
+ * OK
2015
+ */
2016
+ 200: unknown;
2017
+ };
2018
+
2019
+ export type MachinesUncordonData = {
2020
+ body?: never;
2021
+ path: {
2022
+ /**
2023
+ * Fly App Name
2024
+ */
2025
+ app_name: string;
2026
+ /**
2027
+ * Machine ID
2028
+ */
2029
+ machine_id: string;
2030
+ };
2031
+ query?: never;
2032
+ url: "/apps/{app_name}/machines/{machine_id}/uncordon";
2033
+ };
2034
+
2035
+ export type MachinesUncordonResponses = {
2036
+ /**
2037
+ * OK
2038
+ */
2039
+ 200: unknown;
2040
+ };
2041
+
2042
+ export type MachinesListVersionsData = {
2043
+ body?: never;
2044
+ path: {
2045
+ /**
2046
+ * Fly App Name
2047
+ */
2048
+ app_name: string;
2049
+ /**
2050
+ * Machine ID
2051
+ */
2052
+ machine_id: string;
2053
+ };
2054
+ query?: never;
2055
+ url: "/apps/{app_name}/machines/{machine_id}/versions";
2056
+ };
2057
+
2058
+ export type MachinesListVersionsResponses = {
2059
+ /**
2060
+ * OK
2061
+ */
2062
+ 200: Array<MachineVersion>;
2063
+ };
2064
+
2065
+ export type MachinesListVersionsResponse =
2066
+ MachinesListVersionsResponses[keyof MachinesListVersionsResponses];
2067
+
2068
+ export type MachinesWaitData = {
2069
+ body?: never;
2070
+ path: {
2071
+ /**
2072
+ * Fly App Name
2073
+ */
2074
+ app_name: string;
2075
+ /**
2076
+ * Machine ID
2077
+ */
2078
+ machine_id: string;
2079
+ };
2080
+ query?: {
2081
+ /**
2082
+ * 26-character Machine version ID
2083
+ */
2084
+ instance_id?: string;
2085
+ /**
2086
+ * wait timeout. default 60s
2087
+ */
2088
+ timeout?: number;
2089
+ /**
2090
+ * desired state
2091
+ */
2092
+ state?: "started" | "stopped" | "suspended" | "destroyed";
2093
+ };
2094
+ url: "/apps/{app_name}/machines/{machine_id}/wait";
2095
+ };
2096
+
2097
+ export type MachinesWaitErrors = {
2098
+ /**
2099
+ * Bad Request
2100
+ */
2101
+ 400: ErrorResponse;
2102
+ };
2103
+
2104
+ export type MachinesWaitError = MachinesWaitErrors[keyof MachinesWaitErrors];
2105
+
2106
+ export type MachinesWaitResponses = {
2107
+ /**
2108
+ * OK
2109
+ */
2110
+ 200: unknown;
2111
+ };
2112
+
2113
+ export type SecretkeysListData = {
2114
+ body?: never;
2115
+ path: {
2116
+ /**
2117
+ * Fly App Name
2118
+ */
2119
+ app_name: string;
2120
+ };
2121
+ query?: {
2122
+ /**
2123
+ * Minimum secrets version to return. Returned when setting a new secret
2124
+ */
2125
+ min_version?: string;
2126
+ /**
2127
+ * Comma-seperated list of secret keys to list
2128
+ */
2129
+ types?: string;
2130
+ };
2131
+ url: "/apps/{app_name}/secretkeys";
2132
+ };
2133
+
2134
+ export type SecretkeysListResponses = {
2135
+ /**
2136
+ * OK
2137
+ */
2138
+ 200: SecretKeys;
2139
+ };
2140
+
2141
+ export type SecretkeysListResponse =
2142
+ SecretkeysListResponses[keyof SecretkeysListResponses];
2143
+
2144
+ export type SecretkeyDeleteData = {
2145
+ body?: never;
2146
+ path: {
2147
+ /**
2148
+ * Fly App Name
2149
+ */
2150
+ app_name: string;
2151
+ /**
2152
+ * Secret key name
2153
+ */
2154
+ secret_name: string;
2155
+ };
2156
+ query?: never;
2157
+ url: "/apps/{app_name}/secretkeys/{secret_name}";
2158
+ };
2159
+
2160
+ export type SecretkeyDeleteResponses = {
2161
+ /**
2162
+ * OK
2163
+ */
2164
+ 200: DeleteSecretkeyResponse;
2165
+ };
2166
+
2167
+ export type SecretkeyDeleteResponse =
2168
+ SecretkeyDeleteResponses[keyof SecretkeyDeleteResponses];
2169
+
2170
+ export type SecretkeyGetData = {
2171
+ body?: never;
2172
+ path: {
2173
+ /**
2174
+ * Fly App Name
2175
+ */
2176
+ app_name: string;
2177
+ /**
2178
+ * Secret key name
2179
+ */
2180
+ secret_name: string;
2181
+ };
2182
+ query?: {
2183
+ /**
2184
+ * Minimum secrets version to return. Returned when setting a new secret
2185
+ */
2186
+ min_version?: string;
2187
+ };
2188
+ url: "/apps/{app_name}/secretkeys/{secret_name}";
2189
+ };
2190
+
2191
+ export type SecretkeyGetResponses = {
2192
+ /**
2193
+ * OK
2194
+ */
2195
+ 200: SecretKey;
2196
+ };
2197
+
2198
+ export type SecretkeyGetResponse =
2199
+ SecretkeyGetResponses[keyof SecretkeyGetResponses];
2200
+
2201
+ export type SecretkeySetData = {
2202
+ /**
2203
+ * Create secret key request
2204
+ */
2205
+ body: SetSecretkeyRequest;
2206
+ path: {
2207
+ /**
2208
+ * Fly App Name
2209
+ */
2210
+ app_name: string;
2211
+ /**
2212
+ * Secret key name
2213
+ */
2214
+ secret_name: string;
2215
+ };
2216
+ query?: never;
2217
+ url: "/apps/{app_name}/secretkeys/{secret_name}";
2218
+ };
2219
+
2220
+ export type SecretkeySetErrors = {
2221
+ /**
2222
+ * Bad Request
2223
+ */
2224
+ 400: ErrorResponse;
2225
+ };
2226
+
2227
+ export type SecretkeySetError = SecretkeySetErrors[keyof SecretkeySetErrors];
2228
+
2229
+ export type SecretkeySetResponses = {
2230
+ /**
2231
+ * Created
2232
+ */
2233
+ 201: SetSecretkeyResponse;
2234
+ };
2235
+
2236
+ export type SecretkeySetResponse =
2237
+ SecretkeySetResponses[keyof SecretkeySetResponses];
2238
+
2239
+ export type SecretkeyDecryptData = {
2240
+ /**
2241
+ * Decrypt with secret key request
2242
+ */
2243
+ body: DecryptSecretkeyRequest;
2244
+ path: {
2245
+ /**
2246
+ * Fly App Name
2247
+ */
2248
+ app_name: string;
2249
+ /**
2250
+ * Secret key name
2251
+ */
2252
+ secret_name: string;
2253
+ };
2254
+ query?: {
2255
+ /**
2256
+ * Minimum secrets version to return. Returned when setting a new secret
2257
+ */
2258
+ min_version?: string;
2259
+ };
2260
+ url: "/apps/{app_name}/secretkeys/{secret_name}/decrypt";
2261
+ };
2262
+
2263
+ export type SecretkeyDecryptErrors = {
2264
+ /**
2265
+ * Bad Request
2266
+ */
2267
+ 400: ErrorResponse;
2268
+ };
2269
+
2270
+ export type SecretkeyDecryptError =
2271
+ SecretkeyDecryptErrors[keyof SecretkeyDecryptErrors];
2272
+
2273
+ export type SecretkeyDecryptResponses = {
2274
+ /**
2275
+ * OK
2276
+ */
2277
+ 200: DecryptSecretkeyResponse;
2278
+ };
2279
+
2280
+ export type SecretkeyDecryptResponse =
2281
+ SecretkeyDecryptResponses[keyof SecretkeyDecryptResponses];
2282
+
2283
+ export type SecretkeyEncryptData = {
2284
+ /**
2285
+ * Encrypt with secret key request
2286
+ */
2287
+ body: EncryptSecretkeyRequest;
2288
+ path: {
2289
+ /**
2290
+ * Fly App Name
2291
+ */
2292
+ app_name: string;
2293
+ /**
2294
+ * Secret key name
2295
+ */
2296
+ secret_name: string;
2297
+ };
2298
+ query?: {
2299
+ /**
2300
+ * Minimum secrets version to return. Returned when setting a new secret
2301
+ */
2302
+ min_version?: string;
2303
+ };
2304
+ url: "/apps/{app_name}/secretkeys/{secret_name}/encrypt";
2305
+ };
2306
+
2307
+ export type SecretkeyEncryptErrors = {
2308
+ /**
2309
+ * Bad Request
2310
+ */
2311
+ 400: ErrorResponse;
2312
+ };
2313
+
2314
+ export type SecretkeyEncryptError =
2315
+ SecretkeyEncryptErrors[keyof SecretkeyEncryptErrors];
2316
+
2317
+ export type SecretkeyEncryptResponses = {
2318
+ /**
2319
+ * OK
2320
+ */
2321
+ 200: EncryptSecretkeyResponse;
2322
+ };
2323
+
2324
+ export type SecretkeyEncryptResponse =
2325
+ SecretkeyEncryptResponses[keyof SecretkeyEncryptResponses];
2326
+
2327
+ export type SecretkeyGenerateData = {
2328
+ /**
2329
+ * generate secret key request
2330
+ */
2331
+ body: SetSecretkeyRequest;
2332
+ path: {
2333
+ /**
2334
+ * Fly App Name
2335
+ */
2336
+ app_name: string;
2337
+ /**
2338
+ * Secret key name
2339
+ */
2340
+ secret_name: string;
2341
+ };
2342
+ query?: never;
2343
+ url: "/apps/{app_name}/secretkeys/{secret_name}/generate";
2344
+ };
2345
+
2346
+ export type SecretkeyGenerateErrors = {
2347
+ /**
2348
+ * Bad Request
2349
+ */
2350
+ 400: ErrorResponse;
2351
+ };
2352
+
2353
+ export type SecretkeyGenerateError =
2354
+ SecretkeyGenerateErrors[keyof SecretkeyGenerateErrors];
2355
+
2356
+ export type SecretkeyGenerateResponses = {
2357
+ /**
2358
+ * Created
2359
+ */
2360
+ 201: SetSecretkeyResponse;
2361
+ };
2362
+
2363
+ export type SecretkeyGenerateResponse =
2364
+ SecretkeyGenerateResponses[keyof SecretkeyGenerateResponses];
2365
+
2366
+ export type SecretkeySignData = {
2367
+ /**
2368
+ * Sign with secret key request
2369
+ */
2370
+ body: SignSecretkeyRequest;
2371
+ path: {
2372
+ /**
2373
+ * Fly App Name
2374
+ */
2375
+ app_name: string;
2376
+ /**
2377
+ * Secret key name
2378
+ */
2379
+ secret_name: string;
2380
+ };
2381
+ query?: {
2382
+ /**
2383
+ * Minimum secrets version to return. Returned when setting a new secret
2384
+ */
2385
+ min_version?: string;
2386
+ };
2387
+ url: "/apps/{app_name}/secretkeys/{secret_name}/sign";
2388
+ };
2389
+
2390
+ export type SecretkeySignErrors = {
2391
+ /**
2392
+ * Bad Request
2393
+ */
2394
+ 400: ErrorResponse;
2395
+ };
2396
+
2397
+ export type SecretkeySignError = SecretkeySignErrors[keyof SecretkeySignErrors];
2398
+
2399
+ export type SecretkeySignResponses = {
2400
+ /**
2401
+ * OK
2402
+ */
2403
+ 200: SignSecretkeyResponse;
2404
+ };
2405
+
2406
+ export type SecretkeySignResponse =
2407
+ SecretkeySignResponses[keyof SecretkeySignResponses];
2408
+
2409
+ export type SecretkeyVerifyData = {
2410
+ /**
2411
+ * Verify with secret key request
2412
+ */
2413
+ body: VerifySecretkeyRequest;
2414
+ path: {
2415
+ /**
2416
+ * Fly App Name
2417
+ */
2418
+ app_name: string;
2419
+ /**
2420
+ * Secret key name
2421
+ */
2422
+ secret_name: string;
2423
+ };
2424
+ query?: {
2425
+ /**
2426
+ * Minimum secrets version to return. Returned when setting a new secret
2427
+ */
2428
+ min_version?: string;
2429
+ };
2430
+ url: "/apps/{app_name}/secretkeys/{secret_name}/verify";
2431
+ };
2432
+
2433
+ export type SecretkeyVerifyErrors = {
2434
+ /**
2435
+ * Bad Request
2436
+ */
2437
+ 400: ErrorResponse;
2438
+ };
2439
+
2440
+ export type SecretkeyVerifyError =
2441
+ SecretkeyVerifyErrors[keyof SecretkeyVerifyErrors];
2442
+
2443
+ export type SecretkeyVerifyResponses = {
2444
+ /**
2445
+ * No Content
2446
+ */
2447
+ 204: void;
2448
+ };
2449
+
2450
+ export type SecretkeyVerifyResponse =
2451
+ SecretkeyVerifyResponses[keyof SecretkeyVerifyResponses];
2452
+
2453
+ export type SecretsListData = {
2454
+ body?: never;
2455
+ path: {
2456
+ /**
2457
+ * Fly App Name
2458
+ */
2459
+ app_name: string;
2460
+ };
2461
+ query?: {
2462
+ /**
2463
+ * Minimum secrets version to return. Returned when setting a new secret
2464
+ */
2465
+ min_version?: string;
2466
+ /**
2467
+ * Show the secret values.
2468
+ */
2469
+ show_secrets?: boolean;
2470
+ };
2471
+ url: "/apps/{app_name}/secrets";
2472
+ };
2473
+
2474
+ export type SecretsListResponses = {
2475
+ /**
2476
+ * OK
2477
+ */
2478
+ 200: AppSecrets;
2479
+ };
2480
+
2481
+ export type SecretsListResponse =
2482
+ SecretsListResponses[keyof SecretsListResponses];
2483
+
2484
+ export type SecretsUpdateData = {
2485
+ /**
2486
+ * Update app secret request, with values to set, or nil to unset
2487
+ */
2488
+ body: AppSecretsUpdateRequest;
2489
+ path: {
2490
+ /**
2491
+ * Fly App Name
2492
+ */
2493
+ app_name: string;
2494
+ };
2495
+ query?: never;
2496
+ url: "/apps/{app_name}/secrets";
2497
+ };
2498
+
2499
+ export type SecretsUpdateErrors = {
2500
+ /**
2501
+ * Bad Request
2502
+ */
2503
+ 400: ErrorResponse;
2504
+ };
2505
+
2506
+ export type SecretsUpdateError = SecretsUpdateErrors[keyof SecretsUpdateErrors];
2507
+
2508
+ export type SecretsUpdateResponses = {
2509
+ /**
2510
+ * OK
2511
+ */
2512
+ 200: AppSecretsUpdateResp;
2513
+ };
2514
+
2515
+ export type SecretsUpdateResponse =
2516
+ SecretsUpdateResponses[keyof SecretsUpdateResponses];
2517
+
2518
+ export type SecretDeleteData = {
2519
+ body?: never;
2520
+ path: {
2521
+ /**
2522
+ * Fly App Name
2523
+ */
2524
+ app_name: string;
2525
+ /**
2526
+ * App secret name
2527
+ */
2528
+ secret_name: string;
2529
+ };
2530
+ query?: never;
2531
+ url: "/apps/{app_name}/secrets/{secret_name}";
2532
+ };
2533
+
2534
+ export type SecretDeleteResponses = {
2535
+ /**
2536
+ * OK
2537
+ */
2538
+ 200: DeleteAppSecretResponse;
2539
+ };
2540
+
2541
+ export type SecretDeleteResponse =
2542
+ SecretDeleteResponses[keyof SecretDeleteResponses];
2543
+
2544
+ export type SecretGetData = {
2545
+ body?: never;
2546
+ path: {
2547
+ /**
2548
+ * Fly App Name
2549
+ */
2550
+ app_name: string;
2551
+ /**
2552
+ * App secret name
2553
+ */
2554
+ secret_name: string;
2555
+ };
2556
+ query?: {
2557
+ /**
2558
+ * Minimum secrets version to return. Returned when setting a new secret
2559
+ */
2560
+ min_version?: string;
2561
+ /**
2562
+ * Show the secret value.
2563
+ */
2564
+ show_secrets?: boolean;
2565
+ };
2566
+ url: "/apps/{app_name}/secrets/{secret_name}";
2567
+ };
2568
+
2569
+ export type SecretGetResponses = {
2570
+ /**
2571
+ * OK
2572
+ */
2573
+ 200: AppSecret;
2574
+ };
2575
+
2576
+ export type SecretGetResponse = SecretGetResponses[keyof SecretGetResponses];
2577
+
2578
+ export type SecretCreateData = {
2579
+ /**
2580
+ * Create app secret request
2581
+ */
2582
+ body: SetAppSecretRequest;
2583
+ path: {
2584
+ /**
2585
+ * Fly App Name
2586
+ */
2587
+ app_name: string;
2588
+ /**
2589
+ * App secret name
2590
+ */
2591
+ secret_name: string;
2592
+ };
2593
+ query?: never;
2594
+ url: "/apps/{app_name}/secrets/{secret_name}";
2595
+ };
2596
+
2597
+ export type SecretCreateErrors = {
2598
+ /**
2599
+ * Bad Request
2600
+ */
2601
+ 400: ErrorResponse;
2602
+ };
2603
+
2604
+ export type SecretCreateError = SecretCreateErrors[keyof SecretCreateErrors];
2605
+
2606
+ export type SecretCreateResponses = {
2607
+ /**
2608
+ * Created
2609
+ */
2610
+ 201: SetAppSecretResponse;
2611
+ };
2612
+
2613
+ export type SecretCreateResponse =
2614
+ SecretCreateResponses[keyof SecretCreateResponses];
2615
+
2616
+ export type VolumesListData = {
2617
+ body?: never;
2618
+ path: {
2619
+ /**
2620
+ * Fly App Name
2621
+ */
2622
+ app_name: string;
2623
+ };
2624
+ query?: {
2625
+ /**
2626
+ * Only return summary info about volumes (omit blocks, block size, etc)
2627
+ */
2628
+ summary?: boolean;
2629
+ };
2630
+ url: "/apps/{app_name}/volumes";
2631
+ };
2632
+
2633
+ export type VolumesListResponses = {
2634
+ /**
2635
+ * OK
2636
+ */
2637
+ 200: Array<Volume>;
2638
+ };
2639
+
2640
+ export type VolumesListResponse =
2641
+ VolumesListResponses[keyof VolumesListResponses];
2642
+
2643
+ export type VolumesCreateData = {
2644
+ /**
2645
+ * Request body
2646
+ */
2647
+ body: CreateVolumeRequest;
2648
+ path: {
2649
+ /**
2650
+ * Fly App Name
2651
+ */
2652
+ app_name: string;
2653
+ };
2654
+ query?: never;
2655
+ url: "/apps/{app_name}/volumes";
2656
+ };
2657
+
2658
+ export type VolumesCreateResponses = {
2659
+ /**
2660
+ * OK
2661
+ */
2662
+ 200: Volume;
2663
+ };
2664
+
2665
+ export type VolumesCreateResponse =
2666
+ VolumesCreateResponses[keyof VolumesCreateResponses];
2667
+
2668
+ export type VolumeDeleteData = {
2669
+ body?: never;
2670
+ path: {
2671
+ /**
2672
+ * Fly App Name
2673
+ */
2674
+ app_name: string;
2675
+ /**
2676
+ * Volume ID
2677
+ */
2678
+ volume_id: string;
2679
+ };
2680
+ query?: never;
2681
+ url: "/apps/{app_name}/volumes/{volume_id}";
2682
+ };
2683
+
2684
+ export type VolumeDeleteResponses = {
2685
+ /**
2686
+ * OK
2687
+ */
2688
+ 200: Volume;
2689
+ };
2690
+
2691
+ export type VolumeDeleteResponse =
2692
+ VolumeDeleteResponses[keyof VolumeDeleteResponses];
2693
+
2694
+ export type VolumesGetByIdData = {
2695
+ body?: never;
2696
+ path: {
2697
+ /**
2698
+ * Fly App Name
2699
+ */
2700
+ app_name: string;
2701
+ /**
2702
+ * Volume ID
2703
+ */
2704
+ volume_id: string;
2705
+ };
2706
+ query?: never;
2707
+ url: "/apps/{app_name}/volumes/{volume_id}";
2708
+ };
2709
+
2710
+ export type VolumesGetByIdResponses = {
2711
+ /**
2712
+ * OK
2713
+ */
2714
+ 200: Volume;
2715
+ };
2716
+
2717
+ export type VolumesGetByIdResponse =
2718
+ VolumesGetByIdResponses[keyof VolumesGetByIdResponses];
2719
+
2720
+ export type VolumesUpdateData = {
2721
+ /**
2722
+ * Request body
2723
+ */
2724
+ body: UpdateVolumeRequest;
2725
+ path: {
2726
+ /**
2727
+ * Fly App Name
2728
+ */
2729
+ app_name: string;
2730
+ /**
2731
+ * Volume ID
2732
+ */
2733
+ volume_id: string;
2734
+ };
2735
+ query?: never;
2736
+ url: "/apps/{app_name}/volumes/{volume_id}";
2737
+ };
2738
+
2739
+ export type VolumesUpdateErrors = {
2740
+ /**
2741
+ * Bad Request
2742
+ */
2743
+ 400: ErrorResponse;
2744
+ };
2745
+
2746
+ export type VolumesUpdateError = VolumesUpdateErrors[keyof VolumesUpdateErrors];
2747
+
2748
+ export type VolumesUpdateResponses = {
2749
+ /**
2750
+ * OK
2751
+ */
2752
+ 200: Volume;
2753
+ };
2754
+
2755
+ export type VolumesUpdateResponse =
2756
+ VolumesUpdateResponses[keyof VolumesUpdateResponses];
2757
+
2758
+ export type VolumesExtendData = {
2759
+ /**
2760
+ * Request body
2761
+ */
2762
+ body: ExtendVolumeRequest;
2763
+ path: {
2764
+ /**
2765
+ * Fly App Name
2766
+ */
2767
+ app_name: string;
2768
+ /**
2769
+ * Volume ID
2770
+ */
2771
+ volume_id: string;
2772
+ };
2773
+ query?: never;
2774
+ url: "/apps/{app_name}/volumes/{volume_id}/extend";
2775
+ };
2776
+
2777
+ export type VolumesExtendResponses = {
2778
+ /**
2779
+ * OK
2780
+ */
2781
+ 200: ExtendVolumeResponse;
2782
+ };
2783
+
2784
+ export type VolumesExtendResponse =
2785
+ VolumesExtendResponses[keyof VolumesExtendResponses];
2786
+
2787
+ export type VolumesListSnapshotsData = {
2788
+ body?: never;
2789
+ path: {
2790
+ /**
2791
+ * Fly App Name
2792
+ */
2793
+ app_name: string;
2794
+ /**
2795
+ * Volume ID
2796
+ */
2797
+ volume_id: string;
2798
+ };
2799
+ query?: never;
2800
+ url: "/apps/{app_name}/volumes/{volume_id}/snapshots";
2801
+ };
2802
+
2803
+ export type VolumesListSnapshotsResponses = {
2804
+ /**
2805
+ * OK
2806
+ */
2807
+ 200: Array<VolumeSnapshot>;
2808
+ };
2809
+
2810
+ export type VolumesListSnapshotsResponse =
2811
+ VolumesListSnapshotsResponses[keyof VolumesListSnapshotsResponses];
2812
+
2813
+ export type CreateVolumeSnapshotData = {
2814
+ body?: never;
2815
+ path: {
2816
+ /**
2817
+ * Fly App Name
2818
+ */
2819
+ app_name: string;
2820
+ /**
2821
+ * Volume ID
2822
+ */
2823
+ volume_id: string;
2824
+ };
2825
+ query?: never;
2826
+ url: "/apps/{app_name}/volumes/{volume_id}/snapshots";
2827
+ };
2828
+
2829
+ export type CreateVolumeSnapshotResponses = {
2830
+ /**
2831
+ * OK
2832
+ */
2833
+ 200: unknown;
2834
+ };
2835
+
2836
+ export type PlatformPlacementsPostData = {
2837
+ /**
2838
+ * Get placements request
2839
+ */
2840
+ body: MainGetPlacementsRequest;
2841
+ path?: never;
2842
+ query?: never;
2843
+ url: "/platform/placements";
2844
+ };
2845
+
2846
+ export type PlatformPlacementsPostResponses = {
2847
+ /**
2848
+ * OK
2849
+ */
2850
+ 200: MainGetPlacementsResponse;
2851
+ };
2852
+
2853
+ export type PlatformPlacementsPostResponse =
2854
+ PlatformPlacementsPostResponses[keyof PlatformPlacementsPostResponses];
2855
+
2856
+ export type PlatformRegionsGetData = {
2857
+ body?: never;
2858
+ path?: never;
2859
+ query?: {
2860
+ /**
2861
+ * guest machine size preset. default performance-1x
2862
+ */
2863
+ size?: string;
2864
+ /**
2865
+ * guest CPU kind
2866
+ */
2867
+ cpu_kind?: string;
2868
+ /**
2869
+ * guest memory in megabytes
2870
+ */
2871
+ memory_mb?: number;
2872
+ /**
2873
+ * guest CPU count
2874
+ */
2875
+ cpus?: number;
2876
+ /**
2877
+ * guest GPU count
2878
+ */
2879
+ gpus?: number;
2880
+ /**
2881
+ * guest GPU kind
2882
+ */
2883
+ gpu_kind?: string;
2884
+ };
2885
+ url: "/platform/regions";
2886
+ };
2887
+
2888
+ export type PlatformRegionsGetResponses = {
2889
+ /**
2890
+ * OK
2891
+ */
2892
+ 200: MainRegionResponse;
2893
+ };
2894
+
2895
+ export type PlatformRegionsGetResponse =
2896
+ PlatformRegionsGetResponses[keyof PlatformRegionsGetResponses];
2897
+
2898
+ export type TokensRequestKmsData = {
2899
+ body?: never;
2900
+ path?: never;
2901
+ query?: never;
2902
+ url: "/tokens/kms";
2903
+ };
2904
+
2905
+ export type TokensRequestKmsResponses = {
2906
+ /**
2907
+ * KMS token
2908
+ */
2909
+ 200: string;
2910
+ };
2911
+
2912
+ export type TokensRequestKmsResponse =
2913
+ TokensRequestKmsResponses[keyof TokensRequestKmsResponses];
2914
+
2915
+ export type TokensRequestOidcData = {
2916
+ /**
2917
+ * Optional request body
2918
+ */
2919
+ body: CreateOidcTokenRequest;
2920
+ path?: never;
2921
+ query?: never;
2922
+ url: "/tokens/oidc";
2923
+ };
2924
+
2925
+ export type TokensRequestOidcErrors = {
2926
+ /**
2927
+ * Bad Request
2928
+ */
2929
+ 400: ErrorResponse;
2930
+ };
2931
+
2932
+ export type TokensRequestOidcError =
2933
+ TokensRequestOidcErrors[keyof TokensRequestOidcErrors];
2934
+
2935
+ export type TokensRequestOidcResponses = {
2936
+ /**
2937
+ * OIDC token
2938
+ */
2939
+ 200: string;
2940
+ };
2941
+
2942
+ export type TokensRequestOidcResponse =
2943
+ TokensRequestOidcResponses[keyof TokensRequestOidcResponses];
2944
+
2945
+ export type CurrentTokenShowData = {
2946
+ body?: never;
2947
+ path?: never;
2948
+ query?: never;
2949
+ url: "/v1/tokens/current";
2950
+ };
2951
+
2952
+ export type CurrentTokenShowErrors = {
2953
+ /**
2954
+ * Unauthorized
2955
+ */
2956
+ 401: ErrorResponse;
2957
+ /**
2958
+ * Internal Server Error
2959
+ */
2960
+ 500: ErrorResponse;
2961
+ };
2962
+
2963
+ export type CurrentTokenShowError =
2964
+ CurrentTokenShowErrors[keyof CurrentTokenShowErrors];
2965
+
2966
+ export type CurrentTokenShowResponses = {
2967
+ /**
2968
+ * OK
2969
+ */
2970
+ 200: CurrentTokenResponse;
2971
+ };
2972
+
2973
+ export type CurrentTokenShowResponse =
2974
+ CurrentTokenShowResponses[keyof CurrentTokenShowResponses];