@faable/deploy-sdk 2.8.0 → 2.10.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
@@ -239,7 +239,6 @@
239
239
  "phase",
240
240
  "deployment",
241
241
  "deployment_previous",
242
- "deploy_workflow",
243
242
  "last_commited_purge",
244
243
  "last_commited_purge_key",
245
244
  "last_commited_purge_service",
@@ -297,64 +296,6 @@
297
296
  ],
298
297
  "default": null
299
298
  },
300
- "deploy_workflow": {
301
- "anyOf": [
302
- {
303
- "type": "object",
304
- "required": [
305
- "configured",
306
- "path",
307
- "verified_at",
308
- "commit"
309
- ],
310
- "properties": {
311
- "configured": {
312
- "type": "boolean",
313
- "description": "Whether a Faable deploy workflow exists on the repository"
314
- },
315
- "path": {
316
- "anyOf": [
317
- {
318
- "type": "string",
319
- "description": "Workflow file path, e.g. \".github/workflows/deploy.yaml\""
320
- },
321
- {
322
- "type": "null"
323
- }
324
- ]
325
- },
326
- "verified_at": {
327
- "anyOf": [
328
- {
329
- "type": "string",
330
- "description": "ISO date of the last time the workflow was verified"
331
- },
332
- {
333
- "type": "null"
334
- }
335
- ]
336
- },
337
- "commit": {
338
- "anyOf": [
339
- {
340
- "type": "string",
341
- "description": "Head commit sha at the last verification (from webhook)"
342
- },
343
- {
344
- "type": "null"
345
- }
346
- ]
347
- }
348
- },
349
- "additionalProperties": false
350
- },
351
- {
352
- "type": "null"
353
- }
354
- ],
355
- "default": null,
356
- "description": "Observed state of the push-to-deploy workflow on the linked repository"
357
- },
358
299
  "last_commited_purge": {
359
300
  "type": "string",
360
301
  "description": "Last commited cache Purge",
@@ -650,6 +591,17 @@
650
591
  "description": "High-level summary of where the Database is in its lifecycle",
651
592
  "default": "UNKNOWN"
652
593
  },
594
+ "notify_deploy_success": {
595
+ "anyOf": [
596
+ {
597
+ "type": "boolean"
598
+ },
599
+ {
600
+ "type": "null"
601
+ }
602
+ ],
603
+ "description": "Success deploy emails (first deploy + every promote). Absent/null = enabled; false = muted. Failure emails are never gated by this."
604
+ },
653
605
  "status": {
654
606
  "$ref": "#/components/schemas/AppStatus"
655
607
  },
@@ -662,6 +614,39 @@
662
614
  "github_installation_id": {
663
615
  "type": "string"
664
616
  },
617
+ "github_installation_state": {
618
+ "anyOf": [
619
+ {
620
+ "type": "string"
621
+ },
622
+ {
623
+ "type": "null"
624
+ }
625
+ ],
626
+ "description": "Platform GitHub access health, maintained by installation lifecycle webhooks. Absent/null = ok; 'deleted' | 'suspended' | 'repo_removed' = access broken until re-linked."
627
+ },
628
+ "deploy_trigger": {
629
+ "anyOf": [
630
+ {
631
+ "type": "string"
632
+ },
633
+ {
634
+ "type": "null"
635
+ }
636
+ ],
637
+ "description": "Push-to-deploy trigger. Absent/null = 'workflow' (committed GitHub Action); 'webhook' = the push webhook creates deployments server-side (deploy v4)."
638
+ },
639
+ "deploy_gate": {
640
+ "anyOf": [
641
+ {
642
+ "type": "string"
643
+ },
644
+ {
645
+ "type": "null"
646
+ }
647
+ ],
648
+ "description": "Wait-for-CI gate for webhook triggers. Absent/null = deploy on push; 'ci' = deploy only after the commit's check suites complete green."
649
+ },
665
650
  "metadata": {
666
651
  "type": "object",
667
652
  "properties": {},
@@ -791,41 +776,142 @@
791
776
  },
792
777
  "instance_type": {
793
778
  "type": "string"
779
+ },
780
+ "notify_deploy_success": {
781
+ "anyOf": [
782
+ {
783
+ "type": "boolean"
784
+ },
785
+ {
786
+ "type": "null"
787
+ }
788
+ ]
794
789
  }
795
790
  },
796
791
  "additionalProperties": false
797
792
  },
