feat: extend admin operations and media review

This commit is contained in:
ik
2026-09-16 19:50:01 +07:00
parent 4c75db1f74
commit 9bcb019d3a
13 changed files with 1063 additions and 28 deletions
+370 -3
View File
@@ -30,6 +30,17 @@
"title": "Confidence Score",
"type": "integer"
},
"coordinate_precision": {
"title": "Coordinate Precision",
"type": "string"
},
"coordinate_sources": {
"items": {
"type": "string"
},
"title": "Coordinate Sources",
"type": "array"
},
"explanation": {
"title": "Explanation",
"type": "string"
@@ -101,7 +112,9 @@
"activity_score",
"confidence_score",
"explanation",
"sources"
"sources",
"coordinate_precision",
"coordinate_sources"
],
"title": "ActivityOut",
"type": "object"
@@ -1610,6 +1623,17 @@
"title": "Catches 7D",
"type": "integer"
},
"coordinate_precision": {
"title": "Coordinate Precision",
"type": "string"
},
"coordinate_sources": {
"items": {
"type": "string"
},
"title": "Coordinate Sources",
"type": "array"
},
"description": {
"anyOf": [
{
@@ -1660,7 +1684,9 @@
"catches_24h",
"catches_3d",
"catches_7d",
"top_baits"
"top_baits",
"coordinate_precision",
"coordinate_sources"
],
"title": "SpotOut",
"type": "object"
@@ -1700,6 +1726,28 @@
},
"WaterbodyOut": {
"properties": {
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Description"
},
"fish_species_count": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Fish Species Count"
},
"id": {
"format": "uuid",
"title": "Id",
@@ -1713,6 +1761,107 @@
"title": "Slug",
"type": "string"
},
"source_aliases": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"title": "Source Aliases"
},
"source_checked_at": {
"anyOf": [
{
"format": "date-time",
"type": "string"
},
{
"type": "null"
}
],
"title": "Source Checked At"
},
"source_external_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Source External Id"
},
"source_fish_species": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"title": "Source Fish Species"
},
"source_image_urls": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"title": "Source Image Urls"
},
"source_point_urls": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"title": "Source Point Urls"
},
"source_system": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Source System"
},
"source_url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Source Url"
},
"unlock_level": {
"anyOf": [
{
@@ -1729,7 +1878,17 @@
"id",
"slug",
"name_ru",
"unlock_level"
"unlock_level",
"fish_species_count",
"source_system",
"source_external_id",
"source_url",
"description",
"source_aliases",
"source_fish_species",
"source_image_urls",
"source_point_urls",
"source_checked_at"
],
"title": "WaterbodyOut",
"type": "object"
@@ -2651,6 +2810,162 @@
"summary": "Admin Start Official Import"
}
},
"/api/v1/admin/media/assets/{digest}": {
"get": {
"operationId": "admin_media_asset_api_v1_admin_media_assets__digest__get",
"parameters": [
{
"in": "path",
"name": "digest",
"required": true,
"schema": {
"title": "Digest",
"type": "string"
}
},
{
"in": "header",
"name": "authorization",
"required": false,
"schema": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Authorization"
}
}
],
"responses": {
"200": {
"description": "Successful Response"
},
"422": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
},
"description": "Validation Error"
}
},
"summary": "Admin Media Asset"
}
},
"/api/v1/admin/media/catalog": {
"get": {
"operationId": "admin_media_catalog_api_v1_admin_media_catalog_get",
"parameters": [
{
"in": "query",
"name": "entity_type",
"required": false,
"schema": {
"anyOf": [
{
"pattern": "^(fish|waterbody|tackle|reference)$",
"type": "string"
},
{
"type": "null"
}
],
"title": "Entity Type"
}
},
{
"in": "query",
"name": "status",
"required": false,
"schema": {
"anyOf": [
{
"pattern": "^(approved|upgrade_queued|upgrade_stored)$",
"type": "string"
},
{
"type": "null"
}
],
"title": "Status"
}
},
{
"in": "query",
"name": "limit",
"required": false,
"schema": {
"default": 50,
"maximum": 100,
"minimum": 1,
"title": "Limit",
"type": "integer"
}
},
{
"in": "query",
"name": "offset",
"required": false,
"schema": {
"default": 0,
"minimum": 0,
"title": "Offset",
"type": "integer"
}
},
{
"in": "header",
"name": "authorization",
"required": false,
"schema": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Authorization"
}
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"items": {
"additionalProperties": true,
"type": "object"
},
"title": "Response Admin Media Catalog Api V1 Admin Media Catalog Get",
"type": "array"
}
}
},
"description": "Successful Response"
},
"422": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
},
"description": "Validation Error"
}
},
"summary": "Admin Media Catalog"
}
},
"/api/v1/admin/moderation-history": {
"get": {
"operationId": "admin_moderation_history_api_v1_admin_moderation_history_get",
@@ -2781,6 +3096,58 @@
"summary": "Admin Moderation History Export"
}
},
"/api/v1/admin/source-status": {
"get": {
"description": "Return safe operational details needed by the owner dashboard.",
"operationId": "admin_source_status_api_v1_admin_source_status_get",
"parameters": [
{
"in": "header",
"name": "authorization",
"required": false,
"schema": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Authorization"
}
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"items": {
"additionalProperties": true,
"type": "object"
},
"title": "Response Admin Source Status Api V1 Admin Source Status Get",
"type": "array"
}
}
},
"description": "Successful Response"
},
"422": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
},
"description": "Validation Error"
}
},
"summary": "Admin Source Status"
}
},
"/api/v1/baits": {
"get": {
"operationId": "baits_api_v1_baits_get",