@faable/deploy-sdk 2.12.1 → 2.13.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.
@@ -367,6 +367,46 @@ export interface paths {
367
367
  patch?: never;
368
368
  trace?: never;
369
369
  };
370
+ "/app/{id}/repo/directories": {
371
+ parameters: {
372
+ query?: never;
373
+ header?: never;
374
+ path?: never;
375
+ cookie?: never;
376
+ };
377
+ /**
378
+ * List repository directories
379
+ * @description Directories of the linked repository on the deploy branch, flagged with whether each one holds a buildable manifest. Feeds the Root Directory picker so a monorepo is configured from what the repository actually contains. Limited to three levels deep; dotted directories and node_modules are excluded.
380
+ */
381
+ get: operations["app/repo_directories"];
382
+ put?: never;
383
+ post?: never;
384
+ delete?: never;
385
+ options?: never;
386
+ head?: never;
387
+ patch?: never;
388
+ trace?: never;
389
+ };
390
+ "/app/{id}/root-dir": {
391
+ parameters: {
392
+ query?: never;
393
+ header?: never;
394
+ path?: never;
395
+ cookie?: never;
396
+ };
397
+ get?: never;
398
+ put?: never;
399
+ /**
400
+ * Set the Root Directory
401
+ * @description Set the platform Root Directory: the subdirectory of the repository the build runs from. Takes precedence over the repo's faable.json `rootDir`; `null` clears it and hands precedence back. The path must exist on the deploy branch.
402
+ */
403
+ post: operations["app/set_root_dir"];
404
+ delete?: never;
405
+ options?: never;
406
+ head?: never;
407
+ patch?: never;
408
+ trace?: never;
409
+ };
370
410
  "/app/{id}/deploy-mode": {
371
411
  parameters: {
372
412
  query?: never;
@@ -407,6 +447,50 @@ export interface paths {
407
447
  patch?: never;
408
448
  trace?: never;
409
449
  };
450
+ "/app/{app_id}/waf": {
451
+ parameters: {
452
+ query?: never;
453
+ header?: never;
454
+ path?: never;
455
+ cookie?: never;
456
+ };
457
+ /**
458
+ * Get App WAF
459
+ * @description Get the WAF rules in effect for an App
460
+ */
461
+ get: operations["app/waf"];
462
+ put?: never;
463
+ post?: never;
464
+ delete?: never;
465
+ options?: never;
466
+ head?: never;
467
+ patch?: never;
468
+ trace?: never;
469
+ };
470
+ "/app/{app_id}/waf/rules": {
471
+ parameters: {
472
+ query?: never;
473
+ header?: never;
474
+ path?: never;
475
+ cookie?: never;
476
+ };
477
+ get?: never;
478
+ put?: never;
479
+ /**
480
+ * Add App WAF Rule
481
+ * @description Add a WAF rule to an App
482
+ */
483
+ post: operations["app/waf/addRule"];
484
+ /**
485
+ * Remove App WAF Rule
486
+ * @description Remove a WAF rule from an App
487
+ */
488
+ delete: operations["app/waf/removeRule"];
489
+ options?: never;
490
+ head?: never;
491
+ patch?: never;
492
+ trace?: never;
493
+ };
410
494
  "/deployment": {
411
495
  parameters: {
412
496
  query?: never;
@@ -479,6 +563,26 @@ export interface paths {
479
563
  patch?: never;
480
564
  trace?: never;
481
565
  };
566
+ "/deployment/{deployment_id}/cancel": {
567
+ parameters: {
568
+ query?: never;
569
+ header?: never;
570
+ path?: never;
571
+ cookie?: never;
572
+ };
573
+ get?: never;
574
+ put?: never;
575
+ /**
576
+ * Cancel a queued or building deployment
577
+ * @description Cancel a deployment that has not been handed over to the controller yet (QUEUED or BUILDING)
578
+ */
579
+ post: operations["deployment/cancel"];
580
+ delete?: never;
581
+ options?: never;
582
+ head?: never;
583
+ patch?: never;
584
+ trace?: never;
585
+ };
482
586
  "/domain": {
483
587
  parameters: {
484
588
  query?: never;
@@ -855,6 +959,26 @@ export interface components {
855
959
  /** @description Container that was OOMKilled */
856
960
  container?: string;
857
961
  } | null;
962
+ /** @description Runtime health flag for the promoted deployment (owner-facing outage signal) */
963
+ runtime_health?: {
964
+ /**
965
+ * @description The container keeps exiting and being restarted (CrashLoopBackOff)
966
+ * @enum {string}
967
+ */
968
+ state: "crash_loop";
969
+ /** @description Deployment whose pod is crash-looping */
970
+ deployment: string;
971
+ /** @description ISO time the crash loop was last observed */
972
+ at: string;
973
+ /** @description Container that is crash-looping */
974
+ container?: string;
975
+ /** @description Restart count when observed */
976
+ restarts?: number;
977
+ /** @description Last exit code, when reported */
978
+ exit_code?: number;
979
+ /** @description K8s waiting/terminated reason */
980
+ reason?: string;
981
+ } | null;
858
982
  };
859
983
  AppRuntimeStrategy: string;
860
984
  /** @enum {unknown} */
@@ -885,7 +1009,7 @@ export interface components {
885
1009
  active: boolean;
886
1010
  /** @description Reason the app was administratively disabled. Null when the app is active. */
887
1011
  disabled_reason?: string | null;
888
- runtime: components["schemas"]["AppRuntime"];
1012
+ runtime: ("node" | "php" | "python") | null;
889
1013
  runtime_strategy: string | null;
890
1014
  detected?: {
891
1015
  buildpack: string;
@@ -990,12 +1114,36 @@ export interface components {
990
1114
  root_dir: string | null;
991
1115
  root_dir_source: "platform" | "faable.json" | null;
992
1116
  };
1117
+ RepoDirectories: {
1118
+ directories: {
1119
+ path: string;
1120
+ buildable: boolean;
1121
+ }[];
1122
+ truncated: boolean;
1123
+ };
993
1124
  DeployNowResult: {
994
1125
  /** @enum {string} */
995
1126
  status: "created";
996
1127
  commit: string;
997
1128
  branch: string;
998
1129
  };
1130
+ AppWafView: {
1131
+ enabled: boolean;
1132
+ platform_profiles: {
1133
+ name: string;
1134
+ action: string;
1135
+ rule_count: number;
1136
+ rules?: {
1137
+ pattern: string;
1138
+ description?: string;
1139
+ }[];
1140
+ }[];
1141
+ rules: {
1142
+ pattern: string;
1143
+ action: string;
1144
+ description?: string;
1145
+ }[];
1146
+ };
999
1147
  DeploymentStatus: {
1000
1148
  /**
1001
1149
  * @description High-level summary of where the Deployment is in its lifecycle
@@ -1014,8 +1162,12 @@ export interface components {
1014
1162
  reason?: string;
1015
1163
  /** @description Scale-to-zero sub-state (admin-only): asleep, waking or null */
1016
1164
  cold_state?: "asleep" | "waking" | null;
1017
- /** @description Digest-pinned runtime image stamped at first materialization (artifact deploys) */
1165
+ /** @description Runtime image (immutable version tag) this artifact deployment runs */
1018
1166
  runtime_image?: string;
1167
+ /** @description Fetcher image (immutable version tag) of the artifact-prepare initContainer */
1168
+ fetcher_image?: string;
1169
+ /** @description Builder image (immutable version tag) that built this deployment */
1170
+ builder_image?: string;
1019
1171
  };
1020
1172
  DeploymentSource: {
1021
1173
  manifest?: {
@@ -1073,6 +1225,9 @@ export interface components {
1073
1225
  artifact_id?: string;
1074
1226
  /** Format: date-time */
1075
1227
  artifact_ready_at?: string;
1228
+ /** Format: date-time */
1229
+ build_started_at?: string;
1230
+ build_ms?: number;
1076
1231
  redeploy_of?: string;
1077
1232
  /** Format: date-time */
1078
1233
  quota_released_at?: string;
@@ -1242,9 +1397,11 @@ export interface components {
1242
1397
  */
1243
1398
  app_id: string | null;
1244
1399
  source: "builtin" | "manual" | "auto";
1245
- action: "deny" | "ratelimit" | "probe";
1400
+ action: "deny" | "sink" | "ratelimit" | "probe";
1246
1401
  match: "path" | "user_agent";
1247
1402
  apply: "all" | "node" | "php" | "manual";
1403
+ /** @description Runtimes excluded from `apply` (e.g. ["php"]) */
1404
+ except?: ("all" | "node" | "php" | "manual")[];
1248
1405
  rules: {
1249
1406
  /** @description RE2 path-regex fragment */
1250
1407
  pattern: string;
@@ -1297,7 +1454,7 @@ export interface components {
1297
1454
  /** @description Owning App */
1298
1455
  app_id?: string;
1299
1456
  source?: "builtin" | "manual" | "auto";
1300
- action?: "deny" | "ratelimit" | "probe";
1457
+ action?: "deny" | "sink" | "ratelimit" | "probe";
1301
1458
  match?: "path" | "user_agent";
1302
1459
  apply?: "all" | "node" | "php" | "manual";
1303
1460
  rules?: {
@@ -1313,7 +1470,7 @@ export interface components {
1313
1470
  };
1314
1471
  WafProfileUpdate: {
1315
1472
  name?: string;
1316
- action?: "deny" | "ratelimit" | "probe";
1473
+ action?: "deny" | "sink" | "ratelimit" | "probe";
1317
1474
  match?: "path" | "user_agent";
1318
1475
  apply?: "all" | "node" | "php" | "manual";
1319
1476
  rules?: {
@@ -1579,6 +1736,98 @@ export interface components {
1579
1736
  released: string[];
1580
1737
  canceled: string[];
1581
1738
  };
1739
+ /** @description PlatformImage */
1740
+ PlatformImage: {
1741
+ /** @description PlatformImage ID */
1742
+ id: string;
1743
+ team: string;
1744
+ kind: "runtime" | "builder" | "fetcher" | "buildkit";
1745
+ /** @description Canonical key: node:22, python:3.11, static, fetcher, buildkit */
1746
+ key: string;
1747
+ /** @description Repository ref without tag */
1748
+ repository: string;
1749
+ /** @description Version served to NEW deployments/builds */
1750
+ current: string;
1751
+ /** @description Floor: deployments stamped below it are rolled to current (mandatory update) */
1752
+ min_version: string;
1753
+ /** @description A CI registration of a newer release moves current */
1754
+ auto_promote: boolean;
1755
+ versions: {
1756
+ /** @description Buildpacks release, X.Y.Z */
1757
+ version: string;
1758
+ /** @description Immutable image tag, e.g. 22-v1.20.1 */
1759
+ tag: string;
1760
+ /** @description sha256 the tag resolved to in ECR */
1761
+ digest: string;
1762
+ /** @default null */
1763
+ size: number | null;
1764
+ /** Format: date-time */
1765
+ registered_at: string;
1766
+ source: "ci" | "seed" | "manual";
1767
+ }[];
1768
+ /**
1769
+ * Format: date-time
1770
+ * @default null
1771
+ */
1772
+ updated_at: string | null;
1773
+ /** @default {} */
1774
+ metadata: {
1775
+ [key: string]: unknown;
1776
+ };
1777
+ /** @description PlatformImage creation date */
1778
+ createdAt: string;
1779
+ /** @description PlatformImage updated date */
1780
+ updatedAt?: string;
1781
+ };
1782
+ /** @description Event Platformimage Create */
1783
+ EventPlatformimageCreate: {
1784
+ /** @enum {string} */
1785
+ type: "platformimage.create";
1786
+ /** @description Timestamp */
1787
+ produced_at: number;
1788
+ payload: components["schemas"]["PlatformImage"];
1789
+ };
1790
+ /** @description Event Platformimage Update */
1791
+ EventPlatformimageUpdate: {
1792
+ /** @enum {string} */
1793
+ type: "platformimage.update";
1794
+ /** @description Timestamp */
1795
+ produced_at: number;
1796
+ payload: components["schemas"]["PlatformImage"];
1797
+ };
1798
+ /** @description Event Platformimage Delete */
1799
+ EventPlatformimageDelete: {
1800
+ /** @enum {string} */
1801
+ type: "platformimage.delete";
1802
+ /** @description Timestamp */
1803
+ produced_at: number;
1804
+ payload: components["schemas"]["PlatformImage"];
1805
+ };
1806
+ PlatformImageCreate: {
1807
+ kind: "runtime" | "builder" | "fetcher" | "buildkit";
1808
+ key: string;
1809
+ repository: string;
1810
+ current: string;
1811
+ min_version: string;
1812
+ auto_promote?: boolean;
1813
+ versions?: {
1814
+ /** @description Buildpacks release, X.Y.Z */
1815
+ version: string;
1816
+ /** @description Immutable image tag, e.g. 22-v1.20.1 */
1817
+ tag: string;
1818
+ /** @description sha256 the tag resolved to in ECR */
1819
+ digest: string;
1820
+ /** @default null */
1821
+ size: number | null;
1822
+ /** Format: date-time */
1823
+ registered_at: string;
1824
+ source: "ci" | "seed" | "manual";
1825
+ }[];
1826
+ };
1827
+ PlatformImageUpdate: {
1828
+ auto_promote?: boolean;
1829
+ repository?: string;
1830
+ };
1582
1831
  AppChecknameResponse: {
1583
1832
  name: string;
1584
1833
  slug: string;
@@ -1944,7 +2193,7 @@ export interface operations {
1944
2193
  active: boolean;
1945
2194
  /** @description Reason the app was administratively disabled. Null when the app is active. */
1946
2195
  disabled_reason?: string | null;
1947
- runtime: components["schemas"]["AppRuntime"];
2196
+ runtime: ("node" | "php" | "python") | null;
1948
2197
  runtime_strategy: string | null;
1949
2198
  detected?: {
1950
2199
  buildpack: string;
@@ -2029,7 +2278,7 @@ export interface operations {
2029
2278
  active: boolean;
2030
2279
  /** @description Reason the app was administratively disabled. Null when the app is active. */
2031
2280
  disabled_reason?: string | null;
2032
- runtime: components["schemas"]["AppRuntime"];
2281
+ runtime: ("node" | "php" | "python") | null;
2033
2282
  runtime_strategy: string | null;
2034
2283
  detected?: {
2035
2284
  buildpack: string;
@@ -2122,7 +2371,7 @@ export interface operations {
2122
2371
  active: boolean;
2123
2372
  /** @description Reason the app was administratively disabled. Null when the app is active. */
2124
2373
  disabled_reason?: string | null;
2125
- runtime: components["schemas"]["AppRuntime"];
2374
+ runtime: ("node" | "php" | "python") | null;
2126
2375
  runtime_strategy: string | null;
2127
2376
  detected?: {
2128
2377
  buildpack: string;
@@ -2204,7 +2453,7 @@ export interface operations {
2204
2453
  active: boolean;
2205
2454
  /** @description Reason the app was administratively disabled. Null when the app is active. */
2206
2455
  disabled_reason?: string | null;
2207
- runtime: components["schemas"]["AppRuntime"];
2456
+ runtime: ("node" | "php" | "python") | null;
2208
2457
  runtime_strategy: string | null;
2209
2458
  detected?: {
2210
2459
  buildpack: string;
@@ -2600,6 +2849,62 @@ export interface operations {
2600
2849
  };
2601
2850
  };
2602
2851
  };
2852
+ "app/repo_directories": {
2853
+ parameters: {
2854
+ query?: never;
2855
+ header?: never;
2856
+ path: {
2857
+ id: string;
2858
+ };
2859
+ cookie?: never;
2860
+ };
2861
+ requestBody?: never;
2862
+ responses: {
2863
+ /** @description Default Response */
2864
+ 200: {
2865
+ headers: {
2866
+ [name: string]: unknown;
2867
+ };
2868
+ content: {
2869
+ "application/json": {
2870
+ directories: {
2871
+ path: string;
2872
+ buildable: boolean;
2873
+ }[];
2874
+ truncated: boolean;
2875
+ };
2876
+ };
2877
+ };
2878
+ };
2879
+ };
2880
+ "app/set_root_dir": {
2881
+ parameters: {
2882
+ query?: never;
2883
+ header?: never;
2884
+ path: {
2885
+ id: string;
2886
+ };
2887
+ cookie?: never;
2888
+ };
2889
+ requestBody: {
2890
+ content: {
2891
+ "application/json": {
2892
+ root_dir: string | null;
2893
+ };
2894
+ };
2895
+ };
2896
+ responses: {
2897
+ /** @description App */
2898
+ 200: {
2899
+ headers: {
2900
+ [name: string]: unknown;
2901
+ };
2902
+ content: {
2903
+ "application/json": components["schemas"]["App"];
2904
+ };
2905
+ };
2906
+ };
2907
+ };
2603
2908
  "app/set_deploy_mode": {
2604
2909
  parameters: {
2605
2910
  query?: never;
@@ -2655,6 +2960,136 @@ export interface operations {
2655
2960
  };
2656
2961
  };
2657
2962
  };
2963
+ "app/waf": {
2964
+ parameters: {
2965
+ query?: never;
2966
+ header?: never;
2967
+ path: {
2968
+ app_id: string;
2969
+ };
2970
+ cookie?: never;
2971
+ };
2972
+ requestBody?: never;
2973
+ responses: {
2974
+ /** @description Default Response */
2975
+ 200: {
2976
+ headers: {
2977
+ [name: string]: unknown;
2978
+ };
2979
+ content: {
2980
+ "application/json": {
2981
+ enabled: boolean;
2982
+ platform_profiles: {
2983
+ name: string;
2984
+ action: string;
2985
+ rule_count: number;
2986
+ rules?: {
2987
+ pattern: string;
2988
+ description?: string;
2989
+ }[];
2990
+ }[];
2991
+ rules: {
2992
+ pattern: string;
2993
+ action: string;
2994
+ description?: string;
2995
+ }[];
2996
+ };
2997
+ };
2998
+ };
2999
+ };
3000
+ };
3001
+ "app/waf/addRule": {
3002
+ parameters: {
3003
+ query?: never;
3004
+ header?: never;
3005
+ path: {
3006
+ app_id: string;
3007
+ };
3008
+ cookie?: never;
3009
+ };
3010
+ requestBody: {
3011
+ content: {
3012
+ "application/json": {
3013
+ /** @description RE2 path-regex fragment, e.g. ^/robots\.txt$ */
3014
+ pattern: string;
3015
+ /** @description deny → 403 at the edge; sink → synthetic 404 from the platform (the app is never woken) */
3016
+ action: "deny" | "sink";
3017
+ description?: string;
3018
+ };
3019
+ };
3020
+ };
3021
+ responses: {
3022
+ /** @description Default Response */
3023
+ 201: {
3024
+ headers: {
3025
+ [name: string]: unknown;
3026
+ };
3027
+ content: {
3028
+ "application/json": {
3029
+ enabled: boolean;
3030
+ platform_profiles: {
3031
+ name: string;
3032
+ action: string;
3033
+ rule_count: number;
3034
+ rules?: {
3035
+ pattern: string;
3036
+ description?: string;
3037
+ }[];
3038
+ }[];
3039
+ rules: {
3040
+ pattern: string;
3041
+ action: string;
3042
+ description?: string;
3043
+ }[];
3044
+ };
3045
+ };
3046
+ };
3047
+ };
3048
+ };
3049
+ "app/waf/removeRule": {
3050
+ parameters: {
3051
+ query?: never;
3052
+ header?: never;
3053
+ path: {
3054
+ app_id: string;
3055
+ };
3056
+ cookie?: never;
3057
+ };
3058
+ requestBody: {
3059
+ content: {
3060
+ "application/json": {
3061
+ pattern: string;
3062
+ };
3063
+ };
3064
+ };
3065
+ responses: {
3066
+ /** @description Default Response */
3067
+ 200: {
3068
+ headers: {
3069
+ [name: string]: unknown;
3070
+ };
3071
+ content: {
3072
+ "application/json": {
3073
+ enabled: boolean;
3074
+ platform_profiles: {
3075
+ name: string;
3076
+ action: string;
3077
+ rule_count: number;
3078
+ rules?: {
3079
+ pattern: string;
3080
+ description?: string;
3081
+ }[];
3082
+ }[];
3083
+ rules: {
3084
+ pattern: string;
3085
+ action: string;
3086
+ description?: string;
3087
+ }[];
3088
+ };
3089
+ };
3090
+ };
3091
+ };
3092
+ };
2658
3093
  "deployment/list": {
2659
3094
  parameters: {
2660
3095
  query?: {
@@ -2730,6 +3165,9 @@ export interface operations {
2730
3165
  artifact_id?: string;
2731
3166
  /** Format: date-time */
2732
3167
  artifact_ready_at?: string;
3168
+ /** Format: date-time */
3169
+ build_started_at?: string;
3170
+ build_ms?: number;
2733
3171
  redeploy_of?: string;
2734
3172
  /** Format: date-time */
2735
3173
  quota_released_at?: string;
@@ -2780,6 +3218,9 @@ export interface operations {
2780
3218
  artifact_id?: string;
2781
3219
  /** Format: date-time */
2782
3220
  artifact_ready_at?: string;
3221
+ /** Format: date-time */
3222
+ build_started_at?: string;
3223
+ build_ms?: number;
2783
3224
  redeploy_of?: string;
2784
3225
  /** Format: date-time */
2785
3226
  quota_released_at?: string;
@@ -2839,6 +3280,9 @@ export interface operations {
2839
3280
  artifact_id?: string;
2840
3281
  /** Format: date-time */
2841
3282
  artifact_ready_at?: string;
3283
+ /** Format: date-time */
3284
+ build_started_at?: string;
3285
+ build_ms?: number;
2842
3286
  redeploy_of?: string;
2843
3287
  /** Format: date-time */
2844
3288
  quota_released_at?: string;
@@ -2889,6 +3333,9 @@ export interface operations {
2889
3333
  artifact_id?: string;
2890
3334
  /** Format: date-time */
2891
3335
  artifact_ready_at?: string;
3336
+ /** Format: date-time */
3337
+ build_started_at?: string;
3338
+ build_ms?: number;
2892
3339
  redeploy_of?: string;
2893
3340
  /** Format: date-time */
2894
3341
  quota_released_at?: string;
@@ -2943,6 +3390,59 @@ export interface operations {
2943
3390
  };
2944
3391
  };
2945
3392
  };
3393
+ "deployment/cancel": {
3394
+ parameters: {
3395
+ query?: never;
3396
+ header?: never;
3397
+ path: {
3398
+ deployment_id: string;
3399
+ };
3400
+ cookie?: never;
3401
+ };
3402
+ requestBody?: never;
3403
+ responses: {
3404
+ /** @description Deployment */
3405
+ 200: {
3406
+ headers: {
3407
+ [name: string]: unknown;
3408
+ };
3409
+ content: {
3410
+ "application/json": {
3411
+ /** @description Deployment ID */
3412
+ id: string;
3413
+ team: string;
3414
+ app_id: string;
3415
+ image?: string;
3416
+ release?: string;
3417
+ github_commit?: string;
3418
+ github_ref?: string;
3419
+ github_actor?: string;
3420
+ github_commit_message?: string;
3421
+ artifact_id?: string;
3422
+ /** Format: date-time */
3423
+ artifact_ready_at?: string;
3424
+ /** Format: date-time */
3425
+ build_started_at?: string;
3426
+ build_ms?: number;
3427
+ redeploy_of?: string;
3428
+ /** Format: date-time */
3429
+ quota_released_at?: string;
3430
+ trigger?: string | null;
3431
+ detected?: components["schemas"]["DeploymentDetected"];
3432
+ status: components["schemas"]["DeploymentStatus"];
3433
+ /** @default {} */
3434
+ metadata: {
3435
+ [key: string]: unknown;
3436
+ };
3437
+ /** @description Deployment creation date */
3438
+ createdAt: string;
3439
+ /** @description Deployment updated date */
3440
+ updatedAt?: string;
3441
+ };
3442
+ };
3443
+ };
3444
+ };
3445
+ };
2946
3446
  "domain/list": {
2947
3447
  parameters: {
2948
3448
  query?: {