@townco/fly 0.1.2 → 0.1.4

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 (54) hide show
  1. package/dist/client/client.gen.d.ts +2 -0
  2. package/dist/client/client.gen.js +228 -0
  3. package/dist/client/index.d.ts +8 -0
  4. package/dist/client/index.js +6 -0
  5. package/dist/client/types.gen.d.ts +117 -0
  6. package/dist/client/types.gen.js +2 -0
  7. package/dist/client/utils.gen.d.ts +33 -0
  8. package/dist/client/utils.gen.js +231 -0
  9. package/{src/client.gen.ts → dist/client.gen.d.ts} +3 -16
  10. package/dist/client.gen.js +3 -0
  11. package/dist/core/auth.gen.d.ts +18 -0
  12. package/dist/core/auth.gen.js +14 -0
  13. package/dist/core/bodySerializer.gen.d.ts +25 -0
  14. package/dist/core/bodySerializer.gen.js +57 -0
  15. package/dist/core/params.gen.d.ts +43 -0
  16. package/dist/core/params.gen.js +100 -0
  17. package/dist/core/pathSerializer.gen.d.ts +33 -0
  18. package/dist/core/pathSerializer.gen.js +114 -0
  19. package/dist/core/queryKeySerializer.gen.d.ts +18 -0
  20. package/dist/core/queryKeySerializer.gen.js +99 -0
  21. package/dist/core/serverSentEvents.gen.d.ts +71 -0
  22. package/dist/core/serverSentEvents.gen.js +135 -0
  23. package/dist/core/types.gen.d.ts +78 -0
  24. package/dist/core/types.gen.js +2 -0
  25. package/dist/core/utils.gen.d.ts +19 -0
  26. package/dist/core/utils.gen.js +87 -0
  27. package/dist/hey-api.d.ts +2 -0
  28. package/dist/hey-api.js +6 -0
  29. package/dist/index.d.ts +2 -0
  30. package/{src/index.ts → dist/index.js} +0 -2
  31. package/dist/sdk.gen.d.ts +379 -0
  32. package/dist/sdk.gen.js +557 -0
  33. package/dist/types.gen.d.ts +2592 -0
  34. package/dist/types.gen.js +2 -0
  35. package/package.json +6 -3
  36. package/.envrc +0 -11
  37. package/openapi-ts.config.ts +0 -7
  38. package/spec.json +0 -5072
  39. package/src/client/client.gen.ts +0 -301
  40. package/src/client/index.ts +0 -25
  41. package/src/client/types.gen.ts +0 -241
  42. package/src/client/utils.gen.ts +0 -337
  43. package/src/core/auth.gen.ts +0 -42
  44. package/src/core/bodySerializer.gen.ts +0 -100
  45. package/src/core/params.gen.ts +0 -176
  46. package/src/core/pathSerializer.gen.ts +0 -181
  47. package/src/core/queryKeySerializer.gen.ts +0 -136
  48. package/src/core/serverSentEvents.gen.ts +0 -264
  49. package/src/core/types.gen.ts +0 -118
  50. package/src/core/utils.gen.ts +0 -143
  51. package/src/hey-api.ts +0 -8
  52. package/src/sdk.gen.ts +0 -1163
  53. package/src/types.gen.ts +0 -2974
  54. package/tsconfig.json +0 -11
