@fly.io/sdk 0.1.0

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/LICENSE +21 -0
  2. package/dist/app.d.ts +181 -0
  3. package/dist/app.d.ts.map +1 -0
  4. package/dist/app.js +212 -0
  5. package/dist/client.d.ts +42 -0
  6. package/dist/client.d.ts.map +1 -0
  7. package/dist/client.js +200 -0
  8. package/dist/errors.d.ts +48 -0
  9. package/dist/errors.d.ts.map +1 -0
  10. package/dist/errors.js +85 -0
  11. package/dist/index.d.ts +28 -0
  12. package/dist/index.d.ts.map +1 -0
  13. package/dist/index.js +18 -0
  14. package/dist/machine.d.ts +319 -0
  15. package/dist/machine.d.ts.map +1 -0
  16. package/dist/machine.js +249 -0
  17. package/dist/network.d.ts +45 -0
  18. package/dist/network.d.ts.map +1 -0
  19. package/dist/network.js +44 -0
  20. package/dist/organization.d.ts +20 -0
  21. package/dist/organization.d.ts.map +1 -0
  22. package/dist/organization.js +22 -0
  23. package/dist/regions.d.ts +35 -0
  24. package/dist/regions.d.ts.map +1 -0
  25. package/dist/regions.js +53 -0
  26. package/dist/secret.d.ts +55 -0
  27. package/dist/secret.d.ts.map +1 -0
  28. package/dist/secret.js +53 -0
  29. package/dist/token.d.ts +14 -0
  30. package/dist/token.d.ts.map +1 -0
  31. package/dist/token.js +16 -0
  32. package/dist/types.d.ts +937 -0
  33. package/dist/types.d.ts.map +1 -0
  34. package/dist/types.js +40 -0
  35. package/dist/volume.d.ts +72 -0
  36. package/dist/volume.d.ts.map +1 -0
  37. package/dist/volume.js +45 -0
  38. package/package.json +54 -0
  39. package/src/app.ts +462 -0
  40. package/src/client.ts +262 -0
  41. package/src/errors.ts +135 -0
  42. package/src/index.ts +141 -0
  43. package/src/machine.ts +644 -0
  44. package/src/network.ts +87 -0
  45. package/src/organization.ts +43 -0
  46. package/src/regions.ts +94 -0
  47. package/src/secret.ts +101 -0
  48. package/src/token.ts +29 -0
  49. package/src/types.ts +1072 -0
  50. package/src/volume.ts +124 -0
