增加文本中转功能

This commit is contained in:
2026-01-13 17:07:27 +08:00
parent d2352318f4
commit 9c10dfd496
8 changed files with 370 additions and 12 deletions

View File

@@ -633,6 +633,64 @@
}
}
}
},
"/api/upload/text": {
"post": {
"description": "中转一段长文本内容并创建一个提取批次",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Public"
],
"summary": "发送长文本",
"parameters": [
{
"description": "文本内容及配置",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/public.UploadTextRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/model.Response"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/public.UploadResponse"
}
}
}
]
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/model.Response"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/model.Response"
}
}
}
}
}
},
"definitions": {
@@ -755,6 +813,9 @@
"model.FileBatch": {
"type": "object",
"properties": {
"content": {
"type": "string"
},
"created_at": {
"type": "string"
},
@@ -790,6 +851,10 @@
"description": "active / expired / deleted",
"type": "string"
},
"type": {
"description": "file / text",
"type": "string"
},
"updated_at": {
"type": "string"
}
@@ -838,6 +903,9 @@
"public.PickupResponse": {
"type": "object",
"properties": {
"content": {
"type": "string"
},
"download_count": {
"type": "integer"
},
@@ -858,6 +926,9 @@
},
"remark": {
"type": "string"
},
"type": {
"type": "string"
}
}
},
@@ -874,6 +945,34 @@
"type": "string"
}
}
},
"public.UploadTextRequest": {
"type": "object",
"required": [
"content"
],
"properties": {
"content": {
"type": "string",
"example": "这是一段长文本内容..."
},
"expire_days": {
"type": "integer",
"example": 7
},
"expire_type": {
"type": "string",
"example": "time"
},
"max_downloads": {
"type": "integer",
"example": 5
},
"remark": {
"type": "string",
"example": "文本备注"
}
}
}
},
"securityDefinitions": {