@oore/client 0.25.0 → 0.27.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 (64) hide show
  1. package/dist/generated/@tanstack/react-query.gen.d.ts +60 -5
  2. package/dist/generated/@tanstack/react-query.gen.js +57 -5
  3. package/dist/generated/msw.gen.d.ts +30 -1
  4. package/dist/generated/msw.gen.js +46 -0
  5. package/dist/generated/sdk.gen.d.ts +19 -3
  6. package/dist/generated/sdk.gen.js +32 -2
  7. package/dist/generated/types.gen.d.ts +203 -4
  8. package/dist/generated/valibot/v-analyzer-counts.d.ts +6 -0
  9. package/dist/generated/valibot/v-analyzer-counts.js +19 -0
  10. package/dist/generated/valibot/v-analyzer-diagnostic.d.ts +9 -0
  11. package/dist/generated/valibot/v-analyzer-diagnostic.js +19 -0
  12. package/dist/generated/valibot/v-analyzer-severity.d.ts +2 -0
  13. package/dist/generated/valibot/v-analyzer-severity.js +7 -0
  14. package/dist/generated/valibot/v-approver-role.d.ts +2 -0
  15. package/dist/generated/valibot/v-approver-role.js +3 -0
  16. package/dist/generated/valibot/v-build-analysis-baseline.d.ts +11 -0
  17. package/dist/generated/valibot/v-build-analysis-baseline.js +13 -0
  18. package/dist/generated/valibot/v-build-analysis-response.d.ts +30 -0
  19. package/dist/generated/valibot/v-build-analysis-response.js +9 -0
  20. package/dist/generated/valibot/v-build-analysis.d.ts +17 -0
  21. package/dist/generated/valibot/v-build-analysis.js +13 -0
  22. package/dist/generated/valibot/v-create-project-environment-body.d.ts +4 -0
  23. package/dist/generated/valibot/v-create-project-environment-request.d.ts +4 -0
  24. package/dist/generated/valibot/v-create-project-environment-request.js +2 -0
  25. package/dist/generated/valibot/v-create-project-environment-response.d.ts +7 -0
  26. package/dist/generated/valibot/v-environment-approver.d.ts +5 -0
  27. package/dist/generated/valibot/v-environment-approver.js +6 -0
  28. package/dist/generated/valibot/v-environment-approvers-input.d.ts +5 -0
  29. package/dist/generated/valibot/v-environment-approvers-input.js +7 -0
  30. package/dist/generated/valibot/v-environment-approvers.d.ts +8 -0
  31. package/dist/generated/valibot/v-environment-approvers.js +8 -0
  32. package/dist/generated/valibot/v-get-build-analysis-path.d.ts +4 -0
  33. package/dist/generated/valibot/v-get-build-analysis-path.js +5 -0
  34. package/dist/generated/valibot/v-get-build-analysis-response.d.ts +30 -0
  35. package/dist/generated/valibot/v-get-build-analysis-response.js +3 -0
  36. package/dist/generated/valibot/v-list-project-environments-response.d.ts +7 -0
  37. package/dist/generated/valibot/v-list-project-environments-response2.d.ts +7 -0
  38. package/dist/generated/valibot/v-project-environment.d.ts +7 -0
  39. package/dist/generated/valibot/v-project-environment.js +2 -0
  40. package/dist/generated/valibot/v-report-job-analysis-body.d.ts +16 -0
  41. package/dist/generated/valibot/v-report-job-analysis-body.js +3 -0
  42. package/dist/generated/valibot/v-report-job-analysis-path.d.ts +5 -0
  43. package/dist/generated/valibot/v-report-job-analysis-path.js +6 -0
  44. package/dist/generated/valibot/v-report-job-analysis-response.d.ts +4 -0
  45. package/dist/generated/valibot/v-report-job-analysis-response.js +3 -0
  46. package/dist/generated/valibot/v-runner-analyzer-report.d.ts +16 -0
  47. package/dist/generated/valibot/v-runner-analyzer-report.js +8 -0
  48. package/dist/generated/valibot/v-target-size-budget.d.ts +14 -0
  49. package/dist/generated/valibot/v-target-size-budget.js +9 -0
  50. package/dist/generated/valibot/v-update-job-status-body.d.ts +13 -0
  51. package/dist/generated/valibot/v-update-job-status-request.d.ts +13 -0
  52. package/dist/generated/valibot/v-update-job-status-request.js +2 -0
  53. package/dist/generated/valibot/v-update-project-environment-body.d.ts +4 -0
  54. package/dist/generated/valibot/v-update-project-environment-request.d.ts +4 -0
  55. package/dist/generated/valibot/v-update-project-environment-request.js +2 -0
  56. package/dist/generated/valibot/v-update-project-environment-response.d.ts +7 -0
  57. package/dist/msw.d.ts +2 -2
  58. package/dist/msw.js +1 -1
  59. package/dist/react-query.d.ts +1 -1
  60. package/dist/react-query.js +1 -1
  61. package/dist/valibot.d.ts +17 -0
  62. package/dist/valibot.js +17 -0
  63. package/openapi/openapi.json +443 -5
  64. package/package.json +1 -1
