@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.
package/spec/openapi.json CHANGED
@@ -519,6 +519,56 @@
519
519
  }
520
520
  ],
521
521
  "description": "Runtime resource-pressure flag (admin/owner-facing upgrade prompt)"
522
+ },
523
+ "runtime_health": {
524
+ "anyOf": [
525
+ {
526
+ "type": "object",
527
+ "required": [
528
+ "state",
529
+ "deployment",
530
+ "at"
531
+ ],
532
+ "properties": {
533
+ "state": {
534
+ "type": "string",
535
+ "description": "The container keeps exiting and being restarted (CrashLoopBackOff)",
536
+ "enum": [
537
+ "crash_loop"
538
+ ]
539
+ },
540
+ "deployment": {
541
+ "type": "string",
542
+ "description": "Deployment whose pod is crash-looping"
543
+ },
544
+ "at": {
545
+ "type": "string",
546
+ "description": "ISO time the crash loop was last observed"
547
+ },
548
+ "container": {
549
+ "type": "string",
550
+ "description": "Container that is crash-looping"
551
+ },
552
+ "restarts": {
553
+ "type": "integer",
554
+ "description": "Restart count when observed"
555
+ },
556
+ "exit_code": {
557
+ "type": "integer",
558
+ "description": "Last exit code, when reported"
559
+ },
560
+ "reason": {
561
+ "type": "string",
562
+ "description": "K8s waiting/terminated reason"
563
+ }
564
+ },
565
+ "description": "Runtime crash loop observed on the live version"
566
+ },
567
+ {
568
+ "type": "null"
569
+ }
570
+ ],
571
+ "description": "Runtime health flag for the promoted deployment (owner-facing outage signal)"
522
572
  }
523
573
  }
524
574
  },
@@ -612,7 +662,18 @@
612
662
  "description": "Reason the app was administratively disabled. Null when the app is active."
613
663
  },
614
664
  "runtime": {
615
- "$ref": "#/components/schemas/AppRuntime"
665
+ "anyOf": [
666
+ {
667
+ "enum": [
668
+ "node",
669
+ "php",
670
+ "python"
671
+ ]
672
+ },
673
+ {
674
+ "type": "null"
675
+ }
676
+ ]
616
677
  },
617
678
  "runtime_strategy": {
618
679
  "anyOf": [
@@ -1073,6 +1134,36 @@
1073
1134
  }
1074
1135
  }
1075
1136
  },
1137
+ "RepoDirectories": {
1138
+ "type": "object",
1139
+ "required": [
1140
+ "directories",
1141
+ "truncated"
1142
+ ],
1143
+ "properties": {
1144
+ "directories": {
1145
+ "type": "array",
1146
+ "items": {
1147
+ "type": "object",
1148
+ "required": [
1149
+ "path",
1150
+ "buildable"
1151
+ ],
1152
+ "properties": {
1153
+ "path": {
1154
+ "type": "string"
1155
+ },
1156
+ "buildable": {
1157
+ "type": "boolean"
1158
+ }
1159
+ }
1160
+ }
1161
+ },
1162
+ "truncated": {
1163
+ "type": "boolean"
1164
+ }
1165
+ }
1166
+ },
1076
1167
  "DeployNowResult": {
1077
1168
  "type": "object",
1078
1169
  "required": [
@@ -1095,6 +1186,79 @@
1095
1186
  }
1096
1187
  }
1097
1188
  },
1189
+ "AppWafView": {
1190
+ "type": "object",
1191
+ "required": [
1192
+ "enabled",
1193
+ "platform_profiles",
1194
+ "rules"
1195
+ ],
1196
+ "properties": {
1197
+ "enabled": {
1198
+ "type": "boolean"
1199
+ },
1200
+ "platform_profiles": {
1201
+ "type": "array",
1202
+ "items": {
1203
+ "type": "object",
1204
+ "required": [
1205
+ "name",
1206
+ "action",
1207
+ "rule_count"
1208
+ ],
1209
+ "properties": {
1210
+ "name": {
1211
+ "type": "string"
1212
+ },
1213
+ "action": {
1214
+ "type": "string"
1215
+ },
1216
+ "rule_count": {
1217
+ "type": "integer"
1218
+ },
1219
+ "rules": {
1220
+ "type": "array",
1221
+ "items": {
1222
+ "type": "object",
1223
+ "required": [
1224
+ "pattern"
1225
+ ],
1226
+ "properties": {
1227
+ "pattern": {
1228
+ "type": "string"
1229
+ },
1230
+ "description": {
1231
+ "type": "string"
1232
+ }
1233
+ }
1234
+ }
1235
+ }
1236
+ }
1237
+ }
1238
+ },
1239
+ "rules": {
1240
+ "type": "array",
1241
+ "items": {
1242
+ "type": "object",
1243
+ "required": [
1244
+ "pattern",
1245
+ "action"
1246
+ ],
1247
+ "properties": {
1248
+ "pattern": {
1249
+ "type": "string"
1250
+ },
1251
+ "action": {
1252
+ "type": "string"
1253
+ },
1254
+ "description": {
1255
+ "type": "string"
1256
+ }
1257
+ }
1258
+ }
1259
+ }
1260
+ }
1261
+ },
1098
1262
  "DeploymentStatus": {
1099
1263
  "type": "object",
1100
1264
  "required": [
@@ -1153,7 +1317,15 @@
1153
1317
  },
1154
1318
  "runtime_image": {
1155
1319
  "type": "string",
1156
- "description": "Digest-pinned runtime image stamped at first materialization (artifact deploys)"
1320
+ "description": "Runtime image (immutable version tag) this artifact deployment runs"
1321
+ },
1322
+ "fetcher_image": {
1323
+ "type": "string",
1324
+ "description": "Fetcher image (immutable version tag) of the artifact-prepare initContainer"
1325
+ },
1326
+ "builder_image": {
1327
+ "type": "string",
1328
+ "description": "Builder image (immutable version tag) that built this deployment"
1157
1329
  }
1158
1330
  },
1159
1331
  "additionalProperties": false
@@ -1385,6 +1557,13 @@
1385
1557
  "type": "string",
1386
1558
  "format": "date-time"
1387
1559
  },
1560
+ "build_started_at": {
1561
+ "type": "string",
1562
+ "format": "date-time"
1563
+ },
1564
+ "build_ms": {
1565
+ "type": "integer"
1566
+ },
1388
1567
  "redeploy_of": {
1389
1568
  "type": "string"
1390
1569
  },
@@ -1863,6 +2042,12 @@
1863
2042
  "deny"
1864
2043
  ]
1865
2044
  },
2045
+ {
2046
+ "type": "string",
2047
+ "enum": [
2048
+ "sink"
2049
+ ]
2050
+ },
1866
2051
  {
1867
2052
  "type": "string",
1868
2053
  "enum": [
@@ -1921,6 +2106,38 @@
1921
2106
  }
1922
2107
  ]
1923
2108
  },
2109
+ "except": {
2110
+ "type": "array",
2111
+ "items": {
2112
+ "anyOf": [
2113
+ {
2114
+ "type": "string",
2115
+ "enum": [
2116
+ "all"
2117
+ ]
2118
+ },
2119
+ {
2120
+ "type": "string",
2121
+ "enum": [
2122
+ "node"
2123
+ ]
2124
+ },
2125
+ {
2126
+ "type": "string",
2127
+ "enum": [
2128
+ "php"
2129
+ ]
2130
+ },
2131
+ {
2132
+ "type": "string",
2133
+ "enum": [
2134
+ "manual"
2135
+ ]
2136
+ }
2137
+ ]
2138
+ },
2139
+ "description": "Runtimes excluded from `apply` (e.g. [\"php\"])"
2140
+ },
1924
2141
  "rules": {
1925
2142
  "type": "array",
1926
2143
  "items": {
@@ -2109,6 +2326,12 @@
2109
2326
  "deny"
2110
2327
  ]
2111
2328
  },
2329
+ {
2330
+ "type": "string",
2331
+ "enum": [
2332
+ "sink"
2333
+ ]
2334
+ },
2112
2335
  {
2113
2336
  "type": "string",
2114
2337
  "enum": [
@@ -2214,6 +2437,12 @@
2214
2437
  "deny"
2215
2438
  ]
2216
2439
  },
2440
+ {
2441
+ "type": "string",
2442
+ "enum": [
2443
+ "sink"
2444
+ ]
2445
+ },
2217
2446
  {
2218
2447
  "type": "string",
2219
2448
  "enum": [
@@ -3097,70 +3326,160 @@
3097
3326
  }
3098
3327
  }
