generaltranslation 9.5.8 → 9.5.10

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/dist/openapi.json CHANGED
@@ -419,6 +419,24 @@
419
419
  }
420
420
  },
421
421
  "required": ["message"]
422
+ },
423
+ "OrgApiKeyPermission": {
424
+ "type": "string",
425
+ "enum": [
426
+ "org:projects:create",
427
+ "project:api_keys:read",
428
+ "project:api_keys:write",
429
+ "org:context:read",
430
+ "org:context:write",
431
+ "org:assets:write",
432
+ "project:write",
433
+ "project:context:read",
434
+ "project:context:write",
435
+ "project:files:read",
436
+ "project:files:write",
437
+ "project:translations:generate",
438
+ "project:translations:enqueue"
439
+ ]
422
440
  }
423
441
  },
424
442
  "parameters": {}
@@ -5104,11 +5122,11 @@
5104
5122
  }
5105
5123
  }
5106
5124
  },
5107
- "/v2/project/info/{projectId}": {
5108
- "get": {
5109
- "operationId": "getProjectInfo",
5110
- "summary": "Get Project information",
5111
- "description": "Get a project's ID, name, Organization, locales, and auto-approval setting. No permission is needed beyond access to the project.",
5125
+ "/v2/projects/{projectId}/files": {
5126
+ "patch": {
5127
+ "operationId": "updateFiles",
5128
+ "summary": "Update files",
5129
+ "description": "Update 1–100 source files or translations in one atomic batch. Requires `project:files:write`.",
5112
5130
  "security": [
5113
5131
  {
5114
5132
  "BearerAuth": []
@@ -5136,56 +5154,112 @@
5136
5154
  "description": "API contract version. Defaults to the oldest supported version.",
5137
5155
  "name": "gt-api-version",
5138
5156
  "in": "header"
5139
- },
5140
- {
5141
- "schema": {
5142
- "type": "string",
5143
- "description": "Target project ID when no project ID is present in the path. Project API keys default to their bound project. If supplied, the header must match both the path target and the key’s bound project."
5144
- },
5145
- "required": false,
5146
- "description": "Target project ID when no project ID is present in the path. Project API keys default to their bound project. If supplied, the header must match both the path target and the key’s bound project.",
5147
- "name": "gt-project-id",
5148
- "in": "header"
5149
5157
  }
5150
5158
  ],
5159
+ "requestBody": {
5160
+ "required": true,
5161
+ "content": {
5162
+ "application/json": {
5163
+ "schema": {
5164
+ "type": "object",
5165
+ "properties": {
5166
+ "files": {
5167
+ "type": "array",
5168
+ "items": {
5169
+ "type": "object",
5170
+ "properties": {
5171
+ "fileId": {
5172
+ "type": "string",
5173
+ "minLength": 1
5174
+ },
5175
+ "branchId": {
5176
+ "type": "string",
5177
+ "minLength": 1,
5178
+ "description": "Branch ID. Defaults to the project default branch."
5179
+ },
5180
+ "versionId": {
5181
+ "type": "string",
5182
+ "minLength": 1,
5183
+ "description": "Source version ID."
5184
+ },
5185
+ "locale": {
5186
+ "type": "string",
5187
+ "minLength": 1,
5188
+ "description": "Translation locale. Omit to update the source file.",
5189
+ "examples": ["es"]
5190
+ },
5191
+ "metadata": {
5192
+ "type": "object",
5193
+ "properties": {
5194
+ "previewUrl": {
5195
+ "type": ["string", "null"],
5196
+ "format": "uri",
5197
+ "description": "Page that shows this version of the file."
5198
+ }
5199
+ }
5200
+ }
5201
+ },
5202
+ "required": ["fileId", "versionId", "metadata"]
5203
+ },
5204
+ "minItems": 1,
5205
+ "maxItems": 100,
5206
+ "description": "1–100 source files or translations; each branch, file, version and locale may appear once."
5207
+ }
5208
+ },
5209
+ "required": ["files"],
5210
+ "description": "An absent field keeps its stored value. `null` clears a nullable field or removes a map entry; other fields reject `null`. In batches and imports, items match stored items by natural key, stored items absent from the batch are untouched, and nothing else is deleted. A blank CSV cell counts as absent."
5211
+ }
5212
+ }
5213
+ }
5214
+ },
5151
5215
  "responses": {
5152
5216
  "200": {
5153
- "description": "Project information",
5217
+ "description": "Each file after the update, in request order. Repeating a request is safe.",
5154
5218
  "content": {
5155
5219
  "application/json": {
5156
5220
  "schema": {
5157
5221
  "type": "object",
5158
5222
  "properties": {
5159
- "id": {
5160
- "type": "string"
5161
- },
5162
- "name": {
5163
- "type": "string"
5164
- },
5165
- "orgId": {
5166
- "type": "string"
5167
- },
5168
- "defaultLocale": {
5169
- "type": "string"
5170
- },
5171
- "currentLocales": {
5223
+ "files": {
5172
5224
  "type": "array",
5173
5225
  "items": {
5174
- "type": "string"
5175
- }
5176
- },
5177
- "autoApprove": {
5178
- "type": "boolean"
5226
+ "type": "object",
5227
+ "properties": {
5228
+ "branchId": {
5229
+ "type": "string"
5230
+ },
5231
+ "fileId": {
5232
+ "type": "string"
5233
+ },
5234
+ "versionId": {
5235
+ "type": "string"
5236
+ },
5237
+ "locale": {
5238
+ "type": "string",
5239
+ "description": "Translation locale as stored. Absent for a source file."
5240
+ },
5241
+ "metadata": {
5242
+ "type": "object",
5243
+ "properties": {
5244
+ "previewUrl": {
5245
+ "type": ["string", "null"],
5246
+ "format": "uri",
5247
+ "description": "Page that shows this version of the file."
5248
+ }
5249
+ }
5250
+ }
5251
+ },
5252
+ "required": [
5253
+ "branchId",
5254
+ "fileId",
5255
+ "versionId",
5256
+ "metadata"
5257
+ ]
5258
+ },
5259
+ "description": "Each file after the update, in request order."
5179
5260
  }
5180
5261
  },
5181
- "required": [
5182
- "id",
5183
- "name",
5184
- "orgId",
5185
- "defaultLocale",
5186
- "currentLocales",
5187
- "autoApprove"
5188
- ]
5262
+ "required": ["files"]
5189
5263
  }
5190
5264
  }
5191
5265
  }
@@ -5194,8 +5268,48 @@
5194
5268
  "description": "The request is malformed or failed validation.",
5195
5269
  "content": {
5196
5270
  "application/json": {
5271
+ "examples": {
5272
+ "invalid_request": {
5273
+ "summary": "invalid_request",
5274
+ "value": {
5275
+ "error": "The request is malformed or failed validation.",
5276
+ "code": "invalid_request"
5277
+ }
5278
+ },
5279
+ "api_version_unsupported": {
5280
+ "summary": "api_version_unsupported",
5281
+ "value": {
5282
+ "error": "The gt-api-version header does not name a known API version.",
5283
+ "code": "api_version_unsupported"
5284
+ }
5285
+ },
5286
+ "user_ip_missing": {
5287
+ "summary": "user_ip_missing",
5288
+ "value": {
5289
+ "error": "A dashboard-actor token must send the user's IP address header.",
5290
+ "code": "user_ip_missing"
5291
+ }
5292
+ }
5293
+ },
5197
5294
  "schema": {
5198
- "$ref": "#/components/schemas/ErrorResponse"
5295
+ "allOf": [
5296
+ {
5297
+ "$ref": "#/components/schemas/ErrorResponse"
5298
+ },
5299
+ {
5300
+ "type": "object",
5301
+ "properties": {
5302
+ "code": {
5303
+ "type": "string",
5304
+ "enum": [
5305
+ "invalid_request",
5306
+ "api_version_unsupported",
5307
+ "user_ip_missing"
5308
+ ]
5309
+ }
5310
+ }
5311
+ }
5312
+ ]
5199
5313
  }
5200
5314
  },
5201
5315
  "text/html": {
@@ -5209,8 +5323,56 @@
5209
5323
  "description": "Authentication is missing or invalid.",
5210
5324
  "content": {
5211
5325
  "application/json": {
5326
+ "examples": {
5327
+ "unauthenticated": {
5328
+ "summary": "unauthenticated",
5329
+ "value": {
5330
+ "error": "Authentication is missing or invalid.",
5331
+ "code": "unauthenticated"
5332
+ }
5333
+ },
5334
+ "api_key_invalid": {
5335
+ "summary": "api_key_invalid",
5336
+ "value": {
5337
+ "error": "The API key is not recognized. It may be mistyped, revoked, or rotated.",
5338
+ "code": "api_key_invalid"
5339
+ }
5340
+ },
5341
+ "token_invalid": {
5342
+ "summary": "token_invalid",
5343
+ "value": {
5344
+ "error": "The access token is invalid or expired. Sign in again.",
5345
+ "code": "token_invalid"
5346
+ }
5347
+ },
5348
+ "super_user_grant_revoked": {
5349
+ "summary": "super_user_grant_revoked",
5350
+ "value": {
5351
+ "error": "The super-user access grant behind this token is no longer active.",
5352
+ "code": "super_user_grant_revoked"
5353
+ }
5354
+ }
5355
+ },
5212
5356
  "schema": {
5213
- "$ref": "#/components/schemas/ErrorResponse"
5357
+ "allOf": [
5358
+ {
5359
+ "$ref": "#/components/schemas/ErrorResponse"
5360
+ },
5361
+ {
5362
+ "type": "object",
5363
+ "properties": {
5364
+ "code": {
5365
+ "type": "string",
5366
+ "enum": [
5367
+ "unauthenticated",
5368
+ "api_key_invalid",
5369
+ "token_invalid",
5370
+ "super_user_grant_revoked"
5371
+ ]
5372
+ }
5373
+ }
5374
+ }
5375
+ ]
5214
5376
  }
5215
5377
  },
5216
5378
  "text/html": {
@@ -5224,8 +5386,56 @@
5224
5386
  "description": "The caller is authenticated but not allowed to perform this operation or access the requested resource.",
5225
5387
  "content": {
5226
5388
  "application/json": {
5389
+ "examples": {
5390
+ "scope_missing": {
5391
+ "summary": "scope_missing",
5392
+ "value": {
5393
+ "error": "The user token lacks an OAuth scope this operation requires. The error names the scope.",
5394
+ "code": "scope_missing"
5395
+ }
5396
+ },
5397
+ "ip_not_allowed": {
5398
+ "summary": "ip_not_allowed",
5399
+ "value": {
5400
+ "error": "The caller's IP address is blocked by the credential's access policy.",
5401
+ "code": "ip_not_allowed"
5402
+ }
5403
+ },
5404
+ "permission_missing": {
5405
+ "summary": "permission_missing",
5406
+ "value": {
5407
+ "error": "The credential lacks a permission this operation requires. The error names the permission.",
5408
+ "code": "permission_missing"
5409
+ }
5410
+ },
5411
+ "target_inaccessible": {
5412
+ "summary": "target_inaccessible",
5413
+ "value": {
5414
+ "error": "The target project or organization does not exist, or the credential cannot access it.",
5415
+ "code": "target_inaccessible"
5416
+ }
5417
+ }
5418
+ },
5227
5419
  "schema": {
5228
- "$ref": "#/components/schemas/ErrorResponse"
5420
+ "allOf": [
5421
+ {
5422
+ "$ref": "#/components/schemas/ErrorResponse"
5423
+ },
5424
+ {
5425
+ "type": "object",
5426
+ "properties": {
5427
+ "code": {
5428
+ "type": "string",
5429
+ "enum": [
5430
+ "scope_missing",
5431
+ "ip_not_allowed",
5432
+ "permission_missing",
5433
+ "target_inaccessible"
5434
+ ]
5435
+ }
5436
+ }
5437
+ }
5438
+ ]
5229
5439
  }
5230
5440
  },
5231
5441
  "text/html": {
@@ -5236,11 +5446,40 @@
5236
5446
  }
5237
5447
  },
5238
5448
  "404": {
5239
- "description": "The requested resource was not found.",
5449
+ "description": "A translation does not exist. Nothing is written.",
5240
5450
  "content": {
5241
5451
  "application/json": {
5452
+ "examples": {
5453
+ "source_file_not_found": {
5454
+ "summary": "source_file_not_found",
5455
+ "value": {
5456
+ "error": "A referenced source file or version does not exist in this project.",
5457
+ "code": "source_file_not_found"
5458
+ }
5459
+ },
5460
+ "not_found": {
5461
+ "summary": "not_found",
5462
+ "value": {
5463
+ "error": "A translation does not exist. Nothing is written.",
5464
+ "code": "not_found"
5465
+ }
5466
+ }
5467
+ },
5242
5468
  "schema": {
5243
- "$ref": "#/components/schemas/ErrorResponse"
5469
+ "allOf": [
5470
+ {
5471
+ "$ref": "#/components/schemas/ErrorResponse"
5472
+ },
5473
+ {
5474
+ "type": "object",
5475
+ "properties": {
5476
+ "code": {
5477
+ "type": "string",
5478
+ "enum": ["source_file_not_found", "not_found"]
5479
+ }
5480
+ }
5481
+ }
5482
+ ]
5244
5483
  }
5245
5484
  },
5246
5485
  "text/html": {
@@ -5250,12 +5489,34 @@
5250
5489
  }
5251
5490
  }
5252
5491
  },
5253
- "429": {
5254
- "description": "Too many requests. The rate limit was exceeded.",
5492
+ "409": {
5493
+ "description": "A source file version belongs to an integration, which owns its metadata. Nothing is written.",
5255
5494
  "content": {
5256
5495
  "application/json": {
5496
+ "examples": {
5497
+ "integration_managed_file": {
5498
+ "summary": "integration_managed_file",
5499
+ "value": {
5500
+ "error": "The file belongs to an integration, which owns its metadata. Change it through that integration.",
5501
+ "code": "integration_managed_file"
5502
+ }
5503
+ }
5504
+ },
5257
5505
  "schema": {
5258
- "$ref": "#/components/schemas/ErrorResponse"
5506
+ "allOf": [
5507
+ {
5508
+ "$ref": "#/components/schemas/ErrorResponse"
5509
+ },
5510
+ {
5511
+ "type": "object",
5512
+ "properties": {
5513
+ "code": {
5514
+ "type": "string",
5515
+ "enum": ["integration_managed_file"]
5516
+ }
5517
+ }
5518
+ }
5519
+ ]
5259
5520
  }
5260
5521
  },
5261
5522
  "text/html": {
@@ -5265,12 +5526,34 @@
5265
5526
  }
5266
5527
  }
5267
5528
  },
5268
- "500": {
5269
- "description": "An unexpected server error occurred.",
5529
+ "413": {
5530
+ "description": "The request, or the data it would return, exceeds a size or item limit.",
5270
5531
  "content": {
5271
5532
  "application/json": {
5533
+ "examples": {
5534
+ "payload_too_large": {
5535
+ "summary": "payload_too_large",
5536
+ "value": {
5537
+ "error": "The request, or the data it would return, exceeds a size or item limit.",
5538
+ "code": "payload_too_large"
5539
+ }
5540
+ }
5541
+ },
5272
5542
  "schema": {
5273
- "$ref": "#/components/schemas/ErrorResponse"
5543
+ "allOf": [
5544
+ {
5545
+ "$ref": "#/components/schemas/ErrorResponse"
5546
+ },
5547
+ {
5548
+ "type": "object",
5549
+ "properties": {
5550
+ "code": {
5551
+ "type": "string",
5552
+ "enum": ["payload_too_large"]
5553
+ }
5554
+ }
5555
+ }
5556
+ ]
5274
5557
  }
5275
5558
  },
5276
5559
  "text/html": {
@@ -5279,15 +5562,306 @@
5279
5562
  }
5280
5563
  }
5281
5564
  }
5282
- }
5283
- },
5284
- "tags": ["Project"]
5285
- },
5286
- "post": {
5287
- "operationId": "updateProjectInfo",
5288
- "summary": "Update Project information",
5289
- "description": "Update a project's default locale or CDN delivery setting. Requires `project:write`. Omitted settings remain unchanged.",
5290
- "security": [
5565
+ },
5566
+ "415": {
5567
+ "description": "The request body's Content-Type is missing or not supported. Send the body as application/json.",
5568
+ "content": {
5569
+ "application/json": {
5570
+ "examples": {
5571
+ "unsupported_media_type": {
5572
+ "summary": "unsupported_media_type",
5573
+ "value": {
5574
+ "error": "The request body's Content-Type is missing or not supported. Send the body as application/json.",
5575
+ "code": "unsupported_media_type"
5576
+ }
5577
+ }
5578
+ },
5579
+ "schema": {
5580
+ "allOf": [
5581
+ {
5582
+ "$ref": "#/components/schemas/ErrorResponse"
5583
+ },
5584
+ {
5585
+ "type": "object",
5586
+ "properties": {
5587
+ "code": {
5588
+ "type": "string",
5589
+ "enum": ["unsupported_media_type"]
5590
+ }
5591
+ }
5592
+ }
5593
+ ]
5594
+ }
5595
+ },
5596
+ "text/html": {
5597
+ "schema": {
5598
+ "type": "string"
5599
+ }
5600
+ }
5601
+ }
5602
+ },
5603
+ "429": {
5604
+ "description": "Too many requests. The rate limit was exceeded.",
5605
+ "content": {
5606
+ "application/json": {
5607
+ "examples": {
5608
+ "rate_limited": {
5609
+ "summary": "rate_limited",
5610
+ "value": {
5611
+ "error": "Too many requests. The rate limit was exceeded.",
5612
+ "code": "rate_limited"
5613
+ }
5614
+ }
5615
+ },
5616
+ "schema": {
5617
+ "allOf": [
5618
+ {
5619
+ "$ref": "#/components/schemas/ErrorResponse"
5620
+ },
5621
+ {
5622
+ "type": "object",
5623
+ "properties": {
5624
+ "code": {
5625
+ "type": "string",
5626
+ "enum": ["rate_limited"]
5627
+ }
5628
+ }
5629
+ }
5630
+ ]
5631
+ }
5632
+ },
5633
+ "text/html": {
5634
+ "schema": {
5635
+ "type": "string"
5636
+ }
5637
+ }
5638
+ }
5639
+ },
5640
+ "500": {
5641
+ "description": "An unexpected server error occurred.",
5642
+ "content": {
5643
+ "application/json": {
5644
+ "examples": {
5645
+ "internal_error": {
5646
+ "summary": "internal_error",
5647
+ "value": {
5648
+ "error": "An unexpected server error occurred.",
5649
+ "code": "internal_error"
5650
+ }
5651
+ }
5652
+ },
5653
+ "schema": {
5654
+ "allOf": [
5655
+ {
5656
+ "$ref": "#/components/schemas/ErrorResponse"
5657
+ },
5658
+ {
5659
+ "type": "object",
5660
+ "properties": {
5661
+ "code": {
5662
+ "type": "string",
5663
+ "enum": ["internal_error"]
5664
+ }
5665
+ }
5666
+ }
5667
+ ]
5668
+ }
5669
+ },
5670
+ "text/html": {
5671
+ "schema": {
5672
+ "type": "string"
5673
+ }
5674
+ }
5675
+ }
5676
+ }
5677
+ },
5678
+ "tags": ["Files"]
5679
+ }
5680
+ },
5681
+ "/v2/project/info/{projectId}": {
5682
+ "get": {
5683
+ "operationId": "getProjectInfo",
5684
+ "summary": "Get Project information",
5685
+ "description": "Get a project's ID, name, Organization, locales, and auto-approval setting. No permission is needed beyond access to the project.",
5686
+ "security": [
5687
+ {
5688
+ "BearerAuth": []
5689
+ },
5690
+ {
5691
+ "UserBearerAuth": []
5692
+ }
5693
+ ],
5694
+ "parameters": [
5695
+ {
5696
+ "schema": {
5697
+ "type": "string",
5698
+ "minLength": 1,
5699
+ "maxLength": 128
5700
+ },
5701
+ "required": true,
5702
+ "name": "projectId",
5703
+ "in": "path"
5704
+ },
5705
+ {
5706
+ "schema": {
5707
+ "$ref": "#/components/schemas/ApiVersion"
5708
+ },
5709
+ "required": false,
5710
+ "description": "API contract version. Defaults to the oldest supported version.",
5711
+ "name": "gt-api-version",
5712
+ "in": "header"
5713
+ },
5714
+ {
5715
+ "schema": {
5716
+ "type": "string",
5717
+ "description": "Target project ID when no project ID is present in the path. Project API keys default to their bound project. If supplied, the header must match both the path target and the key’s bound project."
5718
+ },
5719
+ "required": false,
5720
+ "description": "Target project ID when no project ID is present in the path. Project API keys default to their bound project. If supplied, the header must match both the path target and the key’s bound project.",
5721
+ "name": "gt-project-id",
5722
+ "in": "header"
5723
+ }
5724
+ ],
5725
+ "responses": {
5726
+ "200": {
5727
+ "description": "Project information",
5728
+ "content": {
5729
+ "application/json": {
5730
+ "schema": {
5731
+ "type": "object",
5732
+ "properties": {
5733
+ "id": {
5734
+ "type": "string"
5735
+ },
5736
+ "name": {
5737
+ "type": "string"
5738
+ },
5739
+ "orgId": {
5740
+ "type": "string"
5741
+ },
5742
+ "defaultLocale": {
5743
+ "type": "string"
5744
+ },
5745
+ "currentLocales": {
5746
+ "type": "array",
5747
+ "items": {
5748
+ "type": "string"
5749
+ }
5750
+ },
5751
+ "autoApprove": {
5752
+ "type": "boolean"
5753
+ }
5754
+ },
5755
+ "required": [
5756
+ "id",
5757
+ "name",
5758
+ "orgId",
5759
+ "defaultLocale",
5760
+ "currentLocales",
5761
+ "autoApprove"
5762
+ ]
5763
+ }
5764
+ }
5765
+ }
5766
+ },
5767
+ "400": {
5768
+ "description": "The request is malformed or failed validation.",
5769
+ "content": {
5770
+ "application/json": {
5771
+ "schema": {
5772
+ "$ref": "#/components/schemas/ErrorResponse"
5773
+ }
5774
+ },
5775
+ "text/html": {
5776
+ "schema": {
5777
+ "type": "string"
5778
+ }
5779
+ }
5780
+ }
5781
+ },
5782
+ "401": {
5783
+ "description": "Authentication is missing or invalid.",
5784
+ "content": {
5785
+ "application/json": {
5786
+ "schema": {
5787
+ "$ref": "#/components/schemas/ErrorResponse"
5788
+ }
5789
+ },
5790
+ "text/html": {
5791
+ "schema": {
5792
+ "type": "string"
5793
+ }
5794
+ }
5795
+ }
5796
+ },
5797
+ "403": {
5798
+ "description": "The caller is authenticated but not allowed to perform this operation or access the requested resource.",
5799
+ "content": {
5800
+ "application/json": {
5801
+ "schema": {
5802
+ "$ref": "#/components/schemas/ErrorResponse"
5803
+ }
5804
+ },
5805
+ "text/html": {
5806
+ "schema": {
5807
+ "type": "string"
5808
+ }
5809
+ }
5810
+ }
5811
+ },
5812
+ "404": {
5813
+ "description": "The requested resource was not found.",
5814
+ "content": {
5815
+ "application/json": {
5816
+ "schema": {
5817
+ "$ref": "#/components/schemas/ErrorResponse"
5818
+ }
5819
+ },
5820
+ "text/html": {
5821
+ "schema": {
5822
+ "type": "string"
5823
+ }
5824
+ }
5825
+ }
5826
+ },
5827
+ "429": {
5828
+ "description": "Too many requests. The rate limit was exceeded.",
5829
+ "content": {
5830
+ "application/json": {
5831
+ "schema": {
5832
+ "$ref": "#/components/schemas/ErrorResponse"
5833
+ }
5834
+ },
5835
+ "text/html": {
5836
+ "schema": {
5837
+ "type": "string"
5838
+ }
5839
+ }
5840
+ }
5841
+ },
5842
+ "500": {
5843
+ "description": "An unexpected server error occurred.",
5844
+ "content": {
5845
+ "application/json": {
5846
+ "schema": {
5847
+ "$ref": "#/components/schemas/ErrorResponse"
5848
+ }
5849
+ },
5850
+ "text/html": {
5851
+ "schema": {
5852
+ "type": "string"
5853
+ }
5854
+ }
5855
+ }
5856
+ }
5857
+ },
5858
+ "tags": ["Project"]
5859
+ },
5860
+ "post": {
5861
+ "operationId": "updateProjectInfo",
5862
+ "summary": "Update Project information",
5863
+ "description": "Update a project's default locale or CDN delivery setting. Requires `project:write`. Omitted settings remain unchanged.",
5864
+ "security": [
5291
5865
  {
5292
5866
  "BearerAuth": []
5293
5867
  },
@@ -7854,6 +8428,16 @@
7854
8428
  "formatMetadata": {
7855
8429
  "type": "object",
7856
8430
  "additionalProperties": {}
8431
+ },
8432
+ "metadata": {
8433
+ "type": "object",
8434
+ "properties": {
8435
+ "previewUrl": {
8436
+ "type": "string",
8437
+ "format": "uri",
8438
+ "description": "Page that shows this version of the file."
8439
+ }
8440
+ }
7857
8441
  }
7858
8442
  },
7859
8443
  "required": [
@@ -8645,6 +9229,16 @@
8645
9229
  "formatMetadata": {
8646
9230
  "type": "object",
8647
9231
  "additionalProperties": {}
9232
+ },
9233
+ "metadata": {
9234
+ "type": "object",
9235
+ "properties": {
9236
+ "previewUrl": {
9237
+ "type": "string",
9238
+ "format": "uri",
9239
+ "description": "Page that shows this version of the file."
9240
+ }
9241
+ }
8648
9242
  }
8649
9243
  },
8650
9244
  "required": [
@@ -15778,8 +16372,133 @@
15778
16372
  "operationId": "getCliWizardSession",
15779
16373
  "x-internal": true,
15780
16374
  "deprecated": true,
15781
- "summary": "Get a CLI wizard session",
15782
- "description": "Get credentials for a completed CLI wizard session or its current waiting status.",
16375
+ "summary": "Get a CLI wizard session",
16376
+ "description": "Get credentials for a completed CLI wizard session or its current waiting status.",
16377
+ "tags": ["CLI Wizard"],
16378
+ "parameters": [
16379
+ {
16380
+ "schema": {
16381
+ "type": "string",
16382
+ "minLength": 1
16383
+ },
16384
+ "required": true,
16385
+ "name": "sessionId",
16386
+ "in": "path"
16387
+ },
16388
+ {
16389
+ "schema": {
16390
+ "$ref": "#/components/schemas/ApiVersion"
16391
+ },
16392
+ "required": false,
16393
+ "description": "API contract version. Defaults to the oldest supported version.",
16394
+ "name": "gt-api-version",
16395
+ "in": "header"
16396
+ }
16397
+ ],
16398
+ "responses": {
16399
+ "200": {
16400
+ "description": "CLI wizard session credentials",
16401
+ "content": {
16402
+ "application/json": {
16403
+ "schema": {
16404
+ "$ref": "#/components/schemas/CliWizardSessionReadyResponse"
16405
+ }
16406
+ }
16407
+ }
16408
+ },
16409
+ "202": {
16410
+ "description": "CLI wizard session is waiting for sign-in",
16411
+ "content": {
16412
+ "application/json": {
16413
+ "schema": {
16414
+ "$ref": "#/components/schemas/CliWizardSessionWaitingResponse"
16415
+ }
16416
+ }
16417
+ }
16418
+ },
16419
+ "400": {
16420
+ "description": "The request is malformed or failed validation.",
16421
+ "content": {
16422
+ "application/json": {
16423
+ "schema": {
16424
+ "$ref": "#/components/schemas/ErrorResponse"
16425
+ }
16426
+ },
16427
+ "text/html": {
16428
+ "schema": {
16429
+ "type": "string"
16430
+ }
16431
+ }
16432
+ }
16433
+ },
16434
+ "404": {
16435
+ "description": "The requested resource was not found.",
16436
+ "content": {
16437
+ "application/json": {
16438
+ "schema": {
16439
+ "$ref": "#/components/schemas/ErrorResponse"
16440
+ }
16441
+ },
16442
+ "text/html": {
16443
+ "schema": {
16444
+ "type": "string"
16445
+ }
16446
+ }
16447
+ }
16448
+ },
16449
+ "413": {
16450
+ "description": "The request, or the data it would return, exceeds a size or item limit.",
16451
+ "content": {
16452
+ "application/json": {
16453
+ "schema": {
16454
+ "$ref": "#/components/schemas/ErrorResponse"
16455
+ }
16456
+ },
16457
+ "text/html": {
16458
+ "schema": {
16459
+ "type": "string"
16460
+ }
16461
+ }
16462
+ }
16463
+ },
16464
+ "429": {
16465
+ "description": "Too many requests. The rate limit was exceeded.",
16466
+ "content": {
16467
+ "application/json": {
16468
+ "schema": {
16469
+ "$ref": "#/components/schemas/ErrorResponse"
16470
+ }
16471
+ },
16472
+ "text/html": {
16473
+ "schema": {
16474
+ "type": "string"
16475
+ }
16476
+ }
16477
+ }
16478
+ },
16479
+ "500": {
16480
+ "description": "An unexpected server error occurred.",
16481
+ "content": {
16482
+ "application/json": {
16483
+ "schema": {
16484
+ "$ref": "#/components/schemas/ErrorResponse"
16485
+ }
16486
+ },
16487
+ "text/html": {
16488
+ "schema": {
16489
+ "type": "string"
16490
+ }
16491
+ }
16492
+ }
16493
+ }
16494
+ }
16495
+ },
16496
+ "delete": {
16497
+ "operationId": "deleteCliWizardSession",
16498
+ "x-internal": true,
16499
+ "deprecated": true,
16500
+ "summary": "Delete a CLI wizard session",
16501
+ "description": "Delete a completed or abandoned CLI wizard session.",
15783
16502
  "tags": ["CLI Wizard"],
15784
16503
  "parameters": [
15785
16504
  {
@@ -15803,21 +16522,11 @@
15803
16522
  ],
15804
16523
  "responses": {
15805
16524
  "200": {
15806
- "description": "CLI wizard session credentials",
15807
- "content": {
15808
- "application/json": {
15809
- "schema": {
15810
- "$ref": "#/components/schemas/CliWizardSessionReadyResponse"
15811
- }
15812
- }
15813
- }
15814
- },
15815
- "202": {
15816
- "description": "CLI wizard session is waiting for sign-in",
16525
+ "description": "CLI wizard session deleted",
15817
16526
  "content": {
15818
16527
  "application/json": {
15819
16528
  "schema": {
15820
- "$ref": "#/components/schemas/CliWizardSessionWaitingResponse"
16529
+ "$ref": "#/components/schemas/DeleteCliWizardSessionResponse"
15821
16530
  }
15822
16531
  }
15823
16532
  }
@@ -15898,22 +16607,29 @@
15898
16607
  }
15899
16608
  }
15900
16609
  }
15901
- },
15902
- "delete": {
15903
- "operationId": "deleteCliWizardSession",
16610
+ }
16611
+ },
16612
+ "/v2/orgs/{orgId}/api-keys": {
16613
+ "post": {
16614
+ "operationId": "createOrgApiKey",
15904
16615
  "x-internal": true,
15905
- "deprecated": true,
15906
- "summary": "Delete a CLI wizard session",
15907
- "description": "Delete a completed or abandoned CLI wizard session.",
15908
- "tags": ["CLI Wizard"],
16616
+ "tags": ["Organizations"],
16617
+ "summary": "Create an Organization API key",
16618
+ "description": "Create an Organization API key. Requires `org:api_keys:write`; API keys cannot create organization API keys.",
16619
+ "security": [
16620
+ {
16621
+ "UserBearerAuth": []
16622
+ }
16623
+ ],
15909
16624
  "parameters": [
15910
16625
  {
15911
16626
  "schema": {
15912
16627
  "type": "string",
15913
- "minLength": 1
16628
+ "minLength": 1,
16629
+ "maxLength": 128
15914
16630
  },
15915
16631
  "required": true,
15916
- "name": "sessionId",
16632
+ "name": "orgId",
15917
16633
  "in": "path"
15918
16634
  },
15919
16635
  {
@@ -15926,13 +16642,63 @@
15926
16642
  "in": "header"
15927
16643
  }
15928
16644
  ],
16645
+ "requestBody": {
16646
+ "required": true,
16647
+ "content": {
16648
+ "application/json": {
16649
+ "schema": {
16650
+ "type": "object",
16651
+ "properties": {
16652
+ "name": {
16653
+ "type": "string",
16654
+ "minLength": 1,
16655
+ "maxLength": 255,
16656
+ "examples": ["CI"],
16657
+ "description": "Key name, 1–255 characters after trimming."
16658
+ },
16659
+ "permissions": {
16660
+ "type": "array",
16661
+ "items": {
16662
+ "$ref": "#/components/schemas/OrgApiKeyPermission"
16663
+ },
16664
+ "minItems": 1,
16665
+ "description": "Organization and project permissions to grant. Select at least one, or omit to grant all organization API key permissions you can delegate. You must hold every selected permission. Duplicates are ignored. Write permissions do not include Read."
16666
+ }
16667
+ },
16668
+ "required": ["name"],
16669
+ "additionalProperties": false
16670
+ }
16671
+ }
16672
+ }
16673
+ },
15929
16674
  "responses": {
15930
- "200": {
15931
- "description": "CLI wizard session deleted",
16675
+ "201": {
16676
+ "description": "Organization API key created. Each successful request creates a new key. Store the returned secret securely.",
15932
16677
  "content": {
15933
16678
  "application/json": {
15934
16679
  "schema": {
15935
- "$ref": "#/components/schemas/DeleteCliWizardSessionResponse"
16680
+ "type": "object",
16681
+ "properties": {
16682
+ "apiKey": {
16683
+ "type": "object",
16684
+ "properties": {
16685
+ "id": {
16686
+ "type": "string"
16687
+ },
16688
+ "name": {
16689
+ "type": "string"
16690
+ },
16691
+ "key": {
16692
+ "type": "string"
16693
+ },
16694
+ "orgId": {
16695
+ "type": "string"
16696
+ }
16697
+ },
16698
+ "required": ["id", "name", "key", "orgId"]
16699
+ }
16700
+ },
16701
+ "required": ["apiKey"]
15936
16702
  }
15937
16703
  }
15938
16704
  }
@@ -15941,8 +16707,48 @@
15941
16707
  "description": "The request is malformed or failed validation.",
15942
16708
  "content": {
15943
16709
  "application/json": {
16710
+ "examples": {
16711
+ "invalid_request": {
16712
+ "summary": "invalid_request",
16713
+ "value": {
16714
+ "error": "The request is malformed or failed validation.",
16715
+ "code": "invalid_request"
16716
+ }
16717
+ },
16718
+ "api_version_unsupported": {
16719
+ "summary": "api_version_unsupported",
16720
+ "value": {
16721
+ "error": "The gt-api-version header does not name a known API version.",
16722
+ "code": "api_version_unsupported"
16723
+ }
16724
+ },
16725
+ "user_ip_missing": {
16726
+ "summary": "user_ip_missing",
16727
+ "value": {
16728
+ "error": "A dashboard-actor token must send the user's IP address header.",
16729
+ "code": "user_ip_missing"
16730
+ }
16731
+ }
16732
+ },
15944
16733
  "schema": {
15945
- "$ref": "#/components/schemas/ErrorResponse"
16734
+ "allOf": [
16735
+ {
16736
+ "$ref": "#/components/schemas/ErrorResponse"
16737
+ },
16738
+ {
16739
+ "type": "object",
16740
+ "properties": {
16741
+ "code": {
16742
+ "type": "string",
16743
+ "enum": [
16744
+ "invalid_request",
16745
+ "api_version_unsupported",
16746
+ "user_ip_missing"
16747
+ ]
16748
+ }
16749
+ }
16750
+ }
16751
+ ]
15946
16752
  }
15947
16753
  },
15948
16754
  "text/html": {
@@ -15952,12 +16758,139 @@
15952
16758
  }
15953
16759
  }
15954
16760
  },
15955
- "404": {
15956
- "description": "The requested resource was not found.",
16761
+ "401": {
16762
+ "description": "Authentication is missing or invalid.",
16763
+ "content": {
16764
+ "application/json": {
16765
+ "examples": {
16766
+ "unauthenticated": {
16767
+ "summary": "unauthenticated",
16768
+ "value": {
16769
+ "error": "Authentication is missing or invalid.",
16770
+ "code": "unauthenticated"
16771
+ }
16772
+ },
16773
+ "api_key_invalid": {
16774
+ "summary": "api_key_invalid",
16775
+ "value": {
16776
+ "error": "The API key is not recognized. It may be mistyped, revoked, or rotated.",
16777
+ "code": "api_key_invalid"
16778
+ }
16779
+ },
16780
+ "token_invalid": {
16781
+ "summary": "token_invalid",
16782
+ "value": {
16783
+ "error": "The access token is invalid or expired. Sign in again.",
16784
+ "code": "token_invalid"
16785
+ }
16786
+ },
16787
+ "super_user_grant_revoked": {
16788
+ "summary": "super_user_grant_revoked",
16789
+ "value": {
16790
+ "error": "The super-user access grant behind this token is no longer active.",
16791
+ "code": "super_user_grant_revoked"
16792
+ }
16793
+ }
16794
+ },
16795
+ "schema": {
16796
+ "allOf": [
16797
+ {
16798
+ "$ref": "#/components/schemas/ErrorResponse"
16799
+ },
16800
+ {
16801
+ "type": "object",
16802
+ "properties": {
16803
+ "code": {
16804
+ "type": "string",
16805
+ "enum": [
16806
+ "unauthenticated",
16807
+ "api_key_invalid",
16808
+ "token_invalid",
16809
+ "super_user_grant_revoked"
16810
+ ]
16811
+ }
16812
+ }
16813
+ }
16814
+ ]
16815
+ }
16816
+ },
16817
+ "text/html": {
16818
+ "schema": {
16819
+ "type": "string"
16820
+ }
16821
+ }
16822
+ }
16823
+ },
16824
+ "403": {
16825
+ "description": "The caller is authenticated but not allowed to perform this operation or access the requested resource, or cannot grant a selected permission. No key is created.",
15957
16826
  "content": {
15958
16827
  "application/json": {
16828
+ "examples": {
16829
+ "scope_missing": {
16830
+ "summary": "scope_missing",
16831
+ "value": {
16832
+ "error": "The user token lacks an OAuth scope this operation requires. The error names the scope.",
16833
+ "code": "scope_missing"
16834
+ }
16835
+ },
16836
+ "ip_not_allowed": {
16837
+ "summary": "ip_not_allowed",
16838
+ "value": {
16839
+ "error": "The caller's IP address is blocked by the credential's access policy.",
16840
+ "code": "ip_not_allowed"
16841
+ }
16842
+ },
16843
+ "permission_denied": {
16844
+ "summary": "permission_denied",
16845
+ "value": {
16846
+ "error": "The caller is authenticated but not allowed to perform this operation or access the requested resource, or cannot grant a selected permission. No key is created.",
16847
+ "code": "permission_denied"
16848
+ }
16849
+ },
16850
+ "permission_not_grantable": {
16851
+ "summary": "permission_not_grantable",
16852
+ "value": {
16853
+ "error": "A requested permission cannot be granted to a project API key by this caller.",
16854
+ "code": "permission_not_grantable"
16855
+ }
16856
+ },
16857
+ "permission_missing": {
16858
+ "summary": "permission_missing",
16859
+ "value": {
16860
+ "error": "The credential lacks a permission this operation requires. The error names the permission.",
16861
+ "code": "permission_missing"
16862
+ }
16863
+ },
16864
+ "target_inaccessible": {
16865
+ "summary": "target_inaccessible",
16866
+ "value": {
16867
+ "error": "The target project or organization does not exist, or the credential cannot access it.",
16868
+ "code": "target_inaccessible"
16869
+ }
16870
+ }
16871
+ },
15959
16872
  "schema": {
15960
- "$ref": "#/components/schemas/ErrorResponse"
16873
+ "allOf": [
16874
+ {
16875
+ "$ref": "#/components/schemas/ErrorResponse"
16876
+ },
16877
+ {
16878
+ "type": "object",
16879
+ "properties": {
16880
+ "code": {
16881
+ "type": "string",
16882
+ "enum": [
16883
+ "scope_missing",
16884
+ "ip_not_allowed",
16885
+ "permission_denied",
16886
+ "permission_not_grantable",
16887
+ "permission_missing",
16888
+ "target_inaccessible"
16889
+ ]
16890
+ }
16891
+ }
16892
+ }
16893
+ ]
15961
16894
  }
15962
16895
  },
15963
16896
  "text/html": {
@@ -15971,8 +16904,67 @@
15971
16904
  "description": "The request, or the data it would return, exceeds a size or item limit.",
15972
16905
  "content": {
15973
16906
  "application/json": {
16907
+ "examples": {
16908
+ "payload_too_large": {
16909
+ "summary": "payload_too_large",
16910
+ "value": {
16911
+ "error": "The request, or the data it would return, exceeds a size or item limit.",
16912
+ "code": "payload_too_large"
16913
+ }
16914
+ }
16915
+ },
15974
16916
  "schema": {
15975
- "$ref": "#/components/schemas/ErrorResponse"
16917
+ "allOf": [
16918
+ {
16919
+ "$ref": "#/components/schemas/ErrorResponse"
16920
+ },
16921
+ {
16922
+ "type": "object",
16923
+ "properties": {
16924
+ "code": {
16925
+ "type": "string",
16926
+ "enum": ["payload_too_large"]
16927
+ }
16928
+ }
16929
+ }
16930
+ ]
16931
+ }
16932
+ },
16933
+ "text/html": {
16934
+ "schema": {
16935
+ "type": "string"
16936
+ }
16937
+ }
16938
+ }
16939
+ },
16940
+ "415": {
16941
+ "description": "The request body's Content-Type is missing or not supported. Send the body as application/json.",
16942
+ "content": {
16943
+ "application/json": {
16944
+ "examples": {
16945
+ "unsupported_media_type": {
16946
+ "summary": "unsupported_media_type",
16947
+ "value": {
16948
+ "error": "The request body's Content-Type is missing or not supported. Send the body as application/json.",
16949
+ "code": "unsupported_media_type"
16950
+ }
16951
+ }
16952
+ },
16953
+ "schema": {
16954
+ "allOf": [
16955
+ {
16956
+ "$ref": "#/components/schemas/ErrorResponse"
16957
+ },
16958
+ {
16959
+ "type": "object",
16960
+ "properties": {
16961
+ "code": {
16962
+ "type": "string",
16963
+ "enum": ["unsupported_media_type"]
16964
+ }
16965
+ }
16966
+ }
16967
+ ]
15976
16968
  }
15977
16969
  },
15978
16970
  "text/html": {
@@ -15986,8 +16978,30 @@
15986
16978
  "description": "Too many requests. The rate limit was exceeded.",
15987
16979
  "content": {
15988
16980
  "application/json": {
16981
+ "examples": {
16982
+ "rate_limited": {
16983
+ "summary": "rate_limited",
16984
+ "value": {
16985
+ "error": "Too many requests. The rate limit was exceeded.",
16986
+ "code": "rate_limited"
16987
+ }
16988
+ }
16989
+ },
15989
16990
  "schema": {
15990
- "$ref": "#/components/schemas/ErrorResponse"
16991
+ "allOf": [
16992
+ {
16993
+ "$ref": "#/components/schemas/ErrorResponse"
16994
+ },
16995
+ {
16996
+ "type": "object",
16997
+ "properties": {
16998
+ "code": {
16999
+ "type": "string",
17000
+ "enum": ["rate_limited"]
17001
+ }
17002
+ }
17003
+ }
17004
+ ]
15991
17005
  }
15992
17006
  },
15993
17007
  "text/html": {
@@ -16001,8 +17015,30 @@
16001
17015
  "description": "An unexpected server error occurred.",
16002
17016
  "content": {
16003
17017
  "application/json": {
17018
+ "examples": {
17019
+ "internal_error": {
17020
+ "summary": "internal_error",
17021
+ "value": {
17022
+ "error": "An unexpected server error occurred.",
17023
+ "code": "internal_error"
17024
+ }
17025
+ }
17026
+ },
16004
17027
  "schema": {
16005
- "$ref": "#/components/schemas/ErrorResponse"
17028
+ "allOf": [
17029
+ {
17030
+ "$ref": "#/components/schemas/ErrorResponse"
17031
+ },
17032
+ {
17033
+ "type": "object",
17034
+ "properties": {
17035
+ "code": {
17036
+ "type": "string",
17037
+ "enum": ["internal_error"]
17038
+ }
17039
+ }
17040
+ }
17041
+ ]
16006
17042
  }
16007
17043
  },
16008
17044
  "text/html": {