package/src/types.ts ADDED
@@ -0,0 +1,1072 @@
1
+ // Generated types from Fly Machines OpenAPI spec.
2
+ // Originally produced by swagger-typescript-api from supabase/fly-admin.
3
+
4
+ export interface CheckStatus {
5
+ name?: string
6
+ output?: string
7
+ status?: string
8
+ updated_at?: string
9
+ }
10
+
11
+ export interface CreateMachineRequest {
12
+ config?: ApiMachineConfig
13
+ lease_ttl?: number
14
+ lsvd?: boolean
15
+ min_secrets_version?: number
16
+ name?: string
17
+ region?: string
18
+ skip_launch?: boolean
19
+ skip_secrets?: boolean
20
+ skip_service_registration?: boolean
21
+ }
22
+
23
+ export interface CreateVolumeRequest {
24
+ /** enable scheduled automatic snapshots. Defaults to `true` */
25
+ auto_backup_enabled?: boolean
26
+ compute?: ApiMachineGuest
27
+ compute_image?: string
28
+ encrypted?: boolean
29
+ fstype?: string
30
+ name?: string
31
+ region?: string
32
+ require_unique_zone?: boolean
33
+ size_gb?: number
34
+ /** restore from snapshot */
35
+ snapshot_id?: string
36
+ snapshot_retention?: number
37
+ /** fork from remote volume */
38
+ source_volume_id?: string
39
+ unique_zone_app_wide?: boolean
40
+ }
41
+
42
+ export interface ErrorResponse {
43
+ details?: unknown
44
+ error?: string
45
+ status?: MainStatusCode
46
+ }
47
+
48
+ export interface ExtendVolumeRequest {
49
+ size_gb?: number
50
+ }
51
+
52
+ export interface ExtendVolumeResponse {
53
+ needs_restart?: boolean
54
+ volume?: Volume
55
+ }
56
+
57
+ export interface ImageRef {
58
+ digest?: string
59
+ labels?: Record<string, string>
60
+ registry?: string
61
+ repository?: string
62
+ tag?: string
63
+ }
64
+
65
+ export interface Lease {
66
+ description?: string
67
+ expires_at?: number
68
+ nonce?: string
69
+ owner?: string
70
+ version?: string
71
+ }
72
+
73
+ export interface Machine {
74
+ checks?: CheckStatus[]
75
+ config?: ApiMachineConfig
76
+ created_at?: string
77
+ events?: MachineEvent[]
78
+ host_status?: 'ok' | 'unknown' | 'unreachable'
79
+ id?: string
80
+ image_ref?: ImageRef
81
+ incomplete_config?: ApiMachineConfig
82
+ instance_id?: string
83
+ name?: string
84
+ nonce?: string
85
+ private_ip?: string
86
+ region?: string
87
+ state?: string
88
+ updated_at?: string
89
+ }
90
+
91
+ export interface MachineEvent {
92
+ id?: string
93
+ request?: unknown
94
+ source?: string
95
+ status?: string
96
+ timestamp?: number
97
+ type?: string
98
+ }
99
+
100
+ export interface MachineExecRequest {
101
+ /** @deprecated use command instead */
102
+ cmd?: string
103
+ command?: string[]
104
+ timeout?: number
105
+ container?: string
106
+ stdin?: string
107
+ }
108
+
109
+ export interface MachineExecResponse {
110
+ exit_code?: number
111
+ exit_signal?: number
112
+ stderr?: string
113
+ stdout?: string
114
+ }
115
+
116
+ export interface MachineVersion {
117
+ user_config?: ApiMachineConfig
118
+ version?: string
119
+ }
120
+
121
+ export interface Organization {
122
+ name?: string
123
+ slug?: string
124
+ }
125
+
126
+ export interface ProcessStat {
127
+ command?: string
128
+ cpu?: number
129
+ directory?: string
130
+ listen_sockets?: ListenSocket[]
131
+ pid?: number
132
+ rss?: number
133
+ rtime?: number
134
+ stime?: number
135
+ }
136
+
137
+ export interface ListenSocket {
138
+ address?: string
139
+ proto?: string
140
+ }
141
+
142
+ export interface SignalRequest {
143
+ signal?: SignalRequestSignalEnum
144
+ }
145
+
146
+ export interface StopRequest {
147
+ signal?: string
148
+ timeout?: ApiDuration
149
+ }
150
+
151
+ export interface UpdateMachineRequest {
152
+ config?: ApiMachineConfig
153
+ current_version?: string
154
+ lease_ttl?: number
155
+ lsvd?: boolean
156
+ min_secrets_version?: number
157
+ name?: string
158
+ region?: string
159
+ skip_launch?: boolean
160
+ skip_secrets?: boolean
161
+ skip_service_registration?: boolean
162
+ }
163
+
164
+ export interface UpdateVolumeRequest {
165
+ auto_backup_enabled?: boolean
166
+ snapshot_retention?: number
167
+ }
168
+
169
+ export interface Volume {
170
+ attached_alloc_id?: string
171
+ attached_machine_id?: string
172
+ auto_backup_enabled?: boolean
173
+ block_size?: number
174
+ blocks?: number
175
+ blocks_avail?: number
176
+ blocks_free?: number
177
+ bytes_total?: number
178
+ bytes_used?: number
179
+ created_at?: string
180
+ encrypted?: boolean
181
+ fstype?: string
182
+ host_status?: 'ok' | 'unknown' | 'unreachable'
183
+ id?: string
184
+ name?: string
185
+ region?: string
186
+ size_gb?: number
187
+ snapshot_retention?: number
188
+ state?: string
189
+ zone?: string
190
+ }
191
+
192
+ export interface VolumeSnapshot {
193
+ created_at?: string
194
+ digest?: string
195
+ id?: string
196
+ retention_days?: number
197
+ size?: number
198
+ status?: string
199
+ volume_size?: number
200
+ }
201
+
202
+ export interface ApiDNSConfig {
203
+ dns_forward_rules?: ApiDNSForwardRule[]
204
+ hostname?: string
205
+ hostname_fqdn?: string
206
+ nameservers?: string[]
207
+ options?: ApiDNSOption[]
208
+ searches?: string[]
209
+ skip_registration?: boolean
210
+ }
211
+
212
+ export interface ApiDNSForwardRule {
213
+ addr?: string
214
+ basename?: string
215
+ }
216
+
217
+ export interface ApiDNSOption {
218
+ name?: string
219
+ value?: string
220
+ }
221
+
222
+ export interface ApiFile {
223
+ guest_path?: string
224
+ image_config?: string
225
+ mode?: number
226
+ raw_value?: string
227
+ secret_name?: string
228
+ }
229
+
230
+ export interface ApiHTTPOptions {
231
+ compress?: boolean
232
+ h2_backend?: boolean
233
+ headers_read_timeout?: number
234
+ idle_timeout?: number
235
+ replay_cache?: ApiReplayCache[]
236
+ response?: ApiHTTPResponseOptions
237
+ }
238
+
239
+ export interface ApiReplayCache {
240
+ allow_bypass?: boolean
241
+ /** Name of the cookie or header to key the cache on */
242
+ name?: string
243
+ path_prefix?: string
244
+ ttl_seconds?: number
245
+ type?: 'cookie' | 'header'
246
+ }
247
+
248
+ export interface ApiHTTPResponseOptions {
249
+ headers?: Record<string, unknown>
250
+ pristine?: boolean
251
+ }
252
+
253
+ export interface ApiMachineCheck {
254
+ grace_period?: string
255
+ headers?: ApiMachineHTTPHeader[]
256
+ interval?: string
257
+ kind?: 'informational' | 'readiness'
258
+ method?: string
259
+ path?: string
260
+ port?: number
261
+ protocol?: string
262
+ timeout?: string
263
+ tls_server_name?: string
264
+ tls_skip_verify?: boolean
265
+ type?: string
266
+ }
267
+
268
+ export interface ApiMachineConfig {
269
+ auto_destroy?: boolean
270
+ checks?: Record<string, ApiMachineCheck>
271
+ containers?: ApiContainerConfig[]
272
+ /** @deprecated use Service.Autostart instead */
273
+ disable_machine_autostart?: boolean
274
+ dns?: ApiDNSConfig
275
+ env?: Record<string, string>
276
+ files?: ApiFile[]
277
+ guest?: ApiMachineGuest
278
+ image?: string
279
+ init?: ApiMachineInit
280
+ metadata?: Record<string, string>
281
+ metrics?: ApiMachineMetrics
282
+ mounts?: ApiMachineMount[]
283
+ processes?: ApiMachineProcess[]
284
+ restart?: ApiMachineRestart
285
+ rootfs?: ApiMachineRootfs
286
+ schedule?: string
287
+ services?: ApiMachineService[]
288
+ /** @deprecated use Guest instead */
289
+ size?: string
290
+ standbys?: string[]
291
+ statics?: ApiStatic[]
292
+ stop_config?: ApiStopConfig
293
+ }
294
+
295
+ export interface ApiMachineGuest {
296
+ cpu_kind?: string
297
+ cpus?: number
298
+ gpu_kind?: string
299
+ gpus?: number
300
+ host_dedication_id?: string
301
+ kernel_args?: string[]
302
+ memory_mb?: number
303
+ /** @deprecated use MachineConfig.Rootfs instead */
304
+ persist_rootfs?: 'never' | 'always' | 'restart'
305
+ }
306
+
307
+ export interface ApiMachineHTTPHeader {
308
+ name?: string
309
+ values?: string[]
310
+ }
311
+
312
+ export interface ApiMachineInit {
313
+ cmd?: string[]
314
+ entrypoint?: string[]
315
+ exec?: string[]
316
+ kernel_args?: string[]
317
+ swap_size_mb?: number
318
+ tty?: boolean
319
+ }
320
+
321
+ export interface ApiMachineMetrics {
322
+ https?: boolean
323
+ path?: string
324
+ port?: number
325
+ }
326
+
327
+ export interface ApiMachineMount {
328
+ add_size_gb?: number
329
+ encrypted?: boolean
330
+ extend_threshold_percent?: number
331
+ name?: string
332
+ path?: string
333
+ size_gb?: number
334
+ size_gb_limit?: number
335
+ volume?: string
336
+ }
337
+
338
+ export interface ApiMachinePort {
339
+ end_port?: number
340
+ force_https?: boolean
341
+ handlers?: string[]
342
+ http_options?: ApiHTTPOptions
343
+ port?: number
344
+ proxy_proto_options?: ApiProxyProtoOptions
345
+ start_port?: number
346
+ tls_options?: ApiTLSOptions
347
+ }
348
+
349
+ export interface ApiMachineProcess {
350
+ cmd?: string[]
351
+ entrypoint?: string[]
352
+ env?: Record<string, string>
353
+ env_from?: ApiEnvFrom[]
354
+ exec?: string[]
355
+ ignore_app_secrets?: boolean
356
+ secrets?: ApiMachineSecret[]
357
+ user?: string
358
+ }
359
+
360
+ export interface ApiMachineRestart {
361
+ gpu_bid_price?: number
362
+ max_retries?: number
363
+ policy?: ApiMachineRestartPolicyEnum
364
+ }
365
+
366
+ export interface ApiMachineService {
367
+ autostart?: boolean
368
+ /** "off"|"stop"|"suspend" (string) or boolean for backward compat */
369
+ autostop?: 'off' | 'stop' | 'suspend' | boolean
370
+ checks?: ApiMachineServiceCheck[]
371
+ concurrency?: ApiMachineServiceConcurrency
372
+ force_instance_description?: string
373
+ force_instance_key?: string
374
+ internal_port?: number
375
+ min_machines_running?: number
376
+ ports?: ApiMachinePort[]
377
+ protocol?: string
378
+ }
379
+
380
+ export interface ApiMachineServiceConcurrency {
381
+ hard_limit?: number
382
+ soft_limit?: number
383
+ type?: string
384
+ }
385
+
386
+ export interface ApiProxyProtoOptions {
387
+ version?: string
388
+ }
389
+
390
+ export interface ApiStatic {
391
+ guest_path: string
392
+ index_document?: string
393
+ tigris_bucket?: string
394
+ url_prefix: string
395
+ }
396
+
397
+ export interface ApiStopConfig {
398
+ signal?: string
399
+ timeout?: string
400
+ }
401
+
402
+ export interface ApiTLSOptions {
403
+ alpn?: string[]
404
+ default_self_signed?: boolean
405
+ versions?: string[]
406
+ }
407
+
408
+ /** Go time.Duration represented as an integer (nanoseconds) */
409
+ export interface ApiDuration {
410
+ 'time.Duration'?: number
411
+ }
412
+
413
+ export interface ApiMachineRootfs {
414
+ fs_size_gb?: number
415
+ persist?: 'never' | 'always' | 'restart'
416
+ size_gb?: number
417
+ }
418
+
419
+ export interface ApiMachineSecret {
420
+ env_var?: string
421
+ name?: string
422
+ }
423
+
424
+ export interface ApiEnvFrom {
425
+ env_var?: string
426
+ field_ref?: 'id' | 'version' | 'app_name' | 'private_ip' | 'region' | 'image'
427
+ }
428
+
429
+ export interface ApiContainerConfig {
430
+ cmd?: string[]
431
+ depends_on?: ApiContainerDependency[]
432
+ entrypoint?: string[]
433
+ env?: Record<string, string>
434
+ env_from?: ApiEnvFrom[]
435
+ exec?: string[]
436
+ files?: ApiFile[]
437
+ healthchecks?: ApiContainerHealthcheck[]
438
+ image?: string
439
+ name?: string
440
+ restart?: ApiMachineRestart
441
+ secrets?: ApiMachineSecret[]
442
+ stop?: ApiStopConfig
443
+ user?: string
444
+ }
445
+
446
+ export interface ApiContainerDependency {
447
+ condition?: ApiContainerDependencyCondition
448
+ name?: string
449
+ }
450
+
451
+ export type ApiContainerDependencyCondition = 'exited_successfully' | 'healthy' | 'started'
452
+
453
+ export interface ApiContainerHealthcheck {
454
+ exec?: ApiExecHealthcheck
455
+ failure_threshold?: number
456
+ grace_period?: number
457
+ http?: ApiHTTPHealthcheck
458
+ interval?: number
459
+ kind?: ApiContainerHealthcheckKind
460
+ name?: string
461
+ success_threshold?: number
462
+ tcp?: ApiTCPHealthcheck
463
+ timeout?: number
464
+ unhealthy?: ApiUnhealthyPolicy
465
+ }
466
+
467
+ export type ApiContainerHealthcheckKind = 'readiness' | 'liveness'
468
+
469
+ export type ApiContainerHealthcheckScheme = 'http' | 'https'
470
+
471
+ export type ApiUnhealthyPolicy = 'stop'
472
+
473
+ export interface ApiExecHealthcheck {
474
+ command?: string[]
475
+ }
476
+
477
+ export interface ApiHTTPHealthcheck {
478
+ headers?: ApiMachineHTTPHeader[]
479
+ method?: string
480
+ path?: string
481
+ port?: number
482
+ scheme?: ApiContainerHealthcheckScheme
483
+ tls_server_name?: string
484
+ tls_skip_verify?: boolean
485
+ }
486
+
487
+ export interface ApiTCPHealthcheck {
488
+ port?: number
489
+ }
490
+
491
+ export interface ApiMachineServiceCheck {
492
+ grace_period?: string
493
+ headers?: ApiMachineHTTPHeader[]
494
+ interval?: string
495
+ method?: string
496
+ path?: string
497
+ port?: number
498
+ protocol?: string
499
+ timeout?: string
500
+ tls_server_name?: string
501
+ tls_skip_verify?: boolean
502
+ type?: string
503
+ }
504
+
505
+ export interface WaitMachineResponse {
506
+ event_id?: string
507
+ ok?: boolean
508
+ state?: string
509
+ version?: string
510
+ }
511
+
512
+ export interface OrgMachine {
513
+ app_id?: number
514
+ app_name?: string
515
+ created_at?: string
516
+ id?: string
517
+ instance_id?: string
518
+ name?: string
519
+ private_ip?: string
520
+ region?: string
521
+ state?: string
522
+ updated_at?: string
523
+ }
524
+
525
+ export interface OrgMachinesResponse {
526
+ last_machine_id?: string
527
+ last_updated_at?: string
528
+ machines?: OrgMachine[]
529
+ next_cursor?: string
530
+ }
531
+
532
+ export interface AcmeChallenge {
533
+ name?: string
534
+ target?: string
535
+ }
536
+
537
+ export interface App {
538
+ id?: string
539
+ internal_numeric_id?: number
540
+ machine_count?: number
541
+ name?: string
542
+ network?: string
543
+ organization?: AppOrganizationInfo
544
+ status?: string
545
+ volume_count?: number
546
+ }
547
+
548
+ export interface AppOrganizationInfo {
549
+ internal_numeric_id?: number
550
+ name?: string
551
+ slug?: string
552
+ }
553
+
554
+ export interface AppSecret {
555
+ created_at?: string
556
+ digest?: string
557
+ name?: string
558
+ updated_at?: string
559
+ value?: string
560
+ }
561
+
562
+ export interface AppSecrets {
563
+ secrets?: AppSecret[]
564
+ }
565
+
566
+ export interface AppSecretsUpdateRequest {
567
+ values?: Record<string, string>
568
+ }
569
+
570
+ export interface AppSecretsUpdateResp {
571
+ /** DEPRECATED */
572
+ Version?: number
573
+ secrets?: AppSecret[]
574
+ version?: number
575
+ }
576
+
577
+ export interface CertificateCheckResponse {
578
+ acme_requested?: boolean
579
+ certificates?: CertificateEntry[]
580
+ configured?: boolean
581
+ dns_provider?: string
582
+ dns_records?: DNSRecords
583
+ dns_requirements?: DNSRequirements
584
+ hostname?: string
585
+ rate_limited_until?: string
586
+ status?: string
587
+ validation?: CertificateValidation
588
+ validation_errors?: CertificateValidationError[]
589
+ }
590
+
591
+ export interface CertificateDetail {
592
+ acme_requested?: boolean
593
+ certificates?: CertificateEntry[]
594
+ configured?: boolean
595
+ dns_provider?: string
596
+ dns_requirements?: DNSRequirements
597
+ hostname?: string
598
+ rate_limited_until?: string
599
+ status?: string
600
+ validation?: CertificateValidation
601
+ validation_errors?: CertificateValidationError[]
602
+ }
603
+
604
+ export interface CertificateEntry {
605
+ created_at?: string
606
+ expires_at?: string
607
+ issued?: IssuedCertificate[]
608
+ issuer?: string
609
+ source?: 'custom' | 'fly'
610
+ status?: 'active' | 'pending_ownership' | 'pending_validation'
611
+ }
612
+
613
+ export interface CertificateSummary {
614
+ acme_alpn_configured?: boolean
615
+ acme_dns_configured?: boolean
616
+ acme_http_configured?: boolean
617
+ acme_requested?: boolean
618
+ configured?: boolean
619
+ created_at?: string
620
+ dns_provider?: string
621
+ has_custom_certificate?: boolean
622
+ has_fly_certificate?: boolean
623
+ hostname?: string
624
+ ownership_txt_configured?: boolean
625
+ status?: string
626
+ updated_at?: string
627
+ }
628
+
629
+ export interface CertificateValidation {
630
+ alpn_configured?: boolean
631
+ dns_configured?: boolean
632
+ http_configured?: boolean
633
+ ownership_txt_configured?: boolean
634
+ }
635
+
636
+ export interface CertificateValidationError {
637
+ code?: string
638
+ message?: string
639
+ remediation?: string
640
+ timestamp?: string
641
+ }
642
+
643
+ export interface CreateAcmeCertificateRequest {
644
+ hostname?: string
645
+ }
646
+
647
+ export interface CreateCustomCertificateRequest {
648
+ cert?: string
649
+ hostname?: string
650
+ key?: string
651
+ }
652
+
653
+ export interface CreateAppDeployTokenRequest {
654
+ expiry?: string
655
+ }
656
+
657
+ export interface CreateAppRequest {
658
+ enable_subdomains?: boolean
659
+ name?: string
660
+ network?: string
661
+ org_slug?: string
662
+ }
663
+
664
+ export interface CreateAppResponse {
665
+ token?: string
666
+ }
667
+
668
+ export interface CreateLeaseRequest {
669
+ description?: string
670
+ /** seconds lease will be valid */
671
+ ttl?: number
672
+ }
673
+
674
+ export interface CreateOIDCTokenRequest {
675
+ aud?: string
676
+ aws_principal_tags?: boolean
677
+ }
678
+
679
+ export interface CurrentTokenResponse {
680
+ tokens?: MainTokenInfo[]
681
+ }
682
+
683
+ export interface DNSRecords {
684
+ a?: string[]
685
+ aaaa?: string[]
686
+ acme_challenge_cname?: string
687
+ cname?: string[]
688
+ ownership_txt?: string
689
+ resolved_addresses?: string[]
690
+ soa?: string
691
+ }
692
+
693
+ export interface DNSRequirements {
694
+ a?: string[]
695
+ aaaa?: string[]
696
+ acme_challenge?: AcmeChallenge
697
+ cname?: string
698
+ ownership?: OwnershipVerification
699
+ }
700
+
701
+ export interface DecryptSecretkeyRequest {
702
+ associated_data?: number[]
703
+ ciphertext?: number[]
704
+ }
705
+
706
+ export interface DecryptSecretkeyResponse {
707
+ plaintext?: number[]
708
+ }
709
+
710
+ export interface DeleteAppSecretResponse {
711
+ /** DEPRECATED */
712
+ Version?: number
713
+ version?: number
714
+ }
715
+
716
+ export interface DeleteSecretkeyResponse {
717
+ /** DEPRECATED */
718
+ Version?: number
719
+ version?: number
720
+ }
721
+
722
+ export interface DestroyCustomCertificateResponse {
723
+ acme_requested?: boolean
724
+ certificates?: CertificateEntry[]
725
+ configured?: boolean
726
+ dns_provider?: string
727
+ dns_requirements?: DNSRequirements
728
+ hostname?: string
729
+ rate_limited_until?: string
730
+ status?: string
731
+ validation?: CertificateValidation
732
+ validation_errors?: CertificateValidationError[]
733
+ }
734
+
735
+ export interface EncryptSecretkeyRequest {
736
+ associated_data?: number[]
737
+ plaintext?: number[]
738
+ }
739
+
740
+ export interface EncryptSecretkeyResponse {
741
+ ciphertext?: number[]
742
+ }
743
+
744
+ export interface IPAssignment {
745
+ created_at?: string
746
+ ip?: string
747
+ region?: string
748
+ service_name?: string
749
+ shared?: boolean
750
+ }
751
+
752
+ export interface IssuedCertificate {
753
+ certificate_authority?: string
754
+ expires_at?: string
755
+ type?: 'rsa' | 'ecdsa'
756
+ }
757
+
758
+ export interface ListAppsResponse {
759
+ apps?: App[]
760
+ total_apps?: number
761
+ }
762
+
763
+ export interface ListCertificatesResponse {
764
+ certificates?: CertificateSummary[]
765
+ next_cursor?: string
766
+ total_count?: number
767
+ }
768
+
769
+ export interface ListIPAssignmentsResponse {
770
+ ips?: IPAssignment[]
771
+ }
772
+
773
+ export interface MainGetPlacementsRequest {
774
+ compute?: ApiMachineGuest
775
+ count?: number
776
+ org_slug: string
777
+ region?: string
778
+ volume_name?: string
779
+ volume_size_bytes?: number
780
+ weights?: PlacementWeights
781
+ }
782
+
783
+ export interface MainGetPlacementsResponse {
784
+ regions?: PlacementRegionPlacement[]
785
+ }
786
+
787
+ export interface MainRegionResponse {
788
+ nearest?: string
789
+ regions?: ReadsGetCapacityPerRegionRow[]
790
+ }
791
+
792
+ export interface MainTokenInfo {
793
+ apps?: string[]
794
+ org_slug?: string
795
+ organization?: string
796
+ /** Machine the token is restricted to (FromMachine caveat) */
797
+ restricted_to_machine?: string
798
+ /** Machine making the request */
799
+ source_machine_id?: string
800
+ token_id?: string
801
+ /** User identifier if token is for a user */
802
+ user?: string
803
+ }
804
+
805
+ export interface MetadataValueResponse {
806
+ value?: string
807
+ }
808
+
809
+ export interface OwnershipVerification {
810
+ app_value?: string
811
+ name?: string
812
+ org_value?: string
813
+ }
814
+
815
+ export interface PlacementRegionPlacement {
816
+ concurrency?: number
817
+ count?: number
818
+ region?: string
819
+ }
820
+
821
+ export type PlacementWeights = Record<string, number>
822
+
823
+ export interface ReadsGetCapacityPerRegionRow {
824
+ capacity?: number
825
+ code?: string
826
+ deprecated?: boolean
827
+ gateway_available?: boolean
828
+ geo_region?: string
829
+ latitude?: number
830
+ longitude?: number
831
+ name?: string
832
+ requires_paid_plan?: boolean
833
+ }
834
+
835
+ export interface SecretKey {
836
+ created_at?: string
837
+ name?: string
838
+ public_key?: number[]
839
+ type?: string
840
+ updated_at?: string
841
+ }
842
+
843
+ export interface SecretKeys {
844
+ secret_keys?: SecretKey[]
845
+ }
846
+
847
+ export interface SetAppSecretRequest {
848
+ value?: string
849
+ }
850
+
851
+ export interface SetAppSecretResponse {
852
+ /** DEPRECATED */
853
+ Version?: number
854
+ created_at?: string
855
+ digest?: string
856
+ name?: string
857
+ updated_at?: string
858
+ value?: string
859
+ version?: number
860
+ }
861
+
862
+ export interface SetSecretkeyRequest {
863
+ type?: string
864
+ value?: number[]
865
+ }
866
+
867
+ export interface SetSecretkeyResponse {
868
+ /** DEPRECATED */
869
+ Version?: number
870
+ created_at?: string
871
+ name?: string
872
+ public_key?: number[]
873
+ type?: string
874
+ updated_at?: string
875
+ version?: number
876
+ }
877
+
878
+ export interface SignSecretkeyRequest {
879
+ plaintext?: number[]
880
+ }
881
+
882
+ export interface SignSecretkeyResponse {
883
+ signature?: number[]
884
+ }
885
+
886
+ export interface UpdateMetadataRequestBody {
887
+ machine_version?: string
888
+ metadata?: Record<string, string>
889
+ updated_at?: string
890
+ }
891
+
892
+ export interface UpsertMetadataKeyRequest {
893
+ updated_at?: string
894
+ value?: string
895
+ }
896
+
897
+ export interface VerifySecretkeyRequest {
898
+ plaintext?: number[]
899
+ signature?: number[]
900
+ }
901
+
902
+ // OpenAPI lowercase schema-name aliases.
903
+ export type createAcmeCertificateRequest = CreateAcmeCertificateRequest
904
+ export type createCustomCertificateRequest = CreateCustomCertificateRequest
905
+ export type destroyCustomCertificateResponse = DestroyCustomCertificateResponse
906
+ export type listCertificatesResponse = ListCertificatesResponse
907
+ export type listIPAssignmentsResponse = ListIPAssignmentsResponse
908
+ export type metadataValueResponse = MetadataValueResponse
909
+ export type updateMetadataRequest = UpdateMetadataRequestBody
910
+ export type upsertMetadataKeyRequest = UpsertMetadataKeyRequest
911
+ export interface assignIPRequest {
912
+ region?: string
913
+ service_name?: string
914
+ type?: string
915
+ }
916
+
917
+ // OpenAPI schema aliases where schema names include dots.
918
+ export type FlyContainerConfig = ApiContainerConfig
919
+ export type FlyContainerDependency = ApiContainerDependency
920
+ export type FlyContainerDependencyCondition = ApiContainerDependencyCondition
921
+ export type FlyContainerHealthcheck = ApiContainerHealthcheck
922
+ export type FlyContainerHealthcheckKind = ApiContainerHealthcheckKind
923
+ export type FlyContainerHealthcheckScheme = ApiContainerHealthcheckScheme
924
+ export type FlyDNSConfig = ApiDNSConfig
925
+ export type FlyDuration = ApiDuration
926
+ export type FlyEnvFrom = ApiEnvFrom
927
+ export type FlyExecHealthcheck = ApiExecHealthcheck
928
+ export type FlyFile = ApiFile
929
+ export type FlyHTTPHealthcheck = ApiHTTPHealthcheck
930
+ export type FlyHTTPOptions = ApiHTTPOptions
931
+ export type FlyHTTPResponseOptions = ApiHTTPResponseOptions
932
+ export type FlyMachineCheck = ApiMachineCheck
933
+ export type FlyMachineConfig = ApiMachineConfig
934
+ export type FlyMachineGuest = ApiMachineGuest
935
+ export type FlyMachineHTTPHeader = ApiMachineHTTPHeader
936
+ export type FlyMachineInit = ApiMachineInit
937
+ export type FlyMachineMetrics = ApiMachineMetrics
938
+ export type FlyMachineMount = ApiMachineMount
939
+ export type FlyMachinePort = ApiMachinePort
940
+ export type FlyMachineProcess = ApiMachineProcess
941
+ export type FlyMachineRestart = ApiMachineRestart
942
+ export type FlyMachineRootfs = ApiMachineRootfs
943
+ export type FlyMachineSecret = ApiMachineSecret
944
+ export type FlyMachineService = ApiMachineService
945
+ export type FlyMachineServiceCheck = ApiMachineServiceCheck
946
+ export type FlyMachineServiceConcurrency = ApiMachineServiceConcurrency
947
+ export type FlyProxyProtoOptions = ApiProxyProtoOptions
948
+ export type FlyReplayCache = ApiReplayCache
949
+ export type FlyStatic = ApiStatic
950
+ export type FlyStopConfig = ApiStopConfig
951
+ export type FlyTCPHealthcheck = ApiTCPHealthcheck
952
+ export type FlyTLSOptions = ApiTLSOptions
953
+ export type FlyUnhealthyPolicy = ApiUnhealthyPolicy
954
+ export type FlyDNSForwardRule = ApiDNSForwardRule
955
+ export type FlyDNSOption = ApiDNSOption
956
+ export type Flydv1ExecResponse = MachineExecResponse
957
+ export type MainMemoryResponse = MemoryResponse
958
+ export type MainReclaimMemoryRequest = ReclaimMemoryRequest
959
+ export type MainReclaimMemoryResponse = ReclaimMemoryResponse
960
+ export type MainSetMemoryLimitRequest = SetMemoryLimitRequest
961
+
962
+ // OpenAPI component schema name map for schemas with non-identifier names.
963
+ export interface OpenApiComponentSchemaMap {
964
+ 'fly.ContainerConfig': FlyContainerConfig
965
+ 'fly.ContainerDependency': FlyContainerDependency
966
+ 'fly.ContainerDependencyCondition': FlyContainerDependencyCondition
967
+ 'fly.ContainerHealthcheck': FlyContainerHealthcheck
968
+ 'fly.ContainerHealthcheckKind': FlyContainerHealthcheckKind
969
+ 'fly.ContainerHealthcheckScheme': FlyContainerHealthcheckScheme
970
+ 'fly.DNSConfig': FlyDNSConfig
971
+ 'fly.Duration': FlyDuration
972
+ 'fly.EnvFrom': FlyEnvFrom
973
+ 'fly.ExecHealthcheck': FlyExecHealthcheck
974
+ 'fly.File': FlyFile
975
+ 'fly.HTTPHealthcheck': FlyHTTPHealthcheck
976
+ 'fly.HTTPOptions': FlyHTTPOptions
977
+ 'fly.HTTPResponseOptions': FlyHTTPResponseOptions
978
+ 'fly.MachineCheck': FlyMachineCheck
979
+ 'fly.MachineConfig': FlyMachineConfig
980
+ 'fly.MachineGuest': FlyMachineGuest
981
+ 'fly.MachineHTTPHeader': FlyMachineHTTPHeader
982
+ 'fly.MachineInit': FlyMachineInit
983
+ 'fly.MachineMetrics': FlyMachineMetrics
984
+ 'fly.MachineMount': FlyMachineMount
985
+ 'fly.MachinePort': FlyMachinePort
986
+ 'fly.MachineProcess': FlyMachineProcess
987
+ 'fly.MachineRestart': FlyMachineRestart
988
+ 'fly.MachineRootfs': FlyMachineRootfs
989
+ 'fly.MachineSecret': FlyMachineSecret
990
+ 'fly.MachineService': FlyMachineService
991
+ 'fly.MachineServiceCheck': FlyMachineServiceCheck
992
+ 'fly.MachineServiceConcurrency': FlyMachineServiceConcurrency
993
+ 'fly.ProxyProtoOptions': FlyProxyProtoOptions
994
+ 'fly.ReplayCache': FlyReplayCache
995
+ 'fly.Static': FlyStatic
996
+ 'fly.StopConfig': FlyStopConfig
997
+ 'fly.TCPHealthcheck': FlyTCPHealthcheck
998
+ 'fly.TLSOptions': FlyTLSOptions
999
+ 'fly.UnhealthyPolicy': FlyUnhealthyPolicy
1000
+ 'fly.dnsForwardRule': FlyDNSForwardRule
1001
+ 'fly.dnsOption': FlyDNSOption
1002
+ 'flydv1.ExecResponse': Flydv1ExecResponse
1003
+ 'main.getPlacementsRequest': MainGetPlacementsRequest
1004
+ 'main.getPlacementsResponse': MainGetPlacementsResponse
1005
+ 'main.memoryResponse': MainMemoryResponse
1006
+ 'main.reclaimMemoryRequest': MainReclaimMemoryRequest
1007
+ 'main.reclaimMemoryResponse': MainReclaimMemoryResponse
1008
+ 'main.regionResponse': MainRegionResponse
1009
+ 'main.setMemoryLimitRequest': MainSetMemoryLimitRequest
1010
+ 'main.statusCode': MainStatusCode
1011
+ 'main.tokenInfo': MainTokenInfo
1012
+ 'placement.RegionPlacement': PlacementRegionPlacement
1013
+ 'placement.Weights': PlacementWeights
1014
+ 'reads.GetCapacityPerRegionRow': ReadsGetCapacityPerRegionRow
1015
+ }
1016
+
1017
+ export enum MainStatusCode {
1018
+ Unknown = 'unknown',
1019
+ CapacityErr = 'insufficient_capacity',
1020
+ }
1021
+
1022
+ export enum SignalRequestSignalEnum {
1023
+ SIGABRT = 'SIGABRT',
1024
+ SIGALRM = 'SIGALRM',
1025
+ SIGFPE = 'SIGFPE',
1026
+ SIGHUP = 'SIGHUP',
1027
+ SIGILL = 'SIGILL',
1028
+ SIGINT = 'SIGINT',
1029
+ SIGKILL = 'SIGKILL',
1030
+ SIGPIPE = 'SIGPIPE',
1031
+ SIGQUIT = 'SIGQUIT',
1032
+ SIGSEGV = 'SIGSEGV',
1033
+ SIGTERM = 'SIGTERM',
1034
+ SIGTRAP = 'SIGTRAP',
1035
+ SIGUSR1 = 'SIGUSR1',
1036
+ }
1037
+
1038
+ export enum ApiMachineRestartPolicyEnum {
1039
+ No = 'no',
1040
+ Always = 'always',
1041
+ OnFailure = 'on-failure',
1042
+ SpotPrice = 'spot-price',
1043
+ }
1044
+
1045
+ export enum StateEnum {
1046
+ Created = 'created',
1047
+ Started = 'started',
1048
+ Stopped = 'stopped',
1049
+ Suspended = 'suspended',
1050
+ Destroyed = 'destroyed',
1051
+ Failed = 'failed',
1052
+ Settled = 'settled',
1053
+ }
1054
+
1055
+ // --- Memory types (from main.* schemas) ---
1056
+
1057
+ export interface MemoryResponse {
1058
+ available_mb?: number
1059
+ limit_mb?: number
1060
+ }
1061
+
1062
+ export interface SetMemoryLimitRequest {
1063
+ limit_mb?: number
1064
+ }
1065
+
1066
+ export interface ReclaimMemoryRequest {
1067
+ amount_mb?: number
1068
+ }
1069
+
1070
+ export interface ReclaimMemoryResponse {
1071
+ actual_mb?: number
1072
+ }