@@ -2180,6 +2180,54 @@
2180
2180
  ]
2181
2181
  }
2182
2182
  },
2183
+ "/v1/builds/{build_id}/analysis": {
2184
+ "get": {
2185
+ "tags": [
2186
+ "Builds"
2187
+ ],
2188
+ "summary": "Get the build's analyzer summary",
2189
+ "description": "Returns the `dart analyze` counts and most severe diagnostics of a\nbuild, with the baseline build on the base branch it compares with.\n`analysis` is `null` when the build reported none.",
2190
+ "operationId": "get_build_analysis",
2191
+ "parameters": [
2192
+ {
2193
+ "name": "build_id",
2194
+ "in": "path",
2195
+ "description": "Build ID",
2196
+ "required": true,
2197
+ "schema": {
2198
+ "type": "string"
2199
+ }
2200
+ }
2201
+ ],
2202
+ "responses": {
2203
+ "200": {
2204
+ "description": "Analyzer summary",
2205
+ "content": {
2206
+ "application/json": {
2207
+ "schema": {
2208
+ "$ref": "#/components/schemas/BuildAnalysisResponse"
2209
+ }
2210
+ }
2211
+ }
2212
+ },
2213
+ "404": {
2214
+ "description": "Build not found",
2215
+ "content": {
2216
+ "application/json": {
2217
+ "schema": {
2218
+ "$ref": "#/components/schemas/ApiError"
2219
+ }
2220
+ }
2221
+ }
2222
+ }
2223
+ },
2224
+ "security": [
2225
+ {
2226
+ "bearer_auth": []
2227
+ }
2228
+ ]
2229
+ }
2230
+ },
2183
2231
  "/v1/builds/{build_id}/approve": {
2184
2232
  "post": {
2185
2233
  "tags": [
@@ -7152,7 +7200,7 @@
7152
7200
  "Environments"
7153
7201
  ],
7154
7202
  "summary": "Approve promotion",
7155
- "description": "Approves a pending promotion and makes the store change as the approver. Requires the maintainer role. Writes an audit log entry.",
7203
+ "description": "Approves a pending promotion and makes the store change as the approver. Requires one of the environment's approvers (by default any maintainer). API tokens cannot decide promotions. Writes an audit log entry.",
7156
7204
  "operationId": "approve_promotion",
7157
7205
  "parameters": [
7158
7206
  {
@@ -7203,7 +7251,7 @@
7203
7251
  }
7204
7252
  },
7205
7253
  "403": {
7206
- "description": "Permission denied",
7254
+ "description": "Not one of the environment's approvers, or an API token",
7207
7255
  "content": {
7208
7256
  "application/json": {
7209
7257
  "schema": {
@@ -7256,7 +7304,7 @@
7256
7304
  "Environments"
7257
7305
  ],
7258
7306
  "summary": "Reject promotion",
7259
- "description": "Rejects a pending promotion; nothing changes at the store. Requires the maintainer role. Writes an audit log entry.",
7307
+ "description": "Rejects a pending promotion; nothing changes at the store. Requires one of the environment's approvers (by default any maintainer). API tokens cannot decide promotions. Writes an audit log entry.",
7260
7308
  "operationId": "reject_promotion",
7261
7309
  "parameters": [
7262
7310
  {
@@ -7307,7 +7355,7 @@
7307
7355
  }
7308
7356
  },
7309
7357
  "403": {
7310
- "description": "Permission denied",
7358
+ "description": "Not one of the environment's approvers, or an API token",
7311
7359
  "content": {
7312
7360
  "application/json": {
7313
7361
  "schema": {
@@ -9235,6 +9283,93 @@
9235
9283
  ]
9236
9284
  }
9237
9285
  },
9286
+ "/v1/runners/{runner_id}/jobs/{job_id}/analysis": {
9287
+ "post": {
9288
+ "tags": [
9289
+ "Builds"
9290
+ ],
9291
+ "summary": "Report the analyzer summary",
9292
+ "description": "Runner reports the `dart analyze --format=json` summary of a build. A\nlater report replaces an earlier one. Only accepted while the build\nruns.",
9293
+ "operationId": "report_job_analysis",
9294
+ "parameters": [
9295
+ {
9296
+ "name": "runner_id",
9297
+ "in": "path",
9298
+ "description": "Runner ID",
9299
+ "required": true,
9300
+ "schema": {
9301
+ "type": "string"
9302
+ }
9303
+ },
9304
+ {
9305
+ "name": "job_id",
9306
+ "in": "path",
9307
+ "description": "Build/Job ID",
9308
+ "required": true,
9309
+ "schema": {
9310
+ "type": "string"
9311
+ }
9312
+ }
9313
+ ],
9314
+ "requestBody": {
9315
+ "content": {
9316
+ "application/json": {
9317
+ "schema": {
9318
+ "$ref": "#/components/schemas/RunnerAnalyzerReport"
9319
+ }
9320
+ }
9321
+ },
9322
+ "required": true
9323
+ },
9324
+ "responses": {
9325
+ "200": {
9326
+ "description": "Recorded",
9327
+ "content": {
9328
+ "application/json": {
9329
+ "schema": {
9330
+ "$ref": "#/components/schemas/OkResponse"
9331
+ }
9332
+ }
9333
+ }
9334
+ },
9335
+ "403": {
9336
+ "description": "Runner does not match the assignment",
9337
+ "content": {
9338
+ "application/json": {
9339
+ "schema": {
9340
+ "$ref": "#/components/schemas/ApiError"
9341
+ }
9342
+ }
9343
+ }
9344
+ },
9345
+ "404": {
9346
+ "description": "Build not found",
9347
+ "content": {
9348
+ "application/json": {
9349
+ "schema": {
9350
+ "$ref": "#/components/schemas/ApiError"
9351
+ }
9352
+ }
9353
+ }
9354
+ },
9355
+ "409": {
9356
+ "description": "Build is not running",
9357
+ "content": {
9358
+ "application/json": {
9359
+ "schema": {
9360
+ "$ref": "#/components/schemas/ApiError"
9361
+ }
9362
+ }
9363
+ }
9364
+ }
9365
+ },
9366
+ "security": [
9367
+ {
9368
+ "bearer_auth": []
9369
+ }
9370
+ ]
9371
+ }
9372
+ },
9238
9373
  "/v1/runners/{runner_id}/jobs/{job_id}/android-signing": {
9239
9374
  "get": {
9240
9375
  "tags": [
@@ -13150,6 +13285,74 @@
13150
13285
  }
13151
13286
  }
13152
13287
  },
13288
+ "AnalyzerCounts": {
13289
+ "type": "object",
13290
+ "description": "Diagnostics counted by severity.",
13291
+ "required": [
13292
+ "errors",
13293
+ "warnings",
13294
+ "infos"
13295
+ ],
13296
+ "properties": {
13297
+ "errors": {
13298
+ "type": "integer",
13299
+ "format": "int64"
13300
+ },
13301
+ "infos": {
13302
+ "type": "integer",
13303
+ "format": "int64"
13304
+ },
13305
+ "warnings": {
13306
+ "type": "integer",
13307
+ "format": "int64"
13308
+ }
13309
+ }
13310
+ },
13311
+ "AnalyzerDiagnostic": {
13312
+ "type": "object",
13313
+ "description": "One `dart analyze` diagnostic.",
13314
+ "required": [
13315
+ "severity",
13316
+ "code",
13317
+ "message",
13318
+ "file",
13319
+ "line",
13320
+ "column"
13321
+ ],
13322
+ "properties": {
13323
+ "code": {
13324
+ "type": "string",
13325
+ "description": "The diagnostic code, such as `unused_import`."
13326
+ },
13327
+ "column": {
13328
+ "type": "integer",
13329
+ "format": "int64"
13330
+ },
13331
+ "file": {
13332
+ "type": "string",
13333
+ "description": "Path relative to the build workspace, such as `lib/main.dart`."
13334
+ },
13335
+ "line": {
13336
+ "type": "integer",
13337
+ "format": "int64"
13338
+ },
13339
+ "message": {
13340
+ "type": "string"
13341
+ },
13342
+ "severity": {
13343
+ "$ref": "#/components/schemas/AnalyzerSeverity"
13344
+ }
13345
+ }
13346
+ },
13347
+ "AnalyzerSeverity": {
13348
+ "type": "string",
13349
+ "description": "Severity of a `dart analyze` diagnostic.",
13350
+ "enum": [
13351
+ "error",
13352
+ "warning",
13353
+ "info"
13354
+ ]
13355
+ },
13153
13356
  "AndroidSigningBuildType": {
13154
13357
  "type": "string",
13155
13358
  "enum": [
@@ -13499,6 +13702,14 @@
13499
13702
  },
13500
13703
  "additionalProperties": false
13501
13704
  },
13705
+ "ApproverRole": {
13706
+ "type": "string",
13707
+ "description": "The lowest project role that may approve promotions into an environment.",
13708
+ "enum": [
13709
+ "maintainer",
13710
+ "developer"
13711
+ ]
13712
+ },
13502
13713
  "Artifact": {
13503
13714
  "type": "object",
13504
13715
  "required": [
@@ -14140,6 +14351,89 @@
14140
14351
  }
14141
14352
  }
14142
14353
  },
14354
+ "BuildAnalysis": {
14355
+ "type": "object",
14356
+ "description": "A build's analyzer summary.",
14357
+ "required": [
14358
+ "counts",
14359
+ "diagnostics",
14360
+ "recorded_at"
14361
+ ],
14362
+ "properties": {
14363
+ "counts": {
14364
+ "$ref": "#/components/schemas/AnalyzerCounts"
14365
+ },
14366
+ "diagnostics": {
14367
+ "type": "array",
14368
+ "items": {
14369
+ "$ref": "#/components/schemas/AnalyzerDiagnostic"
14370
+ },
14371
+ "description": "The most severe diagnostics, errors first, at most 50."
14372
+ },
14373
+ "recorded_at": {
14374
+ "type": "integer",
14375
+ "format": "int64"
14376
+ }
14377
+ }
14378
+ },
14379
+ "BuildAnalysisBaseline": {
14380
+ "type": "object",
14381
+ "description": "The earlier build an analysis compares with: the latest successful build\nof the same pipeline on the base branch that reported one, as for sizes.",
14382
+ "required": [
14383
+ "build_id",
14384
+ "build_number",
14385
+ "branch",
14386
+ "counts"
14387
+ ],
14388
+ "properties": {
14389
+ "branch": {
14390
+ "type": "string"
14391
+ },
14392
+ "build_id": {
14393
+ "type": "string"
14394
+ },
14395
+ "build_number": {
14396
+ "type": "integer",
14397
+ "format": "int64"
14398
+ },
14399
+ "counts": {
14400
+ "$ref": "#/components/schemas/AnalyzerCounts"
14401
+ }
14402
+ }
14403
+ },
14404
+ "BuildAnalysisResponse": {
14405
+ "type": "object",
14406
+ "properties": {
14407
+ "analysis": {
14408
+ "oneOf": [
14409
+ {
14410
+ "type": "null"
14411
+ },
14412
+ {
14413
+ "$ref": "#/components/schemas/BuildAnalysis",
14414
+ "description": "`null` when the build reported no analysis."
14415
+ }
14416
+ ]
14417
+ },
14418
+ "base_branch": {
14419
+ "type": [
14420
+ "string",
14421
+ "null"
14422
+ ],
14423
+ "description": "The branch the build compares with: a pull request's target branch,\notherwise the default branch."
14424
+ },
14425
+ "baseline": {
14426
+ "oneOf": [
14427
+ {
14428
+ "type": "null"
14429
+ },
14430
+ {
14431
+ "$ref": "#/components/schemas/BuildAnalysisBaseline"
14432
+ }
14433
+ ]
14434
+ }
14435
+ }
14436
+ },
14143
14437
  "BuildApproval": {
14144
14438
  "type": "object",
14145
14439
  "required": [
@@ -15503,6 +15797,17 @@
15503
15797
  "approval_required": {
15504
15798
  "type": "boolean"
15505
15799
  },
15800
+ "approvers": {
15801
+ "oneOf": [
15802
+ {
15803
+ "type": "null"
15804
+ },
15805
+ {
15806
+ "$ref": "#/components/schemas/EnvironmentApproversInput",
15807
+ "description": "Who may approve promotions. Defaults to any project maintainer."
15808
+ }
15809
+ ]
15810
+ },
15506
15811
  "key": {
15507
15812
  "type": "string"
15508
15813
  },
@@ -15840,6 +16145,72 @@
15840
16145
  }
15841
16146
  }
15842
16147
  },
16148
+ "EnvironmentApprover": {
16149
+ "type": "object",
16150
+ "description": "A project member named as an approver.",
16151
+ "required": [
16152
+ "user_id",
16153
+ "email"
16154
+ ],
16155
+ "properties": {
16156
+ "email": {
16157
+ "type": "string"
16158
+ },
16159
+ "user_id": {
16160
+ "type": "string"
16161
+ }
16162
+ }
16163
+ },
16164
+ "EnvironmentApprovers": {
16165
+ "type": "object",
16166
+ "description": "Who may approve or reject promotions into an environment.\n\nA member may decide when their project role is at least `role`, or when\nthey are one of `users` (developers and maintainers only). With no role\nand no users, any project maintainer may decide, as before approvers\nexisted. Instance owners and admins may always decide. API tokens never\ndecide: approvals are interactive.",
16167
+ "required": [
16168
+ "users"
16169
+ ],
16170
+ "properties": {
16171
+ "role": {
16172
+ "oneOf": [
16173
+ {
16174
+ "type": "null"
16175
+ },
16176
+ {
16177
+ "$ref": "#/components/schemas/ApproverRole",
16178
+ "description": "A developer role lets developers and maintainers approve."
16179
+ }
16180
+ ]
16181
+ },
16182
+ "users": {
16183
+ "type": "array",
16184
+ "items": {
16185
+ "$ref": "#/components/schemas/EnvironmentApprover"
16186
+ },
16187
+ "description": "Project members named as approvers. A user who leaves the project,\nor becomes a viewer, stops counting."
16188
+ }
16189
+ }
16190
+ },
16191
+ "EnvironmentApproversInput": {
16192
+ "type": "object",
16193
+ "description": "Approvers to set on an environment. Replaces the whole set; send an empty\nobject to go back to \"any maintainer\".",
16194
+ "properties": {
16195
+ "role": {
16196
+ "oneOf": [
16197
+ {
16198
+ "type": "null"
16199
+ },
16200
+ {
16201
+ "$ref": "#/components/schemas/ApproverRole"
16202
+ }
16203
+ ]
16204
+ },
16205
+ "user_ids": {
16206
+ "type": "array",
16207
+ "items": {
16208
+ "type": "string"
16209
+ },
16210
+ "description": "User ids of project members who are developers or maintainers. At\nmost 20."
16211
+ }
16212
+ }
16213
+ },
15843
16214
  "EnvironmentPromotion": {
15844
16215
  "type": "object",
15845
16216
  "description": "A request to put an existing build into an environment.",
@@ -18999,6 +19370,7 @@
18999
19370
  "store",
19000
19371
  "track",
19001
19372
  "approval_required",
19373
+ "approvers",
19002
19374
  "rollout_policy",
19003
19375
  "promotable",
19004
19376
  "created_at",
@@ -19007,7 +19379,11 @@
19007
19379
  "properties": {
19008
19380
  "approval_required": {
19009
19381
  "type": "boolean",
19010
- "description": "A promotion into this environment waits for a maintainer's approval\nbefore anything changes at the store."
19382
+ "description": "A promotion into this environment waits for an approval before\nanything changes at the store. `approvers` says who may give it."
19383
+ },
19384
+ "approvers": {
19385
+ "$ref": "#/components/schemas/EnvironmentApprovers",
19386
+ "description": "Who may approve or reject promotions into this environment. With no\nrole and no users, any project maintainer may."
19011
19387
  },
19012
19388
  "created_at": {
19013
19389
  "type": "integer",
@@ -20265,6 +20641,26 @@
20265
20641
  }
20266
20642
  }
20267
20643
  },
20644
+ "RunnerAnalyzerReport": {
20645
+ "type": "object",
20646
+ "description": "The summary of `dart analyze --format=json` a runner reports after the\nbuild's steps.",
20647
+ "required": [
20648
+ "counts",
20649
+ "diagnostics"
20650
+ ],
20651
+ "properties": {
20652
+ "counts": {
20653
+ "$ref": "#/components/schemas/AnalyzerCounts"
20654
+ },
20655
+ "diagnostics": {
20656
+ "type": "array",
20657
+ "items": {
20658
+ "$ref": "#/components/schemas/AnalyzerDiagnostic"
20659
+ },
20660
+ "description": "The most severe diagnostics, errors first. The daemon keeps at most\n50."
20661
+ }
20662
+ }
20663
+ },
20268
20664
  "RunnerAndroidSigningProfile": {
20269
20665
  "type": "object",
20270
20666
  "required": [
@@ -21857,6 +22253,27 @@
21857
22253
  }
21858
22254
  }
21859
22255
  },
22256
+ "TargetSizeBudget": {
22257
+ "type": "object",
22258
+ "description": "A size budget a repository's `.oore.yaml` version 2 file sets on one\ntarget, after workflow overrides. That platform's commit check enforces it\non top of the pipeline's `size_budget`, which stays a floor.",
22259
+ "required": [
22260
+ "platform",
22261
+ "source",
22262
+ "budget"
22263
+ ],
22264
+ "properties": {
22265
+ "budget": {
22266
+ "$ref": "#/components/schemas/SizeBudget"
22267
+ },
22268
+ "platform": {
22269
+ "$ref": "#/components/schemas/BuildPlatform"
22270
+ },
22271
+ "source": {
22272
+ "type": "string",
22273
+ "description": "Where the budget came from, such as `targets.android.budgets`."
22274
+ }
22275
+ }
22276
+ },
21860
22277
  "TestNotificationChannelResponse": {
21861
22278
  "type": "object",
21862
22279
  "required": [
@@ -22220,6 +22637,16 @@
22220
22637
  ],
22221
22638
  "format": "int32"
22222
22639
  },
22640
+ "size_budgets": {
22641
+ "type": [
22642
+ "array",
22643
+ "null"
22644
+ ],
22645
+ "items": {
22646
+ "$ref": "#/components/schemas/TargetSizeBudget"
22647
+ },
22648
+ "description": "The size budgets the build's `.oore.yaml` version 2 file sets, sent\nonce the runner planned the build. An empty list means the file sets\nnone; leaving it out keeps what the build has."
22649
+ },
22223
22650
  "status": {
22224
22651
  "type": "string"
22225
22652
  },
@@ -22498,6 +22925,17 @@
22498
22925
  "null"
22499
22926
  ]
22500
22927
  },
22928
+ "approvers": {
22929
+ "oneOf": [
22930
+ {
22931
+ "type": "null"
22932
+ },
22933
+ {
22934
+ "$ref": "#/components/schemas/EnvironmentApproversInput",
22935
+ "description": "Replaces who may approve promotions; leave out (or send null) to keep\nthem."
22936
+ }
22937
+ ]
22938
+ },
22501
22939
  "name": {
22502
22940
  "type": [
22503
22941
  "string",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oore/client",
3
- "version": "0.25.0",
3
+ "version": "0.27.0",
4
4
  "description": "Typed, tree-shakeable client for the Oore API",
5
5
  "type": "module",
6
6
  "sideEffects": false,