fix: serialize media publishing decisions

This commit is contained in:
ik
2026-09-22 07:58:38 +07:00
parent f3fb5868df
commit 0eb151f5a7
9 changed files with 365 additions and 95 deletions
+117 -9
View File
@@ -226,6 +226,20 @@
},
"AdminMediaDecision": {
"properties": {
"asset_ids": {
"items": {
"type": "string"
},
"maxItems": 500,
"minItems": 1,
"title": "Asset Ids",
"type": "array"
},
"expected_version": {
"minimum": 1.0,
"title": "Expected Version",
"type": "integer"
},
"note": {
"maxLength": 1000,
"minLength": 1,
@@ -234,7 +248,9 @@
}
},
"required": [
"note"
"note",
"asset_ids",
"expected_version"
],
"title": "AdminMediaDecision",
"type": "object"
@@ -295,6 +311,36 @@
"title": "AdminMediaDerivativeOut",
"type": "object"
},
"AdminMediaPreview": {
"properties": {
"asset_ids": {
"items": {
"type": "string"
},
"maxItems": 500,
"minItems": 1,
"title": "Asset Ids",
"type": "array"
},
"expected_version": {
"anyOf": [
{
"minimum": 1.0,
"type": "integer"
},
{
"type": "null"
}
],
"title": "Expected Version"
}
},
"required": [
"asset_ids"
],
"title": "AdminMediaPreview",
"type": "object"
},
"AdminMediaReviewOut": {
"properties": {
"asset_url": {
@@ -439,12 +485,17 @@
},
"AdminMediaRollback": {
"properties": {
"asset_url": {
"maxLength": 2000,
"minLength": 1,
"title": "Asset Url",
"asset_id": {
"maxLength": 64,
"minLength": 64,
"title": "Asset Id",
"type": "string"
},
"expected_version": {
"minimum": 1.0,
"title": "Expected Version",
"type": "integer"
},
"note": {
"maxLength": 1000,
"minLength": 1,
@@ -454,7 +505,8 @@
},
"required": [
"note",
"asset_url"
"asset_id",
"expected_version"
],
"title": "AdminMediaRollback",
"type": "object"
@@ -4365,6 +4417,64 @@
"summary": "Admin Media Catalog"
}
},
"/api/v1/admin/media/upgrades/preview": {
"post": {
"operationId": "admin_preview_media_upgrades_api_v1_admin_media_upgrades_preview_post",
"parameters": [
{
"in": "header",
"name": "authorization",
"required": false,
"schema": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Authorization"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AdminMediaPreview"
}
}
},
"required": true
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"additionalProperties": true,
"title": "Response Admin Preview Media Upgrades Api V1 Admin Media Upgrades Preview Post",
"type": "object"
}
}
},
"description": "Successful Response"
},
"422": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
},
"description": "Validation Error"
}
},
"summary": "Admin Preview Media Upgrades"
}
},
"/api/v1/admin/media/upgrades/publish": {
"post": {
"description": "Atomically publish all stored quality upgrades after an explicit decision.",
@@ -4463,9 +4573,7 @@
"content": {
"application/json": {
"schema": {
"additionalProperties": {
"type": "string"
},
"additionalProperties": true,
"title": "Response Admin Rollback Media Upgrade Api V1 Admin Media Upgrades Rollback Post",
"type": "object"
}