@oore/client 0.16.0 → 0.17.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.
Files changed (82) hide show
  1. package/dist/generated/@tanstack/react-query.gen.d.ts +128 -1
  2. package/dist/generated/@tanstack/react-query.gen.js +160 -1
  3. package/dist/generated/msw.gen.d.ts +103 -1
  4. package/dist/generated/msw.gen.js +161 -0
  5. package/dist/generated/sdk.gen.d.ts +43 -1
  6. package/dist/generated/sdk.gen.js +97 -0
  7. package/dist/generated/types.gen.d.ts +395 -0
  8. package/dist/generated/valibot/v-approve-promotion-body.d.ts +4 -0
  9. package/dist/generated/valibot/v-approve-promotion-body.js +4 -0
  10. package/dist/generated/valibot/v-approve-promotion-path.d.ts +5 -0
  11. package/dist/generated/valibot/v-approve-promotion-path.js +6 -0
  12. package/dist/generated/valibot/v-approve-promotion-response.d.ts +25 -0
  13. package/dist/generated/valibot/v-approve-promotion-response.js +3 -0
  14. package/dist/generated/valibot/v-approve-release-response.d.ts +3 -0
  15. package/dist/generated/valibot/v-complete-release-response.d.ts +3 -0
  16. package/dist/generated/valibot/v-create-project-environment-body.d.ts +14 -0
  17. package/dist/generated/valibot/v-create-project-environment-body.js +3 -0
  18. package/dist/generated/valibot/v-create-project-environment-path.d.ts +4 -0
  19. package/dist/generated/valibot/v-create-project-environment-path.js +5 -0
  20. package/dist/generated/valibot/v-create-project-environment-request.d.ts +14 -0
  21. package/dist/generated/valibot/v-create-project-environment-request.js +12 -0
  22. package/dist/generated/valibot/v-create-project-environment-response.d.ts +56 -0
  23. package/dist/generated/valibot/v-create-project-environment-response.js +3 -0
  24. package/dist/generated/valibot/v-create-promotion-request.d.ts +6 -0
  25. package/dist/generated/valibot/v-create-promotion-request.js +7 -0
  26. package/dist/generated/valibot/v-create-release-response.d.ts +3 -0
  27. package/dist/generated/valibot/v-delete-project-environment-path.d.ts +5 -0
  28. package/dist/generated/valibot/v-delete-project-environment-path.js +6 -0
  29. package/dist/generated/valibot/v-delete-project-environment-response.d.ts +4 -0
  30. package/dist/generated/valibot/v-delete-project-environment-response.js +3 -0
  31. package/dist/generated/valibot/v-environment-promotion.d.ts +25 -0
  32. package/dist/generated/valibot/v-environment-promotion.js +47 -0
  33. package/dist/generated/valibot/v-get-release-response.d.ts +3 -0
  34. package/dist/generated/valibot/v-halt-release-response.d.ts +3 -0
  35. package/dist/generated/valibot/v-list-project-environments-path.d.ts +4 -0
  36. package/dist/generated/valibot/v-list-project-environments-path.js +5 -0
  37. package/dist/generated/valibot/v-list-project-environments-response.d.ts +82 -0
  38. package/dist/generated/valibot/v-list-project-environments-response.js +8 -0
  39. package/dist/generated/valibot/v-list-project-environments-response2.d.ts +82 -0
  40. package/dist/generated/valibot/v-list-project-environments-response2.js +3 -0
  41. package/dist/generated/valibot/v-list-releases-response.d.ts +3 -0
  42. package/dist/generated/valibot/v-list-releases-response2.d.ts +3 -0
  43. package/dist/generated/valibot/v-pause-release-response.d.ts +3 -0
  44. package/dist/generated/valibot/v-project-environment.d.ts +56 -0
  45. package/dist/generated/valibot/v-project-environment.js +32 -0
  46. package/dist/generated/valibot/v-promote-build-body.d.ts +6 -0
  47. package/dist/generated/valibot/v-promote-build-body.js +3 -0
  48. package/dist/generated/valibot/v-promote-build-path.d.ts +4 -0
  49. package/dist/generated/valibot/v-promote-build-path.js +5 -0
  50. package/dist/generated/valibot/v-promote-build-response.d.ts +25 -0
  51. package/dist/generated/valibot/v-promote-build-response.js +3 -0
  52. package/dist/generated/valibot/v-promotion-decision-request.d.ts +4 -0
  53. package/dist/generated/valibot/v-promotion-decision-request.js +5 -0
  54. package/dist/generated/valibot/v-promotion-state.d.ts +2 -0
  55. package/dist/generated/valibot/v-promotion-state.js +9 -0
  56. package/dist/generated/valibot/v-raise-release-response.d.ts +3 -0
  57. package/dist/generated/valibot/v-reject-promotion-body.d.ts +4 -0
  58. package/dist/generated/valibot/v-reject-promotion-body.js +4 -0
  59. package/dist/generated/valibot/v-reject-promotion-path.d.ts +5 -0
  60. package/dist/generated/valibot/v-reject-promotion-path.js +6 -0
  61. package/dist/generated/valibot/v-reject-promotion-response.d.ts +25 -0
  62. package/dist/generated/valibot/v-reject-promotion-response.js +3 -0
  63. package/dist/generated/valibot/v-release-detail-response.d.ts +3 -0
  64. package/dist/generated/valibot/v-release.d.ts +3 -0
  65. package/dist/generated/valibot/v-release.js +3 -0
  66. package/dist/generated/valibot/v-resume-release-response.d.ts +3 -0
  67. package/dist/generated/valibot/v-update-project-environment-body.d.ts +13 -0
  68. package/dist/generated/valibot/v-update-project-environment-body.js +3 -0
  69. package/dist/generated/valibot/v-update-project-environment-path.d.ts +5 -0
  70. package/dist/generated/valibot/v-update-project-environment-path.js +6 -0
  71. package/dist/generated/valibot/v-update-project-environment-request.d.ts +13 -0
  72. package/dist/generated/valibot/v-update-project-environment-request.js +14 -0
  73. package/dist/generated/valibot/v-update-project-environment-response.d.ts +56 -0
  74. package/dist/generated/valibot/v-update-project-environment-response.js +3 -0
  75. package/dist/msw.d.ts +2 -2
  76. package/dist/msw.js +1 -1
  77. package/dist/react-query.d.ts +1 -1
  78. package/dist/react-query.js +1 -1
  79. package/dist/valibot.d.ts +27 -0
  80. package/dist/valibot.js +27 -0
  81. package/openapi/openapi.json +1050 -86
  82. package/package.json +1 -1