798
- "DeployWorkflowStatus": {
793
+ "DeployBranchResult": {
799
794
  "type": "object",
800
795
  "required": [
801
- "configured"
796
+ "github_branch",
797
+ "workflow_synced"
802
798
  ],
803
799
  "properties": {
804
- "configured": {
805
- "type": "boolean"
806
- },
807
- "workflow_path": {
800
+ "github_branch": {
808
801
  "type": "string"
809
802
  },
810
- "updated": {
803
+ "workflow_synced": {
811
804
  "type": "boolean"
812
805
  }
813
806
  }
814
807
  },
815
- "DeployBranchResult": {
808
+ "RepoBranches": {
816
809
  "type": "object",
817
810
  "required": [
818
- "github_branch",
819
- "workflow_synced"
811
+ "branches"
820
812
  ],
821
813
  "properties": {
822
- "github_branch": {
823
- "type": "string"
814
+ "branches": {
815
+ "type": "array",
816
+ "items": {
817
+ "type": "string"
818
+ }
819
+ }
820
+ }
821
+ },
822
+ "RepoWorkflows": {
823
+ "type": "object",
824
+ "required": [
825
+ "workflows",
826
+ "deploy_workflow"
827
+ ],
828
+ "properties": {
829
+ "workflows": {
830
+ "type": "array",
831
+ "items": {
832
+ "type": "object",
833
+ "required": [
834
+ "name",
835
+ "path"
836
+ ],
837
+ "properties": {
838
+ "name": {
839
+ "type": "string"
840
+ },
841
+ "path": {
842
+ "type": "string"
843
+ }
844
+ }
845
+ }
824
846
  },
825
- "workflow_synced": {
826
- "type": "boolean"
847
+ "deploy_workflow": {
848
+ "anyOf": [
849
+ {
850
+ "type": "string"
851
+ },
852
+ {
853
+ "type": "null"
854
+ }
855
+ ]
856
+ }
857
+ }
858
+ },
859
+ "RepoConfig": {
860
+ "type": "object",
861
+ "required": [
862
+ "root_dir",
863
+ "root_dir_source"
864
+ ],
865
+ "properties": {
866
+ "root_dir": {
867
+ "anyOf": [
868
+ {
869
+ "type": "string"
870
+ },
871
+ {
872
+ "type": "null"
873
+ }
874
+ ]
875
+ },
876
+ "root_dir_source": {
877
+ "anyOf": [
878
+ {
879
+ "type": "string",
880
+ "enum": [
881
+ "platform"
882
+ ]
883
+ },
884
+ {
885
+ "type": "string",
886
+ "enum": [
887
+ "faable.json"
888
+ ]
889
+ },
890
+ {
891
+ "type": "null"
892
+ }
893
+ ]
894
+ }
895
+ }
896
+ },
897
+ "DeployNowResult": {
898
+ "type": "object",
899
+ "required": [
900
+ "status",
901
+ "commit",
902
+ "branch"
903
+ ],
904
+ "properties": {
905
+ "status": {
906
+ "type": "string",
907
+ "enum": [
908
+ "created"
909
+ ]
910
+ },
911
+ "commit": {
912
+ "type": "string"
827
913
  },
828
- "workflow_path": {
914
+ "branch": {
829
915
  "type": "string"
830
916
  }
831
917
  }
@@ -847,7 +933,8 @@
847
933
  "READY",
848
934
  "CANCELED",
849
935
  "TERMINATING",
850
- "SUPERSEDED"
936
+ "SUPERSEDED",
937
+ "QUOTA_HOLD"
851
938
  ],
852
939
  "description": "High-level summary of where the Deployment is in its lifecycle",
853
940
  "default": "QUEUED"
@@ -894,9 +981,6 @@
894
981
  },
895
982
  "DeploymentSource": {
896
983
  "type": "object",
897
- "required": [
898
- "manifest"
899
- ],
900
984
  "properties": {
901
985
  "manifest": {
902
986
  "type": "array",
@@ -932,6 +1016,23 @@
932
1016
  "minItems": 1,
933
1017
  "maxItems": 20000
934
1018
  },
1019
+ "git": {
1020
+ "type": "object",
1021
+ "required": [
1022
+ "sha"
1023
+ ],
1024
+ "properties": {
1025
+ "sha": {
1026
+ "type": "string",
1027
+ "pattern": "^[a-f0-9]{40}$"
1028
+ },
1029
+ "ref": {
1030
+ "type": "string",
1031
+ "minLength": 1,
1032
+ "maxLength": 250
1033
+ }
1034
+ }
1035
+ },
935
1036
  "plan": {
936
1037
  "type": "object",
937
1038
  "properties": {},
@@ -1077,6 +1178,20 @@
1077
1178
  "redeploy_of": {
1078
1179
  "type": "string"
1079
1180
  },
1181
+ "quota_released_at": {
1182
+ "type": "string",
1183
+ "format": "date-time"
1184
+ },
1185
+ "trigger": {
1186
+ "anyOf": [
1187
+ {
1188
+ "type": "string"
1189
+ },
1190
+ {
1191
+ "type": "null"
1192
+ }
1193
+ ]
1194
+ },
1080
1195
  "status": {
1081
1196
  "$ref": "#/components/schemas/DeploymentStatus"
1082
1197
  },
@@ -2639,6 +2754,66 @@
2639
2754
  },
2640
2755
  "additionalProperties": false
2641
2756
  },
2757
+ "DeployQuota": {
2758
+ "type": "object",
2759
+ "required": [
2760
+ "limited",
2761
+ "over",
2762
+ "used",
2763
+ "limit",
2764
+ "resets_at",
2765
+ "held"
2766
+ ],
2767
+ "properties": {
2768
+ "limited": {
2769
+ "type": "boolean"
2770
+ },
2771
+ "over": {
2772
+ "type": "boolean"
2773
+ },
2774
+ "used": {
2775
+ "type": "integer"
2776
+ },
2777
+ "limit": {
2778
+ "anyOf": [
2779
+ {
2780
+ "type": "integer"
2781
+ },
2782
+ {
2783
+ "type": "null"
2784
+ }
2785
+ ]
2786
+ },
2787
+ "resets_at": {
2788
+ "type": "string",
2789
+ "format": "date-time"
2790
+ },
2791
+ "held": {
2792
+ "type": "integer"
2793
+ }
2794
+ }
2795
+ },
2796
+ "DeployQuotaRelease": {
2797
+ "type": "object",
2798
+ "required": [
2799
+ "released",
2800
+ "canceled"
2801
+ ],
2802
+ "properties": {
2803
+ "released": {
2804
+ "type": "array",
2805
+ "items": {
2806
+ "type": "string"
2807
+ }
2808
+ },
2809
+ "canceled": {
2810
+ "type": "array",
2811
+ "items": {
2812
+ "type": "string"
2813
+ }
2814
+ }
2815
+ }
2816
+ },
2642
2817
  "AppChecknameResponse": {
2643
2818
  "type": "object",
2644
2819
  "required": [
@@ -3629,6 +3804,17 @@
3629
3804
  "description": "High-level summary of where the Database is in its lifecycle",
3630
3805
  "default": "UNKNOWN"
3631
3806
  },
3807
+ "notify_deploy_success": {
3808
+ "anyOf": [
3809
+ {
3810
+ "type": "boolean"
3811
+ },
3812
+ {
3813
+ "type": "null"
3814
+ }
3815
+ ],
3816
+ "description": "Success deploy emails (first deploy + every promote). Absent/null = enabled; false = muted. Failure emails are never gated by this."
3817
+ },
3632
3818
  "status": {
3633
3819
  "$ref": "#/components/schemas/AppStatus"
3634
3820
  },
@@ -3641,7 +3827,40 @@
3641
3827
  "github_installation_id": {
3642
3828
  "type": "string"
3643
3829
  },
3644
- "metadata": {
3830
+ "github_installation_state": {
3831
+ "anyOf": [
3832
+ {
3833
+ "type": "string"
3834
+ },
3835
+ {
3836
+ "type": "null"
3837
+ }
3838
+ ],
3839
+ "description": "Platform GitHub access health, maintained by installation lifecycle webhooks. Absent/null = ok; 'deleted' | 'suspended' | 'repo_removed' = access broken until re-linked."
3840
+ },
3841
+ "deploy_trigger": {
3842
+ "anyOf": [
3843
+ {
3844
+ "type": "string"
3845
+ },
3846
+ {
3847
+ "type": "null"
3848
+ }
3849
+ ],
3850
+ "description": "Push-to-deploy trigger. Absent/null = 'workflow' (committed GitHub Action); 'webhook' = the push webhook creates deployments server-side (deploy v4)."
3851
+ },
3852
+ "deploy_gate": {
3853
+ "anyOf": [
3854
+ {
3855
+ "type": "string"
3856
+ },
3857
+ {
3858
+ "type": "null"
3859
+ }
3860
+ ],
3861
+ "description": "Wait-for-CI gate for webhook triggers. Absent/null = deploy on push; 'ci' = deploy only after the commit's check suites complete green."
3862
+ },
3863
+ "metadata": {
3645
3864
  "type": "object",
3646
3865
  "properties": {},
3647
3866
  "additionalProperties": true,
@@ -3868,6 +4087,17 @@
3868
4087
  "description": "High-level summary of where the Database is in its lifecycle",
3869
4088
  "default": "UNKNOWN"
3870
4089
  },
4090
+ "notify_deploy_success": {
4091
+ "anyOf": [
4092
+ {
4093
+ "type": "boolean"
4094
+ },
4095
+ {
4096
+ "type": "null"
4097
+ }
4098
+ ],
4099
+ "description": "Success deploy emails (first deploy + every promote). Absent/null = enabled; false = muted. Failure emails are never gated by this."
4100
+ },
3871
4101
  "status": {
3872
4102
  "$ref": "#/components/schemas/AppStatus"
3873
4103
  },
@@ -3880,6 +4110,39 @@
3880
4110
  "github_installation_id": {
3881
4111
  "type": "string"
3882
4112
  },
4113
+ "github_installation_state": {
4114
+ "anyOf": [
4115
+ {
4116
+ "type": "string"
4117
+ },
4118
+ {
4119
+ "type": "null"
4120
+ }
4121
+ ],
4122
+ "description": "Platform GitHub access health, maintained by installation lifecycle webhooks. Absent/null = ok; 'deleted' | 'suspended' | 'repo_removed' = access broken until re-linked."
4123
+ },
4124
+ "deploy_trigger": {
4125
+ "anyOf": [
4126
+ {
4127
+ "type": "string"
4128
+ },
4129
+ {
4130
+ "type": "null"
4131
+ }
4132
+ ],
4133
+ "description": "Push-to-deploy trigger. Absent/null = 'workflow' (committed GitHub Action); 'webhook' = the push webhook creates deployments server-side (deploy v4)."
4134
+ },
4135
+ "deploy_gate": {
4136
+ "anyOf": [
4137
+ {
4138
+ "type": "string"
4139
+ },
4140
+ {
4141
+ "type": "null"
4142
+ }
4143
+ ],
4144
+ "description": "Wait-for-CI gate for webhook triggers. Absent/null = deploy on push; 'ci' = deploy only after the commit's check suites complete green."
4145
+ },
3883
4146
  "metadata": {
3884
4147
  "type": "object",
3885
4148
  "properties": {},
@@ -3932,6 +4195,16 @@
3932
4195
  },
3933
4196
  "instance_type": {
3934
4197
  "type": "string"
4198
+ },
4199
+ "notify_deploy_success": {
4200
+ "anyOf": [
4201
+ {
4202
+ "type": "boolean"
4203
+ },
4204
+ {
4205
+ "type": "null"
4206
+ }
4207
+ ]
3935
4208
  }
3936
4209
  },
3937
4210
  "additionalProperties": false
@@ -4116,6 +4389,17 @@
4116
4389
  "description": "High-level summary of where the Database is in its lifecycle",
4117
4390
  "default": "UNKNOWN"
4118
4391
  },
4392
+ "notify_deploy_success": {
4393
+ "anyOf": [
4394
+ {
4395
+ "type": "boolean"
4396
+ },
4397
+ {
4398
+ "type": "null"
4399
+ }
4400
+ ],
4401
+ "description": "Success deploy emails (first deploy + every promote). Absent/null = enabled; false = muted. Failure emails are never gated by this."
4402
+ },
4119
4403
  "status": {
4120
4404
  "$ref": "#/components/schemas/AppStatus"
4121
4405
  },
@@ -4128,6 +4412,39 @@
4128
4412
  "github_installation_id": {
4129
4413
  "type": "string"
4130
4414
  },
4415
+ "github_installation_state": {
4416
+ "anyOf": [
4417
+ {
4418
+ "type": "string"
4419
+ },
4420
+ {
4421
+ "type": "null"
4422
+ }
4423
+ ],
4424
+ "description": "Platform GitHub access health, maintained by installation lifecycle webhooks. Absent/null = ok; 'deleted' | 'suspended' | 'repo_removed' = access broken until re-linked."
4425
+ },
4426
+ "deploy_trigger": {
4427
+ "anyOf": [
4428
+ {
4429
+ "type": "string"
4430
+ },
4431
+ {
4432
+ "type": "null"
4433
+ }
4434
+ ],
4435
+ "description": "Push-to-deploy trigger. Absent/null = 'workflow' (committed GitHub Action); 'webhook' = the push webhook creates deployments server-side (deploy v4)."
4436
+ },
4437
+ "deploy_gate": {
4438
+ "anyOf": [
4439
+ {
4440
+ "type": "string"
4441
+ },
4442
+ {
4443
+ "type": "null"
4444
+ }
4445
+ ],
4446
+ "description": "Wait-for-CI gate for webhook triggers. Absent/null = deploy on push; 'ci' = deploy only after the commit's check suites complete green."
4447
+ },
4131
4448
  "metadata": {
4132
4449
  "type": "object",
4133
4450
  "properties": {},
@@ -4335,6 +4652,17 @@
4335
4652
  "description": "High-level summary of where the Database is in its lifecycle",
4336
4653
  "default": "UNKNOWN"
4337
4654
  },
4655
+ "notify_deploy_success": {
4656
+ "anyOf": [
4657
+ {
4658
+ "type": "boolean"
4659
+ },
4660
+ {
4661
+ "type": "null"
4662
+ }
4663
+ ],
4664
+ "description": "Success deploy emails (first deploy + every promote). Absent/null = enabled; false = muted. Failure emails are never gated by this."
4665
+ },
4338
4666
  "status": {
4339
4667
  "$ref": "#/components/schemas/AppStatus"
4340
4668
  },
@@ -4347,6 +4675,39 @@
4347
4675
  "github_installation_id": {
4348
4676
  "type": "string"
4349
4677
  },
4678
+ "github_installation_state": {
4679
+ "anyOf": [
4680
+ {
4681
+ "type": "string"
4682
+ },
4683
+ {
4684
+ "type": "null"
4685
+ }
4686
+ ],
4687
+ "description": "Platform GitHub access health, maintained by installation lifecycle webhooks. Absent/null = ok; 'deleted' | 'suspended' | 'repo_removed' = access broken until re-linked."
4688
+ },
4689
+ "deploy_trigger": {
4690
+ "anyOf": [
4691
+ {
4692
+ "type": "string"
4693
+ },
4694
+ {
4695
+ "type": "null"
4696
+ }
4697
+ ],
4698
+ "description": "Push-to-deploy trigger. Absent/null = 'workflow' (committed GitHub Action); 'webhook' = the push webhook creates deployments server-side (deploy v4)."
4699
+ },
4700
+ "deploy_gate": {
4701
+ "anyOf": [
4702
+ {
4703
+ "type": "string"
4704
+ },
4705
+ {
4706
+ "type": "null"
4707
+ }
4708
+ ],
4709
+ "description": "Wait-for-CI gate for webhook triggers. Absent/null = deploy on push; 'ci' = deploy only after the commit's check suites complete green."
4710
+ },
4350
4711
  "metadata": {
4351
4712
  "type": "object",
4352
4713
  "properties": {},
@@ -5028,15 +5389,216 @@
5028
5389
  }
5029
5390
  }
5030
5391
  },
5031
- "/app/{id}/deploy-workflow": {
5392
+ "/app/{id}/deploy-branch": {
5393
+ "post": {
5394
+ "operationId": "app/set_deploy_branch",
5395
+ "summary": "Change the deploy branch",
5396
+ "tags": [
5397
+ "apps",
5398
+ "github"
5399
+ ],
5400
+ "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.",
5401
+ "requestBody": {
5402
+ "required": true,
5403
+ "content": {
5404
+ "application/json": {
5405
+ "schema": {
5406
+ "type": "object",
5407
+ "required": [
5408
+ "github_branch"
5409
+ ],
5410
+ "properties": {
5411
+ "github_branch": {
5412
+ "type": "string",
5413
+ "minLength": 1,
5414
+ "maxLength": 250
5415
+ }
5416
+ },
5417
+ "additionalProperties": false
5418
+ }
5419
+ }
5420
+ }
5421
+ },
5422
+ "parameters": [
5423
+ {
5424
+ "schema": {
5425
+ "type": "string"
5426
+ },
5427
+ "in": "path",
5428
+ "name": "id",
5429
+ "required": true
5430
+ }
5431
+ ],
5432
+ "security": [
5433
+ {
5434
+ "faable_user": [],
5435
+ "faable_cli": [],
5436
+ "apikey": [],
5437
+ "faable_machine": []
5438
+ }
5439
+ ],
5440
+ "responses": {
5441
+ "200": {
5442
+ "description": "Default Response",
5443
+ "content": {
5444
+ "application/json": {
5445
+ "schema": {
5446
+ "type": "object",
5447
+ "required": [
5448
+ "github_branch",
5449
+ "workflow_synced"
5450
+ ],
5451
+ "properties": {
5452
+ "github_branch": {
5453
+ "type": "string"
5454
+ },
5455
+ "workflow_synced": {
5456
+ "type": "boolean"
5457
+ }
5458
+ }
5459
+ }
5460
+ }
5461
+ }
5462
+ }
5463
+ }
5464
+ }
5465
+ },
5466
+ "/app/{id}/repo/branches": {
5467
+ "get": {
5468
+ "operationId": "app/repo_branches",
5469
+ "summary": "List repository branches",
5470
+ "tags": [
5471
+ "apps",
5472
+ "github"
5473
+ ],
5474
+ "description": "Branch names of the linked repository.",
5475
+ "parameters": [
5476
+ {
5477
+ "schema": {
5478
+ "type": "string"
5479
+ },
5480
+ "in": "path",
5481
+ "name": "id",
5482
+ "required": true
5483
+ }
5484
+ ],
5485
+ "security": [
5486
+ {
5487
+ "faable_user": [],
5488
+ "faable_cli": [],
5489
+ "apikey": [],
5490
+ "faable_machine": []
5491
+ }
5492
+ ],
5493
+ "responses": {
5494
+ "200": {
5495
+ "description": "Default Response",
5496
+ "content": {
5497
+ "application/json": {
5498
+ "schema": {
5499
+ "type": "object",
5500
+ "required": [
5501
+ "branches"
5502
+ ],
5503
+ "properties": {
5504
+ "branches": {
5505
+ "type": "array",
5506
+ "items": {
5507
+ "type": "string"
5508
+ }
5509
+ }
5510
+ }
5511
+ }
5512
+ }
5513
+ }
5514
+ }
5515
+ }
5516
+ }
5517
+ },
5518
+ "/app/{id}/repo/workflows": {
5519
+ "get": {
5520
+ "operationId": "app/repo_workflows",
5521
+ "summary": "List repository workflow files",
5522
+ "tags": [
5523
+ "apps",
5524
+ "github"
5525
+ ],
5526
+ "description": "GitHub Actions workflow files present on the linked repository (deploy branch).",
5527
+ "parameters": [
5528
+ {
5529
+ "schema": {
5530
+ "type": "string"
5531
+ },
5532
+ "in": "path",
5533
+ "name": "id",
5534
+ "required": true
5535
+ }
5536
+ ],
5537
+ "security": [
5538
+ {
5539
+ "faable_user": [],
5540
+ "faable_cli": [],
5541
+ "apikey": [],
5542
+ "faable_machine": []
5543
+ }
5544
+ ],
5545
+ "responses": {
5546
+ "200": {
5547
+ "description": "Default Response",
5548
+ "content": {
5549
+ "application/json": {
5550
+ "schema": {
5551
+ "type": "object",
5552
+ "required": [
5553
+ "workflows",
5554
+ "deploy_workflow"
5555
+ ],
5556
+ "properties": {
5557
+ "workflows": {
5558
+ "type": "array",
5559
+ "items": {
5560
+ "type": "object",
5561
+ "required": [
5562
+ "name",
5563
+ "path"
5564
+ ],
5565
+ "properties": {
5566
+ "name": {
5567
+ "type": "string"
5568
+ },
5569
+ "path": {
5570
+ "type": "string"
5571
+ }
5572
+ }
5573
+ }
5574
+ },
5575
+ "deploy_workflow": {
5576
+ "anyOf": [
5577
+ {
5578
+ "type": "string"
5579
+ },
5580
+ {
5581
+ "type": "null"
5582
+ }
5583
+ ]
5584
+ }
5585
+ }
5586
+ }
5587
+ }
5588
+ }
5589
+ }
5590
+ }
5591
+ }
5592
+ },
5593
+ "/app/{id}/repo/config": {
5032
5594
  "get": {
5033
- "operationId": "app/get_deploy_workflow",
5034
- "summary": "Get deploy workflow status",
5595
+ "operationId": "app/repo_config",
5596
+ "summary": "Get effective repository build config",
5035
5597
  "tags": [
5036
5598
  "apps",
5037
5599
  "github"
5038
5600
  ],
5039
- "description": "Check whether the app’s linked repository has a GitHub Actions workflow that deploys to Faable.",
5601
+ "description": "Effective build configuration read from the repository: the monorepo Root Directory and its source (platform override or the repo's faable.json).",
5040
5602
  "parameters": [
5041
5603
  {
5042
5604
  "schema": {
@@ -5063,17 +5625,38 @@
5063
5625
  "schema": {
5064
5626
  "type": "object",
5065
5627
  "required": [
5066
- "configured"
5628
+ "root_dir",
5629
+ "root_dir_source"
5067
5630
  ],
5068
5631
  "properties": {
5069
- "configured": {
5070
- "type": "boolean"
5071
- },
5072
- "workflow_path": {
5073
- "type": "string"
5632
+ "root_dir": {
5633
+ "anyOf": [
5634
+ {
5635
+ "type": "string"
5636
+ },
5637
+ {
5638
+ "type": "null"
5639
+ }
5640
+ ]
5074
5641
  },
5075
- "updated": {
5076
- "type": "boolean"
5642
+ "root_dir_source": {
5643
+ "anyOf": [
5644
+ {
5645
+ "type": "string",
5646
+ "enum": [
5647
+ "platform"
5648
+ ]
5649
+ },
5650
+ {
5651
+ "type": "string",
5652
+ "enum": [
5653
+ "faable.json"
5654
+ ]
5655
+ },
5656
+ {
5657
+ "type": "null"
5658
+ }
5659
+ ]
5077
5660
  }
5078
5661
  }
5079
5662
  }
@@ -5081,15 +5664,55 @@
5081
5664
  }
5082
5665
  }
5083
5666
  }
5084
- },
5667
+ }
5668
+ },
5669
+ "/app/{id}/deploy-mode": {
5085
5670
  "post": {
5086
- "operationId": "app/setup_deploy_workflow",
5087
- "summary": "Set up deploy workflow",
5671
+ "operationId": "app/set_deploy_mode",
5672
+ "summary": "Set the deploy mode",
5088
5673
  "tags": [
5089
5674
  "apps",
5090
5675
  "github"
5091
5676
  ],
5092
- "description": "Commit the Faable deploy GitHub Actions workflow to the app’s linked repository (no-op if already present; upgrades an unmodified legacy workflow).",
5677
+ "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.",
5678
+ "requestBody": {
5679
+ "required": true,
5680
+ "content": {
5681
+ "application/json": {
5682
+ "schema": {
5683
+ "type": "object",
5684
+ "required": [
5685
+ "mode"
5686
+ ],
5687
+ "properties": {
5688
+ "mode": {
5689
+ "anyOf": [
5690
+ {
5691
+ "type": "string",
5692
+ "enum": [
5693
+ "push"
5694
+ ]
5695
+ },
5696
+ {
5697
+ "type": "string",
5698
+ "enum": [
5699
+ "ci"
5700
+ ]
5701
+ },
5702
+ {
5703
+ "type": "string",
5704
+ "enum": [
5705
+ "workflow"
5706
+ ]
5707
+ }
5708
+ ]
5709
+ }
5710
+ },
5711
+ "additionalProperties": false
5712
+ }
5713
+ }
5714
+ }
5715
+ },
5093
5716
  "parameters": [
5094
5717
  {
5095
5718
  "schema": {
@@ -5110,25 +5733,11 @@
5110
5733
  ],
5111
5734
  "responses": {
5112
5735
  "200": {
5113
- "description": "Default Response",
5736
+ "description": "App",
5114
5737
  "content": {
5115
5738
  "application/json": {
5116
5739
  "schema": {
5117
- "type": "object",
5118
- "required": [
5119
- "configured"
5120
- ],
5121
- "properties": {
5122
- "configured": {
5123
- "type": "boolean"
5124
- },
5125
- "workflow_path": {
5126
- "type": "string"
5127
- },
5128
- "updated": {
5129
- "type": "boolean"
5130
- }
5131
- }
5740
+ "$ref": "#/components/schemas/App"
5132
5741
  }
5133
5742
  }
5134
5743
  }
@@ -5136,36 +5745,15 @@
5136
5745
  }
5137
5746
  }
5138
5747
  },
5139
- "/app/{id}/deploy-branch": {
5748
+ "/app/{id}/deploy": {
5140
5749
  "post": {
5141
- "operationId": "app/set_deploy_branch",
5142
- "summary": "Change the deploy branch",
5750
+ "operationId": "app/deploy_now",
5751
+ "summary": "Deploy the latest commit now",
5143
5752
  "tags": [
5144
5753
  "apps",
5145
- "github"
5754
+ "deployments"
5146
5755
  ],
5147
- "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.",
5148
- "requestBody": {
5149
- "required": true,
5150
- "content": {
5151
- "application/json": {
5152
- "schema": {
5153
- "type": "object",
5154
- "required": [
5155
- "github_branch"
5156
- ],
5157
- "properties": {
5158
- "github_branch": {
5159
- "type": "string",
5160
- "minLength": 1,
5161
- "maxLength": 250
5162
- }
5163
- },
5164
- "additionalProperties": false
5165
- }
5166
- }
5167
- }
5168
- },
5756
+ "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.",
5169
5757
  "parameters": [
5170
5758
  {
5171
5759
  "schema": {
@@ -5192,17 +5780,21 @@
5192
5780
  "schema": {
5193
5781
  "type": "object",
5194
5782
  "required": [
5195
- "github_branch",
5196
- "workflow_synced"
5783
+ "status",
5784
+ "commit",
5785
+ "branch"
5197
5786
  ],
5198
5787
  "properties": {
5199
- "github_branch": {
5200
- "type": "string"
5788
+ "status": {
5789
+ "type": "string",
5790
+ "enum": [
5791
+ "created"
5792
+ ]
5201
5793
  },
5202
- "workflow_synced": {
5203
- "type": "boolean"
5794
+ "commit": {
5795
+ "type": "string"
5204
5796
  },
5205
- "workflow_path": {
5797
+ "branch": {
5206
5798
  "type": "string"
5207
5799
  }
5208
5800
  }
@@ -5417,6 +6009,20 @@
5417
6009
  "redeploy_of": {
5418
6010
  "type": "string"
5419
6011
  },
6012
+ "quota_released_at": {
6013
+ "type": "string",
6014
+ "format": "date-time"
6015
+ },
6016
+ "trigger": {
6017
+ "anyOf": [
6018
+ {
6019
+ "type": "string"
6020
+ },
6021
+ {
6022
+ "type": "null"
6023
+ }
6024
+ ]
6025
+ },
5420
6026
  "status": {
5421
6027
  "$ref": "#/components/schemas/DeploymentStatus"
5422
6028
  },
@@ -5524,6 +6130,20 @@
5524
6130
  "redeploy_of": {
5525
6131
  "type": "string"
5526
6132
  },
6133
+ "quota_released_at": {
6134
+ "type": "string",
6135
+ "format": "date-time"
6136
+ },
6137
+ "trigger": {
6138
+ "anyOf": [
6139
+ {
6140
+ "type": "string"
6141
+ },
6142
+ {
6143
+ "type": "null"
6144
+ }
6145
+ ]
6146
+ },
5527
6147
  "status": {
5528
6148
  "$ref": "#/components/schemas/DeploymentStatus"
5529
6149
  },
@@ -5650,6 +6270,20 @@
5650
6270
  "redeploy_of": {
5651
6271
  "type": "string"
5652
6272
  },
6273
+ "quota_released_at": {
6274
+ "type": "string",
6275
+ "format": "date-time"
6276
+ },
6277
+ "trigger": {
6278
+ "anyOf": [
6279
+ {
6280
+ "type": "string"
6281
+ },
6282
+ {
6283
+ "type": "null"
6284
+ }
6285
+ ]
6286
+ },
5653
6287
  "status": {
5654
6288
  "$ref": "#/components/schemas/DeploymentStatus"
5655
6289
  },
@@ -5755,6 +6389,20 @@
5755
6389
  "redeploy_of": {
5756
6390
  "type": "string"
5757
6391
  },
6392
+ "quota_released_at": {
6393
+ "type": "string",
6394
+ "format": "date-time"
6395
+ },
6396
+ "trigger": {
6397
+ "anyOf": [
6398
+ {
6399
+ "type": "string"
6400
+ },
6401
+ {
6402
+ "type": "null"
6403
+ }
6404
+ ]
6405
+ },
5758
6406
  "status": {
5759
6407
  "$ref": "#/components/schemas/DeploymentStatus"
5760
6408
  },
@@ -6856,6 +7504,120 @@
6856
7504
  }
6857
7505
  }
6858
7506
  }
7507
+ },
7508
+ "/deploy-quota": {
7509
+ "get": {
7510
+ "operationId": "deploy_quota/get",
7511
+ "summary": "Get the team's daily deploy quota status",
7512
+ "tags": [
7513
+ "deployments"
7514
+ ],
7515
+ "description": "Daily deploy allowance of the current team: how much was used today, when it resets, and how many builds are held waiting for it.",
7516
+ "security": [
7517
+ {
7518
+ "faable_user": [],
7519
+ "faable_cli": [],
7520
+ "apikey": [],
7521
+ "faable_machine": []
7522
+ }
7523
+ ],
7524
+ "responses": {
7525
+ "200": {
7526
+ "description": "Default Response",
7527
+ "content": {
7528
+ "application/json": {
7529
+ "schema": {
7530
+ "type": "object",
7531
+ "required": [
7532
+ "limited",
7533
+ "over",
7534
+ "used",
7535
+ "limit",
7536
+ "resets_at",
7537
+ "held"
7538
+ ],
7539
+ "properties": {
7540
+ "limited": {
7541
+ "type": "boolean"
7542
+ },
7543
+ "over": {
7544
+ "type": "boolean"
7545
+ },
7546
+ "used": {
7547
+ "type": "integer"
7548
+ },
7549
+ "limit": {
7550
+ "anyOf": [
7551
+ {
7552
+ "type": "integer"
7553
+ },
7554
+ {
7555
+ "type": "null"
7556
+ }
7557
+ ]
7558
+ },
7559
+ "resets_at": {
7560
+ "type": "string",
7561
+ "format": "date-time"
7562
+ },
7563
+ "held": {
7564
+ "type": "integer"
7565
+ }
7566
+ }
7567
+ }
7568
+ }
7569
+ }
7570
+ }
7571
+ }
7572
+ }
7573
+ },
7574
+ "/deploy-quota/release": {
7575
+ "post": {
7576
+ "operationId": "deploy_quota/release",
7577
+ "summary": "Roll out the builds held by the daily deploy quota",
7578
+ "tags": [
7579
+ "deployments"
7580
+ ],
7581
+ "description": "Releases the team's held deployments if its current plan allows it (per app, only the newest held build rolls out; older ones are canceled). Safe to call at any time — it does nothing while the quota is still spent.",
7582
+ "security": [
7583
+ {
7584
+ "faable_user": [],
7585
+ "faable_cli": [],
7586
+ "apikey": [],
7587
+ "faable_machine": []
7588
+ }
7589
+ ],
7590
+ "responses": {
7591
+ "200": {
7592
+ "description": "Default Response",
7593
+ "content": {
7594
+ "application/json": {
7595
+ "schema": {
7596
+ "type": "object",
7597
+ "required": [
7598
+ "released",
7599
+ "canceled"
7600
+ ],
7601
+ "properties": {
7602
+ "released": {
7603
+ "type": "array",
7604
+ "items": {
7605
+ "type": "string"
7606
+ }
7607
+ },
7608
+ "canceled": {
7609
+ "type": "array",
7610
+ "items": {
7611
+ "type": "string"
7612
+ }
7613
+ }
7614
+ }
7615
+ }
7616
+ }
7617
+ }
7618
+ }
7619
+ }
7620
+ }
6859
7621
  }
6860
7622
  },
6861
7623
  "servers": [