bw-mini-app-server/swagger.json

1972 lines
51 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{
"openapi": "3.0.0",
"paths": {
"/api/v1/templates": {
"get": {
"operationId": "AppController_getTemplates",
"parameters": [],
"responses": {
"200": {
"description": ""
}
},
"tags": [
"App"
]
},
"post": {
"operationId": "AppController_executeTemplate",
"parameters": [],
"responses": {
"201": {
"description": ""
}
},
"tags": [
"App"
]
}
},
"/api/v1/templates/{templateCode}": {
"get": {
"operationId": "AppController_getTemplate",
"parameters": [
{
"name": "templateCode",
"required": true,
"in": "path",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": ""
}
},
"tags": [
"App"
]
}
},
"/api/v1/templates/callback": {
"post": {
"operationId": "AppController_callback",
"parameters": [],
"responses": {
"201": {
"description": ""
}
},
"tags": [
"App"
]
}
},
"/templates/{templateId}/execute": {
"post": {
"description": "根据模板ID执行AI生成任务支持图片和视频生成",
"operationId": "TemplateController_executeTemplateById",
"parameters": [
{
"name": "templateId",
"required": true,
"in": "path",
"description": "模板ID",
"schema": {
"example": 1,
"type": "number"
}
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TemplateExecuteDto"
}
}
}
},
"responses": {
"200": {
"description": "执行成功",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TemplateExecuteResponseDto"
}
}
}
},
"400": {
"description": "参数错误",
"content": {
"application/json": {
"schema": {
"example": {
"code": 400,
"message": "imageUrl is required",
"data": null
}
}
}
}
},
"401": {
"description": "未授权访问",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"500": {
"description": "服务器内部错误",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
}
},
"summary": "执行模板生成",
"tags": [
"AI模板系统"
]
}
},
"/templates/code/{code}/execute": {
"post": {
"description": "根据模板代码执行AI生成任务支持图片和视频生成",
"operationId": "TemplateController_executeTemplateByCode",
"parameters": [
{
"name": "code",
"required": true,
"in": "path",
"description": "模板代码",
"schema": {
"example": "character_figurine_v1",
"type": "string"
}
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TemplateExecuteDto"
}
}
}
},
"responses": {
"200": {
"description": "执行成功",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TemplateExecuteResponseDto"
}
}
}
},
"400": {
"description": "请求参数错误",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"401": {
"description": "未授权访问",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"500": {
"description": "服务器内部错误",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
}
},
"summary": "通过代码执行模板",
"tags": [
"AI模板系统"
]
}
},
"/templates/{templateId}/batch-execute": {
"post": {
"description": "批量执行模板生成任务,支持多张图片同时处理",
"operationId": "TemplateController_batchExecuteTemplate",
"parameters": [
{
"name": "templateId",
"required": true,
"in": "path",
"description": "模板ID",
"schema": {
"example": 1,
"type": "number"
}
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BatchExecuteDto"
}
}
}
},
"responses": {
"200": {
"description": "批量执行成功",
"content": {
"application/json": {
"schema": {
"example": {
"success": true,
"data": {
"templateId": 1,
"totalCount": 2,
"results": [
{
"inputUrl": "image1.jpg",
"outputUrl": "output1.jpg"
},
{
"inputUrl": "image2.jpg",
"outputUrl": "output2.jpg"
}
]
}
}
}
}
}
},
"400": {
"description": "请求参数错误",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"401": {
"description": "未授权访问",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"500": {
"description": "服务器内部错误",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
}
},
"summary": "批量执行模板",
"tags": [
"AI模板系统"
]
}
},
"/templates": {
"get": {
"description": "获取所有可用的AI生成模板支持按类型筛选",
"operationId": "TemplateController_getAllTemplates",
"parameters": [],
"responses": {
"200": {
"description": "获取成功",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/TemplateListDto"
}
}
}
}
},
"400": {
"description": "请求参数错误",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"401": {
"description": "未授权访问",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"500": {
"description": "服务器内部错误",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
}
},
"summary": "获取所有模板列表",
"tags": [
"AI模板系统"
]
},
"post": {
"description": "创建一个新的AI生成模板",
"operationId": "TemplateController_createTemplate",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CreateTemplateDto"
}
}
}
},
"responses": {
"200": {
"description": "创建成功",
"content": {
"application/json": {
"schema": {
"example": {
"success": true,
"data": {
"id": 1,
"code": "new_template_v1",
"name": "新模板"
}
}
}
}
}
},
"400": {
"description": "请求参数错误",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"401": {
"description": "未授权访问",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"409": {
"description": "模板代码已存在"
},
"500": {
"description": "服务器内部错误",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
}
},
"summary": "创建新模板",
"tags": [
"AI模板系统"
]
}
},
"/templates/image": {
"get": {
"description": "获取所有图片类型的AI生成模板",
"operationId": "TemplateController_getImageTemplates",
"parameters": [],
"responses": {
"200": {
"description": "获取成功",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/TemplateListDto"
}
}
}
}
},
"400": {
"description": "请求参数错误",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"401": {
"description": "未授权访问",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"500": {
"description": "服务器内部错误",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
}
},
"summary": "获取图片模板列表",
"tags": [
"AI模板系统"
]
}
},
"/templates/video": {
"get": {
"description": "获取所有视频类型的AI生成模板",
"operationId": "TemplateController_getVideoTemplates",
"parameters": [],
"responses": {
"200": {
"description": "获取成功",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/TemplateListDto"
}
}
}
}
},
"400": {
"description": "请求参数错误",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"401": {
"description": "未授权访问",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"500": {
"description": "服务器内部错误",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
}
},
"summary": "获取视频模板列表",
"tags": [
"AI模板系统"
]
}
},
"/templates/recommend": {
"get": {
"description": "根据用户偏好标签推荐适合的模板",
"operationId": "TemplateController_recommendTemplates",
"parameters": [
{
"name": "tags",
"required": false,
"in": "query",
"description": "用户偏好标签,逗号分隔",
"schema": {
"example": "人物,手办",
"type": "string"
}
},
{
"name": "limit",
"required": false,
"in": "query",
"description": "推荐数量",
"schema": {
"example": 5,
"type": "number"
}
}
],
"responses": {
"200": {
"description": "推荐成功",
"content": {
"application/json": {
"schema": {
"example": {
"success": true,
"data": {
"userTags": [
"人物",
"手办"
],
"recommendedTemplates": []
}
}
}
}
}
},
"400": {
"description": "请求参数错误",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"401": {
"description": "未授权访问",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"500": {
"description": "服务器内部错误",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
}
},
"summary": "推荐模板",
"tags": [
"AI模板系统"
]
}
},
"/templates/{templateId}": {
"get": {
"description": "根据模板ID获取详细信息",
"operationId": "TemplateController_getTemplateById",
"parameters": [
{
"name": "templateId",
"required": true,
"in": "path",
"description": "模板ID",
"schema": {
"example": 1,
"type": "number"
}
}
],
"responses": {
"200": {
"description": "获取成功",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TemplateListDto"
}
}
}
},
"400": {
"description": "请求参数错误",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"401": {
"description": "未授权访问",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"404": {
"description": "模板不存在"
},
"500": {
"description": "服务器内部错误",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
}
},
"summary": "获取模板详情",
"tags": [
"AI模板系统"
]
},
"put": {
"description": "更新指定模板的配置信息",
"operationId": "TemplateController_updateTemplate",
"parameters": [
{
"name": "templateId",
"required": true,
"in": "path",
"description": "模板ID",
"schema": {
"example": 1,
"type": "number"
}
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UpdateTemplateDto"
}
}
}
},
"responses": {
"200": {
"description": "更新成功",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TemplateListDto"
}
}
}
},
"400": {
"description": "请求参数错误",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"401": {
"description": "未授权访问",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"404": {
"description": "模板不存在"
},
"409": {
"description": "模板代码已存在"
},
"500": {
"description": "服务器内部错误",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
}
},
"summary": "更新模板",
"tags": [
"AI模板系统"
]
},
"delete": {
"operationId": "TemplateController_deleteTemplate",
"parameters": [
{
"name": "templateId",
"required": true,
"in": "path",
"schema": {
"type": "number"
}
}
],
"responses": {
"200": {
"description": ""
},
"400": {
"description": "请求参数错误",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"401": {
"description": "未授权访问",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"500": {
"description": "服务器内部错误",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
}
},
"tags": [
"AI模板系统"
]
}
},
"/templates/execution/{taskId}/progress": {
"get": {
"operationId": "TemplateController_getExecutionProgress",
"parameters": [
{
"name": "taskId",
"required": true,
"in": "path",
"schema": {
"type": "number"
}
}
],
"responses": {
"200": {
"description": ""
},
"400": {
"description": "请求参数错误",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"401": {
"description": "未授权访问",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"500": {
"description": "服务器内部错误",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
}
},
"tags": [
"AI模板系统"
]
}
},
"/templates/executions/user/{userId}": {
"get": {
"operationId": "TemplateController_getUserExecutions",
"parameters": [
{
"name": "userId",
"required": true,
"in": "path",
"schema": {
"type": "string"
}
},
{
"name": "status",
"required": true,
"in": "query",
"schema": {
"type": "string"
}
},
{
"name": "limit",
"required": true,
"in": "query",
"schema": {
"type": "number"
}
}
],
"responses": {
"200": {
"description": ""
},
"400": {
"description": "请求参数错误",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"401": {
"description": "未授权访问",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"500": {
"description": "服务器内部错误",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
}
},
"tags": [
"AI模板系统"
]
}
},
"/templates/admin/{templateId}": {
"get": {
"operationId": "TemplateController_getTemplateForAdmin",
"parameters": [
{
"name": "templateId",
"required": true,
"in": "path",
"schema": {
"type": "number"
}
}
],
"responses": {
"200": {
"description": ""
},
"400": {
"description": "请求参数错误",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"401": {
"description": "未授权访问",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"500": {
"description": "服务器内部错误",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
}
},
"tags": [
"AI模板系统"
]
}
},
"/templates/admin": {
"get": {
"operationId": "TemplateController_getAllTemplatesForAdmin",
"parameters": [
{
"name": "page",
"required": true,
"in": "query",
"schema": {
"type": "number"
}
},
{
"name": "limit",
"required": true,
"in": "query",
"schema": {
"type": "number"
}
},
{
"name": "type",
"required": true,
"in": "query",
"schema": {
"type": "string"
}
},
{
"name": "isActive",
"required": true,
"in": "query",
"schema": {
"type": "boolean"
}
}
],
"responses": {
"200": {
"description": ""
},
"400": {
"description": "请求参数错误",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"401": {
"description": "未授权访问",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"500": {
"description": "服务器内部错误",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
}
},
"tags": [
"AI模板系统"
]
}
},
"/users/login": {
"post": {
"description": "支持微信、支付宝、百度、字节跳动等8大平台的统一登录接口",
"operationId": "UnifiedUserController_login",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PlatformLoginDto"
}
}
}
},
"responses": {
"200": {
"description": "登录成功",
"content": {
"application/json": {
"schema": {
"example": {
"code": 200,
"message": "登录成功",
"data": {
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"refreshToken": "refresh_token_string",
"userInfo": {
"id": "user-uuid",
"nickname": "用户昵称",
"avatarUrl": "https://example.com/avatar.jpg"
}
}
}
}
}
}
},
"400": {
"description": "请求参数错误"
},
"401": {
"description": "平台授权失败"
}
},
"summary": "多平台统一登录",
"tags": [
"用户管理"
]
}
},
"/users/register": {
"post": {
"description": "支持多平台用户注册,自动创建统一用户身份",
"operationId": "UnifiedUserController_register",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PlatformLoginDto"
}
}
}
},
"responses": {
"200": {
"description": "注册成功",
"content": {
"application/json": {
"schema": {
"example": {
"code": 200,
"message": "注册成功",
"data": {
"userId": "user-uuid",
"unifiedUserId": "unified-user-123"
}
}
}
}
}
}
},
"summary": "多平台统一注册",
"tags": [
"用户管理"
]
}
},
"/users/profile": {
"get": {
"description": "获取当前登录用户的详细信息和平台绑定状态",
"operationId": "UnifiedUserController_getProfile",
"parameters": [],
"responses": {
"200": {
"description": "获取成功",
"content": {
"application/json": {
"schema": {
"example": {
"code": 200,
"message": "获取成功",
"data": {
"id": "user-uuid",
"unifiedUserId": "unified-user-123",
"nickname": "用户昵称",
"avatarUrl": "https://example.com/avatar.jpg",
"phone": "13800138000",
"email": "user@example.com",
"platformUsers": []
}
}
}
}
}
},
"401": {
"description": "未授权访问"
}
},
"security": [
{
"JWT-auth": []
}
],
"summary": "获取用户档案",
"tags": [
"用户管理"
]
},
"put": {
"description": "更新当前用户的基本信息(昵称、头像等)",
"operationId": "UnifiedUserController_updateProfile",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UserInfoUpdateDto"
}
}
}
},
"responses": {
"200": {
"description": "更新成功",
"content": {
"application/json": {
"schema": {
"example": {
"code": 200,
"message": "更新成功"
}
}
}
}
},
"401": {
"description": "未授权访问"
}
},
"security": [
{
"JWT-auth": []
}
],
"summary": "更新用户信息",
"tags": [
"用户管理"
]
}
},
"/users/bind-platform": {
"post": {
"description": "将其他平台账号绑定到当前统一用户身份",
"operationId": "UnifiedUserController_bindPlatform",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PlatformBindDto"
}
}
}
},
"responses": {
"200": {
"description": "绑定成功",
"content": {
"application/json": {
"schema": {
"example": {
"code": 200,
"message": "绑定成功"
}
}
}
}
},
"401": {
"description": "未授权访问"
},
"409": {
"description": "平台账号已绑定其他用户"
}
},
"security": [
{
"JWT-auth": []
}
],
"summary": "绑定平台账号",
"tags": [
"用户管理"
]
}
},
"/users/unbind-platform/{platform}": {
"delete": {
"description": "解除指定平台账号与当前用户的绑定关系",
"operationId": "UnifiedUserController_unbindPlatform",
"parameters": [
{
"name": "platform",
"required": true,
"in": "path",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "解绑成功",
"content": {
"application/json": {
"schema": {
"example": {
"code": 200,
"message": "解绑成功"
}
}
}
}
},
"401": {
"description": "未授权访问"
},
"404": {
"description": "平台绑定不存在"
}
},
"security": [
{
"JWT-auth": []
}
],
"summary": "解绑平台账号",
"tags": [
"用户管理"
]
}
},
"/users/platforms": {
"get": {
"description": "获取系统支持的所有平台类型和相关信息",
"operationId": "UnifiedUserController_getSupportedPlatforms",
"parameters": [],
"responses": {
"200": {
"description": "获取成功",
"content": {
"application/json": {
"schema": {
"example": {
"code": 200,
"message": "获取成功",
"data": [
{
"type": "wechat",
"name": "微信小程序",
"supported": true
},
{
"type": "alipay",
"name": "支付宝小程序",
"supported": true
}
]
}
}
}
}
}
},
"summary": "获取支持的平台列表",
"tags": [
"用户管理"
]
}
}
},
"info": {
"title": "多平台小程序统一后台API",
"description": "支持微信、支付宝、百度、字节跳动等多平台的统一后台服务",
"version": "1.0.0",
"contact": {}
},
"tags": [
{
"name": "用户管理",
"description": "用户注册、登录、信息管理"
},
{
"name": "平台适配",
"description": "各平台特定接口和数据同步"
},
{
"name": "AI模板系统",
"description": "AI图片/视频生成模板管理"
},
{
"name": "积分系统",
"description": "积分获取、消耗、查询管理"
},
{
"name": "扩展服务",
"description": "预留的扩展功能接口"
}
],
"servers": [],
"components": {
"securitySchemes": {
"JWT-auth": {
"scheme": "bearer",
"bearerFormat": "JWT",
"type": "http",
"name": "JWT",
"description": "Enter JWT token",
"in": "header"
}
},
"schemas": {
"ErrorResponseDto": {
"type": "object",
"properties": {
"code": {
"type": "number",
"description": "错误状态码",
"example": 400
},
"message": {
"type": "string",
"description": "错误消息",
"example": "请求参数错误"
},
"timestamp": {
"type": "number",
"description": "时间戳",
"example": 1703001000000
},
"traceId": {
"type": "string",
"description": "追踪ID",
"example": "trace-uuid-123"
},
"details": {
"description": "详细错误信息",
"example": [
"字段验证失败"
],
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"code",
"message",
"timestamp",
"traceId"
]
},
"TemplateExecuteDto": {
"type": "object",
"properties": {
"imageUrl": {
"type": "string",
"description": "输入图片URL",
"example": "https://cdn.example.com/upload/image.jpg"
}
},
"required": [
"imageUrl"
]
},
"TemplateExecuteResponseDto": {
"type": "object",
"properties": {
"success": {
"type": "boolean",
"description": "执行状态",
"example": true
},
"imageUrl": {
"type": "string",
"description": "生成结果URL(图片模板)"
},
"videoUrl": {
"type": "string",
"description": "生成结果URL(视频模板)"
},
"thumbnailUrl": {
"type": "string",
"description": "缩略图URL"
},
"taskId": {
"type": "string",
"description": "任务ID",
"example": "req_1704067200_abc123"
},
"executionTime": {
"type": "number",
"description": "执行耗时(毫秒)",
"example": 5000
},
"creditCost": {
"type": "number",
"description": "消耗积分",
"example": 28
}
},
"required": [
"success",
"taskId",
"executionTime",
"creditCost"
]
},
"BatchExecuteDto": {
"type": "object",
"properties": {
"imageUrls": {
"description": "输入图片URL数组",
"example": [
"https://cdn.example.com/upload/image1.jpg",
"https://cdn.example.com/upload/image2.jpg"
],
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"imageUrls"
]
},
"TemplateListDto": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "模板ID",
"example": 1
},
"code": {
"type": "string",
"description": "模板代码",
"example": "character_figurine_v1"
},
"name": {
"type": "string",
"description": "模板名称",
"example": "人物手办"
},
"description": {
"type": "string",
"description": "模板描述",
"example": "将人物照片制作成精细的角色手办模型"
},
"templateType": {
"type": "string",
"enum": [
"image",
"video"
],
"description": "模板类型",
"example": "video"
},
"creditCost": {
"type": "number",
"description": "积分消耗",
"example": 28
},
"version": {
"type": "string",
"description": "版本号",
"example": "1.0.0"
},
"inputExampleUrl": {
"type": "string",
"description": "输入示例URL"
},
"outputExampleUrl": {
"type": "string",
"description": "输出示例URL"
},
"tags": {
"description": "标签数组",
"example": [
"人物",
"手办",
"模型"
],
"type": "array",
"items": {
"type": "string"
}
},
"isActive": {
"type": "boolean",
"description": "是否启用",
"example": true
},
"createdAt": {
"format": "date-time",
"type": "string",
"description": "创建时间",
"example": "2024-01-01T00:00:00Z"
}
},
"required": [
"id",
"code",
"name",
"description",
"templateType",
"creditCost",
"version",
"tags",
"isActive",
"createdAt"
]
},
"CreateTemplateDto": {
"type": "object",
"properties": {
"code": {
"type": "string",
"description": "模板代码",
"example": "character_figurine_v1"
},
"name": {
"type": "string",
"description": "模板名称",
"example": "人物手办"
},
"description": {
"type": "string",
"description": "模板描述",
"example": "将人物照片制作成精细的角色手办模型"
},
"creditCost": {
"type": "number",
"description": "积分消耗",
"example": 28,
"minimum": 0
},
"version": {
"type": "string",
"description": "版本号",
"example": "1.0.0"
},
"inputExampleUrl": {
"type": "string",
"description": "输入示例URL",
"example": "https://example.com/input.jpg"
},
"outputExampleUrl": {
"type": "string",
"description": "输出示例URL",
"example": "https://example.com/output.jpg"
},
"tags": {
"description": "标签数组",
"example": [
"人物",
"手办",
"模型"
],
"type": "array",
"items": {
"type": "string"
}
},
"templateType": {
"type": "string",
"description": "模板类型",
"enum": [
"image",
"video"
],
"example": "image"
},
"templateClass": {
"type": "string",
"description": "模板类名",
"example": "CharacterFigurineTemplate"
},
"imageModel": {
"type": "string",
"description": "图片模型",
"example": "flux-dev"
},
"imagePrompt": {
"type": "string",
"description": "图片提示词模板"
},
"videoModel": {
"type": "string",
"description": "视频模型",
"example": "runway-gen3"
},
"videoPrompt": {
"type": "string",
"description": "视频提示词模板"
},
"duration": {
"type": "number",
"description": "视频时长(秒)",
"example": 10,
"minimum": 1,
"maximum": 300
},
"aspectRatio": {
"type": "string",
"description": "宽高比",
"example": "16:9"
},
"isActive": {
"type": "boolean",
"description": "是否启用",
"example": true
},
"sortOrder": {
"type": "number",
"description": "排序权重",
"example": 100
}
},
"required": [
"code",
"name",
"description",
"creditCost",
"version",
"templateType",
"templateClass"
]
},
"UpdateTemplateDto": {
"type": "object",
"properties": {
"code": {
"type": "string",
"description": "模板代码",
"example": "character_figurine_v1"
},
"name": {
"type": "string",
"description": "模板名称",
"example": "人物手办"
},
"description": {
"type": "string",
"description": "模板描述",
"example": "将人物照片制作成精细的角色手办模型"
},
"creditCost": {
"type": "number",
"description": "积分消耗",
"example": 28,
"minimum": 0
},
"version": {
"type": "string",
"description": "版本号",
"example": "1.0.1"
},
"inputExampleUrl": {
"type": "string",
"description": "输入示例URL",
"example": "https://example.com/input.jpg"
},
"outputExampleUrl": {
"type": "string",
"description": "输出示例URL",
"example": "https://example.com/output.jpg"
},
"tags": {
"description": "标签数组",
"example": [
"人物",
"手办",
"模型"
],
"type": "array",
"items": {
"type": "string"
}
},
"templateType": {
"type": "string",
"description": "模板类型",
"enum": [
"image",
"video"
]
},
"templateClass": {
"type": "string",
"description": "模板类名",
"example": "CharacterFigurineTemplate"
},
"imageModel": {
"type": "string",
"description": "图片模型",
"example": "flux-dev"
},
"imagePrompt": {
"type": "string",
"description": "图片提示词模板"
},
"videoModel": {
"type": "string",
"description": "视频模型",
"example": "runway-gen3"
},
"videoPrompt": {
"type": "string",
"description": "视频提示词模板"
},
"duration": {
"type": "number",
"description": "视频时长(秒)",
"example": 10,
"minimum": 1,
"maximum": 300
},
"aspectRatio": {
"type": "string",
"description": "宽高比",
"example": "16:9"
},
"isActive": {
"type": "boolean",
"description": "是否启用",
"example": true
},
"sortOrder": {
"type": "number",
"description": "排序权重",
"example": 100
}
}
},
"PlatformType": {
"type": "string",
"enum": [
"wechat",
"alipay",
"baidu",
"bytedance",
"jd",
"qq",
"feishu",
"kuaishou",
"h5",
"rn"
],
"description": "平台类型"
},
"PlatformLoginDto": {
"type": "object",
"properties": {
"platform": {
"description": "平台类型",
"example": "wechat",
"allOf": [
{
"$ref": "#/components/schemas/PlatformType"
}
]
},
"code": {
"type": "string",
"description": "平台授权码",
"example": "081234567890abcdef"
},
"encryptedData": {
"type": "string",
"description": "加密用户数据(微信小程序)"
},
"iv": {
"type": "string",
"description": "加密向量(微信小程序)"
},
"userInfo": {
"type": "object",
"description": "用户基础信息"
},
"anonymousCode": {
"type": "string",
"description": "匿名授权码(抖音小程序)"
}
},
"required": [
"platform",
"code"
]
},
"UserInfoUpdateDto": {
"type": "object",
"properties": {
"nickname": {
"type": "string",
"description": "用户昵称"
},
"avatarUrl": {
"type": "string",
"description": "头像URL"
},
"phone": {
"type": "string",
"description": "手机号码"
},
"email": {
"type": "string",
"description": "电子邮箱"
}
}
},
"PlatformBindDto": {
"type": "object",
"properties": {
"platform": {
"type": "string",
"description": "平台类型",
"enum": [
"wechat",
"alipay",
"baidu",
"bytedance",
"jd",
"qq",
"feishu",
"kuaishou",
"h5",
"rn"
]
},
"code": {
"type": "string",
"description": "平台授权码"
},
"encryptedData": {
"type": "string",
"description": "加密用户数据(微信小程序)"
},
"iv": {
"type": "string",
"description": "加密向量(微信小程序)"
},
"userInfo": {
"type": "object",
"description": "用户基础信息"
}
},
"required": [
"platform",
"code"
]
}
}
}
}