mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-09-29 14:06:36 +08:00
邮箱
This commit is contained in:
+203
@@ -640,6 +640,63 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/admin/system-configs/smtp/test": {
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
"SessionCookie": []
|
||||
}
|
||||
],
|
||||
"description": "使用传入的配置进行 SMTP 邮件发送测试,支持使用 ****** 占位符使用保存的数据库密码",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"admin"
|
||||
],
|
||||
"summary": "测试 SMTP 邮件发送",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "测试请求参数",
|
||||
"name": "request",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/system_config.TestSMTPRequest"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "测试执行完毕",
|
||||
"schema": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/util.ResponseAny"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"data": {
|
||||
"$ref": "#/definitions/system_config.TestSMTPResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "参数错误",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/util.ResponseAny"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/admin/system-configs/{key}": {
|
||||
"get": {
|
||||
"security": [
|
||||
@@ -2647,6 +2704,46 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/user/send-email-code": {
|
||||
"post": {
|
||||
"description": "向指定邮箱发送验证码(用于注册场景)",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"user"
|
||||
],
|
||||
"summary": "发送邮箱验证码",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "发送验证码请求参数",
|
||||
"name": "request",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/user.sendEmailCodeRequest"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "发送成功",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/util.ResponseAny"
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "参数错误",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/util.ResponseAny"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/f/{id}": {
|
||||
"get": {
|
||||
"description": "根据文件 ID 获取并提供已上传的临时或正式文件,若配置了缓存则优先走本地缓存,否则从 S3 等后端存储读取并流式返回",
|
||||
@@ -3326,6 +3423,50 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"system_config.TestSMTPRequest": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"smtp_host",
|
||||
"smtp_password",
|
||||
"smtp_port",
|
||||
"smtp_username",
|
||||
"to"
|
||||
],
|
||||
"properties": {
|
||||
"smtp_host": {
|
||||
"type": "string",
|
||||
"maxLength": 255
|
||||
},
|
||||
"smtp_password": {
|
||||
"type": "string",
|
||||
"maxLength": 255
|
||||
},
|
||||
"smtp_port": {
|
||||
"type": "integer"
|
||||
},
|
||||
"smtp_username": {
|
||||
"type": "string",
|
||||
"maxLength": 255
|
||||
},
|
||||
"to": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"system_config.TestSMTPResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"error": {
|
||||
"type": "string"
|
||||
},
|
||||
"log": {
|
||||
"type": "string"
|
||||
},
|
||||
"success": {
|
||||
"type": "boolean"
|
||||
}
|
||||
}
|
||||
},
|
||||
"system_config.UpdateSystemConfigRequest": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
@@ -3351,6 +3492,9 @@ const docTemplate = `{
|
||||
"end_time": {
|
||||
"type": "string"
|
||||
},
|
||||
"payload": {
|
||||
"type": "string"
|
||||
},
|
||||
"start_time": {
|
||||
"type": "string"
|
||||
},
|
||||
@@ -3377,6 +3521,12 @@ const docTemplate = `{
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"params": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/task.TaskParam"
|
||||
}
|
||||
},
|
||||
"queue": {
|
||||
"type": "string"
|
||||
},
|
||||
@@ -3392,6 +3542,35 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"task.TaskParam": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"Description": {
|
||||
"description": "描述",
|
||||
"type": "string"
|
||||
},
|
||||
"Label": {
|
||||
"description": "显示名称",
|
||||
"type": "string"
|
||||
},
|
||||
"Name": {
|
||||
"description": "参数键名",
|
||||
"type": "string"
|
||||
},
|
||||
"Placeholder": {
|
||||
"description": "占位符",
|
||||
"type": "string"
|
||||
},
|
||||
"Required": {
|
||||
"description": "是否必填",
|
||||
"type": "boolean"
|
||||
},
|
||||
"Type": {
|
||||
"description": "类型:string, text, number",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"upload.batchDownloadRequest": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
@@ -3492,6 +3671,9 @@ const docTemplate = `{
|
||||
"user.loginRequest": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"code": {
|
||||
"type": "string"
|
||||
},
|
||||
"password": {
|
||||
"type": "string"
|
||||
},
|
||||
@@ -3503,9 +3685,15 @@ const docTemplate = `{
|
||||
"user.registerRequest": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"code": {
|
||||
"type": "string"
|
||||
},
|
||||
"display_name": {
|
||||
"type": "string"
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
},
|
||||
"nickname": {
|
||||
"type": "string"
|
||||
},
|
||||
@@ -3517,6 +3705,21 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"user.sendEmailCodeRequest": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"email",
|
||||
"scene"
|
||||
],
|
||||
"properties": {
|
||||
"email": {
|
||||
"type": "string"
|
||||
},
|
||||
"scene": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"user.tokenResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
||||
Reference in New Issue
Block a user