3099
3328
  },
3100
- "AppChecknameResponse": {
3329
+ "PlatformImage": {
3101
3330
  "type": "object",
3102
3331
  "required": [
3103
- "name",
3104
- "slug",
3105
- "availiable"
3332
+ "id",
3333
+ "team",
3334
+ "kind",
3335
+ "key",
3336
+ "repository",
3337
+ "current",
3338
+ "min_version",
3339
+ "auto_promote",
3340
+ "versions",
3341
+ "metadata",
3342
+ "createdAt"
3106
3343
  ],
3107
3344
  "properties": {
3108
- "name": {
3109
- "type": "string"
3345
+ "id": {
3346
+ "type": "string",
3347
+ "description": "PlatformImage ID"
3110
3348
  },
3111
- "slug": {
3349
+ "team": {
3112
3350
  "type": "string"
3113
3351
  },
3114
- "url": {
3115
- "type": "string"
3352
+ "kind": {
3353
+ "anyOf": [
3354
+ {
3355
+ "type": "string",
3356
+ "enum": [
3357
+ "runtime"
3358
+ ]
3359
+ },
3360
+ {
3361
+ "type": "string",
3362
+ "enum": [
3363
+ "builder"
3364
+ ]
3365
+ },
3366
+ {
3367
+ "type": "string",
3368
+ "enum": [
3369
+ "fetcher"
3370
+ ]
3371
+ },
3372
+ {
3373
+ "type": "string",
3374
+ "enum": [
3375
+ "buildkit"
3376
+ ]
3377
+ }
3378
+ ]
3116
3379
  },
3117
- "availiable": {
3118
- "type": "boolean",
3119
- "description": "check if slug is availiable"
3380
+ "key": {
3381
+ "type": "string",
3382
+ "description": "Canonical key: node:22, python:3.11, static, fetcher, buildkit"
3120
3383
  },
3121
- "error": {
3122
- "type": "string"
3123
- }
3124
- }
3125
- },
3126
- "EventAppStatus": {
3127
- "type": "object",
3128
- "required": [
3129
- "type",
3130
- "produced_at",
3131
- "payload"
3132
- ],
3133
- "properties": {
3134
- "type": {
3384
+ "repository": {
3135
3385
  "type": "string",
3136
- "enum": [
3137
- "app.status"
3138
- ]
3386
+ "description": "Repository ref without tag"
3139
3387
  },
3140
- "produced_at": {
3141
- "type": "number",
3142
- "description": "Timestamp"
3388
+ "current": {
3389
+ "type": "string",
3390
+ "description": "Version served to NEW deployments/builds"
3143
3391
  },
3144
- "payload": {
3145
- "type": "object",
3146
- "required": [
3147
- "id",
3148
- "status"
3149
- ],
3150
- "properties": {
3151
- "id": {
3152
- "type": "string"
3153
- },
3154
- "status": {
3155
- "$ref": "#/components/schemas/AppStatus"
3156
- }
3392
+ "min_version": {
3393
+ "type": "string",
3394
+ "description": "Floor: deployments stamped below it are rolled to current (mandatory update)"
3395
+ },
3396
+ "auto_promote": {
3397
+ "type": "boolean",
3398
+ "description": "A CI registration of a newer release moves current"
3399
+ },
3400
+ "versions": {
3401
+ "type": "array",
3402
+ "items": {
3403
+ "type": "object",
3404
+ "required": [
3405
+ "version",
3406
+ "tag",
3407
+ "digest",
3408
+ "registered_at",
3409
+ "source"
3410
+ ],
3411
+ "properties": {
3412
+ "version": {
3413
+ "type": "string",
3414
+ "description": "Buildpacks release, X.Y.Z"
3415
+ },
3416
+ "tag": {
3417
+ "type": "string",
3418
+ "description": "Immutable image tag, e.g. 22-v1.20.1"
3419
+ },
3420
+ "digest": {
3421
+ "type": "string",
3422
+ "description": "sha256 the tag resolved to in ECR"
3423
+ },
3424
+ "size": {
3425
+ "type": "number",
3426
+ "nullable": true,
3427
+ "default": null
3428
+ },
3429
+ "registered_at": {
3430
+ "type": "string",
3431
+ "format": "date-time"
3432
+ },
3433
+ "source": {
3434
+ "anyOf": [
3435
+ {
3436
+ "type": "string",
3437
+ "enum": [
3438
+ "ci"
3439
+ ]
3440
+ },
3441
+ {
3442
+ "type": "string",
3443
+ "enum": [
3444
+ "seed"
3445
+ ]
3446
+ },
3447
+ {
3448
+ "type": "string",
3449
+ "enum": [
3450
+ "manual"
3451
+ ]
3452
+ }
3453
+ ]
3454
+ }
3455
+ }
3157
3456
  }
3457
+ },
3458
+ "updated_at": {
3459
+ "type": "string",
3460
+ "format": "date-time",
3461
+ "nullable": true,
3462
+ "default": null
3463
+ },
3464
+ "metadata": {
3465
+ "type": "object",
3466
+ "properties": {},
3467
+ "additionalProperties": true,
3468
+ "default": {}
3469
+ },
3470
+ "createdAt": {
3471
+ "type": "string",
3472
+ "description": "PlatformImage creation date"
3473
+ },
3474
+ "updatedAt": {
3475
+ "type": "string",
3476
+ "description": "PlatformImage updated date"
3158
3477
  }
3159
3478
  },
3160
- "description": "Event App Status",
3479
+ "description": "PlatformImage",
3161
3480
  "additionalProperties": false
3162
3481
  },
3163
- "EventDeploymentStatus": {
3482
+ "EventPlatformimageCreate": {
3164
3483
  "type": "object",
3165
3484
  "required": [
3166
3485
  "type",
@@ -3171,7 +3490,232 @@
3171
3490
  "type": {
3172
3491
  "type": "string",
3173
3492
  "enum": [
3174
- "deployment.status"
3493
+ "platformimage.create"
3494
+ ]
3495
+ },
3496
+ "produced_at": {
3497
+ "type": "number",
3498
+ "description": "Timestamp"
3499
+ },
3500
+ "payload": {
3501
+ "$ref": "#/components/schemas/PlatformImage"
3502
+ }
3503
+ },
3504
+ "description": "Event Platformimage Create",
3505
+ "additionalProperties": false
3506
+ },
3507
+ "EventPlatformimageUpdate": {
3508
+ "type": "object",
3509
+ "required": [
3510
+ "type",
3511
+ "produced_at",
3512
+ "payload"
3513
+ ],
3514
+ "properties": {
3515
+ "type": {
3516
+ "type": "string",
3517
+ "enum": [
3518
+ "platformimage.update"
3519
+ ]
3520
+ },
3521
+ "produced_at": {
3522
+ "type": "number",
3523
+ "description": "Timestamp"
3524
+ },
3525
+ "payload": {
3526
+ "$ref": "#/components/schemas/PlatformImage"
3527
+ }
3528
+ },
3529
+ "description": "Event Platformimage Update",
3530
+ "additionalProperties": false
3531
+ },
3532
+ "EventPlatformimageDelete": {
3533
+ "type": "object",
3534
+ "required": [
3535
+ "type",
3536
+ "produced_at",
3537
+ "payload"
3538
+ ],
3539
+ "properties": {
3540
+ "type": {
3541
+ "type": "string",
3542
+ "enum": [
3543
+ "platformimage.delete"
3544
+ ]
3545
+ },
3546
+ "produced_at": {
3547
+ "type": "number",
3548
+ "description": "Timestamp"
3549
+ },
3550
+ "payload": {
3551
+ "$ref": "#/components/schemas/PlatformImage"
3552
+ }
3553
+ },
3554
+ "description": "Event Platformimage Delete",
3555
+ "additionalProperties": false
3556
+ },
3557
+ "PlatformImageCreate": {
3558
+ "type": "object",
3559
+ "required": [
3560
+ "kind",
3561
+ "key",
3562
+ "repository",
3563
+ "current",
3564
+ "min_version"
3565
+ ],
3566
+ "properties": {
3567
+ "kind": {
3568
+ "anyOf": [
3569
+ {
3570
+ "type": "string",
3571
+ "enum": [
3572
+ "runtime"
3573
+ ]
3574
+ },
3575
+ {
3576
+ "type": "string",
3577
+ "enum": [
3578
+ "builder"
3579
+ ]
3580
+ },
3581
+ {
3582
+ "type": "string",
3583
+ "enum": [
3584
+ "fetcher"
3585
+ ]
3586
+ },
3587
+ {
3588
+ "type": "string",
3589
+ "enum": [
3590
+ "buildkit"
3591
+ ]
3592
+ }
3593
+ ]
3594
+ },
3595
+ "key": {
3596
+ "type": "string"
3597
+ },
3598
+ "repository": {
3599
+ "type": "string"
3600
+ },
3601
+ "current": {
3602
+ "type": "string"
3603
+ },
3604
+ "min_version": {
3605
+ "type": "string"
3606
+ },
3607
+ "auto_promote": {
3608
+ "type": "boolean"
3609
+ },
3610
+ "versions": {
3611
+ "type": "array",
3612
+ "items": {
3613
+ "type": "object",
3614
+ "required": [
3615
+ "version",
3616
+ "tag",
3617
+ "digest",
3618
+ "registered_at",
3619
+ "source"
3620
+ ],
3621
+ "properties": {
3622
+ "version": {
3623
+ "type": "string",
3624
+ "description": "Buildpacks release, X.Y.Z"
3625
+ },
3626
+ "tag": {
3627
+ "type": "string",
3628
+ "description": "Immutable image tag, e.g. 22-v1.20.1"
3629
+ },
3630
+ "digest": {
3631
+ "type": "string",
3632
+ "description": "sha256 the tag resolved to in ECR"
3633
+ },
3634
+ "size": {
3635
+ "type": "number",
3636
+ "nullable": true,
3637
+ "default": null
3638
+ },
3639
+ "registered_at": {
3640
+ "type": "string",
3641
+ "format": "date-time"
3642
+ },
3643
+ "source": {
3644
+ "anyOf": [
3645
+ {
3646
+ "type": "string",
3647
+ "enum": [
3648
+ "ci"
3649
+ ]
3650
+ },
3651
+ {
3652
+ "type": "string",
3653
+ "enum": [
3654
+ "seed"
3655
+ ]
3656
+ },
3657
+ {
3658
+ "type": "string",
3659
+ "enum": [
3660
+ "manual"
3661
+ ]
3662
+ }
3663
+ ]
3664
+ }
3665
+ }
3666
+ }
3667
+ }
3668
+ }
3669
+ },
3670
+ "PlatformImageUpdate": {
3671
+ "type": "object",
3672
+ "properties": {
3673
+ "auto_promote": {
3674
+ "type": "boolean"
3675
+ },
3676
+ "repository": {
3677
+ "type": "string"
3678
+ }
3679
+ }
3680
+ },
3681
+ "AppChecknameResponse": {
3682
+ "type": "object",
3683
+ "required": [
3684
+ "name",
3685
+ "slug",
3686
+ "availiable"
3687
+ ],
3688
+ "properties": {
3689
+ "name": {
3690
+ "type": "string"
3691
+ },
3692
+ "slug": {
3693
+ "type": "string"
3694
+ },
3695
+ "url": {
3696
+ "type": "string"
3697
+ },
3698
+ "availiable": {
3699
+ "type": "boolean",
3700
+ "description": "check if slug is availiable"
3701
+ },
3702
+ "error": {
3703
+ "type": "string"
3704
+ }
3705
+ }
3706
+ },
3707
+ "EventAppStatus": {
3708
+ "type": "object",
3709
+ "required": [
3710
+ "type",
3711
+ "produced_at",
3712
+ "payload"
3713
+ ],
3714
+ "properties": {
3715
+ "type": {
3716
+ "type": "string",
3717
+ "enum": [
3718
+ "app.status"
3175
3719
  ]
3176
3720
  },
3177
3721
  "produced_at": {
@@ -3189,15 +3733,15 @@
3189
3733
  "type": "string"
3190
3734
  },
3191
3735
  "status": {
3192
- "$ref": "#/components/schemas/DeploymentStatus"
3736
+ "$ref": "#/components/schemas/AppStatus"
3193
3737
  }
3194
3738
  }
3195
3739
  }
3196
3740
  },
3197
- "description": "Event Deployment Status",
3741
+ "description": "Event App Status",
3198
3742
  "additionalProperties": false
3199
3743
  },
3200
- "EventDomainStatus": {
3744
+ "EventDeploymentStatus": {
3201
3745
  "type": "object",
3202
3746
  "required": [
3203
3747
  "type",
@@ -3208,7 +3752,7 @@
3208
3752
  "type": {
3209
3753
  "type": "string",
3210
3754
  "enum": [
3211
- "domain.status"
3755
+ "deployment.status"
3212
3756
  ]
3213
3757
  },
3214
3758
  "produced_at": {
@@ -3226,16 +3770,53 @@
3226
3770
  "type": "string"
3227
3771
  },
3228
3772
  "status": {
3229
- "$ref": "#/components/schemas/DomainStatus"
3773
+ "$ref": "#/components/schemas/DeploymentStatus"
3230
3774
  }
3231
3775
  }
3232
3776
  }
3233
3777
  },
3234
- "description": "Event Domain Status",
3778
+ "description": "Event Deployment Status",
3235
3779
  "additionalProperties": false
3236
- }
3237
- }
3238
- },
3780
+ },
3781
+ "EventDomainStatus": {
3782
+ "type": "object",
3783
+ "required": [
3784
+ "type",
3785
+ "produced_at",
3786
+ "payload"
3787
+ ],
3788
+ "properties": {
3789
+ "type": {
3790
+ "type": "string",
3791
+ "enum": [
3792
+ "domain.status"
3793
+ ]
3794
+ },
3795
+ "produced_at": {
3796
+ "type": "number",
3797
+ "description": "Timestamp"
3798
+ },
3799
+ "payload": {
3800
+ "type": "object",
3801
+ "required": [
3802
+ "id",
3803
+ "status"
3804
+ ],
3805
+ "properties": {
3806
+ "id": {
3807
+ "type": "string"
3808
+ },
3809
+ "status": {
3810
+ "$ref": "#/components/schemas/DomainStatus"
3811
+ }
3812
+ }
3813
+ }
3814
+ },
3815
+ "description": "Event Domain Status",
3816
+ "additionalProperties": false
3817
+ }
3818
+ }
3819
+ },
3239
3820
  "paths": {
3240
3821
  "/project/{id}/invite": {
3241
3822
  "post": {
@@ -4161,7 +4742,18 @@
4161
4742
  "description": "Reason the app was administratively disabled. Null when the app is active."
4162
4743
  },
4163
4744
  "runtime": {
4164
- "$ref": "#/components/schemas/AppRuntime"
4745
+ "anyOf": [
4746
+ {
4747
+ "enum": [
4748
+ "node",
4749
+ "php",
4750
+ "python"
4751
+ ]
4752
+ },
4753
+ {
4754
+ "type": "null"
4755
+ }
4756
+ ]
4165
4757
  },
4166
4758
  "runtime_strategy": {
4167
4759
  "anyOf": [
@@ -4514,7 +5106,18 @@
4514
5106
  "description": "Reason the app was administratively disabled. Null when the app is active."
4515
5107
  },
4516
5108
  "runtime": {
4517
- "$ref": "#/components/schemas/AppRuntime"
5109
+ "anyOf": [
5110
+ {
5111
+ "enum": [
5112
+ "node",
5113
+ "php",
5114
+ "python"
5115
+ ]
5116
+ },
5117
+ {
5118
+ "type": "null"
5119
+ }
5120
+ ]
4518
5121
  },
4519
5122
  "runtime_strategy": {
4520
5123
  "anyOf": [
@@ -4886,7 +5489,18 @@
4886
5489
  "description": "Reason the app was administratively disabled. Null when the app is active."
4887
5490
  },
4888
5491
  "runtime": {
4889
- "$ref": "#/components/schemas/AppRuntime"
5492
+ "anyOf": [
5493
+ {
5494
+ "enum": [
5495
+ "node",
5496
+ "php",
5497
+ "python"
5498
+ ]
5499
+ },
5500
+ {
5501
+ "type": "null"
5502
+ }
5503
+ ]
4890
5504
  },
4891
5505
  "runtime_strategy": {
4892
5506
  "anyOf": [
@@ -5219,7 +5833,18 @@
5219
5833
  "description": "Reason the app was administratively disabled. Null when the app is active."
5220
5834
  },
5221
5835
  "runtime": {
5222
- "$ref": "#/components/schemas/AppRuntime"
5836
+ "anyOf": [
5837
+ {
5838
+ "enum": [
5839
+ "node",
5840
+ "php",
5841
+ "python"
5842
+ ]
5843
+ },
5844
+ {
5845
+ "type": "null"
5846
+ }
5847
+ ]
5223
5848
  },
5224
5849
  "runtime_strategy": {
5225
5850
  "anyOf": [
@@ -6025,36 +6650,407 @@
6025
6650
  "items": {
6026
6651
  "type": "object",
6027
6652
  "required": [
6028
- "referer",
6029
- "requests"
6653
+ "referer",
6654
+ "requests"
6655
+ ],
6656
+ "properties": {
6657
+ "referer": {
6658
+ "type": "string"
6659
+ },
6660
+ "requests": {
6661
+ "type": "integer"
6662
+ }
6663
+ }
6664
+ }
6665
+ },
6666
+ "top_user_agents": {
6667
+ "type": "array",
6668
+ "items": {
6669
+ "type": "object",
6670
+ "required": [
6671
+ "user_agent",
6672
+ "requests"
6673
+ ],
6674
+ "properties": {
6675
+ "user_agent": {
6676
+ "type": "string"
6677
+ },
6678
+ "requests": {
6679
+ "type": "integer"
6680
+ }
6681
+ }
6682
+ }
6683
+ }
6684
+ }
6685
+ }
6686
+ }
6687
+ }
6688
+ }
6689
+ }
6690
+ }
6691
+ },
6692
+ "/app/{id}/link-repository": {
6693
+ "post": {
6694
+ "operationId": "app/link_repository",
6695
+ "summary": "Link a GitHub repository to an app",
6696
+ "tags": [
6697
+ "apps",
6698
+ "github"
6699
+ ],
6700
+ "description": "Link a GitHub repository to an app after verifying the user has a connected GitHub identity with access to the repository.",
6701
+ "requestBody": {
6702
+ "required": true,
6703
+ "content": {
6704
+ "application/json": {
6705
+ "schema": {
6706
+ "type": "object",
6707
+ "required": [
6708
+ "repository"
6709
+ ],
6710
+ "properties": {
6711
+ "repository": {
6712
+ "type": "string",
6713
+ "description": "GitHub repository in \"owner/repo\" form"
6714
+ },
6715
+ "github_branch": {
6716
+ "type": "string",
6717
+ "description": "Branch to deploy from. Defaults to the repo default."
6718
+ },
6719
+ "github_installation_id": {
6720
+ "type": "string",
6721
+ "description": "Installation the repo belongs to. When provided, verification is scoped to it (faster) instead of scanning every installation."
6722
+ }
6723
+ },
6724
+ "additionalProperties": false
6725
+ }
6726
+ }
6727
+ }
6728
+ },
6729
+ "parameters": [
6730
+ {
6731
+ "schema": {
6732
+ "type": "string"
6733
+ },
6734
+ "in": "path",
6735
+ "name": "id",
6736
+ "required": true
6737
+ }
6738
+ ],
6739
+ "security": [
6740
+ {
6741
+ "faable_user": []
6742
+ },
6743
+ {
6744
+ "faable_cli": []
6745
+ },
6746
+ {
6747
+ "faable_m2m": []
6748
+ },
6749
+ {
6750
+ "faable_machine": []
6751
+ },
6752
+ {
6753
+ "apikey_basic": []
6754
+ },
6755
+ {
6756
+ "apikey": []
6757
+ }
6758
+ ],
6759
+ "responses": {
6760
+ "200": {
6761
+ "description": "App",
6762
+ "content": {
6763
+ "application/json": {
6764
+ "schema": {
6765
+ "$ref": "#/components/schemas/App"
6766
+ }
6767
+ }
6768
+ }
6769
+ }
6770
+ }
6771
+ }
6772
+ },
6773
+ "/app/{id}/unlink-repository": {
6774
+ "post": {
6775
+ "operationId": "app/unlink_repository",
6776
+ "summary": "Unlink the GitHub repository from an app",
6777
+ "tags": [
6778
+ "apps",
6779
+ "github"
6780
+ ],
6781
+ "description": "Unlink the GitHub repository from an app.",
6782
+ "parameters": [
6783
+ {
6784
+ "schema": {
6785
+ "type": "string"
6786
+ },
6787
+ "in": "path",
6788
+ "name": "id",
6789
+ "required": true
6790
+ }
6791
+ ],
6792
+ "security": [
6793
+ {
6794
+ "faable_user": []
6795
+ },
6796
+ {
6797
+ "faable_cli": []
6798
+ },
6799
+ {
6800
+ "faable_m2m": []
6801
+ },
6802
+ {
6803
+ "faable_machine": []
6804
+ },
6805
+ {
6806
+ "apikey_basic": []
6807
+ },
6808
+ {
6809
+ "apikey": []
6810
+ }
6811
+ ],
6812
+ "responses": {
6813
+ "200": {
6814
+ "description": "App",
6815
+ "content": {
6816
+ "application/json": {
6817
+ "schema": {
6818
+ "$ref": "#/components/schemas/App"
6819
+ }
6820
+ }
6821
+ }
6822
+ }
6823
+ }
6824
+ }
6825
+ },
6826
+ "/app/{id}/deploy-branch": {
6827
+ "post": {
6828
+ "operationId": "app/set_deploy_branch",
6829
+ "summary": "Change the deploy branch",
6830
+ "tags": [
6831
+ "apps",
6832
+ "github"
6833
+ ],
6834
+ "description": "Change the branch the app deploys from. Apps deploying from their own GitHub Actions workflow must update the branch trigger in the workflow file themselves.",
6835
+ "requestBody": {
6836
+ "required": true,
6837
+ "content": {
6838
+ "application/json": {
6839
+ "schema": {
6840
+ "type": "object",
6841
+ "required": [
6842
+ "github_branch"
6843
+ ],
6844
+ "properties": {
6845
+ "github_branch": {
6846
+ "type": "string",
6847
+ "minLength": 1,
6848
+ "maxLength": 250
6849
+ }
6850
+ },
6851
+ "additionalProperties": false
6852
+ }
6853
+ }
6854
+ }
6855
+ },
6856
+ "parameters": [
6857
+ {
6858
+ "schema": {
6859
+ "type": "string"
6860
+ },
6861
+ "in": "path",
6862
+ "name": "id",
6863
+ "required": true
6864
+ }
6865
+ ],
6866
+ "security": [
6867
+ {
6868
+ "faable_user": []
6869
+ },
6870
+ {
6871
+ "faable_cli": []
6872
+ },
6873
+ {
6874
+ "faable_m2m": []
6875
+ },
6876
+ {
6877
+ "faable_machine": []
6878
+ },
6879
+ {
6880
+ "apikey_basic": []
6881
+ },
6882
+ {
6883
+ "apikey": []
6884
+ }
6885
+ ],
6886
+ "responses": {
6887
+ "200": {
6888
+ "description": "Default Response",
6889
+ "content": {
6890
+ "application/json": {
6891
+ "schema": {
6892
+ "type": "object",
6893
+ "required": [
6894
+ "github_branch",
6895
+ "workflow_synced"
6896
+ ],
6897
+ "properties": {
6898
+ "github_branch": {
6899
+ "type": "string"
6900
+ },
6901
+ "workflow_synced": {
6902
+ "type": "boolean"
6903
+ }
6904
+ }
6905
+ }
6906
+ }
6907
+ }
6908
+ }
6909
+ }
6910
+ }
6911
+ },
6912
+ "/app/{id}/repo/branches": {
6913
+ "get": {
6914
+ "operationId": "app/repo_branches",
6915
+ "summary": "List repository branches",
6916
+ "tags": [
6917
+ "apps",
6918
+ "github"
6919
+ ],
6920
+ "description": "Branch names of the linked repository.",
6921
+ "parameters": [
6922
+ {
6923
+ "schema": {
6924
+ "type": "string"
6925
+ },
6926
+ "in": "path",
6927
+ "name": "id",
6928
+ "required": true
6929
+ }
6930
+ ],
6931
+ "security": [
6932
+ {
6933
+ "faable_user": []
6934
+ },
6935
+ {
6936
+ "faable_cli": []
6937
+ },
6938
+ {
6939
+ "faable_m2m": []
6940
+ },
6941
+ {
6942
+ "faable_machine": []
6943
+ },
6944
+ {
6945
+ "apikey_basic": []
6946
+ },
6947
+ {
6948
+ "apikey": []
6949
+ }
6950
+ ],
6951
+ "responses": {
6952
+ "200": {
6953
+ "description": "Default Response",
6954
+ "content": {
6955
+ "application/json": {
6956
+ "schema": {
6957
+ "type": "object",
6958
+ "required": [
6959
+ "branches"
6960
+ ],
6961
+ "properties": {
6962
+ "branches": {
6963
+ "type": "array",
6964
+ "items": {
6965
+ "type": "string"
6966
+ }
6967
+ }
6968
+ }
6969
+ }
6970
+ }
6971
+ }
6972
+ }
6973
+ }
6974
+ }
6975
+ },
6976
+ "/app/{id}/repo/workflows": {
6977
+ "get": {
6978
+ "operationId": "app/repo_workflows",
6979
+ "summary": "List repository workflow files",
6980
+ "tags": [
6981
+ "apps",
6982
+ "github"
6983
+ ],
6984
+ "description": "GitHub Actions workflow files present on the linked repository (deploy branch).",
6985
+ "parameters": [
6986
+ {
6987
+ "schema": {
6988
+ "type": "string"
6989
+ },
6990
+ "in": "path",
6991
+ "name": "id",
6992
+ "required": true
6993
+ }
6994
+ ],
6995
+ "security": [
6996
+ {
6997
+ "faable_user": []
6998
+ },
6999
+ {
7000
+ "faable_cli": []
7001
+ },
7002
+ {
7003
+ "faable_m2m": []
7004
+ },
7005
+ {
7006
+ "faable_machine": []
7007
+ },
7008
+ {
7009
+ "apikey_basic": []
7010
+ },
7011
+ {
7012
+ "apikey": []
7013
+ }
7014
+ ],
7015
+ "responses": {
7016
+ "200": {
7017
+ "description": "Default Response",
7018
+ "content": {
7019
+ "application/json": {
7020
+ "schema": {
7021
+ "type": "object",
7022
+ "required": [
7023
+ "workflows",
7024
+ "deploy_workflow"
7025
+ ],
7026
+ "properties": {
7027
+ "workflows": {
7028
+ "type": "array",
7029
+ "items": {
7030
+ "type": "object",
7031
+ "required": [
7032
+ "name",
7033
+ "path"
6030
7034
  ],
6031
7035
  "properties": {
6032
- "referer": {
7036
+ "name": {
6033
7037
  "type": "string"
6034
7038
  },
6035
- "requests": {
6036
- "type": "integer"
7039
+ "path": {
7040
+ "type": "string"
6037
7041
  }
6038
7042
  }
6039
7043
  }
6040
7044
  },
6041
- "top_user_agents": {
6042
- "type": "array",
6043
- "items": {
6044
- "type": "object",
6045
- "required": [
6046
- "user_agent",
6047
- "requests"
6048
- ],
6049
- "properties": {
6050
- "user_agent": {
6051
- "type": "string"
6052
- },
6053
- "requests": {
6054
- "type": "integer"
6055
- }
7045
+ "deploy_workflow": {
7046
+ "anyOf": [
7047
+ {
7048
+ "type": "string"
7049
+ },
7050
+ {
7051
+ "type": "null"
6056
7052
  }
6057
- }
7053
+ ]
6058
7054
  }
6059
7055
  }
6060
7056
  }
@@ -6064,43 +7060,103 @@
6064
7060
  }
6065
7061
  }
6066
7062
  },
6067
- "/app/{id}/link-repository": {
6068
- "post": {
6069
- "operationId": "app/link_repository",
6070
- "summary": "Link a GitHub repository to an app",
7063
+ "/app/{id}/repo/config": {
7064
+ "get": {
7065
+ "operationId": "app/repo_config",
7066
+ "summary": "Get effective repository build config",
6071
7067
  "tags": [
6072
7068
  "apps",
6073
7069
  "github"
6074
7070
  ],
6075
- "description": "Link a GitHub repository to an app after verifying the user has a connected GitHub identity with access to the repository.",
6076
- "requestBody": {
6077
- "required": true,
6078
- "content": {
6079
- "application/json": {
6080
- "schema": {
6081
- "type": "object",
6082
- "required": [
6083
- "repository"
6084
- ],
6085
- "properties": {
6086
- "repository": {
6087
- "type": "string",
6088
- "description": "GitHub repository in \"owner/repo\" form"
6089
- },
6090
- "github_branch": {
6091
- "type": "string",
6092
- "description": "Branch to deploy from. Defaults to the repo default."
6093
- },
6094
- "github_installation_id": {
6095
- "type": "string",
6096
- "description": "Installation the repo belongs to. When provided, verification is scoped to it (faster) instead of scanning every installation."
7071
+ "description": "Effective build configuration read from the repository: the monorepo Root Directory and its source (platform override or the repo's faable.json).",
7072
+ "parameters": [
7073
+ {
7074
+ "schema": {
7075
+ "type": "string"
7076
+ },
7077
+ "in": "path",
7078
+ "name": "id",
7079
+ "required": true
7080
+ }
7081
+ ],
7082
+ "security": [
7083
+ {
7084
+ "faable_user": []
7085
+ },
7086
+ {
7087
+ "faable_cli": []
7088
+ },
7089
+ {
7090
+ "faable_m2m": []
7091
+ },
7092
+ {
7093
+ "faable_machine": []
7094
+ },
7095
+ {
7096
+ "apikey_basic": []
7097
+ },
7098
+ {
7099
+ "apikey": []
7100
+ }
7101
+ ],
7102
+ "responses": {
7103
+ "200": {
7104
+ "description": "Default Response",
7105
+ "content": {
7106
+ "application/json": {
7107
+ "schema": {
7108
+ "type": "object",
7109
+ "required": [
7110
+ "root_dir",
7111
+ "root_dir_source"
7112
+ ],
7113
+ "properties": {
7114
+ "root_dir": {
7115
+ "anyOf": [
7116
+ {
7117
+ "type": "string"
7118
+ },
7119
+ {
7120
+ "type": "null"
7121
+ }
7122
+ ]
7123
+ },
7124
+ "root_dir_source": {
7125
+ "anyOf": [
7126
+ {
7127
+ "type": "string",
7128
+ "enum": [
7129
+ "platform"
7130
+ ]
7131
+ },
7132
+ {
7133
+ "type": "string",
7134
+ "enum": [
7135
+ "faable.json"
7136
+ ]
7137
+ },
7138
+ {
7139
+ "type": "null"
7140
+ }
7141
+ ]
7142
+ }
6097
7143
  }
6098
- },
6099
- "additionalProperties": false
7144
+ }
6100
7145
  }
6101
7146
  }
6102
7147
  }
6103
- },
7148
+ }
7149
+ }
7150
+ },
7151
+ "/app/{id}/repo/directories": {
7152
+ "get": {
7153
+ "operationId": "app/repo_directories",
7154
+ "summary": "List repository directories",
7155
+ "tags": [
7156
+ "apps",
7157
+ "github"
7158
+ ],
7159
+ "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.",
6104
7160
  "parameters": [
6105
7161
  {
6106
7162
  "schema": {
@@ -6133,11 +7189,38 @@
6133
7189
  ],
6134
7190
  "responses": {
6135
7191
  "200": {
6136
- "description": "App",
7192
+ "description": "Default Response",
6137
7193
  "content": {
6138
7194
  "application/json": {
6139
7195
  "schema": {
6140
- "$ref": "#/components/schemas/App"
7196
+ "type": "object",
7197
+ "required": [
7198
+ "directories",
7199
+ "truncated"
7200
+ ],
7201
+ "properties": {
7202
+ "directories": {
7203
+ "type": "array",
7204
+ "items": {
7205
+ "type": "object",
7206
+ "required": [
7207
+ "path",
7208
+ "buildable"
7209
+ ],
7210
+ "properties": {
7211
+ "path": {
7212
+ "type": "string"
7213
+ },
7214
+ "buildable": {
7215
+ "type": "boolean"
7216
+ }
7217
+ }
7218
+ }
7219
+ },
7220
+ "truncated": {
7221
+ "type": "boolean"
7222
+ }
7223
+ }
6141
7224
  }
6142
7225
  }
6143
7226
  }
@@ -6145,15 +7228,42 @@
6145
7228
  }
6146
7229
  }
6147
7230
  },
6148
- "/app/{id}/unlink-repository": {
7231
+ "/app/{id}/root-dir": {
6149
7232
  "post": {
6150
- "operationId": "app/unlink_repository",
6151
- "summary": "Unlink the GitHub repository from an app",
7233
+ "operationId": "app/set_root_dir",
7234
+ "summary": "Set the Root Directory",
6152
7235
  "tags": [
6153
7236
  "apps",
6154
7237
  "github"
6155
7238
  ],
6156
- "description": "Unlink the GitHub repository from an app.",
7239
+ "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.",
7240
+ "requestBody": {
7241
+ "required": true,
7242
+ "content": {
7243
+ "application/json": {
7244
+ "schema": {
7245
+ "type": "object",
7246
+ "required": [
7247
+ "root_dir"
7248
+ ],
7249
+ "properties": {
7250
+ "root_dir": {
7251
+ "anyOf": [
7252
+ {
7253
+ "type": "string",
7254
+ "maxLength": 255
7255
+ },
7256
+ {
7257
+ "type": "null"
7258
+ }
7259
+ ]
7260
+ }
7261
+ },
7262
+ "additionalProperties": false
7263
+ }
7264
+ }
7265
+ }
7266
+ },
6157
7267
  "parameters": [
6158
7268
  {
6159
7269
  "schema": {
@@ -6198,15 +7308,15 @@
6198
7308
  }
6199
7309
  }
6200
7310
  },
6201
- "/app/{id}/deploy-branch": {
7311
+ "/app/{id}/deploy-mode": {
6202
7312
  "post": {
6203
- "operationId": "app/set_deploy_branch",
6204
- "summary": "Change the deploy branch",
7313
+ "operationId": "app/set_deploy_mode",
7314
+ "summary": "Set the deploy mode",
6205
7315
  "tags": [
6206
7316
  "apps",
6207
7317
  "github"
6208
7318
  ],
6209
- "description": "Change the branch the app deploys from. Apps deploying from their own GitHub Actions workflow must update the branch trigger in the workflow file themselves.",
7319
+ "description": "Choose how pushes deploy: 'push' = every push deploys directly; 'ci' = deploy once the commit's CI checks pass. Both are platform-managed (webhook) triggers.",
6210
7320
  "requestBody": {
6211
7321
  "required": true,
6212
7322
  "content": {
@@ -6214,13 +7324,30 @@
6214
7324
  "schema": {
6215
7325
  "type": "object",
6216
7326
  "required": [
6217
- "github_branch"
7327
+ "mode"
6218
7328
  ],
6219
7329
  "properties": {
6220
- "github_branch": {
6221
- "type": "string",
6222
- "minLength": 1,
6223
- "maxLength": 250
7330
+ "mode": {
7331
+ "anyOf": [
7332
+ {
7333
+ "type": "string",
7334
+ "enum": [
7335
+ "push"
7336
+ ]
7337
+ },
7338
+ {
7339
+ "type": "string",
7340
+ "enum": [
7341
+ "ci"
7342
+ ]
7343
+ },
7344
+ {
7345
+ "type": "string",
7346
+ "enum": [
7347
+ "workflow"
7348
+ ]
7349
+ }
7350
+ ]
6224
7351
  }
6225
7352
  },
6226
7353
  "additionalProperties": false
@@ -6260,23 +7387,11 @@
6260
7387
  ],
6261
7388
  "responses": {
6262
7389
  "200": {
6263
- "description": "Default Response",
7390
+ "description": "App",
6264
7391
  "content": {
6265
7392
  "application/json": {
6266
7393
  "schema": {
6267
- "type": "object",
6268
- "required": [
6269
- "github_branch",
6270
- "workflow_synced"
6271
- ],
6272
- "properties": {
6273
- "github_branch": {
6274
- "type": "string"
6275
- },
6276
- "workflow_synced": {
6277
- "type": "boolean"
6278
- }
6279
- }
7394
+ "$ref": "#/components/schemas/App"
6280
7395
  }
6281
7396
  }
6282
7397
  }
@@ -6284,15 +7399,15 @@
6284
7399
  }
6285
7400
  }
6286
7401
  },
6287
- "/app/{id}/repo/branches": {
6288
- "get": {
6289
- "operationId": "app/repo_branches",
6290
- "summary": "List repository branches",
7402
+ "/app/{id}/deploy": {
7403
+ "post": {
7404
+ "operationId": "app/deploy_now",
7405
+ "summary": "Deploy the latest commit now",
6291
7406
  "tags": [
6292
7407
  "apps",
6293
- "github"
7408
+ "deployments"
6294
7409
  ],
6295
- "description": "Branch names of the linked repository.",
7410
+ "description": "Build and deploy the current head of the deploy branch, without waiting for a push. Same path as a push webhook, including the same-commit dedupe.",
6296
7411
  "parameters": [
6297
7412
  {
6298
7413
  "schema": {
@@ -6331,14 +7446,22 @@
6331
7446
  "schema": {
6332
7447
  "type": "object",
6333
7448
  "required": [
6334
- "branches"
7449
+ "status",
7450
+ "commit",
7451
+ "branch"
6335
7452
  ],
6336
7453
  "properties": {
6337
- "branches": {
6338
- "type": "array",
6339
- "items": {
6340
- "type": "string"
6341
- }
7454
+ "status": {
7455
+ "type": "string",
7456
+ "enum": [
7457
+ "created"
7458
+ ]
7459
+ },
7460
+ "commit": {
7461
+ "type": "string"
7462
+ },
7463
+ "branch": {
7464
+ "type": "string"
6342
7465
  }
6343
7466
  }
6344
7467
  }
@@ -6348,22 +7471,21 @@
6348
7471
  }
6349
7472
  }
6350
7473
  },
6351
- "/app/{id}/repo/workflows": {
7474
+ "/app/{app_id}/waf": {
6352
7475
  "get": {
6353
- "operationId": "app/repo_workflows",
6354
- "summary": "List repository workflow files",
7476
+ "operationId": "app/waf",
7477
+ "summary": "Get App WAF",
6355
7478
  "tags": [
6356
- "apps",
6357
- "github"
7479
+ "apps"
6358
7480
  ],
6359
- "description": "GitHub Actions workflow files present on the linked repository (deploy branch).",
7481
+ "description": "Get the WAF rules in effect for an App",
6360
7482
  "parameters": [
6361
7483
  {
6362
7484
  "schema": {
6363
7485
  "type": "string"
6364
7486
  },
6365
7487
  "in": "path",
6366
- "name": "id",
7488
+ "name": "app_id",
6367
7489
  "required": true
6368
7490
  }
6369
7491
  ],
@@ -6395,125 +7517,73 @@
6395
7517
  "schema": {
6396
7518
  "type": "object",
6397
7519
  "required": [
6398
- "workflows",
6399
- "deploy_workflow"
7520
+ "enabled",
7521
+ "platform_profiles",
7522
+ "rules"
6400
7523
  ],
6401
7524
  "properties": {
6402
- "workflows": {
7525
+ "enabled": {
7526
+ "type": "boolean"
7527
+ },
7528
+ "platform_profiles": {
6403
7529
  "type": "array",
6404
7530
  "items": {
6405
7531
  "type": "object",
6406
7532
  "required": [
6407
7533
  "name",
6408
- "path"
7534
+ "action",
7535
+ "rule_count"
6409
7536
  ],
6410
7537
  "properties": {
6411
7538
  "name": {
6412
7539
  "type": "string"
6413
7540
  },
6414
- "path": {
7541
+ "action": {
6415
7542
  "type": "string"
7543
+ },
7544
+ "rule_count": {
7545
+ "type": "integer"
7546
+ },
7547
+ "rules": {
7548
+ "type": "array",
7549
+ "items": {
7550
+ "type": "object",
7551
+ "required": [
7552
+ "pattern"
7553
+ ],
7554
+ "properties": {
7555
+ "pattern": {
7556
+ "type": "string"
7557
+ },
7558
+ "description": {
7559
+ "type": "string"
7560
+ }
7561
+ }
7562
+ }
6416
7563
  }
6417
7564
  }
6418
7565
  }
6419
7566
  },
6420
- "deploy_workflow": {
6421
- "anyOf": [
6422
- {
6423
- "type": "string"
6424
- },
6425
- {
6426
- "type": "null"
6427
- }
6428
- ]
6429
- }
6430
- }
6431
- }
6432
- }
6433
- }
6434
- }
6435
- }
6436
- }
6437
- },
6438
- "/app/{id}/repo/config": {
6439
- "get": {
6440
- "operationId": "app/repo_config",
6441
- "summary": "Get effective repository build config",
6442
- "tags": [
6443
- "apps",
6444
- "github"
6445
- ],
6446
- "description": "Effective build configuration read from the repository: the monorepo Root Directory and its source (platform override or the repo's faable.json).",
6447
- "parameters": [
6448
- {
6449
- "schema": {
6450
- "type": "string"
6451
- },
6452
- "in": "path",
6453
- "name": "id",
6454
- "required": true
6455
- }
6456
- ],
6457
- "security": [
6458
- {
6459
- "faable_user": []
6460
- },
6461
- {
6462
- "faable_cli": []
6463
- },
6464
- {
6465
- "faable_m2m": []
6466
- },
6467
- {
6468
- "faable_machine": []
6469
- },
6470
- {
6471
- "apikey_basic": []
6472
- },
6473
- {
6474
- "apikey": []
6475
- }
6476
- ],
6477
- "responses": {
6478
- "200": {
6479
- "description": "Default Response",
6480
- "content": {
6481
- "application/json": {
6482
- "schema": {
6483
- "type": "object",
6484
- "required": [
6485
- "root_dir",
6486
- "root_dir_source"
6487
- ],
6488
- "properties": {
6489
- "root_dir": {
6490
- "anyOf": [
6491
- {
6492
- "type": "string"
6493
- },
6494
- {
6495
- "type": "null"
6496
- }
6497
- ]
6498
- },
6499
- "root_dir_source": {
6500
- "anyOf": [
6501
- {
6502
- "type": "string",
6503
- "enum": [
6504
- "platform"
6505
- ]
6506
- },
6507
- {
6508
- "type": "string",
6509
- "enum": [
6510
- "faable.json"
6511
- ]
6512
- },
6513
- {
6514
- "type": "null"
7567
+ "rules": {
7568
+ "type": "array",
7569
+ "items": {
7570
+ "type": "object",
7571
+ "required": [
7572
+ "pattern",
7573
+ "action"
7574
+ ],
7575
+ "properties": {
7576
+ "pattern": {
7577
+ "type": "string"
7578
+ },
7579
+ "action": {
7580
+ "type": "string"
7581
+ },
7582
+ "description": {
7583
+ "type": "string"
7584
+ }
6515
7585
  }
6516
- ]
7586
+ }
6517
7587
  }
6518
7588
  }
6519
7589
  }
@@ -6523,15 +7593,14 @@
6523
7593
  }
6524
7594
  }
6525
7595
  },
6526
- "/app/{id}/deploy-mode": {
7596
+ "/app/{app_id}/waf/rules": {
6527
7597
  "post": {
6528
- "operationId": "app/set_deploy_mode",
6529
- "summary": "Set the deploy mode",
7598
+ "operationId": "app/waf/addRule",
7599
+ "summary": "Add App WAF Rule",
6530
7600
  "tags": [
6531
- "apps",
6532
- "github"
7601
+ "apps"
6533
7602
  ],
6534
- "description": "Choose how pushes deploy: 'push' = every push deploys directly; 'ci' = deploy once the commit's CI checks pass. Both are platform-managed (webhook) triggers.",
7603
+ "description": "Add a WAF rule to an App",
6535
7604
  "requestBody": {
6536
7605
  "required": true,
6537
7606
  "content": {
@@ -6539,33 +7608,36 @@
6539
7608
  "schema": {
6540
7609
  "type": "object",
6541
7610
  "required": [
6542
- "mode"
7611
+ "pattern",
7612
+ "action"
6543
7613
  ],
6544
7614
  "properties": {
6545
- "mode": {
7615
+ "pattern": {
7616
+ "type": "string",
7617
+ "description": "RE2 path-regex fragment, e.g. ^/robots\\.txt$"
7618
+ },
7619
+ "action": {
6546
7620
  "anyOf": [
6547
7621
  {
6548
7622
  "type": "string",
6549
7623
  "enum": [
6550
- "push"
6551
- ]
6552
- },
6553
- {
6554
- "type": "string",
6555
- "enum": [
6556
- "ci"
7624
+ "deny"
6557
7625
  ]
6558
7626
  },
6559
7627
  {
6560
7628
  "type": "string",
6561
7629
  "enum": [
6562
- "workflow"
7630
+ "sink"
6563
7631
  ]
6564
7632
  }
6565
- ]
7633
+ ],
7634
+ "description": "deny → 403 at the edge; sink → synthetic 404 from the platform (the app is never woken)"
7635
+ },
7636
+ "description": {
7637
+ "type": "string",
7638
+ "maxLength": 500
6566
7639
  }
6567
- },
6568
- "additionalProperties": false
7640
+ }
6569
7641
  }
6570
7642
  }
6571
7643
  }
@@ -6576,7 +7648,7 @@
6576
7648
  "type": "string"
6577
7649
  },
6578
7650
  "in": "path",
6579
- "name": "id",
7651
+ "name": "app_id",
6580
7652
  "required": true
6581
7653
  }
6582
7654
  ],
@@ -6601,35 +7673,120 @@
6601
7673
  }
6602
7674
  ],
6603
7675
  "responses": {
6604
- "200": {
6605
- "description": "App",
7676
+ "201": {
7677
+ "description": "Default Response",
6606
7678
  "content": {
6607
7679
  "application/json": {
6608
7680
  "schema": {
6609
- "$ref": "#/components/schemas/App"
7681
+ "type": "object",
7682
+ "required": [
7683
+ "enabled",
7684
+ "platform_profiles",
7685
+ "rules"
7686
+ ],
7687
+ "properties": {
7688
+ "enabled": {
7689
+ "type": "boolean"
7690
+ },
7691
+ "platform_profiles": {
7692
+ "type": "array",
7693
+ "items": {
7694
+ "type": "object",
7695
+ "required": [
7696
+ "name",
7697
+ "action",
7698
+ "rule_count"
7699
+ ],
7700
+ "properties": {
7701
+ "name": {
7702
+ "type": "string"
7703
+ },
7704
+ "action": {
7705
+ "type": "string"
7706
+ },
7707
+ "rule_count": {
7708
+ "type": "integer"
7709
+ },
7710
+ "rules": {
7711
+ "type": "array",
7712
+ "items": {
7713
+ "type": "object",
7714
+ "required": [
7715
+ "pattern"
7716
+ ],
7717
+ "properties": {
7718
+ "pattern": {
7719
+ "type": "string"
7720
+ },
7721
+ "description": {
7722
+ "type": "string"
7723
+ }
7724
+ }
7725
+ }
7726
+ }
7727
+ }
7728
+ }
7729
+ },
7730
+ "rules": {
7731
+ "type": "array",
7732
+ "items": {
7733
+ "type": "object",
7734
+ "required": [
7735
+ "pattern",
7736
+ "action"
7737
+ ],
7738
+ "properties": {
7739
+ "pattern": {
7740
+ "type": "string"
7741
+ },
7742
+ "action": {
7743
+ "type": "string"
7744
+ },
7745
+ "description": {
7746
+ "type": "string"
7747
+ }
7748
+ }
7749
+ }
7750
+ }
7751
+ }
6610
7752
  }
6611
7753
  }
6612
7754
  }
6613
7755
  }
6614
7756
  }
6615
- }
6616
- },
6617
- "/app/{id}/deploy": {
6618
- "post": {
6619
- "operationId": "app/deploy_now",
6620
- "summary": "Deploy the latest commit now",
7757
+ },
7758
+ "delete": {
7759
+ "operationId": "app/waf/removeRule",
7760
+ "summary": "Remove App WAF Rule",
6621
7761
  "tags": [
6622
- "apps",
6623
- "deployments"
7762
+ "apps"
6624
7763
  ],
6625
- "description": "Build and deploy the current head of the deploy branch, without waiting for a push. Same path as a push webhook, including the same-commit dedupe.",
7764
+ "description": "Remove a WAF rule from an App",
7765
+ "requestBody": {
7766
+ "required": true,
7767
+ "content": {
7768
+ "application/json": {
7769
+ "schema": {
7770
+ "type": "object",
7771
+ "required": [
7772
+ "pattern"
7773
+ ],
7774
+ "properties": {
7775
+ "pattern": {
7776
+ "type": "string"
7777
+ }
7778
+ }
7779
+ }
7780
+ }
7781
+ }
7782
+ },
6626
7783
  "parameters": [
6627
7784
  {
6628
7785
  "schema": {
6629
7786
  "type": "string"
6630
7787
  },
6631
7788
  "in": "path",
6632
- "name": "id",
7789
+ "name": "app_id",
6633
7790
  "required": true
6634
7791
  }
6635
7792
  ],
@@ -6661,22 +7818,73 @@
6661
7818
  "schema": {
6662
7819
  "type": "object",
6663
7820
  "required": [
6664
- "status",
6665
- "commit",
6666
- "branch"
7821
+ "enabled",
7822
+ "platform_profiles",
7823
+ "rules"
6667
7824
  ],
6668
7825
  "properties": {
6669
- "status": {
6670
- "type": "string",
6671
- "enum": [
6672
- "created"
6673
- ]
7826
+ "enabled": {
7827
+ "type": "boolean"
6674
7828
  },
6675
- "commit": {
6676
- "type": "string"
7829
+ "platform_profiles": {
7830
+ "type": "array",
7831
+ "items": {
7832
+ "type": "object",
7833
+ "required": [
7834
+ "name",
7835
+ "action",
7836
+ "rule_count"
7837
+ ],
7838
+ "properties": {
7839
+ "name": {
7840
+ "type": "string"
7841
+ },
7842
+ "action": {
7843
+ "type": "string"
7844
+ },
7845
+ "rule_count": {
7846
+ "type": "integer"
7847
+ },
7848
+ "rules": {
7849
+ "type": "array",
7850
+ "items": {
7851
+ "type": "object",
7852
+ "required": [
7853
+ "pattern"
7854
+ ],
7855
+ "properties": {
7856
+ "pattern": {
7857
+ "type": "string"
7858
+ },
7859
+ "description": {
7860
+ "type": "string"
7861
+ }
7862
+ }
7863
+ }
7864
+ }
7865
+ }
7866
+ }
6677
7867
  },
6678
- "branch": {
6679
- "type": "string"
7868
+ "rules": {
7869
+ "type": "array",
7870
+ "items": {
7871
+ "type": "object",
7872
+ "required": [
7873
+ "pattern",
7874
+ "action"
7875
+ ],
7876
+ "properties": {
7877
+ "pattern": {
7878
+ "type": "string"
7879
+ },
7880
+ "action": {
7881
+ "type": "string"
7882
+ },
7883
+ "description": {
7884
+ "type": "string"
7885
+ }
7886
+ }
7887
+ }
6680
7888
  }
6681
7889
  }
6682
7890
  }
@@ -6911,6 +8119,13 @@
6911
8119
  "type": "string",
6912
8120
  "format": "date-time"
6913
8121
  },
8122
+ "build_started_at": {
8123
+ "type": "string",
8124
+ "format": "date-time"
8125
+ },
8126
+ "build_ms": {
8127
+ "type": "integer"
8128
+ },
6914
8129
  "redeploy_of": {
6915
8130
  "type": "string"
6916
8131
  },
@@ -7047,6 +8262,13 @@
7047
8262
  "type": "string",
7048
8263
  "format": "date-time"
7049
8264
  },
8265
+ "build_started_at": {
8266
+ "type": "string",
8267
+ "format": "date-time"
8268
+ },
8269
+ "build_ms": {
8270
+ "type": "integer"
8271
+ },
7050
8272
  "redeploy_of": {
7051
8273
  "type": "string"
7052
8274
  },
@@ -7205,6 +8427,13 @@
7205
8427
  "type": "string",
7206
8428
  "format": "date-time"
7207
8429
  },
8430
+ "build_started_at": {
8431
+ "type": "string",
8432
+ "format": "date-time"
8433
+ },
8434
+ "build_ms": {
8435
+ "type": "integer"
8436
+ },
7208
8437
  "redeploy_of": {
7209
8438
  "type": "string"
7210
8439
  },
@@ -7339,6 +8568,13 @@
7339
8568
  "type": "string",
7340
8569
  "format": "date-time"
7341
8570
  },
8571
+ "build_started_at": {
8572
+ "type": "string",
8573
+ "format": "date-time"
8574
+ },
8575
+ "build_ms": {
8576
+ "type": "integer"
8577
+ },
7342
8578
  "redeploy_of": {
7343
8579
  "type": "string"
7344
8580
  },
@@ -7482,6 +8718,149 @@
7482
8718
  }
7483
8719
  }
7484
8720
  },
8721
+ "/deployment/{deployment_id}/cancel": {
8722
+ "post": {
8723
+ "operationId": "deployment/cancel",
8724
+ "summary": "Cancel a queued or building deployment",
8725
+ "tags": [
8726
+ "deployments"
8727
+ ],
8728
+ "description": "Cancel a deployment that has not been handed over to the controller yet (QUEUED or BUILDING)",
8729
+ "parameters": [
8730
+ {
8731
+ "schema": {
8732
+ "type": "string"
8733
+ },
8734
+ "in": "path",
8735
+ "name": "deployment_id",
8736
+ "required": true
8737
+ }
8738
+ ],
8739
+ "security": [
8740
+ {
8741
+ "faable_user": []
8742
+ },
8743
+ {
8744
+ "faable_cli": []
8745
+ },
8746
+ {
8747
+ "faable_m2m": []
8748
+ },
8749
+ {
8750
+ "faable_machine": []
8751
+ },
8752
+ {
8753
+ "apikey_basic": []
8754
+ },
8755
+ {
8756
+ "apikey": []
8757
+ }
8758
+ ],
8759
+ "responses": {
8760
+ "200": {
8761
+ "description": "Deployment",
8762
+ "content": {
8763
+ "application/json": {
8764
+ "schema": {
8765
+ "type": "object",
8766
+ "required": [
8767
+ "id",
8768
+ "team",
8769
+ "app_id",
8770
+ "status",
8771
+ "metadata",
8772
+ "createdAt"
8773
+ ],
8774
+ "properties": {
8775
+ "id": {
8776
+ "type": "string",
8777
+ "description": "Deployment ID"
8778
+ },
8779
+ "team": {
8780
+ "type": "string"
8781
+ },
8782
+ "app_id": {
8783
+ "type": "string"
8784
+ },
8785
+ "image": {
8786
+ "type": "string"
8787
+ },
8788
+ "release": {
8789
+ "type": "string"
8790
+ },
8791
+ "github_commit": {
8792
+ "type": "string"
8793
+ },
8794
+ "github_ref": {
8795
+ "type": "string"
8796
+ },
8797
+ "github_actor": {
8798
+ "type": "string"
8799
+ },
8800
+ "github_commit_message": {
8801
+ "type": "string"
8802
+ },
8803
+ "artifact_id": {
8804
+ "type": "string"
8805
+ },
8806
+ "artifact_ready_at": {
8807
+ "type": "string",
8808
+ "format": "date-time"
8809
+ },
8810
+ "build_started_at": {
8811
+ "type": "string",
8812
+ "format": "date-time"
8813
+ },
8814
+ "build_ms": {
8815
+ "type": "integer"
8816
+ },
8817
+ "redeploy_of": {
8818
+ "type": "string"
8819
+ },
8820
+ "quota_released_at": {
8821
+ "type": "string",
8822
+ "format": "date-time"
8823
+ },
8824
+ "trigger": {
8825
+ "anyOf": [
8826
+ {
8827
+ "type": "string"
8828
+ },
8829
+ {
8830
+ "type": "null"
8831
+ }
8832
+ ]
8833
+ },
8834
+ "detected": {
8835
+ "$ref": "#/components/schemas/DeploymentDetected"
8836
+ },
8837
+ "status": {
8838
+ "$ref": "#/components/schemas/DeploymentStatus"
8839
+ },
8840
+ "metadata": {
8841
+ "type": "object",
8842
+ "properties": {},
8843
+ "additionalProperties": true,
8844
+ "default": {}
8845
+ },
8846
+ "createdAt": {
8847
+ "type": "string",
8848
+ "description": "Deployment creation date"
8849
+ },
8850
+ "updatedAt": {
8851
+ "type": "string",
8852
+ "description": "Deployment updated date"
8853
+ }
8854
+ },
8855
+ "description": "Deployment",
8856
+ "additionalProperties": false
8857
+ }
8858
+ }
8859
+ }
8860
+ }
8861
+ }
8862
+ }
8863
+ },
7485
8864
  "/domain": {
7486
8865
  "get": {
7487
8866
  "operationId": "domain/list",