mirror of
https://github.com/chaitin/MonkeyCode.git
synced 2026-11-23 04:09:15 +08:00
11763 lines
396 KiB
JSON
11763 lines
396 KiB
JSON
{
|
||
"swagger": "2.0",
|
||
"info": {
|
||
"contact": {}
|
||
},
|
||
"paths": {
|
||
"/api/v1/public/captcha/challenge": {
|
||
"post": {
|
||
"description": "CreateCaptcha",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【验证码】"
|
||
],
|
||
"summary": "CreateCaptcha",
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/gocap.ChallengeData"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/public/captcha/redeem": {
|
||
"post": {
|
||
"description": "RedeemCaptcha",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【验证码】"
|
||
],
|
||
"summary": "RedeemCaptcha",
|
||
"parameters": [
|
||
{
|
||
"description": "request",
|
||
"name": "body",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/domain.RedeemCaptchaReq"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/gocap.VerificationResult"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/teams/admin": {
|
||
"post": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAITeamAuth": []
|
||
}
|
||
],
|
||
"description": "创建团队管理员,将用户添加到团队并设置为管理员角色",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【Team 管理员】分组成员管理"
|
||
],
|
||
"summary": "创建团队管理员",
|
||
"parameters": [
|
||
{
|
||
"description": "请求参数",
|
||
"name": "req",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/domain.AddTeamAdminReq"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/web.Resp"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"$ref": "#/definitions/domain.AddTeamAdminResp"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未授权",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/teams/audits": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAITeamAuth": []
|
||
}
|
||
],
|
||
"description": "查询审计日志列表,支持条件过滤和分页",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【Team管理员】审计日志"
|
||
],
|
||
"summary": "查询审计日志",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"name": "created_at_end",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "string",
|
||
"name": "created_at_start",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "string",
|
||
"name": "cursor",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "integer",
|
||
"name": "limit",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "string",
|
||
"name": "operation",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "string",
|
||
"name": "request",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "string",
|
||
"name": "response",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "string",
|
||
"name": "source_ip",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "string",
|
||
"name": "user_agent",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "string",
|
||
"name": "user_id",
|
||
"in": "query"
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/domain.ListAuditsResponse"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未授权",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/teams/groups": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAITeamAuth": []
|
||
}
|
||
],
|
||
"description": "获取团队分组列表",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【Team 管理员】分组成员管理"
|
||
],
|
||
"summary": "获取团队分组列表",
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/web.Resp"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"$ref": "#/definitions/domain.ListTeamGroupsResp"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未授权",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"post": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAITeamAuth": []
|
||
}
|
||
],
|
||
"description": "创建团队分组",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【Team 管理员】分组成员管理"
|
||
],
|
||
"summary": "创建团队分组",
|
||
"parameters": [
|
||
{
|
||
"description": "请求参数",
|
||
"name": "req",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/domain.AddTeamGroupReq"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/web.Resp"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"$ref": "#/definitions/domain.TeamGroup"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未授权",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/teams/groups/{group_id}": {
|
||
"put": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAITeamAuth": []
|
||
}
|
||
],
|
||
"description": "更新团队分组",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【Team 管理员】分组成员管理"
|
||
],
|
||
"summary": "更新团队分组",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "团队组ID",
|
||
"name": "group_id",
|
||
"in": "path",
|
||
"required": true
|
||
},
|
||
{
|
||
"description": "请求参数",
|
||
"name": "req",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/domain.UpdateTeamGroupReq"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/web.Resp"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"$ref": "#/definitions/domain.TeamGroup"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未授权",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"delete": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAITeamAuth": []
|
||
}
|
||
],
|
||
"description": "删除团队分组",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【Team 管理员】分组成员管理"
|
||
],
|
||
"summary": "删除团队分组",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "团队组ID",
|
||
"name": "group_id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未授权",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/teams/groups/{group_id}/users": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAITeamAuth": []
|
||
}
|
||
],
|
||
"description": "获取团队组成员列表",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【Team 管理员】分组成员管理"
|
||
],
|
||
"summary": "获取团队组成员列表",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "团队组ID",
|
||
"name": "group_id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/web.Resp"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"$ref": "#/definitions/domain.ListTeamGroupUsersResp"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未授权",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"put": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAITeamAuth": []
|
||
}
|
||
],
|
||
"description": "修改团队组成员",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【Team 管理员】分组成员管理"
|
||
],
|
||
"summary": "修改团队组成员",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "团队组ID",
|
||
"name": "group_id",
|
||
"in": "path",
|
||
"required": true
|
||
},
|
||
{
|
||
"description": "请求参数",
|
||
"name": "req",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/domain.AddTeamGroupUsersReq"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/web.Resp"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"$ref": "#/definitions/domain.AddTeamGroupUsersResp"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未授权",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/teams/hosts": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAITeamAuth": []
|
||
}
|
||
],
|
||
"description": "获取团队宿主机列表",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【Team 管理员】宿主机管理"
|
||
],
|
||
"summary": "获取团队宿主机列表",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "下一页标识",
|
||
"name": "next_token",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "integer",
|
||
"description": "分页",
|
||
"name": "page",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "integer",
|
||
"description": "每页多少条记录",
|
||
"name": "size",
|
||
"in": "query"
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/web.Resp"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"$ref": "#/definitions/domain.ListTeamHostsResp"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未授权",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/teams/hosts/install-command": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAITeamAuth": []
|
||
}
|
||
],
|
||
"description": "获取宿主机安装命令",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【Team 管理员】宿主机管理"
|
||
],
|
||
"summary": "获取宿主机安装命令",
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/web.Resp"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"$ref": "#/definitions/domain.InstallCommand"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未授权",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/teams/hosts/{host_id}": {
|
||
"put": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAITeamAuth": []
|
||
}
|
||
],
|
||
"description": "更新团队宿主机",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【Team 管理员】宿主机管理"
|
||
],
|
||
"summary": "更新团队宿主机",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "宿主机ID",
|
||
"name": "host_id",
|
||
"in": "path",
|
||
"required": true
|
||
},
|
||
{
|
||
"description": "参数",
|
||
"name": "param",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/domain.UpdateTeamHostReq"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未授权",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"delete": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAITeamAuth": []
|
||
}
|
||
],
|
||
"description": "删除团队宿主机",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【Team 管理员】宿主机管理"
|
||
],
|
||
"summary": "删除团队宿主机",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "宿主机ID",
|
||
"name": "host_id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未授权",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/teams/images": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAITeamAuth": []
|
||
}
|
||
],
|
||
"description": "获取团队镜像列表",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【Team 管理员】镜像管理"
|
||
],
|
||
"summary": "获取团队镜像列表",
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/web.Resp"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"$ref": "#/definitions/domain.ListTeamImagesResp"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未授权",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"post": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAITeamAuth": []
|
||
}
|
||
],
|
||
"description": "添加团队镜像",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【Team 管理员】镜像管理"
|
||
],
|
||
"summary": "添加团队镜像",
|
||
"parameters": [
|
||
{
|
||
"description": "请求参数",
|
||
"name": "req",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/domain.AddTeamImageReq"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/web.Resp"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"$ref": "#/definitions/domain.TeamImage"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未授权",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/teams/images/{image_id}": {
|
||
"put": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAITeamAuth": []
|
||
}
|
||
],
|
||
"description": "更新团队镜像",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【Team 管理员】镜像管理"
|
||
],
|
||
"summary": "更新团队镜像",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "镜像ID",
|
||
"name": "image_id",
|
||
"in": "path",
|
||
"required": true
|
||
},
|
||
{
|
||
"description": "请求参数",
|
||
"name": "req",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/domain.UpdateTeamImageReq"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/web.Resp"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"$ref": "#/definitions/domain.TeamImage"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未授权",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"delete": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAITeamAuth": []
|
||
}
|
||
],
|
||
"description": "删除团队镜像",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【Team 管理员】镜像管理"
|
||
],
|
||
"summary": "删除团队镜像",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "镜像ID",
|
||
"name": "image_id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未授权",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/teams/models": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAITeamAuth": []
|
||
}
|
||
],
|
||
"description": "获取团队模型配置列表",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【Team 管理员】模型管理"
|
||
],
|
||
"summary": "获取团队模型配置列表",
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/web.Resp"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"$ref": "#/definitions/domain.ListTeamModelsResp"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未授权",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"post": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAITeamAuth": []
|
||
}
|
||
],
|
||
"description": "添加团队模型配置",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【Team 管理员】模型管理"
|
||
],
|
||
"summary": "添加团队模型配置",
|
||
"parameters": [
|
||
{
|
||
"description": "请求参数",
|
||
"name": "req",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/domain.AddTeamModelReq"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/web.Resp"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"$ref": "#/definitions/domain.TeamModel"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未授权",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/teams/models/health-check": {
|
||
"post": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAITeamAuth": []
|
||
}
|
||
],
|
||
"description": "使用提供的配置进行健康检查,不更新数据库",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【Team 管理员】模型管理"
|
||
],
|
||
"summary": "检查团队模型健康状态(通过配置)",
|
||
"parameters": [
|
||
{
|
||
"description": "检查模型配置请求",
|
||
"name": "req",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/domain.CheckByConfigReq"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/web.Resp"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"$ref": "#/definitions/domain.CheckModelResp"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "请求参数错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未授权",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/teams/models/{id}/health-check": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAITeamAuth": []
|
||
}
|
||
],
|
||
"description": "对指定团队模型进行健康检查,并更新检查结果到数据库",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【Team 管理员】模型管理"
|
||
],
|
||
"summary": "检查团队模型健康状态(通过ID)",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "模型配置ID",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/web.Resp"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"$ref": "#/definitions/domain.CheckModelResp"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "请求参数错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未授权",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "资源不存在",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/teams/models/{model_id}": {
|
||
"put": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAITeamAuth": []
|
||
}
|
||
],
|
||
"description": "更新团队模型配置",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【Team 管理员】模型管理"
|
||
],
|
||
"summary": "更新团队模型配置",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "模型ID",
|
||
"name": "model_id",
|
||
"in": "path",
|
||
"required": true
|
||
},
|
||
{
|
||
"description": "请求参数",
|
||
"name": "req",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/domain.UpdateTeamModelReq"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/web.Resp"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"$ref": "#/definitions/domain.TeamModel"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未授权",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"delete": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAITeamAuth": []
|
||
}
|
||
],
|
||
"description": "删除团队模型配置",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【Team 管理员】模型管理"
|
||
],
|
||
"summary": "删除团队模型配置",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "模型ID",
|
||
"name": "model_id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未授权",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/teams/notify/channels": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAITeamAuth": []
|
||
}
|
||
],
|
||
"description": "列出当前团队的所有推送渠道及其订阅配置",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【Team 管理员】通知推送"
|
||
],
|
||
"summary": "列出团队推送渠道",
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/web.Resp"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/domain.NotifyChannel"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未授权",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"post": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAITeamAuth": []
|
||
}
|
||
],
|
||
"description": "创建团队推送渠道(钉钉/飞书/企业微信/Webhook),同时配置订阅的事件类型",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【Team 管理员】通知推送"
|
||
],
|
||
"summary": "创建团队推送渠道",
|
||
"parameters": [
|
||
{
|
||
"description": "渠道参数",
|
||
"name": "param",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/domain.CreateNotifyChannelReq"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/web.Resp"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"$ref": "#/definitions/domain.NotifyChannel"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未授权",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/teams/notify/channels/{id}": {
|
||
"put": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAITeamAuth": []
|
||
}
|
||
],
|
||
"description": "更新团队推送渠道配置及订阅的事件类型",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【Team 管理员】通知推送"
|
||
],
|
||
"summary": "更新团队推送渠道",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "渠道ID",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
},
|
||
{
|
||
"description": "更新参数",
|
||
"name": "param",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/domain.UpdateNotifyChannelReq"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/web.Resp"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"$ref": "#/definitions/domain.NotifyChannel"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未授权",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"delete": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAITeamAuth": []
|
||
}
|
||
],
|
||
"description": "删除团队推送渠道及其关联的订阅",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【Team 管理员】通知推送"
|
||
],
|
||
"summary": "删除团队推送渠道",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "渠道ID",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未授权",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/teams/notify/channels/{id}/test": {
|
||
"post": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAITeamAuth": []
|
||
}
|
||
],
|
||
"description": "发送测试消息验证渠道配置是否正确",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【Team 管理员】通知推送"
|
||
],
|
||
"summary": "测试团队推送渠道",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "渠道ID",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未授权",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/teams/notify/event-types": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAIAuth": []
|
||
}
|
||
],
|
||
"description": "列出所有支持订阅的事件类型",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"通知推送"
|
||
],
|
||
"summary": "列出事件类型",
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/web.Resp"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/consts.NotifyEventTypeInfo"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未授权",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/teams/users": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAITeamAuth": []
|
||
}
|
||
],
|
||
"description": "获取团队成员列表,支持按角色筛选",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【Team 管理员】分组成员管理"
|
||
],
|
||
"summary": "获取团队成员列表",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "团队成员角色筛选(可选值:admin, user)",
|
||
"name": "role",
|
||
"in": "query"
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/web.Resp"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"$ref": "#/definitions/domain.MemberListResp"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未授权",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"post": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAITeamAuth": []
|
||
}
|
||
],
|
||
"description": "创建团队成员,发送重置密码邮件",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【Team 管理员】分组成员管理"
|
||
],
|
||
"summary": "创建团队成员",
|
||
"parameters": [
|
||
{
|
||
"description": "请求参数",
|
||
"name": "req",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/domain.AddTeamUserReq"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/web.Resp"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"$ref": "#/definitions/domain.AddTeamUserResp"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未授权",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/teams/users/login": {
|
||
"post": {
|
||
"description": "团队用户登录,password 字段需要传 MD5 加密后的值",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【Team 管理员】认证"
|
||
],
|
||
"summary": "团队用户登录",
|
||
"parameters": [
|
||
{
|
||
"description": "请求参数",
|
||
"name": "req",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/domain.TeamLoginReq"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/web.Resp"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"$ref": "#/definitions/domain.TeamUser"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未授权",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/teams/users/logout": {
|
||
"post": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAITeamAuth": []
|
||
}
|
||
],
|
||
"description": "团队用户登出",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【Team 管理员】认证"
|
||
],
|
||
"summary": "团队用户登出",
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未授权",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/teams/users/passwords/change": {
|
||
"put": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAITeamAuth": []
|
||
}
|
||
],
|
||
"description": "修改当前用户的密码",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【Team 管理员】认证"
|
||
],
|
||
"summary": "修改密码",
|
||
"parameters": [
|
||
{
|
||
"description": "修改密码请求",
|
||
"name": "req",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/domain.ChangePasswordReq"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/teams/users/status": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAITeamAuth": []
|
||
}
|
||
],
|
||
"description": "获取团队用户登录状态",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【Team 管理员】认证"
|
||
],
|
||
"summary": "获取团队用户登录状态",
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/web.Resp"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"$ref": "#/definitions/domain.TeamUser"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未授权",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/teams/users/with-password": {
|
||
"post": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAITeamAuth": []
|
||
}
|
||
],
|
||
"description": "创建团队成员,后端生成初始密码并只在响应中返回一次",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【Team 管理员】分组成员管理"
|
||
],
|
||
"summary": "创建团队成员并返回初始密码",
|
||
"parameters": [
|
||
{
|
||
"description": "请求参数",
|
||
"name": "req",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/domain.AddTeamUserReq"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/web.Resp"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"$ref": "#/definitions/domain.AddTeamUserWithPasswordResp"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未授权",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/teams/users/{user_id}": {
|
||
"put": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAITeamAuth": []
|
||
}
|
||
],
|
||
"description": "更新团队成员信息",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【Team 管理员】分组成员管理"
|
||
],
|
||
"summary": "更新团队成员",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "用户ID",
|
||
"name": "user_id",
|
||
"in": "path",
|
||
"required": true
|
||
},
|
||
{
|
||
"description": "请求参数",
|
||
"name": "req",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/domain.UpdateTeamUserReq"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/web.Resp"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"$ref": "#/definitions/domain.UpdateTeamUserResp"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未授权",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/teams/users/{user_id}/passwords/reset": {
|
||
"put": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAITeamAuth": []
|
||
}
|
||
],
|
||
"description": "管理员为团队成员生成新密码,密码只在响应中返回一次",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【Team 管理员】分组成员管理"
|
||
],
|
||
"summary": "重置团队成员密码",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "用户ID",
|
||
"name": "user_id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/web.Resp"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"$ref": "#/definitions/domain.TeamUserPassword"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未授权",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/users": {
|
||
"put": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAIAuth": []
|
||
}
|
||
],
|
||
"description": "更新用户昵称和头像",
|
||
"consumes": [
|
||
"multipart/form-data"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【用户】用户"
|
||
],
|
||
"summary": "更新用户信息",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "昵称",
|
||
"name": "name",
|
||
"in": "formData"
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "OSS 头像地址",
|
||
"name": "avatar_url",
|
||
"in": "formData"
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/web.Resp"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"$ref": "#/definitions/domain.UpdateUserResp"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/users/email/bind-request": {
|
||
"put": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAIAuth": []
|
||
}
|
||
],
|
||
"description": "用户已登录状态下请求绑定邮箱,系统发送验证邮件",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【用户】邮箱绑定"
|
||
],
|
||
"summary": "发送邮箱绑定验证邮件",
|
||
"parameters": [
|
||
{
|
||
"description": "邮箱绑定请求",
|
||
"name": "req",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/domain.SendBindEmailVerificationReq"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未授权",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/users/files": {
|
||
"delete": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAIAuth": []
|
||
}
|
||
],
|
||
"description": "删除文件/目录",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【用户】文件管理"
|
||
],
|
||
"summary": "删除文件/目录",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "虚拟机 id",
|
||
"name": "id",
|
||
"in": "query",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "文件/目录路径",
|
||
"name": "path",
|
||
"in": "query",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/users/files/copy": {
|
||
"post": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAIAuth": []
|
||
}
|
||
],
|
||
"description": "复制文件/目录",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【用户】文件管理"
|
||
],
|
||
"summary": "复制文件/目录",
|
||
"parameters": [
|
||
{
|
||
"description": "参数",
|
||
"name": "param",
|
||
"in": "body",
|
||
"schema": {
|
||
"$ref": "#/definitions/domain.FileChangeReq"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/users/files/download": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAIAuth": []
|
||
}
|
||
],
|
||
"description": "下载文件",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【用户】文件管理"
|
||
],
|
||
"summary": "下载文件",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "虚拟机 id",
|
||
"name": "id",
|
||
"in": "query",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "文件/目录路径",
|
||
"name": "path",
|
||
"in": "query",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "下载文件名",
|
||
"name": "filename",
|
||
"in": "query"
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/users/files/move": {
|
||
"put": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAIAuth": []
|
||
}
|
||
],
|
||
"description": "移动文件/目录",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【用户】文件管理"
|
||
],
|
||
"summary": "移动文件/目录",
|
||
"parameters": [
|
||
{
|
||
"description": "参数",
|
||
"name": "param",
|
||
"in": "body",
|
||
"schema": {
|
||
"$ref": "#/definitions/domain.FileChangeReq"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/users/files/save": {
|
||
"put": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAIAuth": []
|
||
}
|
||
],
|
||
"description": "保存文件内容",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【用户】文件管理"
|
||
],
|
||
"summary": "保存文件内容",
|
||
"parameters": [
|
||
{
|
||
"description": "参数",
|
||
"name": "param",
|
||
"in": "body",
|
||
"schema": {
|
||
"$ref": "#/definitions/domain.FileSaveReq"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/users/files/upload": {
|
||
"post": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAIAuth": []
|
||
}
|
||
],
|
||
"description": "上传文件",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【用户】文件管理"
|
||
],
|
||
"summary": "上传文件",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "虚拟机 id",
|
||
"name": "id",
|
||
"in": "query",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "文件上传的绝对地址",
|
||
"name": "path",
|
||
"in": "query",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "file",
|
||
"description": "文件",
|
||
"name": "file",
|
||
"in": "formData",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/users/folders": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAIAuth": []
|
||
}
|
||
],
|
||
"description": "目录列表",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【用户】文件管理"
|
||
],
|
||
"summary": "目录列表",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "虚拟机 id",
|
||
"name": "id",
|
||
"in": "query",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "文件/目录路径",
|
||
"name": "path",
|
||
"in": "query",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/web.Resp"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/taskflow.File"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"post": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAIAuth": []
|
||
}
|
||
],
|
||
"description": "创建目录",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【用户】文件管理"
|
||
],
|
||
"summary": "创建目录",
|
||
"parameters": [
|
||
{
|
||
"description": "参数",
|
||
"name": "param",
|
||
"in": "body",
|
||
"schema": {
|
||
"$ref": "#/definitions/domain.FilePathReq"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/users/git-bots": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAIAuth": []
|
||
}
|
||
],
|
||
"description": "Git Bot 列表",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【用户】Git Bot"
|
||
],
|
||
"summary": "Git Bot 列表",
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/web.Resp"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"$ref": "#/definitions/domain.ListGitBotResp"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未授权",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"put": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAIAuth": []
|
||
}
|
||
],
|
||
"description": "更新 Git Bot",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【用户】Git Bot"
|
||
],
|
||
"summary": "更新 Git Bot",
|
||
"parameters": [
|
||
{
|
||
"description": "参数",
|
||
"name": "req",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/domain.UpdateGitBotReq"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未授权",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"post": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAIAuth": []
|
||
}
|
||
],
|
||
"description": "创建 Git Bot",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【用户】Git Bot"
|
||
],
|
||
"summary": "创建 Git Bot",
|
||
"parameters": [
|
||
{
|
||
"description": "参数",
|
||
"name": "req",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/domain.CreateGitBotReq"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/web.Resp"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"$ref": "#/definitions/domain.GitBot"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未授权",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/users/git-bots/share": {
|
||
"post": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAIAuth": []
|
||
}
|
||
],
|
||
"description": "分享 Git Bot",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【用户】Git Bot"
|
||
],
|
||
"summary": "分享 Git Bot",
|
||
"parameters": [
|
||
{
|
||
"description": "参数",
|
||
"name": "req",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/domain.ShareGitBotReq"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未授权",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/users/git-bots/tasks": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAIAuth": []
|
||
}
|
||
],
|
||
"description": "Git Bot 任务列表,支持分页",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【用户】Git Bot"
|
||
],
|
||
"summary": "Git Bot 任务列表",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"name": "id",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "integer",
|
||
"name": "page",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "integer",
|
||
"name": "size",
|
||
"in": "query"
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/web.Resp"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"$ref": "#/definitions/domain.ListGitBotTaskResp"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未授权",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/users/git-bots/{id}": {
|
||
"delete": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAIAuth": []
|
||
}
|
||
],
|
||
"description": "删除 Git Bot",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【用户】Git Bot"
|
||
],
|
||
"summary": "删除 Git Bot",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "ID",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未授权",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/users/git-identities": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAIAuth": []
|
||
}
|
||
],
|
||
"description": "获取当前用户的 Git 身份认证列表",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【用户】git 身份管理"
|
||
],
|
||
"summary": "列表",
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/web.Resp"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/domain.GitIdentity"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"post": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAIAuth": []
|
||
}
|
||
],
|
||
"description": "添加 Git 身份认证",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【用户】git 身份管理"
|
||
],
|
||
"summary": "添加",
|
||
"parameters": [
|
||
{
|
||
"description": "添加 Git 身份认证请求",
|
||
"name": "req",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/domain.AddGitIdentityReq"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/web.Resp"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"$ref": "#/definitions/domain.GitIdentity"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "请求参数错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/users/git-identities/{identity_id}/{escaped_repo_full_name}/branches": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAIAuth": []
|
||
}
|
||
],
|
||
"description": "根据 Git 身份获取指定仓库的分支列表",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【用户】git 身份管理"
|
||
],
|
||
"summary": "获取仓库分支列表",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Git 身份认证ID",
|
||
"name": "identity_id",
|
||
"in": "path",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "URL 编码的仓库全名 (owner%2Frepo)",
|
||
"name": "escaped_repo_full_name",
|
||
"in": "path",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "integer",
|
||
"description": "页码(默认1)",
|
||
"name": "page",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "integer",
|
||
"description": "每页数量(默认50,最大100)",
|
||
"name": "per_page",
|
||
"in": "query"
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/web.Resp"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/domain.Branch"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "请求参数错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "资源不存在",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/users/git-identities/{id}": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAIAuth": []
|
||
}
|
||
],
|
||
"description": "获取单个 Git 身份认证详情",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【用户】git 身份管理"
|
||
],
|
||
"summary": "详情",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Git 身份认证ID",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "boolean",
|
||
"description": "是否刷新缓存",
|
||
"name": "flush",
|
||
"in": "query"
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/web.Resp"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"$ref": "#/definitions/domain.GitIdentity"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "请求参数错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "资源不存在",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"put": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAIAuth": []
|
||
}
|
||
],
|
||
"description": "更新 Git 身份认证",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【用户】git 身份管理"
|
||
],
|
||
"summary": "更新",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Git 身份认证ID",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
},
|
||
{
|
||
"description": "更新 Git 身份认证请求",
|
||
"name": "req",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/domain.UpdateGitIdentityReq"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "请求参数错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "资源不存在",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"delete": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAIAuth": []
|
||
}
|
||
],
|
||
"description": "删除 Git 身份认证",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【用户】git 身份管理"
|
||
],
|
||
"summary": "删除",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Git 身份认证ID",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "请求参数错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "资源不存在",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"409": {
|
||
"description": "该 Git 身份已被项目使用,无法删除",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/users/hosts": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAIAuth": []
|
||
}
|
||
],
|
||
"description": "获取主机列表",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【用户】主机管理"
|
||
],
|
||
"summary": "获取主机列表",
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/web.Resp"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"$ref": "#/definitions/domain.HostListResp"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未授权",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/users/hosts/install-command": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAIAuth": []
|
||
}
|
||
],
|
||
"description": "获取绑定宿主机命令",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【用户】主机管理"
|
||
],
|
||
"summary": "获取绑定宿主机命令",
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/web.Resp"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"$ref": "#/definitions/domain.InstallCommand"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/users/hosts/vms": {
|
||
"put": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAIAuth": []
|
||
}
|
||
],
|
||
"description": "修改虚拟机",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【用户】主机管理"
|
||
],
|
||
"summary": "修改虚拟机",
|
||
"parameters": [
|
||
{
|
||
"description": "修改虚拟机请求",
|
||
"name": "req",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/domain.UpdateVMReq"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/web.Resp"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"$ref": "#/definitions/domain.VirtualMachine"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "请求参数错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未授权",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "虚拟机不存在",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"post": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAIAuth": []
|
||
}
|
||
],
|
||
"description": "创建虚拟机",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【用户】主机管理"
|
||
],
|
||
"summary": "创建虚拟机",
|
||
"parameters": [
|
||
{
|
||
"description": "创建虚拟机请求",
|
||
"name": "request",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/domain.CreateVMReq"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/web.Resp"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"$ref": "#/definitions/domain.VirtualMachine"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "请求参数错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未授权",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/users/hosts/vms/terminals/join": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAIAuth": []
|
||
}
|
||
],
|
||
"description": "通过 WebSocket 加入终端",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【用户】终端连接管理"
|
||
],
|
||
"summary": "通过 WebSocket 加入终端",
|
||
"parameters": [
|
||
{
|
||
"type": "integer",
|
||
"name": "col",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "string",
|
||
"name": "password",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "integer",
|
||
"name": "row",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "string",
|
||
"name": "terminal_id",
|
||
"in": "query"
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/web.Resp"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"$ref": "#/definitions/domain.ShareTerminalResp"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "请求参数错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未授权",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/users/hosts/vms/{id}": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAIAuth": []
|
||
}
|
||
],
|
||
"description": "获取虚拟机详情",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【用户】主机管理"
|
||
],
|
||
"summary": "获取虚拟机详情",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "虚拟机ID",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/web.Resp"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"$ref": "#/definitions/domain.VirtualMachine"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未授权",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/users/hosts/vms/{id}/terminals": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAIAuth": []
|
||
}
|
||
],
|
||
"description": "获取虚拟机终端session列表",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【用户】终端连接管理"
|
||
],
|
||
"summary": "获取虚拟机终端session列表",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "虚拟机ID",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/web.Resp"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/domain.Terminal"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未授权",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/users/hosts/vms/{id}/terminals/connect": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAIAuth": []
|
||
}
|
||
],
|
||
"description": "通过 WebSocket 连接到指定虚拟机的终端,支持双向通信",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【用户】终端连接管理"
|
||
],
|
||
"summary": "连接虚拟机终端",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "虚拟机ID",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "终端ID",
|
||
"name": "terminal_id",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "integer",
|
||
"default": 80,
|
||
"description": "终端列数",
|
||
"name": "col",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "integer",
|
||
"default": 24,
|
||
"description": "终端行数",
|
||
"name": "row",
|
||
"in": "query"
|
||
}
|
||
],
|
||
"responses": {
|
||
"101": {
|
||
"description": "WebSocket 连接成功",
|
||
"schema": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "请求参数错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未授权",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/users/hosts/vms/{id}/terminals/share": {
|
||
"post": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAIAuth": []
|
||
}
|
||
],
|
||
"description": "分享终端",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【用户】终端连接管理"
|
||
],
|
||
"summary": "分享终端",
|
||
"parameters": [
|
||
{
|
||
"description": "分享终端请求",
|
||
"name": "request",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/domain.ShareTerminalReq"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/web.Resp"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"$ref": "#/definitions/domain.ShareTerminalResp"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "请求参数错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未授权",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/users/hosts/vms/{id}/terminals/{terminal_id}": {
|
||
"delete": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAIAuth": []
|
||
}
|
||
],
|
||
"description": "关闭虚拟机终端session",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【用户】终端连接管理"
|
||
],
|
||
"summary": "关闭虚拟机终端session",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "虚拟机ID",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "终端 id",
|
||
"name": "terminal_id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/web.Resp"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/domain.Terminal"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未授权",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/users/hosts/{host_id}/vms/{id}": {
|
||
"delete": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAIAuth": []
|
||
}
|
||
],
|
||
"description": "删除虚拟机",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【用户】主机管理"
|
||
],
|
||
"summary": "删除虚拟机",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "宿主机ID",
|
||
"name": "host_id",
|
||
"in": "path",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "虚拟机ID",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "请求参数错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未授权",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "虚拟机不存在",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/users/hosts/{host_id}/vms/{id}/ports": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAIAuth": []
|
||
}
|
||
],
|
||
"description": "列出开发环境的监听端口",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【用户】主机管理"
|
||
],
|
||
"summary": "列出开发环境的监听端口",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "宿主机ID",
|
||
"name": "host_id",
|
||
"in": "path",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "虚拟机ID",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
},
|
||
{
|
||
"description": "申请端口请求",
|
||
"name": "request",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/domain.ApplyPortReq"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/web.Resp"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/domain.VMPort"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "请求参数错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未授权",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"post": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAIAuth": []
|
||
}
|
||
],
|
||
"description": "为开发环境申请一个端口",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【用户】主机管理"
|
||
],
|
||
"summary": "申请端口",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "宿主机ID",
|
||
"name": "host_id",
|
||
"in": "path",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "虚拟机ID",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
},
|
||
{
|
||
"description": "申请端口请求",
|
||
"name": "request",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/domain.ApplyPortReq"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/web.Resp"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"$ref": "#/definitions/domain.VMPort"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "请求参数错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未授权",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/users/hosts/{host_id}/vms/{id}/ports/{port}": {
|
||
"delete": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAIAuth": []
|
||
}
|
||
],
|
||
"description": "为开发环境回收一个端口",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【用户】主机管理"
|
||
],
|
||
"summary": "回收端口",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "宿主机ID",
|
||
"name": "host_id",
|
||
"in": "path",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "虚拟机ID",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
},
|
||
{
|
||
"description": "回收端口请求",
|
||
"name": "request",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/domain.RecyclePortReq"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "请求参数错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未授权",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/users/hosts/{id}": {
|
||
"put": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAIAuth": []
|
||
}
|
||
],
|
||
"description": "更新宿主机",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【用户】主机管理"
|
||
],
|
||
"summary": "更新宿主机",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "宿主机ID",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
},
|
||
{
|
||
"description": "更新宿主机请求",
|
||
"name": "request",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/domain.UpdateHostReq"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "请求参数错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未授权",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"delete": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAIAuth": []
|
||
}
|
||
],
|
||
"description": "删除宿主机",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【用户】主机管理"
|
||
],
|
||
"summary": "删除宿主机",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "宿主机ID",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "请求参数错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未授权",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/users/images": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAIAuth": []
|
||
}
|
||
],
|
||
"description": "获取当前登录用户的所有镜像配置",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【用户】镜像管理"
|
||
],
|
||
"summary": "获取当前用户的镜像配置列表",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"name": "cursor",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "integer",
|
||
"name": "limit",
|
||
"in": "query"
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/web.Resp"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"$ref": "#/definitions/domain.ListImageResp"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未授权",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"post": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAIAuth": []
|
||
}
|
||
],
|
||
"description": "为当前用户创建新的镜像配置",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【用户】镜像管理"
|
||
],
|
||
"summary": "创建镜像配置",
|
||
"parameters": [
|
||
{
|
||
"description": "创建镜像配置请求",
|
||
"name": "req",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/domain.CreateImageReq"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/web.Resp"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"$ref": "#/definitions/domain.Image"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "请求参数错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未授权",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/users/images/{id}": {
|
||
"put": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAIAuth": []
|
||
}
|
||
],
|
||
"description": "更新指定的镜像配置信息",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【用户】镜像管理"
|
||
],
|
||
"summary": "更新镜像配置",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "镜像配置ID",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
},
|
||
{
|
||
"description": "更新镜像配置请求",
|
||
"name": "request",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/domain.UpdateImageReq"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/web.Resp"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"$ref": "#/definitions/domain.Image"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "请求参数错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未授权",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "资源不存在",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"delete": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAIAuth": []
|
||
}
|
||
],
|
||
"description": "删除指定的镜像配置",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【用户】镜像管理"
|
||
],
|
||
"summary": "删除镜像配置",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "镜像配置ID",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/web.Resp"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"$ref": "#/definitions/domain.DeleteImageReq"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "请求参数错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未授权",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "资源不存在",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/users/logout": {
|
||
"post": {
|
||
"description": "清除用户会话,登出系统",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【用户】认证"
|
||
],
|
||
"summary": "用户登出",
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"type": "object",
|
||
"additionalProperties": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/users/mcp/tools/{id}": {
|
||
"put": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAIAuth": []
|
||
}
|
||
],
|
||
"description": "更新当前登录用户指定 MCP Tool 的启用状态",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【用户】MCP 配置"
|
||
],
|
||
"summary": "更新当前用户的 MCP Tool 开关配置",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "MCP Tool ID",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
},
|
||
{
|
||
"description": "更新 MCP Tool 开关请求",
|
||
"name": "req",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/domain.UpdateUserMCPToolSettingReq"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "请求参数错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未授权",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "资源不存在",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/users/mcp/upstreams": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAIAuth": []
|
||
}
|
||
],
|
||
"description": "获取当前登录用户可管理的 MCP Upstream 列表",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【用户】MCP 配置"
|
||
],
|
||
"summary": "获取当前用户的 MCP Upstream 列表",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"name": "cursor",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "integer",
|
||
"name": "limit",
|
||
"in": "query"
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/web.Resp"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"$ref": "#/definitions/domain.ListUserMCPUpstreamsResp"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未授权",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"post": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAIAuth": []
|
||
}
|
||
],
|
||
"description": "为当前登录用户创建自定义 MCP Upstream",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【用户】MCP 配置"
|
||
],
|
||
"summary": "创建当前用户的 MCP Upstream",
|
||
"parameters": [
|
||
{
|
||
"description": "创建 MCP Upstream 请求",
|
||
"name": "req",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/domain.CreateUserMCPUpstreamReq"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/web.Resp"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"$ref": "#/definitions/domain.MCPUpstream"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "请求参数错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未授权",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/users/mcp/upstreams/{id}": {
|
||
"put": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAIAuth": []
|
||
}
|
||
],
|
||
"description": "更新当前登录用户指定的 MCP Upstream 配置",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【用户】MCP 配置"
|
||
],
|
||
"summary": "更新当前用户的 MCP Upstream",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "MCP Upstream ID",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
},
|
||
{
|
||
"description": "更新 MCP Upstream 请求",
|
||
"name": "req",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/domain.UpdateUserMCPUpstreamReq"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "请求参数错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未授权",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "资源不存在",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"delete": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAIAuth": []
|
||
}
|
||
],
|
||
"description": "删除当前登录用户指定的 MCP Upstream",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【用户】MCP 配置"
|
||
],
|
||
"summary": "删除当前用户的 MCP Upstream",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "MCP Upstream ID",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "请求参数错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未授权",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "资源不存在",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/users/mcp/upstreams/{id}/sync": {
|
||
"post": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAIAuth": []
|
||
}
|
||
],
|
||
"description": "触发当前登录用户指定 MCP Upstream 的工具同步",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【用户】MCP 配置"
|
||
],
|
||
"summary": "同步当前用户的 MCP Upstream",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "MCP Upstream ID",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "请求参数错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未授权",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "资源不存在",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/users/members": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAIAuth": []
|
||
}
|
||
],
|
||
"description": "获取当前用户所在团队的普通成员列表",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【用户】用户"
|
||
],
|
||
"summary": "获取团队成员列表",
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/web.Resp"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/domain.User"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未授权",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/users/models": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAIAuth": []
|
||
}
|
||
],
|
||
"description": "获取当前登录用户的所有模型配置",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【用户】模型管理"
|
||
],
|
||
"summary": "获取当前用户的模型配置列表",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"name": "cursor",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "integer",
|
||
"name": "limit",
|
||
"in": "query"
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/web.Resp"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"$ref": "#/definitions/domain.ListModelResp"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未授权",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"post": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAIAuth": []
|
||
}
|
||
],
|
||
"description": "为当前用户创建新的模型配置",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【用户】模型管理"
|
||
],
|
||
"summary": "创建模型配置",
|
||
"parameters": [
|
||
{
|
||
"description": "创建模型配置请求",
|
||
"name": "req",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/domain.CreateModelReq"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/web.Resp"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"$ref": "#/definitions/domain.Model"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "请求参数错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未授权",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/users/models/health-check": {
|
||
"post": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAIAuth": []
|
||
}
|
||
],
|
||
"description": "使用提供的配置进行健康检查,不更新数据库",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【用户】模型管理"
|
||
],
|
||
"summary": "检查模型健康状态(通过配置)",
|
||
"parameters": [
|
||
{
|
||
"description": "检查模型配置请求",
|
||
"name": "req",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/domain.CheckByConfigReq"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/web.Resp"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"$ref": "#/definitions/domain.CheckModelResp"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "请求参数错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未授权",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/users/models/providers": {
|
||
"get": {
|
||
"description": "获取供应商支持的模型列表",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【用户】模型管理"
|
||
],
|
||
"summary": "获取供应商支持的模型列表",
|
||
"operationId": "get-provider-model-list",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"name": "api_header",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "string",
|
||
"name": "api_key",
|
||
"in": "query",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "string",
|
||
"name": "base_url",
|
||
"in": "query",
|
||
"required": true
|
||
},
|
||
{
|
||
"enum": [
|
||
"SiliconFlow",
|
||
"OpenAI",
|
||
"Ollama",
|
||
"DeepSeek",
|
||
"Moonshot",
|
||
"AzureOpenAI",
|
||
"BaiZhiCloud",
|
||
"Hunyuan",
|
||
"BaiLian",
|
||
"Volcengine",
|
||
"Gemini"
|
||
],
|
||
"type": "string",
|
||
"x-enum-varnames": [
|
||
"ModelProviderSiliconFlow",
|
||
"ModelProviderOpenAI",
|
||
"ModelProviderOllama",
|
||
"ModelProviderDeepSeek",
|
||
"ModelProviderMoonshot",
|
||
"ModelProviderAzureOpenAI",
|
||
"ModelProviderBaiZhiCloud",
|
||
"ModelProviderHunyuan",
|
||
"ModelProviderBaiLian",
|
||
"ModelProviderVolcengine",
|
||
"ModelProviderGoogle"
|
||
],
|
||
"name": "provider",
|
||
"in": "query",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/web.Resp"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"$ref": "#/definitions/domain.GetProviderModelListResp"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/users/models/{id}": {
|
||
"put": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAIAuth": []
|
||
}
|
||
],
|
||
"description": "更新指定的模型配置信息",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【用户】模型管理"
|
||
],
|
||
"summary": "更新模型配置",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "模型配置ID",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
},
|
||
{
|
||
"description": "更新模型配置请求",
|
||
"name": "request",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/domain.UpdateModelReq"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "请求参数错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未授权",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "资源不存在",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"delete": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAIAuth": []
|
||
}
|
||
],
|
||
"description": "删除指定的模型配置",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【用户】模型管理"
|
||
],
|
||
"summary": "删除模型配置",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "模型配置ID",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "请求参数错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未授权",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "资源不存在",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/users/models/{id}/health-check": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAIAuth": []
|
||
}
|
||
],
|
||
"description": "对指定模型进行健康检查,并更新检查结果到数据库",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【用户】模型管理"
|
||
],
|
||
"summary": "检查模型健康状态(通过ID)",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "模型配置ID",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/web.Resp"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"$ref": "#/definitions/domain.CheckModelResp"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "请求参数错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未授权",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "资源不存在",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/users/notify/channels": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAIAuth": []
|
||
}
|
||
],
|
||
"description": "列出当前用户的所有推送渠道及其订阅配置",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"通知推送"
|
||
],
|
||
"summary": "列出用户推送渠道",
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/web.Resp"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/domain.NotifyChannel"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未授权",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"post": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAIAuth": []
|
||
}
|
||
],
|
||
"description": "创建用户推送渠道(钉钉/飞书/企业微信/Webhook),同时配置订阅的事件类型",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"通知推送"
|
||
],
|
||
"summary": "创建用户推送渠道",
|
||
"parameters": [
|
||
{
|
||
"description": "渠道参数",
|
||
"name": "param",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/domain.CreateNotifyChannelReq"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/web.Resp"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"$ref": "#/definitions/domain.NotifyChannel"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未授权",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/users/notify/channels/{id}": {
|
||
"put": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAIAuth": []
|
||
}
|
||
],
|
||
"description": "更新用户推送渠道配置及订阅的事件类型",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"通知推送"
|
||
],
|
||
"summary": "更新用户推送渠道",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "渠道ID",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
},
|
||
{
|
||
"description": "更新参数",
|
||
"name": "param",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/domain.UpdateNotifyChannelReq"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/web.Resp"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"$ref": "#/definitions/domain.NotifyChannel"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未授权",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"delete": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAIAuth": []
|
||
}
|
||
],
|
||
"description": "删除用户推送渠道及其关联的订阅",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"通知推送"
|
||
],
|
||
"summary": "删除用户推送渠道",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "渠道ID",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未授权",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/users/notify/channels/{id}/test": {
|
||
"post": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAIAuth": []
|
||
}
|
||
],
|
||
"description": "发送测试消息验证渠道配置是否正确",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"通知推送"
|
||
],
|
||
"summary": "测试用户推送渠道",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "渠道ID",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未授权",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/users/notify/event-types": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAIAuth": []
|
||
}
|
||
],
|
||
"description": "列出所有支持订阅的事件类型",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"通知推送"
|
||
],
|
||
"summary": "列出事件类型",
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/web.Resp"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/consts.NotifyEventTypeInfo"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未授权",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/users/password-login": {
|
||
"post": {
|
||
"description": "密码登录",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【用户】企业团队成员认证"
|
||
],
|
||
"summary": "密码登录",
|
||
"parameters": [
|
||
{
|
||
"description": "登录请求",
|
||
"name": "req",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/domain.TeamLoginReq"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/domain.TeamUserInfo"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/users/passwords/accounts/{token}": {
|
||
"get": {
|
||
"description": "通过传入的 token 查询账户信息",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【用户】密码管理"
|
||
],
|
||
"summary": "通过 token 查询账户信息",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "用户 token",
|
||
"name": "token",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/web.Resp"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"$ref": "#/definitions/domain.TeamUserInfo"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "请求参数错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未授权,token 无效或已过期",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/users/passwords/change": {
|
||
"put": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAIAuth": []
|
||
}
|
||
],
|
||
"description": "修改当前用户的密码",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【用户】认证"
|
||
],
|
||
"summary": "修改密码",
|
||
"parameters": [
|
||
{
|
||
"description": "修改密码请求",
|
||
"name": "req",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/domain.ChangePasswordReq"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/users/passwords/reset": {
|
||
"put": {
|
||
"description": "重置当前用户的密码",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【用户】密码管理"
|
||
],
|
||
"summary": "重置密码",
|
||
"parameters": [
|
||
{
|
||
"description": "重置密码请求",
|
||
"name": "req",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/domain.ResetUserPasswordReq"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/users/passwords/reset-request": {
|
||
"put": {
|
||
"description": "重置指定用户的密码,并发送重置邮件",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【用户】密码管理"
|
||
],
|
||
"summary": "发送重置密码邮件",
|
||
"parameters": [
|
||
{
|
||
"description": "重置密码请求",
|
||
"name": "req",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/domain.ResetUserPasswordEmailReq"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未授权",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/users/projects": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAIAuth": []
|
||
}
|
||
],
|
||
"description": "项目列表",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【用户】项目管理"
|
||
],
|
||
"summary": "项目列表",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"name": "cursor",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "integer",
|
||
"name": "limit",
|
||
"in": "query"
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/web.Resp"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"$ref": "#/definitions/domain.ListProjectResp"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未授权",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"post": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAIAuth": []
|
||
}
|
||
],
|
||
"description": "创建项目",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【用户】项目管理"
|
||
],
|
||
"summary": "创建项目",
|
||
"parameters": [
|
||
{
|
||
"description": "请求参数",
|
||
"name": "req",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/domain.CreateProjectReq"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/web.Resp"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"$ref": "#/definitions/domain.Project"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未授权",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/users/projects/{id}": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAIAuth": []
|
||
}
|
||
],
|
||
"description": "项目详情",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【用户】项目管理"
|
||
],
|
||
"summary": "项目详情",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "项目ID",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/web.Resp"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"$ref": "#/definitions/domain.Project"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未授权",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"put": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAIAuth": []
|
||
}
|
||
],
|
||
"description": "更新项目",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【用户】项目管理"
|
||
],
|
||
"summary": "更新项目",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "项目ID",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
},
|
||
{
|
||
"description": "请求参数",
|
||
"name": "req",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/domain.UpdateProjectReq"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/web.Resp"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"$ref": "#/definitions/domain.Project"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未授权",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"delete": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAIAuth": []
|
||
}
|
||
],
|
||
"description": "删除项目",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【用户】项目管理"
|
||
],
|
||
"summary": "删除项目",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "项目ID",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未授权",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/users/projects/{id}/collaborators": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAIAuth": []
|
||
}
|
||
],
|
||
"description": "协作者列表",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【用户】项目管理"
|
||
],
|
||
"summary": "协作者列表",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "项目ID",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/web.Resp"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"$ref": "#/definitions/domain.ListCollaboratorsResp"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未授权",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/users/projects/{id}/issues": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAIAuth": []
|
||
}
|
||
],
|
||
"description": "问题列表",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【用户】项目管理"
|
||
],
|
||
"summary": "问题列表",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "项目ID",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "string",
|
||
"name": "cursor",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "integer",
|
||
"name": "limit",
|
||
"in": "query"
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/web.Resp"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"$ref": "#/definitions/domain.ListIssuesResp"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未授权",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"post": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAIAuth": []
|
||
}
|
||
],
|
||
"description": "创建问题",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【用户】项目管理"
|
||
],
|
||
"summary": "创建问题",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "项目ID",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
},
|
||
{
|
||
"description": "请求参数",
|
||
"name": "req",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/domain.CreateIssueReq"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/web.Resp"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"$ref": "#/definitions/domain.ProjectIssue"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未授权",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/users/projects/{id}/issues/{issue_id}": {
|
||
"put": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAIAuth": []
|
||
}
|
||
],
|
||
"description": "更新问题",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【用户】项目管理"
|
||
],
|
||
"summary": "更新问题",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "项目ID",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "问题ID",
|
||
"name": "issue_id",
|
||
"in": "path",
|
||
"required": true
|
||
},
|
||
{
|
||
"description": "请求参数",
|
||
"name": "req",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/domain.UpdateIssueReq"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/web.Resp"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"$ref": "#/definitions/domain.ProjectIssue"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未授权",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"delete": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAIAuth": []
|
||
}
|
||
],
|
||
"description": "删除问题",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【用户】项目管理"
|
||
],
|
||
"summary": "删除问题",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "项目ID",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "问题ID",
|
||
"name": "issue_id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未授权",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/users/projects/{id}/issues/{issue_id}/comments": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAIAuth": []
|
||
}
|
||
],
|
||
"description": "问题评论列表",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【用户】项目管理"
|
||
],
|
||
"summary": "问题评论列表",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "项目ID",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "问题ID",
|
||
"name": "issue_id",
|
||
"in": "path",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "string",
|
||
"name": "cursor",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "integer",
|
||
"name": "limit",
|
||
"in": "query"
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/web.Resp"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"$ref": "#/definitions/domain.ListIssueCommentsResp"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未授权",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"post": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAIAuth": []
|
||
}
|
||
],
|
||
"description": "创建问题评论",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【用户】项目管理"
|
||
],
|
||
"summary": "创建问题评论",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "项目ID",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "问题ID",
|
||
"name": "issue_id",
|
||
"in": "path",
|
||
"required": true
|
||
},
|
||
{
|
||
"description": "请求参数",
|
||
"name": "req",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/domain.CreateIssueCommentReq"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/web.Resp"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"$ref": "#/definitions/domain.ProjectIssueComment"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未授权",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/users/projects/{id}/tree": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAIAuth": []
|
||
}
|
||
],
|
||
"description": "获取项目仓库树",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【用户】项目管理"
|
||
],
|
||
"summary": "获取项目仓库树",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "项目ID",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "boolean",
|
||
"description": "是否递归",
|
||
"name": "recursive",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "分支",
|
||
"name": "ref",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "路径",
|
||
"name": "path",
|
||
"in": "query"
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/web.Resp"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/domain.ProjectTreeEntry"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未授权",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/users/projects/{id}/tree/archive": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAIAuth": []
|
||
}
|
||
],
|
||
"description": "获取项目仓库压缩包",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/zip"
|
||
],
|
||
"tags": [
|
||
"【用户】项目管理"
|
||
],
|
||
"summary": "获取项目仓库压缩包",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "项目ID",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "分支",
|
||
"name": "ref",
|
||
"in": "query"
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"type": "file"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未授权",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/users/projects/{id}/tree/blob": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAIAuth": []
|
||
}
|
||
],
|
||
"description": "获取项目文件内容",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【用户】项目管理"
|
||
],
|
||
"summary": "获取项目文件内容",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "项目ID",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "文件路径",
|
||
"name": "path",
|
||
"in": "query",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "分支",
|
||
"name": "ref",
|
||
"in": "query"
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/web.Resp"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"$ref": "#/definitions/domain.ProjectBlob"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未授权",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/users/projects/{id}/tree/logs": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAIAuth": []
|
||
}
|
||
],
|
||
"description": "获取项目仓库日志",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【用户】项目管理"
|
||
],
|
||
"summary": "获取项目仓库日志",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "项目ID",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "分支",
|
||
"name": "ref",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "路径",
|
||
"name": "path",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "integer",
|
||
"description": "限制数量",
|
||
"name": "limit",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "integer",
|
||
"description": "偏移量",
|
||
"name": "offset",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "起始 SHA",
|
||
"name": "since_sha",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "结束 SHA",
|
||
"name": "until_sha",
|
||
"in": "query"
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/web.Resp"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"$ref": "#/definitions/domain.ProjectLogs"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未授权",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/users/status": {
|
||
"get": {
|
||
"description": "检查当前用户是否已登录,返回认证状态和用户信息",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【用户】认证"
|
||
],
|
||
"summary": "检查用户登录状态",
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/web.Resp"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"$ref": "#/definitions/domain.TeamUserInfo"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/users/subscription": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAIAuth": []
|
||
}
|
||
],
|
||
"description": "开源版固定返回基础订阅状态",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【用户】会员"
|
||
],
|
||
"summary": "查询当前会员状态",
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/web.Resp"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"$ref": "#/definitions/domain.SubscriptionResp"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未授权,用户未登录",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/users/tasks": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAIAuth": []
|
||
}
|
||
],
|
||
"description": "获取属于该用户的所有任务,仅支持普通分页",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【用户】任务管理"
|
||
],
|
||
"summary": "任务列表",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "下一页标识",
|
||
"name": "next_token",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "integer",
|
||
"description": "分页",
|
||
"name": "page",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "string",
|
||
"name": "project_id",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "boolean",
|
||
"name": "quick_start",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "integer",
|
||
"description": "每页多少条记录",
|
||
"name": "size",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "状态筛选,多值用逗号分开 pending,processing,error,finished",
|
||
"name": "status",
|
||
"in": "query"
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/web.Resp"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"$ref": "#/definitions/domain.ListTaskResp"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"post": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAIAuth": []
|
||
}
|
||
],
|
||
"description": "创建任务\n`attachments` 为可选附件列表,最多 10 个;每项包含 `url` 和 `filename`,URL 需要匹配后端配置的附件白名单前缀。创建任务后,首轮 user-input 日志会按 `{ \"content\": \"base64文本\", \"attachments\": [] }` 结构返回。",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【用户】任务管理"
|
||
],
|
||
"summary": "创建任务",
|
||
"parameters": [
|
||
{
|
||
"description": "请求参数",
|
||
"name": "param",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/domain.CreateTaskReq"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/web.Resp"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"$ref": "#/definitions/domain.ProjectTask"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/users/tasks/control": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAIAuth": []
|
||
}
|
||
],
|
||
"description": "数据格式约定:当前仅支持文本帧透传。服务端将 Agent 的原始文本数据包装为如下结构返回给前端(对应 domain.TaskStream):\n```json\n{ \"type\": \"string\", \"data\": \"string\", \"kind\": \"string\", \"timestamp\": 0 }\n```\n独立于 stream 的长生命周期 WebSocket 连接,用于处理 call/call-response(文件浏览、diff 查看等同步请求)。\ntask 结束后连接不断开,仍可用于文件操作。\n支持同一 taskID 多 tab 并发连接。\n\n## 上行消息\n\n### Type=call, Kind=repo_file_diff — 获取文件 diff\n请求 Data:\n```json\n{\"request_id\":\"string\",\"path\":\"string\",\"unified\":true,\"context_lines\":3}\n```\n响应 Data:\n```json\n{\"request_id\":\"string\",\"path\":\"string\",\"diff\":\"string\",\"success\":true,\"error\":\"string?\"}\n```\n\n### Type=call, Kind=repo_file_list — 列出目录文件\n请求 Data:\n```json\n{\"request_id\":\"string\",\"path\":\"string\",\"glob_pattern\":\"string?\",\"include_hidden\":false}\n```\n响应 Data:\n```json\n{\"request_id\":\"string\",\"path\":\"string\",\"files\":[{\"name\":\"string\",\"path\":\"string\",\"entry_mode\":0,\"size\":0,\"modified_at\":0}],\"success\":true,\"error\":\"string?\"}\n```\n\n### Type=call, Kind=repo_read_file — 读取文件内容\n请求 Data:\n```json\n{\"request_id\":\"string\",\"path\":\"string\",\"offset\":0,\"length\":0}\n```\n响应 Data:\n```json\n{\"request_id\":\"string\",\"path\":\"string\",\"content\":\"bytes\",\"total_size\":0,\"offset\":0,\"length\":0,\"is_truncated\":false,\"success\":true,\"error\":\"string?\"}\n```\n\n### Type=call, Kind=repo_file_changes — 查询变更文件列表\n请求 Data:\n```json\n{\"request_id\":\"string\"}\n```\n响应 Data:\n```json\n{\"request_id\":\"string\",\"changes\":[{\"path\":\"string\",\"status\":\"string\",\"additions\":0,\"deletions\":0,\"old_path\":\"string?\"}],\"branch\":\"string?\",\"commit_hash\":\"string?\",\"success\":true,\"error\":\"string?\"}\n```\n\n### Type=call, Kind=port_forward_list — 获取端口转发列表\n请求 Data:\n```json\n{\"request_id\":\"string\"}\n```\n响应 Data:\n```json\n{\"request_id\":\"string\",\"ports\":[{\"port\":0,\"status\":\"string\",\"process\":\"string\",\"forward_id\":\"string?\",\"access_url\":\"string?\",\"label\":\"string?\",\"error_message\":\"string?\",\"whitelist_ips\":[\"string\"]}]}\n```\n\n### Type=call, Kind=restart — 重启任务\n请求 Data:\n```json\n{\"request_id\":\"string\",\"load_session\":true}\n```\n响应 Data:\n```json\n{\"id\":\"uuid\",\"request_id\":\"string?\",\"success\":true,\"message\":\"string\",\"session_id\":\"string\"}\n```\n\n### Type=call, Kind=switch_model — 切换运行中任务模型\n请求 Data:\n```json\n{\"request_id\":\"string\",\"model_id\":\"uuid\",\"load_session\":true}\n```\n响应 Data:\n```json\n{\"id\":\"uuid\",\"request_id\":\"string?\",\"success\":true,\"message\":\"string\",\"session_id\":\"string\",\"model\":{}}\n```\n\n### Type=sync-my-ip — 同步 Web 客户端真实 IP\n请求 Data:\n```json\n{\"client_ip\":\"string\"}\n```\n\n## 下行消息\n\n- Type=call-response: 同步请求响应(Kind 与请求一致)。失败时 Data 为:\n```json\n{\"request_id\":\"string\",\"success\":false,\"error\":\"string\"}\n```\n- Type=task-event: 任务事件(从 TaskLive 订阅转发)\n- Type=ping: 心跳(无 Data)",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【用户】任务管理"
|
||
],
|
||
"summary": "任务控制流 WebSocket",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "任务 ID",
|
||
"name": "id",
|
||
"in": "query",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/users/tasks/public-stream": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAIAuth": []
|
||
}
|
||
],
|
||
"description": "数据格式约定参考任务数据流 WebSocket 接口",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【用户】任务管理"
|
||
],
|
||
"summary": "公开的任务数据流 WebSocket",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "任务 ID",
|
||
"name": "id",
|
||
"in": "query",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/users/tasks/rounds": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAIAuth": []
|
||
}
|
||
],
|
||
"description": "根据 cursor 向前翻页查询任务的历史轮次。limit 为轮次数(非条目数),\nlimit=2 表示返回 2 轮的完整消息。返回的 chunks 按时间倒序排列(最新在前)。\n返回的 user-input.data 统一为 JSON payload 字符串,例如 `{\"content\":\"57un57ut5aSE55CG\",\"attachments\":[]}`;content 为用户输入文本的 base64 编码,旧历史裸文本也会按该结构包装返回。",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【用户】任务管理"
|
||
],
|
||
"summary": "查询任务历史轮次",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "任务 ID",
|
||
"name": "id",
|
||
"in": "query",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "分页游标",
|
||
"name": "cursor",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "integer",
|
||
"description": "轮次数(默认 2,上限 10)",
|
||
"name": "limit",
|
||
"in": "query"
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/web.Resp"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"$ref": "#/definitions/domain.TaskRoundsResp"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/users/tasks/speech-to-text": {
|
||
"post": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAIAuth": []
|
||
}
|
||
],
|
||
"description": "上传音频数据进行语音识别,返回Server-Sent Events流式文字结果。响应格式为SSE,每个事件包含event和data字段。",
|
||
"consumes": [
|
||
"application/octet-stream"
|
||
],
|
||
"produces": [
|
||
"text/event-stream"
|
||
],
|
||
"tags": [
|
||
"【用户】任务管理"
|
||
],
|
||
"summary": "语音转文字",
|
||
"responses": {
|
||
"200": {
|
||
"description": "Server-Sent Events流,包含recognition(识别结果)、end(结束)和error(错误)事件",
|
||
"schema": {
|
||
"$ref": "#/definitions/domain.SpeechRecognitionEvent"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "参数错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/users/tasks/stop": {
|
||
"put": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAIAuth": []
|
||
}
|
||
],
|
||
"description": "停止任务",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【用户】任务管理"
|
||
],
|
||
"summary": "停止任务",
|
||
"parameters": [
|
||
{
|
||
"description": "任务 id",
|
||
"name": "id",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/domain.IDReq-github_com_google_uuid_UUID"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功回包",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/users/tasks/stream": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAIAuth": []
|
||
}
|
||
],
|
||
"description": "功能定位:该接口通过 WebSocket 转发任务运行数据。任务对话继续输入使用 `type=user-input`。\n数据格式约定:当前仅支持文本帧透传。服务端将 Agent 的原始文本数据包装为如下结构返回给前端(对应 domain.TaskStream):\n```json\n{ \"type\": \"string\", \"data\": \"string\", \"kind\": \"string\", \"timestamp\": 0 }\n```\nuser-input 上行新格式:\n```json\n{ \"type\": \"user-input\", \"data\": \"{\\\"content\\\":\\\"57un57ut5aSE55CG6L+Z5Liq6Zeu6aKY\\\",\\\"attachments\\\":[{\\\"url\\\":\\\"https://example-bucket.oss-cn-hangzhou.aliyuncs.com/temp/a.txt\\\",\\\"filename\\\":\\\"a.txt\\\"}]}\" }\n```\nuser-input 上行旧格式仍兼容:\n```json\n{ \"type\": \"user-input\", \"data\": \"继续处理这个问题\" }\n```\nuser-input 下行和历史返回统一使用新 JSON payload 字符串:\n```json\n{ \"type\": \"user-input\", \"data\": \"{\\\"content\\\":\\\"57un57ut5aSE55CG6L+Z5Liq6Zeu6aKY\\\",\\\"attachments\\\":[]}\", \"timestamp\": 0 }\n```\n`attachments` 为可选附件列表,最多 10 个;每项包含 `url` 和 `filename`,URL 需要匹配后端配置的附件白名单前缀。\ntype 字段说明:\n- task-started: 本轮任务启动\n- task-ended: 本轮任务结束\n- task-error: 本轮任务发生错误\n- task-running: 任务正在运行\n- task-event: 任务临时事件, 不持久化\n- file-change: 文件变动事件\n- permission-resp: 用户的权限响应\n- auto-approve: 开启自动批准\n- disable-auto-approve: 关闭自动批准\n- user-input: 用户输入\n- user-cancel: 取消当前操作,不会终止任务\n- reply-question: 回复 AI 的提问\n- cursor: 历史游标,用于通过 /rounds 接口加载更早的轮次\n\ncursor 消息结构:\n```json\n{ \"type\": \"cursor\", \"data\": { \"cursor\": \"\u003cnextCursor\u003e\", \"has_more\": true }, \"timestamp\": 0 }\n```\n- cursor: 当前分页游标,作为 GET /rounds 接口的 cursor 参数向前翻页\n- has_more: 是否存在更早的轮次。为 false 时表示当前轮次即为第一轮,无需再翻页",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【用户】任务管理"
|
||
],
|
||
"summary": "任务数据流 WebSocket",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "任务 ID",
|
||
"name": "id",
|
||
"in": "query",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "模式:new(等待用户输入)|attach(仅拉取当前轮次),默认 new",
|
||
"name": "mode",
|
||
"in": "query"
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/users/tasks/{id}": {
|
||
"get": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAIAuth": []
|
||
}
|
||
],
|
||
"description": "任务详情",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【用户】任务管理"
|
||
],
|
||
"summary": "任务详情",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "任务 ID",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/web.Resp"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"$ref": "#/definitions/domain.Task"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"put": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAIAuth": []
|
||
}
|
||
],
|
||
"description": "更新任务信息(如标题)",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【用户】任务管理"
|
||
],
|
||
"summary": "更新任务",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "任务 ID",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
},
|
||
{
|
||
"description": "请求参数",
|
||
"name": "param",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/domain.UpdateTaskReq"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"delete": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAIAuth": []
|
||
}
|
||
],
|
||
"description": "删除任务。任务处于运行中(pending/processing)或虚拟机仍在线时不允许删除。",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【用户】任务管理"
|
||
],
|
||
"summary": "删除任务",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "任务 ID",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/users/wechat-mp/bind": {
|
||
"delete": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAIAuth": []
|
||
}
|
||
],
|
||
"description": "解除当前用户与微信公众号 OpenID 的绑定关系",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【用户】微信公众号推送"
|
||
],
|
||
"summary": "解除公众号绑定",
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未授权,用户未登录",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/v1/users/wechat-mp/bind-qrcode": {
|
||
"post": {
|
||
"security": [
|
||
{
|
||
"MonkeyCodeAIAuth": []
|
||
}
|
||
],
|
||
"description": "为当前登录用户创建微信公众号绑定临时二维码,用户扫码关注/扫码后完成绑定",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"【用户】微信公众号推送"
|
||
],
|
||
"summary": "创建公众号绑定二维码",
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"schema": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/web.Resp"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"$ref": "#/definitions/domain.BindQRCodeResp"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "未授权,用户未登录",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "服务器内部错误",
|
||
"schema": {
|
||
"$ref": "#/definitions/web.Resp"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"definitions": {
|
||
"consts.CliName": {
|
||
"type": "string",
|
||
"enum": [
|
||
"codex",
|
||
"claude",
|
||
"opencode"
|
||
],
|
||
"x-enum-varnames": [
|
||
"CliNameCodex",
|
||
"CliNameClaude",
|
||
"CliNameOpencode"
|
||
]
|
||
},
|
||
"consts.GitPlatform": {
|
||
"type": "string",
|
||
"enum": [
|
||
"github",
|
||
"gitlab",
|
||
"gitea",
|
||
"gitee"
|
||
],
|
||
"x-enum-varnames": [
|
||
"GitPlatformGithub",
|
||
"GitPlatformGitLab",
|
||
"GitPlatformGitea",
|
||
"GitPlatformGitee"
|
||
]
|
||
},
|
||
"consts.HostStatus": {
|
||
"type": "string",
|
||
"enum": [
|
||
"online",
|
||
"offline"
|
||
],
|
||
"x-enum-varnames": [
|
||
"HostStatusOnline",
|
||
"HostStatusOffline"
|
||
]
|
||
},
|
||
"consts.InterfaceType": {
|
||
"type": "string",
|
||
"enum": [
|
||
"openai_chat",
|
||
"openai_responses",
|
||
"anthropic"
|
||
],
|
||
"x-enum-varnames": [
|
||
"InterfaceTypeOpenAIChat",
|
||
"InterfaceTypeOpenAIResponse",
|
||
"InterfaceTypeAnthropic"
|
||
]
|
||
},
|
||
"consts.LogStore": {
|
||
"type": "string",
|
||
"enum": [
|
||
"loki",
|
||
"clickhouse"
|
||
],
|
||
"x-enum-varnames": [
|
||
"LogStoreLoki",
|
||
"LogStoreClickHouse"
|
||
]
|
||
},
|
||
"consts.ModelProvider": {
|
||
"type": "string",
|
||
"enum": [
|
||
"SiliconFlow",
|
||
"OpenAI",
|
||
"Ollama",
|
||
"DeepSeek",
|
||
"Moonshot",
|
||
"AzureOpenAI",
|
||
"BaiZhiCloud",
|
||
"Hunyuan",
|
||
"BaiLian",
|
||
"Volcengine",
|
||
"Gemini"
|
||
],
|
||
"x-enum-varnames": [
|
||
"ModelProviderSiliconFlow",
|
||
"ModelProviderOpenAI",
|
||
"ModelProviderOllama",
|
||
"ModelProviderDeepSeek",
|
||
"ModelProviderMoonshot",
|
||
"ModelProviderAzureOpenAI",
|
||
"ModelProviderBaiZhiCloud",
|
||
"ModelProviderHunyuan",
|
||
"ModelProviderBaiLian",
|
||
"ModelProviderVolcengine",
|
||
"ModelProviderGoogle"
|
||
]
|
||
},
|
||
"consts.NotifyChannelKind": {
|
||
"type": "string",
|
||
"enum": [
|
||
"dingtalk",
|
||
"feishu",
|
||
"wecom",
|
||
"webhook",
|
||
"wechat_mp"
|
||
],
|
||
"x-enum-varnames": [
|
||
"NotifyChannelDingTalk",
|
||
"NotifyChannelFeishu",
|
||
"NotifyChannelWeCom",
|
||
"NotifyChannelWebhook",
|
||
"NotifyChannelWechatMP"
|
||
]
|
||
},
|
||
"consts.NotifyEventType": {
|
||
"type": "string",
|
||
"enum": [
|
||
"task.created",
|
||
"task.ended",
|
||
"vm.expiring_soon",
|
||
"quota.refreshed",
|
||
"quota.basic_exhausted",
|
||
"quota.pro_exhausted",
|
||
"quota.ultra_exhausted"
|
||
],
|
||
"x-enum-varnames": [
|
||
"NotifyEventTaskCreated",
|
||
"NotifyEventTaskEnded",
|
||
"NotifyEventVMExpiringSoon",
|
||
"NotifyEventQuotaRefreshed",
|
||
"NotifyEventQuotaBasicExhausted",
|
||
"NotifyEventQuotaProExhausted",
|
||
"NotifyEventQuotaUltraExhausted"
|
||
]
|
||
},
|
||
"consts.NotifyEventTypeInfo": {
|
||
"type": "object",
|
||
"properties": {
|
||
"description": {
|
||
"type": "string"
|
||
},
|
||
"name": {
|
||
"type": "string"
|
||
},
|
||
"type": {
|
||
"$ref": "#/definitions/consts.NotifyEventType"
|
||
}
|
||
}
|
||
},
|
||
"consts.NotifyOwnerType": {
|
||
"type": "string",
|
||
"enum": [
|
||
"user",
|
||
"team"
|
||
],
|
||
"x-enum-varnames": [
|
||
"NotifyOwnerUser",
|
||
"NotifyOwnerTeam"
|
||
]
|
||
},
|
||
"consts.OwnerType": {
|
||
"type": "string",
|
||
"enum": [
|
||
"private",
|
||
"public",
|
||
"team"
|
||
],
|
||
"x-enum-varnames": [
|
||
"OwnerTypePrivate",
|
||
"OwnerTypePublic",
|
||
"OwnerTypeTeam"
|
||
]
|
||
},
|
||
"consts.PortStatus": {
|
||
"type": "string",
|
||
"enum": [
|
||
"reserved",
|
||
"connected"
|
||
],
|
||
"x-enum-varnames": [
|
||
"PortStatusReversed",
|
||
"PortStatusConnected"
|
||
]
|
||
},
|
||
"consts.ProjectCollaboratorRole": {
|
||
"type": "string",
|
||
"enum": [
|
||
"read_only",
|
||
"read_write"
|
||
],
|
||
"x-enum-varnames": [
|
||
"ProjectCollaboratorRoleReadOnly",
|
||
"ProjectCollaboratorRoleReadWrite"
|
||
]
|
||
},
|
||
"consts.ProjectIssuePriority": {
|
||
"type": "integer",
|
||
"enum": [
|
||
1,
|
||
2,
|
||
3
|
||
],
|
||
"x-enum-varnames": [
|
||
"ProjectIssuePriorityOne",
|
||
"ProjectIssuePriorityTwo",
|
||
"ProjectIssuePriorityThree"
|
||
]
|
||
},
|
||
"consts.ProjectIssueStatus": {
|
||
"type": "string",
|
||
"enum": [
|
||
"open",
|
||
"closed",
|
||
"completed"
|
||
],
|
||
"x-enum-varnames": [
|
||
"ProjectIssueStatusOpen",
|
||
"ProjectIssueStatusClosed",
|
||
"ProjectIssueStatusCompleted"
|
||
]
|
||
},
|
||
"consts.TaskStatus": {
|
||
"type": "string",
|
||
"enum": [
|
||
"pending",
|
||
"processing",
|
||
"error",
|
||
"finished"
|
||
],
|
||
"x-enum-varnames": [
|
||
"TaskStatusPending",
|
||
"TaskStatusProcessing",
|
||
"TaskStatusError",
|
||
"TaskStatusFinished"
|
||
]
|
||
},
|
||
"consts.TaskSubType": {
|
||
"type": "string",
|
||
"enum": [
|
||
"generate_docs",
|
||
"generate_requirement",
|
||
"generate_design",
|
||
"generate_tasklist",
|
||
"execute_task",
|
||
"pr_review"
|
||
],
|
||
"x-enum-varnames": [
|
||
"TaskSubTypeGenerateDocs",
|
||
"TaskSubTypeGenerateRequirement",
|
||
"TaskSubTypeGenerateDesign",
|
||
"TaskSubTypeGenerateTasklist",
|
||
"TaskSubTypeExecuteTask",
|
||
"TaskSubTypePrReview"
|
||
]
|
||
},
|
||
"consts.TaskType": {
|
||
"type": "string",
|
||
"enum": [
|
||
"develop",
|
||
"design",
|
||
"review"
|
||
],
|
||
"x-enum-varnames": [
|
||
"TaskTypeDevelop",
|
||
"TaskTypeDesign",
|
||
"TaskTypeReview"
|
||
]
|
||
},
|
||
"consts.TeamMemberRole": {
|
||
"type": "string",
|
||
"enum": [
|
||
"admin",
|
||
"user"
|
||
],
|
||
"x-enum-varnames": [
|
||
"TeamMemberRoleAdmin",
|
||
"TeamMemberRoleUser"
|
||
]
|
||
},
|
||
"consts.TerminalMode": {
|
||
"type": "string",
|
||
"enum": [
|
||
"read_only",
|
||
"read_write"
|
||
],
|
||
"x-enum-varnames": [
|
||
"TerminalModeReadOnly",
|
||
"TerminalModeReadWrite"
|
||
]
|
||
},
|
||
"consts.UserPlatform": {
|
||
"type": "string",
|
||
"enum": [
|
||
"baizhi",
|
||
"github",
|
||
"gitlab",
|
||
"gitea",
|
||
"gitee"
|
||
],
|
||
"x-enum-comments": {
|
||
"UserPlatformBaizhi": "百智云平台"
|
||
},
|
||
"x-enum-descriptions": [
|
||
"百智云平台",
|
||
"",
|
||
"",
|
||
"",
|
||
""
|
||
],
|
||
"x-enum-varnames": [
|
||
"UserPlatformBaizhi",
|
||
"UserPlatformGithub",
|
||
"UserPlatformGitLab",
|
||
"UserPlatformGitea",
|
||
"UserPlatformGitee"
|
||
]
|
||
},
|
||
"consts.UserRole": {
|
||
"type": "string",
|
||
"enum": [
|
||
"individual",
|
||
"enterprise",
|
||
"subaccount",
|
||
"admin",
|
||
"gittask"
|
||
],
|
||
"x-enum-comments": {
|
||
"UserRoleAdmin": "MonkeyCode-AI 管理员账号,用来配置公共资源. 如公共宿主机等",
|
||
"UserRoleEnterprise": "企业用户",
|
||
"UserRoleGitTask": "全自动 git 任务插入的用户",
|
||
"UserRoleIndividual": "个人用户",
|
||
"UserRoleSubAccount": "企业子账户"
|
||
},
|
||
"x-enum-descriptions": [
|
||
"个人用户",
|
||
"企业用户",
|
||
"企业子账户",
|
||
"MonkeyCode-AI 管理员账号,用来配置公共资源. 如公共宿主机等",
|
||
"全自动 git 任务插入的用户"
|
||
],
|
||
"x-enum-varnames": [
|
||
"UserRoleIndividual",
|
||
"UserRoleEnterprise",
|
||
"UserRoleSubAccount",
|
||
"UserRoleAdmin",
|
||
"UserRoleGitTask"
|
||
]
|
||
},
|
||
"consts.UserStatus": {
|
||
"type": "string",
|
||
"enum": [
|
||
"active",
|
||
"inactive",
|
||
"banded"
|
||
],
|
||
"x-enum-varnames": [
|
||
"UserStatusActive",
|
||
"UserStatusInactive",
|
||
"UserStatusBanded"
|
||
]
|
||
},
|
||
"db.Cursor": {
|
||
"type": "object",
|
||
"properties": {
|
||
"cursor": {
|
||
"description": "游标",
|
||
"type": "string"
|
||
},
|
||
"has_next_page": {
|
||
"description": "是否有下一页",
|
||
"type": "boolean"
|
||
}
|
||
}
|
||
},
|
||
"db.PageInfo": {
|
||
"type": "object",
|
||
"properties": {
|
||
"has_next_page": {
|
||
"type": "boolean"
|
||
},
|
||
"next_token": {
|
||
"type": "string"
|
||
},
|
||
"total_count": {
|
||
"type": "integer"
|
||
}
|
||
}
|
||
},
|
||
"domain.AddGitIdentityReq": {
|
||
"type": "object",
|
||
"required": [
|
||
"access_token",
|
||
"base_url",
|
||
"email",
|
||
"platform",
|
||
"username"
|
||
],
|
||
"properties": {
|
||
"access_token": {
|
||
"type": "string"
|
||
},
|
||
"base_url": {
|
||
"type": "string"
|
||
},
|
||
"email": {
|
||
"type": "string"
|
||
},
|
||
"platform": {
|
||
"$ref": "#/definitions/consts.GitPlatform"
|
||
},
|
||
"remark": {
|
||
"type": "string"
|
||
},
|
||
"username": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"domain.AddTeamAdminReq": {
|
||
"type": "object",
|
||
"required": [
|
||
"email",
|
||
"name"
|
||
],
|
||
"properties": {
|
||
"email": {
|
||
"description": "邮箱",
|
||
"type": "string"
|
||
},
|
||
"name": {
|
||
"description": "姓名",
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"domain.AddTeamAdminResp": {
|
||
"type": "object",
|
||
"properties": {
|
||
"user": {
|
||
"$ref": "#/definitions/domain.TeamUser"
|
||
}
|
||
}
|
||
},
|
||
"domain.AddTeamGroupReq": {
|
||
"type": "object",
|
||
"required": [
|
||
"name"
|
||
],
|
||
"properties": {
|
||
"name": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"domain.AddTeamGroupUsersReq": {
|
||
"type": "object",
|
||
"required": [
|
||
"user_ids"
|
||
],
|
||
"properties": {
|
||
"user_ids": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"domain.AddTeamGroupUsersResp": {
|
||
"type": "object",
|
||
"properties": {
|
||
"users": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/domain.User"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"domain.AddTeamImageReq": {
|
||
"type": "object",
|
||
"required": [
|
||
"group_ids",
|
||
"name"
|
||
],
|
||
"properties": {
|
||
"group_ids": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"name": {
|
||
"type": "string"
|
||
},
|
||
"remark": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"domain.AddTeamModelReq": {
|
||
"type": "object",
|
||
"required": [
|
||
"api_key",
|
||
"base_url",
|
||
"group_ids",
|
||
"interface_type",
|
||
"model",
|
||
"provider"
|
||
],
|
||
"properties": {
|
||
"api_key": {
|
||
"type": "string"
|
||
},
|
||
"base_url": {
|
||
"type": "string"
|
||
},
|
||
"group_ids": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"interface_type": {
|
||
"enum": [
|
||
"openai_chat",
|
||
"openai_responses",
|
||
"anthropic"
|
||
],
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/consts.InterfaceType"
|
||
}
|
||
]
|
||
},
|
||
"model": {
|
||
"type": "string"
|
||
},
|
||
"provider": {
|
||
"type": "string"
|
||
},
|
||
"remark": {
|
||
"type": "string"
|
||
},
|
||
"support_image": {
|
||
"type": "boolean"
|
||
},
|
||
"temperature": {
|
||
"type": "number"
|
||
}
|
||
}
|
||
},
|
||
"domain.AddTeamUserReq": {
|
||
"type": "object",
|
||
"required": [
|
||
"emails"
|
||
],
|
||
"properties": {
|
||
"emails": {
|
||
"description": "邮箱列表",
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"group_id": {
|
||
"description": "团队组ID",
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"domain.AddTeamUserResp": {
|
||
"type": "object",
|
||
"properties": {
|
||
"users": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/domain.TeamUser"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"domain.AddTeamUserWithPasswordResp": {
|
||
"type": "object",
|
||
"properties": {
|
||
"passwords": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/domain.TeamUserPassword"
|
||
}
|
||
},
|
||
"users": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/domain.TeamUser"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"domain.ApplyPortReq": {
|
||
"type": "object",
|
||
"required": [
|
||
"port",
|
||
"white_list"
|
||
],
|
||
"properties": {
|
||
"forward_id": {
|
||
"type": "string"
|
||
},
|
||
"port": {
|
||
"type": "integer",
|
||
"maximum": 65535,
|
||
"minimum": 1
|
||
},
|
||
"white_list": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"domain.Audit": {
|
||
"type": "object",
|
||
"properties": {
|
||
"created_at": {
|
||
"type": "string"
|
||
},
|
||
"id": {
|
||
"type": "string"
|
||
},
|
||
"operation": {
|
||
"type": "string"
|
||
},
|
||
"request": {
|
||
"type": "string"
|
||
},
|
||
"response": {
|
||
"type": "string"
|
||
},
|
||
"source_ip": {
|
||
"type": "string"
|
||
},
|
||
"user": {
|
||
"$ref": "#/definitions/domain.User"
|
||
},
|
||
"user_agent": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"domain.AuthRepository": {
|
||
"type": "object",
|
||
"properties": {
|
||
"description": {
|
||
"type": "string"
|
||
},
|
||
"full_name": {
|
||
"type": "string"
|
||
},
|
||
"url": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"domain.BindQRCodeResp": {
|
||
"type": "object",
|
||
"properties": {
|
||
"expire_seconds": {
|
||
"type": "integer"
|
||
},
|
||
"qrcode_url": {
|
||
"type": "string"
|
||
},
|
||
"ticket": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"domain.Branch": {
|
||
"type": "object",
|
||
"properties": {
|
||
"name": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"domain.ChangePasswordReq": {
|
||
"type": "object",
|
||
"required": [
|
||
"new_password"
|
||
],
|
||
"properties": {
|
||
"current_password": {
|
||
"description": "当前密码",
|
||
"type": "string"
|
||
},
|
||
"new_password": {
|
||
"description": "新密码",
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"domain.CheckByConfigReq": {
|
||
"type": "object",
|
||
"required": [
|
||
"api_key",
|
||
"base_url",
|
||
"model",
|
||
"provider"
|
||
],
|
||
"properties": {
|
||
"api_key": {
|
||
"type": "string"
|
||
},
|
||
"base_url": {
|
||
"type": "string"
|
||
},
|
||
"interface_type": {
|
||
"enum": [
|
||
"openai_chat",
|
||
"openai_responses",
|
||
"anthropic"
|
||
],
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/consts.InterfaceType"
|
||
}
|
||
]
|
||
},
|
||
"model": {
|
||
"type": "string"
|
||
},
|
||
"provider": {
|
||
"$ref": "#/definitions/consts.ModelProvider"
|
||
}
|
||
}
|
||
},
|
||
"domain.CheckModelResp": {
|
||
"type": "object",
|
||
"properties": {
|
||
"error": {
|
||
"type": "string"
|
||
},
|
||
"success": {
|
||
"type": "boolean"
|
||
}
|
||
}
|
||
},
|
||
"domain.Collaborator": {
|
||
"type": "object",
|
||
"properties": {
|
||
"avatar_url": {
|
||
"type": "string"
|
||
},
|
||
"email": {
|
||
"type": "string"
|
||
},
|
||
"has_password": {
|
||
"type": "boolean"
|
||
},
|
||
"id": {
|
||
"type": "string"
|
||
},
|
||
"identities": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/domain.UserIdentity"
|
||
}
|
||
},
|
||
"is_blocked": {
|
||
"type": "boolean"
|
||
},
|
||
"name": {
|
||
"type": "string"
|
||
},
|
||
"permission": {
|
||
"$ref": "#/definitions/consts.ProjectCollaboratorRole"
|
||
},
|
||
"role": {
|
||
"$ref": "#/definitions/consts.UserRole"
|
||
},
|
||
"status": {
|
||
"$ref": "#/definitions/consts.UserStatus"
|
||
},
|
||
"team": {
|
||
"$ref": "#/definitions/domain.Team"
|
||
},
|
||
"token": {
|
||
"type": "string"
|
||
},
|
||
"wechat_mp_bound": {
|
||
"type": "boolean"
|
||
}
|
||
}
|
||
},
|
||
"domain.CreateCollaboratorItem": {
|
||
"type": "object",
|
||
"properties": {
|
||
"permission": {
|
||
"$ref": "#/definitions/consts.ProjectCollaboratorRole"
|
||
},
|
||
"user_id": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"domain.CreateGitBotReq": {
|
||
"type": "object",
|
||
"required": [
|
||
"host_id",
|
||
"platform",
|
||
"token"
|
||
],
|
||
"properties": {
|
||
"host_id": {
|
||
"type": "string"
|
||
},
|
||
"name": {
|
||
"type": "string"
|
||
},
|
||
"platform": {
|
||
"$ref": "#/definitions/consts.GitPlatform"
|
||
},
|
||
"token": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"domain.CreateImageReq": {
|
||
"type": "object",
|
||
"required": [
|
||
"image_name"
|
||
],
|
||
"properties": {
|
||
"image_name": {
|
||
"type": "string"
|
||
},
|
||
"is_default": {
|
||
"type": "boolean"
|
||
},
|
||
"remark": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"domain.CreateIssueCommentReq": {
|
||
"type": "object",
|
||
"required": [
|
||
"comment"
|
||
],
|
||
"properties": {
|
||
"comment": {
|
||
"type": "string"
|
||
},
|
||
"parent_id": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"domain.CreateIssueReq": {
|
||
"type": "object",
|
||
"properties": {
|
||
"assignee_id": {
|
||
"type": "string"
|
||
},
|
||
"priority": {
|
||
"$ref": "#/definitions/consts.ProjectIssuePriority"
|
||
},
|
||
"requirement_document": {
|
||
"type": "string"
|
||
},
|
||
"title": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"domain.CreateModelReq": {
|
||
"type": "object",
|
||
"required": [
|
||
"api_key",
|
||
"base_url",
|
||
"interface_type",
|
||
"model",
|
||
"provider"
|
||
],
|
||
"properties": {
|
||
"api_key": {
|
||
"type": "string"
|
||
},
|
||
"base_url": {
|
||
"type": "string"
|
||
},
|
||
"context_limit": {
|
||
"type": "integer"
|
||
},
|
||
"interface_type": {
|
||
"enum": [
|
||
"openai_chat",
|
||
"openai_responses",
|
||
"anthropic"
|
||
],
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/consts.InterfaceType"
|
||
}
|
||
]
|
||
},
|
||
"is_default": {
|
||
"type": "boolean"
|
||
},
|
||
"is_hidden": {
|
||
"type": "boolean"
|
||
},
|
||
"model": {
|
||
"type": "string"
|
||
},
|
||
"output_limit": {
|
||
"type": "integer"
|
||
},
|
||
"provider": {
|
||
"type": "string"
|
||
},
|
||
"remark": {
|
||
"type": "string"
|
||
},
|
||
"support_image": {
|
||
"type": "boolean"
|
||
},
|
||
"temperature": {
|
||
"type": "number"
|
||
},
|
||
"thinking_enabled": {
|
||
"type": "boolean"
|
||
}
|
||
}
|
||
},
|
||
"domain.CreateNotifyChannelReq": {
|
||
"type": "object",
|
||
"required": [
|
||
"event_types",
|
||
"kind",
|
||
"name",
|
||
"webhook_url"
|
||
],
|
||
"properties": {
|
||
"event_types": {
|
||
"type": "array",
|
||
"minItems": 1,
|
||
"items": {
|
||
"$ref": "#/definitions/consts.NotifyEventType"
|
||
}
|
||
},
|
||
"headers": {
|
||
"type": "object",
|
||
"additionalProperties": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"kind": {
|
||
"enum": [
|
||
"dingtalk",
|
||
"feishu",
|
||
"wecom",
|
||
"webhook"
|
||
],
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/consts.NotifyChannelKind"
|
||
}
|
||
]
|
||
},
|
||
"name": {
|
||
"type": "string",
|
||
"maxLength": 64
|
||
},
|
||
"secret": {
|
||
"type": "string"
|
||
},
|
||
"webhook_url": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"domain.CreateProjectReq": {
|
||
"type": "object",
|
||
"properties": {
|
||
"description": {
|
||
"type": "string"
|
||
},
|
||
"env_variables": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"git_identity_id": {
|
||
"type": "string"
|
||
},
|
||
"image_id": {
|
||
"type": "string"
|
||
},
|
||
"name": {
|
||
"type": "string"
|
||
},
|
||
"platform": {
|
||
"$ref": "#/definitions/consts.GitPlatform"
|
||
},
|
||
"repo_url": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"domain.CreateTaskReq": {
|
||
"type": "object",
|
||
"required": [
|
||
"content",
|
||
"host_id",
|
||
"image_id",
|
||
"model_id",
|
||
"repo",
|
||
"resource"
|
||
],
|
||
"properties": {
|
||
"attachments": {
|
||
"description": "附件列表,最多 10 个;URL 必须匹配后端配置的附件白名单前缀",
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/domain.TaskAttachment"
|
||
}
|
||
},
|
||
"cli_name": {
|
||
"$ref": "#/definitions/consts.CliName"
|
||
},
|
||
"content": {
|
||
"type": "string"
|
||
},
|
||
"extra": {
|
||
"$ref": "#/definitions/domain.TaskExtraConfig"
|
||
},
|
||
"git_identity_id": {
|
||
"type": "string"
|
||
},
|
||
"host_id": {
|
||
"type": "string"
|
||
},
|
||
"image_id": {
|
||
"type": "string"
|
||
},
|
||
"model_id": {
|
||
"type": "string"
|
||
},
|
||
"repo": {
|
||
"$ref": "#/definitions/domain.TaskRepoReq"
|
||
},
|
||
"resource": {
|
||
"$ref": "#/definitions/domain.VMResource"
|
||
},
|
||
"sub_type": {
|
||
"$ref": "#/definitions/consts.TaskSubType"
|
||
},
|
||
"system_prompt": {
|
||
"type": "string"
|
||
},
|
||
"task_type": {
|
||
"$ref": "#/definitions/consts.TaskType"
|
||
}
|
||
}
|
||
},
|
||
"domain.CreateUserMCPUpstreamReq": {
|
||
"type": "object",
|
||
"properties": {
|
||
"description": {
|
||
"type": "string"
|
||
},
|
||
"enabled": {
|
||
"type": "boolean"
|
||
},
|
||
"headers": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/domain.MCPHeader"
|
||
}
|
||
},
|
||
"name": {
|
||
"type": "string"
|
||
},
|
||
"slug": {
|
||
"type": "string"
|
||
},
|
||
"url": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"domain.CreateVMReq": {
|
||
"type": "object",
|
||
"required": [
|
||
"host_id",
|
||
"image_id",
|
||
"model_id",
|
||
"name",
|
||
"resource"
|
||
],
|
||
"properties": {
|
||
"git_identity_id": {
|
||
"type": "string"
|
||
},
|
||
"host_id": {
|
||
"type": "string"
|
||
},
|
||
"image_id": {
|
||
"type": "string"
|
||
},
|
||
"install_coding_agents": {
|
||
"type": "boolean"
|
||
},
|
||
"life": {
|
||
"type": "integer"
|
||
},
|
||
"model_id": {
|
||
"type": "string"
|
||
},
|
||
"name": {
|
||
"type": "string"
|
||
},
|
||
"repo": {
|
||
"$ref": "#/definitions/domain.TaskRepoReq"
|
||
},
|
||
"resource": {
|
||
"$ref": "#/definitions/domain.Resource"
|
||
}
|
||
}
|
||
},
|
||
"domain.DeleteImageReq": {
|
||
"type": "object",
|
||
"required": [
|
||
"id"
|
||
],
|
||
"properties": {
|
||
"id": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"domain.FileChangeReq": {
|
||
"type": "object",
|
||
"required": [
|
||
"id",
|
||
"source",
|
||
"target"
|
||
],
|
||
"properties": {
|
||
"id": {
|
||
"description": "虚拟机 id",
|
||
"type": "string"
|
||
},
|
||
"source": {
|
||
"description": "来源",
|
||
"type": "string"
|
||
},
|
||
"target": {
|
||
"description": "目标",
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"domain.FilePathReq": {
|
||
"type": "object",
|
||
"required": [
|
||
"id",
|
||
"path"
|
||
],
|
||
"properties": {
|
||
"id": {
|
||
"description": "虚拟机 id",
|
||
"type": "string"
|
||
},
|
||
"path": {
|
||
"description": "文件/目录路径",
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"domain.FileSaveReq": {
|
||
"type": "object",
|
||
"required": [
|
||
"id",
|
||
"path"
|
||
],
|
||
"properties": {
|
||
"content": {
|
||
"description": "文件内容",
|
||
"type": "string"
|
||
},
|
||
"id": {
|
||
"description": "虚拟机 id",
|
||
"type": "string"
|
||
},
|
||
"path": {
|
||
"description": "文件路径",
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"domain.GetProviderModelListResp": {
|
||
"type": "object",
|
||
"properties": {
|
||
"error": {
|
||
"$ref": "#/definitions/domain.OpenAIError"
|
||
},
|
||
"models": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/domain.ProviderModelListItem"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"domain.GitBot": {
|
||
"type": "object",
|
||
"properties": {
|
||
"created_at": {
|
||
"type": "integer"
|
||
},
|
||
"host": {
|
||
"$ref": "#/definitions/domain.Host"
|
||
},
|
||
"id": {
|
||
"type": "string"
|
||
},
|
||
"name": {
|
||
"type": "string"
|
||
},
|
||
"platform": {
|
||
"$ref": "#/definitions/consts.GitPlatform"
|
||
},
|
||
"secret_token": {
|
||
"type": "string"
|
||
},
|
||
"token": {
|
||
"type": "string"
|
||
},
|
||
"users": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/domain.User"
|
||
}
|
||
},
|
||
"webhook_url": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"domain.GitBotTask": {
|
||
"type": "object",
|
||
"properties": {
|
||
"bot": {
|
||
"$ref": "#/definitions/domain.GitBot"
|
||
},
|
||
"created_at": {
|
||
"type": "integer"
|
||
},
|
||
"id": {
|
||
"type": "string"
|
||
},
|
||
"pull_request": {
|
||
"$ref": "#/definitions/domain.PullRequest"
|
||
},
|
||
"repo": {
|
||
"$ref": "#/definitions/domain.GitRepository"
|
||
},
|
||
"status": {
|
||
"$ref": "#/definitions/consts.TaskStatus"
|
||
}
|
||
}
|
||
},
|
||
"domain.GitIdentity": {
|
||
"type": "object",
|
||
"properties": {
|
||
"access_token": {
|
||
"type": "string"
|
||
},
|
||
"authorized_repositories": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/domain.AuthRepository"
|
||
}
|
||
},
|
||
"base_url": {
|
||
"type": "string"
|
||
},
|
||
"created_at": {
|
||
"type": "string"
|
||
},
|
||
"email": {
|
||
"type": "string"
|
||
},
|
||
"id": {
|
||
"type": "string"
|
||
},
|
||
"is_installation_app": {
|
||
"type": "boolean"
|
||
},
|
||
"platform": {
|
||
"$ref": "#/definitions/consts.GitPlatform"
|
||
},
|
||
"remark": {
|
||
"type": "string"
|
||
},
|
||
"username": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"domain.GitRepository": {
|
||
"type": "object",
|
||
"properties": {
|
||
"owner": {
|
||
"type": "string"
|
||
},
|
||
"platform": {
|
||
"$ref": "#/definitions/consts.GitPlatform"
|
||
},
|
||
"repo_name": {
|
||
"type": "string"
|
||
},
|
||
"url": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"domain.Host": {
|
||
"type": "object",
|
||
"properties": {
|
||
"arch": {
|
||
"type": "string"
|
||
},
|
||
"cores": {
|
||
"type": "integer"
|
||
},
|
||
"default": {
|
||
"type": "boolean"
|
||
},
|
||
"external_ip": {
|
||
"type": "string"
|
||
},
|
||
"groups": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/domain.TeamGroup"
|
||
}
|
||
},
|
||
"id": {
|
||
"type": "string"
|
||
},
|
||
"is_default": {
|
||
"type": "boolean"
|
||
},
|
||
"memory": {
|
||
"type": "integer"
|
||
},
|
||
"name": {
|
||
"type": "string"
|
||
},
|
||
"os": {
|
||
"type": "string"
|
||
},
|
||
"owner": {
|
||
"$ref": "#/definitions/domain.Owner"
|
||
},
|
||
"remark": {
|
||
"type": "string"
|
||
},
|
||
"status": {
|
||
"$ref": "#/definitions/consts.HostStatus"
|
||
},
|
||
"version": {
|
||
"type": "string"
|
||
},
|
||
"virtualmachines": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/domain.VirtualMachine"
|
||
}
|
||
},
|
||
"weight": {
|
||
"type": "integer"
|
||
}
|
||
}
|
||
},
|
||
"domain.HostListResp": {
|
||
"type": "object",
|
||
"properties": {
|
||
"hosts": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/domain.Host"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"domain.IDReq-github_com_google_uuid_UUID": {
|
||
"type": "object",
|
||
"required": [
|
||
"id"
|
||
],
|
||
"properties": {
|
||
"id": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"domain.Image": {
|
||
"type": "object",
|
||
"properties": {
|
||
"created_at": {
|
||
"type": "integer"
|
||
},
|
||
"id": {
|
||
"type": "string"
|
||
},
|
||
"is_default": {
|
||
"type": "boolean"
|
||
},
|
||
"name": {
|
||
"type": "string"
|
||
},
|
||
"owner": {
|
||
"$ref": "#/definitions/domain.Owner"
|
||
},
|
||
"remark": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"domain.InstallCommand": {
|
||
"type": "object",
|
||
"properties": {
|
||
"command": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"domain.ListAuditsResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"audits": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/domain.Audit"
|
||
}
|
||
},
|
||
"page": {
|
||
"$ref": "#/definitions/db.Cursor"
|
||
}
|
||
}
|
||
},
|
||
"domain.ListCollaboratorsResp": {
|
||
"type": "object",
|
||
"properties": {
|
||
"collaborators": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/domain.Collaborator"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"domain.ListGitBotResp": {
|
||
"type": "object",
|
||
"properties": {
|
||
"bots": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/domain.GitBot"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"domain.ListGitBotTaskResp": {
|
||
"type": "object",
|
||
"properties": {
|
||
"page": {
|
||
"type": "integer"
|
||
},
|
||
"size": {
|
||
"type": "integer"
|
||
},
|
||
"tasks": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/domain.GitBotTask"
|
||
}
|
||
},
|
||
"total": {
|
||
"type": "integer"
|
||
}
|
||
}
|
||
},
|
||
"domain.ListImageResp": {
|
||
"type": "object",
|
||
"properties": {
|
||
"images": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/domain.Image"
|
||
}
|
||
},
|
||
"page": {
|
||
"$ref": "#/definitions/db.Cursor"
|
||
}
|
||
}
|
||
},
|
||
"domain.ListIssueCommentsResp": {
|
||
"type": "object",
|
||
"properties": {
|
||
"comments": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/domain.ProjectIssueComment"
|
||
}
|
||
},
|
||
"page": {
|
||
"$ref": "#/definitions/db.Cursor"
|
||
}
|
||
}
|
||
},
|
||
"domain.ListIssuesResp": {
|
||
"type": "object",
|
||
"properties": {
|
||
"issues": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/domain.ProjectIssue"
|
||
}
|
||
},
|
||
"page": {
|
||
"$ref": "#/definitions/db.Cursor"
|
||
}
|
||
}
|
||
},
|
||
"domain.ListModelResp": {
|
||
"type": "object",
|
||
"properties": {
|
||
"models": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/domain.Model"
|
||
}
|
||
},
|
||
"page": {
|
||
"$ref": "#/definitions/db.Cursor"
|
||
}
|
||
}
|
||
},
|
||
"domain.ListProjectResp": {
|
||
"type": "object",
|
||
"properties": {
|
||
"page": {
|
||
"$ref": "#/definitions/db.Cursor"
|
||
},
|
||
"projects": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/domain.Project"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"domain.ListTaskResp": {
|
||
"type": "object",
|
||
"properties": {
|
||
"page_info": {
|
||
"$ref": "#/definitions/db.PageInfo"
|
||
},
|
||
"tasks": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/domain.ProjectTask"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"domain.ListTeamGroupUsersResp": {
|
||
"type": "object",
|
||
"properties": {
|
||
"users": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/domain.User"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"domain.ListTeamGroupsResp": {
|
||
"type": "object",
|
||
"properties": {
|
||
"groups": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/domain.TeamGroup"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"domain.ListTeamHostsResp": {
|
||
"type": "object",
|
||
"properties": {
|
||
"hosts": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/domain.Host"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"domain.ListTeamImagesResp": {
|
||
"type": "object",
|
||
"properties": {
|
||
"images": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/domain.TeamImage"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"domain.ListTeamModelsResp": {
|
||
"type": "object",
|
||
"properties": {
|
||
"models": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/domain.TeamModel"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"domain.ListUserMCPUpstreamsResp": {
|
||
"type": "object",
|
||
"properties": {
|
||
"items": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/domain.MCPUpstream"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"domain.MCPHeader": {
|
||
"type": "object",
|
||
"properties": {
|
||
"name": {
|
||
"type": "string"
|
||
},
|
||
"value": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"domain.MCPTool": {
|
||
"type": "object",
|
||
"properties": {
|
||
"created_at": {
|
||
"type": "integer"
|
||
},
|
||
"description": {
|
||
"type": "string"
|
||
},
|
||
"enabled": {
|
||
"type": "boolean"
|
||
},
|
||
"id": {
|
||
"type": "string"
|
||
},
|
||
"input_schema": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"name": {
|
||
"type": "string"
|
||
},
|
||
"namespaced_name": {
|
||
"type": "string"
|
||
},
|
||
"price": {
|
||
"type": "integer"
|
||
},
|
||
"scope": {
|
||
"$ref": "#/definitions/mcptool.Scope"
|
||
}
|
||
}
|
||
},
|
||
"domain.MCPUpstream": {
|
||
"type": "object",
|
||
"properties": {
|
||
"created_at": {
|
||
"type": "integer"
|
||
},
|
||
"description": {
|
||
"type": "string"
|
||
},
|
||
"enabled": {
|
||
"type": "boolean"
|
||
},
|
||
"headers": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/domain.MCPHeader"
|
||
}
|
||
},
|
||
"health_checked_at": {
|
||
"type": "integer"
|
||
},
|
||
"health_status": {
|
||
"type": "string"
|
||
},
|
||
"id": {
|
||
"type": "string"
|
||
},
|
||
"last_synced_at": {
|
||
"type": "integer"
|
||
},
|
||
"name": {
|
||
"type": "string"
|
||
},
|
||
"scope": {
|
||
"$ref": "#/definitions/mcpupstream.Scope"
|
||
},
|
||
"slug": {
|
||
"type": "string"
|
||
},
|
||
"sync_status": {
|
||
"type": "string"
|
||
},
|
||
"tools": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/domain.MCPTool"
|
||
}
|
||
},
|
||
"type": {
|
||
"type": "string"
|
||
},
|
||
"url": {
|
||
"type": "string"
|
||
},
|
||
"user": {
|
||
"$ref": "#/definitions/domain.User"
|
||
}
|
||
}
|
||
},
|
||
"domain.MemberListResp": {
|
||
"type": "object",
|
||
"properties": {
|
||
"member_limit": {
|
||
"type": "integer"
|
||
},
|
||
"members": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/domain.TeamMemberInfo"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"domain.Model": {
|
||
"type": "object",
|
||
"properties": {
|
||
"access_level": {
|
||
"description": "访问级别 basic | pro",
|
||
"type": "string"
|
||
},
|
||
"api_key": {
|
||
"type": "string"
|
||
},
|
||
"base_url": {
|
||
"type": "string"
|
||
},
|
||
"context_limit": {
|
||
"type": "integer"
|
||
},
|
||
"created_at": {
|
||
"type": "integer"
|
||
},
|
||
"id": {
|
||
"type": "string"
|
||
},
|
||
"interface_type": {
|
||
"$ref": "#/definitions/consts.InterfaceType"
|
||
},
|
||
"is_default": {
|
||
"type": "boolean"
|
||
},
|
||
"is_free": {
|
||
"type": "boolean"
|
||
},
|
||
"is_hidden": {
|
||
"type": "boolean"
|
||
},
|
||
"last_check_at": {
|
||
"type": "integer"
|
||
},
|
||
"last_check_error": {
|
||
"type": "string"
|
||
},
|
||
"last_check_success": {
|
||
"type": "boolean"
|
||
},
|
||
"model": {
|
||
"type": "string"
|
||
},
|
||
"output_limit": {
|
||
"type": "integer"
|
||
},
|
||
"owner": {
|
||
"$ref": "#/definitions/domain.Owner"
|
||
},
|
||
"provider": {
|
||
"type": "string"
|
||
},
|
||
"remark": {
|
||
"type": "string"
|
||
},
|
||
"support_image": {
|
||
"type": "boolean"
|
||
},
|
||
"temperature": {
|
||
"type": "number"
|
||
},
|
||
"thinking_enabled": {
|
||
"type": "boolean"
|
||
},
|
||
"updated_at": {
|
||
"type": "integer"
|
||
},
|
||
"weight": {
|
||
"type": "integer"
|
||
}
|
||
}
|
||
},
|
||
"domain.ModelBrief": {
|
||
"type": "object",
|
||
"properties": {
|
||
"access_level": {
|
||
"type": "string"
|
||
},
|
||
"context_limit": {
|
||
"type": "integer"
|
||
},
|
||
"created_at": {
|
||
"type": "integer"
|
||
},
|
||
"id": {
|
||
"type": "string"
|
||
},
|
||
"interface_type": {
|
||
"$ref": "#/definitions/consts.InterfaceType"
|
||
},
|
||
"is_free": {
|
||
"type": "boolean"
|
||
},
|
||
"is_hidden": {
|
||
"type": "boolean"
|
||
},
|
||
"last_check_at": {
|
||
"type": "integer"
|
||
},
|
||
"last_check_error": {
|
||
"type": "string"
|
||
},
|
||
"last_check_success": {
|
||
"type": "boolean"
|
||
},
|
||
"model": {
|
||
"type": "string"
|
||
},
|
||
"output_limit": {
|
||
"type": "integer"
|
||
},
|
||
"owner": {
|
||
"$ref": "#/definitions/domain.Owner"
|
||
},
|
||
"provider": {
|
||
"type": "string"
|
||
},
|
||
"remark": {
|
||
"type": "string"
|
||
},
|
||
"support_image": {
|
||
"type": "boolean"
|
||
},
|
||
"temperature": {
|
||
"type": "number"
|
||
},
|
||
"thinking_enabled": {
|
||
"type": "boolean"
|
||
},
|
||
"updated_at": {
|
||
"type": "integer"
|
||
},
|
||
"weight": {
|
||
"type": "integer"
|
||
}
|
||
}
|
||
},
|
||
"domain.NotifyChannel": {
|
||
"type": "object",
|
||
"properties": {
|
||
"created_at": {
|
||
"type": "integer"
|
||
},
|
||
"enabled": {
|
||
"type": "boolean"
|
||
},
|
||
"event_types": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/consts.NotifyEventType"
|
||
}
|
||
},
|
||
"id": {
|
||
"type": "string"
|
||
},
|
||
"kind": {
|
||
"$ref": "#/definitions/consts.NotifyChannelKind"
|
||
},
|
||
"name": {
|
||
"type": "string"
|
||
},
|
||
"owner_id": {
|
||
"type": "string"
|
||
},
|
||
"owner_type": {
|
||
"$ref": "#/definitions/consts.NotifyOwnerType"
|
||
},
|
||
"scope": {
|
||
"type": "string"
|
||
},
|
||
"webhook_url": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"domain.OpenAIError": {
|
||
"type": "object",
|
||
"properties": {
|
||
"message": {
|
||
"type": "string"
|
||
},
|
||
"type": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"domain.Owner": {
|
||
"type": "object",
|
||
"properties": {
|
||
"id": {
|
||
"type": "string"
|
||
},
|
||
"name": {
|
||
"type": "string"
|
||
},
|
||
"type": {
|
||
"$ref": "#/definitions/consts.OwnerType"
|
||
}
|
||
}
|
||
},
|
||
"domain.Project": {
|
||
"type": "object",
|
||
"properties": {
|
||
"auto_review_enabled": {
|
||
"description": "是否开启自动审查",
|
||
"type": "boolean"
|
||
},
|
||
"collaborators": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/domain.Collaborator"
|
||
}
|
||
},
|
||
"created_at": {
|
||
"type": "integer"
|
||
},
|
||
"description": {
|
||
"type": "string"
|
||
},
|
||
"env_variables": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"full_name": {
|
||
"type": "string"
|
||
},
|
||
"git_identity_id": {
|
||
"type": "string"
|
||
},
|
||
"id": {
|
||
"type": "string"
|
||
},
|
||
"image_id": {
|
||
"type": "string"
|
||
},
|
||
"issues": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/domain.ProjectIssue"
|
||
}
|
||
},
|
||
"name": {
|
||
"type": "string"
|
||
},
|
||
"platform": {
|
||
"$ref": "#/definitions/consts.GitPlatform"
|
||
},
|
||
"repo_url": {
|
||
"type": "string"
|
||
},
|
||
"tasks": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/domain.ProjectTask"
|
||
}
|
||
},
|
||
"updated_at": {
|
||
"type": "integer"
|
||
},
|
||
"user": {
|
||
"$ref": "#/definitions/domain.User"
|
||
}
|
||
}
|
||
},
|
||
"domain.ProjectBlob": {
|
||
"type": "object",
|
||
"properties": {
|
||
"content": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "integer"
|
||
}
|
||
},
|
||
"is_binary": {
|
||
"type": "boolean"
|
||
},
|
||
"sha": {
|
||
"type": "string"
|
||
},
|
||
"size": {
|
||
"type": "integer"
|
||
}
|
||
}
|
||
},
|
||
"domain.ProjectCommit": {
|
||
"type": "object",
|
||
"properties": {
|
||
"author": {
|
||
"$ref": "#/definitions/domain.ProjectCommitUser"
|
||
},
|
||
"committer": {
|
||
"$ref": "#/definitions/domain.ProjectCommitUser"
|
||
},
|
||
"message": {
|
||
"type": "string"
|
||
},
|
||
"parent_shas": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"sha": {
|
||
"type": "string"
|
||
},
|
||
"tree_sha": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"domain.ProjectCommitEntry": {
|
||
"type": "object",
|
||
"properties": {
|
||
"commit": {
|
||
"$ref": "#/definitions/domain.ProjectCommit"
|
||
}
|
||
}
|
||
},
|
||
"domain.ProjectCommitUser": {
|
||
"type": "object",
|
||
"properties": {
|
||
"email": {
|
||
"type": "string"
|
||
},
|
||
"name": {
|
||
"type": "string"
|
||
},
|
||
"when": {
|
||
"type": "integer"
|
||
}
|
||
}
|
||
},
|
||
"domain.ProjectIssue": {
|
||
"type": "object",
|
||
"properties": {
|
||
"assignee": {
|
||
"$ref": "#/definitions/domain.User"
|
||
},
|
||
"created_at": {
|
||
"type": "integer"
|
||
},
|
||
"design_document": {
|
||
"type": "string"
|
||
},
|
||
"id": {
|
||
"type": "string"
|
||
},
|
||
"priority": {
|
||
"$ref": "#/definitions/consts.ProjectIssuePriority"
|
||
},
|
||
"requirement_document": {
|
||
"type": "string"
|
||
},
|
||
"status": {
|
||
"$ref": "#/definitions/consts.ProjectIssueStatus"
|
||
},
|
||
"summary": {
|
||
"type": "string"
|
||
},
|
||
"title": {
|
||
"type": "string"
|
||
},
|
||
"user": {
|
||
"$ref": "#/definitions/domain.User"
|
||
}
|
||
}
|
||
},
|
||
"domain.ProjectIssueComment": {
|
||
"type": "object",
|
||
"properties": {
|
||
"comment": {
|
||
"type": "string"
|
||
},
|
||
"created_at": {
|
||
"type": "integer"
|
||
},
|
||
"creator": {
|
||
"$ref": "#/definitions/domain.User"
|
||
},
|
||
"id": {
|
||
"type": "string"
|
||
},
|
||
"parent": {
|
||
"$ref": "#/definitions/domain.ProjectIssueComment"
|
||
},
|
||
"replies": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/domain.ProjectIssueComment"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"domain.ProjectLogs": {
|
||
"type": "object",
|
||
"properties": {
|
||
"count": {
|
||
"type": "integer"
|
||
},
|
||
"entries": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/domain.ProjectCommitEntry"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"domain.ProjectTask": {
|
||
"type": "object",
|
||
"required": [
|
||
"id"
|
||
],
|
||
"properties": {
|
||
"branch": {
|
||
"type": "string"
|
||
},
|
||
"cli_name": {
|
||
"$ref": "#/definitions/consts.CliName"
|
||
},
|
||
"completed_at": {
|
||
"type": "integer"
|
||
},
|
||
"content": {
|
||
"type": "string"
|
||
},
|
||
"created_at": {
|
||
"type": "integer"
|
||
},
|
||
"extra": {
|
||
"$ref": "#/definitions/domain.TaskExtraConfig"
|
||
},
|
||
"full_name": {
|
||
"type": "string"
|
||
},
|
||
"id": {
|
||
"type": "string"
|
||
},
|
||
"image": {
|
||
"$ref": "#/definitions/domain.Image"
|
||
},
|
||
"last_active_at": {
|
||
"type": "integer"
|
||
},
|
||
"log_store": {
|
||
"$ref": "#/definitions/consts.LogStore"
|
||
},
|
||
"model": {
|
||
"$ref": "#/definitions/domain.ModelBrief"
|
||
},
|
||
"repo_filename": {
|
||
"type": "string"
|
||
},
|
||
"repo_url": {
|
||
"type": "string"
|
||
},
|
||
"stats": {
|
||
"$ref": "#/definitions/domain.TaskStats"
|
||
},
|
||
"status": {
|
||
"$ref": "#/definitions/consts.TaskStatus"
|
||
},
|
||
"sub_type": {
|
||
"$ref": "#/definitions/consts.TaskSubType"
|
||
},
|
||
"summary": {
|
||
"type": "string"
|
||
},
|
||
"title": {
|
||
"type": "string"
|
||
},
|
||
"type": {
|
||
"$ref": "#/definitions/consts.TaskType"
|
||
},
|
||
"user_id": {
|
||
"type": "string"
|
||
},
|
||
"virtualmachine": {
|
||
"$ref": "#/definitions/domain.VirtualMachine"
|
||
}
|
||
}
|
||
},
|
||
"domain.ProjectTreeEntry": {
|
||
"type": "object",
|
||
"properties": {
|
||
"last_modified_at": {
|
||
"type": "integer"
|
||
},
|
||
"mode": {
|
||
"type": "integer"
|
||
},
|
||
"name": {
|
||
"type": "string"
|
||
},
|
||
"path": {
|
||
"type": "string"
|
||
},
|
||
"sha": {
|
||
"type": "string"
|
||
},
|
||
"size": {
|
||
"type": "integer"
|
||
}
|
||
}
|
||
},
|
||
"domain.ProviderModelListItem": {
|
||
"type": "object",
|
||
"properties": {
|
||
"model": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"domain.PullRequest": {
|
||
"type": "object",
|
||
"properties": {
|
||
"title": {
|
||
"type": "string"
|
||
},
|
||
"url": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"domain.RecyclePortReq": {
|
||
"type": "object",
|
||
"required": [
|
||
"forward_id"
|
||
],
|
||
"properties": {
|
||
"forward_id": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"domain.RedeemCaptchaReq": {
|
||
"type": "object",
|
||
"properties": {
|
||
"solutions": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "integer"
|
||
}
|
||
},
|
||
"token": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"domain.ResetUserPasswordEmailReq": {
|
||
"type": "object",
|
||
"required": [
|
||
"emails"
|
||
],
|
||
"properties": {
|
||
"captcha_token": {
|
||
"type": "string"
|
||
},
|
||
"emails": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"domain.ResetUserPasswordReq": {
|
||
"type": "object",
|
||
"required": [
|
||
"new_password",
|
||
"token"
|
||
],
|
||
"properties": {
|
||
"new_password": {
|
||
"type": "string"
|
||
},
|
||
"token": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"domain.Resource": {
|
||
"type": "object",
|
||
"properties": {
|
||
"cpu": {
|
||
"type": "integer"
|
||
},
|
||
"memory": {
|
||
"type": "integer"
|
||
}
|
||
}
|
||
},
|
||
"domain.SendBindEmailVerificationReq": {
|
||
"type": "object",
|
||
"required": [
|
||
"email"
|
||
],
|
||
"properties": {
|
||
"email": {
|
||
"description": "要绑定的邮箱地址",
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"domain.ShareGitBotReq": {
|
||
"type": "object",
|
||
"properties": {
|
||
"id": {
|
||
"type": "string"
|
||
},
|
||
"user_ids": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"domain.ShareTerminalReq": {
|
||
"type": "object",
|
||
"required": [
|
||
"id"
|
||
],
|
||
"properties": {
|
||
"id": {
|
||
"type": "string"
|
||
},
|
||
"mode": {
|
||
"$ref": "#/definitions/consts.TerminalMode"
|
||
},
|
||
"terminal_id": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"domain.ShareTerminalResp": {
|
||
"type": "object",
|
||
"properties": {
|
||
"password": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"domain.SpeechRecognitionData": {
|
||
"type": "object",
|
||
"properties": {
|
||
"error": {
|
||
"description": "错误信息 (仅error类型)",
|
||
"type": "string",
|
||
"example": "识别失败"
|
||
},
|
||
"is_final": {
|
||
"description": "是否为最终结果 (仅result类型)",
|
||
"type": "boolean",
|
||
"example": false
|
||
},
|
||
"text": {
|
||
"description": "识别文本 (仅result类型)",
|
||
"type": "string",
|
||
"example": "你好"
|
||
},
|
||
"timestamp": {
|
||
"description": "时间戳 (仅result类型)",
|
||
"type": "integer",
|
||
"example": 1640995200000
|
||
},
|
||
"type": {
|
||
"description": "数据类型: result, end, error",
|
||
"type": "string",
|
||
"example": "result"
|
||
},
|
||
"user_id": {
|
||
"description": "用户ID (仅result类型)",
|
||
"type": "string",
|
||
"example": "uuid"
|
||
}
|
||
}
|
||
},
|
||
"domain.SpeechRecognitionEvent": {
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"description": "事件数据",
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/domain.SpeechRecognitionData"
|
||
}
|
||
]
|
||
},
|
||
"event": {
|
||
"description": "事件类型: recognition, end, error",
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"domain.SubscriptionResp": {
|
||
"type": "object",
|
||
"properties": {
|
||
"auto_renew": {
|
||
"type": "boolean"
|
||
},
|
||
"expires_at": {
|
||
"type": "string"
|
||
},
|
||
"plan": {
|
||
"type": "string"
|
||
},
|
||
"source": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"domain.Task": {
|
||
"type": "object",
|
||
"properties": {
|
||
"branch": {
|
||
"type": "string"
|
||
},
|
||
"cli_name": {
|
||
"$ref": "#/definitions/consts.CliName"
|
||
},
|
||
"completed_at": {
|
||
"type": "integer"
|
||
},
|
||
"content": {
|
||
"type": "string"
|
||
},
|
||
"created_at": {
|
||
"type": "integer"
|
||
},
|
||
"extra": {
|
||
"$ref": "#/definitions/domain.TaskExtraConfig"
|
||
},
|
||
"full_name": {
|
||
"type": "string"
|
||
},
|
||
"id": {
|
||
"type": "string"
|
||
},
|
||
"image": {
|
||
"$ref": "#/definitions/domain.Image"
|
||
},
|
||
"last_active_at": {
|
||
"type": "integer"
|
||
},
|
||
"log_store": {
|
||
"$ref": "#/definitions/consts.LogStore"
|
||
},
|
||
"model": {
|
||
"$ref": "#/definitions/domain.ModelBrief"
|
||
},
|
||
"repo_filename": {
|
||
"type": "string"
|
||
},
|
||
"repo_url": {
|
||
"type": "string"
|
||
},
|
||
"stats": {
|
||
"$ref": "#/definitions/domain.TaskStats"
|
||
},
|
||
"status": {
|
||
"$ref": "#/definitions/consts.TaskStatus"
|
||
},
|
||
"sub_type": {
|
||
"$ref": "#/definitions/consts.TaskSubType"
|
||
},
|
||
"summary": {
|
||
"type": "string"
|
||
},
|
||
"title": {
|
||
"type": "string"
|
||
},
|
||
"type": {
|
||
"$ref": "#/definitions/consts.TaskType"
|
||
},
|
||
"user_id": {
|
||
"type": "string"
|
||
},
|
||
"virtualmachine": {
|
||
"$ref": "#/definitions/domain.VirtualMachine"
|
||
}
|
||
}
|
||
},
|
||
"domain.TaskAttachment": {
|
||
"type": "object",
|
||
"properties": {
|
||
"filename": {
|
||
"type": "string"
|
||
},
|
||
"url": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"domain.TaskChunkEntry": {
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "integer"
|
||
}
|
||
},
|
||
"event": {
|
||
"type": "string"
|
||
},
|
||
"kind": {
|
||
"type": "string"
|
||
},
|
||
"labels": {
|
||
"type": "object",
|
||
"additionalProperties": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"timestamp": {
|
||
"type": "integer"
|
||
}
|
||
}
|
||
},
|
||
"domain.TaskExtraConfig": {
|
||
"type": "object",
|
||
"properties": {
|
||
"issue_id": {
|
||
"type": "string"
|
||
},
|
||
"project_id": {
|
||
"type": "string"
|
||
},
|
||
"skill_ids": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"domain.TaskRepoReq": {
|
||
"type": "object",
|
||
"properties": {
|
||
"branch": {
|
||
"type": "string"
|
||
},
|
||
"repo_filename": {
|
||
"type": "string"
|
||
},
|
||
"repo_url": {
|
||
"type": "string"
|
||
},
|
||
"zip_url": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"domain.TaskRoundsResp": {
|
||
"type": "object",
|
||
"properties": {
|
||
"chunks": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/domain.TaskChunkEntry"
|
||
}
|
||
},
|
||
"has_more": {
|
||
"type": "boolean"
|
||
},
|
||
"next_cursor": {
|
||
"description": "下一页游标",
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"domain.TaskStats": {
|
||
"type": "object",
|
||
"properties": {
|
||
"input_tokens": {
|
||
"type": "integer"
|
||
},
|
||
"llm_requests": {
|
||
"type": "integer"
|
||
},
|
||
"output_tokens": {
|
||
"type": "integer"
|
||
},
|
||
"total_tokens": {
|
||
"type": "integer"
|
||
}
|
||
}
|
||
},
|
||
"domain.Team": {
|
||
"type": "object",
|
||
"properties": {
|
||
"id": {
|
||
"type": "string"
|
||
},
|
||
"name": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"domain.TeamGroup": {
|
||
"type": "object",
|
||
"properties": {
|
||
"created_at": {
|
||
"type": "integer"
|
||
},
|
||
"id": {
|
||
"type": "string"
|
||
},
|
||
"name": {
|
||
"type": "string"
|
||
},
|
||
"updated_at": {
|
||
"type": "integer"
|
||
},
|
||
"users": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/domain.User"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"domain.TeamImage": {
|
||
"type": "object",
|
||
"properties": {
|
||
"created_at": {
|
||
"type": "integer"
|
||
},
|
||
"groups": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/domain.TeamGroup"
|
||
}
|
||
},
|
||
"id": {
|
||
"type": "string"
|
||
},
|
||
"name": {
|
||
"type": "string"
|
||
},
|
||
"remark": {
|
||
"type": "string"
|
||
},
|
||
"updated_at": {
|
||
"type": "integer"
|
||
}
|
||
}
|
||
},
|
||
"domain.TeamLoginReq": {
|
||
"type": "object",
|
||
"required": [
|
||
"email",
|
||
"password"
|
||
],
|
||
"properties": {
|
||
"captcha_token": {
|
||
"description": "验证码Token",
|
||
"type": "string"
|
||
},
|
||
"email": {
|
||
"description": "用户邮箱",
|
||
"type": "string"
|
||
},
|
||
"password": {
|
||
"description": "用户密码(MD5加密后的值)",
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"domain.TeamMember": {
|
||
"type": "object",
|
||
"properties": {
|
||
"team_id": {
|
||
"type": "string"
|
||
},
|
||
"team_name": {
|
||
"type": "string"
|
||
},
|
||
"team_role": {
|
||
"$ref": "#/definitions/consts.TeamMemberRole"
|
||
},
|
||
"user_id": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"domain.TeamMemberInfo": {
|
||
"type": "object",
|
||
"properties": {
|
||
"created_at": {
|
||
"type": "integer"
|
||
},
|
||
"last_active_at": {
|
||
"type": "integer"
|
||
},
|
||
"role": {
|
||
"$ref": "#/definitions/consts.TeamMemberRole"
|
||
},
|
||
"user": {
|
||
"$ref": "#/definitions/domain.User"
|
||
}
|
||
}
|
||
},
|
||
"domain.TeamModel": {
|
||
"type": "object",
|
||
"properties": {
|
||
"api_key": {
|
||
"type": "string"
|
||
},
|
||
"base_url": {
|
||
"type": "string"
|
||
},
|
||
"created_at": {
|
||
"type": "integer"
|
||
},
|
||
"groups": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/domain.TeamGroup"
|
||
}
|
||
},
|
||
"id": {
|
||
"type": "string"
|
||
},
|
||
"interface_type": {
|
||
"$ref": "#/definitions/consts.InterfaceType"
|
||
},
|
||
"is_hidden": {
|
||
"type": "boolean"
|
||
},
|
||
"last_check_at": {
|
||
"type": "integer"
|
||
},
|
||
"last_check_error": {
|
||
"type": "string"
|
||
},
|
||
"last_check_success": {
|
||
"type": "boolean"
|
||
},
|
||
"model": {
|
||
"type": "string"
|
||
},
|
||
"provider": {
|
||
"type": "string"
|
||
},
|
||
"remark": {
|
||
"type": "string"
|
||
},
|
||
"support_image": {
|
||
"type": "boolean"
|
||
},
|
||
"temperature": {
|
||
"type": "number"
|
||
},
|
||
"updated_at": {
|
||
"type": "integer"
|
||
}
|
||
}
|
||
},
|
||
"domain.TeamUser": {
|
||
"type": "object",
|
||
"properties": {
|
||
"team": {
|
||
"$ref": "#/definitions/domain.Team"
|
||
},
|
||
"user": {
|
||
"$ref": "#/definitions/domain.User"
|
||
}
|
||
}
|
||
},
|
||
"domain.TeamUserInfo": {
|
||
"type": "object",
|
||
"properties": {
|
||
"teams": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/domain.TeamMember"
|
||
}
|
||
},
|
||
"user": {
|
||
"$ref": "#/definitions/domain.User"
|
||
}
|
||
}
|
||
},
|
||
"domain.TeamUserPassword": {
|
||
"type": "object",
|
||
"properties": {
|
||
"email": {
|
||
"type": "string"
|
||
},
|
||
"password": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"domain.Terminal": {
|
||
"type": "object",
|
||
"properties": {
|
||
"connected_count": {
|
||
"type": "integer"
|
||
},
|
||
"created_at": {
|
||
"type": "integer"
|
||
},
|
||
"id": {
|
||
"type": "string"
|
||
},
|
||
"title": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"domain.UpdateGitBotReq": {
|
||
"type": "object",
|
||
"required": [
|
||
"id"
|
||
],
|
||
"properties": {
|
||
"host_id": {
|
||
"type": "string"
|
||
},
|
||
"id": {
|
||
"type": "string"
|
||
},
|
||
"name": {
|
||
"type": "string"
|
||
},
|
||
"platform": {
|
||
"$ref": "#/definitions/consts.GitPlatform"
|
||
},
|
||
"token": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"domain.UpdateGitIdentityReq": {
|
||
"type": "object",
|
||
"properties": {
|
||
"access_token": {
|
||
"type": "string"
|
||
},
|
||
"base_url": {
|
||
"type": "string"
|
||
},
|
||
"email": {
|
||
"type": "string"
|
||
},
|
||
"platform": {
|
||
"$ref": "#/definitions/consts.GitPlatform"
|
||
},
|
||
"remark": {
|
||
"type": "string"
|
||
},
|
||
"username": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"domain.UpdateHostReq": {
|
||
"type": "object",
|
||
"properties": {
|
||
"is_default": {
|
||
"type": "boolean"
|
||
},
|
||
"remark": {
|
||
"type": "string"
|
||
},
|
||
"weight": {
|
||
"type": "integer",
|
||
"minimum": 1
|
||
}
|
||
}
|
||
},
|
||
"domain.UpdateImageReq": {
|
||
"type": "object",
|
||
"properties": {
|
||
"image_name": {
|
||
"type": "string"
|
||
},
|
||
"is_default": {
|
||
"type": "boolean"
|
||
},
|
||
"remark": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"domain.UpdateIssueReq": {
|
||
"type": "object",
|
||
"properties": {
|
||
"assignee_id": {
|
||
"type": "string"
|
||
},
|
||
"design_document": {
|
||
"type": "string"
|
||
},
|
||
"priority": {
|
||
"$ref": "#/definitions/consts.ProjectIssuePriority"
|
||
},
|
||
"requirement_document": {
|
||
"type": "string"
|
||
},
|
||
"status": {
|
||
"$ref": "#/definitions/consts.ProjectIssueStatus"
|
||
},
|
||
"title": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"domain.UpdateModelReq": {
|
||
"type": "object",
|
||
"properties": {
|
||
"api_key": {
|
||
"type": "string"
|
||
},
|
||
"base_url": {
|
||
"type": "string"
|
||
},
|
||
"context_limit": {
|
||
"type": "integer"
|
||
},
|
||
"interface_type": {
|
||
"enum": [
|
||
"openai_chat",
|
||
"openai_responses",
|
||
"anthropic"
|
||
],
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/consts.InterfaceType"
|
||
}
|
||
]
|
||
},
|
||
"is_default": {
|
||
"type": "boolean"
|
||
},
|
||
"is_hidden": {
|
||
"type": "boolean"
|
||
},
|
||
"model": {
|
||
"type": "string"
|
||
},
|
||
"output_limit": {
|
||
"type": "integer"
|
||
},
|
||
"provider": {
|
||
"type": "string"
|
||
},
|
||
"remark": {
|
||
"type": "string"
|
||
},
|
||
"support_image": {
|
||
"type": "boolean"
|
||
},
|
||
"temperature": {
|
||
"type": "number"
|
||
},
|
||
"thinking_enabled": {
|
||
"type": "boolean"
|
||
}
|
||
}
|
||
},
|
||
"domain.UpdateNotifyChannelReq": {
|
||
"type": "object",
|
||
"properties": {
|
||
"enabled": {
|
||
"type": "boolean"
|
||
},
|
||
"event_types": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/consts.NotifyEventType"
|
||
}
|
||
},
|
||
"headers": {
|
||
"type": "object",
|
||
"additionalProperties": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"name": {
|
||
"type": "string"
|
||
},
|
||
"secret": {
|
||
"type": "string"
|
||
},
|
||
"webhook_url": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"domain.UpdateProjectReq": {
|
||
"type": "object",
|
||
"properties": {
|
||
"collaborators": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/domain.CreateCollaboratorItem"
|
||
}
|
||
},
|
||
"description": {
|
||
"type": "string"
|
||
},
|
||
"env_variables": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"image_id": {
|
||
"type": "string"
|
||
},
|
||
"name": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"domain.UpdateTaskReq": {
|
||
"type": "object",
|
||
"properties": {
|
||
"title": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"domain.UpdateTeamGroupReq": {
|
||
"type": "object",
|
||
"required": [
|
||
"name"
|
||
],
|
||
"properties": {
|
||
"name": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"domain.UpdateTeamHostReq": {
|
||
"type": "object",
|
||
"properties": {
|
||
"group_ids": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"remark": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"domain.UpdateTeamImageReq": {
|
||
"type": "object",
|
||
"properties": {
|
||
"group_ids": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"name": {
|
||
"type": "string"
|
||
},
|
||
"remark": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"domain.UpdateTeamModelReq": {
|
||
"type": "object",
|
||
"properties": {
|
||
"api_key": {
|
||
"type": "string"
|
||
},
|
||
"base_url": {
|
||
"type": "string"
|
||
},
|
||
"group_ids": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"interface_type": {
|
||
"enum": [
|
||
"openai_chat",
|
||
"openai_responses",
|
||
"anthropic"
|
||
],
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/consts.InterfaceType"
|
||
}
|
||
]
|
||
},
|
||
"model": {
|
||
"type": "string"
|
||
},
|
||
"provider": {
|
||
"type": "string"
|
||
},
|
||
"remark": {
|
||
"type": "string"
|
||
},
|
||
"support_image": {
|
||
"type": "boolean"
|
||
},
|
||
"temperature": {
|
||
"type": "number"
|
||
}
|
||
}
|
||
},
|
||
"domain.UpdateTeamUserReq": {
|
||
"type": "object",
|
||
"properties": {
|
||
"is_blocked": {
|
||
"type": "boolean"
|
||
}
|
||
}
|
||
},
|
||
"domain.UpdateTeamUserResp": {
|
||
"type": "object",
|
||
"properties": {
|
||
"user": {
|
||
"$ref": "#/definitions/domain.User"
|
||
}
|
||
}
|
||
},
|
||
"domain.UpdateUserMCPToolSettingReq": {
|
||
"type": "object",
|
||
"properties": {
|
||
"enabled": {
|
||
"type": "boolean"
|
||
}
|
||
}
|
||
},
|
||
"domain.UpdateUserMCPUpstreamReq": {
|
||
"type": "object",
|
||
"properties": {
|
||
"description": {
|
||
"type": "string"
|
||
},
|
||
"enabled": {
|
||
"type": "boolean"
|
||
},
|
||
"headers": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/domain.MCPHeader"
|
||
}
|
||
},
|
||
"name": {
|
||
"type": "string"
|
||
},
|
||
"slug": {
|
||
"type": "string"
|
||
},
|
||
"url": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"domain.UpdateUserResp": {
|
||
"type": "object",
|
||
"properties": {
|
||
"message": {
|
||
"type": "string"
|
||
},
|
||
"success": {
|
||
"type": "boolean"
|
||
},
|
||
"user": {
|
||
"$ref": "#/definitions/domain.User"
|
||
}
|
||
}
|
||
},
|
||
"domain.UpdateVMReq": {
|
||
"type": "object",
|
||
"required": [
|
||
"host_id",
|
||
"id"
|
||
],
|
||
"properties": {
|
||
"host_id": {
|
||
"type": "string"
|
||
},
|
||
"id": {
|
||
"type": "string"
|
||
},
|
||
"life": {
|
||
"type": "integer",
|
||
"minimum": 3600
|
||
}
|
||
}
|
||
},
|
||
"domain.User": {
|
||
"type": "object",
|
||
"properties": {
|
||
"avatar_url": {
|
||
"type": "string"
|
||
},
|
||
"email": {
|
||
"type": "string"
|
||
},
|
||
"has_password": {
|
||
"type": "boolean"
|
||
},
|
||
"id": {
|
||
"type": "string"
|
||
},
|
||
"identities": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/domain.UserIdentity"
|
||
}
|
||
},
|
||
"is_blocked": {
|
||
"type": "boolean"
|
||
},
|
||
"name": {
|
||
"type": "string"
|
||
},
|
||
"role": {
|
||
"$ref": "#/definitions/consts.UserRole"
|
||
},
|
||
"status": {
|
||
"$ref": "#/definitions/consts.UserStatus"
|
||
},
|
||
"team": {
|
||
"$ref": "#/definitions/domain.Team"
|
||
},
|
||
"token": {
|
||
"type": "string"
|
||
},
|
||
"wechat_mp_bound": {
|
||
"type": "boolean"
|
||
}
|
||
}
|
||
},
|
||
"domain.UserIdentity": {
|
||
"type": "object",
|
||
"properties": {
|
||
"avatar_url": {
|
||
"type": "string"
|
||
},
|
||
"email": {
|
||
"type": "string"
|
||
},
|
||
"id": {
|
||
"type": "string"
|
||
},
|
||
"identity_id": {
|
||
"type": "string"
|
||
},
|
||
"platform": {
|
||
"$ref": "#/definitions/consts.UserPlatform"
|
||
},
|
||
"username": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"domain.VMPort": {
|
||
"type": "object",
|
||
"properties": {
|
||
"error_message": {
|
||
"type": "string"
|
||
},
|
||
"forward_id": {
|
||
"type": "string"
|
||
},
|
||
"port": {
|
||
"type": "integer"
|
||
},
|
||
"preview_url": {
|
||
"type": "string"
|
||
},
|
||
"status": {
|
||
"$ref": "#/definitions/consts.PortStatus"
|
||
},
|
||
"success": {
|
||
"type": "boolean"
|
||
},
|
||
"white_list": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"domain.VMResource": {
|
||
"type": "object",
|
||
"properties": {
|
||
"core": {
|
||
"type": "integer",
|
||
"default": 1
|
||
},
|
||
"life": {
|
||
"type": "integer"
|
||
},
|
||
"memory": {
|
||
"type": "integer",
|
||
"default": 1024
|
||
}
|
||
}
|
||
},
|
||
"domain.VirtualMachine": {
|
||
"type": "object",
|
||
"properties": {
|
||
"conditions": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/github_com_chaitin_MonkeyCode_backend_ent_types.Condition"
|
||
}
|
||
},
|
||
"cores": {
|
||
"type": "integer"
|
||
},
|
||
"created_at": {
|
||
"type": "integer"
|
||
},
|
||
"environment_id": {
|
||
"type": "string"
|
||
},
|
||
"host": {
|
||
"$ref": "#/definitions/domain.Host"
|
||
},
|
||
"hostname": {
|
||
"type": "string"
|
||
},
|
||
"id": {
|
||
"type": "string"
|
||
},
|
||
"life_time_seconds": {
|
||
"type": "integer"
|
||
},
|
||
"memory": {
|
||
"type": "integer"
|
||
},
|
||
"name": {
|
||
"type": "string"
|
||
},
|
||
"os": {
|
||
"type": "string"
|
||
},
|
||
"owner": {
|
||
"$ref": "#/definitions/domain.User"
|
||
},
|
||
"ports": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/domain.VMPort"
|
||
}
|
||
},
|
||
"status": {
|
||
"$ref": "#/definitions/taskflow.VirtualMachineStatus"
|
||
},
|
||
"version": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"github_com_chaitin_MonkeyCode_backend_ent_types.Condition": {
|
||
"type": "object",
|
||
"properties": {
|
||
"last_transition_time": {
|
||
"type": "integer"
|
||
},
|
||
"message": {
|
||
"type": "string"
|
||
},
|
||
"progress": {
|
||
"type": "integer"
|
||
},
|
||
"reason": {
|
||
"type": "string"
|
||
},
|
||
"status": {
|
||
"$ref": "#/definitions/types.ConditionStatus"
|
||
},
|
||
"type": {
|
||
"$ref": "#/definitions/types.ConditionType"
|
||
}
|
||
}
|
||
},
|
||
"gocap.ChallengeData": {
|
||
"type": "object",
|
||
"properties": {
|
||
"challenge": {
|
||
"$ref": "#/definitions/gocap.ChallengeItem"
|
||
},
|
||
"expires": {
|
||
"description": "过期时间,毫秒级时间戳",
|
||
"type": "integer"
|
||
},
|
||
"token": {
|
||
"description": "质询令牌",
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"gocap.ChallengeItem": {
|
||
"type": "object",
|
||
"properties": {
|
||
"c": {
|
||
"description": "质询数量",
|
||
"type": "integer"
|
||
},
|
||
"d": {
|
||
"description": "质询难度",
|
||
"type": "integer"
|
||
},
|
||
"s": {
|
||
"description": "质询大小",
|
||
"type": "integer"
|
||
}
|
||
}
|
||
},
|
||
"gocap.VerificationResult": {
|
||
"type": "object",
|
||
"properties": {
|
||
"expires": {
|
||
"description": "过期时间,毫秒级时间戳",
|
||
"type": "integer"
|
||
},
|
||
"message": {
|
||
"type": "string"
|
||
},
|
||
"success": {
|
||
"type": "boolean"
|
||
},
|
||
"token": {
|
||
"description": "验证令牌",
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"mcptool.Scope": {
|
||
"type": "string",
|
||
"enum": [
|
||
"user",
|
||
"platform"
|
||
],
|
||
"x-enum-varnames": [
|
||
"ScopeUser",
|
||
"ScopePlatform"
|
||
]
|
||
},
|
||
"mcpupstream.Scope": {
|
||
"type": "string",
|
||
"enum": [
|
||
"user",
|
||
"platform"
|
||
],
|
||
"x-enum-varnames": [
|
||
"ScopeUser",
|
||
"ScopePlatform"
|
||
]
|
||
},
|
||
"taskflow.File": {
|
||
"type": "object",
|
||
"properties": {
|
||
"accessed_at": {
|
||
"type": "integer"
|
||
},
|
||
"created_at": {
|
||
"type": "integer"
|
||
},
|
||
"kind": {
|
||
"$ref": "#/definitions/taskflow.FileKind"
|
||
},
|
||
"name": {
|
||
"type": "string"
|
||
},
|
||
"size": {
|
||
"type": "integer"
|
||
},
|
||
"symlink_kind": {
|
||
"$ref": "#/definitions/taskflow.FileKind"
|
||
},
|
||
"symlink_target": {
|
||
"type": "string"
|
||
},
|
||
"unix_mode": {
|
||
"type": "integer"
|
||
},
|
||
"updated_at": {
|
||
"type": "integer"
|
||
},
|
||
"user": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"taskflow.FileKind": {
|
||
"type": "string",
|
||
"enum": [
|
||
"unknown",
|
||
"file",
|
||
"dir",
|
||
"symlink"
|
||
],
|
||
"x-enum-varnames": [
|
||
"FileKindUnknown",
|
||
"FileKindFile",
|
||
"FileKindDir",
|
||
"FileKindSymlink"
|
||
]
|
||
},
|
||
"taskflow.VirtualMachineStatus": {
|
||
"type": "string",
|
||
"enum": [
|
||
"unknown",
|
||
"pending",
|
||
"online",
|
||
"offline",
|
||
"hibernated"
|
||
],
|
||
"x-enum-varnames": [
|
||
"VirtualMachineStatusUnknown",
|
||
"VirtualMachineStatusPending",
|
||
"VirtualMachineStatusOnline",
|
||
"VirtualMachineStatusOffline",
|
||
"VirtualMachineStatusHibernated"
|
||
]
|
||
},
|
||
"types.ConditionStatus": {
|
||
"type": "integer",
|
||
"format": "int32",
|
||
"enum": [
|
||
0,
|
||
1,
|
||
2,
|
||
3
|
||
],
|
||
"x-enum-varnames": [
|
||
"ConditionStatus_CONDITION_STATUS_UNKNOWN",
|
||
"ConditionStatus_CONDITION_STATUS_IN_PROGRESS",
|
||
"ConditionStatus_CONDITION_STATUS_TRUE",
|
||
"ConditionStatus_CONDITION_STATUS_FALSE"
|
||
]
|
||
},
|
||
"types.ConditionType": {
|
||
"type": "string",
|
||
"enum": [
|
||
"Scheduled",
|
||
"ImagePulled",
|
||
"ProjectCloned",
|
||
"ImageBuilt",
|
||
"ContainerCreated",
|
||
"ContainerStarted",
|
||
"Ready",
|
||
"Failed",
|
||
"Hibernated"
|
||
],
|
||
"x-enum-varnames": [
|
||
"ConditionTypeScheduled",
|
||
"ConditionTypeImagePulled",
|
||
"ConditionTypeProjectCloned",
|
||
"ConditionTypeImageBuilt",
|
||
"ConditionTypeContainerCreated",
|
||
"ConditionTypeContainerStarted",
|
||
"ConditionTypeReady",
|
||
"ConditionTypeFailed",
|
||
"ConditionTypeHibernated"
|
||
]
|
||
},
|
||
"web.Resp": {
|
||
"type": "object",
|
||
"properties": {
|
||
"code": {
|
||
"type": "integer"
|
||
},
|
||
"data": {},
|
||
"message": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
} |