package/src/sdk.gen.ts DELETED
@@ -1,1163 +0,0 @@
1
- // This file is auto-generated by @hey-api/openapi-ts
2
-
3
- import type { Client, Options as Options2, TDataShape } from "./client";
4
- import { client } from "./client.gen";
5
- import type {
6
- AppCreateDeployTokenData,
7
- AppCreateDeployTokenResponses,
8
- AppIpAssignmentsCreateData,
9
- AppIpAssignmentsCreateResponses,
10
- AppIpAssignmentsDeleteData,
11
- AppIpAssignmentsDeleteResponses,
12
- AppIpAssignmentsListData,
13
- AppIpAssignmentsListResponses,
14
- AppsCreateData,
15
- AppsCreateErrors,
16
- AppsCreateResponses,
17
- AppsDeleteData,
18
- AppsDeleteResponses,
19
- AppsListData,
20
- AppsListResponses,
21
- AppsShowData,
22
- AppsShowResponses,
23
- CreateVolumeSnapshotData,
24
- CreateVolumeSnapshotResponses,
25
- CurrentTokenShowData,
26
- CurrentTokenShowErrors,
27
- CurrentTokenShowResponses,
28
- MachinesCordonData,
29
- MachinesCordonResponses,
30
- MachinesCreateData,
31
- MachinesCreateLeaseData,
32
- MachinesCreateLeaseResponses,
33
- MachinesCreateResponses,
34
- MachinesDeleteData,
35
- MachinesDeleteMetadataData,
36
- MachinesDeleteMetadataResponses,
37
- MachinesDeleteResponses,
38
- MachinesExecData,
39
- MachinesExecErrors,
40
- MachinesExecResponses,
41
- MachinesListData,
42
- MachinesListEventsData,
43
- MachinesListEventsResponses,
44
- MachinesListProcessesData,
45
- MachinesListProcessesErrors,
46
- MachinesListProcessesResponses,
47
- MachinesListResponses,
48
- MachinesListVersionsData,
49
- MachinesListVersionsResponses,
50
- MachinesPatchMetadataData,
51
- MachinesPatchMetadataErrors,
52
- MachinesPatchMetadataResponses,
53
- MachinesReclaimMemoryData,
54
- MachinesReclaimMemoryResponses,
55
- MachinesReleaseLeaseData,
56
- MachinesReleaseLeaseResponses,
57
- MachinesRestartData,
58
- MachinesRestartErrors,
59
- MachinesRestartResponses,
60
- MachinesShowData,
61
- MachinesShowLeaseData,
62
- MachinesShowLeaseResponses,
63
- MachinesShowMetadataData,
64
- MachinesShowMetadataResponses,
65
- MachinesShowResponses,
66
- MachinesSignalData,
67
- MachinesSignalErrors,
68
- MachinesSignalResponses,
69
- MachinesStartData,
70
- MachinesStartResponses,
71
- MachinesStopData,
72
- MachinesStopErrors,
73
- MachinesStopResponses,
74
- MachinesSuspendData,
75
- MachinesSuspendResponses,
76
- MachinesUncordonData,
77
- MachinesUncordonResponses,
78
- MachinesUpdateData,
79
- MachinesUpdateErrors,
80
- MachinesUpdateMetadataData,
81
- MachinesUpdateMetadataErrors,
82
- MachinesUpdateMetadataResponses,
83
- MachinesUpdateResponses,
84
- MachinesWaitData,
85
- MachinesWaitErrors,
86
- MachinesWaitResponses,
87
- PlatformPlacementsPostData,
88
- PlatformPlacementsPostResponses,
89
- PlatformRegionsGetData,
90
- PlatformRegionsGetResponses,
91
- SecretCreateData,
92
- SecretCreateErrors,
93
- SecretCreateResponses,
94
- SecretDeleteData,
95
- SecretDeleteResponses,
96
- SecretGetData,
97
- SecretGetResponses,
98
- SecretkeyDecryptData,
99
- SecretkeyDecryptErrors,
100
- SecretkeyDecryptResponses,
101
- SecretkeyDeleteData,
102
- SecretkeyDeleteResponses,
103
- SecretkeyEncryptData,
104
- SecretkeyEncryptErrors,
105
- SecretkeyEncryptResponses,
106
- SecretkeyGenerateData,
107
- SecretkeyGenerateErrors,
108
- SecretkeyGenerateResponses,
109
- SecretkeyGetData,
110
- SecretkeyGetResponses,
111
- SecretkeySetData,
112
- SecretkeySetErrors,
113
- SecretkeySetResponses,
114
- SecretkeySignData,
115
- SecretkeySignErrors,
116
- SecretkeySignResponses,
117
- SecretkeysListData,
118
- SecretkeysListResponses,
119
- SecretkeyVerifyData,
120
- SecretkeyVerifyErrors,
121
- SecretkeyVerifyResponses,
122
- SecretsListData,
123
- SecretsListResponses,
124
- SecretsUpdateData,
125
- SecretsUpdateErrors,
126
- SecretsUpdateResponses,
127
- TokensRequestKmsData,
128
- TokensRequestKmsResponses,
129
- TokensRequestOidcData,
130
- TokensRequestOidcErrors,
131
- TokensRequestOidcResponses,
132
- VolumeDeleteData,
133
- VolumeDeleteResponses,
134
- VolumesCreateData,
135
- VolumesCreateResponses,
136
- VolumesExtendData,
137
- VolumesExtendResponses,
138
- VolumesGetByIdData,
139
- VolumesGetByIdResponses,
140
- VolumesListData,
141
- VolumesListResponses,
142
- VolumesListSnapshotsData,
143
- VolumesListSnapshotsResponses,
144
- VolumesUpdateData,
145
- VolumesUpdateErrors,
146
- VolumesUpdateResponses,
147
- } from "./types.gen";
148
-
149
- export type Options<
150
- TData extends TDataShape = TDataShape,
151
- ThrowOnError extends boolean = boolean,
152
- > = Options2<TData, ThrowOnError> & {
153
- /**
154
- * You can provide a client instance returned by `createClient()` instead of
155
- * individual options. This might be also useful if you want to implement a
156
- * custom client.
157
- */
158
- client?: Client;
159
- /**
160
- * You can pass arbitrary values through the `meta` object. This can be
161
- * used to access values that aren't defined as part of the SDK function.
162
- */
163
- meta?: Record<string, unknown>;
164
- };
165
-
166
- /**
167
- * List Apps
168
- *
169
- * List all apps with the ability to filter by organization slug.
170
- *
171
- */
172
- export const appsList = <ThrowOnError extends boolean = false>(
173
- options: Options<AppsListData, ThrowOnError>,
174
- ) =>
175
- (options.client ?? client).get<AppsListResponses, unknown, ThrowOnError>({
176
- url: "/apps",
177
- ...options,
178
- });
179
-
180
- /**
181
- * Create App
182
- *
183
- * Create an app with the specified details in the request body.
184
- *
185
- */
186
- export const appsCreate = <ThrowOnError extends boolean = false>(
187
- options: Options<AppsCreateData, ThrowOnError>,
188
- ) =>
189
- (options.client ?? client).post<
190
- AppsCreateResponses,
191
- AppsCreateErrors,
192
- ThrowOnError
193
- >({
194
- url: "/apps",
195
- ...options,
196
- headers: {
197
- "Content-Type": "application/json",
198
- ...options.headers,
199
- },
200
- });
201
-
202
- /**
203
- * Destroy App
204
- *
205
- * Delete an app by its name.
206
- *
207
- */
208
- export const appsDelete = <ThrowOnError extends boolean = false>(
209
- options: Options<AppsDeleteData, ThrowOnError>,
210
- ) =>
211
- (options.client ?? client).delete<AppsDeleteResponses, unknown, ThrowOnError>(
212
- { url: "/apps/{app_name}", ...options },
213
- );
214
-
215
- /**
216
- * Get App
217
- *
218
- * Retrieve details about a specific app by its name.
219
- *
220
- */
221
- export const appsShow = <ThrowOnError extends boolean = false>(
222
- options: Options<AppsShowData, ThrowOnError>,
223
- ) =>
224
- (options.client ?? client).get<AppsShowResponses, unknown, ThrowOnError>({
225
- url: "/apps/{app_name}",
226
- ...options,
227
- });
228
-
229
- /**
230
- * Create App deploy token
231
- */
232
- export const appCreateDeployToken = <ThrowOnError extends boolean = false>(
233
- options: Options<AppCreateDeployTokenData, ThrowOnError>,
234
- ) =>
235
- (options.client ?? client).post<
236
- AppCreateDeployTokenResponses,
237
- unknown,
238
- ThrowOnError
239
- >({
240
- url: "/apps/{app_name}/deploy_token",
241
- ...options,
242
- headers: {
243
- "Content-Type": "application/json",
244
- ...options.headers,
245
- },
246
- });
247
-
248
- /**
249
- * List IP assignments for app
250
- */
251
- export const appIpAssignmentsList = <ThrowOnError extends boolean = false>(
252
- options?: Options<AppIpAssignmentsListData, ThrowOnError>,
253
- ) =>
254
- (options?.client ?? client).get<
255
- AppIpAssignmentsListResponses,
256
- unknown,
257
- ThrowOnError
258
- >({ url: "/apps/{app_name}/ip_assignments", ...options });
259
-
260
- /**
261
- * Assign new IP address to app
262
- */
263
- export const appIpAssignmentsCreate = <ThrowOnError extends boolean = false>(
264
- options: Options<AppIpAssignmentsCreateData, ThrowOnError>,
265
- ) =>
266
- (options.client ?? client).post<
267
- AppIpAssignmentsCreateResponses,
268
- unknown,
269
- ThrowOnError
270
- >({
271
- url: "/apps/{app_name}/ip_assignments",
272
- ...options,
273
- headers: {
274
- "Content-Type": "application/json",
275
- ...options.headers,
276
- },
277
- });
278
-
279
- /**
280
- * Remove IP assignment from app
281
- */
282
- export const appIpAssignmentsDelete = <ThrowOnError extends boolean = false>(
283
- options?: Options<AppIpAssignmentsDeleteData, ThrowOnError>,
284
- ) =>
285
- (options?.client ?? client).delete<
286
- AppIpAssignmentsDeleteResponses,
287
- unknown,
288
- ThrowOnError
289
- >({ url: "/apps/{app_name}/ip_assignments/{ip}", ...options });
290
-
291
- /**
292
- * List Machines
293
- *
294
- * List all Machines associated with a specific app, with optional filters for including deleted Machines and filtering by region.
295
- *
296
- */
297
- export const machinesList = <ThrowOnError extends boolean = false>(
298
- options: Options<MachinesListData, ThrowOnError>,
299
- ) =>
300
- (options.client ?? client).get<MachinesListResponses, unknown, ThrowOnError>({
301
- url: "/apps/{app_name}/machines",
302
- ...options,
303
- });
304
-
305
- /**
306
- * Create Machine
307
- *
308
- * Create a Machine within a specific app using the details provided in the request body.
309
- *
310
- * **Important**: This request can fail, and you’re responsible for handling that failure. If you ask for a large Machine, or a Machine in a region we happen to be at capacity for, you might need to retry the request, or to fall back to another region. If you’re working directly with the Machines API, you’re taking some responsibility for your own orchestration!
311
- *
312
- */
313
- export const machinesCreate = <ThrowOnError extends boolean = false>(
314
- options: Options<MachinesCreateData, ThrowOnError>,
315
- ) =>
316
- (options.client ?? client).post<
317
- MachinesCreateResponses,
318
- unknown,
319
- ThrowOnError
320
- >({
321
- url: "/apps/{app_name}/machines",
322
- ...options,
323
- headers: {
324
- "Content-Type": "application/json",
325
- ...options.headers,
326
- },
327
- });
328
-
329
- /**
330
- * Destroy Machine
331
- *
332
- * Delete a specific Machine within an app by Machine ID, with an optional force parameter to force kill the Machine if it's running.
333
- *
334
- */
335
- export const machinesDelete = <ThrowOnError extends boolean = false>(
336
- options: Options<MachinesDeleteData, ThrowOnError>,
337
- ) =>
338
- (options.client ?? client).delete<
339
- MachinesDeleteResponses,
340
- unknown,
341
- ThrowOnError
342
- >({ url: "/apps/{app_name}/machines/{machine_id}", ...options });
343
-
344
- /**
345
- * Get Machine
346
- *
347
- * Get details of a specific Machine within an app by the Machine ID.
348
- *
349
- */
350
- export const machinesShow = <ThrowOnError extends boolean = false>(
351
- options: Options<MachinesShowData, ThrowOnError>,
352
- ) =>
353
- (options.client ?? client).get<MachinesShowResponses, unknown, ThrowOnError>({
354
- url: "/apps/{app_name}/machines/{machine_id}",
355
- ...options,
356
- });
357
-
358
- /**
359
- * Update Machine
360
- *
361
- * Update a Machine's configuration using the details provided in the request body.
362
- *
363
- */
364
- export const machinesUpdate = <ThrowOnError extends boolean = false>(
365
- options: Options<MachinesUpdateData, ThrowOnError>,
366
- ) =>
367
- (options.client ?? client).post<
368
- MachinesUpdateResponses,
369
- MachinesUpdateErrors,
370
- ThrowOnError
371
- >({
372
- url: "/apps/{app_name}/machines/{machine_id}",
373
- ...options,
374
- headers: {
375
- "Content-Type": "application/json",
376
- ...options.headers,
377
- },
378
- });
379
-
380
- /**
381
- * Cordon Machine
382
- *
383
- * “Cordoning” a Machine refers to disabling its services, so the Fly Proxy won’t route requests to it. In flyctl this is used by blue/green deployments; one set of Machines is started up with services disabled, and when they are all healthy, the services are enabled on the new Machines and disabled on the old ones.
384
- *
385
- */
386
- export const machinesCordon = <ThrowOnError extends boolean = false>(
387
- options: Options<MachinesCordonData, ThrowOnError>,
388
- ) =>
389
- (options.client ?? client).post<
390
- MachinesCordonResponses,
391
- unknown,
392
- ThrowOnError
393
- >({ url: "/apps/{app_name}/machines/{machine_id}/cordon", ...options });
394
-
395
- /**
396
- * List Events
397
- *
398
- * List all events associated with a specific Machine within an app.
399
- *
400
- */
401
- export const machinesListEvents = <ThrowOnError extends boolean = false>(
402
- options: Options<MachinesListEventsData, ThrowOnError>,
403
- ) =>
404
- (options.client ?? client).get<
405
- MachinesListEventsResponses,
406
- unknown,
407
- ThrowOnError
408
- >({ url: "/apps/{app_name}/machines/{machine_id}/events", ...options });
409
-
410
- /**
411
- * Execute Command
412
- *
413
- * Execute a command on a specific Machine and return the raw command output bytes.
414
- *
415
- */
416
- export const machinesExec = <ThrowOnError extends boolean = false>(
417
- options: Options<MachinesExecData, ThrowOnError>,
418
- ) =>
419
- (options.client ?? client).post<
420
- MachinesExecResponses,
421
- MachinesExecErrors,
422
- ThrowOnError
423
- >({
424
- url: "/apps/{app_name}/machines/{machine_id}/exec",
425
- ...options,
426
- headers: {
427
- "Content-Type": "application/json",
428
- ...options.headers,
429
- },
430
- });
431
-
432
- /**
433
- * Release Lease
434
- *
435
- * Release the lease of a specific Machine within an app. Machine leases can be used to obtain an exclusive lock on modifying a Machine.
436
- *
437
- */
438
- export const machinesReleaseLease = <ThrowOnError extends boolean = false>(
439
- options: Options<MachinesReleaseLeaseData, ThrowOnError>,
440
- ) =>
441
- (options.client ?? client).delete<
442
- MachinesReleaseLeaseResponses,
443
- unknown,
444
- ThrowOnError
445
- >({ url: "/apps/{app_name}/machines/{machine_id}/lease", ...options });
446
-
447
- /**
448
- * Get Lease
449
- *
450
- * Retrieve the current lease of a specific Machine within an app. Machine leases can be used to obtain an exclusive lock on modifying a Machine.
451
- *
452
- */
453
- export const machinesShowLease = <ThrowOnError extends boolean = false>(
454
- options: Options<MachinesShowLeaseData, ThrowOnError>,
455
- ) =>
456
- (options.client ?? client).get<
457
- MachinesShowLeaseResponses,
458
- unknown,
459
- ThrowOnError
460
- >({ url: "/apps/{app_name}/machines/{machine_id}/lease", ...options });
461
-
462
- /**
463
- * Create Lease
464
- *
465
- * Create a lease for a specific Machine within an app using the details provided in the request body. Machine leases can be used to obtain an exclusive lock on modifying a Machine.
466
- *
467
- */
468
- export const machinesCreateLease = <ThrowOnError extends boolean = false>(
469
- options: Options<MachinesCreateLeaseData, ThrowOnError>,
470
- ) =>
471
- (options.client ?? client).post<
472
- MachinesCreateLeaseResponses,
473
- unknown,
474
- ThrowOnError
475
- >({
476
- url: "/apps/{app_name}/machines/{machine_id}/lease",
477
- ...options,
478
- headers: {
479
- "Content-Type": "application/json",
480
- ...options.headers,
481
- },
482
- });
483
-
484
- /**
485
- * Reclaim Machine Memory
486
- *
487
- * Trigger the balloon device to reclaim memory from a machine
488
- */
489
- export const machinesReclaimMemory = <ThrowOnError extends boolean = false>(
490
- options: Options<MachinesReclaimMemoryData, ThrowOnError>,
491
- ) =>
492
- (options.client ?? client).post<
493
- MachinesReclaimMemoryResponses,
494
- unknown,
495
- ThrowOnError
496
- >({
497
- url: "/apps/{app_name}/machines/{machine_id}/memory/reclaim",
498
- ...options,
499
- headers: {
500
- "Content-Type": "application/json",
501
- ...options.headers,
502
- },
503
- });
504
-
505
- /**
506
- * Get Metadata
507
- *
508
- * Retrieve metadata for a specific Machine within an app.
509
- *
510
- */
511
- export const machinesShowMetadata = <ThrowOnError extends boolean = false>(
512
- options: Options<MachinesShowMetadataData, ThrowOnError>,
513
- ) =>
514
- (options.client ?? client).get<
515
- MachinesShowMetadataResponses,
516
- unknown,
517
- ThrowOnError
518
- >({ url: "/apps/{app_name}/machines/{machine_id}/metadata", ...options });
519
-
520
- /**
521
- * Patch Metadata (set/remove multiple keys)
522
- *
523
- * Update multiple metadata keys at once. Null values and empty strings remove keys.
524
- */
525
- export const machinesPatchMetadata = <ThrowOnError extends boolean = false>(
526
- options: Options<MachinesPatchMetadataData, ThrowOnError>,
527
- ) =>
528
- (options.client ?? client).patch<
529
- MachinesPatchMetadataResponses,
530
- MachinesPatchMetadataErrors,
531
- ThrowOnError
532
- >({ url: "/apps/{app_name}/machines/{machine_id}/metadata", ...options });
533
-
534
- /**
535
- * Delete Metadata
536
- *
537
- * Delete metadata for a specific Machine within an app by providing a metadata key.
538
- *
539
- */
540
- export const machinesDeleteMetadata = <ThrowOnError extends boolean = false>(
541
- options: Options<MachinesDeleteMetadataData, ThrowOnError>,
542
- ) =>
543
- (options.client ?? client).delete<
544
- MachinesDeleteMetadataResponses,
545
- unknown,
546
- ThrowOnError
547
- >({
548
- url: "/apps/{app_name}/machines/{machine_id}/metadata/{key}",
549
- ...options,
550
- });
551
-
552
- /**
553
- * Update Metadata
554
- *
555
- * Update metadata for a specific machine within an app by providing a metadata key.
556
- *
557
- */
558
- export const machinesUpdateMetadata = <ThrowOnError extends boolean = false>(
559
- options: Options<MachinesUpdateMetadataData, ThrowOnError>,
560
- ) =>
561
- (options.client ?? client).post<
562
- MachinesUpdateMetadataResponses,
563
- MachinesUpdateMetadataErrors,
564
- ThrowOnError
565
- >({
566
- url: "/apps/{app_name}/machines/{machine_id}/metadata/{key}",
567
- ...options,
568
- });
569
-
570
- /**
571
- * List Processes
572
- *
573
- * List all processes running on a specific Machine within an app, with optional sorting parameters.
574
- *
575
- */
576
- export const machinesListProcesses = <ThrowOnError extends boolean = false>(
577
- options: Options<MachinesListProcessesData, ThrowOnError>,
578
- ) =>
579
- (options.client ?? client).get<
580
- MachinesListProcessesResponses,
581
- MachinesListProcessesErrors,
582
- ThrowOnError
583
- >({ url: "/apps/{app_name}/machines/{machine_id}/ps", ...options });
584
-
585
- /**
586
- * Restart Machine
587
- *
588
- * Restart a specific Machine within an app, with an optional timeout parameter.
589
- *
590
- */
591
- export const machinesRestart = <ThrowOnError extends boolean = false>(
592
- options: Options<MachinesRestartData, ThrowOnError>,
593
- ) =>
594
- (options.client ?? client).post<
595
- MachinesRestartResponses,
596
- MachinesRestartErrors,
597
- ThrowOnError
598
- >({ url: "/apps/{app_name}/machines/{machine_id}/restart", ...options });
599
-
600
- /**
601
- * Signal Machine
602
- *
603
- * Send a signal to a specific Machine within an app using the details provided in the request body.
604
- *
605
- */
606
- export const machinesSignal = <ThrowOnError extends boolean = false>(
607
- options: Options<MachinesSignalData, ThrowOnError>,
608
- ) =>
609
- (options.client ?? client).post<
610
- MachinesSignalResponses,
611
- MachinesSignalErrors,
612
- ThrowOnError
613
- >({
614
- url: "/apps/{app_name}/machines/{machine_id}/signal",
615
- ...options,
616
- headers: {
617
- "Content-Type": "application/json",
618
- ...options.headers,
619
- },
620
- });
621
-
622
- /**
623
- * Start Machine
624
- *
625
- * Start a specific Machine within an app.
626
- *
627
- */
628
- export const machinesStart = <ThrowOnError extends boolean = false>(
629
- options: Options<MachinesStartData, ThrowOnError>,
630
- ) =>
631
- (options.client ?? client).post<
632
- MachinesStartResponses,
633
- unknown,
634
- ThrowOnError
635
- >({ url: "/apps/{app_name}/machines/{machine_id}/start", ...options });
636
-
637
- /**
638
- * Stop Machine
639
- *
640
- * Stop a specific Machine within an app, with an optional request body to specify signal and timeout.
641
- *
642
- */
643
- export const machinesStop = <ThrowOnError extends boolean = false>(
644
- options: Options<MachinesStopData, ThrowOnError>,
645
- ) =>
646
- (options.client ?? client).post<
647
- MachinesStopResponses,
648
- MachinesStopErrors,
649
- ThrowOnError
650
- >({
651
- url: "/apps/{app_name}/machines/{machine_id}/stop",
652
- ...options,
653
- headers: {
654
- "Content-Type": "application/json",
655
- ...options.headers,
656
- },
657
- });
658
-
659
- /**
660
- * Suspend Machine
661
- *
662
- * Suspend a specific Machine within an app. The next start operation will attempt (but is not guaranteed) to resume the Machine from a snapshot taken at suspension time, rather than performing a cold boot.
663
- *
664
- */
665
- export const machinesSuspend = <ThrowOnError extends boolean = false>(
666
- options: Options<MachinesSuspendData, ThrowOnError>,
667
- ) =>
668
- (options.client ?? client).post<
669
- MachinesSuspendResponses,
670
- unknown,
671
- ThrowOnError
672
- >({ url: "/apps/{app_name}/machines/{machine_id}/suspend", ...options });
673
-
674
- /**
675
- * Uncordon Machine
676
- *
677
- * “Cordoning” a Machine refers to disabling its services, so the Fly Proxy won’t route requests to it. In flyctl this is used by blue/green deployments; one set of Machines is started up with services disabled, and when they are all healthy, the services are enabled on the new Machines and disabled on the old ones.
678
- *
679
- */
680
- export const machinesUncordon = <ThrowOnError extends boolean = false>(
681
- options: Options<MachinesUncordonData, ThrowOnError>,
682
- ) =>
683
- (options.client ?? client).post<
684
- MachinesUncordonResponses,
685
- unknown,
686
- ThrowOnError
687
- >({ url: "/apps/{app_name}/machines/{machine_id}/uncordon", ...options });
688
-
689
- /**
690
- * List Versions
691
- *
692
- * List all versions of the configuration for a specific Machine within an app.
693
- *
694
- */
695
- export const machinesListVersions = <ThrowOnError extends boolean = false>(
696
- options: Options<MachinesListVersionsData, ThrowOnError>,
697
- ) =>
698
- (options.client ?? client).get<
699
- MachinesListVersionsResponses,
700
- unknown,
701
- ThrowOnError
702
- >({ url: "/apps/{app_name}/machines/{machine_id}/versions", ...options });
703
-
704
- /**
705
- * Wait for State
706
- *
707
- * Wait for a Machine to reach a specific state. Specify the desired state with the state parameter. See the [Machine states table](https://fly.io/docs/machines/working-with-machines/#machine-states) for a list of possible states. The default for this parameter is `started`.
708
- *
709
- * This request will block for up to 60 seconds. Set a shorter timeout with the timeout parameter.
710
- *
711
- */
712
- export const machinesWait = <ThrowOnError extends boolean = false>(
713
- options: Options<MachinesWaitData, ThrowOnError>,
714
- ) =>
715
- (options.client ?? client).get<
716
- MachinesWaitResponses,
717
- MachinesWaitErrors,
718
- ThrowOnError
719
- >({ url: "/apps/{app_name}/machines/{machine_id}/wait", ...options });
720
-
721
- /**
722
- * List secret keys belonging to an app
723
- */
724
- export const secretkeysList = <ThrowOnError extends boolean = false>(
725
- options: Options<SecretkeysListData, ThrowOnError>,
726
- ) =>
727
- (options.client ?? client).get<
728
- SecretkeysListResponses,
729
- unknown,
730
- ThrowOnError
731
- >({ url: "/apps/{app_name}/secretkeys", ...options });
732
-
733
- /**
734
- * Delete an app's secret key
735
- */
736
- export const secretkeyDelete = <ThrowOnError extends boolean = false>(
737
- options: Options<SecretkeyDeleteData, ThrowOnError>,
738
- ) =>
739
- (options.client ?? client).delete<
740
- SecretkeyDeleteResponses,
741
- unknown,
742
- ThrowOnError
743
- >({ url: "/apps/{app_name}/secretkeys/{secret_name}", ...options });
744
-
745
- /**
746
- * Get an app's secret key
747
- */
748
- export const secretkeyGet = <ThrowOnError extends boolean = false>(
749
- options: Options<SecretkeyGetData, ThrowOnError>,
750
- ) =>
751
- (options.client ?? client).get<SecretkeyGetResponses, unknown, ThrowOnError>({
752
- url: "/apps/{app_name}/secretkeys/{secret_name}",
753
- ...options,
754
- });
755
-
756
- /**
757
- * Create or update a secret key
758
- */
759
- export const secretkeySet = <ThrowOnError extends boolean = false>(
760
- options: Options<SecretkeySetData, ThrowOnError>,
761
- ) =>
762
- (options.client ?? client).post<
763
- SecretkeySetResponses,
764
- SecretkeySetErrors,
765
- ThrowOnError
766
- >({
767
- url: "/apps/{app_name}/secretkeys/{secret_name}",
768
- ...options,
769
- headers: {
770
- "Content-Type": "application/json",
771
- ...options.headers,
772
- },
773
- });
774
-
775
- /**
776
- * Decrypt with a secret key
777
- */
778
- export const secretkeyDecrypt = <ThrowOnError extends boolean = false>(
779
- options: Options<SecretkeyDecryptData, ThrowOnError>,
780
- ) =>
781
- (options.client ?? client).post<
782
- SecretkeyDecryptResponses,
783
- SecretkeyDecryptErrors,
784
- ThrowOnError
785
- >({
786
- url: "/apps/{app_name}/secretkeys/{secret_name}/decrypt",
787
- ...options,
788
- headers: {
789
- "Content-Type": "application/json",
790
- ...options.headers,
791
- },
792
- });
793
-
794
- /**
795
- * Encrypt with a secret key
796
- */
797
- export const secretkeyEncrypt = <ThrowOnError extends boolean = false>(
798
- options: Options<SecretkeyEncryptData, ThrowOnError>,
799
- ) =>
800
- (options.client ?? client).post<
801
- SecretkeyEncryptResponses,
802
- SecretkeyEncryptErrors,
803
- ThrowOnError
804
- >({
805
- url: "/apps/{app_name}/secretkeys/{secret_name}/encrypt",
806
- ...options,
807
- headers: {
808
- "Content-Type": "application/json",
809
- ...options.headers,
810
- },
811
- });
812
-
813
- /**
814
- * Generate a random secret key
815
- */
816
- export const secretkeyGenerate = <ThrowOnError extends boolean = false>(
817
- options: Options<SecretkeyGenerateData, ThrowOnError>,
818
- ) =>
819
- (options.client ?? client).post<
820
- SecretkeyGenerateResponses,
821
- SecretkeyGenerateErrors,
822
- ThrowOnError
823
- >({
824
- url: "/apps/{app_name}/secretkeys/{secret_name}/generate",
825
- ...options,
826
- headers: {
827
- "Content-Type": "application/json",
828
- ...options.headers,
829
- },
830
- });
831
-
832
- /**
833
- * Sign with a secret key
834
- */
835
- export const secretkeySign = <ThrowOnError extends boolean = false>(
836
- options: Options<SecretkeySignData, ThrowOnError>,
837
- ) =>
838
- (options.client ?? client).post<
839
- SecretkeySignResponses,
840
- SecretkeySignErrors,
841
- ThrowOnError
842
- >({
843
- url: "/apps/{app_name}/secretkeys/{secret_name}/sign",
844
- ...options,
845
- headers: {
846
- "Content-Type": "application/json",
847
- ...options.headers,
848
- },
849
- });
850
-
851
- /**
852
- * Verify with a secret key
853
- */
854
- export const secretkeyVerify = <ThrowOnError extends boolean = false>(
855
- options: Options<SecretkeyVerifyData, ThrowOnError>,
856
- ) =>
857
- (options.client ?? client).post<
858
- SecretkeyVerifyResponses,
859
- SecretkeyVerifyErrors,
860
- ThrowOnError
861
- >({
862
- url: "/apps/{app_name}/secretkeys/{secret_name}/verify",
863
- ...options,
864
- headers: {
865
- "Content-Type": "application/json",
866
- ...options.headers,
867
- },
868
- });
869
-
870
- /**
871
- * List app secrets belonging to an app
872
- */
873
- export const secretsList = <ThrowOnError extends boolean = false>(
874
- options: Options<SecretsListData, ThrowOnError>,
875
- ) =>
876
- (options.client ?? client).get<SecretsListResponses, unknown, ThrowOnError>({
877
- url: "/apps/{app_name}/secrets",
878
- ...options,
879
- });
880
-
881
- /**
882
- * Update app secrets belonging to an app
883
- */
884
- export const secretsUpdate = <ThrowOnError extends boolean = false>(
885
- options: Options<SecretsUpdateData, ThrowOnError>,
886
- ) =>
887
- (options.client ?? client).post<
888
- SecretsUpdateResponses,
889
- SecretsUpdateErrors,
890
- ThrowOnError
891
- >({
892
- url: "/apps/{app_name}/secrets",
893
- ...options,
894
- headers: {
895
- "Content-Type": "application/json",
896
- ...options.headers,
897
- },
898
- });
899
-
900
- /**
901
- * Delete an app secret
902
- */
903
- export const secretDelete = <ThrowOnError extends boolean = false>(
904
- options: Options<SecretDeleteData, ThrowOnError>,
905
- ) =>
906
- (options.client ?? client).delete<
907
- SecretDeleteResponses,
908
- unknown,
909
- ThrowOnError
910
- >({ url: "/apps/{app_name}/secrets/{secret_name}", ...options });
911
-
912
- /**
913
- * Get an app secret
914
- */
915
- export const secretGet = <ThrowOnError extends boolean = false>(
916
- options: Options<SecretGetData, ThrowOnError>,
917
- ) =>
918
- (options.client ?? client).get<SecretGetResponses, unknown, ThrowOnError>({
919
- url: "/apps/{app_name}/secrets/{secret_name}",
920
- ...options,
921
- });
922
-
923
- /**
924
- * Create or update Secret
925
- */
926
- export const secretCreate = <ThrowOnError extends boolean = false>(
927
- options: Options<SecretCreateData, ThrowOnError>,
928
- ) =>
929
- (options.client ?? client).post<
930
- SecretCreateResponses,
931
- SecretCreateErrors,
932
- ThrowOnError
933
- >({
934
- url: "/apps/{app_name}/secrets/{secret_name}",
935
- ...options,
936
- headers: {
937
- "Content-Type": "application/json",
938
- ...options.headers,
939
- },
940
- });
941
-
942
- /**
943
- * List Volumes
944
- *
945
- * List all volumes associated with a specific app.
946
- *
947
- */
948
- export const volumesList = <ThrowOnError extends boolean = false>(
949
- options: Options<VolumesListData, ThrowOnError>,
950
- ) =>
951
- (options.client ?? client).get<VolumesListResponses, unknown, ThrowOnError>({
952
- url: "/apps/{app_name}/volumes",
953
- ...options,
954
- });
955
-
956
- /**
957
- * Create Volume
958
- *
959
- * Create a volume for a specific app using the details provided in the request body.
960
- *
961
- */
962
- export const volumesCreate = <ThrowOnError extends boolean = false>(
963
- options: Options<VolumesCreateData, ThrowOnError>,
964
- ) =>
965
- (options.client ?? client).post<
966
- VolumesCreateResponses,
967
- unknown,
968
- ThrowOnError
969
- >({
970
- url: "/apps/{app_name}/volumes",
971
- ...options,
972
- headers: {
973
- "Content-Type": "application/json",
974
- ...options.headers,
975
- },
976
- });
977
-
978
- /**
979
- * Destroy Volume
980
- *
981
- * Delete a specific volume within an app by volume ID.
982
- *
983
- */
984
- export const volumeDelete = <ThrowOnError extends boolean = false>(
985
- options: Options<VolumeDeleteData, ThrowOnError>,
986
- ) =>
987
- (options.client ?? client).delete<
988
- VolumeDeleteResponses,
989
- unknown,
990
- ThrowOnError
991
- >({ url: "/apps/{app_name}/volumes/{volume_id}", ...options });
992
-
993
- /**
994
- * Get Volume
995
- *
996
- * Retrieve details about a specific volume by its ID within an app.
997
- *
998
- */
999
- export const volumesGetById = <ThrowOnError extends boolean = false>(
1000
- options: Options<VolumesGetByIdData, ThrowOnError>,
1001
- ) =>
1002
- (options.client ?? client).get<
1003
- VolumesGetByIdResponses,
1004
- unknown,
1005
- ThrowOnError
1006
- >({ url: "/apps/{app_name}/volumes/{volume_id}", ...options });
1007
-
1008
- /**
1009
- * Update Volume
1010
- *
1011
- * Update a volume's configuration using the details provided in the request body.
1012
- *
1013
- */
1014
- export const volumesUpdate = <ThrowOnError extends boolean = false>(
1015
- options: Options<VolumesUpdateData, ThrowOnError>,
1016
- ) =>
1017
- (options.client ?? client).put<
1018
- VolumesUpdateResponses,
1019
- VolumesUpdateErrors,
1020
- ThrowOnError
1021
- >({
1022
- url: "/apps/{app_name}/volumes/{volume_id}",
1023
- ...options,
1024
- headers: {
1025
- "Content-Type": "application/json",
1026
- ...options.headers,
1027
- },
1028
- });
1029
-
1030
- /**
1031
- * Extend Volume
1032
- *
1033
- * Extend a volume's size within an app using the details provided in the request body.
1034
- *
1035
- */
1036
- export const volumesExtend = <ThrowOnError extends boolean = false>(
1037
- options: Options<VolumesExtendData, ThrowOnError>,
1038
- ) =>
1039
- (options.client ?? client).put<VolumesExtendResponses, unknown, ThrowOnError>(
1040
- {
1041
- url: "/apps/{app_name}/volumes/{volume_id}/extend",
1042
- ...options,
1043
- headers: {
1044
- "Content-Type": "application/json",
1045
- ...options.headers,
1046
- },
1047
- },
1048
- );
1049
-
1050
- /**
1051
- * List Snapshots
1052
- *
1053
- * List all snapshots for a specific volume within an app.
1054
- *
1055
- */
1056
- export const volumesListSnapshots = <ThrowOnError extends boolean = false>(
1057
- options: Options<VolumesListSnapshotsData, ThrowOnError>,
1058
- ) =>
1059
- (options.client ?? client).get<
1060
- VolumesListSnapshotsResponses,
1061
- unknown,
1062
- ThrowOnError
1063
- >({ url: "/apps/{app_name}/volumes/{volume_id}/snapshots", ...options });
1064
-
1065
- /**
1066
- * Create Snapshot
1067
- *
1068
- * Create a snapshot for a specific volume within an app.
1069
- *
1070
- */
1071
- export const createVolumeSnapshot = <ThrowOnError extends boolean = false>(
1072
- options: Options<CreateVolumeSnapshotData, ThrowOnError>,
1073
- ) =>
1074
- (options.client ?? client).post<
1075
- CreateVolumeSnapshotResponses,
1076
- unknown,
1077
- ThrowOnError
1078
- >({ url: "/apps/{app_name}/volumes/{volume_id}/snapshots", ...options });
1079
-
1080
- /**
1081
- * Get Placements
1082
- *
1083
- * Simulates placing the specified number of machines into regions, depending on available capacity and limits.
1084
- */
1085
- export const platformPlacementsPost = <ThrowOnError extends boolean = false>(
1086
- options: Options<PlatformPlacementsPostData, ThrowOnError>,
1087
- ) =>
1088
- (options.client ?? client).post<
1089
- PlatformPlacementsPostResponses,
1090
- unknown,
1091
- ThrowOnError
1092
- >({
1093
- url: "/platform/placements",
1094
- ...options,
1095
- headers: {
1096
- "Content-Type": "application/json",
1097
- ...options.headers,
1098
- },
1099
- });
1100
-
1101
- /**
1102
- * Get Regions
1103
- *
1104
- * List all regions on the platform with their current Machine capacity.
1105
- */
1106
- export const platformRegionsGet = <ThrowOnError extends boolean = false>(
1107
- options?: Options<PlatformRegionsGetData, ThrowOnError>,
1108
- ) =>
1109
- (options?.client ?? client).get<
1110
- PlatformRegionsGetResponses,
1111
- unknown,
1112
- ThrowOnError
1113
- >({ url: "/platform/regions", ...options });
1114
-
1115
- /**
1116
- * Request a Petsem token for accessing KMS
1117
- *
1118
- * This site hosts documentation generated from the Fly.io Machines API OpenAPI specification. Visit our complete [Machines API docs](https://fly.io/docs/machines/api/apps-resource/) for details about using the Apps resource.
1119
- */
1120
- export const tokensRequestKms = <ThrowOnError extends boolean = false>(
1121
- options?: Options<TokensRequestKmsData, ThrowOnError>,
1122
- ) =>
1123
- (options?.client ?? client).post<
1124
- TokensRequestKmsResponses,
1125
- unknown,
1126
- ThrowOnError
1127
- >({ url: "/tokens/kms", ...options });
1128
-
1129
- /**
1130
- * Request an OIDC token
1131
- *
1132
- * Request an Open ID Connect token for your machine. Customize the audience claim with the `aud` parameter. This returns a JWT token. Learn more about [using OpenID Connect](/docs/reference/openid-connect/) on Fly.io.
1133
- *
1134
- */
1135
- export const tokensRequestOidc = <ThrowOnError extends boolean = false>(
1136
- options: Options<TokensRequestOidcData, ThrowOnError>,
1137
- ) =>
1138
- (options.client ?? client).post<
1139
- TokensRequestOidcResponses,
1140
- TokensRequestOidcErrors,
1141
- ThrowOnError
1142
- >({
1143
- url: "/tokens/oidc",
1144
- ...options,
1145
- headers: {
1146
- "Content-Type": "application/json",
1147
- ...options.headers,
1148
- },
1149
- });
1150
-
1151
- /**
1152
- * Get Current Token Information
1153
- *
1154
- * Get information about the current macaroon token(s), including organizations, apps, and whether each token is from a user or machine
1155
- */
1156
- export const currentTokenShow = <ThrowOnError extends boolean = false>(
1157
- options?: Options<CurrentTokenShowData, ThrowOnError>,
1158
- ) =>
1159
- (options?.client ?? client).get<
1160
- CurrentTokenShowResponses,
1161
- CurrentTokenShowErrors,
1162
- ThrowOnError
1163
- >({ url: "/v1/tokens/current", ...options });