@faable/deploy-sdk 2.1.0 → 2.3.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.
@@ -282,7 +282,7 @@ export interface paths {
282
282
  put?: never;
283
283
  /**
284
284
  * Set up deploy workflow
285
- * @description Commit the Faable deploy GitHub Actions workflow to the app’s linked repository (no-op if already present).
285
+ * @description Commit the Faable deploy GitHub Actions workflow to the app’s linked repository (no-op if already present; upgrades an unmodified legacy workflow).
286
286
  */
287
287
  post: operations["app/setup_deploy_workflow"];
288
288
  delete?: never;
@@ -291,6 +291,26 @@ export interface paths {
291
291
  patch?: never;
292
292
  trace?: never;
293
293
  };
294
+ "/app/{id}/deploy-branch": {
295
+ parameters: {
296
+ query?: never;
297
+ header?: never;
298
+ path?: never;
299
+ cookie?: never;
300
+ };
301
+ get?: never;
302
+ put?: never;
303
+ /**
304
+ * Change the deploy branch
305
+ * @description Change the branch the app deploys from. Also rewrites the committed deploy workflow to trigger on the new branch, unless the user has customized it.
306
+ */
307
+ post: operations["app/set_deploy_branch"];
308
+ delete?: never;
309
+ options?: never;
310
+ head?: never;
311
+ patch?: never;
312
+ trace?: never;
313
+ };
294
314
  "/deployment": {
295
315
  parameters: {
296
316
  query?: never;
@@ -328,7 +348,11 @@ export interface paths {
328
348
  */
329
349
  get: operations["deployment/get"];
330
350
  put?: never;
331
- post?: never;
351
+ /**
352
+ * Update Deployment
353
+ * @description Update Deployment
354
+ */
355
+ post: operations["deployment/update"];
332
356
  /**
333
357
  * Delete Deployment
334
358
  * @description Delete Deployment
@@ -339,6 +363,30 @@ export interface paths {
339
363
  patch?: never;
340
364
  trace?: never;
341
365
  };
366
+ "/deployment/{deployment_id}/logs": {
367
+ parameters: {
368
+ query?: never;
369
+ header?: never;
370
+ path?: never;
371
+ cookie?: never;
372
+ };
373
+ /**
374
+ * Get deployment build logs
375
+ * @description Get the CLI build/deploy output attached to a deployment
376
+ */
377
+ get: operations["deployment/get_logs"];
378
+ put?: never;
379
+ /**
380
+ * Upload deployment build logs
381
+ * @description Attach the CLI build/deploy output to a deployment
382
+ */
383
+ post: operations["deployment/upload_logs"];
384
+ delete?: never;
385
+ options?: never;
386
+ head?: never;
387
+ patch?: never;
388
+ trace?: never;
389
+ };
342
390
  "/domain": {
343
391
  parameters: {
344
392
  query?: never;
@@ -639,74 +687,6 @@ export interface paths {
639
687
  patch?: never;
640
688
  trace?: never;
641
689
  };
642
- "/stripe/billing-portal": {
643
- parameters: {
644
- query?: never;
645
- header?: never;
646
- path?: never;
647
- cookie?: never;
648
- };
649
- /** Redirect to Stripe billing portal */
650
- get: operations["stripe/billingPortal"];
651
- put?: never;
652
- post?: never;
653
- delete?: never;
654
- options?: never;
655
- head?: never;
656
- patch?: never;
657
- trace?: never;
658
- };
659
- "/stripe/payment-methods": {
660
- parameters: {
661
- query?: never;
662
- header?: never;
663
- path?: never;
664
- cookie?: never;
665
- };
666
- /** List Stripe payment methods */
667
- get: operations["stripe/paymentMethods"];
668
- put?: never;
669
- post?: never;
670
- delete?: never;
671
- options?: never;
672
- head?: never;
673
- patch?: never;
674
- trace?: never;
675
- };
676
- "/stripe/setup-intent": {
677
- parameters: {
678
- query?: never;
679
- header?: never;
680
- path?: never;
681
- cookie?: never;
682
- };
683
- /** Create a Stripe setup intent */
684
- get: operations["stripe/setupIntent"];
685
- put?: never;
686
- post?: never;
687
- delete?: never;
688
- options?: never;
689
- head?: never;
690
- patch?: never;
691
- trace?: never;
692
- };
693
- "/stripe/invoices": {
694
- parameters: {
695
- query?: never;
696
- header?: never;
697
- path?: never;
698
- cookie?: never;
699
- };
700
- /** List Stripe invoices */
701
- get: operations["stripe/invoices"];
702
- put?: never;
703
- post?: never;
704
- delete?: never;
705
- options?: never;
706
- head?: never;
707
- patch?: never;
708
- trace?: never;
709
- };
710
690
  "/github/setup": {
711
691
  parameters: {
712
692
  query?: never;
@@ -896,6 +876,17 @@ export interface components {
896
876
  deployment_previous: string | {
897
877
  [key: string]: unknown;
898
878
  } | null;
879
+ /**
880
+ * @description Observed state of the push-to-deploy workflow on the linked repository
881
+ * @default null
882
+ */
883
+ deploy_workflow: {
884
+ /** @description Whether a Faable deploy workflow exists on the repository */
885
+ configured: boolean;
886
+ path: string | null;
887
+ verified_at: string | null;
888
+ commit: string | null;
889
+ } | null;
899
890
  /**
900
891
  * @description Last commited cache Purge
901
892
  * @default null
@@ -911,6 +902,20 @@ export interface components {
911
902
  * @default null
912
903
  */
913
904
  last_commited_purge_service: string | null;
905
+ /**
906
+ * @description Live versions of the app: the promoted one plus any draining (coexistence) versions
907
+ * @default null
908
+ */
909
+ versions: {
910
+ /** @description Deployment id of this version */
911
+ deployment: string;
912
+ /** @description promoted = current production; coexisting = draining */
913
+ role: "promoted" | "coexisting";
914
+ /** @description ISO date this version was promoted */
915
+ promoted_at: string;
916
+ /** @description GC-eligibility deadline for a coexisting version (demotion + drain window). Null on the promoted entry. */
917
+ drain_until: string | null;
918
+ }[] | null;
914
919
  /**
915
920
  * @description Opaque revision token; changes whenever the app secrets change
916
921
  * @default null
@@ -920,6 +925,16 @@ export interface components {
920
925
  AppRuntimeStrategy: string;
921
926
  /** @enum {unknown} */
922
927
  AppRuntime: "node" | "php";
928
+ /**
929
+ * @default standard
930
+ * @enum {unknown}
931
+ */
932
+ AppMode: "standard" | "coexistence";
933
+ /**
934
+ * @default cookie
935
+ * @enum {unknown}
936
+ */
937
+ AppCoexistenceRouting: "cookie" | "path";
923
938
  /** @description App */
924
939
  App: {
925
940
  /** @description App ID */
@@ -930,8 +945,14 @@ export interface components {
930
945
  slug: string;
931
946
  url: string;
932
947
  active: boolean;
948
+ /** @description Reason the app was administratively disabled. Null when the app is active. */
949
+ disabled_reason?: string | null;
933
950
  runtime: components["schemas"]["AppRuntime"];
934
951
  runtime_strategy: string | null;
952
+ mode: components["schemas"]["AppMode"];
953
+ coexistence_routing?: ("cookie" | "path") | null;
954
+ coexistence_keep_versions?: number | null;
955
+ coexistence_drain_hours?: number | null;
935
956
  /** @description Faable instance types comprise varying combinations of CPU, memory, storage, and networking capacity. */
936
957
  instance_type: string;
937
958
  /**
@@ -992,14 +1013,29 @@ export interface components {
992
1013
  DeployWorkflowStatus: {
993
1014
  configured: boolean;
994
1015
  workflow_path?: string;
1016
+ updated?: boolean;
1017
+ };
1018
+ DeployBranchResult: {
1019
+ github_branch: string;
1020
+ workflow_synced: boolean;
1021
+ workflow_path?: string;
995
1022
  };
996
1023
  DeploymentStatus: {
997
1024
  /**
998
1025
  * @description High-level summary of where the Deployment is in its lifecycle
999
- * @default UNKNOWN
1026
+ * @default QUEUED
1000
1027
  * @enum {unknown}
1001
1028
  */
1002
- phase: "UNKNOWN" | "QUEUED" | "BUILDING" | "ERROR" | "INITIALIZING" | "READY" | "CANCELED" | "TERMINATING";
1029
+ phase: "UNKNOWN" | "QUEUED" | "BUILDING" | "ERROR" | "BUILD_ERROR" | "INITIALIZING" | "READY" | "CANCELED" | "TERMINATING";
1030
+ /**
1031
+ * Format: date-time
1032
+ * @description When a controller took control of this deployment
1033
+ */
1034
+ controlled_at?: string;
1035
+ /** @description INSTANCE_NAME of the controller that claimed it */
1036
+ controlled_by?: string;
1037
+ /** @description Why the deployment failed (shown to the user on ERROR) */
1038
+ reason?: string;
1003
1039
  };
1004
1040
  /** @description Deployment */
1005
1041
  Deployment: {
@@ -1055,6 +1091,9 @@ export interface components {
1055
1091
  github_commit_message?: string;
1056
1092
  type?: string;
1057
1093
  };
1094
+ DeploymentUpdate: {
1095
+ image: string;
1096
+ };
1058
1097
  DomainStatus: {
1059
1098
  /**
1060
1099
  * @description Outcome of the latest DNS verification check
@@ -1702,8 +1741,14 @@ export interface operations {
1702
1741
  slug: string;
1703
1742
  url: string;
1704
1743
  active: boolean;
1744
+ /** @description Reason the app was administratively disabled. Null when the app is active. */
1745
+ disabled_reason?: string | null;
1705
1746
  runtime: components["schemas"]["AppRuntime"];
1706
1747
  runtime_strategy: string | null;
1748
+ mode: components["schemas"]["AppMode"];
1749
+ coexistence_routing?: ("cookie" | "path") | null;
1750
+ coexistence_keep_versions?: number | null;
1751
+ coexistence_drain_hours?: number | null;
1707
1752
  /** @description Faable instance types comprise varying combinations of CPU, memory, storage, and networking capacity. */
1708
1753
  instance_type: string;
1709
1754
  /**
@@ -1758,8 +1803,14 @@ export interface operations {
1758
1803
  slug: string;
1759
1804
  url: string;
1760
1805
  active: boolean;
1806
+ /** @description Reason the app was administratively disabled. Null when the app is active. */
1807
+ disabled_reason?: string | null;
1761
1808
  runtime: components["schemas"]["AppRuntime"];
1762
1809
  runtime_strategy: string | null;
1810
+ mode: components["schemas"]["AppMode"];
1811
+ coexistence_routing?: ("cookie" | "path") | null;
1812
+ coexistence_keep_versions?: number | null;
1813
+ coexistence_drain_hours?: number | null;
1763
1814
  /** @description Faable instance types comprise varying combinations of CPU, memory, storage, and networking capacity. */
1764
1815
  instance_type: string;
1765
1816
  /**
@@ -1821,8 +1872,14 @@ export interface operations {
1821
1872
  slug: string;
1822
1873
  url: string;
1823
1874
  active: boolean;
1875
+ /** @description Reason the app was administratively disabled. Null when the app is active. */
1876
+ disabled_reason?: string | null;
1824
1877
  runtime: components["schemas"]["AppRuntime"];
1825
1878
  runtime_strategy: string | null;
1879
+ mode: components["schemas"]["AppMode"];
1880
+ coexistence_routing?: ("cookie" | "path") | null;
1881
+ coexistence_keep_versions?: number | null;
1882
+ coexistence_drain_hours?: number | null;
1826
1883
  /** @description Faable instance types comprise varying combinations of CPU, memory, storage, and networking capacity. */
1827
1884
  instance_type: string;
1828
1885
  /**
@@ -1874,8 +1931,14 @@ export interface operations {
1874
1931
  slug: string;
1875
1932
  url: string;
1876
1933
  active: boolean;
1934
+ /** @description Reason the app was administratively disabled. Null when the app is active. */
1935
+ disabled_reason?: string | null;
1877
1936
  runtime: components["schemas"]["AppRuntime"];
1878
1937
  runtime_strategy: string | null;
1938
+ mode: components["schemas"]["AppMode"];
1939
+ coexistence_routing?: ("cookie" | "path") | null;
1940
+ coexistence_keep_versions?: number | null;
1941
+ coexistence_drain_hours?: number | null;
1879
1942
  /** @description Faable instance types comprise varying combinations of CPU, memory, storage, and networking capacity. */
1880
1943
  instance_type: string;
1881
1944
  /**
@@ -2155,6 +2218,7 @@ export interface operations {
2155
2218
  "application/json": {
2156
2219
  configured: boolean;
2157
2220
  workflow_path?: string;
2221
+ updated?: boolean;
2158
2222
  };
2159
2223
  };
2160
2224
  };
@@ -2180,6 +2244,39 @@ export interface operations {
2180
2244
  "application/json": {
2181
2245
  configured: boolean;
2182
2246
  workflow_path?: string;
2247
+ updated?: boolean;
2248
+ };
2249
+ };
2250
+ };
2251
+ };
2252
+ };
2253
+ "app/set_deploy_branch": {
2254
+ parameters: {
2255
+ query?: never;
2256
+ header?: never;
2257
+ path: {
2258
+ id: string;
2259
+ };
2260
+ cookie?: never;
2261
+ };
2262
+ requestBody: {
2263
+ content: {
2264
+ "application/json": {
2265
+ github_branch: string;
2266
+ };
2267
+ };
2268
+ };
2269
+ responses: {
2270
+ /** @description Default Response */
2271
+ 200: {
2272
+ headers: {
2273
+ [name: string]: unknown;
2274
+ };
2275
+ content: {
2276
+ "application/json": {
2277
+ github_branch: string;
2278
+ workflow_synced: boolean;
2279
+ workflow_path?: string;
2183
2280
  };
2184
2281
  };
2185
2282
  };
@@ -2309,6 +2406,53 @@ export interface operations {
2309
2406
  };
2310
2407
  };
2311
2408
  };
2409
+ "deployment/update": {
2410
+ parameters: {
2411
+ query?: never;
2412
+ header?: never;
2413
+ path: {
2414
+ id: string;
2415
+ };
2416
+ cookie?: never;
2417
+ };
2418
+ requestBody: {
2419
+ content: {
2420
+ "application/json": {
2421
+ image: string;
2422
+ };
2423
+ };
2424
+ };
2425
+ responses: {
2426
+ /** @description Deployment */
2427
+ 200: {
2428
+ headers: {
2429
+ [name: string]: unknown;
2430
+ };
2431
+ content: {
2432
+ "application/json": {
2433
+ /** @description Deployment ID */
2434
+ id: string;
2435
+ team: string;
2436
+ app_id: string;
2437
+ image?: string;
2438
+ github_commit?: string;
2439
+ github_ref?: string;
2440
+ github_actor?: string;
2441
+ github_commit_message?: string;
2442
+ status: components["schemas"]["DeploymentStatus"];
2443
+ /** @default {} */
2444
+ metadata: {
2445
+ [key: string]: unknown;
2446
+ };
2447
+ /** @description Deployment creation date */
2448
+ createdAt: string;
2449
+ /** @description Deployment updated date */
2450
+ updatedAt?: string;
2451
+ };
2452
+ };
2453
+ };
2454
+ };
2455
+ };
2312
2456
  "deployment/delete": {
2313
2457
  parameters: {
2314
2458
  query?: never;
@@ -2350,6 +2494,73 @@ export interface operations {
2350
2494
  };
2351
2495
  };
2352
2496
  };
2497
+ "deployment/get_logs": {
2498
+ parameters: {
2499
+ query?: never;
2500
+ header?: never;
2501
+ path: {
2502
+ deployment_id: string;
2503
+ };
2504
+ cookie?: never;
2505
+ };
2506
+ requestBody?: never;
2507
+ responses: {
2508
+ /** @description Default Response */
2509
+ 200: {
2510
+ headers: {
2511
+ [name: string]: unknown;
2512
+ };
2513
+ content: {
2514
+ "application/json": {
2515
+ id: string;
2516
+ deployment_id: string;
2517
+ app_id: string;
2518
+ team: string;
2519
+ content: string;
2520
+ truncated: boolean;
2521
+ size: number;
2522
+ createdAt?: string;
2523
+ updatedAt?: string;
2524
+ };
2525
+ };
2526
+ };
2527
+ };
2528
+ };
2529
+ "deployment/upload_logs": {
2530
+ parameters: {
2531
+ query?: never;
2532
+ header?: never;
2533
+ path: {
2534
+ deployment_id: string;
2535
+ };
2536
+ cookie?: never;
2537
+ };
2538
+ requestBody: {
2539
+ content: {
2540
+ "application/json": {
2541
+ content: string;
2542
+ /** @default false */
2543
+ truncated?: boolean;
2544
+ };
2545
+ };
2546
+ };
2547
+ responses: {
2548
+ /** @description Default Response */
2549
+ 201: {
2550
+ headers: {
2551
+ [name: string]: unknown;
2552
+ };
2553
+ content: {
2554
+ "application/json": {
2555
+ id: string;
2556
+ deployment_id: string;
2557
+ truncated: boolean;
2558
+ size: number;
2559
+ };
2560
+ };
2561
+ };
2562
+ };
2563
+ };
2353
2564
  "domain/list": {
2354
2565
  parameters: {
2355
2566
  query?: {
@@ -3193,80 +3404,6 @@ export interface operations {
3193
3404
  };
3194
3405
  };
3195
3406
  };
3196
- "stripe/billingPortal": {
3197
- parameters: {
3198
- query: {
3199
- return_to: string;
3200
- };
3201
- header?: never;
3202
- path?: never;
3203
- cookie?: never;
3204
- };
3205
- requestBody?: never;
3206
- responses: {
3207
- /** @description Default Response */
3208
- 200: {
3209
- headers: {
3210
- [name: string]: unknown;
3211
- };
3212
- content?: never;
3213
- };
3214
- };
3215
- };
3216
- "stripe/paymentMethods": {
3217
- parameters: {
3218
- query?: never;
3219
- header?: never;
3220
- path?: never;
3221
- cookie?: never;
3222
- };
3223
- requestBody?: never;
3224
- responses: {
3225
- /** @description Default Response */
3226
- 200: {
3227
- headers: {
3228
- [name: string]: unknown;
3229
- };
3230
- content?: never;
3231
- };
3232
- };
3233
- };
3234
- "stripe/setupIntent": {
3235
- parameters: {
3236
- query?: never;
3237
- header?: never;
3238
- path?: never;
3239
- cookie?: never;
3240
- };
3241
- requestBody?: never;
3242
- responses: {
3243
- /** @description Default Response */
3244
- 200: {
3245
- headers: {
3246
- [name: string]: unknown;
3247
- };
3248
- content?: never;
3249
- };
3250
- };
3251
- };
3252
- "stripe/invoices": {
3253
- parameters: {
3254
- query?: never;
3255
- header?: never;
3256
- path?: never;
3257
- cookie?: never;
3258
- };
3259
- requestBody?: never;
3260
- responses: {
3261
- /** @description Default Response */
3262
- 200: {
3263
- headers: {
3264
- [name: string]: unknown;
3265
- };
3266
- content?: never;
3267
- };
3268
- };
3269
- };
3270
3407
  "github/setup": {
3271
3408
  parameters: {
3272
3409
  query?: {