@@ -6125,6 +6125,312 @@
6125
6125
  ]
6126
6126
  }
6127
6127
  },
6128
+ "/v1/projects/{project_id}/environments": {
6129
+ "get": {
6130
+ "tags": [
6131
+ "Environments"
6132
+ ],
6133
+ "summary": "List project environments",
6134
+ "description": "Environments in promotion order, each with its newest release, plus pending promotions and the most recent decided ones.",
6135
+ "operationId": "list_project_environments",
6136
+ "parameters": [
6137
+ {
6138
+ "name": "project_id",
6139
+ "in": "path",
6140
+ "description": "Project ID",
6141
+ "required": true,
6142
+ "schema": {
6143
+ "type": "string"
6144
+ }
6145
+ }
6146
+ ],
6147
+ "responses": {
6148
+ "200": {
6149
+ "description": "Environments and promotions",
6150
+ "content": {
6151
+ "application/json": {
6152
+ "schema": {
6153
+ "$ref": "#/components/schemas/ListProjectEnvironmentsResponse"
6154
+ }
6155
+ }
6156
+ }
6157
+ },
6158
+ "404": {
6159
+ "description": "Project not found",
6160
+ "content": {
6161
+ "application/json": {
6162
+ "schema": {
6163
+ "$ref": "#/components/schemas/ApiError"
6164
+ }
6165
+ }
6166
+ }
6167
+ }
6168
+ },
6169
+ "security": [
6170
+ {
6171
+ "bearer_auth": []
6172
+ }
6173
+ ]
6174
+ },
6175
+ "post": {
6176
+ "tags": [
6177
+ "Environments"
6178
+ ],
6179
+ "summary": "Create environment",
6180
+ "description": "Adds an environment at the end of the promotion path. Requires the project maintainer role. A release recorded on the environment's store and track belongs to it.",
6181
+ "operationId": "create_project_environment",
6182
+ "parameters": [
6183
+ {
6184
+ "name": "project_id",
6185
+ "in": "path",
6186
+ "description": "Project ID",
6187
+ "required": true,
6188
+ "schema": {
6189
+ "type": "string"
6190
+ }
6191
+ }
6192
+ ],
6193
+ "requestBody": {
6194
+ "content": {
6195
+ "application/json": {
6196
+ "schema": {
6197
+ "$ref": "#/components/schemas/CreateProjectEnvironmentRequest"
6198
+ }
6199
+ }
6200
+ },
6201
+ "required": true
6202
+ },
6203
+ "responses": {
6204
+ "200": {
6205
+ "description": "Created environment",
6206
+ "content": {
6207
+ "application/json": {
6208
+ "schema": {
6209
+ "$ref": "#/components/schemas/ProjectEnvironment"
6210
+ }
6211
+ }
6212
+ }
6213
+ },
6214
+ "400": {
6215
+ "description": "Invalid input",
6216
+ "content": {
6217
+ "application/json": {
6218
+ "schema": {
6219
+ "$ref": "#/components/schemas/ApiError"
6220
+ }
6221
+ }
6222
+ }
6223
+ },
6224
+ "403": {
6225
+ "description": "Permission denied",
6226
+ "content": {
6227
+ "application/json": {
6228
+ "schema": {
6229
+ "$ref": "#/components/schemas/ApiError"
6230
+ }
6231
+ }
6232
+ }
6233
+ },
6234
+ "404": {
6235
+ "description": "Project not found",
6236
+ "content": {
6237
+ "application/json": {
6238
+ "schema": {
6239
+ "$ref": "#/components/schemas/ApiError"
6240
+ }
6241
+ }
6242
+ }
6243
+ },
6244
+ "409": {
6245
+ "description": "Key, or store and track, already used",
6246
+ "content": {
6247
+ "application/json": {
6248
+ "schema": {
6249
+ "$ref": "#/components/schemas/ApiError"
6250
+ }
6251
+ }
6252
+ }
6253
+ }
6254
+ },
6255
+ "security": [
6256
+ {
6257
+ "bearer_auth": []
6258
+ }
6259
+ ]
6260
+ }
6261
+ },
6262
+ "/v1/projects/{project_id}/environments/{environment_id}": {
6263
+ "delete": {
6264
+ "tags": [
6265
+ "Environments"
6266
+ ],
6267
+ "summary": "Delete environment",
6268
+ "description": "Its releases stay without an environment; its promotions are removed. Requires the project maintainer role.",
6269
+ "operationId": "delete_project_environment",
6270
+ "parameters": [
6271
+ {
6272
+ "name": "project_id",
6273
+ "in": "path",
6274
+ "description": "Project ID",
6275
+ "required": true,
6276
+ "schema": {
6277
+ "type": "string"
6278
+ }
6279
+ },
6280
+ {
6281
+ "name": "environment_id",
6282
+ "in": "path",
6283
+ "description": "Environment ID",
6284
+ "required": true,
6285
+ "schema": {
6286
+ "type": "string"
6287
+ }
6288
+ }
6289
+ ],
6290
+ "responses": {
6291
+ "200": {
6292
+ "description": "Deleted",
6293
+ "content": {
6294
+ "application/json": {
6295
+ "schema": {
6296
+ "$ref": "#/components/schemas/OkResponse"
6297
+ }
6298
+ }
6299
+ }
6300
+ },
6301
+ "403": {
6302
+ "description": "Permission denied",
6303
+ "content": {
6304
+ "application/json": {
6305
+ "schema": {
6306
+ "$ref": "#/components/schemas/ApiError"
6307
+ }
6308
+ }
6309
+ }
6310
+ },
6311
+ "404": {
6312
+ "description": "Not found",
6313
+ "content": {
6314
+ "application/json": {
6315
+ "schema": {
6316
+ "$ref": "#/components/schemas/ApiError"
6317
+ }
6318
+ }
6319
+ }
6320
+ },
6321
+ "409": {
6322
+ "description": "A promotion is in progress",
6323
+ "content": {
6324
+ "application/json": {
6325
+ "schema": {
6326
+ "$ref": "#/components/schemas/ApiError"
6327
+ }
6328
+ }
6329
+ }
6330
+ }
6331
+ },
6332
+ "security": [
6333
+ {
6334
+ "bearer_auth": []
6335
+ }
6336
+ ]
6337
+ },
6338
+ "patch": {
6339
+ "tags": [
6340
+ "Environments"
6341
+ ],
6342
+ "summary": "Update environment",
6343
+ "description": "Changes the name, track, approval rule, rollout policy or position. Requires the project maintainer role.",
6344
+ "operationId": "update_project_environment",
6345
+ "parameters": [
6346
+ {
6347
+ "name": "project_id",
6348
+ "in": "path",
6349
+ "description": "Project ID",
6350
+ "required": true,
6351
+ "schema": {
6352
+ "type": "string"
6353
+ }
6354
+ },
6355
+ {
6356
+ "name": "environment_id",
6357
+ "in": "path",
6358
+ "description": "Environment ID",
6359
+ "required": true,
6360
+ "schema": {
6361
+ "type": "string"
6362
+ }
6363
+ }
6364
+ ],
6365
+ "requestBody": {
6366
+ "content": {
6367
+ "application/json": {
6368
+ "schema": {
6369
+ "$ref": "#/components/schemas/UpdateProjectEnvironmentRequest"
6370
+ }
6371
+ }
6372
+ },
6373
+ "required": true
6374
+ },
6375
+ "responses": {
6376
+ "200": {
6377
+ "description": "Updated environment",
6378
+ "content": {
6379
+ "application/json": {
6380
+ "schema": {
6381
+ "$ref": "#/components/schemas/ProjectEnvironment"
6382
+ }
6383
+ }
6384
+ }
6385
+ },
6386
+ "400": {
6387
+ "description": "Invalid input",
6388
+ "content": {
6389
+ "application/json": {
6390
+ "schema": {
6391
+ "$ref": "#/components/schemas/ApiError"
6392
+ }
6393
+ }
6394
+ }
6395
+ },
6396
+ "403": {
6397
+ "description": "Permission denied",
6398
+ "content": {
6399
+ "application/json": {
6400
+ "schema": {
6401
+ "$ref": "#/components/schemas/ApiError"
6402
+ }
6403
+ }
6404
+ }
6405
+ },
6406
+ "404": {
6407
+ "description": "Not found",
6408
+ "content": {
6409
+ "application/json": {
6410
+ "schema": {
6411
+ "$ref": "#/components/schemas/ApiError"
6412
+ }
6413
+ }
6414
+ }
6415
+ },
6416
+ "409": {
6417
+ "description": "Store and track already used",
6418
+ "content": {
6419
+ "application/json": {
6420
+ "schema": {
6421
+ "$ref": "#/components/schemas/ApiError"
6422
+ }
6423
+ }
6424
+ }
6425
+ }
6426
+ },
6427
+ "security": [
6428
+ {
6429
+ "bearer_auth": []
6430
+ }
6431
+ ]
6432
+ }
6433
+ },
6128
6434
  "/v1/projects/{project_id}/members": {
6129
6435
  "get": {
6130
6436
  "tags": [
@@ -6329,21 +6635,234 @@
6329
6635
  "schema": {
6330
6636
  "type": "string"
6331
6637
  }
6332
- }
6333
- ],
6638
+ }
6639
+ ],
6640
+ "responses": {
6641
+ "200": {
6642
+ "description": "Member removed",
6643
+ "content": {
6644
+ "application/json": {
6645
+ "schema": {
6646
+ "$ref": "#/components/schemas/RemoveProjectMemberResponse"
6647
+ }
6648
+ }
6649
+ }
6650
+ },
6651
+ "404": {
6652
+ "description": "Project or member not found",
6653
+ "content": {
6654
+ "application/json": {
6655
+ "schema": {
6656
+ "$ref": "#/components/schemas/ApiError"
6657
+ }
6658
+ }
6659
+ }
6660
+ }
6661
+ },
6662
+ "security": [
6663
+ {
6664
+ "bearer_auth": []
6665
+ }
6666
+ ]
6667
+ },
6668
+ "patch": {
6669
+ "tags": [
6670
+ "Project Members"
6671
+ ],
6672
+ "summary": "Update a project member's role",
6673
+ "operationId": "update_project_member",
6674
+ "parameters": [
6675
+ {
6676
+ "name": "project_id",
6677
+ "in": "path",
6678
+ "description": "Project ID",
6679
+ "required": true,
6680
+ "schema": {
6681
+ "type": "string"
6682
+ }
6683
+ },
6684
+ {
6685
+ "name": "user_id",
6686
+ "in": "path",
6687
+ "description": "User ID",
6688
+ "required": true,
6689
+ "schema": {
6690
+ "type": "string"
6691
+ }
6692
+ }
6693
+ ],
6694
+ "requestBody": {
6695
+ "content": {
6696
+ "application/json": {
6697
+ "schema": {
6698
+ "$ref": "#/components/schemas/UpdateProjectMemberRequest"
6699
+ }
6700
+ }
6701
+ },
6702
+ "required": true
6703
+ },
6704
+ "responses": {
6705
+ "200": {
6706
+ "description": "Member role updated",
6707
+ "content": {
6708
+ "application/json": {
6709
+ "schema": {
6710
+ "$ref": "#/components/schemas/UpdateProjectMemberResponse"
6711
+ }
6712
+ }
6713
+ }
6714
+ },
6715
+ "404": {
6716
+ "description": "Project or member not found",
6717
+ "content": {
6718
+ "application/json": {
6719
+ "schema": {
6720
+ "$ref": "#/components/schemas/ApiError"
6721
+ }
6722
+ }
6723
+ }
6724
+ }
6725
+ },
6726
+ "security": [
6727
+ {
6728
+ "bearer_auth": []
6729
+ }
6730
+ ]
6731
+ }
6732
+ },
6733
+ "/v1/projects/{project_id}/pipelines": {
6734
+ "get": {
6735
+ "tags": [
6736
+ "Pipelines"
6737
+ ],
6738
+ "summary": "List pipelines",
6739
+ "operationId": "list_pipelines",
6740
+ "parameters": [
6741
+ {
6742
+ "name": "project_id",
6743
+ "in": "path",
6744
+ "description": "Project ID",
6745
+ "required": true,
6746
+ "schema": {
6747
+ "type": "string"
6748
+ }
6749
+ },
6750
+ {
6751
+ "name": "search",
6752
+ "in": "query",
6753
+ "description": "Case-insensitive pipeline name search",
6754
+ "required": false,
6755
+ "schema": {
6756
+ "type": "string"
6757
+ }
6758
+ },
6759
+ {
6760
+ "name": "sort",
6761
+ "in": "query",
6762
+ "description": "Sort by created_at or name",
6763
+ "required": false,
6764
+ "schema": {
6765
+ "type": "string"
6766
+ }
6767
+ },
6768
+ {
6769
+ "name": "direction",
6770
+ "in": "query",
6771
+ "description": "Sort direction: asc or desc",
6772
+ "required": false,
6773
+ "schema": {
6774
+ "type": "string"
6775
+ }
6776
+ },
6777
+ {
6778
+ "name": "limit",
6779
+ "in": "query",
6780
+ "description": "Page size",
6781
+ "required": false,
6782
+ "schema": {
6783
+ "type": "integer",
6784
+ "format": "int64"
6785
+ }
6786
+ },
6787
+ {
6788
+ "name": "offset",
6789
+ "in": "query",
6790
+ "description": "Page offset",
6791
+ "required": false,
6792
+ "schema": {
6793
+ "type": "integer",
6794
+ "format": "int64"
6795
+ }
6796
+ }
6797
+ ],
6798
+ "responses": {
6799
+ "200": {
6800
+ "description": "Pipeline list",
6801
+ "content": {
6802
+ "application/json": {
6803
+ "schema": {
6804
+ "$ref": "#/components/schemas/ListPipelinesResponse"
6805
+ }
6806
+ }
6807
+ }
6808
+ },
6809
+ "400": {
6810
+ "description": "Invalid sort or direction",
6811
+ "content": {
6812
+ "application/json": {
6813
+ "schema": {
6814
+ "$ref": "#/components/schemas/ApiError"
6815
+ }
6816
+ }
6817
+ }
6818
+ }
6819
+ },
6820
+ "security": [
6821
+ {
6822
+ "bearer_auth": []
6823
+ }
6824
+ ]
6825
+ },
6826
+ "post": {
6827
+ "tags": [
6828
+ "Pipelines"
6829
+ ],
6830
+ "summary": "Create pipeline",
6831
+ "operationId": "create_pipeline",
6832
+ "parameters": [
6833
+ {
6834
+ "name": "project_id",
6835
+ "in": "path",
6836
+ "description": "Project ID",
6837
+ "required": true,
6838
+ "schema": {
6839
+ "type": "string"
6840
+ }
6841
+ }
6842
+ ],
6843
+ "requestBody": {
6844
+ "content": {
6845
+ "application/json": {
6846
+ "schema": {
6847
+ "$ref": "#/components/schemas/CreatePipelineRequest"
6848
+ }
6849
+ }
6850
+ },
6851
+ "required": true
6852
+ },
6334
6853
  "responses": {
6335
- "200": {
6336
- "description": "Member removed",
6854
+ "201": {
6855
+ "description": "Pipeline created",
6337
6856
  "content": {
6338
6857
  "application/json": {
6339
6858
  "schema": {
6340
- "$ref": "#/components/schemas/RemoveProjectMemberResponse"
6859
+ "$ref": "#/components/schemas/CreatePipelineResponse"
6341
6860
  }
6342
6861
  }
6343
6862
  }
6344
6863
  },
6345
- "404": {
6346
- "description": "Project or member not found",
6864
+ "400": {
6865
+ "description": "Invalid input",
6347
6866
  "content": {
6348
6867
  "application/json": {
6349
6868
  "schema": {
@@ -6358,13 +6877,16 @@
6358
6877
  "bearer_auth": []
6359
6878
  }
6360
6879
  ]
6361
- },
6362
- "patch": {
6880
+ }
6881
+ },
6882
+ "/v1/projects/{project_id}/promotions": {
6883
+ "post": {
6363
6884
  "tags": [
6364
- "Project Members"
6885
+ "Environments"
6365
6886
  ],
6366
- "summary": "Update a project member's role",
6367
- "operationId": "update_project_member",
6887
+ "summary": "Promote build",
6888
+ "description": "Puts the version a build's live Google Play release already uploaded on the environment's track and records a release with the environment's rollout policy. Nothing is rebuilt. Promoting straight in requires the maintainer role; when the environment requires approval, a developer may ask and the promotion waits as `pending` without touching the store. Writes an audit log entry.",
6889
+ "operationId": "promote_build",
6368
6890
  "parameters": [
6369
6891
  {
6370
6892
  "name": "project_id",
@@ -6374,22 +6896,13 @@
6374
6896
  "schema": {
6375
6897
  "type": "string"
6376
6898
  }
6377
- },
6378
- {
6379
- "name": "user_id",
6380
- "in": "path",
6381
- "description": "User ID",
6382
- "required": true,
6383
- "schema": {
6384
- "type": "string"
6385
- }
6386
6899
  }
6387
6900
  ],
6388
6901
  "requestBody": {
6389
6902
  "content": {
6390
6903
  "application/json": {
6391
6904
  "schema": {
6392
- "$ref": "#/components/schemas/UpdateProjectMemberRequest"
6905
+ "$ref": "#/components/schemas/CreatePromotionRequest"
6393
6906
  }
6394
6907
  }
6395
6908
  },
@@ -6397,17 +6910,47 @@
6397
6910
  },
6398
6911
  "responses": {
6399
6912
  "200": {
6400
- "description": "Member role updated",
6913
+ "description": "The promotion, completed or pending",
6401
6914
  "content": {
6402
6915
  "application/json": {
6403
6916
  "schema": {
6404
- "$ref": "#/components/schemas/UpdateProjectMemberResponse"
6917
+ "$ref": "#/components/schemas/EnvironmentPromotion"
6918
+ }
6919
+ }
6920
+ }
6921
+ },
6922
+ "403": {
6923
+ "description": "Permission denied",
6924
+ "content": {
6925
+ "application/json": {
6926
+ "schema": {
6927
+ "$ref": "#/components/schemas/ApiError"
6405
6928
  }
6406
6929
  }
6407
6930
  }
6408
6931
  },
6409
6932
  "404": {
6410
- "description": "Project or member not found",
6933
+ "description": "Project, environment or build not found",
6934
+ "content": {
6935
+ "application/json": {
6936
+ "schema": {
6937
+ "$ref": "#/components/schemas/ApiError"
6938
+ }
6939
+ }
6940
+ }
6941
+ },
6942
+ "409": {
6943
+ "description": "Already in the environment, pending, unsupported store, or no live release to promote",
6944
+ "content": {
6945
+ "application/json": {
6946
+ "schema": {
6947
+ "$ref": "#/components/schemas/ApiError"
6948
+ }
6949
+ }
6950
+ }
6951
+ },
6952
+ "502": {
6953
+ "description": "The store rejected the promotion",
6411
6954
  "content": {
6412
6955
  "application/json": {
6413
6956
  "schema": {
@@ -6424,13 +6967,14 @@
6424
6967
  ]
6425
6968
  }
6426
6969
  },
6427
- "/v1/projects/{project_id}/pipelines": {
6428
- "get": {
6970
+ "/v1/projects/{project_id}/promotions/{promotion_id}/approve": {
6971
+ "post": {
6429
6972
  "tags": [
6430
- "Pipelines"
6973
+ "Environments"
6431
6974
  ],
6432
- "summary": "List pipelines",
6433
- "operationId": "list_pipelines",
6975
+ "summary": "Approve promotion",
6976
+ "description": "Approves a pending promotion and makes the store change as the approver. Requires the maintainer role. Writes an audit log entry.",
6977
+ "operationId": "approve_promotion",
6434
6978
  "parameters": [
6435
6979
  {
6436
6980
  "name": "project_id",
@@ -6442,66 +6986,75 @@
6442
6986
  }
6443
6987
  },
6444
6988
  {
6445
- "name": "search",
6446
- "in": "query",
6447
- "description": "Case-insensitive pipeline name search",
6448
- "required": false,
6989
+ "name": "promotion_id",
6990
+ "in": "path",
6991
+ "description": "Promotion ID",
6992
+ "required": true,
6449
6993
  "schema": {
6450
6994
  "type": "string"
6451
6995
  }
6452
- },
6453
- {
6454
- "name": "sort",
6455
- "in": "query",
6456
- "description": "Sort by created_at or name",
6457
- "required": false,
6458
- "schema": {
6459
- "type": "string"
6996
+ }
6997
+ ],
6998
+ "requestBody": {
6999
+ "description": "Optional reason",
7000
+ "content": {
7001
+ "application/json": {
7002
+ "schema": {
7003
+ "oneOf": [
7004
+ {
7005
+ "type": "null"
7006
+ },
7007
+ {
7008
+ "$ref": "#/components/schemas/PromotionDecisionRequest"
7009
+ }
7010
+ ]
7011
+ }
6460
7012
  }
6461
- },
6462
- {
6463
- "name": "direction",
6464
- "in": "query",
6465
- "description": "Sort direction: asc or desc",
6466
- "required": false,
6467
- "schema": {
6468
- "type": "string"
7013
+ }
7014
+ },
7015
+ "responses": {
7016
+ "200": {
7017
+ "description": "Completed promotion",
7018
+ "content": {
7019
+ "application/json": {
7020
+ "schema": {
7021
+ "$ref": "#/components/schemas/EnvironmentPromotion"
7022
+ }
7023
+ }
6469
7024
  }
6470
7025
  },
6471
- {
6472
- "name": "limit",
6473
- "in": "query",
6474
- "description": "Page size",
6475
- "required": false,
6476
- "schema": {
6477
- "type": "integer",
6478
- "format": "int64"
7026
+ "403": {
7027
+ "description": "Permission denied",
7028
+ "content": {
7029
+ "application/json": {
7030
+ "schema": {
7031
+ "$ref": "#/components/schemas/ApiError"
7032
+ }
7033
+ }
6479
7034
  }
6480
7035
  },
6481
- {
6482
- "name": "offset",
6483
- "in": "query",
6484
- "description": "Page offset",
6485
- "required": false,
6486
- "schema": {
6487
- "type": "integer",
6488
- "format": "int64"
7036
+ "404": {
7037
+ "description": "Not found",
7038
+ "content": {
7039
+ "application/json": {
7040
+ "schema": {
7041
+ "$ref": "#/components/schemas/ApiError"
7042
+ }
7043
+ }
6489
7044
  }
6490
- }
6491
- ],
6492
- "responses": {
6493
- "200": {
6494
- "description": "Pipeline list",
7045
+ },
7046
+ "409": {
7047
+ "description": "Not pending, or the build changed while it waited",
6495
7048
  "content": {
6496
7049
  "application/json": {
6497
7050
  "schema": {
6498
- "$ref": "#/components/schemas/ListPipelinesResponse"
7051
+ "$ref": "#/components/schemas/ApiError"
6499
7052
  }
6500
7053
  }
6501
7054
  }
6502
7055
  },
6503
- "400": {
6504
- "description": "Invalid sort or direction",
7056
+ "502": {
7057
+ "description": "The store rejected the promotion",
6505
7058
  "content": {
6506
7059
  "application/json": {
6507
7060
  "schema": {
@@ -6516,13 +7069,16 @@
6516
7069
  "bearer_auth": []
6517
7070
  }
6518
7071
  ]
6519
- },
7072
+ }
7073
+ },
7074
+ "/v1/projects/{project_id}/promotions/{promotion_id}/reject": {
6520
7075
  "post": {
6521
7076
  "tags": [
6522
- "Pipelines"
7077
+ "Environments"
6523
7078
  ],
6524
- "summary": "Create pipeline",
6525
- "operationId": "create_pipeline",
7079
+ "summary": "Reject promotion",
7080
+ "description": "Rejects a pending promotion; nothing changes at the store. Requires the maintainer role. Writes an audit log entry.",
7081
+ "operationId": "reject_promotion",
6526
7082
  "parameters": [
6527
7083
  {
6528
7084
  "name": "project_id",
@@ -6532,31 +7088,67 @@
6532
7088
  "schema": {
6533
7089
  "type": "string"
6534
7090
  }
7091
+ },
7092
+ {
7093
+ "name": "promotion_id",
7094
+ "in": "path",
7095
+ "description": "Promotion ID",
7096
+ "required": true,
7097
+ "schema": {
7098
+ "type": "string"
7099
+ }
6535
7100
  }
6536
7101
  ],
6537
7102
  "requestBody": {
7103
+ "description": "Optional reason",
6538
7104
  "content": {
6539
7105
  "application/json": {
6540
7106
  "schema": {
6541
- "$ref": "#/components/schemas/CreatePipelineRequest"
7107
+ "oneOf": [
7108
+ {
7109
+ "type": "null"
7110
+ },
7111
+ {
7112
+ "$ref": "#/components/schemas/PromotionDecisionRequest"
7113
+ }
7114
+ ]
6542
7115
  }
6543
7116
  }
6544
- },
6545
- "required": true
7117
+ }
6546
7118
  },
6547
7119
  "responses": {
6548
- "201": {
6549
- "description": "Pipeline created",
7120
+ "200": {
7121
+ "description": "Rejected promotion",
6550
7122
  "content": {
6551
7123
  "application/json": {
6552
7124
  "schema": {
6553
- "$ref": "#/components/schemas/CreatePipelineResponse"
7125
+ "$ref": "#/components/schemas/EnvironmentPromotion"
6554
7126
  }
6555
7127
  }
6556
7128
  }
6557
7129
  },
6558
- "400": {
6559
- "description": "Invalid input",
7130
+ "403": {
7131
+ "description": "Permission denied",
7132
+ "content": {
7133
+ "application/json": {
7134
+ "schema": {
7135
+ "$ref": "#/components/schemas/ApiError"
7136
+ }
7137
+ }
7138
+ }
7139
+ },
7140
+ "404": {
7141
+ "description": "Not found",
7142
+ "content": {
7143
+ "application/json": {
7144
+ "schema": {
7145
+ "$ref": "#/components/schemas/ApiError"
7146
+ }
7147
+ }
7148
+ }
7149
+ },
7150
+ "409": {
7151
+ "description": "Not pending",
6560
7152
  "content": {
6561
7153
  "application/json": {
6562
7154
  "schema": {
@@ -14603,6 +15195,43 @@
14603
15195
  }
14604
15196
  }
14605
15197
  },
15198
+ "CreateProjectEnvironmentRequest": {
15199
+ "type": "object",
15200
+ "required": [
15201
+ "key",
15202
+ "name",
15203
+ "store",
15204
+ "track"
15205
+ ],
15206
+ "properties": {
15207
+ "approval_required": {
15208
+ "type": "boolean"
15209
+ },
15210
+ "key": {
15211
+ "type": "string"
15212
+ },
15213
+ "name": {
15214
+ "type": "string"
15215
+ },
15216
+ "rollout_policy": {
15217
+ "oneOf": [
15218
+ {
15219
+ "type": "null"
15220
+ },
15221
+ {
15222
+ "$ref": "#/components/schemas/ReleasePolicy",
15223
+ "description": "Defaults to the standard schedule with no crash-rate halt."
15224
+ }
15225
+ ]
15226
+ },
15227
+ "store": {
15228
+ "$ref": "#/components/schemas/ReleaseStore"
15229
+ },
15230
+ "track": {
15231
+ "type": "string"
15232
+ }
15233
+ }
15234
+ },
14606
15235
  "CreateProjectRequest": {
14607
15236
  "type": "object",
14608
15237
  "required": [
@@ -14649,6 +15278,28 @@
14649
15278
  }
14650
15279
  }
14651
15280
  },
15281
+ "CreatePromotionRequest": {
15282
+ "type": "object",
15283
+ "required": [
15284
+ "build_id",
15285
+ "environment_id"
15286
+ ],
15287
+ "properties": {
15288
+ "build_id": {
15289
+ "type": "string"
15290
+ },
15291
+ "environment_id": {
15292
+ "type": "string",
15293
+ "description": "The environment to promote into."
15294
+ },
15295
+ "reason": {
15296
+ "type": [
15297
+ "string",
15298
+ "null"
15299
+ ]
15300
+ }
15301
+ }
15302
+ },
14652
15303
  "CreateReleaseRequest": {
14653
15304
  "type": "object",
14654
15305
  "required": [
@@ -14889,6 +15540,134 @@
14889
15540
  }
14890
15541
  }
14891
15542
  },
15543
+ "EnvironmentPromotion": {
15544
+ "type": "object",
15545
+ "description": "A request to put an existing build into an environment.",
15546
+ "required": [
15547
+ "id",
15548
+ "project_id",
15549
+ "build_id",
15550
+ "environment_id",
15551
+ "environment_name",
15552
+ "source_release_id",
15553
+ "source_track",
15554
+ "state",
15555
+ "can_decide",
15556
+ "created_at",
15557
+ "updated_at"
15558
+ ],
15559
+ "properties": {
15560
+ "build_id": {
15561
+ "type": "string"
15562
+ },
15563
+ "build_number": {
15564
+ "type": [
15565
+ "integer",
15566
+ "null"
15567
+ ],
15568
+ "format": "int64"
15569
+ },
15570
+ "can_decide": {
15571
+ "type": "boolean",
15572
+ "description": "Whether the caller may approve or reject this promotion now."
15573
+ },
15574
+ "created_at": {
15575
+ "type": "integer",
15576
+ "format": "int64"
15577
+ },
15578
+ "decided_at": {
15579
+ "type": [
15580
+ "integer",
15581
+ "null"
15582
+ ],
15583
+ "format": "int64"
15584
+ },
15585
+ "decided_by_email": {
15586
+ "type": [
15587
+ "string",
15588
+ "null"
15589
+ ]
15590
+ },
15591
+ "decision_reason": {
15592
+ "type": [
15593
+ "string",
15594
+ "null"
15595
+ ]
15596
+ },
15597
+ "environment_id": {
15598
+ "type": "string"
15599
+ },
15600
+ "environment_name": {
15601
+ "type": "string"
15602
+ },
15603
+ "error": {
15604
+ "type": [
15605
+ "string",
15606
+ "null"
15607
+ ],
15608
+ "description": "Why the promotion failed."
15609
+ },
15610
+ "id": {
15611
+ "type": "string"
15612
+ },
15613
+ "project_id": {
15614
+ "type": "string"
15615
+ },
15616
+ "reason": {
15617
+ "type": [
15618
+ "string",
15619
+ "null"
15620
+ ]
15621
+ },
15622
+ "release_id": {
15623
+ "type": [
15624
+ "string",
15625
+ "null"
15626
+ ],
15627
+ "description": "The release the promotion created, once completed."
15628
+ },
15629
+ "requested_by_email": {
15630
+ "type": [
15631
+ "string",
15632
+ "null"
15633
+ ]
15634
+ },
15635
+ "source_environment_name": {
15636
+ "type": [
15637
+ "string",
15638
+ "null"
15639
+ ],
15640
+ "description": "Where the source release was, when it belongs to an environment."
15641
+ },
15642
+ "source_release_id": {
15643
+ "type": "string",
15644
+ "description": "The release the build is promoted from."
15645
+ },
15646
+ "source_track": {
15647
+ "type": "string"
15648
+ },
15649
+ "state": {
15650
+ "$ref": "#/components/schemas/PromotionState"
15651
+ },
15652
+ "updated_at": {
15653
+ "type": "integer",
15654
+ "format": "int64"
15655
+ },
15656
+ "version_code": {
15657
+ "type": [
15658
+ "integer",
15659
+ "null"
15660
+ ],
15661
+ "format": "int64"
15662
+ },
15663
+ "version_name": {
15664
+ "type": [
15665
+ "string",
15666
+ "null"
15667
+ ]
15668
+ }
15669
+ }
15670
+ },
14892
15671
  "EventStreamReady": {
14893
15672
  "type": "object",
14894
15673
  "description": "`ready` event, the first event on every `GET /v1/events` connection.\nClients refetch once on `ready` after a reconnect, since events sent while\ndisconnected are not replayed.",
@@ -16196,6 +16975,29 @@
16196
16975
  }
16197
16976
  }
16198
16977
  },
16978
+ "ListProjectEnvironmentsResponse": {
16979
+ "type": "object",
16980
+ "required": [
16981
+ "environments",
16982
+ "promotions"
16983
+ ],
16984
+ "properties": {
16985
+ "environments": {
16986
+ "type": "array",
16987
+ "items": {
16988
+ "$ref": "#/components/schemas/ProjectEnvironment"
16989
+ },
16990
+ "description": "Environments in promotion order."
16991
+ },
16992
+ "promotions": {
16993
+ "type": "array",
16994
+ "items": {
16995
+ "$ref": "#/components/schemas/EnvironmentPromotion"
16996
+ },
16997
+ "description": "Pending promotions and the most recent decided ones, newest first."
16998
+ }
16999
+ }
17000
+ },
16199
17001
  "ListProjectMemberCandidatesResponse": {
16200
17002
  "type": "object",
16201
17003
  "required": [
@@ -17396,6 +18198,82 @@
17396
18198
  }
17397
18199
  }
17398
18200
  },
18201
+ "ProjectEnvironment": {
18202
+ "type": "object",
18203
+ "description": "A release environment on a project, such as `internal` or `production`,\nwith its store target, rollout policy and approval rule.",
18204
+ "required": [
18205
+ "id",
18206
+ "project_id",
18207
+ "key",
18208
+ "name",
18209
+ "position",
18210
+ "store",
18211
+ "track",
18212
+ "approval_required",
18213
+ "rollout_policy",
18214
+ "promotable",
18215
+ "created_at",
18216
+ "updated_at"
18217
+ ],
18218
+ "properties": {
18219
+ "approval_required": {
18220
+ "type": "boolean",
18221
+ "description": "A promotion into this environment waits for a maintainer's approval\nbefore anything changes at the store."
18222
+ },
18223
+ "created_at": {
18224
+ "type": "integer",
18225
+ "format": "int64"
18226
+ },
18227
+ "id": {
18228
+ "type": "string"
18229
+ },
18230
+ "key": {
18231
+ "type": "string",
18232
+ "description": "Stable identifier, unique in the project: lowercase letters, digits\nand dashes, starting with a letter."
18233
+ },
18234
+ "latest_release": {
18235
+ "oneOf": [
18236
+ {
18237
+ "type": "null"
18238
+ },
18239
+ {
18240
+ "$ref": "#/components/schemas/Release",
18241
+ "description": "The newest release in this environment."
18242
+ }
18243
+ ]
18244
+ },
18245
+ "name": {
18246
+ "type": "string"
18247
+ },
18248
+ "position": {
18249
+ "type": "integer",
18250
+ "format": "int64",
18251
+ "description": "Order on the promotion path, lowest first."
18252
+ },
18253
+ "project_id": {
18254
+ "type": "string"
18255
+ },
18256
+ "promotable": {
18257
+ "type": "boolean",
18258
+ "description": "Whether builds can be promoted into this environment. App Store\nenvironments only group the releases that uploads record for now."
18259
+ },
18260
+ "rollout_policy": {
18261
+ "$ref": "#/components/schemas/ReleasePolicy",
18262
+ "description": "Staged rollout policy for releases promoted into this environment.\nIts `approval` is always `none`; use `approval_required`."
18263
+ },
18264
+ "store": {
18265
+ "$ref": "#/components/schemas/ReleaseStore"
18266
+ },
18267
+ "track": {
18268
+ "type": "string",
18269
+ "description": "Play track (`internal`, `closed`, `open`, `production` or a custom\ntrack), or the App Store release track a store upload records."
18270
+ },
18271
+ "updated_at": {
18272
+ "type": "integer",
18273
+ "format": "int64"
18274
+ }
18275
+ }
18276
+ },
17399
18277
  "ProjectMember": {
17400
18278
  "type": "object",
17401
18279
  "required": [
@@ -17557,6 +18435,27 @@
17557
18435
  "viewer"
17558
18436
  ]
17559
18437
  },
18438
+ "PromotionDecisionRequest": {
18439
+ "type": "object",
18440
+ "properties": {
18441
+ "reason": {
18442
+ "type": [
18443
+ "string",
18444
+ "null"
18445
+ ]
18446
+ }
18447
+ }
18448
+ },
18449
+ "PromotionState": {
18450
+ "type": "string",
18451
+ "enum": [
18452
+ "pending",
18453
+ "promoting",
18454
+ "completed",
18455
+ "rejected",
18456
+ "failed"
18457
+ ]
18458
+ },
17560
18459
  "PublishStore": {
17561
18460
  "type": "string",
17562
18461
  "enum": [
@@ -17805,6 +18704,19 @@
17805
18704
  "type": "integer",
17806
18705
  "format": "int64"
17807
18706
  },
18707
+ "environment_id": {
18708
+ "type": [
18709
+ "string",
18710
+ "null"
18711
+ ],
18712
+ "description": "The project environment this release belongs to. Absent for projects\nwithout environments."
18713
+ },
18714
+ "environment_name": {
18715
+ "type": [
18716
+ "string",
18717
+ "null"
18718
+ ]
18719
+ },
17808
18720
  "health": {
17809
18721
  "$ref": "#/components/schemas/ReleaseHealth"
17810
18722
  },
@@ -17847,6 +18759,13 @@
17847
18759
  "null"
17848
18760
  ]
17849
18761
  },
18762
+ "promoted_from_release_id": {
18763
+ "type": [
18764
+ "string",
18765
+ "null"
18766
+ ],
18767
+ "description": "The release this one was promoted from, without a new build."
18768
+ },
17850
18769
  "rollout_fraction": {
17851
18770
  "type": "number",
17852
18771
  "format": "double",
@@ -20662,6 +21581,47 @@
20662
21581
  }
20663
21582
  }
20664
21583
  },
21584
+ "UpdateProjectEnvironmentRequest": {
21585
+ "type": "object",
21586
+ "description": "Changes to an environment. The key and store are fixed once created.",
21587
+ "properties": {
21588
+ "approval_required": {
21589
+ "type": [
21590
+ "boolean",
21591
+ "null"
21592
+ ]
21593
+ },
21594
+ "name": {
21595
+ "type": [
21596
+ "string",
21597
+ "null"
21598
+ ]
21599
+ },
21600
+ "position": {
21601
+ "type": [
21602
+ "integer",
21603
+ "null"
21604
+ ],
21605
+ "format": "int64"
21606
+ },
21607
+ "rollout_policy": {
21608
+ "oneOf": [
21609
+ {
21610
+ "type": "null"
21611
+ },
21612
+ {
21613
+ "$ref": "#/components/schemas/ReleasePolicy"
21614
+ }
21615
+ ]
21616
+ },
21617
+ "track": {
21618
+ "type": [
21619
+ "string",
21620
+ "null"
21621
+ ]
21622
+ }
21623
+ }
21624
+ },
20665
21625
  "UpdateProjectMemberRequest": {
20666
21626
  "type": "object",
20667
21627
  "required": [
@@ -21231,6 +22191,10 @@
21231
22191
  "name": "Releases",
21232
22192
  "description": "Store releases — staged rollout records with pause, halt, resume, complete and approval."
21233
22193
  },
22194
+ {
22195
+ "name": "Environments",
22196
+ "description": "Release environments on a project, such as internal, beta and production, and promotion of a build between them without a new build."
22197
+ },
21234
22198
  {
21235
22199
  "name": "Runners",
21236
22200
  "description": "Build runner management — register, heartbeat, job claim/status."