Implement task 006 site config versioning and audit events

This commit is contained in:
2026-05-21 19:13:19 +03:00
parent cf84400118
commit ff1a2f78c0
23 changed files with 1878 additions and 32 deletions
+155
View File
@@ -1573,6 +1573,23 @@
"title": "Created By",
"type": "string"
},
"activated_at": {
"anyOf": [
{
"format": "date-time",
"type": "string"
},
{
"type": "null"
}
],
"title": "Activated At"
},
"diff": {
"additionalProperties": true,
"title": "Diff",
"type": "object"
},
"id": {
"format": "uuid",
"title": "Id",
@@ -1591,6 +1608,18 @@
"title": "Target Site Id",
"type": "string"
},
"rollback_target_version_id": {
"anyOf": [
{
"format": "uuid",
"type": "string"
},
{
"type": "null"
}
],
"title": "Rollback Target Version Id"
},
"transform_script_hash": {
"minLength": 1,
"title": "Transform Script Hash",
@@ -2481,6 +2510,63 @@
}
},
"/api/sites/{site_id}": {
"get": {
"operationId": "get_site_api_sites__site_id__get",
"parameters": [
{
"in": "path",
"name": "site_id",
"required": true,
"schema": {
"format": "uuid",
"title": "Site Id",
"type": "string"
}
},
{
"in": "header",
"name": "X-Demo-User-Email",
"required": false,
"schema": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "X-Demo-User-Email"
}
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TargetSiteConfigResponse"
}
}
},
"description": "Successful Response"
},
"422": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
},
"description": "Validation Error"
}
},
"summary": "Get Site",
"tags": [
"sites"
]
},
"patch": {
"operationId": "patch_site_api_sites__site_id__patch",
"parameters": [
@@ -2744,6 +2830,75 @@
]
}
},
"/api/sites/{site_id}/publishing-config/versions/{version_id}/rollback": {
"post": {
"operationId": "post_rollback_script_config_version_api_sites__site_id__publishing_config_versions__version_id__rollback_post",
"parameters": [
{
"in": "path",
"name": "site_id",
"required": true,
"schema": {
"format": "uuid",
"title": "Site Id",
"type": "string"
}
},
{
"in": "path",
"name": "version_id",
"required": true,
"schema": {
"format": "uuid",
"title": "Version Id",
"type": "string"
}
},
{
"in": "header",
"name": "X-Demo-User-Email",
"required": false,
"schema": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "X-Demo-User-Email"
}
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ScriptConfigVersionResponse"
}
}
},
"description": "Successful Response"
},
"422": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
},
"description": "Validation Error"
}
},
"summary": "Post Rollback Script Config Version",
"tags": [
"sites"
]
}
},
"/health": {
"get": {
"operationId": "health_health_get",