diff --git a/cmd/open_im_api/docs/docs.go b/cmd/open_im_api/docs/docs.go
index 04efc9ea5..50981d32a 100644
--- a/cmd/open_im_api/docs/docs.go
+++ b/cmd/open_im_api/docs/docs.go
@@ -11,6 +11,10 @@ const docTemplate = `{
"description": "{{escape .Description}}",
"title": "{{.Title}}",
"contact": {},
+ "license": {
+ "name": "Apache 2.0",
+ "url": "http://www.apache.org/licenses/LICENSE-2.0.html"
+ },
"version": "{{.Version}}"
},
"host": "{{.Host}}",
@@ -39,7 +43,7 @@ const docTemplate = `{
"required": true
},
{
- "description": "platform为平台ID, fromUserID为要执行强制登出的用户ID",
+ "description": "platform为平台ID \u003cbr\u003e fromUserID为要执行强制登出的用户ID",
"name": "req",
"in": "body",
"required": true,
@@ -58,13 +62,13 @@ const docTemplate = `{
"400": {
"description": "errCode为400 一般为参数输入错误, token未带上等",
"schema": {
- "$ref": "#/definitions/base_info.ForceLogoutResp"
+ "$ref": "#/definitions/base_info.Swagger400Resp"
}
},
"500": {
"description": "errCode为500 一般为服务器内部错误",
"schema": {
- "$ref": "#/definitions/base_info.ForceLogoutResp"
+ "$ref": "#/definitions/base_info.Swagger500Resp"
}
}
}
@@ -72,7 +76,7 @@ const docTemplate = `{
},
"/auth/parse_token": {
"post": {
- "description": "解析用户token",
+ "description": "解析当前用户token(token在请求头中传入)",
"consumes": [
"application/json"
],
@@ -82,7 +86,7 @@ const docTemplate = `{
"tags": [
"鉴权认证"
],
- "summary": "解析token",
+ "summary": "解析当前用户token",
"operationId": "ParseToken",
"parameters": [
{
@@ -93,7 +97,7 @@ const docTemplate = `{
"required": true
},
{
- "description": "secret为openIM密钥, 详细见服务端config.yaml secret字段, platform为平台ID",
+ "description": "secret为openIM密钥, 详细见服务端config.yaml secret字段\u003cbr\u003eplatform为平台ID",
"name": "req",
"in": "body",
"required": true,
@@ -106,19 +110,31 @@ const docTemplate = `{
"0": {
"description": "",
"schema": {
- "$ref": "#/definitions/base_info.ParseTokenResp"
+ "allOf": [
+ {
+ "$ref": "#/definitions/base_info.ParseTokenResp"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "Data": {
+ "$ref": "#/definitions/base_info.ExpireTime"
+ }
+ }
+ }
+ ]
}
},
"400": {
"description": "errCode为400 一般为参数输入错误, token未带上等",
"schema": {
- "$ref": "#/definitions/base_info.ParseTokenResp"
+ "$ref": "#/definitions/base_info.Swagger400Resp"
}
},
"500": {
"description": "errCode为500 一般为服务器内部错误",
"schema": {
- "$ref": "#/definitions/base_info.ParseTokenResp"
+ "$ref": "#/definitions/base_info.Swagger500Resp"
}
}
}
@@ -126,7 +142,7 @@ const docTemplate = `{
},
"/auth/user_register": {
"post": {
- "description": "用户登录",
+ "description": "用户注册",
"consumes": [
"application/json"
],
@@ -136,7 +152,7 @@ const docTemplate = `{
"tags": [
"鉴权认证"
],
- "summary": "用户登录",
+ "summary": "用户注册",
"operationId": "UserRegister",
"parameters": [
{
@@ -147,7 +163,7 @@ const docTemplate = `{
"required": true
},
{
- "description": "secret为openIM密钥, 详细见服务端config.yaml secret字段 \u003cbr\u003e platform为平台ID \u003cbr\u003e ex为拓展字段",
+ "description": "secret为openIM密钥, 详细见服务端config.yaml secret字段 \u003cbr\u003e platform为平台ID \u003cbr\u003e ex为拓展字段 \u003cbr\u003e gender为性别, 0为女, 1为男",
"name": "req",
"in": "body",
"required": true,
@@ -166,13 +182,13 @@ const docTemplate = `{
"400": {
"description": "errCode为400 一般为参数输入错误, token未带上等",
"schema": {
- "$ref": "#/definitions/base_info.UserRegisterResp"
+ "$ref": "#/definitions/base_info.Swagger400Resp"
}
},
"500": {
"description": "errCode为500 一般为服务器内部错误",
"schema": {
- "$ref": "#/definitions/base_info.UserRegisterResp"
+ "$ref": "#/definitions/base_info.Swagger500Resp"
}
}
}
@@ -201,7 +217,7 @@ const docTemplate = `{
"required": true
},
{
- "description": "secret为openIM密钥, 详细见服务端config.yaml secret字段, platform为平台ID",
+ "description": "secret为openIM密钥, 详细见服务端config.yaml secret字段 \u003cbr\u003e platform为平台ID",
"name": "req",
"in": "body",
"required": true,
@@ -220,13 +236,13 @@ const docTemplate = `{
"400": {
"description": "errCode为400 一般为参数输入错误, token未带上等",
"schema": {
- "$ref": "#/definitions/base_info.UserTokenResp"
+ "$ref": "#/definitions/base_info.Swagger400Resp"
}
},
"500": {
"description": "errCode为500 一般为服务器内部错误",
"schema": {
- "$ref": "#/definitions/base_info.UserTokenResp"
+ "$ref": "#/definitions/base_info.Swagger500Resp"
}
}
}
@@ -255,7 +271,7 @@ const docTemplate = `{
"required": true
},
{
- "description": "fromUserID为设置的用户, toUserID为被设置的用户",
+ "description": "fromUserID为设置的用户 \u003cbr\u003e toUserID为被设置的用户",
"name": "req",
"in": "body",
"required": true,
@@ -274,13 +290,13 @@ const docTemplate = `{
"400": {
"description": "errCode为400 一般为参数输入错误, token未带上等",
"schema": {
- "$ref": "#/definitions/base_info.AddBlacklistResp"
+ "$ref": "#/definitions/base_info.Swagger400Resp"
}
},
"500": {
"description": "errCode为500 一般为服务器内部错误",
"schema": {
- "$ref": "#/definitions/base_info.AddBlacklistResp"
+ "$ref": "#/definitions/base_info.Swagger500Resp"
}
}
}
@@ -309,7 +325,7 @@ const docTemplate = `{
"required": true
},
{
- "description": "reqMsg为申请信息, fromUserID为申请用户, toUserID为被添加用户",
+ "description": "reqMsg为申请信息 \u003cbr\u003e fromUserID为申请用户 \u003cbr\u003e toUserID为被添加用户",
"name": "req",
"in": "body",
"required": true,
@@ -328,13 +344,13 @@ const docTemplate = `{
"400": {
"description": "errCode为400 一般为参数输入错误, token未带上等",
"schema": {
- "$ref": "#/definitions/base_info.AddFriendResp"
+ "$ref": "#/definitions/base_info.Swagger400Resp"
}
},
"500": {
"description": "errCode为500 一般为服务器内部错误",
"schema": {
- "$ref": "#/definitions/base_info.AddFriendResp"
+ "$ref": "#/definitions/base_info.Swagger500Resp"
}
}
}
@@ -363,7 +379,7 @@ const docTemplate = `{
"required": true
},
{
- "description": "fromUserID同意/拒绝的用户ID, toUserID为申请用户, handleMsg为处理信息, flag为具体操作, 1为同意, 2为拒绝",
+ "description": "fromUserID同意/拒绝的用户ID\u003cbr\u003etoUserID为申请用户D\u003cbr\u003ehandleMsg为处理信息\u003cbr\u003eflag为具体操作, 1为同意, 2为拒绝",
"name": "req",
"in": "body",
"required": true,
@@ -382,13 +398,13 @@ const docTemplate = `{
"400": {
"description": "errCode为400 一般为参数输入错误, token未带上等",
"schema": {
- "$ref": "#/definitions/base_info.AddFriendResponseResp"
+ "$ref": "#/definitions/base_info.Swagger400Resp"
}
},
"500": {
"description": "errCode为500 一般为服务器内部错误",
"schema": {
- "$ref": "#/definitions/base_info.AddFriendResponseResp"
+ "$ref": "#/definitions/base_info.Swagger500Resp"
}
}
}
@@ -417,7 +433,7 @@ const docTemplate = `{
"required": true
},
{
- "description": "fromUserID为操作用户, toUserID为被删除用户",
+ "description": "fromUserID为操作用户\u003cbr\u003etoUserID为被删除用户",
"name": "req",
"in": "body",
"required": true,
@@ -436,13 +452,13 @@ const docTemplate = `{
"400": {
"description": "errCode为400 一般为参数输入错误, token未带上等",
"schema": {
- "$ref": "#/definitions/base_info.DeleteFriendResp"
+ "$ref": "#/definitions/base_info.Swagger400Resp"
}
},
"500": {
"description": "errCode为500 一般为服务器内部错误",
"schema": {
- "$ref": "#/definitions/base_info.DeleteFriendResp"
+ "$ref": "#/definitions/base_info.Swagger500Resp"
}
}
}
@@ -484,19 +500,34 @@ const docTemplate = `{
"0": {
"description": "",
"schema": {
- "$ref": "#/definitions/base_info.GetBlackListResp"
+ "allOf": [
+ {
+ "$ref": "#/definitions/base_info.GetBlackListResp"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "data": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/server_api_params.PublicUserInfo"
+ }
+ }
+ }
+ }
+ ]
}
},
"400": {
"description": "errCode为400 一般为参数输入错误, token未带上等",
"schema": {
- "$ref": "#/definitions/base_info.GetBlackListResp"
+ "$ref": "#/definitions/base_info.Swagger500Resp"
}
},
"500": {
"description": "errCode为500 一般为服务器内部错误",
"schema": {
- "$ref": "#/definitions/base_info.GetBlackListResp"
+ "$ref": "#/definitions/base_info.Swagger400Resp"
}
}
}
@@ -538,19 +569,34 @@ const docTemplate = `{
"0": {
"description": "",
"schema": {
- "$ref": "#/definitions/base_info.GetFriendApplyListResp"
+ "allOf": [
+ {
+ "$ref": "#/definitions/base_info.GetFriendApplyListResp"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "data": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/server_api_params.FriendRequest"
+ }
+ }
+ }
+ }
+ ]
}
},
"400": {
"description": "errCode为400 一般为参数输入错误, token未带上等",
"schema": {
- "$ref": "#/definitions/base_info.GetFriendApplyListResp"
+ "$ref": "#/definitions/base_info.Swagger400Resp"
}
},
"500": {
"description": "errCode为500 一般为服务器内部错误",
"schema": {
- "$ref": "#/definitions/base_info.GetFriendApplyListResp"
+ "$ref": "#/definitions/base_info.Swagger400Resp"
}
}
}
@@ -592,19 +638,34 @@ const docTemplate = `{
"0": {
"description": "",
"schema": {
- "$ref": "#/definitions/base_info.GetFriendListResp"
+ "allOf": [
+ {
+ "$ref": "#/definitions/base_info.GetFriendListResp"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "data": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/server_api_params.FriendInfo"
+ }
+ }
+ }
+ }
+ ]
}
},
"400": {
"description": "errCode为400 一般为参数输入错误, token未带上等",
"schema": {
- "$ref": "#/definitions/base_info.GetFriendListResp"
+ "$ref": "#/definitions/base_info.Swagger400Resp"
}
},
"500": {
"description": "errCode为500 一般为服务器内部错误",
"schema": {
- "$ref": "#/definitions/base_info.GetFriendListResp"
+ "$ref": "#/definitions/base_info.Swagger500Resp"
}
}
}
@@ -646,19 +707,34 @@ const docTemplate = `{
"0": {
"description": "",
"schema": {
- "$ref": "#/definitions/base_info.GetSelfApplyListResp"
+ "allOf": [
+ {
+ "$ref": "#/definitions/base_info.GetSelfApplyListResp"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "data": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/server_api_params.FriendRequest"
+ }
+ }
+ }
+ }
+ ]
}
},
"400": {
"description": "errCode为400 一般为参数输入错误, token未带上等",
"schema": {
- "$ref": "#/definitions/base_info.GetSelfApplyListResp"
+ "$ref": "#/definitions/base_info.Swagger400Resp"
}
},
"500": {
"description": "errCode为500 一般为服务器内部错误",
"schema": {
- "$ref": "#/definitions/base_info.GetSelfApplyListResp"
+ "$ref": "#/definitions/base_info.Swagger500Resp"
}
}
}
@@ -687,7 +763,7 @@ const docTemplate = `{
"required": true
},
{
- "description": "fromUserID批量加好友的用户ID, friendUserIDList为",
+ "description": "fromUserID批量加好友的用户ID\u003cbr\u003e friendUserIDList为",
"name": "req",
"in": "body",
"required": true,
@@ -698,7 +774,7 @@ const docTemplate = `{
],
"responses": {
"0": {
- "description": "data列表中对象的result-1为添加该用户失败, 0为成功",
+ "description": "data列表中对象的result-1为添加该用户失败\u003cbr\u003e0为成功",
"schema": {
"$ref": "#/definitions/base_info.ImportFriendResp"
}
@@ -706,13 +782,13 @@ const docTemplate = `{
"400": {
"description": "errCode为400 一般为参数输入错误, token未带上等",
"schema": {
- "$ref": "#/definitions/base_info.ImportFriendResp"
+ "$ref": "#/definitions/base_info.Swagger400Resp"
}
},
"500": {
"description": "errCode为500 一般为服务器内部错误",
"schema": {
- "$ref": "#/definitions/base_info.ImportFriendResp"
+ "$ref": "#/definitions/base_info.Swagger500Resp"
}
}
}
@@ -741,7 +817,7 @@ const docTemplate = `{
"required": true
},
{
- "description": "fromUserID为请求用户, toUserID为要检查的用户",
+ "description": "fromUserID为请求用户\u003cbr\u003e toUserID为要检查的用户",
"name": "req",
"in": "body",
"required": true,
@@ -760,13 +836,13 @@ const docTemplate = `{
"400": {
"description": "errCode为400 一般为参数输入错误, token未带上等",
"schema": {
- "$ref": "#/definitions/base_info.IsFriendResp"
+ "$ref": "#/definitions/base_info.Swagger400Resp"
}
},
"500": {
"description": "errCode为500 一般为服务器内部错误",
"schema": {
- "$ref": "#/definitions/base_info.IsFriendResp"
+ "$ref": "#/definitions/base_info.Swagger500Resp"
}
}
}
@@ -814,13 +890,13 @@ const docTemplate = `{
"400": {
"description": "errCode为400 一般为参数输入错误, token未带上等",
"schema": {
- "$ref": "#/definitions/base_info.RemoveBlackListResp"
+ "$ref": "#/definitions/base_info.Swagger400Resp"
}
},
"500": {
"description": "errCode为500 一般为服务器内部错误",
"schema": {
- "$ref": "#/definitions/base_info.RemoveBlackListResp"
+ "$ref": "#/definitions/base_info.Swagger500Resp"
}
}
}
@@ -849,7 +925,7 @@ const docTemplate = `{
"required": true
},
{
- "description": "fromUserID为设置的用户, toUserID为被设置的用户, remark为好友备注",
+ "description": "fromUserID为设置的用户\u003cbr\u003e toUserID为被设置的用户\u003cbr\u003e remark为好友备注",
"name": "req",
"in": "body",
"required": true,
@@ -868,13 +944,13 @@ const docTemplate = `{
"400": {
"description": "errCode为400 一般为参数输入错误, token未带上等",
"schema": {
- "$ref": "#/definitions/base_info.SetFriendRemarkResp"
+ "$ref": "#/definitions/base_info.Swagger400Resp"
}
},
"500": {
"description": "errCode为500 一般为服务器内部错误",
"schema": {
- "$ref": "#/definitions/base_info.SetFriendRemarkResp"
+ "$ref": "#/definitions/base_info.Swagger500Resp"
}
}
}
@@ -922,13 +998,13 @@ const docTemplate = `{
"400": {
"description": "errCode为400 一般为参数输入错误, token未带上等",
"schema": {
- "$ref": "#/definitions/base_info.CancelMuteGroupResp"
+ "$ref": "#/definitions/base_info.Swagger400Resp"
}
},
"500": {
"description": "errCode为500 一般为服务器内部错误",
"schema": {
- "$ref": "#/definitions/base_info.CancelMuteGroupResp"
+ "$ref": "#/definitions/base_info.Swagger500Resp"
}
}
}
@@ -976,13 +1052,13 @@ const docTemplate = `{
"400": {
"description": "errCode为400 一般为参数输入错误, token未带上等",
"schema": {
- "$ref": "#/definitions/base_info.CancelMuteGroupMemberResp"
+ "$ref": "#/definitions/base_info.Swagger400Resp"
}
},
"500": {
"description": "errCode为500 一般为服务器内部错误",
"schema": {
- "$ref": "#/definitions/base_info.CancelMuteGroupMemberResp"
+ "$ref": "#/definitions/base_info.Swagger500Resp"
}
}
}
@@ -1011,7 +1087,7 @@ const docTemplate = `{
"required": true
},
{
- "description": "ownerUserID为群主ID \u003cbr\u003e ex为群扩展字段 \u003cbr\u003e roleLevel为群员角色,1为普通用户 2为群主 3为管理员",
+ "description": "groupType这里填0代表普通群 \u003cbr\u003egroupName为群名称\u003cbr\u003e introduction为群介绍\u003cbr\u003e notification为群公共\u003cbr\u003eownerUserID为群主ID \u003cbr\u003e ex为群扩展字段 \u003cbr\u003e memberList中对象roleLevel为群员角色,1为普通用户 2为群主 3为管理员",
"name": "req",
"in": "body",
"required": true,
@@ -1042,13 +1118,13 @@ const docTemplate = `{
"400": {
"description": "errCode为400 一般为参数输入错误, token未带上等",
"schema": {
- "$ref": "#/definitions/base_info.CreateGroupResp"
+ "$ref": "#/definitions/base_info.Swagger400Resp"
}
},
"500": {
"description": "errCode为500 一般为服务器内部错误",
"schema": {
- "$ref": "#/definitions/base_info.CreateGroupResp"
+ "$ref": "#/definitions/base_info.Swagger500Resp"
}
}
}
@@ -1096,13 +1172,13 @@ const docTemplate = `{
"400": {
"description": "errCode为400 一般为参数输入错误, token未带上等",
"schema": {
- "$ref": "#/definitions/base_info.DismissGroupResp"
+ "$ref": "#/definitions/base_info.Swagger400Resp"
}
},
"500": {
"description": "errCode为500 一般为服务器内部错误",
"schema": {
- "$ref": "#/definitions/base_info.DismissGroupResp"
+ "$ref": "#/definitions/base_info.Swagger500Resp"
}
}
}
@@ -1165,13 +1241,13 @@ const docTemplate = `{
"400": {
"description": "errCode为400 一般为参数输入错误, token未带上等",
"schema": {
- "$ref": "#/definitions/base_info.GetGroupAllMemberResp"
+ "$ref": "#/definitions/base_info.Swagger400Resp"
}
},
"500": {
"description": "errCode为500 一般为服务器内部错误",
"schema": {
- "$ref": "#/definitions/base_info.GetGroupAllMemberResp"
+ "$ref": "#/definitions/base_info.Swagger500Resp"
}
}
}
@@ -1200,7 +1276,7 @@ const docTemplate = `{
"required": true
},
{
- "description": "memberList为要获取群成员的群ID列表",
+ "description": "groupID为要获取的群ID \u003cbr\u003e memberList为要获取群成员的群ID列表",
"name": "req",
"in": "body",
"required": true,
@@ -1234,13 +1310,13 @@ const docTemplate = `{
"400": {
"description": "errCode为400 一般为参数输入错误, token未带上等",
"schema": {
- "$ref": "#/definitions/base_info.GetGroupMembersInfoResp"
+ "$ref": "#/definitions/base_info.Swagger400Resp"
}
},
"500": {
"description": "errCode为500 一般为服务器内部错误",
"schema": {
- "$ref": "#/definitions/base_info.GetGroupMembersInfoResp"
+ "$ref": "#/definitions/base_info.Swagger500Resp"
}
}
}
@@ -1288,13 +1364,13 @@ const docTemplate = `{
"400": {
"description": "errCode为400 一般为参数输入错误, token未带上等",
"schema": {
- "$ref": "#/definitions/base_info.GetGroupInfoResp"
+ "$ref": "#/definitions/base_info.Swagger400Resp"
}
},
"500": {
"description": "errCode为500 一般为服务器内部错误",
"schema": {
- "$ref": "#/definitions/base_info.GetGroupInfoResp"
+ "$ref": "#/definitions/base_info.Swagger500Resp"
}
}
}
@@ -1357,13 +1433,13 @@ const docTemplate = `{
"400": {
"description": "errCode为400 一般为参数输入错误, token未带上等",
"schema": {
- "$ref": "#/definitions/base_info.GetJoinedGroupListResp"
+ "$ref": "#/definitions/base_info.Swagger400Resp"
}
},
"500": {
"description": "errCode为500 一般为服务器内部错误",
"schema": {
- "$ref": "#/definitions/base_info.GetJoinedGroupListResp"
+ "$ref": "#/definitions/base_info.Swagger500Resp"
}
}
}
@@ -1405,19 +1481,34 @@ const docTemplate = `{
"0": {
"description": "",
"schema": {
- "$ref": "#/definitions/base_info.GetGroupApplicationListResp"
+ "allOf": [
+ {
+ "$ref": "#/definitions/base_info.GetGroupApplicationListResp"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "data": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/server_api_params.GroupRequest"
+ }
+ }
+ }
+ }
+ ]
}
},
"400": {
"description": "errCode为400 一般为参数输入错误, token未带上等",
"schema": {
- "$ref": "#/definitions/base_info.GetGroupApplicationListResp"
+ "$ref": "#/definitions/base_info.Swagger400Resp"
}
},
"500": {
"description": "errCode为500 一般为服务器内部错误",
"schema": {
- "$ref": "#/definitions/base_info.GetGroupApplicationListResp"
+ "$ref": "#/definitions/base_info.Swagger500Resp"
}
}
}
@@ -1459,19 +1550,34 @@ const docTemplate = `{
"0": {
"description": "",
"schema": {
- "$ref": "#/definitions/base_info.GetGroupApplicationListResp"
+ "allOf": [
+ {
+ "$ref": "#/definitions/base_info.GetGroupApplicationListResp"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "data": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/server_api_params.GroupRequest"
+ }
+ }
+ }
+ }
+ ]
}
},
"400": {
"description": "errCode为400 一般为参数输入错误, token未带上等",
"schema": {
- "$ref": "#/definitions/base_info.GetGroupApplicationListResp"
+ "$ref": "#/definitions/base_info.Swagger400Resp"
}
},
"500": {
"description": "errCode为500 一般为服务器内部错误",
"schema": {
- "$ref": "#/definitions/base_info.GetGroupApplicationListResp"
+ "$ref": "#/definitions/base_info.Swagger500Resp"
}
}
}
@@ -1519,13 +1625,13 @@ const docTemplate = `{
"400": {
"description": "errCode为400 一般为参数输入错误, token未带上等",
"schema": {
- "$ref": "#/definitions/base_info.ApplicationGroupResponseResp"
+ "$ref": "#/definitions/base_info.Swagger400Resp"
}
},
"500": {
"description": "errCode为500 一般为服务器内部错误",
"schema": {
- "$ref": "#/definitions/base_info.ApplicationGroupResponseResp"
+ "$ref": "#/definitions/base_info.Swagger500Resp"
}
}
}
@@ -1573,13 +1679,13 @@ const docTemplate = `{
"400": {
"description": "errCode为400 一般为参数输入错误, token未带上等",
"schema": {
- "$ref": "#/definitions/base_info.InviteUserToGroupResp"
+ "$ref": "#/definitions/base_info.Swagger400Resp"
}
},
"500": {
"description": "errCode为500 一般为服务器内部错误",
"schema": {
- "$ref": "#/definitions/base_info.InviteUserToGroupResp"
+ "$ref": "#/definitions/base_info.Swagger500Resp"
}
}
}
@@ -1608,7 +1714,7 @@ const docTemplate = `{
"required": true
},
{
- "description": "reqMessage为申请进群信息",
+ "description": "reqMessage为申请进群信息\u003cbr\u003egroupID为申请的群ID",
"name": "req",
"in": "body",
"required": true,
@@ -1627,13 +1733,13 @@ const docTemplate = `{
"400": {
"description": "errCode为400 一般为参数输入错误, token未带上等",
"schema": {
- "$ref": "#/definitions/base_info.JoinGroupResp"
+ "$ref": "#/definitions/base_info.Swagger400Resp"
}
},
"500": {
"description": "errCode为500 一般为服务器内部错误",
"schema": {
- "$ref": "#/definitions/base_info.JoinGroupResp"
+ "$ref": "#/definitions/base_info.Swagger500Resp"
}
}
}
@@ -1681,13 +1787,13 @@ const docTemplate = `{
"400": {
"description": "errCode为400 一般为参数输入错误, token未带上等",
"schema": {
- "$ref": "#/definitions/base_info.KickGroupMemberResp"
+ "$ref": "#/definitions/base_info.Swagger400Resp"
}
},
"500": {
"description": "errCode为500 一般为服务器内部错误",
"schema": {
- "$ref": "#/definitions/base_info.KickGroupMemberResp"
+ "$ref": "#/definitions/base_info.Swagger500Resp"
}
}
}
@@ -1789,13 +1895,13 @@ const docTemplate = `{
"400": {
"description": "errCode为400 一般为参数输入错误, token未带上等",
"schema": {
- "$ref": "#/definitions/base_info.DismissGroupResp"
+ "$ref": "#/definitions/base_info.Swagger400Resp"
}
},
"500": {
"description": "errCode为500 一般为服务器内部错误",
"schema": {
- "$ref": "#/definitions/base_info.DismissGroupResp"
+ "$ref": "#/definitions/base_info.Swagger500Resp"
}
}
}
@@ -1803,7 +1909,7 @@ const docTemplate = `{
},
"/group/quit_group": {
"post": {
- "description": "退出群聊",
+ "description": "当前用户退出群聊",
"consumes": [
"application/json"
],
@@ -1813,7 +1919,7 @@ const docTemplate = `{
"tags": [
"群组相关"
],
- "summary": "退出群聊",
+ "summary": "当前用户退出群聊",
"operationId": "QuitGroup",
"parameters": [
{
@@ -1843,13 +1949,13 @@ const docTemplate = `{
"400": {
"description": "errCode为400 一般为参数输入错误, token未带上等",
"schema": {
- "$ref": "#/definitions/base_info.QuitGroupResp"
+ "$ref": "#/definitions/base_info.Swagger400Resp"
}
},
"500": {
"description": "errCode为500 一般为服务器内部错误",
"schema": {
- "$ref": "#/definitions/base_info.QuitGroupResp"
+ "$ref": "#/definitions/base_info.Swagger500Resp"
}
}
}
@@ -1878,7 +1984,7 @@ const docTemplate = `{
"required": true
},
{
- "description": "notification为群介绍 \u003cbr\u003e introduction为群公告 \u003cbr\u003e needVerification为加群验证 0为申请需要同意 邀请直接进 1为所有人进群需要验证,除了群主管理员邀请进群 2为直接进群",
+ "description": "groupID为要修改的群ID\u003cbr\u003egroupName为新的群名称\u003cbr\u003enotification为群介绍 \u003cbr\u003e introduction为群公告 \u003cbr\u003e needVerification为加群验证 0为申请需要同意 邀请直接进 1为所有人进群需要验证,除了群主管理员邀请进群 2为直接进群",
"name": "req",
"in": "body",
"required": true,
@@ -1897,13 +2003,13 @@ const docTemplate = `{
"400": {
"description": "errCode为400 一般为参数输入错误, token未带上等",
"schema": {
- "$ref": "#/definitions/base_info.SetGroupInfoResp"
+ "$ref": "#/definitions/base_info.Swagger400Resp"
}
},
"500": {
"description": "errCode为500 一般为服务器内部错误",
"schema": {
- "$ref": "#/definitions/base_info.SetGroupInfoResp"
+ "$ref": "#/definitions/base_info.Swagger500Resp"
}
}
}
@@ -1932,7 +2038,7 @@ const docTemplate = `{
"required": true
},
{
- "description": "除了operationID, userID, groupID其他参数可选",
+ "description": "除了operationID, userID, groupID其他参数可选\u003cbr\u003eex为拓展字段\u003cbr\u003efaceURL为群头像\u003cbr\u003enickName为群昵称\u003cbr\u003eroleLevel为群员角色,1为普通用户 2为群主 3为管理员",
"name": "req",
"in": "body",
"required": true,
@@ -1951,13 +2057,13 @@ const docTemplate = `{
"400": {
"description": "errCode为400 一般为参数输入错误, token未带上等",
"schema": {
- "$ref": "#/definitions/base_info.SetGroupMemberInfoResp"
+ "$ref": "#/definitions/base_info.Swagger400Resp"
}
},
"500": {
"description": "errCode为500 一般为服务器内部错误",
"schema": {
- "$ref": "#/definitions/base_info.SetGroupMemberInfoResp"
+ "$ref": "#/definitions/base_info.Swagger500Resp"
}
}
}
@@ -2005,13 +2111,100 @@ const docTemplate = `{
"400": {
"description": "errCode为400 一般为参数输入错误, token未带上等",
"schema": {
- "$ref": "#/definitions/base_info.TransferGroupOwnerResp"
+ "$ref": "#/definitions/base_info.Swagger400Resp"
}
},
"500": {
"description": "errCode为500 一般为服务器内部错误",
"schema": {
- "$ref": "#/definitions/base_info.TransferGroupOwnerResp"
+ "$ref": "#/definitions/base_info.Swagger500Resp"
+ }
+ }
+ }
+ }
+ },
+ "/msg/batch_send_msg": {
+ "post": {
+ "description": "管理员批量发送群聊单聊消息 消息格式详细见\u003ca href=\"https://doc.rentsoft.cn/#/server_doc/admin?id=%e6%b6%88%e6%81%af%e7%b1%bb%e5%9e%8b%e6%a0%bc%e5%bc%8f%e6%8f%8f%e8%bf%b0\"\u003e消息格式\u003c/href\u003e",
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "消息相关"
+ ],
+ "summary": "管理员批量发送群聊单聊消息",
+ "operationId": "ManagementBatchSendMsg",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "im token",
+ "name": "token",
+ "in": "header",
+ "required": true
+ },
+ {
+ "description": "该请求和消息结构体一样 \u003cbr\u003e recvIDList为接受消息的用户ID列表",
+ "name": "管理员批量发送单聊消息",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "allOf": [
+ {
+ "$ref": "#/definitions/base_info.ManagementBatchSendMsgReq"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "content": {
+ "$ref": "#/definitions/Open_IM_internal_api_manage.TextElem"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "description": "该请求和消息结构体一样 \u003cbr\u003e recvIDList为接受消息的用户ID列表",
+ "name": "管理员批量发送OA通知",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "allOf": [
+ {
+ "$ref": "#/definitions/base_info.ManagementSendMsgReq"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "content": {
+ "$ref": "#/definitions/Open_IM_internal_api_manage.OANotificationElem"
+ }
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "responses": {
+ "0": {
+ "description": "serverMsgID为服务器消息ID \u003cbr\u003e clientMsgID为客户端消息ID \u003cbr\u003e sendTime为发送消息时间",
+ "schema": {
+ "$ref": "#/definitions/base_info.ManagementBatchSendMsgReq"
+ }
+ },
+ "400": {
+ "description": "errCode为400 一般为参数输入错误, token未带上等",
+ "schema": {
+ "$ref": "#/definitions/base_info.ManagementBatchSendMsgReq"
+ }
+ },
+ "500": {
+ "description": "errCode为500 一般为服务器内部错误",
+ "schema": {
+ "$ref": "#/definitions/base_info.ManagementBatchSendMsgReq"
}
}
}
@@ -2059,13 +2252,13 @@ const docTemplate = `{
"400": {
"description": "errCode为400 一般为参数输入错误, token未带上等",
"schema": {
- "$ref": "#/definitions/base_info.CleanUpMsgResp"
+ "$ref": "#/definitions/base_info.Swagger400Resp"
}
},
"500": {
"description": "errCode为500 一般为服务器内部错误",
"schema": {
- "$ref": "#/definitions/base_info.CleanUpMsgResp"
+ "$ref": "#/definitions/base_info.Swagger500Resp"
}
}
}
@@ -2113,13 +2306,283 @@ const docTemplate = `{
"400": {
"description": "errCode为400 一般为参数输入错误, token未带上等",
"schema": {
- "$ref": "#/definitions/base_info.DelMsgResp"
+ "$ref": "#/definitions/base_info.Swagger400Resp"
}
},
"500": {
"description": "errCode为500 一般为服务器内部错误",
"schema": {
- "$ref": "#/definitions/base_info.DelMsgResp"
+ "$ref": "#/definitions/base_info.Swagger500Resp"
+ }
+ }
+ }
+ }
+ },
+ "/msg/get_all_conversations": {
+ "post": {
+ "description": "获取用户所有会话",
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "会话相关"
+ ],
+ "summary": "获取用户所有会话",
+ "operationId": "GetAllConversations",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "im token",
+ "name": "token",
+ "in": "header",
+ "required": true
+ },
+ {
+ "description": "ownerUserID为要获取的用户ID",
+ "name": "req",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/base_info.GetAllConversationsReq"
+ }
+ }
+ ],
+ "responses": {
+ "0": {
+ "description": "",
+ "schema": {
+ "$ref": "#/definitions/base_info.GetAllConversationsResp"
+ }
+ },
+ "400": {
+ "description": "errCode为400 一般为参数输入错误, token未带上等",
+ "schema": {
+ "$ref": "#/definitions/base_info.GetAllConversationsResp"
+ }
+ },
+ "500": {
+ "description": "errCode为500 一般为服务器内部错误",
+ "schema": {
+ "$ref": "#/definitions/base_info.GetAllConversationsResp"
+ }
+ }
+ }
+ }
+ },
+ "/msg/get_conversation": {
+ "post": {
+ "description": "根据会话ID获取会话",
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "会话相关"
+ ],
+ "summary": "根据会话ID获取会话",
+ "operationId": "GetConversation",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "im token",
+ "name": "token",
+ "in": "header",
+ "required": true
+ },
+ {
+ "description": "ownerUserID为要获取的用户ID\u003cbr\u003econversationID为要获取的会话ID",
+ "name": "req",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/base_info.GetConversationReq"
+ }
+ }
+ ],
+ "responses": {
+ "0": {
+ "description": "",
+ "schema": {
+ "$ref": "#/definitions/base_info.GetConversationResp"
+ }
+ },
+ "400": {
+ "description": "errCode为400 一般为参数输入错误, token未带上等",
+ "schema": {
+ "$ref": "#/definitions/base_info.GetConversationResp"
+ }
+ },
+ "500": {
+ "description": "errCode为500 一般为服务器内部错误",
+ "schema": {
+ "$ref": "#/definitions/base_info.GetConversationResp"
+ }
+ }
+ }
+ }
+ },
+ "/msg/get_conversations": {
+ "post": {
+ "description": "根据会话ID列表获取会话",
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "会话相关"
+ ],
+ "summary": "根据会话ID列表获取会话",
+ "operationId": "GetConversations",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "im token",
+ "name": "token",
+ "in": "header",
+ "required": true
+ },
+ {
+ "description": "ownerUserID为要获取的用户ID\u003cbr\u003econversationIDs为要获取的会话ID列表",
+ "name": "req",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/base_info.GetConversationsReq"
+ }
+ }
+ ],
+ "responses": {
+ "0": {
+ "description": "",
+ "schema": {
+ "$ref": "#/definitions/base_info.GetConversationsResp"
+ }
+ },
+ "400": {
+ "description": "errCode为400 一般为参数输入错误, token未带上等",
+ "schema": {
+ "$ref": "#/definitions/base_info.GetConversationsResp"
+ }
+ },
+ "500": {
+ "description": "errCode为500 一般为服务器内部错误",
+ "schema": {
+ "$ref": "#/definitions/base_info.GetConversationsResp"
+ }
+ }
+ }
+ }
+ },
+ "/msg/manage_send_msg": {
+ "post": {
+ "description": "管理员发送/撤回消息 消息格式详细见\u003ca href=\"https://doc.rentsoft.cn/#/server_doc/admin?id=%e6%b6%88%e6%81%af%e7%b1%bb%e5%9e%8b%e6%a0%bc%e5%bc%8f%e6%8f%8f%e8%bf%b0\"\u003e消息格式\u003c/href\u003e",
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "消息相关"
+ ],
+ "summary": "管理员发送/撤回消息",
+ "operationId": "ManagementSendMsg",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "im token",
+ "name": "token",
+ "in": "header",
+ "required": true
+ },
+ {
+ "description": "该请求和消息结构体一样",
+ "name": "管理员发送文字消息",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "allOf": [
+ {
+ "$ref": "#/definitions/base_info.ManagementSendMsgReq"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "content": {
+ "$ref": "#/definitions/Open_IM_internal_api_manage.TextElem"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "description": "该请求和消息结构体一样",
+ "name": "管理员发送OA通知消息",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "allOf": [
+ {
+ "$ref": "#/definitions/base_info.ManagementSendMsgReq"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "content": {
+ "$ref": "#/definitions/Open_IM_internal_api_manage.OANotificationElem"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "description": "该请求和消息结构体一样",
+ "name": "管理员撤回单聊消息",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "allOf": [
+ {
+ "$ref": "#/definitions/base_info.ManagementSendMsgReq"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "content": {
+ "$ref": "#/definitions/Open_IM_internal_api_manage.RevokeElem"
+ }
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "responses": {
+ "0": {
+ "description": "serverMsgID为服务器消息ID \u003cbr\u003e clientMsgID为客户端消息ID \u003cbr\u003e sendTime为发送消息时间",
+ "schema": {
+ "$ref": "#/definitions/base_info.ManagementSendMsgResp"
+ }
+ },
+ "400": {
+ "description": "errCode为400 一般为参数输入错误, token未带上等",
+ "schema": {
+ "$ref": "#/definitions/base_info.ManagementSendMsgResp"
+ }
+ },
+ "500": {
+ "description": "errCode为500 一般为服务器内部错误",
+ "schema": {
+ "$ref": "#/definitions/base_info.ManagementSendMsgResp"
}
}
}
@@ -2935,6 +3398,690 @@ const docTemplate = `{
}
}
},
+ "/organization/create_department": {
+ "post": {
+ "description": "创建部门",
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "组织架构相关"
+ ],
+ "summary": "创建部门",
+ "operationId": "CreateDepartment",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "im token",
+ "name": "token",
+ "in": "header",
+ "required": true
+ },
+ {
+ "description": "请求",
+ "name": "req",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/base_info.CreateDepartmentReq"
+ }
+ }
+ ],
+ "responses": {
+ "0": {
+ "description": "",
+ "schema": {
+ "allOf": [
+ {
+ "$ref": "#/definitions/base_info.CreateDepartmentResp"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "data": {
+ "$ref": "#/definitions/server_api_params.Department"
+ }
+ }
+ }
+ ]
+ }
+ },
+ "400": {
+ "description": "errCode为400 一般为参数输入错误, token未带上等",
+ "schema": {
+ "$ref": "#/definitions/base_info.CreateDepartmentResp"
+ }
+ },
+ "500": {
+ "description": "errCode为500 一般为服务器内部错误",
+ "schema": {
+ "$ref": "#/definitions/base_info.CreateDepartmentResp"
+ }
+ }
+ }
+ }
+ },
+ "/organization/create_department_member": {
+ "post": {
+ "description": "创建部门用户",
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "组织架构相关"
+ ],
+ "summary": "创建部门用户",
+ "operationId": "CreateDepartmentMember",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "im token",
+ "name": "token",
+ "in": "header",
+ "required": true
+ },
+ {
+ "description": "请求",
+ "name": "req",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/base_info.CreateDepartmentMemberReq"
+ }
+ }
+ ],
+ "responses": {
+ "0": {
+ "description": "",
+ "schema": {
+ "$ref": "#/definitions/base_info.CreateDepartmentMemberResp"
+ }
+ },
+ "400": {
+ "description": "errCode为400 一般为参数输入错误, token未带上等",
+ "schema": {
+ "$ref": "#/definitions/base_info.CreateDepartmentMemberResp"
+ }
+ },
+ "500": {
+ "description": "errCode为500 一般为服务器内部错误",
+ "schema": {
+ "$ref": "#/definitions/base_info.CreateDepartmentMemberResp"
+ }
+ }
+ }
+ }
+ },
+ "/organization/create_organization_user": {
+ "post": {
+ "description": "组织架构导入用户",
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "组织架构相关"
+ ],
+ "summary": "组织架构导入用户",
+ "operationId": "CreateOrganizationUser",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "im token",
+ "name": "token",
+ "in": "header",
+ "required": true
+ },
+ {
+ "description": "请求",
+ "name": "req",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/base_info.CreateOrganizationUserReq"
+ }
+ }
+ ],
+ "responses": {
+ "0": {
+ "description": "",
+ "schema": {
+ "$ref": "#/definitions/base_info.CreateOrganizationUserResp"
+ }
+ },
+ "400": {
+ "description": "errCode为400 一般为参数输入错误, token未带上等",
+ "schema": {
+ "$ref": "#/definitions/base_info.CreateOrganizationUserResp"
+ }
+ },
+ "500": {
+ "description": "errCode为500 一般为服务器内部错误",
+ "schema": {
+ "$ref": "#/definitions/base_info.CreateOrganizationUserResp"
+ }
+ }
+ }
+ }
+ },
+ "/organization/delete_department": {
+ "post": {
+ "description": "删除部门",
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "组织架构相关"
+ ],
+ "summary": "删除部门",
+ "operationId": "DeleteDepartment",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "im token",
+ "name": "token",
+ "in": "header",
+ "required": true
+ },
+ {
+ "description": "请求",
+ "name": "req",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/base_info.DeleteDepartmentReq"
+ }
+ }
+ ],
+ "responses": {
+ "0": {
+ "description": "",
+ "schema": {
+ "$ref": "#/definitions/base_info.DeleteDepartmentResp"
+ }
+ },
+ "400": {
+ "description": "errCode为400 一般为参数输入错误, token未带上等",
+ "schema": {
+ "$ref": "#/definitions/base_info.DeleteDepartmentResp"
+ }
+ },
+ "500": {
+ "description": "errCode为500 一般为服务器内部错误",
+ "schema": {
+ "$ref": "#/definitions/base_info.DeleteDepartmentResp"
+ }
+ }
+ }
+ }
+ },
+ "/organization/delete_organization_user": {
+ "post": {
+ "description": "删除组织架构中某个用户",
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "组织架构相关"
+ ],
+ "summary": "删除组织架构中某个用户",
+ "operationId": "DeleteOrganizationUser",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "im token",
+ "name": "token",
+ "in": "header",
+ "required": true
+ },
+ {
+ "description": "请求",
+ "name": "req",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/base_info.DeleteOrganizationUserReq"
+ }
+ }
+ ],
+ "responses": {
+ "0": {
+ "description": "",
+ "schema": {
+ "$ref": "#/definitions/base_info.DeleteOrganizationUserResp"
+ }
+ },
+ "400": {
+ "description": "errCode为400 一般为参数输入错误, token未带上等",
+ "schema": {
+ "$ref": "#/definitions/base_info.DeleteOrganizationUserResp"
+ }
+ },
+ "500": {
+ "description": "errCode为500 一般为服务器内部错误",
+ "schema": {
+ "$ref": "#/definitions/base_info.DeleteOrganizationUserResp"
+ }
+ }
+ }
+ }
+ },
+ "/organization/delete_user_in_department": {
+ "post": {
+ "description": "删除部门中某个用户",
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "组织架构相关"
+ ],
+ "summary": "删除部门中某个用户",
+ "operationId": "DeleteUserInDepartment",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "im token",
+ "name": "token",
+ "in": "header",
+ "required": true
+ },
+ {
+ "description": "请求",
+ "name": "req",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/base_info.DeleteUserInDepartmentReq"
+ }
+ }
+ ],
+ "responses": {
+ "0": {
+ "description": "",
+ "schema": {
+ "$ref": "#/definitions/base_info.DeleteUserInDepartmentResp"
+ }
+ },
+ "400": {
+ "description": "errCode为400 一般为参数输入错误, token未带上等",
+ "schema": {
+ "$ref": "#/definitions/base_info.DeleteUserInDepartmentResp"
+ }
+ },
+ "500": {
+ "description": "errCode为500 一般为服务器内部错误",
+ "schema": {
+ "$ref": "#/definitions/base_info.DeleteUserInDepartmentResp"
+ }
+ }
+ }
+ }
+ },
+ "/organization/get_department_member": {
+ "post": {
+ "description": "获取部门中所有成员",
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "组织架构相关"
+ ],
+ "summary": "获取部门中所有成员",
+ "operationId": "GetDepartmentMember",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "im token",
+ "name": "token",
+ "in": "header",
+ "required": true
+ },
+ {
+ "description": "请求",
+ "name": "req",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/base_info.GetDepartmentMemberReq"
+ }
+ }
+ ],
+ "responses": {
+ "0": {
+ "description": "",
+ "schema": {
+ "allOf": [
+ {
+ "$ref": "#/definitions/base_info.GetDepartmentMemberResp"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "data": {
+ "$ref": "#/definitions/server_api_params.UserDepartmentMember"
+ }
+ }
+ }
+ ]
+ }
+ },
+ "400": {
+ "description": "errCode为400 一般为参数输入错误, token未带上等",
+ "schema": {
+ "$ref": "#/definitions/base_info.GetDepartmentMemberResp"
+ }
+ },
+ "500": {
+ "description": "errCode为500 一般为服务器内部错误",
+ "schema": {
+ "$ref": "#/definitions/base_info.GetDepartmentMemberResp"
+ }
+ }
+ }
+ }
+ },
+ "/organization/get_sub_department": {
+ "post": {
+ "description": "获取子部门列表",
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "组织架构相关"
+ ],
+ "summary": "获取子部门列表",
+ "operationId": "GetSubDepartment",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "im token",
+ "name": "token",
+ "in": "header",
+ "required": true
+ },
+ {
+ "description": "请求",
+ "name": "req",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/base_info.GetSubDepartmentReq"
+ }
+ }
+ ],
+ "responses": {
+ "0": {
+ "description": "",
+ "schema": {
+ "$ref": "#/definitions/base_info.GetSubDepartmentResp"
+ }
+ },
+ "400": {
+ "description": "errCode为400 一般为参数输入错误, token未带上等",
+ "schema": {
+ "$ref": "#/definitions/base_info.GetSubDepartmentResp"
+ }
+ },
+ "500": {
+ "description": "errCode为500 一般为服务器内部错误",
+ "schema": {
+ "$ref": "#/definitions/base_info.GetSubDepartmentResp"
+ }
+ }
+ }
+ }
+ },
+ "/organization/get_user_in_department": {
+ "post": {
+ "description": "获取部门中的所有用户",
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "组织架构相关"
+ ],
+ "summary": "获取部门中的所有用户",
+ "operationId": "GetUserInDepartment",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "im token",
+ "name": "token",
+ "in": "header",
+ "required": true
+ },
+ {
+ "description": "请求",
+ "name": "req",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/base_info.GetUserInDepartmentReq"
+ }
+ }
+ ],
+ "responses": {
+ "0": {
+ "description": "",
+ "schema": {
+ "allOf": [
+ {
+ "$ref": "#/definitions/base_info.GetUserInDepartmentResp"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "data": {
+ "$ref": "#/definitions/server_api_params.UserInDepartment"
+ }
+ }
+ }
+ ]
+ }
+ },
+ "400": {
+ "description": "errCode为400 一般为参数输入错误, token未带上等",
+ "schema": {
+ "$ref": "#/definitions/base_info.GetUserInDepartmentResp"
+ }
+ },
+ "500": {
+ "description": "errCode为500 一般为服务器内部错误",
+ "schema": {
+ "$ref": "#/definitions/base_info.GetUserInDepartmentResp"
+ }
+ }
+ }
+ }
+ },
+ "/organization/update_department": {
+ "post": {
+ "description": "更新部门信息",
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "组织架构相关"
+ ],
+ "summary": "更新部门信息",
+ "operationId": "UpdateDepartment",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "im token",
+ "name": "token",
+ "in": "header",
+ "required": true
+ },
+ {
+ "description": "请求",
+ "name": "req",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/base_info.UpdateDepartmentReq"
+ }
+ }
+ ],
+ "responses": {
+ "0": {
+ "description": "",
+ "schema": {
+ "$ref": "#/definitions/base_info.UpdateDepartmentResp"
+ }
+ },
+ "400": {
+ "description": "errCode为400 一般为参数输入错误, token未带上等",
+ "schema": {
+ "$ref": "#/definitions/base_info.UpdateDepartmentResp"
+ }
+ },
+ "500": {
+ "description": "errCode为500 一般为服务器内部错误",
+ "schema": {
+ "$ref": "#/definitions/base_info.UpdateDepartmentResp"
+ }
+ }
+ }
+ }
+ },
+ "/organization/update_organization_user": {
+ "post": {
+ "description": "更新组织架构中的用户",
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "组织架构相关"
+ ],
+ "summary": "更新组织架构中的用户",
+ "operationId": "UpdateOrganizationUser",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "im token",
+ "name": "token",
+ "in": "header",
+ "required": true
+ },
+ {
+ "description": "请求",
+ "name": "req",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/base_info.UpdateOrganizationUserReq"
+ }
+ }
+ ],
+ "responses": {
+ "0": {
+ "description": "",
+ "schema": {
+ "$ref": "#/definitions/base_info.UpdateOrganizationUserResp"
+ }
+ },
+ "400": {
+ "description": "errCode为400 一般为参数输入错误, token未带上等",
+ "schema": {
+ "$ref": "#/definitions/base_info.UpdateOrganizationUserResp"
+ }
+ },
+ "500": {
+ "description": "errCode为500 一般为服务器内部错误",
+ "schema": {
+ "$ref": "#/definitions/base_info.UpdateOrganizationUserResp"
+ }
+ }
+ }
+ }
+ },
+ "/organization/update_user_in_department": {
+ "post": {
+ "description": "更新部门中某个用户",
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "组织架构相关"
+ ],
+ "summary": "更新部门中某个用户",
+ "operationId": "UpdateUserInDepartment",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "im token",
+ "name": "token",
+ "in": "header",
+ "required": true
+ },
+ {
+ "description": "请求",
+ "name": "req",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/base_info.UpdateUserInDepartmentReq"
+ }
+ }
+ ],
+ "responses": {
+ "0": {
+ "description": "",
+ "schema": {
+ "$ref": "#/definitions/base_info.UpdateUserInDepartmentResp"
+ }
+ },
+ "400": {
+ "description": "errCode为400 一般为参数输入错误, token未带上等",
+ "schema": {
+ "$ref": "#/definitions/base_info.UpdateUserInDepartmentResp"
+ }
+ },
+ "500": {
+ "description": "errCode为500 一般为服务器内部错误",
+ "schema": {
+ "$ref": "#/definitions/base_info.UpdateUserInDepartmentResp"
+ }
+ }
+ }
+ }
+ },
"/third/minio_upload": {
"post": {
"description": "minio上传文件(web api), 请注意本api请求为form并非json",
@@ -2989,13 +4136,13 @@ const docTemplate = `{
"400": {
"description": "errCode为400 一般为参数输入错误, token未带上等",
"schema": {
- "$ref": "#/definitions/base_info.MinioUploadFileResp"
+ "$ref": "#/definitions/base_info.Swagger400Resp"
}
},
"500": {
"description": "errCode为500 一般为服务器内部错误",
"schema": {
- "$ref": "#/definitions/base_info.MinioUploadFileResp"
+ "$ref": "#/definitions/base_info.Swagger500Resp"
}
}
}
@@ -3163,13 +4310,13 @@ const docTemplate = `{
"400": {
"description": "errCode为400 一般为参数输入错误, token未带上等",
"schema": {
- "$ref": "#/definitions/base_info.GetSelfUserInfoResp"
+ "$ref": "#/definitions/base_info.Swagger400Resp"
}
},
"500": {
"description": "errCode为500 一般为服务器内部错误",
"schema": {
- "$ref": "#/definitions/base_info.GetSelfUserInfoResp"
+ "$ref": "#/definitions/base_info.Swagger500Resp"
}
}
}
@@ -3211,19 +4358,34 @@ const docTemplate = `{
"0": {
"description": "",
"schema": {
- "$ref": "#/definitions/base_info.GetUsersInfoResp"
+ "allOf": [
+ {
+ "$ref": "#/definitions/base_info.GetUsersInfoResp"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "Data": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/server_api_params.PublicUserInfo"
+ }
+ }
+ }
+ }
+ ]
}
},
"400": {
"description": "errCode为400 一般为参数输入错误, token未带上等",
"schema": {
- "$ref": "#/definitions/base_info.GetUsersInfoResp"
+ "$ref": "#/definitions/base_info.Swagger400Resp"
}
},
"500": {
"description": "errCode为500 一般为服务器内部错误",
"schema": {
- "$ref": "#/definitions/base_info.GetUsersInfoResp"
+ "$ref": "#/definitions/base_info.Swagger500Resp"
}
}
}
@@ -3271,13 +4433,13 @@ const docTemplate = `{
"400": {
"description": "errCode为400 一般为参数输入错误, token未带上等",
"schema": {
- "$ref": "#/definitions/base_info.GetUsersOnlineStatusResp"
+ "$ref": "#/definitions/base_info.Swagger400Resp"
}
},
"500": {
"description": "errCode为500 一般为服务器内部错误",
"schema": {
- "$ref": "#/definitions/base_info.GetUsersOnlineStatusResp"
+ "$ref": "#/definitions/base_info.Swagger500Resp"
}
}
}
@@ -3306,7 +4468,7 @@ const docTemplate = `{
"required": true
},
{
- "description": "请求体",
+ "description": "globalRecvMsgOpt为全局免打扰设置0为关闭 1为开启",
"name": "req",
"in": "body",
"required": true,
@@ -3325,13 +4487,13 @@ const docTemplate = `{
"400": {
"description": "errCode为400 一般为参数输入错误, token未带上等",
"schema": {
- "$ref": "#/definitions/base_info.SetGlobalRecvMessageOptResp"
+ "$ref": "#/definitions/base_info.Swagger400Resp"
}
},
"500": {
"description": "errCode为500 一般为服务器内部错误",
"schema": {
- "$ref": "#/definitions/base_info.SetGlobalRecvMessageOptResp"
+ "$ref": "#/definitions/base_info.Swagger500Resp"
}
}
}
@@ -3379,13 +4541,13 @@ const docTemplate = `{
"400": {
"description": "errCode为400 一般为参数输入错误, token未带上等",
"schema": {
- "$ref": "#/definitions/base_info.UpdateUserInfoResp"
+ "$ref": "#/definitions/base_info.Swagger400Resp"
}
},
"500": {
"description": "errCode为500 一般为服务器内部错误",
"schema": {
- "$ref": "#/definitions/base_info.UpdateUserInfoResp"
+ "$ref": "#/definitions/base_info.Swagger500Resp"
}
}
}
@@ -3393,6 +4555,193 @@ const docTemplate = `{
}
},
"definitions": {
+ "Open_IM_internal_api_manage.FileElem": {
+ "type": "object",
+ "properties": {
+ "fileName": {
+ "type": "string"
+ },
+ "filePath": {
+ "type": "string"
+ },
+ "fileSize": {
+ "type": "integer"
+ },
+ "sourceURL": {
+ "type": "string"
+ },
+ "uuid": {
+ "type": "string"
+ }
+ }
+ },
+ "Open_IM_internal_api_manage.OANotificationElem": {
+ "type": "object",
+ "required": [
+ "notificationFaceURL",
+ "notificationName",
+ "notificationType",
+ "text"
+ ],
+ "properties": {
+ "ex": {
+ "type": "string"
+ },
+ "fileElem": {
+ "$ref": "#/definitions/Open_IM_internal_api_manage.FileElem"
+ },
+ "mixType": {
+ "type": "integer"
+ },
+ "notificationFaceURL": {
+ "type": "string"
+ },
+ "notificationName": {
+ "type": "string"
+ },
+ "notificationType": {
+ "type": "integer"
+ },
+ "pictureElem": {
+ "$ref": "#/definitions/Open_IM_internal_api_manage.PictureElem"
+ },
+ "soundElem": {
+ "$ref": "#/definitions/Open_IM_internal_api_manage.SoundElem"
+ },
+ "text": {
+ "type": "string"
+ },
+ "url": {
+ "type": "string"
+ },
+ "videoElem": {
+ "$ref": "#/definitions/Open_IM_internal_api_manage.VideoElem"
+ }
+ }
+ },
+ "Open_IM_internal_api_manage.PictureBaseInfo": {
+ "type": "object",
+ "properties": {
+ "height": {
+ "type": "integer"
+ },
+ "size": {
+ "type": "integer"
+ },
+ "type": {
+ "type": "string"
+ },
+ "url": {
+ "type": "string"
+ },
+ "uuid": {
+ "type": "string"
+ },
+ "width": {
+ "type": "integer"
+ }
+ }
+ },
+ "Open_IM_internal_api_manage.PictureElem": {
+ "type": "object",
+ "properties": {
+ "bigPicture": {
+ "$ref": "#/definitions/Open_IM_internal_api_manage.PictureBaseInfo"
+ },
+ "snapshotPicture": {
+ "$ref": "#/definitions/Open_IM_internal_api_manage.PictureBaseInfo"
+ },
+ "sourcePath": {
+ "type": "string"
+ },
+ "sourcePicture": {
+ "$ref": "#/definitions/Open_IM_internal_api_manage.PictureBaseInfo"
+ }
+ }
+ },
+ "Open_IM_internal_api_manage.RevokeElem": {
+ "type": "object",
+ "required": [
+ "revokeMsgClientID"
+ ],
+ "properties": {
+ "revokeMsgClientID": {
+ "type": "string"
+ }
+ }
+ },
+ "Open_IM_internal_api_manage.SoundElem": {
+ "type": "object",
+ "properties": {
+ "dataSize": {
+ "type": "integer"
+ },
+ "duration": {
+ "type": "integer"
+ },
+ "soundPath": {
+ "type": "string"
+ },
+ "sourceURL": {
+ "type": "string"
+ },
+ "uuid": {
+ "type": "string"
+ }
+ }
+ },
+ "Open_IM_internal_api_manage.TextElem": {
+ "type": "object",
+ "required": [
+ "text"
+ ],
+ "properties": {
+ "text": {
+ "type": "string"
+ }
+ }
+ },
+ "Open_IM_internal_api_manage.VideoElem": {
+ "type": "object",
+ "properties": {
+ "duration": {
+ "type": "integer"
+ },
+ "snapshotHeight": {
+ "type": "integer"
+ },
+ "snapshotPath": {
+ "type": "string"
+ },
+ "snapshotSize": {
+ "type": "integer"
+ },
+ "snapshotURL": {
+ "type": "string"
+ },
+ "snapshotUUID": {
+ "type": "string"
+ },
+ "snapshotWidth": {
+ "type": "integer"
+ },
+ "videoPath": {
+ "type": "string"
+ },
+ "videoSize": {
+ "type": "integer"
+ },
+ "videoType": {
+ "type": "string"
+ },
+ "videoURL": {
+ "type": "string"
+ },
+ "videoUUID": {
+ "type": "string"
+ }
+ }
+ },
"base_info.AccountCheckReq": {
"type": "object",
"required": [
@@ -3720,6 +5069,162 @@ const docTemplate = `{
}
}
},
+ "base_info.Conversation": {
+ "type": "object",
+ "required": [
+ "conversationID",
+ "conversationType",
+ "ownerUserID"
+ ],
+ "properties": {
+ "attachedInfo": {
+ "type": "string"
+ },
+ "conversationID": {
+ "type": "string"
+ },
+ "conversationType": {
+ "type": "integer"
+ },
+ "draftTextTime": {
+ "type": "integer"
+ },
+ "ex": {
+ "type": "string"
+ },
+ "groupAtType": {
+ "type": "integer"
+ },
+ "groupID": {
+ "type": "string"
+ },
+ "isNotInGroup": {
+ "type": "boolean"
+ },
+ "isPinned": {
+ "type": "boolean"
+ },
+ "isPrivateChat": {
+ "type": "boolean"
+ },
+ "ownerUserID": {
+ "type": "string"
+ },
+ "recvMsgOpt": {
+ "type": "integer",
+ "enum": [
+ 0,
+ 1,
+ 2
+ ]
+ },
+ "unreadCount": {
+ "type": "integer"
+ },
+ "userID": {
+ "type": "string"
+ }
+ }
+ },
+ "base_info.CreateDepartmentMemberReq": {
+ "type": "object",
+ "required": [
+ "operationID"
+ ],
+ "properties": {
+ "departmentID": {
+ "type": "string"
+ },
+ "ex": {
+ "type": "string"
+ },
+ "leader": {
+ "type": "integer"
+ },
+ "operationID": {
+ "type": "string"
+ },
+ "order": {
+ "type": "integer"
+ },
+ "position": {
+ "type": "string"
+ },
+ "status": {
+ "type": "integer"
+ },
+ "userID": {
+ "type": "string"
+ }
+ }
+ },
+ "base_info.CreateDepartmentMemberResp": {
+ "type": "object",
+ "properties": {
+ "errCode": {
+ "type": "integer"
+ },
+ "errMsg": {
+ "type": "string"
+ }
+ }
+ },
+ "base_info.CreateDepartmentReq": {
+ "type": "object",
+ "required": [
+ "operationID"
+ ],
+ "properties": {
+ "createTime": {
+ "type": "integer"
+ },
+ "departmentID": {
+ "type": "string"
+ },
+ "departmentType": {
+ "type": "integer"
+ },
+ "ex": {
+ "type": "string"
+ },
+ "faceURL": {
+ "type": "string"
+ },
+ "memberNum": {
+ "type": "integer"
+ },
+ "name": {
+ "type": "string"
+ },
+ "operationID": {
+ "type": "string"
+ },
+ "order": {
+ "type": "integer"
+ },
+ "parentID": {
+ "type": "string"
+ },
+ "subDepartmentNum": {
+ "type": "integer"
+ }
+ }
+ },
+ "base_info.CreateDepartmentResp": {
+ "type": "object",
+ "properties": {
+ "data": {
+ "type": "object",
+ "additionalProperties": true
+ },
+ "errCode": {
+ "type": "integer"
+ },
+ "errMsg": {
+ "type": "string"
+ }
+ }
+ },
"base_info.CreateGroupReq": {
"type": "object",
"required": [
@@ -3797,6 +5302,61 @@ const docTemplate = `{
}
}
},
+ "base_info.CreateOrganizationUserReq": {
+ "type": "object",
+ "required": [
+ "operationID"
+ ],
+ "properties": {
+ "birth": {
+ "type": "integer"
+ },
+ "createTime": {
+ "type": "integer"
+ },
+ "email": {
+ "type": "string"
+ },
+ "englishName": {
+ "type": "string"
+ },
+ "ex": {
+ "type": "string"
+ },
+ "faceURL": {
+ "type": "string"
+ },
+ "gender": {
+ "type": "integer"
+ },
+ "mobile": {
+ "type": "string"
+ },
+ "nickname": {
+ "type": "string"
+ },
+ "operationID": {
+ "type": "string"
+ },
+ "telephone": {
+ "type": "string"
+ },
+ "userID": {
+ "type": "string"
+ }
+ }
+ },
+ "base_info.CreateOrganizationUserResp": {
+ "type": "object",
+ "properties": {
+ "errCode": {
+ "type": "integer"
+ },
+ "errMsg": {
+ "type": "string"
+ }
+ }
+ },
"base_info.CreateTagReq": {
"type": "object",
"required": [
@@ -3898,6 +5458,32 @@ const docTemplate = `{
}
}
},
+ "base_info.DeleteDepartmentReq": {
+ "type": "object",
+ "required": [
+ "departmentID",
+ "operationID"
+ ],
+ "properties": {
+ "departmentID": {
+ "type": "string"
+ },
+ "operationID": {
+ "type": "string"
+ }
+ }
+ },
+ "base_info.DeleteDepartmentResp": {
+ "type": "object",
+ "properties": {
+ "errCode": {
+ "type": "integer"
+ },
+ "errMsg": {
+ "type": "string"
+ }
+ }
+ },
"base_info.DeleteFriendReq": {
"type": "object",
"required": [
@@ -3957,6 +5543,32 @@ const docTemplate = `{
}
}
},
+ "base_info.DeleteOrganizationUserReq": {
+ "type": "object",
+ "required": [
+ "operationID",
+ "userID"
+ ],
+ "properties": {
+ "operationID": {
+ "type": "string"
+ },
+ "userID": {
+ "type": "string"
+ }
+ }
+ },
+ "base_info.DeleteOrganizationUserResp": {
+ "type": "object",
+ "properties": {
+ "errCode": {
+ "type": "integer"
+ },
+ "errMsg": {
+ "type": "string"
+ }
+ }
+ },
"base_info.DeleteTagReq": {
"type": "object",
"required": [
@@ -3983,6 +5595,36 @@ const docTemplate = `{
}
}
},
+ "base_info.DeleteUserInDepartmentReq": {
+ "type": "object",
+ "required": [
+ "departmentID",
+ "operationID",
+ "userID"
+ ],
+ "properties": {
+ "departmentID": {
+ "type": "string"
+ },
+ "operationID": {
+ "type": "string"
+ },
+ "userID": {
+ "type": "string"
+ }
+ }
+ },
+ "base_info.DeleteUserInDepartmentResp": {
+ "type": "object",
+ "properties": {
+ "errCode": {
+ "type": "integer"
+ },
+ "errMsg": {
+ "type": "string"
+ }
+ }
+ },
"base_info.DismissGroupReq": {
"type": "object",
"required": [
@@ -4009,6 +5651,14 @@ const docTemplate = `{
}
}
},
+ "base_info.ExpireTime": {
+ "type": "object",
+ "properties": {
+ "expireTimeSeconds": {
+ "type": "integer"
+ }
+ }
+ },
"base_info.ForceLogoutReq": {
"type": "object",
"required": [
@@ -4043,6 +5693,38 @@ const docTemplate = `{
}
}
},
+ "base_info.GetAllConversationsReq": {
+ "type": "object",
+ "required": [
+ "operationID",
+ "ownerUserID"
+ ],
+ "properties": {
+ "operationID": {
+ "type": "string"
+ },
+ "ownerUserID": {
+ "type": "string"
+ }
+ }
+ },
+ "base_info.GetAllConversationsResp": {
+ "type": "object",
+ "properties": {
+ "data": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/base_info.Conversation"
+ }
+ },
+ "errCode": {
+ "type": "integer"
+ },
+ "errMsg": {
+ "type": "string"
+ }
+ }
+ },
"base_info.GetAllUsersUidReq": {
"type": "object",
"required": [
@@ -4087,6 +5769,104 @@ const docTemplate = `{
}
},
"base_info.GetBlackListResp": {
+ "type": "object",
+ "properties": {
+ "errCode": {
+ "type": "integer"
+ },
+ "errMsg": {
+ "type": "string"
+ }
+ }
+ },
+ "base_info.GetConversationReq": {
+ "type": "object",
+ "required": [
+ "conversationID",
+ "operationID",
+ "ownerUserID"
+ ],
+ "properties": {
+ "conversationID": {
+ "type": "string"
+ },
+ "operationID": {
+ "type": "string"
+ },
+ "ownerUserID": {
+ "type": "string"
+ }
+ }
+ },
+ "base_info.GetConversationResp": {
+ "type": "object",
+ "properties": {
+ "data": {
+ "$ref": "#/definitions/base_info.Conversation"
+ },
+ "errCode": {
+ "type": "integer"
+ },
+ "errMsg": {
+ "type": "string"
+ }
+ }
+ },
+ "base_info.GetConversationsReq": {
+ "type": "object",
+ "required": [
+ "conversationIDs",
+ "operationID",
+ "ownerUserID"
+ ],
+ "properties": {
+ "conversationIDs": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "operationID": {
+ "type": "string"
+ },
+ "ownerUserID": {
+ "type": "string"
+ }
+ }
+ },
+ "base_info.GetConversationsResp": {
+ "type": "object",
+ "properties": {
+ "data": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/base_info.Conversation"
+ }
+ },
+ "errCode": {
+ "type": "integer"
+ },
+ "errMsg": {
+ "type": "string"
+ }
+ }
+ },
+ "base_info.GetDepartmentMemberReq": {
+ "type": "object",
+ "required": [
+ "departmentID",
+ "operationID"
+ ],
+ "properties": {
+ "departmentID": {
+ "type": "string"
+ },
+ "operationID": {
+ "type": "string"
+ }
+ }
+ },
+ "base_info.GetDepartmentMemberResp": {
"type": "object",
"properties": {
"data": {
@@ -4122,13 +5902,6 @@ const docTemplate = `{
"base_info.GetFriendApplyListResp": {
"type": "object",
"properties": {
- "data": {
- "type": "array",
- "items": {
- "type": "object",
- "additionalProperties": true
- }
- },
"errCode": {
"type": "integer"
},
@@ -4155,13 +5928,6 @@ const docTemplate = `{
"base_info.GetFriendListResp": {
"type": "object",
"properties": {
- "data": {
- "type": "array",
- "items": {
- "type": "object",
- "additionalProperties": true
- }
- },
"errCode": {
"type": "integer"
},
@@ -4188,13 +5954,6 @@ const docTemplate = `{
"base_info.GetGroupAllMemberResp": {
"type": "object",
"properties": {
- "data": {
- "type": "array",
- "items": {
- "type": "object",
- "additionalProperties": true
- }
- },
"errCode": {
"type": "integer"
},
@@ -4222,13 +5981,6 @@ const docTemplate = `{
"base_info.GetGroupApplicationListResp": {
"type": "object",
"properties": {
- "data": {
- "type": "array",
- "items": {
- "type": "object",
- "additionalProperties": true
- }
- },
"errCode": {
"type": "integer"
},
@@ -4258,13 +6010,6 @@ const docTemplate = `{
"base_info.GetGroupInfoResp": {
"type": "object",
"properties": {
- "data": {
- "type": "array",
- "items": {
- "type": "object",
- "additionalProperties": true
- }
- },
"errCode": {
"type": "integer"
},
@@ -4298,13 +6043,6 @@ const docTemplate = `{
"base_info.GetGroupMembersInfoResp": {
"type": "object",
"properties": {
- "data": {
- "type": "array",
- "items": {
- "type": "object",
- "additionalProperties": true
- }
- },
"errCode": {
"type": "integer"
},
@@ -4331,13 +6069,6 @@ const docTemplate = `{
"base_info.GetJoinedGroupListResp": {
"type": "object",
"properties": {
- "data": {
- "type": "array",
- "items": {
- "type": "object",
- "additionalProperties": true
- }
- },
"errCode": {
"type": "integer"
},
@@ -4364,13 +6095,6 @@ const docTemplate = `{
"base_info.GetSelfApplyListResp": {
"type": "object",
"properties": {
- "data": {
- "type": "array",
- "items": {
- "type": "object",
- "additionalProperties": true
- }
- },
"errCode": {
"type": "integer"
},
@@ -4405,6 +6129,39 @@ const docTemplate = `{
}
}
},
+ "base_info.GetSubDepartmentReq": {
+ "type": "object",
+ "required": [
+ "departmentID",
+ "operationID"
+ ],
+ "properties": {
+ "departmentID": {
+ "type": "string"
+ },
+ "operationID": {
+ "type": "string"
+ }
+ }
+ },
+ "base_info.GetSubDepartmentResp": {
+ "type": "object",
+ "properties": {
+ "data": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "additionalProperties": true
+ }
+ },
+ "errCode": {
+ "type": "integer"
+ },
+ "errMsg": {
+ "type": "string"
+ }
+ }
+ },
"base_info.GetTagSendLogsReq": {
"type": "object",
"required": [
@@ -4499,6 +6256,36 @@ const docTemplate = `{
}
}
},
+ "base_info.GetUserInDepartmentReq": {
+ "type": "object",
+ "required": [
+ "operationID",
+ "userID"
+ ],
+ "properties": {
+ "operationID": {
+ "type": "string"
+ },
+ "userID": {
+ "type": "string"
+ }
+ }
+ },
+ "base_info.GetUserInDepartmentResp": {
+ "type": "object",
+ "properties": {
+ "data": {
+ "type": "object",
+ "additionalProperties": true
+ },
+ "errCode": {
+ "type": "integer"
+ },
+ "errMsg": {
+ "type": "string"
+ }
+ }
+ },
"base_info.GetUserReqGroupApplicationListReq": {
"type": "object",
"required": [
@@ -4959,19 +6746,135 @@ const docTemplate = `{
}
}
},
+ "base_info.ManagementBatchSendMsgReq": {
+ "type": "object",
+ "required": [
+ "contentType",
+ "operationID",
+ "sendID",
+ "sessionType"
+ ],
+ "properties": {
+ "contentType": {
+ "type": "integer"
+ },
+ "groupID": {
+ "type": "string"
+ },
+ "isOnlineOnly": {
+ "type": "boolean"
+ },
+ "offlinePushInfo": {
+ "$ref": "#/definitions/server_api_params.OfflinePushInfo"
+ },
+ "operationID": {
+ "type": "string"
+ },
+ "recvIDList": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "sendID": {
+ "type": "string"
+ },
+ "senderFaceURL": {
+ "type": "string"
+ },
+ "senderNickname": {
+ "type": "string"
+ },
+ "senderPlatformID": {
+ "type": "integer"
+ },
+ "sessionType": {
+ "type": "integer"
+ }
+ }
+ },
+ "base_info.ManagementSendMsgReq": {
+ "type": "object",
+ "required": [
+ "contentType",
+ "operationID",
+ "sendID",
+ "sessionType"
+ ],
+ "properties": {
+ "contentType": {
+ "type": "integer"
+ },
+ "groupID": {
+ "type": "string"
+ },
+ "isOnlineOnly": {
+ "type": "boolean"
+ },
+ "offlinePushInfo": {
+ "$ref": "#/definitions/server_api_params.OfflinePushInfo"
+ },
+ "operationID": {
+ "type": "string"
+ },
+ "recvID": {
+ "type": "string"
+ },
+ "sendID": {
+ "type": "string"
+ },
+ "senderFaceURL": {
+ "type": "string"
+ },
+ "senderNickname": {
+ "type": "string"
+ },
+ "senderPlatformID": {
+ "type": "integer"
+ },
+ "sessionType": {
+ "type": "integer"
+ }
+ }
+ },
+ "base_info.ManagementSendMsgResp": {
+ "type": "object",
+ "properties": {
+ "data": {
+ "$ref": "#/definitions/server_api_params.UserSendMsgResp"
+ },
+ "errCode": {
+ "type": "integer"
+ },
+ "errMsg": {
+ "type": "string"
+ }
+ }
+ },
"base_info.MinioUploadFileResp": {
"type": "object",
"properties": {
- "URL": {
- "type": "string"
+ "data": {
+ "type": "object",
+ "properties": {
+ "URL": {
+ "type": "string"
+ },
+ "newName": {
+ "type": "string"
+ },
+ "snapshotName": {
+ "type": "string"
+ },
+ "snapshotURL": {
+ "type": "string"
+ }
+ }
},
- "newName": {
- "type": "string"
+ "errCode": {
+ "type": "integer"
},
- "snapshotName": {
- "type": "string"
- },
- "snapshotURL": {
+ "errMsg": {
"type": "string"
}
}
@@ -5039,10 +6942,6 @@ const docTemplate = `{
"base_info.ParseTokenResp": {
"type": "object",
"properties": {
- "data": {
- "type": "object",
- "additionalProperties": true
- },
"errCode": {
"type": "integer"
},
@@ -5356,6 +7255,32 @@ const docTemplate = `{
}
}
},
+ "base_info.Swagger400Resp": {
+ "type": "object",
+ "properties": {
+ "errCode": {
+ "type": "integer",
+ "example": 400
+ },
+ "errMsg": {
+ "type": "string",
+ "example": "err msg"
+ }
+ }
+ },
+ "base_info.Swagger500Resp": {
+ "type": "object",
+ "properties": {
+ "errCode": {
+ "type": "integer",
+ "example": 500
+ },
+ "errMsg": {
+ "type": "string",
+ "example": "err msg"
+ }
+ }
+ },
"base_info.TransferGroupOwnerReq": {
"type": "object",
"required": [
@@ -5390,6 +7315,114 @@ const docTemplate = `{
}
}
},
+ "base_info.UpdateDepartmentReq": {
+ "type": "object",
+ "required": [
+ "departmentID",
+ "operationID"
+ ],
+ "properties": {
+ "createTime": {
+ "type": "integer"
+ },
+ "departmentID": {
+ "type": "string"
+ },
+ "departmentType": {
+ "type": "integer"
+ },
+ "ex": {
+ "type": "string"
+ },
+ "faceURL": {
+ "type": "string"
+ },
+ "memberNum": {
+ "type": "integer"
+ },
+ "name": {
+ "type": "string"
+ },
+ "operationID": {
+ "type": "string"
+ },
+ "order": {
+ "type": "integer"
+ },
+ "parentID": {
+ "type": "string"
+ },
+ "subDepartmentNum": {
+ "type": "integer"
+ }
+ }
+ },
+ "base_info.UpdateDepartmentResp": {
+ "type": "object",
+ "properties": {
+ "errCode": {
+ "type": "integer"
+ },
+ "errMsg": {
+ "type": "string"
+ }
+ }
+ },
+ "base_info.UpdateOrganizationUserReq": {
+ "type": "object",
+ "required": [
+ "operationID"
+ ],
+ "properties": {
+ "birth": {
+ "type": "integer"
+ },
+ "createTime": {
+ "type": "integer"
+ },
+ "email": {
+ "type": "string"
+ },
+ "englishName": {
+ "type": "string"
+ },
+ "ex": {
+ "type": "string"
+ },
+ "faceURL": {
+ "type": "string"
+ },
+ "gender": {
+ "type": "integer"
+ },
+ "mobile": {
+ "type": "string"
+ },
+ "nickname": {
+ "type": "string"
+ },
+ "operationID": {
+ "type": "string"
+ },
+ "telephone": {
+ "type": "string"
+ },
+ "userID": {
+ "type": "string"
+ }
+ }
+ },
+ "base_info.UpdateOrganizationUserResp": {
+ "type": "object",
+ "properties": {
+ "errCode": {
+ "type": "integer"
+ },
+ "errMsg": {
+ "type": "string"
+ }
+ }
+ },
"base_info.UpdateSelfUserInfoReq": {
"type": "object",
"required": [
@@ -5439,6 +7472,49 @@ const docTemplate = `{
}
}
},
+ "base_info.UpdateUserInDepartmentReq": {
+ "type": "object",
+ "required": [
+ "operationID"
+ ],
+ "properties": {
+ "departmentID": {
+ "type": "string"
+ },
+ "ex": {
+ "type": "string"
+ },
+ "leader": {
+ "type": "integer"
+ },
+ "operationID": {
+ "type": "string"
+ },
+ "order": {
+ "type": "integer"
+ },
+ "position": {
+ "type": "string"
+ },
+ "status": {
+ "type": "integer"
+ },
+ "userID": {
+ "type": "string"
+ }
+ }
+ },
+ "base_info.UpdateUserInDepartmentResp": {
+ "type": "object",
+ "properties": {
+ "errCode": {
+ "type": "integer"
+ },
+ "errMsg": {
+ "type": "string"
+ }
+ }
+ },
"base_info.UpdateUserInfoResp": {
"type": "object",
"properties": {
@@ -5652,6 +7728,193 @@ const docTemplate = `{
}
}
},
+ "internal_api_manage.FileElem": {
+ "type": "object",
+ "properties": {
+ "fileName": {
+ "type": "string"
+ },
+ "filePath": {
+ "type": "string"
+ },
+ "fileSize": {
+ "type": "integer"
+ },
+ "sourceURL": {
+ "type": "string"
+ },
+ "uuid": {
+ "type": "string"
+ }
+ }
+ },
+ "internal_api_manage.OANotificationElem": {
+ "type": "object",
+ "required": [
+ "notificationFaceURL",
+ "notificationName",
+ "notificationType",
+ "text"
+ ],
+ "properties": {
+ "ex": {
+ "type": "string"
+ },
+ "fileElem": {
+ "$ref": "#/definitions/internal_api_manage.FileElem"
+ },
+ "mixType": {
+ "type": "integer"
+ },
+ "notificationFaceURL": {
+ "type": "string"
+ },
+ "notificationName": {
+ "type": "string"
+ },
+ "notificationType": {
+ "type": "integer"
+ },
+ "pictureElem": {
+ "$ref": "#/definitions/internal_api_manage.PictureElem"
+ },
+ "soundElem": {
+ "$ref": "#/definitions/internal_api_manage.SoundElem"
+ },
+ "text": {
+ "type": "string"
+ },
+ "url": {
+ "type": "string"
+ },
+ "videoElem": {
+ "$ref": "#/definitions/internal_api_manage.VideoElem"
+ }
+ }
+ },
+ "internal_api_manage.PictureBaseInfo": {
+ "type": "object",
+ "properties": {
+ "height": {
+ "type": "integer"
+ },
+ "size": {
+ "type": "integer"
+ },
+ "type": {
+ "type": "string"
+ },
+ "url": {
+ "type": "string"
+ },
+ "uuid": {
+ "type": "string"
+ },
+ "width": {
+ "type": "integer"
+ }
+ }
+ },
+ "internal_api_manage.PictureElem": {
+ "type": "object",
+ "properties": {
+ "bigPicture": {
+ "$ref": "#/definitions/internal_api_manage.PictureBaseInfo"
+ },
+ "snapshotPicture": {
+ "$ref": "#/definitions/internal_api_manage.PictureBaseInfo"
+ },
+ "sourcePath": {
+ "type": "string"
+ },
+ "sourcePicture": {
+ "$ref": "#/definitions/internal_api_manage.PictureBaseInfo"
+ }
+ }
+ },
+ "internal_api_manage.RevokeElem": {
+ "type": "object",
+ "required": [
+ "revokeMsgClientID"
+ ],
+ "properties": {
+ "revokeMsgClientID": {
+ "type": "string"
+ }
+ }
+ },
+ "internal_api_manage.SoundElem": {
+ "type": "object",
+ "properties": {
+ "dataSize": {
+ "type": "integer"
+ },
+ "duration": {
+ "type": "integer"
+ },
+ "soundPath": {
+ "type": "string"
+ },
+ "sourceURL": {
+ "type": "string"
+ },
+ "uuid": {
+ "type": "string"
+ }
+ }
+ },
+ "internal_api_manage.TextElem": {
+ "type": "object",
+ "required": [
+ "text"
+ ],
+ "properties": {
+ "text": {
+ "type": "string"
+ }
+ }
+ },
+ "internal_api_manage.VideoElem": {
+ "type": "object",
+ "properties": {
+ "duration": {
+ "type": "integer"
+ },
+ "snapshotHeight": {
+ "type": "integer"
+ },
+ "snapshotPath": {
+ "type": "string"
+ },
+ "snapshotSize": {
+ "type": "integer"
+ },
+ "snapshotURL": {
+ "type": "string"
+ },
+ "snapshotUUID": {
+ "type": "string"
+ },
+ "snapshotWidth": {
+ "type": "integer"
+ },
+ "videoPath": {
+ "type": "string"
+ },
+ "videoSize": {
+ "type": "integer"
+ },
+ "videoType": {
+ "type": "string"
+ },
+ "videoURL": {
+ "type": "string"
+ },
+ "videoUUID": {
+ "type": "string"
+ }
+ }
+ },
"office.Comment": {
"type": "object",
"properties": {
@@ -5832,6 +8095,143 @@ const docTemplate = `{
}
}
},
+ "server_api_params.Department": {
+ "type": "object",
+ "properties": {
+ "createTime": {
+ "type": "integer"
+ },
+ "departmentID": {
+ "type": "string"
+ },
+ "departmentType": {
+ "type": "integer"
+ },
+ "ex": {
+ "type": "string"
+ },
+ "faceURL": {
+ "type": "string"
+ },
+ "memberNum": {
+ "type": "integer"
+ },
+ "name": {
+ "type": "string"
+ },
+ "order": {
+ "type": "integer"
+ },
+ "parentID": {
+ "type": "string"
+ },
+ "subDepartmentNum": {
+ "type": "integer"
+ }
+ }
+ },
+ "server_api_params.DepartmentMember": {
+ "type": "object",
+ "properties": {
+ "departmentID": {
+ "type": "string"
+ },
+ "ex": {
+ "type": "string"
+ },
+ "leader": {
+ "type": "integer"
+ },
+ "order": {
+ "type": "integer"
+ },
+ "position": {
+ "type": "string"
+ },
+ "status": {
+ "type": "integer"
+ },
+ "userID": {
+ "type": "string"
+ }
+ }
+ },
+ "server_api_params.FriendInfo": {
+ "type": "object",
+ "properties": {
+ "addSource": {
+ "type": "integer"
+ },
+ "createTime": {
+ "type": "integer"
+ },
+ "ex": {
+ "type": "string"
+ },
+ "friendUser": {
+ "$ref": "#/definitions/server_api_params.UserInfo"
+ },
+ "operatorUserID": {
+ "type": "string"
+ },
+ "ownerUserID": {
+ "type": "string"
+ },
+ "remark": {
+ "type": "string"
+ }
+ }
+ },
+ "server_api_params.FriendRequest": {
+ "type": "object",
+ "properties": {
+ "createTime": {
+ "type": "integer"
+ },
+ "ex": {
+ "type": "string"
+ },
+ "fromFaceURL": {
+ "type": "string"
+ },
+ "fromGender": {
+ "type": "integer"
+ },
+ "fromNickname": {
+ "type": "string"
+ },
+ "fromUserID": {
+ "type": "string"
+ },
+ "handleMsg": {
+ "type": "string"
+ },
+ "handleResult": {
+ "type": "integer"
+ },
+ "handleTime": {
+ "type": "integer"
+ },
+ "handlerUserID": {
+ "type": "string"
+ },
+ "reqMsg": {
+ "type": "string"
+ },
+ "toFaceURL": {
+ "type": "string"
+ },
+ "toGender": {
+ "type": "integer"
+ },
+ "toNickname": {
+ "type": "string"
+ },
+ "toUserID": {
+ "type": "string"
+ }
+ }
+ },
"server_api_params.GroupInfo": {
"type": "object",
"properties": {
@@ -5863,7 +8263,7 @@ const docTemplate = `{
"type": "integer"
},
"needVerification": {
- "$ref": "#/definitions/wrapperspb.Int32Value"
+ "type": "integer"
},
"notification": {
"type": "string"
@@ -5914,6 +8314,141 @@ const docTemplate = `{
}
}
},
+ "server_api_params.GroupRequest": {
+ "type": "object",
+ "properties": {
+ "ex": {
+ "type": "string"
+ },
+ "groupInfo": {
+ "$ref": "#/definitions/server_api_params.GroupInfo"
+ },
+ "handleMsg": {
+ "type": "string"
+ },
+ "handleResult": {
+ "type": "integer"
+ },
+ "handleTime": {
+ "type": "integer"
+ },
+ "handleUserID": {
+ "type": "string"
+ },
+ "reqMsg": {
+ "type": "string"
+ },
+ "reqTime": {
+ "type": "integer"
+ },
+ "userInfo": {
+ "$ref": "#/definitions/server_api_params.PublicUserInfo"
+ }
+ }
+ },
+ "server_api_params.OfflinePushInfo": {
+ "type": "object",
+ "properties": {
+ "desc": {
+ "type": "string"
+ },
+ "ex": {
+ "type": "string"
+ },
+ "iOSBadgeCount": {
+ "type": "boolean"
+ },
+ "iOSPushSound": {
+ "type": "string"
+ },
+ "title": {
+ "type": "string"
+ }
+ }
+ },
+ "server_api_params.OrganizationUser": {
+ "type": "object",
+ "properties": {
+ "birth": {
+ "type": "integer"
+ },
+ "createTime": {
+ "type": "integer"
+ },
+ "email": {
+ "type": "string"
+ },
+ "englishName": {
+ "type": "string"
+ },
+ "ex": {
+ "type": "string"
+ },
+ "faceURL": {
+ "type": "string"
+ },
+ "gender": {
+ "type": "integer"
+ },
+ "mobile": {
+ "type": "string"
+ },
+ "nickname": {
+ "type": "string"
+ },
+ "telephone": {
+ "type": "string"
+ },
+ "userID": {
+ "type": "string"
+ }
+ }
+ },
+ "server_api_params.PublicUserInfo": {
+ "type": "object",
+ "properties": {
+ "ex": {
+ "type": "string"
+ },
+ "faceURL": {
+ "type": "string"
+ },
+ "gender": {
+ "type": "integer"
+ },
+ "nickname": {
+ "type": "string"
+ },
+ "userID": {
+ "type": "string"
+ }
+ }
+ },
+ "server_api_params.UserDepartmentMember": {
+ "type": "object",
+ "properties": {
+ "departmentMember": {
+ "$ref": "#/definitions/server_api_params.DepartmentMember"
+ },
+ "organizationUser": {
+ "$ref": "#/definitions/server_api_params.OrganizationUser"
+ }
+ }
+ },
+ "server_api_params.UserInDepartment": {
+ "type": "object",
+ "properties": {
+ "departmentMemberList": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/server_api_params.DepartmentMember"
+ }
+ },
+ "organizationUser": {
+ "$ref": "#/definitions/server_api_params.OrganizationUser"
+ }
+ }
+ },
"server_api_params.UserInfo": {
"type": "object",
"properties": {
@@ -5952,6 +8487,20 @@ const docTemplate = `{
}
}
},
+ "server_api_params.UserSendMsgResp": {
+ "type": "object",
+ "properties": {
+ "clientMsgID": {
+ "type": "string"
+ },
+ "sendTime": {
+ "type": "integer"
+ },
+ "serverMsgID": {
+ "type": "string"
+ }
+ }
+ },
"user.AccountCheckResp_SingleUserStatus": {
"type": "object",
"properties": {
@@ -5962,27 +8511,18 @@ const docTemplate = `{
"type": "string"
}
}
- },
- "wrapperspb.Int32Value": {
- "type": "object",
- "properties": {
- "value": {
- "description": "The int32 value.",
- "type": "integer"
- }
- }
}
}
}`
// SwaggerInfo holds exported Swagger Info so clients can modify it
var SwaggerInfo = &swag.Spec{
- Version: "",
+ Version: "1.0",
Host: "",
- BasePath: "",
+ BasePath: "/",
Schemes: []string{},
- Title: "",
- Description: "",
+ Title: "open-IM-Server API",
+ Description: "open-IM-Server 的API服务器文档, 文档中所有请求都有一个operationID字段用于链路追踪",
InfoInstanceName: "swagger",
SwaggerTemplate: docTemplate,
}
diff --git a/cmd/open_im_api/docs/swagger.json b/cmd/open_im_api/docs/swagger.json
index ff3c03dc5..6e03a6912 100644
--- a/cmd/open_im_api/docs/swagger.json
+++ b/cmd/open_im_api/docs/swagger.json
@@ -1,8 +1,16 @@
{
"swagger": "2.0",
"info": {
- "contact": {}
+ "description": "open-IM-Server 的API服务器文档, 文档中所有请求都有一个operationID字段用于链路追踪",
+ "title": "open-IM-Server API",
+ "contact": {},
+ "license": {
+ "name": "Apache 2.0",
+ "url": "http://www.apache.org/licenses/LICENSE-2.0.html"
+ },
+ "version": "1.0"
},
+ "basePath": "/",
"paths": {
"/auth/force_logout": {
"post": {
@@ -27,7 +35,7 @@
"required": true
},
{
- "description": "platform为平台ID, fromUserID为要执行强制登出的用户ID",
+ "description": "platform为平台ID \u003cbr\u003e fromUserID为要执行强制登出的用户ID",
"name": "req",
"in": "body",
"required": true,
@@ -46,13 +54,13 @@
"400": {
"description": "errCode为400 一般为参数输入错误, token未带上等",
"schema": {
- "$ref": "#/definitions/base_info.ForceLogoutResp"
+ "$ref": "#/definitions/base_info.Swagger400Resp"
}
},
"500": {
"description": "errCode为500 一般为服务器内部错误",
"schema": {
- "$ref": "#/definitions/base_info.ForceLogoutResp"
+ "$ref": "#/definitions/base_info.Swagger500Resp"
}
}
}
@@ -60,7 +68,7 @@
},
"/auth/parse_token": {
"post": {
- "description": "解析用户token",
+ "description": "解析当前用户token(token在请求头中传入)",
"consumes": [
"application/json"
],
@@ -70,7 +78,7 @@
"tags": [
"鉴权认证"
],
- "summary": "解析token",
+ "summary": "解析当前用户token",
"operationId": "ParseToken",
"parameters": [
{
@@ -81,7 +89,7 @@
"required": true
},
{
- "description": "secret为openIM密钥, 详细见服务端config.yaml secret字段, platform为平台ID",
+ "description": "secret为openIM密钥, 详细见服务端config.yaml secret字段\u003cbr\u003eplatform为平台ID",
"name": "req",
"in": "body",
"required": true,
@@ -94,19 +102,31 @@
"0": {
"description": "",
"schema": {
- "$ref": "#/definitions/base_info.ParseTokenResp"
+ "allOf": [
+ {
+ "$ref": "#/definitions/base_info.ParseTokenResp"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "Data": {
+ "$ref": "#/definitions/base_info.ExpireTime"
+ }
+ }
+ }
+ ]
}
},
"400": {
"description": "errCode为400 一般为参数输入错误, token未带上等",
"schema": {
- "$ref": "#/definitions/base_info.ParseTokenResp"
+ "$ref": "#/definitions/base_info.Swagger400Resp"
}
},
"500": {
"description": "errCode为500 一般为服务器内部错误",
"schema": {
- "$ref": "#/definitions/base_info.ParseTokenResp"
+ "$ref": "#/definitions/base_info.Swagger500Resp"
}
}
}
@@ -114,7 +134,7 @@
},
"/auth/user_register": {
"post": {
- "description": "用户登录",
+ "description": "用户注册",
"consumes": [
"application/json"
],
@@ -124,7 +144,7 @@
"tags": [
"鉴权认证"
],
- "summary": "用户登录",
+ "summary": "用户注册",
"operationId": "UserRegister",
"parameters": [
{
@@ -135,7 +155,7 @@
"required": true
},
{
- "description": "secret为openIM密钥, 详细见服务端config.yaml secret字段 \u003cbr\u003e platform为平台ID \u003cbr\u003e ex为拓展字段",
+ "description": "secret为openIM密钥, 详细见服务端config.yaml secret字段 \u003cbr\u003e platform为平台ID \u003cbr\u003e ex为拓展字段 \u003cbr\u003e gender为性别, 0为女, 1为男",
"name": "req",
"in": "body",
"required": true,
@@ -154,13 +174,13 @@
"400": {
"description": "errCode为400 一般为参数输入错误, token未带上等",
"schema": {
- "$ref": "#/definitions/base_info.UserRegisterResp"
+ "$ref": "#/definitions/base_info.Swagger400Resp"
}
},
"500": {
"description": "errCode为500 一般为服务器内部错误",
"schema": {
- "$ref": "#/definitions/base_info.UserRegisterResp"
+ "$ref": "#/definitions/base_info.Swagger500Resp"
}
}
}
@@ -189,7 +209,7 @@
"required": true
},
{
- "description": "secret为openIM密钥, 详细见服务端config.yaml secret字段, platform为平台ID",
+ "description": "secret为openIM密钥, 详细见服务端config.yaml secret字段 \u003cbr\u003e platform为平台ID",
"name": "req",
"in": "body",
"required": true,
@@ -208,13 +228,13 @@
"400": {
"description": "errCode为400 一般为参数输入错误, token未带上等",
"schema": {
- "$ref": "#/definitions/base_info.UserTokenResp"
+ "$ref": "#/definitions/base_info.Swagger400Resp"
}
},
"500": {
"description": "errCode为500 一般为服务器内部错误",
"schema": {
- "$ref": "#/definitions/base_info.UserTokenResp"
+ "$ref": "#/definitions/base_info.Swagger500Resp"
}
}
}
@@ -243,7 +263,7 @@
"required": true
},
{
- "description": "fromUserID为设置的用户, toUserID为被设置的用户",
+ "description": "fromUserID为设置的用户 \u003cbr\u003e toUserID为被设置的用户",
"name": "req",
"in": "body",
"required": true,
@@ -262,13 +282,13 @@
"400": {
"description": "errCode为400 一般为参数输入错误, token未带上等",
"schema": {
- "$ref": "#/definitions/base_info.AddBlacklistResp"
+ "$ref": "#/definitions/base_info.Swagger400Resp"
}
},
"500": {
"description": "errCode为500 一般为服务器内部错误",
"schema": {
- "$ref": "#/definitions/base_info.AddBlacklistResp"
+ "$ref": "#/definitions/base_info.Swagger500Resp"
}
}
}
@@ -297,7 +317,7 @@
"required": true
},
{
- "description": "reqMsg为申请信息, fromUserID为申请用户, toUserID为被添加用户",
+ "description": "reqMsg为申请信息 \u003cbr\u003e fromUserID为申请用户 \u003cbr\u003e toUserID为被添加用户",
"name": "req",
"in": "body",
"required": true,
@@ -316,13 +336,13 @@
"400": {
"description": "errCode为400 一般为参数输入错误, token未带上等",
"schema": {
- "$ref": "#/definitions/base_info.AddFriendResp"
+ "$ref": "#/definitions/base_info.Swagger400Resp"
}
},
"500": {
"description": "errCode为500 一般为服务器内部错误",
"schema": {
- "$ref": "#/definitions/base_info.AddFriendResp"
+ "$ref": "#/definitions/base_info.Swagger500Resp"
}
}
}
@@ -351,7 +371,7 @@
"required": true
},
{
- "description": "fromUserID同意/拒绝的用户ID, toUserID为申请用户, handleMsg为处理信息, flag为具体操作, 1为同意, 2为拒绝",
+ "description": "fromUserID同意/拒绝的用户ID\u003cbr\u003etoUserID为申请用户D\u003cbr\u003ehandleMsg为处理信息\u003cbr\u003eflag为具体操作, 1为同意, 2为拒绝",
"name": "req",
"in": "body",
"required": true,
@@ -370,13 +390,13 @@
"400": {
"description": "errCode为400 一般为参数输入错误, token未带上等",
"schema": {
- "$ref": "#/definitions/base_info.AddFriendResponseResp"
+ "$ref": "#/definitions/base_info.Swagger400Resp"
}
},
"500": {
"description": "errCode为500 一般为服务器内部错误",
"schema": {
- "$ref": "#/definitions/base_info.AddFriendResponseResp"
+ "$ref": "#/definitions/base_info.Swagger500Resp"
}
}
}
@@ -405,7 +425,7 @@
"required": true
},
{
- "description": "fromUserID为操作用户, toUserID为被删除用户",
+ "description": "fromUserID为操作用户\u003cbr\u003etoUserID为被删除用户",
"name": "req",
"in": "body",
"required": true,
@@ -424,13 +444,13 @@
"400": {
"description": "errCode为400 一般为参数输入错误, token未带上等",
"schema": {
- "$ref": "#/definitions/base_info.DeleteFriendResp"
+ "$ref": "#/definitions/base_info.Swagger400Resp"
}
},
"500": {
"description": "errCode为500 一般为服务器内部错误",
"schema": {
- "$ref": "#/definitions/base_info.DeleteFriendResp"
+ "$ref": "#/definitions/base_info.Swagger500Resp"
}
}
}
@@ -472,19 +492,34 @@
"0": {
"description": "",
"schema": {
- "$ref": "#/definitions/base_info.GetBlackListResp"
+ "allOf": [
+ {
+ "$ref": "#/definitions/base_info.GetBlackListResp"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "data": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/server_api_params.PublicUserInfo"
+ }
+ }
+ }
+ }
+ ]
}
},
"400": {
"description": "errCode为400 一般为参数输入错误, token未带上等",
"schema": {
- "$ref": "#/definitions/base_info.GetBlackListResp"
+ "$ref": "#/definitions/base_info.Swagger500Resp"
}
},
"500": {
"description": "errCode为500 一般为服务器内部错误",
"schema": {
- "$ref": "#/definitions/base_info.GetBlackListResp"
+ "$ref": "#/definitions/base_info.Swagger400Resp"
}
}
}
@@ -526,19 +561,34 @@
"0": {
"description": "",
"schema": {
- "$ref": "#/definitions/base_info.GetFriendApplyListResp"
+ "allOf": [
+ {
+ "$ref": "#/definitions/base_info.GetFriendApplyListResp"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "data": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/server_api_params.FriendRequest"
+ }
+ }
+ }
+ }
+ ]
}
},
"400": {
"description": "errCode为400 一般为参数输入错误, token未带上等",
"schema": {
- "$ref": "#/definitions/base_info.GetFriendApplyListResp"
+ "$ref": "#/definitions/base_info.Swagger400Resp"
}
},
"500": {
"description": "errCode为500 一般为服务器内部错误",
"schema": {
- "$ref": "#/definitions/base_info.GetFriendApplyListResp"
+ "$ref": "#/definitions/base_info.Swagger400Resp"
}
}
}
@@ -580,19 +630,34 @@
"0": {
"description": "",
"schema": {
- "$ref": "#/definitions/base_info.GetFriendListResp"
+ "allOf": [
+ {
+ "$ref": "#/definitions/base_info.GetFriendListResp"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "data": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/server_api_params.FriendInfo"
+ }
+ }
+ }
+ }
+ ]
}
},
"400": {
"description": "errCode为400 一般为参数输入错误, token未带上等",
"schema": {
- "$ref": "#/definitions/base_info.GetFriendListResp"
+ "$ref": "#/definitions/base_info.Swagger400Resp"
}
},
"500": {
"description": "errCode为500 一般为服务器内部错误",
"schema": {
- "$ref": "#/definitions/base_info.GetFriendListResp"
+ "$ref": "#/definitions/base_info.Swagger500Resp"
}
}
}
@@ -634,19 +699,34 @@
"0": {
"description": "",
"schema": {
- "$ref": "#/definitions/base_info.GetSelfApplyListResp"
+ "allOf": [
+ {
+ "$ref": "#/definitions/base_info.GetSelfApplyListResp"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "data": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/server_api_params.FriendRequest"
+ }
+ }
+ }
+ }
+ ]
}
},
"400": {
"description": "errCode为400 一般为参数输入错误, token未带上等",
"schema": {
- "$ref": "#/definitions/base_info.GetSelfApplyListResp"
+ "$ref": "#/definitions/base_info.Swagger400Resp"
}
},
"500": {
"description": "errCode为500 一般为服务器内部错误",
"schema": {
- "$ref": "#/definitions/base_info.GetSelfApplyListResp"
+ "$ref": "#/definitions/base_info.Swagger500Resp"
}
}
}
@@ -675,7 +755,7 @@
"required": true
},
{
- "description": "fromUserID批量加好友的用户ID, friendUserIDList为",
+ "description": "fromUserID批量加好友的用户ID\u003cbr\u003e friendUserIDList为",
"name": "req",
"in": "body",
"required": true,
@@ -686,7 +766,7 @@
],
"responses": {
"0": {
- "description": "data列表中对象的result-1为添加该用户失败, 0为成功",
+ "description": "data列表中对象的result-1为添加该用户失败\u003cbr\u003e0为成功",
"schema": {
"$ref": "#/definitions/base_info.ImportFriendResp"
}
@@ -694,13 +774,13 @@
"400": {
"description": "errCode为400 一般为参数输入错误, token未带上等",
"schema": {
- "$ref": "#/definitions/base_info.ImportFriendResp"
+ "$ref": "#/definitions/base_info.Swagger400Resp"
}
},
"500": {
"description": "errCode为500 一般为服务器内部错误",
"schema": {
- "$ref": "#/definitions/base_info.ImportFriendResp"
+ "$ref": "#/definitions/base_info.Swagger500Resp"
}
}
}
@@ -729,7 +809,7 @@
"required": true
},
{
- "description": "fromUserID为请求用户, toUserID为要检查的用户",
+ "description": "fromUserID为请求用户\u003cbr\u003e toUserID为要检查的用户",
"name": "req",
"in": "body",
"required": true,
@@ -748,13 +828,13 @@
"400": {
"description": "errCode为400 一般为参数输入错误, token未带上等",
"schema": {
- "$ref": "#/definitions/base_info.IsFriendResp"
+ "$ref": "#/definitions/base_info.Swagger400Resp"
}
},
"500": {
"description": "errCode为500 一般为服务器内部错误",
"schema": {
- "$ref": "#/definitions/base_info.IsFriendResp"
+ "$ref": "#/definitions/base_info.Swagger500Resp"
}
}
}
@@ -802,13 +882,13 @@
"400": {
"description": "errCode为400 一般为参数输入错误, token未带上等",
"schema": {
- "$ref": "#/definitions/base_info.RemoveBlackListResp"
+ "$ref": "#/definitions/base_info.Swagger400Resp"
}
},
"500": {
"description": "errCode为500 一般为服务器内部错误",
"schema": {
- "$ref": "#/definitions/base_info.RemoveBlackListResp"
+ "$ref": "#/definitions/base_info.Swagger500Resp"
}
}
}
@@ -837,7 +917,7 @@
"required": true
},
{
- "description": "fromUserID为设置的用户, toUserID为被设置的用户, remark为好友备注",
+ "description": "fromUserID为设置的用户\u003cbr\u003e toUserID为被设置的用户\u003cbr\u003e remark为好友备注",
"name": "req",
"in": "body",
"required": true,
@@ -856,13 +936,13 @@
"400": {
"description": "errCode为400 一般为参数输入错误, token未带上等",
"schema": {
- "$ref": "#/definitions/base_info.SetFriendRemarkResp"
+ "$ref": "#/definitions/base_info.Swagger400Resp"
}
},
"500": {
"description": "errCode为500 一般为服务器内部错误",
"schema": {
- "$ref": "#/definitions/base_info.SetFriendRemarkResp"
+ "$ref": "#/definitions/base_info.Swagger500Resp"
}
}
}
@@ -910,13 +990,13 @@
"400": {
"description": "errCode为400 一般为参数输入错误, token未带上等",
"schema": {
- "$ref": "#/definitions/base_info.CancelMuteGroupResp"
+ "$ref": "#/definitions/base_info.Swagger400Resp"
}
},
"500": {
"description": "errCode为500 一般为服务器内部错误",
"schema": {
- "$ref": "#/definitions/base_info.CancelMuteGroupResp"
+ "$ref": "#/definitions/base_info.Swagger500Resp"
}
}
}
@@ -964,13 +1044,13 @@
"400": {
"description": "errCode为400 一般为参数输入错误, token未带上等",
"schema": {
- "$ref": "#/definitions/base_info.CancelMuteGroupMemberResp"
+ "$ref": "#/definitions/base_info.Swagger400Resp"
}
},
"500": {
"description": "errCode为500 一般为服务器内部错误",
"schema": {
- "$ref": "#/definitions/base_info.CancelMuteGroupMemberResp"
+ "$ref": "#/definitions/base_info.Swagger500Resp"
}
}
}
@@ -999,7 +1079,7 @@
"required": true
},
{
- "description": "ownerUserID为群主ID \u003cbr\u003e ex为群扩展字段 \u003cbr\u003e roleLevel为群员角色,1为普通用户 2为群主 3为管理员",
+ "description": "groupType这里填0代表普通群 \u003cbr\u003egroupName为群名称\u003cbr\u003e introduction为群介绍\u003cbr\u003e notification为群公共\u003cbr\u003eownerUserID为群主ID \u003cbr\u003e ex为群扩展字段 \u003cbr\u003e memberList中对象roleLevel为群员角色,1为普通用户 2为群主 3为管理员",
"name": "req",
"in": "body",
"required": true,
@@ -1030,13 +1110,13 @@
"400": {
"description": "errCode为400 一般为参数输入错误, token未带上等",
"schema": {
- "$ref": "#/definitions/base_info.CreateGroupResp"
+ "$ref": "#/definitions/base_info.Swagger400Resp"
}
},
"500": {
"description": "errCode为500 一般为服务器内部错误",
"schema": {
- "$ref": "#/definitions/base_info.CreateGroupResp"
+ "$ref": "#/definitions/base_info.Swagger500Resp"
}
}
}
@@ -1084,13 +1164,13 @@
"400": {
"description": "errCode为400 一般为参数输入错误, token未带上等",
"schema": {
- "$ref": "#/definitions/base_info.DismissGroupResp"
+ "$ref": "#/definitions/base_info.Swagger400Resp"
}
},
"500": {
"description": "errCode为500 一般为服务器内部错误",
"schema": {
- "$ref": "#/definitions/base_info.DismissGroupResp"
+ "$ref": "#/definitions/base_info.Swagger500Resp"
}
}
}
@@ -1153,13 +1233,13 @@
"400": {
"description": "errCode为400 一般为参数输入错误, token未带上等",
"schema": {
- "$ref": "#/definitions/base_info.GetGroupAllMemberResp"
+ "$ref": "#/definitions/base_info.Swagger400Resp"
}
},
"500": {
"description": "errCode为500 一般为服务器内部错误",
"schema": {
- "$ref": "#/definitions/base_info.GetGroupAllMemberResp"
+ "$ref": "#/definitions/base_info.Swagger500Resp"
}
}
}
@@ -1188,7 +1268,7 @@
"required": true
},
{
- "description": "memberList为要获取群成员的群ID列表",
+ "description": "groupID为要获取的群ID \u003cbr\u003e memberList为要获取群成员的群ID列表",
"name": "req",
"in": "body",
"required": true,
@@ -1222,13 +1302,13 @@
"400": {
"description": "errCode为400 一般为参数输入错误, token未带上等",
"schema": {
- "$ref": "#/definitions/base_info.GetGroupMembersInfoResp"
+ "$ref": "#/definitions/base_info.Swagger400Resp"
}
},
"500": {
"description": "errCode为500 一般为服务器内部错误",
"schema": {
- "$ref": "#/definitions/base_info.GetGroupMembersInfoResp"
+ "$ref": "#/definitions/base_info.Swagger500Resp"
}
}
}
@@ -1276,13 +1356,13 @@
"400": {
"description": "errCode为400 一般为参数输入错误, token未带上等",
"schema": {
- "$ref": "#/definitions/base_info.GetGroupInfoResp"
+ "$ref": "#/definitions/base_info.Swagger400Resp"
}
},
"500": {
"description": "errCode为500 一般为服务器内部错误",
"schema": {
- "$ref": "#/definitions/base_info.GetGroupInfoResp"
+ "$ref": "#/definitions/base_info.Swagger500Resp"
}
}
}
@@ -1345,13 +1425,13 @@
"400": {
"description": "errCode为400 一般为参数输入错误, token未带上等",
"schema": {
- "$ref": "#/definitions/base_info.GetJoinedGroupListResp"
+ "$ref": "#/definitions/base_info.Swagger400Resp"
}
},
"500": {
"description": "errCode为500 一般为服务器内部错误",
"schema": {
- "$ref": "#/definitions/base_info.GetJoinedGroupListResp"
+ "$ref": "#/definitions/base_info.Swagger500Resp"
}
}
}
@@ -1393,19 +1473,34 @@
"0": {
"description": "",
"schema": {
- "$ref": "#/definitions/base_info.GetGroupApplicationListResp"
+ "allOf": [
+ {
+ "$ref": "#/definitions/base_info.GetGroupApplicationListResp"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "data": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/server_api_params.GroupRequest"
+ }
+ }
+ }
+ }
+ ]
}
},
"400": {
"description": "errCode为400 一般为参数输入错误, token未带上等",
"schema": {
- "$ref": "#/definitions/base_info.GetGroupApplicationListResp"
+ "$ref": "#/definitions/base_info.Swagger400Resp"
}
},
"500": {
"description": "errCode为500 一般为服务器内部错误",
"schema": {
- "$ref": "#/definitions/base_info.GetGroupApplicationListResp"
+ "$ref": "#/definitions/base_info.Swagger500Resp"
}
}
}
@@ -1447,19 +1542,34 @@
"0": {
"description": "",
"schema": {
- "$ref": "#/definitions/base_info.GetGroupApplicationListResp"
+ "allOf": [
+ {
+ "$ref": "#/definitions/base_info.GetGroupApplicationListResp"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "data": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/server_api_params.GroupRequest"
+ }
+ }
+ }
+ }
+ ]
}
},
"400": {
"description": "errCode为400 一般为参数输入错误, token未带上等",
"schema": {
- "$ref": "#/definitions/base_info.GetGroupApplicationListResp"
+ "$ref": "#/definitions/base_info.Swagger400Resp"
}
},
"500": {
"description": "errCode为500 一般为服务器内部错误",
"schema": {
- "$ref": "#/definitions/base_info.GetGroupApplicationListResp"
+ "$ref": "#/definitions/base_info.Swagger500Resp"
}
}
}
@@ -1507,13 +1617,13 @@
"400": {
"description": "errCode为400 一般为参数输入错误, token未带上等",
"schema": {
- "$ref": "#/definitions/base_info.ApplicationGroupResponseResp"
+ "$ref": "#/definitions/base_info.Swagger400Resp"
}
},
"500": {
"description": "errCode为500 一般为服务器内部错误",
"schema": {
- "$ref": "#/definitions/base_info.ApplicationGroupResponseResp"
+ "$ref": "#/definitions/base_info.Swagger500Resp"
}
}
}
@@ -1561,13 +1671,13 @@
"400": {
"description": "errCode为400 一般为参数输入错误, token未带上等",
"schema": {
- "$ref": "#/definitions/base_info.InviteUserToGroupResp"
+ "$ref": "#/definitions/base_info.Swagger400Resp"
}
},
"500": {
"description": "errCode为500 一般为服务器内部错误",
"schema": {
- "$ref": "#/definitions/base_info.InviteUserToGroupResp"
+ "$ref": "#/definitions/base_info.Swagger500Resp"
}
}
}
@@ -1596,7 +1706,7 @@
"required": true
},
{
- "description": "reqMessage为申请进群信息",
+ "description": "reqMessage为申请进群信息\u003cbr\u003egroupID为申请的群ID",
"name": "req",
"in": "body",
"required": true,
@@ -1615,13 +1725,13 @@
"400": {
"description": "errCode为400 一般为参数输入错误, token未带上等",
"schema": {
- "$ref": "#/definitions/base_info.JoinGroupResp"
+ "$ref": "#/definitions/base_info.Swagger400Resp"
}
},
"500": {
"description": "errCode为500 一般为服务器内部错误",
"schema": {
- "$ref": "#/definitions/base_info.JoinGroupResp"
+ "$ref": "#/definitions/base_info.Swagger500Resp"
}
}
}
@@ -1669,13 +1779,13 @@
"400": {
"description": "errCode为400 一般为参数输入错误, token未带上等",
"schema": {
- "$ref": "#/definitions/base_info.KickGroupMemberResp"
+ "$ref": "#/definitions/base_info.Swagger400Resp"
}
},
"500": {
"description": "errCode为500 一般为服务器内部错误",
"schema": {
- "$ref": "#/definitions/base_info.KickGroupMemberResp"
+ "$ref": "#/definitions/base_info.Swagger500Resp"
}
}
}
@@ -1777,13 +1887,13 @@
"400": {
"description": "errCode为400 一般为参数输入错误, token未带上等",
"schema": {
- "$ref": "#/definitions/base_info.DismissGroupResp"
+ "$ref": "#/definitions/base_info.Swagger400Resp"
}
},
"500": {
"description": "errCode为500 一般为服务器内部错误",
"schema": {
- "$ref": "#/definitions/base_info.DismissGroupResp"
+ "$ref": "#/definitions/base_info.Swagger500Resp"
}
}
}
@@ -1791,7 +1901,7 @@
},
"/group/quit_group": {
"post": {
- "description": "退出群聊",
+ "description": "当前用户退出群聊",
"consumes": [
"application/json"
],
@@ -1801,7 +1911,7 @@
"tags": [
"群组相关"
],
- "summary": "退出群聊",
+ "summary": "当前用户退出群聊",
"operationId": "QuitGroup",
"parameters": [
{
@@ -1831,13 +1941,13 @@
"400": {
"description": "errCode为400 一般为参数输入错误, token未带上等",
"schema": {
- "$ref": "#/definitions/base_info.QuitGroupResp"
+ "$ref": "#/definitions/base_info.Swagger400Resp"
}
},
"500": {
"description": "errCode为500 一般为服务器内部错误",
"schema": {
- "$ref": "#/definitions/base_info.QuitGroupResp"
+ "$ref": "#/definitions/base_info.Swagger500Resp"
}
}
}
@@ -1866,7 +1976,7 @@
"required": true
},
{
- "description": "notification为群介绍 \u003cbr\u003e introduction为群公告 \u003cbr\u003e needVerification为加群验证 0为申请需要同意 邀请直接进 1为所有人进群需要验证,除了群主管理员邀请进群 2为直接进群",
+ "description": "groupID为要修改的群ID\u003cbr\u003egroupName为新的群名称\u003cbr\u003enotification为群介绍 \u003cbr\u003e introduction为群公告 \u003cbr\u003e needVerification为加群验证 0为申请需要同意 邀请直接进 1为所有人进群需要验证,除了群主管理员邀请进群 2为直接进群",
"name": "req",
"in": "body",
"required": true,
@@ -1885,13 +1995,13 @@
"400": {
"description": "errCode为400 一般为参数输入错误, token未带上等",
"schema": {
- "$ref": "#/definitions/base_info.SetGroupInfoResp"
+ "$ref": "#/definitions/base_info.Swagger400Resp"
}
},
"500": {
"description": "errCode为500 一般为服务器内部错误",
"schema": {
- "$ref": "#/definitions/base_info.SetGroupInfoResp"
+ "$ref": "#/definitions/base_info.Swagger500Resp"
}
}
}
@@ -1920,7 +2030,7 @@
"required": true
},
{
- "description": "除了operationID, userID, groupID其他参数可选",
+ "description": "除了operationID, userID, groupID其他参数可选\u003cbr\u003eex为拓展字段\u003cbr\u003efaceURL为群头像\u003cbr\u003enickName为群昵称\u003cbr\u003eroleLevel为群员角色,1为普通用户 2为群主 3为管理员",
"name": "req",
"in": "body",
"required": true,
@@ -1939,13 +2049,13 @@
"400": {
"description": "errCode为400 一般为参数输入错误, token未带上等",
"schema": {
- "$ref": "#/definitions/base_info.SetGroupMemberInfoResp"
+ "$ref": "#/definitions/base_info.Swagger400Resp"
}
},
"500": {
"description": "errCode为500 一般为服务器内部错误",
"schema": {
- "$ref": "#/definitions/base_info.SetGroupMemberInfoResp"
+ "$ref": "#/definitions/base_info.Swagger500Resp"
}
}
}
@@ -1993,13 +2103,100 @@
"400": {
"description": "errCode为400 一般为参数输入错误, token未带上等",
"schema": {
- "$ref": "#/definitions/base_info.TransferGroupOwnerResp"
+ "$ref": "#/definitions/base_info.Swagger400Resp"
}
},
"500": {
"description": "errCode为500 一般为服务器内部错误",
"schema": {
- "$ref": "#/definitions/base_info.TransferGroupOwnerResp"
+ "$ref": "#/definitions/base_info.Swagger500Resp"
+ }
+ }
+ }
+ }
+ },
+ "/msg/batch_send_msg": {
+ "post": {
+ "description": "管理员批量发送群聊单聊消息 消息格式详细见\u003ca href=\"https://doc.rentsoft.cn/#/server_doc/admin?id=%e6%b6%88%e6%81%af%e7%b1%bb%e5%9e%8b%e6%a0%bc%e5%bc%8f%e6%8f%8f%e8%bf%b0\"\u003e消息格式\u003c/href\u003e",
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "消息相关"
+ ],
+ "summary": "管理员批量发送群聊单聊消息",
+ "operationId": "ManagementBatchSendMsg",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "im token",
+ "name": "token",
+ "in": "header",
+ "required": true
+ },
+ {
+ "description": "该请求和消息结构体一样 \u003cbr\u003e recvIDList为接受消息的用户ID列表",
+ "name": "管理员批量发送单聊消息",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "allOf": [
+ {
+ "$ref": "#/definitions/base_info.ManagementBatchSendMsgReq"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "content": {
+ "$ref": "#/definitions/Open_IM_internal_api_manage.TextElem"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "description": "该请求和消息结构体一样 \u003cbr\u003e recvIDList为接受消息的用户ID列表",
+ "name": "管理员批量发送OA通知",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "allOf": [
+ {
+ "$ref": "#/definitions/base_info.ManagementSendMsgReq"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "content": {
+ "$ref": "#/definitions/Open_IM_internal_api_manage.OANotificationElem"
+ }
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "responses": {
+ "0": {
+ "description": "serverMsgID为服务器消息ID \u003cbr\u003e clientMsgID为客户端消息ID \u003cbr\u003e sendTime为发送消息时间",
+ "schema": {
+ "$ref": "#/definitions/base_info.ManagementBatchSendMsgReq"
+ }
+ },
+ "400": {
+ "description": "errCode为400 一般为参数输入错误, token未带上等",
+ "schema": {
+ "$ref": "#/definitions/base_info.ManagementBatchSendMsgReq"
+ }
+ },
+ "500": {
+ "description": "errCode为500 一般为服务器内部错误",
+ "schema": {
+ "$ref": "#/definitions/base_info.ManagementBatchSendMsgReq"
}
}
}
@@ -2047,13 +2244,13 @@
"400": {
"description": "errCode为400 一般为参数输入错误, token未带上等",
"schema": {
- "$ref": "#/definitions/base_info.CleanUpMsgResp"
+ "$ref": "#/definitions/base_info.Swagger400Resp"
}
},
"500": {
"description": "errCode为500 一般为服务器内部错误",
"schema": {
- "$ref": "#/definitions/base_info.CleanUpMsgResp"
+ "$ref": "#/definitions/base_info.Swagger500Resp"
}
}
}
@@ -2101,13 +2298,283 @@
"400": {
"description": "errCode为400 一般为参数输入错误, token未带上等",
"schema": {
- "$ref": "#/definitions/base_info.DelMsgResp"
+ "$ref": "#/definitions/base_info.Swagger400Resp"
}
},
"500": {
"description": "errCode为500 一般为服务器内部错误",
"schema": {
- "$ref": "#/definitions/base_info.DelMsgResp"
+ "$ref": "#/definitions/base_info.Swagger500Resp"
+ }
+ }
+ }
+ }
+ },
+ "/msg/get_all_conversations": {
+ "post": {
+ "description": "获取用户所有会话",
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "会话相关"
+ ],
+ "summary": "获取用户所有会话",
+ "operationId": "GetAllConversations",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "im token",
+ "name": "token",
+ "in": "header",
+ "required": true
+ },
+ {
+ "description": "ownerUserID为要获取的用户ID",
+ "name": "req",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/base_info.GetAllConversationsReq"
+ }
+ }
+ ],
+ "responses": {
+ "0": {
+ "description": "",
+ "schema": {
+ "$ref": "#/definitions/base_info.GetAllConversationsResp"
+ }
+ },
+ "400": {
+ "description": "errCode为400 一般为参数输入错误, token未带上等",
+ "schema": {
+ "$ref": "#/definitions/base_info.GetAllConversationsResp"
+ }
+ },
+ "500": {
+ "description": "errCode为500 一般为服务器内部错误",
+ "schema": {
+ "$ref": "#/definitions/base_info.GetAllConversationsResp"
+ }
+ }
+ }
+ }
+ },
+ "/msg/get_conversation": {
+ "post": {
+ "description": "根据会话ID获取会话",
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "会话相关"
+ ],
+ "summary": "根据会话ID获取会话",
+ "operationId": "GetConversation",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "im token",
+ "name": "token",
+ "in": "header",
+ "required": true
+ },
+ {
+ "description": "ownerUserID为要获取的用户ID\u003cbr\u003econversationID为要获取的会话ID",
+ "name": "req",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/base_info.GetConversationReq"
+ }
+ }
+ ],
+ "responses": {
+ "0": {
+ "description": "",
+ "schema": {
+ "$ref": "#/definitions/base_info.GetConversationResp"
+ }
+ },
+ "400": {
+ "description": "errCode为400 一般为参数输入错误, token未带上等",
+ "schema": {
+ "$ref": "#/definitions/base_info.GetConversationResp"
+ }
+ },
+ "500": {
+ "description": "errCode为500 一般为服务器内部错误",
+ "schema": {
+ "$ref": "#/definitions/base_info.GetConversationResp"
+ }
+ }
+ }
+ }
+ },
+ "/msg/get_conversations": {
+ "post": {
+ "description": "根据会话ID列表获取会话",
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "会话相关"
+ ],
+ "summary": "根据会话ID列表获取会话",
+ "operationId": "GetConversations",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "im token",
+ "name": "token",
+ "in": "header",
+ "required": true
+ },
+ {
+ "description": "ownerUserID为要获取的用户ID\u003cbr\u003econversationIDs为要获取的会话ID列表",
+ "name": "req",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/base_info.GetConversationsReq"
+ }
+ }
+ ],
+ "responses": {
+ "0": {
+ "description": "",
+ "schema": {
+ "$ref": "#/definitions/base_info.GetConversationsResp"
+ }
+ },
+ "400": {
+ "description": "errCode为400 一般为参数输入错误, token未带上等",
+ "schema": {
+ "$ref": "#/definitions/base_info.GetConversationsResp"
+ }
+ },
+ "500": {
+ "description": "errCode为500 一般为服务器内部错误",
+ "schema": {
+ "$ref": "#/definitions/base_info.GetConversationsResp"
+ }
+ }
+ }
+ }
+ },
+ "/msg/manage_send_msg": {
+ "post": {
+ "description": "管理员发送/撤回消息 消息格式详细见\u003ca href=\"https://doc.rentsoft.cn/#/server_doc/admin?id=%e6%b6%88%e6%81%af%e7%b1%bb%e5%9e%8b%e6%a0%bc%e5%bc%8f%e6%8f%8f%e8%bf%b0\"\u003e消息格式\u003c/href\u003e",
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "消息相关"
+ ],
+ "summary": "管理员发送/撤回消息",
+ "operationId": "ManagementSendMsg",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "im token",
+ "name": "token",
+ "in": "header",
+ "required": true
+ },
+ {
+ "description": "该请求和消息结构体一样",
+ "name": "管理员发送文字消息",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "allOf": [
+ {
+ "$ref": "#/definitions/base_info.ManagementSendMsgReq"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "content": {
+ "$ref": "#/definitions/Open_IM_internal_api_manage.TextElem"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "description": "该请求和消息结构体一样",
+ "name": "管理员发送OA通知消息",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "allOf": [
+ {
+ "$ref": "#/definitions/base_info.ManagementSendMsgReq"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "content": {
+ "$ref": "#/definitions/Open_IM_internal_api_manage.OANotificationElem"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "description": "该请求和消息结构体一样",
+ "name": "管理员撤回单聊消息",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "allOf": [
+ {
+ "$ref": "#/definitions/base_info.ManagementSendMsgReq"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "content": {
+ "$ref": "#/definitions/Open_IM_internal_api_manage.RevokeElem"
+ }
+ }
+ }
+ ]
+ }
+ }
+ ],
+ "responses": {
+ "0": {
+ "description": "serverMsgID为服务器消息ID \u003cbr\u003e clientMsgID为客户端消息ID \u003cbr\u003e sendTime为发送消息时间",
+ "schema": {
+ "$ref": "#/definitions/base_info.ManagementSendMsgResp"
+ }
+ },
+ "400": {
+ "description": "errCode为400 一般为参数输入错误, token未带上等",
+ "schema": {
+ "$ref": "#/definitions/base_info.ManagementSendMsgResp"
+ }
+ },
+ "500": {
+ "description": "errCode为500 一般为服务器内部错误",
+ "schema": {
+ "$ref": "#/definitions/base_info.ManagementSendMsgResp"
}
}
}
@@ -2923,6 +3390,690 @@
}
}
},
+ "/organization/create_department": {
+ "post": {
+ "description": "创建部门",
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "组织架构相关"
+ ],
+ "summary": "创建部门",
+ "operationId": "CreateDepartment",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "im token",
+ "name": "token",
+ "in": "header",
+ "required": true
+ },
+ {
+ "description": "请求",
+ "name": "req",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/base_info.CreateDepartmentReq"
+ }
+ }
+ ],
+ "responses": {
+ "0": {
+ "description": "",
+ "schema": {
+ "allOf": [
+ {
+ "$ref": "#/definitions/base_info.CreateDepartmentResp"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "data": {
+ "$ref": "#/definitions/server_api_params.Department"
+ }
+ }
+ }
+ ]
+ }
+ },
+ "400": {
+ "description": "errCode为400 一般为参数输入错误, token未带上等",
+ "schema": {
+ "$ref": "#/definitions/base_info.CreateDepartmentResp"
+ }
+ },
+ "500": {
+ "description": "errCode为500 一般为服务器内部错误",
+ "schema": {
+ "$ref": "#/definitions/base_info.CreateDepartmentResp"
+ }
+ }
+ }
+ }
+ },
+ "/organization/create_department_member": {
+ "post": {
+ "description": "创建部门用户",
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "组织架构相关"
+ ],
+ "summary": "创建部门用户",
+ "operationId": "CreateDepartmentMember",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "im token",
+ "name": "token",
+ "in": "header",
+ "required": true
+ },
+ {
+ "description": "请求",
+ "name": "req",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/base_info.CreateDepartmentMemberReq"
+ }
+ }
+ ],
+ "responses": {
+ "0": {
+ "description": "",
+ "schema": {
+ "$ref": "#/definitions/base_info.CreateDepartmentMemberResp"
+ }
+ },
+ "400": {
+ "description": "errCode为400 一般为参数输入错误, token未带上等",
+ "schema": {
+ "$ref": "#/definitions/base_info.CreateDepartmentMemberResp"
+ }
+ },
+ "500": {
+ "description": "errCode为500 一般为服务器内部错误",
+ "schema": {
+ "$ref": "#/definitions/base_info.CreateDepartmentMemberResp"
+ }
+ }
+ }
+ }
+ },
+ "/organization/create_organization_user": {
+ "post": {
+ "description": "组织架构导入用户",
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "组织架构相关"
+ ],
+ "summary": "组织架构导入用户",
+ "operationId": "CreateOrganizationUser",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "im token",
+ "name": "token",
+ "in": "header",
+ "required": true
+ },
+ {
+ "description": "请求",
+ "name": "req",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/base_info.CreateOrganizationUserReq"
+ }
+ }
+ ],
+ "responses": {
+ "0": {
+ "description": "",
+ "schema": {
+ "$ref": "#/definitions/base_info.CreateOrganizationUserResp"
+ }
+ },
+ "400": {
+ "description": "errCode为400 一般为参数输入错误, token未带上等",
+ "schema": {
+ "$ref": "#/definitions/base_info.CreateOrganizationUserResp"
+ }
+ },
+ "500": {
+ "description": "errCode为500 一般为服务器内部错误",
+ "schema": {
+ "$ref": "#/definitions/base_info.CreateOrganizationUserResp"
+ }
+ }
+ }
+ }
+ },
+ "/organization/delete_department": {
+ "post": {
+ "description": "删除部门",
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "组织架构相关"
+ ],
+ "summary": "删除部门",
+ "operationId": "DeleteDepartment",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "im token",
+ "name": "token",
+ "in": "header",
+ "required": true
+ },
+ {
+ "description": "请求",
+ "name": "req",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/base_info.DeleteDepartmentReq"
+ }
+ }
+ ],
+ "responses": {
+ "0": {
+ "description": "",
+ "schema": {
+ "$ref": "#/definitions/base_info.DeleteDepartmentResp"
+ }
+ },
+ "400": {
+ "description": "errCode为400 一般为参数输入错误, token未带上等",
+ "schema": {
+ "$ref": "#/definitions/base_info.DeleteDepartmentResp"
+ }
+ },
+ "500": {
+ "description": "errCode为500 一般为服务器内部错误",
+ "schema": {
+ "$ref": "#/definitions/base_info.DeleteDepartmentResp"
+ }
+ }
+ }
+ }
+ },
+ "/organization/delete_organization_user": {
+ "post": {
+ "description": "删除组织架构中某个用户",
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "组织架构相关"
+ ],
+ "summary": "删除组织架构中某个用户",
+ "operationId": "DeleteOrganizationUser",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "im token",
+ "name": "token",
+ "in": "header",
+ "required": true
+ },
+ {
+ "description": "请求",
+ "name": "req",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/base_info.DeleteOrganizationUserReq"
+ }
+ }
+ ],
+ "responses": {
+ "0": {
+ "description": "",
+ "schema": {
+ "$ref": "#/definitions/base_info.DeleteOrganizationUserResp"
+ }
+ },
+ "400": {
+ "description": "errCode为400 一般为参数输入错误, token未带上等",
+ "schema": {
+ "$ref": "#/definitions/base_info.DeleteOrganizationUserResp"
+ }
+ },
+ "500": {
+ "description": "errCode为500 一般为服务器内部错误",
+ "schema": {
+ "$ref": "#/definitions/base_info.DeleteOrganizationUserResp"
+ }
+ }
+ }
+ }
+ },
+ "/organization/delete_user_in_department": {
+ "post": {
+ "description": "删除部门中某个用户",
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "组织架构相关"
+ ],
+ "summary": "删除部门中某个用户",
+ "operationId": "DeleteUserInDepartment",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "im token",
+ "name": "token",
+ "in": "header",
+ "required": true
+ },
+ {
+ "description": "请求",
+ "name": "req",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/base_info.DeleteUserInDepartmentReq"
+ }
+ }
+ ],
+ "responses": {
+ "0": {
+ "description": "",
+ "schema": {
+ "$ref": "#/definitions/base_info.DeleteUserInDepartmentResp"
+ }
+ },
+ "400": {
+ "description": "errCode为400 一般为参数输入错误, token未带上等",
+ "schema": {
+ "$ref": "#/definitions/base_info.DeleteUserInDepartmentResp"
+ }
+ },
+ "500": {
+ "description": "errCode为500 一般为服务器内部错误",
+ "schema": {
+ "$ref": "#/definitions/base_info.DeleteUserInDepartmentResp"
+ }
+ }
+ }
+ }
+ },
+ "/organization/get_department_member": {
+ "post": {
+ "description": "获取部门中所有成员",
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "组织架构相关"
+ ],
+ "summary": "获取部门中所有成员",
+ "operationId": "GetDepartmentMember",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "im token",
+ "name": "token",
+ "in": "header",
+ "required": true
+ },
+ {
+ "description": "请求",
+ "name": "req",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/base_info.GetDepartmentMemberReq"
+ }
+ }
+ ],
+ "responses": {
+ "0": {
+ "description": "",
+ "schema": {
+ "allOf": [
+ {
+ "$ref": "#/definitions/base_info.GetDepartmentMemberResp"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "data": {
+ "$ref": "#/definitions/server_api_params.UserDepartmentMember"
+ }
+ }
+ }
+ ]
+ }
+ },
+ "400": {
+ "description": "errCode为400 一般为参数输入错误, token未带上等",
+ "schema": {
+ "$ref": "#/definitions/base_info.GetDepartmentMemberResp"
+ }
+ },
+ "500": {
+ "description": "errCode为500 一般为服务器内部错误",
+ "schema": {
+ "$ref": "#/definitions/base_info.GetDepartmentMemberResp"
+ }
+ }
+ }
+ }
+ },
+ "/organization/get_sub_department": {
+ "post": {
+ "description": "获取子部门列表",
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "组织架构相关"
+ ],
+ "summary": "获取子部门列表",
+ "operationId": "GetSubDepartment",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "im token",
+ "name": "token",
+ "in": "header",
+ "required": true
+ },
+ {
+ "description": "请求",
+ "name": "req",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/base_info.GetSubDepartmentReq"
+ }
+ }
+ ],
+ "responses": {
+ "0": {
+ "description": "",
+ "schema": {
+ "$ref": "#/definitions/base_info.GetSubDepartmentResp"
+ }
+ },
+ "400": {
+ "description": "errCode为400 一般为参数输入错误, token未带上等",
+ "schema": {
+ "$ref": "#/definitions/base_info.GetSubDepartmentResp"
+ }
+ },
+ "500": {
+ "description": "errCode为500 一般为服务器内部错误",
+ "schema": {
+ "$ref": "#/definitions/base_info.GetSubDepartmentResp"
+ }
+ }
+ }
+ }
+ },
+ "/organization/get_user_in_department": {
+ "post": {
+ "description": "获取部门中的所有用户",
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "组织架构相关"
+ ],
+ "summary": "获取部门中的所有用户",
+ "operationId": "GetUserInDepartment",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "im token",
+ "name": "token",
+ "in": "header",
+ "required": true
+ },
+ {
+ "description": "请求",
+ "name": "req",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/base_info.GetUserInDepartmentReq"
+ }
+ }
+ ],
+ "responses": {
+ "0": {
+ "description": "",
+ "schema": {
+ "allOf": [
+ {
+ "$ref": "#/definitions/base_info.GetUserInDepartmentResp"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "data": {
+ "$ref": "#/definitions/server_api_params.UserInDepartment"
+ }
+ }
+ }
+ ]
+ }
+ },
+ "400": {
+ "description": "errCode为400 一般为参数输入错误, token未带上等",
+ "schema": {
+ "$ref": "#/definitions/base_info.GetUserInDepartmentResp"
+ }
+ },
+ "500": {
+ "description": "errCode为500 一般为服务器内部错误",
+ "schema": {
+ "$ref": "#/definitions/base_info.GetUserInDepartmentResp"
+ }
+ }
+ }
+ }
+ },
+ "/organization/update_department": {
+ "post": {
+ "description": "更新部门信息",
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "组织架构相关"
+ ],
+ "summary": "更新部门信息",
+ "operationId": "UpdateDepartment",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "im token",
+ "name": "token",
+ "in": "header",
+ "required": true
+ },
+ {
+ "description": "请求",
+ "name": "req",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/base_info.UpdateDepartmentReq"
+ }
+ }
+ ],
+ "responses": {
+ "0": {
+ "description": "",
+ "schema": {
+ "$ref": "#/definitions/base_info.UpdateDepartmentResp"
+ }
+ },
+ "400": {
+ "description": "errCode为400 一般为参数输入错误, token未带上等",
+ "schema": {
+ "$ref": "#/definitions/base_info.UpdateDepartmentResp"
+ }
+ },
+ "500": {
+ "description": "errCode为500 一般为服务器内部错误",
+ "schema": {
+ "$ref": "#/definitions/base_info.UpdateDepartmentResp"
+ }
+ }
+ }
+ }
+ },
+ "/organization/update_organization_user": {
+ "post": {
+ "description": "更新组织架构中的用户",
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "组织架构相关"
+ ],
+ "summary": "更新组织架构中的用户",
+ "operationId": "UpdateOrganizationUser",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "im token",
+ "name": "token",
+ "in": "header",
+ "required": true
+ },
+ {
+ "description": "请求",
+ "name": "req",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/base_info.UpdateOrganizationUserReq"
+ }
+ }
+ ],
+ "responses": {
+ "0": {
+ "description": "",
+ "schema": {
+ "$ref": "#/definitions/base_info.UpdateOrganizationUserResp"
+ }
+ },
+ "400": {
+ "description": "errCode为400 一般为参数输入错误, token未带上等",
+ "schema": {
+ "$ref": "#/definitions/base_info.UpdateOrganizationUserResp"
+ }
+ },
+ "500": {
+ "description": "errCode为500 一般为服务器内部错误",
+ "schema": {
+ "$ref": "#/definitions/base_info.UpdateOrganizationUserResp"
+ }
+ }
+ }
+ }
+ },
+ "/organization/update_user_in_department": {
+ "post": {
+ "description": "更新部门中某个用户",
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "tags": [
+ "组织架构相关"
+ ],
+ "summary": "更新部门中某个用户",
+ "operationId": "UpdateUserInDepartment",
+ "parameters": [
+ {
+ "type": "string",
+ "description": "im token",
+ "name": "token",
+ "in": "header",
+ "required": true
+ },
+ {
+ "description": "请求",
+ "name": "req",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/base_info.UpdateUserInDepartmentReq"
+ }
+ }
+ ],
+ "responses": {
+ "0": {
+ "description": "",
+ "schema": {
+ "$ref": "#/definitions/base_info.UpdateUserInDepartmentResp"
+ }
+ },
+ "400": {
+ "description": "errCode为400 一般为参数输入错误, token未带上等",
+ "schema": {
+ "$ref": "#/definitions/base_info.UpdateUserInDepartmentResp"
+ }
+ },
+ "500": {
+ "description": "errCode为500 一般为服务器内部错误",
+ "schema": {
+ "$ref": "#/definitions/base_info.UpdateUserInDepartmentResp"
+ }
+ }
+ }
+ }
+ },
"/third/minio_upload": {
"post": {
"description": "minio上传文件(web api), 请注意本api请求为form并非json",
@@ -2977,13 +4128,13 @@
"400": {
"description": "errCode为400 一般为参数输入错误, token未带上等",
"schema": {
- "$ref": "#/definitions/base_info.MinioUploadFileResp"
+ "$ref": "#/definitions/base_info.Swagger400Resp"
}
},
"500": {
"description": "errCode为500 一般为服务器内部错误",
"schema": {
- "$ref": "#/definitions/base_info.MinioUploadFileResp"
+ "$ref": "#/definitions/base_info.Swagger500Resp"
}
}
}
@@ -3151,13 +4302,13 @@
"400": {
"description": "errCode为400 一般为参数输入错误, token未带上等",
"schema": {
- "$ref": "#/definitions/base_info.GetSelfUserInfoResp"
+ "$ref": "#/definitions/base_info.Swagger400Resp"
}
},
"500": {
"description": "errCode为500 一般为服务器内部错误",
"schema": {
- "$ref": "#/definitions/base_info.GetSelfUserInfoResp"
+ "$ref": "#/definitions/base_info.Swagger500Resp"
}
}
}
@@ -3199,19 +4350,34 @@
"0": {
"description": "",
"schema": {
- "$ref": "#/definitions/base_info.GetUsersInfoResp"
+ "allOf": [
+ {
+ "$ref": "#/definitions/base_info.GetUsersInfoResp"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "Data": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/server_api_params.PublicUserInfo"
+ }
+ }
+ }
+ }
+ ]
}
},
"400": {
"description": "errCode为400 一般为参数输入错误, token未带上等",
"schema": {
- "$ref": "#/definitions/base_info.GetUsersInfoResp"
+ "$ref": "#/definitions/base_info.Swagger400Resp"
}
},
"500": {
"description": "errCode为500 一般为服务器内部错误",
"schema": {
- "$ref": "#/definitions/base_info.GetUsersInfoResp"
+ "$ref": "#/definitions/base_info.Swagger500Resp"
}
}
}
@@ -3259,13 +4425,13 @@
"400": {
"description": "errCode为400 一般为参数输入错误, token未带上等",
"schema": {
- "$ref": "#/definitions/base_info.GetUsersOnlineStatusResp"
+ "$ref": "#/definitions/base_info.Swagger400Resp"
}
},
"500": {
"description": "errCode为500 一般为服务器内部错误",
"schema": {
- "$ref": "#/definitions/base_info.GetUsersOnlineStatusResp"
+ "$ref": "#/definitions/base_info.Swagger500Resp"
}
}
}
@@ -3294,7 +4460,7 @@
"required": true
},
{
- "description": "请求体",
+ "description": "globalRecvMsgOpt为全局免打扰设置0为关闭 1为开启",
"name": "req",
"in": "body",
"required": true,
@@ -3313,13 +4479,13 @@
"400": {
"description": "errCode为400 一般为参数输入错误, token未带上等",
"schema": {
- "$ref": "#/definitions/base_info.SetGlobalRecvMessageOptResp"
+ "$ref": "#/definitions/base_info.Swagger400Resp"
}
},
"500": {
"description": "errCode为500 一般为服务器内部错误",
"schema": {
- "$ref": "#/definitions/base_info.SetGlobalRecvMessageOptResp"
+ "$ref": "#/definitions/base_info.Swagger500Resp"
}
}
}
@@ -3367,13 +4533,13 @@
"400": {
"description": "errCode为400 一般为参数输入错误, token未带上等",
"schema": {
- "$ref": "#/definitions/base_info.UpdateUserInfoResp"
+ "$ref": "#/definitions/base_info.Swagger400Resp"
}
},
"500": {
"description": "errCode为500 一般为服务器内部错误",
"schema": {
- "$ref": "#/definitions/base_info.UpdateUserInfoResp"
+ "$ref": "#/definitions/base_info.Swagger500Resp"
}
}
}
@@ -3381,6 +4547,193 @@
}
},
"definitions": {
+ "Open_IM_internal_api_manage.FileElem": {
+ "type": "object",
+ "properties": {
+ "fileName": {
+ "type": "string"
+ },
+ "filePath": {
+ "type": "string"
+ },
+ "fileSize": {
+ "type": "integer"
+ },
+ "sourceURL": {
+ "type": "string"
+ },
+ "uuid": {
+ "type": "string"
+ }
+ }
+ },
+ "Open_IM_internal_api_manage.OANotificationElem": {
+ "type": "object",
+ "required": [
+ "notificationFaceURL",
+ "notificationName",
+ "notificationType",
+ "text"
+ ],
+ "properties": {
+ "ex": {
+ "type": "string"
+ },
+ "fileElem": {
+ "$ref": "#/definitions/Open_IM_internal_api_manage.FileElem"
+ },
+ "mixType": {
+ "type": "integer"
+ },
+ "notificationFaceURL": {
+ "type": "string"
+ },
+ "notificationName": {
+ "type": "string"
+ },
+ "notificationType": {
+ "type": "integer"
+ },
+ "pictureElem": {
+ "$ref": "#/definitions/Open_IM_internal_api_manage.PictureElem"
+ },
+ "soundElem": {
+ "$ref": "#/definitions/Open_IM_internal_api_manage.SoundElem"
+ },
+ "text": {
+ "type": "string"
+ },
+ "url": {
+ "type": "string"
+ },
+ "videoElem": {
+ "$ref": "#/definitions/Open_IM_internal_api_manage.VideoElem"
+ }
+ }
+ },
+ "Open_IM_internal_api_manage.PictureBaseInfo": {
+ "type": "object",
+ "properties": {
+ "height": {
+ "type": "integer"
+ },
+ "size": {
+ "type": "integer"
+ },
+ "type": {
+ "type": "string"
+ },
+ "url": {
+ "type": "string"
+ },
+ "uuid": {
+ "type": "string"
+ },
+ "width": {
+ "type": "integer"
+ }
+ }
+ },
+ "Open_IM_internal_api_manage.PictureElem": {
+ "type": "object",
+ "properties": {
+ "bigPicture": {
+ "$ref": "#/definitions/Open_IM_internal_api_manage.PictureBaseInfo"
+ },
+ "snapshotPicture": {
+ "$ref": "#/definitions/Open_IM_internal_api_manage.PictureBaseInfo"
+ },
+ "sourcePath": {
+ "type": "string"
+ },
+ "sourcePicture": {
+ "$ref": "#/definitions/Open_IM_internal_api_manage.PictureBaseInfo"
+ }
+ }
+ },
+ "Open_IM_internal_api_manage.RevokeElem": {
+ "type": "object",
+ "required": [
+ "revokeMsgClientID"
+ ],
+ "properties": {
+ "revokeMsgClientID": {
+ "type": "string"
+ }
+ }
+ },
+ "Open_IM_internal_api_manage.SoundElem": {
+ "type": "object",
+ "properties": {
+ "dataSize": {
+ "type": "integer"
+ },
+ "duration": {
+ "type": "integer"
+ },
+ "soundPath": {
+ "type": "string"
+ },
+ "sourceURL": {
+ "type": "string"
+ },
+ "uuid": {
+ "type": "string"
+ }
+ }
+ },
+ "Open_IM_internal_api_manage.TextElem": {
+ "type": "object",
+ "required": [
+ "text"
+ ],
+ "properties": {
+ "text": {
+ "type": "string"
+ }
+ }
+ },
+ "Open_IM_internal_api_manage.VideoElem": {
+ "type": "object",
+ "properties": {
+ "duration": {
+ "type": "integer"
+ },
+ "snapshotHeight": {
+ "type": "integer"
+ },
+ "snapshotPath": {
+ "type": "string"
+ },
+ "snapshotSize": {
+ "type": "integer"
+ },
+ "snapshotURL": {
+ "type": "string"
+ },
+ "snapshotUUID": {
+ "type": "string"
+ },
+ "snapshotWidth": {
+ "type": "integer"
+ },
+ "videoPath": {
+ "type": "string"
+ },
+ "videoSize": {
+ "type": "integer"
+ },
+ "videoType": {
+ "type": "string"
+ },
+ "videoURL": {
+ "type": "string"
+ },
+ "videoUUID": {
+ "type": "string"
+ }
+ }
+ },
"base_info.AccountCheckReq": {
"type": "object",
"required": [
@@ -3708,6 +5061,162 @@
}
}
},
+ "base_info.Conversation": {
+ "type": "object",
+ "required": [
+ "conversationID",
+ "conversationType",
+ "ownerUserID"
+ ],
+ "properties": {
+ "attachedInfo": {
+ "type": "string"
+ },
+ "conversationID": {
+ "type": "string"
+ },
+ "conversationType": {
+ "type": "integer"
+ },
+ "draftTextTime": {
+ "type": "integer"
+ },
+ "ex": {
+ "type": "string"
+ },
+ "groupAtType": {
+ "type": "integer"
+ },
+ "groupID": {
+ "type": "string"
+ },
+ "isNotInGroup": {
+ "type": "boolean"
+ },
+ "isPinned": {
+ "type": "boolean"
+ },
+ "isPrivateChat": {
+ "type": "boolean"
+ },
+ "ownerUserID": {
+ "type": "string"
+ },
+ "recvMsgOpt": {
+ "type": "integer",
+ "enum": [
+ 0,
+ 1,
+ 2
+ ]
+ },
+ "unreadCount": {
+ "type": "integer"
+ },
+ "userID": {
+ "type": "string"
+ }
+ }
+ },
+ "base_info.CreateDepartmentMemberReq": {
+ "type": "object",
+ "required": [
+ "operationID"
+ ],
+ "properties": {
+ "departmentID": {
+ "type": "string"
+ },
+ "ex": {
+ "type": "string"
+ },
+ "leader": {
+ "type": "integer"
+ },
+ "operationID": {
+ "type": "string"
+ },
+ "order": {
+ "type": "integer"
+ },
+ "position": {
+ "type": "string"
+ },
+ "status": {
+ "type": "integer"
+ },
+ "userID": {
+ "type": "string"
+ }
+ }
+ },
+ "base_info.CreateDepartmentMemberResp": {
+ "type": "object",
+ "properties": {
+ "errCode": {
+ "type": "integer"
+ },
+ "errMsg": {
+ "type": "string"
+ }
+ }
+ },
+ "base_info.CreateDepartmentReq": {
+ "type": "object",
+ "required": [
+ "operationID"
+ ],
+ "properties": {
+ "createTime": {
+ "type": "integer"
+ },
+ "departmentID": {
+ "type": "string"
+ },
+ "departmentType": {
+ "type": "integer"
+ },
+ "ex": {
+ "type": "string"
+ },
+ "faceURL": {
+ "type": "string"
+ },
+ "memberNum": {
+ "type": "integer"
+ },
+ "name": {
+ "type": "string"
+ },
+ "operationID": {
+ "type": "string"
+ },
+ "order": {
+ "type": "integer"
+ },
+ "parentID": {
+ "type": "string"
+ },
+ "subDepartmentNum": {
+ "type": "integer"
+ }
+ }
+ },
+ "base_info.CreateDepartmentResp": {
+ "type": "object",
+ "properties": {
+ "data": {
+ "type": "object",
+ "additionalProperties": true
+ },
+ "errCode": {
+ "type": "integer"
+ },
+ "errMsg": {
+ "type": "string"
+ }
+ }
+ },
"base_info.CreateGroupReq": {
"type": "object",
"required": [
@@ -3785,6 +5294,61 @@
}
}
},
+ "base_info.CreateOrganizationUserReq": {
+ "type": "object",
+ "required": [
+ "operationID"
+ ],
+ "properties": {
+ "birth": {
+ "type": "integer"
+ },
+ "createTime": {
+ "type": "integer"
+ },
+ "email": {
+ "type": "string"
+ },
+ "englishName": {
+ "type": "string"
+ },
+ "ex": {
+ "type": "string"
+ },
+ "faceURL": {
+ "type": "string"
+ },
+ "gender": {
+ "type": "integer"
+ },
+ "mobile": {
+ "type": "string"
+ },
+ "nickname": {
+ "type": "string"
+ },
+ "operationID": {
+ "type": "string"
+ },
+ "telephone": {
+ "type": "string"
+ },
+ "userID": {
+ "type": "string"
+ }
+ }
+ },
+ "base_info.CreateOrganizationUserResp": {
+ "type": "object",
+ "properties": {
+ "errCode": {
+ "type": "integer"
+ },
+ "errMsg": {
+ "type": "string"
+ }
+ }
+ },
"base_info.CreateTagReq": {
"type": "object",
"required": [
@@ -3886,6 +5450,32 @@
}
}
},
+ "base_info.DeleteDepartmentReq": {
+ "type": "object",
+ "required": [
+ "departmentID",
+ "operationID"
+ ],
+ "properties": {
+ "departmentID": {
+ "type": "string"
+ },
+ "operationID": {
+ "type": "string"
+ }
+ }
+ },
+ "base_info.DeleteDepartmentResp": {
+ "type": "object",
+ "properties": {
+ "errCode": {
+ "type": "integer"
+ },
+ "errMsg": {
+ "type": "string"
+ }
+ }
+ },
"base_info.DeleteFriendReq": {
"type": "object",
"required": [
@@ -3945,6 +5535,32 @@
}
}
},
+ "base_info.DeleteOrganizationUserReq": {
+ "type": "object",
+ "required": [
+ "operationID",
+ "userID"
+ ],
+ "properties": {
+ "operationID": {
+ "type": "string"
+ },
+ "userID": {
+ "type": "string"
+ }
+ }
+ },
+ "base_info.DeleteOrganizationUserResp": {
+ "type": "object",
+ "properties": {
+ "errCode": {
+ "type": "integer"
+ },
+ "errMsg": {
+ "type": "string"
+ }
+ }
+ },
"base_info.DeleteTagReq": {
"type": "object",
"required": [
@@ -3971,6 +5587,36 @@
}
}
},
+ "base_info.DeleteUserInDepartmentReq": {
+ "type": "object",
+ "required": [
+ "departmentID",
+ "operationID",
+ "userID"
+ ],
+ "properties": {
+ "departmentID": {
+ "type": "string"
+ },
+ "operationID": {
+ "type": "string"
+ },
+ "userID": {
+ "type": "string"
+ }
+ }
+ },
+ "base_info.DeleteUserInDepartmentResp": {
+ "type": "object",
+ "properties": {
+ "errCode": {
+ "type": "integer"
+ },
+ "errMsg": {
+ "type": "string"
+ }
+ }
+ },
"base_info.DismissGroupReq": {
"type": "object",
"required": [
@@ -3997,6 +5643,14 @@
}
}
},
+ "base_info.ExpireTime": {
+ "type": "object",
+ "properties": {
+ "expireTimeSeconds": {
+ "type": "integer"
+ }
+ }
+ },
"base_info.ForceLogoutReq": {
"type": "object",
"required": [
@@ -4031,6 +5685,38 @@
}
}
},
+ "base_info.GetAllConversationsReq": {
+ "type": "object",
+ "required": [
+ "operationID",
+ "ownerUserID"
+ ],
+ "properties": {
+ "operationID": {
+ "type": "string"
+ },
+ "ownerUserID": {
+ "type": "string"
+ }
+ }
+ },
+ "base_info.GetAllConversationsResp": {
+ "type": "object",
+ "properties": {
+ "data": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/base_info.Conversation"
+ }
+ },
+ "errCode": {
+ "type": "integer"
+ },
+ "errMsg": {
+ "type": "string"
+ }
+ }
+ },
"base_info.GetAllUsersUidReq": {
"type": "object",
"required": [
@@ -4075,6 +5761,104 @@
}
},
"base_info.GetBlackListResp": {
+ "type": "object",
+ "properties": {
+ "errCode": {
+ "type": "integer"
+ },
+ "errMsg": {
+ "type": "string"
+ }
+ }
+ },
+ "base_info.GetConversationReq": {
+ "type": "object",
+ "required": [
+ "conversationID",
+ "operationID",
+ "ownerUserID"
+ ],
+ "properties": {
+ "conversationID": {
+ "type": "string"
+ },
+ "operationID": {
+ "type": "string"
+ },
+ "ownerUserID": {
+ "type": "string"
+ }
+ }
+ },
+ "base_info.GetConversationResp": {
+ "type": "object",
+ "properties": {
+ "data": {
+ "$ref": "#/definitions/base_info.Conversation"
+ },
+ "errCode": {
+ "type": "integer"
+ },
+ "errMsg": {
+ "type": "string"
+ }
+ }
+ },
+ "base_info.GetConversationsReq": {
+ "type": "object",
+ "required": [
+ "conversationIDs",
+ "operationID",
+ "ownerUserID"
+ ],
+ "properties": {
+ "conversationIDs": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "operationID": {
+ "type": "string"
+ },
+ "ownerUserID": {
+ "type": "string"
+ }
+ }
+ },
+ "base_info.GetConversationsResp": {
+ "type": "object",
+ "properties": {
+ "data": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/base_info.Conversation"
+ }
+ },
+ "errCode": {
+ "type": "integer"
+ },
+ "errMsg": {
+ "type": "string"
+ }
+ }
+ },
+ "base_info.GetDepartmentMemberReq": {
+ "type": "object",
+ "required": [
+ "departmentID",
+ "operationID"
+ ],
+ "properties": {
+ "departmentID": {
+ "type": "string"
+ },
+ "operationID": {
+ "type": "string"
+ }
+ }
+ },
+ "base_info.GetDepartmentMemberResp": {
"type": "object",
"properties": {
"data": {
@@ -4110,13 +5894,6 @@
"base_info.GetFriendApplyListResp": {
"type": "object",
"properties": {
- "data": {
- "type": "array",
- "items": {
- "type": "object",
- "additionalProperties": true
- }
- },
"errCode": {
"type": "integer"
},
@@ -4143,13 +5920,6 @@
"base_info.GetFriendListResp": {
"type": "object",
"properties": {
- "data": {
- "type": "array",
- "items": {
- "type": "object",
- "additionalProperties": true
- }
- },
"errCode": {
"type": "integer"
},
@@ -4176,13 +5946,6 @@
"base_info.GetGroupAllMemberResp": {
"type": "object",
"properties": {
- "data": {
- "type": "array",
- "items": {
- "type": "object",
- "additionalProperties": true
- }
- },
"errCode": {
"type": "integer"
},
@@ -4210,13 +5973,6 @@
"base_info.GetGroupApplicationListResp": {
"type": "object",
"properties": {
- "data": {
- "type": "array",
- "items": {
- "type": "object",
- "additionalProperties": true
- }
- },
"errCode": {
"type": "integer"
},
@@ -4246,13 +6002,6 @@
"base_info.GetGroupInfoResp": {
"type": "object",
"properties": {
- "data": {
- "type": "array",
- "items": {
- "type": "object",
- "additionalProperties": true
- }
- },
"errCode": {
"type": "integer"
},
@@ -4286,13 +6035,6 @@
"base_info.GetGroupMembersInfoResp": {
"type": "object",
"properties": {
- "data": {
- "type": "array",
- "items": {
- "type": "object",
- "additionalProperties": true
- }
- },
"errCode": {
"type": "integer"
},
@@ -4319,13 +6061,6 @@
"base_info.GetJoinedGroupListResp": {
"type": "object",
"properties": {
- "data": {
- "type": "array",
- "items": {
- "type": "object",
- "additionalProperties": true
- }
- },
"errCode": {
"type": "integer"
},
@@ -4352,13 +6087,6 @@
"base_info.GetSelfApplyListResp": {
"type": "object",
"properties": {
- "data": {
- "type": "array",
- "items": {
- "type": "object",
- "additionalProperties": true
- }
- },
"errCode": {
"type": "integer"
},
@@ -4393,6 +6121,39 @@
}
}
},
+ "base_info.GetSubDepartmentReq": {
+ "type": "object",
+ "required": [
+ "departmentID",
+ "operationID"
+ ],
+ "properties": {
+ "departmentID": {
+ "type": "string"
+ },
+ "operationID": {
+ "type": "string"
+ }
+ }
+ },
+ "base_info.GetSubDepartmentResp": {
+ "type": "object",
+ "properties": {
+ "data": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "additionalProperties": true
+ }
+ },
+ "errCode": {
+ "type": "integer"
+ },
+ "errMsg": {
+ "type": "string"
+ }
+ }
+ },
"base_info.GetTagSendLogsReq": {
"type": "object",
"required": [
@@ -4487,6 +6248,36 @@
}
}
},
+ "base_info.GetUserInDepartmentReq": {
+ "type": "object",
+ "required": [
+ "operationID",
+ "userID"
+ ],
+ "properties": {
+ "operationID": {
+ "type": "string"
+ },
+ "userID": {
+ "type": "string"
+ }
+ }
+ },
+ "base_info.GetUserInDepartmentResp": {
+ "type": "object",
+ "properties": {
+ "data": {
+ "type": "object",
+ "additionalProperties": true
+ },
+ "errCode": {
+ "type": "integer"
+ },
+ "errMsg": {
+ "type": "string"
+ }
+ }
+ },
"base_info.GetUserReqGroupApplicationListReq": {
"type": "object",
"required": [
@@ -4947,19 +6738,135 @@
}
}
},
+ "base_info.ManagementBatchSendMsgReq": {
+ "type": "object",
+ "required": [
+ "contentType",
+ "operationID",
+ "sendID",
+ "sessionType"
+ ],
+ "properties": {
+ "contentType": {
+ "type": "integer"
+ },
+ "groupID": {
+ "type": "string"
+ },
+ "isOnlineOnly": {
+ "type": "boolean"
+ },
+ "offlinePushInfo": {
+ "$ref": "#/definitions/server_api_params.OfflinePushInfo"
+ },
+ "operationID": {
+ "type": "string"
+ },
+ "recvIDList": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "sendID": {
+ "type": "string"
+ },
+ "senderFaceURL": {
+ "type": "string"
+ },
+ "senderNickname": {
+ "type": "string"
+ },
+ "senderPlatformID": {
+ "type": "integer"
+ },
+ "sessionType": {
+ "type": "integer"
+ }
+ }
+ },
+ "base_info.ManagementSendMsgReq": {
+ "type": "object",
+ "required": [
+ "contentType",
+ "operationID",
+ "sendID",
+ "sessionType"
+ ],
+ "properties": {
+ "contentType": {
+ "type": "integer"
+ },
+ "groupID": {
+ "type": "string"
+ },
+ "isOnlineOnly": {
+ "type": "boolean"
+ },
+ "offlinePushInfo": {
+ "$ref": "#/definitions/server_api_params.OfflinePushInfo"
+ },
+ "operationID": {
+ "type": "string"
+ },
+ "recvID": {
+ "type": "string"
+ },
+ "sendID": {
+ "type": "string"
+ },
+ "senderFaceURL": {
+ "type": "string"
+ },
+ "senderNickname": {
+ "type": "string"
+ },
+ "senderPlatformID": {
+ "type": "integer"
+ },
+ "sessionType": {
+ "type": "integer"
+ }
+ }
+ },
+ "base_info.ManagementSendMsgResp": {
+ "type": "object",
+ "properties": {
+ "data": {
+ "$ref": "#/definitions/server_api_params.UserSendMsgResp"
+ },
+ "errCode": {
+ "type": "integer"
+ },
+ "errMsg": {
+ "type": "string"
+ }
+ }
+ },
"base_info.MinioUploadFileResp": {
"type": "object",
"properties": {
- "URL": {
- "type": "string"
+ "data": {
+ "type": "object",
+ "properties": {
+ "URL": {
+ "type": "string"
+ },
+ "newName": {
+ "type": "string"
+ },
+ "snapshotName": {
+ "type": "string"
+ },
+ "snapshotURL": {
+ "type": "string"
+ }
+ }
},
- "newName": {
- "type": "string"
+ "errCode": {
+ "type": "integer"
},
- "snapshotName": {
- "type": "string"
- },
- "snapshotURL": {
+ "errMsg": {
"type": "string"
}
}
@@ -5027,10 +6934,6 @@
"base_info.ParseTokenResp": {
"type": "object",
"properties": {
- "data": {
- "type": "object",
- "additionalProperties": true
- },
"errCode": {
"type": "integer"
},
@@ -5344,6 +7247,32 @@
}
}
},
+ "base_info.Swagger400Resp": {
+ "type": "object",
+ "properties": {
+ "errCode": {
+ "type": "integer",
+ "example": 400
+ },
+ "errMsg": {
+ "type": "string",
+ "example": "err msg"
+ }
+ }
+ },
+ "base_info.Swagger500Resp": {
+ "type": "object",
+ "properties": {
+ "errCode": {
+ "type": "integer",
+ "example": 500
+ },
+ "errMsg": {
+ "type": "string",
+ "example": "err msg"
+ }
+ }
+ },
"base_info.TransferGroupOwnerReq": {
"type": "object",
"required": [
@@ -5378,6 +7307,114 @@
}
}
},
+ "base_info.UpdateDepartmentReq": {
+ "type": "object",
+ "required": [
+ "departmentID",
+ "operationID"
+ ],
+ "properties": {
+ "createTime": {
+ "type": "integer"
+ },
+ "departmentID": {
+ "type": "string"
+ },
+ "departmentType": {
+ "type": "integer"
+ },
+ "ex": {
+ "type": "string"
+ },
+ "faceURL": {
+ "type": "string"
+ },
+ "memberNum": {
+ "type": "integer"
+ },
+ "name": {
+ "type": "string"
+ },
+ "operationID": {
+ "type": "string"
+ },
+ "order": {
+ "type": "integer"
+ },
+ "parentID": {
+ "type": "string"
+ },
+ "subDepartmentNum": {
+ "type": "integer"
+ }
+ }
+ },
+ "base_info.UpdateDepartmentResp": {
+ "type": "object",
+ "properties": {
+ "errCode": {
+ "type": "integer"
+ },
+ "errMsg": {
+ "type": "string"
+ }
+ }
+ },
+ "base_info.UpdateOrganizationUserReq": {
+ "type": "object",
+ "required": [
+ "operationID"
+ ],
+ "properties": {
+ "birth": {
+ "type": "integer"
+ },
+ "createTime": {
+ "type": "integer"
+ },
+ "email": {
+ "type": "string"
+ },
+ "englishName": {
+ "type": "string"
+ },
+ "ex": {
+ "type": "string"
+ },
+ "faceURL": {
+ "type": "string"
+ },
+ "gender": {
+ "type": "integer"
+ },
+ "mobile": {
+ "type": "string"
+ },
+ "nickname": {
+ "type": "string"
+ },
+ "operationID": {
+ "type": "string"
+ },
+ "telephone": {
+ "type": "string"
+ },
+ "userID": {
+ "type": "string"
+ }
+ }
+ },
+ "base_info.UpdateOrganizationUserResp": {
+ "type": "object",
+ "properties": {
+ "errCode": {
+ "type": "integer"
+ },
+ "errMsg": {
+ "type": "string"
+ }
+ }
+ },
"base_info.UpdateSelfUserInfoReq": {
"type": "object",
"required": [
@@ -5427,6 +7464,49 @@
}
}
},
+ "base_info.UpdateUserInDepartmentReq": {
+ "type": "object",
+ "required": [
+ "operationID"
+ ],
+ "properties": {
+ "departmentID": {
+ "type": "string"
+ },
+ "ex": {
+ "type": "string"
+ },
+ "leader": {
+ "type": "integer"
+ },
+ "operationID": {
+ "type": "string"
+ },
+ "order": {
+ "type": "integer"
+ },
+ "position": {
+ "type": "string"
+ },
+ "status": {
+ "type": "integer"
+ },
+ "userID": {
+ "type": "string"
+ }
+ }
+ },
+ "base_info.UpdateUserInDepartmentResp": {
+ "type": "object",
+ "properties": {
+ "errCode": {
+ "type": "integer"
+ },
+ "errMsg": {
+ "type": "string"
+ }
+ }
+ },
"base_info.UpdateUserInfoResp": {
"type": "object",
"properties": {
@@ -5640,6 +7720,193 @@
}
}
},
+ "internal_api_manage.FileElem": {
+ "type": "object",
+ "properties": {
+ "fileName": {
+ "type": "string"
+ },
+ "filePath": {
+ "type": "string"
+ },
+ "fileSize": {
+ "type": "integer"
+ },
+ "sourceURL": {
+ "type": "string"
+ },
+ "uuid": {
+ "type": "string"
+ }
+ }
+ },
+ "internal_api_manage.OANotificationElem": {
+ "type": "object",
+ "required": [
+ "notificationFaceURL",
+ "notificationName",
+ "notificationType",
+ "text"
+ ],
+ "properties": {
+ "ex": {
+ "type": "string"
+ },
+ "fileElem": {
+ "$ref": "#/definitions/internal_api_manage.FileElem"
+ },
+ "mixType": {
+ "type": "integer"
+ },
+ "notificationFaceURL": {
+ "type": "string"
+ },
+ "notificationName": {
+ "type": "string"
+ },
+ "notificationType": {
+ "type": "integer"
+ },
+ "pictureElem": {
+ "$ref": "#/definitions/internal_api_manage.PictureElem"
+ },
+ "soundElem": {
+ "$ref": "#/definitions/internal_api_manage.SoundElem"
+ },
+ "text": {
+ "type": "string"
+ },
+ "url": {
+ "type": "string"
+ },
+ "videoElem": {
+ "$ref": "#/definitions/internal_api_manage.VideoElem"
+ }
+ }
+ },
+ "internal_api_manage.PictureBaseInfo": {
+ "type": "object",
+ "properties": {
+ "height": {
+ "type": "integer"
+ },
+ "size": {
+ "type": "integer"
+ },
+ "type": {
+ "type": "string"
+ },
+ "url": {
+ "type": "string"
+ },
+ "uuid": {
+ "type": "string"
+ },
+ "width": {
+ "type": "integer"
+ }
+ }
+ },
+ "internal_api_manage.PictureElem": {
+ "type": "object",
+ "properties": {
+ "bigPicture": {
+ "$ref": "#/definitions/internal_api_manage.PictureBaseInfo"
+ },
+ "snapshotPicture": {
+ "$ref": "#/definitions/internal_api_manage.PictureBaseInfo"
+ },
+ "sourcePath": {
+ "type": "string"
+ },
+ "sourcePicture": {
+ "$ref": "#/definitions/internal_api_manage.PictureBaseInfo"
+ }
+ }
+ },
+ "internal_api_manage.RevokeElem": {
+ "type": "object",
+ "required": [
+ "revokeMsgClientID"
+ ],
+ "properties": {
+ "revokeMsgClientID": {
+ "type": "string"
+ }
+ }
+ },
+ "internal_api_manage.SoundElem": {
+ "type": "object",
+ "properties": {
+ "dataSize": {
+ "type": "integer"
+ },
+ "duration": {
+ "type": "integer"
+ },
+ "soundPath": {
+ "type": "string"
+ },
+ "sourceURL": {
+ "type": "string"
+ },
+ "uuid": {
+ "type": "string"
+ }
+ }
+ },
+ "internal_api_manage.TextElem": {
+ "type": "object",
+ "required": [
+ "text"
+ ],
+ "properties": {
+ "text": {
+ "type": "string"
+ }
+ }
+ },
+ "internal_api_manage.VideoElem": {
+ "type": "object",
+ "properties": {
+ "duration": {
+ "type": "integer"
+ },
+ "snapshotHeight": {
+ "type": "integer"
+ },
+ "snapshotPath": {
+ "type": "string"
+ },
+ "snapshotSize": {
+ "type": "integer"
+ },
+ "snapshotURL": {
+ "type": "string"
+ },
+ "snapshotUUID": {
+ "type": "string"
+ },
+ "snapshotWidth": {
+ "type": "integer"
+ },
+ "videoPath": {
+ "type": "string"
+ },
+ "videoSize": {
+ "type": "integer"
+ },
+ "videoType": {
+ "type": "string"
+ },
+ "videoURL": {
+ "type": "string"
+ },
+ "videoUUID": {
+ "type": "string"
+ }
+ }
+ },
"office.Comment": {
"type": "object",
"properties": {
@@ -5820,6 +8087,143 @@
}
}
},
+ "server_api_params.Department": {
+ "type": "object",
+ "properties": {
+ "createTime": {
+ "type": "integer"
+ },
+ "departmentID": {
+ "type": "string"
+ },
+ "departmentType": {
+ "type": "integer"
+ },
+ "ex": {
+ "type": "string"
+ },
+ "faceURL": {
+ "type": "string"
+ },
+ "memberNum": {
+ "type": "integer"
+ },
+ "name": {
+ "type": "string"
+ },
+ "order": {
+ "type": "integer"
+ },
+ "parentID": {
+ "type": "string"
+ },
+ "subDepartmentNum": {
+ "type": "integer"
+ }
+ }
+ },
+ "server_api_params.DepartmentMember": {
+ "type": "object",
+ "properties": {
+ "departmentID": {
+ "type": "string"
+ },
+ "ex": {
+ "type": "string"
+ },
+ "leader": {
+ "type": "integer"
+ },
+ "order": {
+ "type": "integer"
+ },
+ "position": {
+ "type": "string"
+ },
+ "status": {
+ "type": "integer"
+ },
+ "userID": {
+ "type": "string"
+ }
+ }
+ },
+ "server_api_params.FriendInfo": {
+ "type": "object",
+ "properties": {
+ "addSource": {
+ "type": "integer"
+ },
+ "createTime": {
+ "type": "integer"
+ },
+ "ex": {
+ "type": "string"
+ },
+ "friendUser": {
+ "$ref": "#/definitions/server_api_params.UserInfo"
+ },
+ "operatorUserID": {
+ "type": "string"
+ },
+ "ownerUserID": {
+ "type": "string"
+ },
+ "remark": {
+ "type": "string"
+ }
+ }
+ },
+ "server_api_params.FriendRequest": {
+ "type": "object",
+ "properties": {
+ "createTime": {
+ "type": "integer"
+ },
+ "ex": {
+ "type": "string"
+ },
+ "fromFaceURL": {
+ "type": "string"
+ },
+ "fromGender": {
+ "type": "integer"
+ },
+ "fromNickname": {
+ "type": "string"
+ },
+ "fromUserID": {
+ "type": "string"
+ },
+ "handleMsg": {
+ "type": "string"
+ },
+ "handleResult": {
+ "type": "integer"
+ },
+ "handleTime": {
+ "type": "integer"
+ },
+ "handlerUserID": {
+ "type": "string"
+ },
+ "reqMsg": {
+ "type": "string"
+ },
+ "toFaceURL": {
+ "type": "string"
+ },
+ "toGender": {
+ "type": "integer"
+ },
+ "toNickname": {
+ "type": "string"
+ },
+ "toUserID": {
+ "type": "string"
+ }
+ }
+ },
"server_api_params.GroupInfo": {
"type": "object",
"properties": {
@@ -5851,7 +8255,7 @@
"type": "integer"
},
"needVerification": {
- "$ref": "#/definitions/wrapperspb.Int32Value"
+ "type": "integer"
},
"notification": {
"type": "string"
@@ -5902,6 +8306,141 @@
}
}
},
+ "server_api_params.GroupRequest": {
+ "type": "object",
+ "properties": {
+ "ex": {
+ "type": "string"
+ },
+ "groupInfo": {
+ "$ref": "#/definitions/server_api_params.GroupInfo"
+ },
+ "handleMsg": {
+ "type": "string"
+ },
+ "handleResult": {
+ "type": "integer"
+ },
+ "handleTime": {
+ "type": "integer"
+ },
+ "handleUserID": {
+ "type": "string"
+ },
+ "reqMsg": {
+ "type": "string"
+ },
+ "reqTime": {
+ "type": "integer"
+ },
+ "userInfo": {
+ "$ref": "#/definitions/server_api_params.PublicUserInfo"
+ }
+ }
+ },
+ "server_api_params.OfflinePushInfo": {
+ "type": "object",
+ "properties": {
+ "desc": {
+ "type": "string"
+ },
+ "ex": {
+ "type": "string"
+ },
+ "iOSBadgeCount": {
+ "type": "boolean"
+ },
+ "iOSPushSound": {
+ "type": "string"
+ },
+ "title": {
+ "type": "string"
+ }
+ }
+ },
+ "server_api_params.OrganizationUser": {
+ "type": "object",
+ "properties": {
+ "birth": {
+ "type": "integer"
+ },
+ "createTime": {
+ "type": "integer"
+ },
+ "email": {
+ "type": "string"
+ },
+ "englishName": {
+ "type": "string"
+ },
+ "ex": {
+ "type": "string"
+ },
+ "faceURL": {
+ "type": "string"
+ },
+ "gender": {
+ "type": "integer"
+ },
+ "mobile": {
+ "type": "string"
+ },
+ "nickname": {
+ "type": "string"
+ },
+ "telephone": {
+ "type": "string"
+ },
+ "userID": {
+ "type": "string"
+ }
+ }
+ },
+ "server_api_params.PublicUserInfo": {
+ "type": "object",
+ "properties": {
+ "ex": {
+ "type": "string"
+ },
+ "faceURL": {
+ "type": "string"
+ },
+ "gender": {
+ "type": "integer"
+ },
+ "nickname": {
+ "type": "string"
+ },
+ "userID": {
+ "type": "string"
+ }
+ }
+ },
+ "server_api_params.UserDepartmentMember": {
+ "type": "object",
+ "properties": {
+ "departmentMember": {
+ "$ref": "#/definitions/server_api_params.DepartmentMember"
+ },
+ "organizationUser": {
+ "$ref": "#/definitions/server_api_params.OrganizationUser"
+ }
+ }
+ },
+ "server_api_params.UserInDepartment": {
+ "type": "object",
+ "properties": {
+ "departmentMemberList": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/server_api_params.DepartmentMember"
+ }
+ },
+ "organizationUser": {
+ "$ref": "#/definitions/server_api_params.OrganizationUser"
+ }
+ }
+ },
"server_api_params.UserInfo": {
"type": "object",
"properties": {
@@ -5940,6 +8479,20 @@
}
}
},
+ "server_api_params.UserSendMsgResp": {
+ "type": "object",
+ "properties": {
+ "clientMsgID": {
+ "type": "string"
+ },
+ "sendTime": {
+ "type": "integer"
+ },
+ "serverMsgID": {
+ "type": "string"
+ }
+ }
+ },
"user.AccountCheckResp_SingleUserStatus": {
"type": "object",
"properties": {
@@ -5950,15 +8503,6 @@
"type": "string"
}
}
- },
- "wrapperspb.Int32Value": {
- "type": "object",
- "properties": {
- "value": {
- "description": "The int32 value.",
- "type": "integer"
- }
- }
}
}
}
\ No newline at end of file
diff --git a/cmd/open_im_api/docs/swagger.yaml b/cmd/open_im_api/docs/swagger.yaml
index 07440bc83..f030e5353 100644
--- a/cmd/open_im_api/docs/swagger.yaml
+++ b/cmd/open_im_api/docs/swagger.yaml
@@ -1,4 +1,128 @@
+basePath: /
definitions:
+ Open_IM_internal_api_manage.FileElem:
+ properties:
+ fileName:
+ type: string
+ filePath:
+ type: string
+ fileSize:
+ type: integer
+ sourceURL:
+ type: string
+ uuid:
+ type: string
+ type: object
+ Open_IM_internal_api_manage.OANotificationElem:
+ properties:
+ ex:
+ type: string
+ fileElem:
+ $ref: '#/definitions/Open_IM_internal_api_manage.FileElem'
+ mixType:
+ type: integer
+ notificationFaceURL:
+ type: string
+ notificationName:
+ type: string
+ notificationType:
+ type: integer
+ pictureElem:
+ $ref: '#/definitions/Open_IM_internal_api_manage.PictureElem'
+ soundElem:
+ $ref: '#/definitions/Open_IM_internal_api_manage.SoundElem'
+ text:
+ type: string
+ url:
+ type: string
+ videoElem:
+ $ref: '#/definitions/Open_IM_internal_api_manage.VideoElem'
+ required:
+ - notificationFaceURL
+ - notificationName
+ - notificationType
+ - text
+ type: object
+ Open_IM_internal_api_manage.PictureBaseInfo:
+ properties:
+ height:
+ type: integer
+ size:
+ type: integer
+ type:
+ type: string
+ url:
+ type: string
+ uuid:
+ type: string
+ width:
+ type: integer
+ type: object
+ Open_IM_internal_api_manage.PictureElem:
+ properties:
+ bigPicture:
+ $ref: '#/definitions/Open_IM_internal_api_manage.PictureBaseInfo'
+ snapshotPicture:
+ $ref: '#/definitions/Open_IM_internal_api_manage.PictureBaseInfo'
+ sourcePath:
+ type: string
+ sourcePicture:
+ $ref: '#/definitions/Open_IM_internal_api_manage.PictureBaseInfo'
+ type: object
+ Open_IM_internal_api_manage.RevokeElem:
+ properties:
+ revokeMsgClientID:
+ type: string
+ required:
+ - revokeMsgClientID
+ type: object
+ Open_IM_internal_api_manage.SoundElem:
+ properties:
+ dataSize:
+ type: integer
+ duration:
+ type: integer
+ soundPath:
+ type: string
+ sourceURL:
+ type: string
+ uuid:
+ type: string
+ type: object
+ Open_IM_internal_api_manage.TextElem:
+ properties:
+ text:
+ type: string
+ required:
+ - text
+ type: object
+ Open_IM_internal_api_manage.VideoElem:
+ properties:
+ duration:
+ type: integer
+ snapshotHeight:
+ type: integer
+ snapshotPath:
+ type: string
+ snapshotSize:
+ type: integer
+ snapshotURL:
+ type: string
+ snapshotUUID:
+ type: string
+ snapshotWidth:
+ type: integer
+ videoPath:
+ type: string
+ videoSize:
+ type: integer
+ videoType:
+ type: string
+ videoURL:
+ type: string
+ videoUUID:
+ type: string
+ type: object
base_info.AccountCheckReq:
properties:
checkUserIDList:
@@ -218,6 +342,110 @@ definitions:
errMsg:
type: string
type: object
+ base_info.Conversation:
+ properties:
+ attachedInfo:
+ type: string
+ conversationID:
+ type: string
+ conversationType:
+ type: integer
+ draftTextTime:
+ type: integer
+ ex:
+ type: string
+ groupAtType:
+ type: integer
+ groupID:
+ type: string
+ isNotInGroup:
+ type: boolean
+ isPinned:
+ type: boolean
+ isPrivateChat:
+ type: boolean
+ ownerUserID:
+ type: string
+ recvMsgOpt:
+ enum:
+ - 0
+ - 1
+ - 2
+ type: integer
+ unreadCount:
+ type: integer
+ userID:
+ type: string
+ required:
+ - conversationID
+ - conversationType
+ - ownerUserID
+ type: object
+ base_info.CreateDepartmentMemberReq:
+ properties:
+ departmentID:
+ type: string
+ ex:
+ type: string
+ leader:
+ type: integer
+ operationID:
+ type: string
+ order:
+ type: integer
+ position:
+ type: string
+ status:
+ type: integer
+ userID:
+ type: string
+ required:
+ - operationID
+ type: object
+ base_info.CreateDepartmentMemberResp:
+ properties:
+ errCode:
+ type: integer
+ errMsg:
+ type: string
+ type: object
+ base_info.CreateDepartmentReq:
+ properties:
+ createTime:
+ type: integer
+ departmentID:
+ type: string
+ departmentType:
+ type: integer
+ ex:
+ type: string
+ faceURL:
+ type: string
+ memberNum:
+ type: integer
+ name:
+ type: string
+ operationID:
+ type: string
+ order:
+ type: integer
+ parentID:
+ type: string
+ subDepartmentNum:
+ type: integer
+ required:
+ - operationID
+ type: object
+ base_info.CreateDepartmentResp:
+ properties:
+ data:
+ additionalProperties: true
+ type: object
+ errCode:
+ type: integer
+ errMsg:
+ type: string
+ type: object
base_info.CreateGroupReq:
properties:
ex:
@@ -268,6 +496,42 @@ definitions:
errMsg:
type: string
type: object
+ base_info.CreateOrganizationUserReq:
+ properties:
+ birth:
+ type: integer
+ createTime:
+ type: integer
+ email:
+ type: string
+ englishName:
+ type: string
+ ex:
+ type: string
+ faceURL:
+ type: string
+ gender:
+ type: integer
+ mobile:
+ type: string
+ nickname:
+ type: string
+ operationID:
+ type: string
+ telephone:
+ type: string
+ userID:
+ type: string
+ required:
+ - operationID
+ type: object
+ base_info.CreateOrganizationUserResp:
+ properties:
+ errCode:
+ type: integer
+ errMsg:
+ type: string
+ type: object
base_info.CreateTagReq:
properties:
operationID:
@@ -336,6 +600,23 @@ definitions:
errMsg:
type: string
type: object
+ base_info.DeleteDepartmentReq:
+ properties:
+ departmentID:
+ type: string
+ operationID:
+ type: string
+ required:
+ - departmentID
+ - operationID
+ type: object
+ base_info.DeleteDepartmentResp:
+ properties:
+ errCode:
+ type: integer
+ errMsg:
+ type: string
+ type: object
base_info.DeleteFriendReq:
properties:
fromUserID:
@@ -375,6 +656,23 @@ definitions:
errMsg:
type: string
type: object
+ base_info.DeleteOrganizationUserReq:
+ properties:
+ operationID:
+ type: string
+ userID:
+ type: string
+ required:
+ - operationID
+ - userID
+ type: object
+ base_info.DeleteOrganizationUserResp:
+ properties:
+ errCode:
+ type: integer
+ errMsg:
+ type: string
+ type: object
base_info.DeleteTagReq:
properties:
operationID:
@@ -392,6 +690,26 @@ definitions:
errMsg:
type: string
type: object
+ base_info.DeleteUserInDepartmentReq:
+ properties:
+ departmentID:
+ type: string
+ operationID:
+ type: string
+ userID:
+ type: string
+ required:
+ - departmentID
+ - operationID
+ - userID
+ type: object
+ base_info.DeleteUserInDepartmentResp:
+ properties:
+ errCode:
+ type: integer
+ errMsg:
+ type: string
+ type: object
base_info.DismissGroupReq:
properties:
groupID:
@@ -409,6 +727,11 @@ definitions:
errMsg:
type: string
type: object
+ base_info.ExpireTime:
+ properties:
+ expireTimeSeconds:
+ type: integer
+ type: object
base_info.ForceLogoutReq:
properties:
fromUserID:
@@ -433,6 +756,27 @@ definitions:
errMsg:
type: string
type: object
+ base_info.GetAllConversationsReq:
+ properties:
+ operationID:
+ type: string
+ ownerUserID:
+ type: string
+ required:
+ - operationID
+ - ownerUserID
+ type: object
+ base_info.GetAllConversationsResp:
+ properties:
+ data:
+ items:
+ $ref: '#/definitions/base_info.Conversation'
+ type: array
+ errCode:
+ type: integer
+ errMsg:
+ type: string
+ type: object
base_info.GetAllUsersUidReq:
properties:
operationID:
@@ -462,6 +806,71 @@ definitions:
- operationID
type: object
base_info.GetBlackListResp:
+ properties:
+ errCode:
+ type: integer
+ errMsg:
+ type: string
+ type: object
+ base_info.GetConversationReq:
+ properties:
+ conversationID:
+ type: string
+ operationID:
+ type: string
+ ownerUserID:
+ type: string
+ required:
+ - conversationID
+ - operationID
+ - ownerUserID
+ type: object
+ base_info.GetConversationResp:
+ properties:
+ data:
+ $ref: '#/definitions/base_info.Conversation'
+ errCode:
+ type: integer
+ errMsg:
+ type: string
+ type: object
+ base_info.GetConversationsReq:
+ properties:
+ conversationIDs:
+ items:
+ type: string
+ type: array
+ operationID:
+ type: string
+ ownerUserID:
+ type: string
+ required:
+ - conversationIDs
+ - operationID
+ - ownerUserID
+ type: object
+ base_info.GetConversationsResp:
+ properties:
+ data:
+ items:
+ $ref: '#/definitions/base_info.Conversation'
+ type: array
+ errCode:
+ type: integer
+ errMsg:
+ type: string
+ type: object
+ base_info.GetDepartmentMemberReq:
+ properties:
+ departmentID:
+ type: string
+ operationID:
+ type: string
+ required:
+ - departmentID
+ - operationID
+ type: object
+ base_info.GetDepartmentMemberResp:
properties:
data:
items:
@@ -485,11 +894,6 @@ definitions:
type: object
base_info.GetFriendApplyListResp:
properties:
- data:
- items:
- additionalProperties: true
- type: object
- type: array
errCode:
type: integer
errMsg:
@@ -507,11 +911,6 @@ definitions:
type: object
base_info.GetFriendListResp:
properties:
- data:
- items:
- additionalProperties: true
- type: object
- type: array
errCode:
type: integer
errMsg:
@@ -529,11 +928,6 @@ definitions:
type: object
base_info.GetGroupAllMemberResp:
properties:
- data:
- items:
- additionalProperties: true
- type: object
- type: array
errCode:
type: integer
errMsg:
@@ -552,11 +946,6 @@ definitions:
type: object
base_info.GetGroupApplicationListResp:
properties:
- data:
- items:
- additionalProperties: true
- type: object
- type: array
errCode:
type: integer
errMsg:
@@ -576,11 +965,6 @@ definitions:
type: object
base_info.GetGroupInfoResp:
properties:
- data:
- items:
- additionalProperties: true
- type: object
- type: array
errCode:
type: integer
errMsg:
@@ -603,11 +987,6 @@ definitions:
type: object
base_info.GetGroupMembersInfoResp:
properties:
- data:
- items:
- additionalProperties: true
- type: object
- type: array
errCode:
type: integer
errMsg:
@@ -625,11 +1004,6 @@ definitions:
type: object
base_info.GetJoinedGroupListResp:
properties:
- data:
- items:
- additionalProperties: true
- type: object
- type: array
errCode:
type: integer
errMsg:
@@ -647,11 +1021,6 @@ definitions:
type: object
base_info.GetSelfApplyListResp:
properties:
- data:
- items:
- additionalProperties: true
- type: object
- type: array
errCode:
type: integer
errMsg:
@@ -674,6 +1043,28 @@ definitions:
errMsg:
type: string
type: object
+ base_info.GetSubDepartmentReq:
+ properties:
+ departmentID:
+ type: string
+ operationID:
+ type: string
+ required:
+ - departmentID
+ - operationID
+ type: object
+ base_info.GetSubDepartmentResp:
+ properties:
+ data:
+ items:
+ additionalProperties: true
+ type: object
+ type: array
+ errCode:
+ type: integer
+ errMsg:
+ type: string
+ type: object
base_info.GetTagSendLogsReq:
properties:
operationID:
@@ -736,6 +1127,26 @@ definitions:
errMsg:
type: string
type: object
+ base_info.GetUserInDepartmentReq:
+ properties:
+ operationID:
+ type: string
+ userID:
+ type: string
+ required:
+ - operationID
+ - userID
+ type: object
+ base_info.GetUserInDepartmentResp:
+ properties:
+ data:
+ additionalProperties: true
+ type: object
+ errCode:
+ type: integer
+ errMsg:
+ type: string
+ type: object
base_info.GetUserReqGroupApplicationListReq:
properties:
operationID:
@@ -1039,15 +1450,93 @@ definitions:
errMsg:
type: string
type: object
+ base_info.ManagementBatchSendMsgReq:
+ properties:
+ contentType:
+ type: integer
+ groupID:
+ type: string
+ isOnlineOnly:
+ type: boolean
+ offlinePushInfo:
+ $ref: '#/definitions/server_api_params.OfflinePushInfo'
+ operationID:
+ type: string
+ recvIDList:
+ items:
+ type: string
+ type: array
+ sendID:
+ type: string
+ senderFaceURL:
+ type: string
+ senderNickname:
+ type: string
+ senderPlatformID:
+ type: integer
+ sessionType:
+ type: integer
+ required:
+ - contentType
+ - operationID
+ - sendID
+ - sessionType
+ type: object
+ base_info.ManagementSendMsgReq:
+ properties:
+ contentType:
+ type: integer
+ groupID:
+ type: string
+ isOnlineOnly:
+ type: boolean
+ offlinePushInfo:
+ $ref: '#/definitions/server_api_params.OfflinePushInfo'
+ operationID:
+ type: string
+ recvID:
+ type: string
+ sendID:
+ type: string
+ senderFaceURL:
+ type: string
+ senderNickname:
+ type: string
+ senderPlatformID:
+ type: integer
+ sessionType:
+ type: integer
+ required:
+ - contentType
+ - operationID
+ - sendID
+ - sessionType
+ type: object
+ base_info.ManagementSendMsgResp:
+ properties:
+ data:
+ $ref: '#/definitions/server_api_params.UserSendMsgResp'
+ errCode:
+ type: integer
+ errMsg:
+ type: string
+ type: object
base_info.MinioUploadFileResp:
properties:
- URL:
- type: string
- newName:
- type: string
- snapshotName:
- type: string
- snapshotURL:
+ data:
+ properties:
+ URL:
+ type: string
+ newName:
+ type: string
+ snapshotName:
+ type: string
+ snapshotURL:
+ type: string
+ type: object
+ errCode:
+ type: integer
+ errMsg:
type: string
type: object
base_info.MuteGroupMemberReq:
@@ -1092,9 +1581,6 @@ definitions:
type: object
base_info.ParseTokenResp:
properties:
- data:
- additionalProperties: true
- type: object
errCode:
type: integer
errMsg:
@@ -1303,6 +1789,24 @@ definitions:
errMsg:
type: string
type: object
+ base_info.Swagger400Resp:
+ properties:
+ errCode:
+ example: 400
+ type: integer
+ errMsg:
+ example: err msg
+ type: string
+ type: object
+ base_info.Swagger500Resp:
+ properties:
+ errCode:
+ example: 500
+ type: integer
+ errMsg:
+ example: err msg
+ type: string
+ type: object
base_info.TransferGroupOwnerReq:
properties:
groupID:
@@ -1326,6 +1830,77 @@ definitions:
errMsg:
type: string
type: object
+ base_info.UpdateDepartmentReq:
+ properties:
+ createTime:
+ type: integer
+ departmentID:
+ type: string
+ departmentType:
+ type: integer
+ ex:
+ type: string
+ faceURL:
+ type: string
+ memberNum:
+ type: integer
+ name:
+ type: string
+ operationID:
+ type: string
+ order:
+ type: integer
+ parentID:
+ type: string
+ subDepartmentNum:
+ type: integer
+ required:
+ - departmentID
+ - operationID
+ type: object
+ base_info.UpdateDepartmentResp:
+ properties:
+ errCode:
+ type: integer
+ errMsg:
+ type: string
+ type: object
+ base_info.UpdateOrganizationUserReq:
+ properties:
+ birth:
+ type: integer
+ createTime:
+ type: integer
+ email:
+ type: string
+ englishName:
+ type: string
+ ex:
+ type: string
+ faceURL:
+ type: string
+ gender:
+ type: integer
+ mobile:
+ type: string
+ nickname:
+ type: string
+ operationID:
+ type: string
+ telephone:
+ type: string
+ userID:
+ type: string
+ required:
+ - operationID
+ type: object
+ base_info.UpdateOrganizationUserResp:
+ properties:
+ errCode:
+ type: integer
+ errMsg:
+ type: string
+ type: object
base_info.UpdateSelfUserInfoReq:
properties:
birth:
@@ -1362,6 +1937,34 @@ definitions:
- operationID
- userID
type: object
+ base_info.UpdateUserInDepartmentReq:
+ properties:
+ departmentID:
+ type: string
+ ex:
+ type: string
+ leader:
+ type: integer
+ operationID:
+ type: string
+ order:
+ type: integer
+ position:
+ type: string
+ status:
+ type: integer
+ userID:
+ type: string
+ required:
+ - operationID
+ type: object
+ base_info.UpdateUserInDepartmentResp:
+ properties:
+ errCode:
+ type: integer
+ errMsg:
+ type: string
+ type: object
base_info.UpdateUserInfoResp:
properties:
errCode:
@@ -1509,6 +2112,129 @@ definitions:
userName:
type: string
type: object
+ internal_api_manage.FileElem:
+ properties:
+ fileName:
+ type: string
+ filePath:
+ type: string
+ fileSize:
+ type: integer
+ sourceURL:
+ type: string
+ uuid:
+ type: string
+ type: object
+ internal_api_manage.OANotificationElem:
+ properties:
+ ex:
+ type: string
+ fileElem:
+ $ref: '#/definitions/internal_api_manage.FileElem'
+ mixType:
+ type: integer
+ notificationFaceURL:
+ type: string
+ notificationName:
+ type: string
+ notificationType:
+ type: integer
+ pictureElem:
+ $ref: '#/definitions/internal_api_manage.PictureElem'
+ soundElem:
+ $ref: '#/definitions/internal_api_manage.SoundElem'
+ text:
+ type: string
+ url:
+ type: string
+ videoElem:
+ $ref: '#/definitions/internal_api_manage.VideoElem'
+ required:
+ - notificationFaceURL
+ - notificationName
+ - notificationType
+ - text
+ type: object
+ internal_api_manage.PictureBaseInfo:
+ properties:
+ height:
+ type: integer
+ size:
+ type: integer
+ type:
+ type: string
+ url:
+ type: string
+ uuid:
+ type: string
+ width:
+ type: integer
+ type: object
+ internal_api_manage.PictureElem:
+ properties:
+ bigPicture:
+ $ref: '#/definitions/internal_api_manage.PictureBaseInfo'
+ snapshotPicture:
+ $ref: '#/definitions/internal_api_manage.PictureBaseInfo'
+ sourcePath:
+ type: string
+ sourcePicture:
+ $ref: '#/definitions/internal_api_manage.PictureBaseInfo'
+ type: object
+ internal_api_manage.RevokeElem:
+ properties:
+ revokeMsgClientID:
+ type: string
+ required:
+ - revokeMsgClientID
+ type: object
+ internal_api_manage.SoundElem:
+ properties:
+ dataSize:
+ type: integer
+ duration:
+ type: integer
+ soundPath:
+ type: string
+ sourceURL:
+ type: string
+ uuid:
+ type: string
+ type: object
+ internal_api_manage.TextElem:
+ properties:
+ text:
+ type: string
+ required:
+ - text
+ type: object
+ internal_api_manage.VideoElem:
+ properties:
+ duration:
+ type: integer
+ snapshotHeight:
+ type: integer
+ snapshotPath:
+ type: string
+ snapshotSize:
+ type: integer
+ snapshotURL:
+ type: string
+ snapshotUUID:
+ type: string
+ snapshotWidth:
+ type: integer
+ videoPath:
+ type: string
+ videoSize:
+ type: integer
+ videoType:
+ type: string
+ videoURL:
+ type: string
+ videoUUID:
+ type: string
+ type: object
office.Comment:
properties:
content:
@@ -1626,6 +2352,96 @@ definitions:
userID:
type: string
type: object
+ server_api_params.Department:
+ properties:
+ createTime:
+ type: integer
+ departmentID:
+ type: string
+ departmentType:
+ type: integer
+ ex:
+ type: string
+ faceURL:
+ type: string
+ memberNum:
+ type: integer
+ name:
+ type: string
+ order:
+ type: integer
+ parentID:
+ type: string
+ subDepartmentNum:
+ type: integer
+ type: object
+ server_api_params.DepartmentMember:
+ properties:
+ departmentID:
+ type: string
+ ex:
+ type: string
+ leader:
+ type: integer
+ order:
+ type: integer
+ position:
+ type: string
+ status:
+ type: integer
+ userID:
+ type: string
+ type: object
+ server_api_params.FriendInfo:
+ properties:
+ addSource:
+ type: integer
+ createTime:
+ type: integer
+ ex:
+ type: string
+ friendUser:
+ $ref: '#/definitions/server_api_params.UserInfo'
+ operatorUserID:
+ type: string
+ ownerUserID:
+ type: string
+ remark:
+ type: string
+ type: object
+ server_api_params.FriendRequest:
+ properties:
+ createTime:
+ type: integer
+ ex:
+ type: string
+ fromFaceURL:
+ type: string
+ fromGender:
+ type: integer
+ fromNickname:
+ type: string
+ fromUserID:
+ type: string
+ handleMsg:
+ type: string
+ handleResult:
+ type: integer
+ handleTime:
+ type: integer
+ handlerUserID:
+ type: string
+ reqMsg:
+ type: string
+ toFaceURL:
+ type: string
+ toGender:
+ type: integer
+ toNickname:
+ type: string
+ toUserID:
+ type: string
+ type: object
server_api_params.GroupInfo:
properties:
createTime:
@@ -1647,7 +2463,7 @@ definitions:
memberCount:
type: integer
needVerification:
- $ref: '#/definitions/wrapperspb.Int32Value'
+ type: integer
notification:
type: string
ownerUserID:
@@ -1680,6 +2496,94 @@ definitions:
userID:
type: string
type: object
+ server_api_params.GroupRequest:
+ properties:
+ ex:
+ type: string
+ groupInfo:
+ $ref: '#/definitions/server_api_params.GroupInfo'
+ handleMsg:
+ type: string
+ handleResult:
+ type: integer
+ handleTime:
+ type: integer
+ handleUserID:
+ type: string
+ reqMsg:
+ type: string
+ reqTime:
+ type: integer
+ userInfo:
+ $ref: '#/definitions/server_api_params.PublicUserInfo'
+ type: object
+ server_api_params.OfflinePushInfo:
+ properties:
+ desc:
+ type: string
+ ex:
+ type: string
+ iOSBadgeCount:
+ type: boolean
+ iOSPushSound:
+ type: string
+ title:
+ type: string
+ type: object
+ server_api_params.OrganizationUser:
+ properties:
+ birth:
+ type: integer
+ createTime:
+ type: integer
+ email:
+ type: string
+ englishName:
+ type: string
+ ex:
+ type: string
+ faceURL:
+ type: string
+ gender:
+ type: integer
+ mobile:
+ type: string
+ nickname:
+ type: string
+ telephone:
+ type: string
+ userID:
+ type: string
+ type: object
+ server_api_params.PublicUserInfo:
+ properties:
+ ex:
+ type: string
+ faceURL:
+ type: string
+ gender:
+ type: integer
+ nickname:
+ type: string
+ userID:
+ type: string
+ type: object
+ server_api_params.UserDepartmentMember:
+ properties:
+ departmentMember:
+ $ref: '#/definitions/server_api_params.DepartmentMember'
+ organizationUser:
+ $ref: '#/definitions/server_api_params.OrganizationUser'
+ type: object
+ server_api_params.UserInDepartment:
+ properties:
+ departmentMemberList:
+ items:
+ $ref: '#/definitions/server_api_params.DepartmentMember'
+ type: array
+ organizationUser:
+ $ref: '#/definitions/server_api_params.OrganizationUser'
+ type: object
server_api_params.UserInfo:
properties:
appMangerLevel:
@@ -1705,6 +2609,15 @@ definitions:
userID:
type: string
type: object
+ server_api_params.UserSendMsgResp:
+ properties:
+ clientMsgID:
+ type: string
+ sendTime:
+ type: integer
+ serverMsgID:
+ type: string
+ type: object
user.AccountCheckResp_SingleUserStatus:
properties:
accountStatus:
@@ -1712,14 +2625,14 @@ definitions:
userID:
type: string
type: object
- wrapperspb.Int32Value:
- properties:
- value:
- description: The int32 value.
- type: integer
- type: object
info:
contact: {}
+ description: open-IM-Server 的API服务器文档, 文档中所有请求都有一个operationID字段用于链路追踪
+ license:
+ name: Apache 2.0
+ url: http://www.apache.org/licenses/LICENSE-2.0.html
+ title: open-IM-Server API
+ version: "1.0"
paths:
/auth/force_logout:
post:
@@ -1733,7 +2646,7 @@ paths:
name: token
required: true
type: string
- - description: platform为平台ID, fromUserID为要执行强制登出的用户ID
+ - description: platform为平台ID
fromUserID为要执行强制登出的用户ID
in: body
name: req
required: true
@@ -1749,11 +2662,11 @@ paths:
"400":
description: errCode为400 一般为参数输入错误, token未带上等
schema:
- $ref: '#/definitions/base_info.ForceLogoutResp'
+ $ref: '#/definitions/base_info.Swagger400Resp'
"500":
description: errCode为500 一般为服务器内部错误
schema:
- $ref: '#/definitions/base_info.ForceLogoutResp'
+ $ref: '#/definitions/base_info.Swagger500Resp'
summary: 强制登出
tags:
- 鉴权认证
@@ -1761,7 +2674,7 @@ paths:
post:
consumes:
- application/json
- description: 解析用户token
+ description: 解析当前用户token(token在请求头中传入)
operationId: ParseToken
parameters:
- description: im token
@@ -1769,7 +2682,7 @@ paths:
name: token
required: true
type: string
- - description: secret为openIM密钥, 详细见服务端config.yaml secret字段, platform为平台ID
+ - description: secret为openIM密钥, 详细见服务端config.yaml secret字段
platform为平台ID
in: body
name: req
required: true
@@ -1781,23 +2694,28 @@ paths:
"0":
description: ""
schema:
- $ref: '#/definitions/base_info.ParseTokenResp'
+ allOf:
+ - $ref: '#/definitions/base_info.ParseTokenResp'
+ - properties:
+ Data:
+ $ref: '#/definitions/base_info.ExpireTime'
+ type: object
"400":
description: errCode为400 一般为参数输入错误, token未带上等
schema:
- $ref: '#/definitions/base_info.ParseTokenResp'
+ $ref: '#/definitions/base_info.Swagger400Resp'
"500":
description: errCode为500 一般为服务器内部错误
schema:
- $ref: '#/definitions/base_info.ParseTokenResp'
- summary: 解析token
+ $ref: '#/definitions/base_info.Swagger500Resp'
+ summary: 解析当前用户token
tags:
- 鉴权认证
/auth/user_register:
post:
consumes:
- application/json
- description: 用户登录
+ description: 用户注册
operationId: UserRegister
parameters:
- description: im token
@@ -1806,7 +2724,7 @@ paths:
required: true
type: string
- description: secret为openIM密钥, 详细见服务端config.yaml secret字段
platform为平台ID
-
ex为拓展字段
+
ex为拓展字段
gender为性别, 0为女, 1为男
in: body
name: req
required: true
@@ -1822,12 +2740,12 @@ paths:
"400":
description: errCode为400 一般为参数输入错误, token未带上等
schema:
- $ref: '#/definitions/base_info.UserRegisterResp'
+ $ref: '#/definitions/base_info.Swagger400Resp'
"500":
description: errCode为500 一般为服务器内部错误
schema:
- $ref: '#/definitions/base_info.UserRegisterResp'
- summary: 用户登录
+ $ref: '#/definitions/base_info.Swagger500Resp'
+ summary: 用户注册
tags:
- 鉴权认证
/auth/user_token:
@@ -1842,7 +2760,7 @@ paths:
name: token
required: true
type: string
- - description: secret为openIM密钥, 详细见服务端config.yaml secret字段, platform为平台ID
+ - description: secret为openIM密钥, 详细见服务端config.yaml secret字段
platform为平台ID
in: body
name: req
required: true
@@ -1858,11 +2776,11 @@ paths:
"400":
description: errCode为400 一般为参数输入错误, token未带上等
schema:
- $ref: '#/definitions/base_info.UserTokenResp'
+ $ref: '#/definitions/base_info.Swagger400Resp'
"500":
description: errCode为500 一般为服务器内部错误
schema:
- $ref: '#/definitions/base_info.UserTokenResp'
+ $ref: '#/definitions/base_info.Swagger500Resp'
summary: 用户登录
tags:
- 鉴权认证
@@ -1878,7 +2796,7 @@ paths:
name: token
required: true
type: string
- - description: fromUserID为设置的用户, toUserID为被设置的用户
+ - description: fromUserID为设置的用户
toUserID为被设置的用户
in: body
name: req
required: true
@@ -1894,11 +2812,11 @@ paths:
"400":
description: errCode为400 一般为参数输入错误, token未带上等
schema:
- $ref: '#/definitions/base_info.AddBlacklistResp'
+ $ref: '#/definitions/base_info.Swagger400Resp'
"500":
description: errCode为500 一般为服务器内部错误
schema:
- $ref: '#/definitions/base_info.AddBlacklistResp'
+ $ref: '#/definitions/base_info.Swagger500Resp'
summary: 添加黑名单
tags:
- 好友相关
@@ -1914,7 +2832,7 @@ paths:
name: token
required: true
type: string
- - description: reqMsg为申请信息, fromUserID为申请用户, toUserID为被添加用户
+ - description: reqMsg为申请信息
fromUserID为申请用户
toUserID为被添加用户
in: body
name: req
required: true
@@ -1930,11 +2848,11 @@ paths:
"400":
description: errCode为400 一般为参数输入错误, token未带上等
schema:
- $ref: '#/definitions/base_info.AddFriendResp'
+ $ref: '#/definitions/base_info.Swagger400Resp'
"500":
description: errCode为500 一般为服务器内部错误
schema:
- $ref: '#/definitions/base_info.AddFriendResp'
+ $ref: '#/definitions/base_info.Swagger500Resp'
summary: 添加好友
tags:
- 好友相关
@@ -1950,7 +2868,7 @@ paths:
name: token
required: true
type: string
- - description: fromUserID同意/拒绝的用户ID, toUserID为申请用户, handleMsg为处理信息, flag为具体操作,
+ - description: fromUserID同意/拒绝的用户ID
toUserID为申请用户D
handleMsg为处理信息
flag为具体操作,
1为同意, 2为拒绝
in: body
name: req
@@ -1967,11 +2885,11 @@ paths:
"400":
description: errCode为400 一般为参数输入错误, token未带上等
schema:
- $ref: '#/definitions/base_info.AddFriendResponseResp'
+ $ref: '#/definitions/base_info.Swagger400Resp'
"500":
description: errCode为500 一般为服务器内部错误
schema:
- $ref: '#/definitions/base_info.AddFriendResponseResp'
+ $ref: '#/definitions/base_info.Swagger500Resp'
summary: 同意/拒绝好友请求
tags:
- 好友相关
@@ -1987,7 +2905,7 @@ paths:
name: token
required: true
type: string
- - description: fromUserID为操作用户, toUserID为被删除用户
+ - description: fromUserID为操作用户
toUserID为被删除用户
in: body
name: req
required: true
@@ -2003,11 +2921,11 @@ paths:
"400":
description: errCode为400 一般为参数输入错误, token未带上等
schema:
- $ref: '#/definitions/base_info.DeleteFriendResp'
+ $ref: '#/definitions/base_info.Swagger400Resp'
"500":
description: errCode为500 一般为服务器内部错误
schema:
- $ref: '#/definitions/base_info.DeleteFriendResp'
+ $ref: '#/definitions/base_info.Swagger500Resp'
summary: 删除好友
tags:
- 好友相关
@@ -2035,15 +2953,22 @@ paths:
"0":
description: ""
schema:
- $ref: '#/definitions/base_info.GetBlackListResp'
+ allOf:
+ - $ref: '#/definitions/base_info.GetBlackListResp'
+ - properties:
+ data:
+ items:
+ $ref: '#/definitions/server_api_params.PublicUserInfo'
+ type: array
+ type: object
"400":
description: errCode为400 一般为参数输入错误, token未带上等
schema:
- $ref: '#/definitions/base_info.GetBlackListResp'
+ $ref: '#/definitions/base_info.Swagger500Resp'
"500":
description: errCode为500 一般为服务器内部错误
schema:
- $ref: '#/definitions/base_info.GetBlackListResp'
+ $ref: '#/definitions/base_info.Swagger400Resp'
summary: 获取黑名单列表
tags:
- 好友相关
@@ -2071,15 +2996,22 @@ paths:
"0":
description: ""
schema:
- $ref: '#/definitions/base_info.GetFriendApplyListResp'
+ allOf:
+ - $ref: '#/definitions/base_info.GetFriendApplyListResp'
+ - properties:
+ data:
+ items:
+ $ref: '#/definitions/server_api_params.FriendRequest'
+ type: array
+ type: object
"400":
description: errCode为400 一般为参数输入错误, token未带上等
schema:
- $ref: '#/definitions/base_info.GetFriendApplyListResp'
+ $ref: '#/definitions/base_info.Swagger400Resp'
"500":
description: errCode为500 一般为服务器内部错误
schema:
- $ref: '#/definitions/base_info.GetFriendApplyListResp'
+ $ref: '#/definitions/base_info.Swagger400Resp'
summary: 获取好友申请列表
tags:
- 好友相关
@@ -2107,15 +3039,22 @@ paths:
"0":
description: ""
schema:
- $ref: '#/definitions/base_info.GetFriendListResp'
+ allOf:
+ - $ref: '#/definitions/base_info.GetFriendListResp'
+ - properties:
+ data:
+ items:
+ $ref: '#/definitions/server_api_params.FriendInfo'
+ type: array
+ type: object
"400":
description: errCode为400 一般为参数输入错误, token未带上等
schema:
- $ref: '#/definitions/base_info.GetFriendListResp'
+ $ref: '#/definitions/base_info.Swagger400Resp'
"500":
description: errCode为500 一般为服务器内部错误
schema:
- $ref: '#/definitions/base_info.GetFriendListResp'
+ $ref: '#/definitions/base_info.Swagger500Resp'
summary: 获取用户的好友列表
tags:
- 好友相关
@@ -2143,15 +3082,22 @@ paths:
"0":
description: ""
schema:
- $ref: '#/definitions/base_info.GetSelfApplyListResp'
+ allOf:
+ - $ref: '#/definitions/base_info.GetSelfApplyListResp'
+ - properties:
+ data:
+ items:
+ $ref: '#/definitions/server_api_params.FriendRequest'
+ type: array
+ type: object
"400":
description: errCode为400 一般为参数输入错误, token未带上等
schema:
- $ref: '#/definitions/base_info.GetSelfApplyListResp'
+ $ref: '#/definitions/base_info.Swagger400Resp'
"500":
description: errCode为500 一般为服务器内部错误
schema:
- $ref: '#/definitions/base_info.GetSelfApplyListResp'
+ $ref: '#/definitions/base_info.Swagger500Resp'
summary: 获取自己的好友申请列表
tags:
- 好友相关
@@ -2167,7 +3113,7 @@ paths:
name: token
required: true
type: string
- - description: fromUserID批量加好友的用户ID, friendUserIDList为
+ - description: fromUserID批量加好友的用户ID
friendUserIDList为
in: body
name: req
required: true
@@ -2177,17 +3123,17 @@ paths:
- application/json
responses:
"0":
- description: data列表中对象的result-1为添加该用户失败, 0为成功
+ description: data列表中对象的result-1为添加该用户失败
0为成功
schema:
$ref: '#/definitions/base_info.ImportFriendResp'
"400":
description: errCode为400 一般为参数输入错误, token未带上等
schema:
- $ref: '#/definitions/base_info.ImportFriendResp'
+ $ref: '#/definitions/base_info.Swagger400Resp'
"500":
description: errCode为500 一般为服务器内部错误
schema:
- $ref: '#/definitions/base_info.ImportFriendResp'
+ $ref: '#/definitions/base_info.Swagger500Resp'
summary: 批量加好友
tags:
- 好友相关
@@ -2203,7 +3149,7 @@ paths:
name: token
required: true
type: string
- - description: fromUserID为请求用户, toUserID为要检查的用户
+ - description: fromUserID为请求用户
toUserID为要检查的用户
in: body
name: req
required: true
@@ -2219,11 +3165,11 @@ paths:
"400":
description: errCode为400 一般为参数输入错误, token未带上等
schema:
- $ref: '#/definitions/base_info.IsFriendResp'
+ $ref: '#/definitions/base_info.Swagger400Resp'
"500":
description: errCode为500 一般为服务器内部错误
schema:
- $ref: '#/definitions/base_info.IsFriendResp'
+ $ref: '#/definitions/base_info.Swagger500Resp'
summary: 检查用户之间是否为好友
tags:
- 好友相关
@@ -2255,11 +3201,11 @@ paths:
"400":
description: errCode为400 一般为参数输入错误, token未带上等
schema:
- $ref: '#/definitions/base_info.RemoveBlackListResp'
+ $ref: '#/definitions/base_info.Swagger400Resp'
"500":
description: errCode为500 一般为服务器内部错误
schema:
- $ref: '#/definitions/base_info.RemoveBlackListResp'
+ $ref: '#/definitions/base_info.Swagger500Resp'
summary: 把用户移除黑名单
tags:
- 好友相关
@@ -2275,7 +3221,7 @@ paths:
name: token
required: true
type: string
- - description: fromUserID为设置的用户, toUserID为被设置的用户, remark为好友备注
+ - description: fromUserID为设置的用户
toUserID为被设置的用户
remark为好友备注
in: body
name: req
required: true
@@ -2291,11 +3237,11 @@ paths:
"400":
description: errCode为400 一般为参数输入错误, token未带上等
schema:
- $ref: '#/definitions/base_info.SetFriendRemarkResp'
+ $ref: '#/definitions/base_info.Swagger400Resp'
"500":
description: errCode为500 一般为服务器内部错误
schema:
- $ref: '#/definitions/base_info.SetFriendRemarkResp'
+ $ref: '#/definitions/base_info.Swagger500Resp'
summary: 设置好友备注
tags:
- 好友相关
@@ -2327,11 +3273,11 @@ paths:
"400":
description: errCode为400 一般为参数输入错误, token未带上等
schema:
- $ref: '#/definitions/base_info.CancelMuteGroupResp'
+ $ref: '#/definitions/base_info.Swagger400Resp'
"500":
description: errCode为500 一般为服务器内部错误
schema:
- $ref: '#/definitions/base_info.CancelMuteGroupResp'
+ $ref: '#/definitions/base_info.Swagger500Resp'
summary: 取消禁言群组
tags:
- 群组相关
@@ -2363,11 +3309,11 @@ paths:
"400":
description: errCode为400 一般为参数输入错误, token未带上等
schema:
- $ref: '#/definitions/base_info.CancelMuteGroupMemberResp'
+ $ref: '#/definitions/base_info.Swagger400Resp'
"500":
description: errCode为500 一般为服务器内部错误
schema:
- $ref: '#/definitions/base_info.CancelMuteGroupMemberResp'
+ $ref: '#/definitions/base_info.Swagger500Resp'
summary: 取消禁言群成员
tags:
- 群组相关
@@ -2383,8 +3329,9 @@ paths:
name: token
required: true
type: string
- - description: ownerUserID为群主ID
ex为群扩展字段
roleLevel为群员角色,1为普通用户 2为群主
- 3为管理员
+ - description: groupType这里填0代表普通群
groupName为群名称
introduction为群介绍
+ notification为群公共
ownerUserID为群主ID
ex为群扩展字段
memberList中对象roleLevel为群员角色,1为普通用户
+ 2为群主 3为管理员
in: body
name: req
required: true
@@ -2405,11 +3352,11 @@ paths:
"400":
description: errCode为400 一般为参数输入错误, token未带上等
schema:
- $ref: '#/definitions/base_info.CreateGroupResp'
+ $ref: '#/definitions/base_info.Swagger400Resp'
"500":
description: errCode为500 一般为服务器内部错误
schema:
- $ref: '#/definitions/base_info.CreateGroupResp'
+ $ref: '#/definitions/base_info.Swagger500Resp'
summary: 创建群组
tags:
- 群组相关
@@ -2441,11 +3388,11 @@ paths:
"400":
description: errCode为400 一般为参数输入错误, token未带上等
schema:
- $ref: '#/definitions/base_info.DismissGroupResp'
+ $ref: '#/definitions/base_info.Swagger400Resp'
"500":
description: errCode为500 一般为服务器内部错误
schema:
- $ref: '#/definitions/base_info.DismissGroupResp'
+ $ref: '#/definitions/base_info.Swagger500Resp'
summary: 解散群组
tags:
- 群组相关
@@ -2484,11 +3431,11 @@ paths:
"400":
description: errCode为400 一般为参数输入错误, token未带上等
schema:
- $ref: '#/definitions/base_info.GetGroupAllMemberResp'
+ $ref: '#/definitions/base_info.Swagger400Resp'
"500":
description: errCode为500 一般为服务器内部错误
schema:
- $ref: '#/definitions/base_info.GetGroupAllMemberResp'
+ $ref: '#/definitions/base_info.Swagger500Resp'
summary: 获取全部群成员列表
tags:
- 群组相关
@@ -2504,7 +3451,7 @@ paths:
name: token
required: true
type: string
- - description: memberList为要获取群成员的群ID列表
+ - description: groupID为要获取的群ID
memberList为要获取群成员的群ID列表
in: body
name: req
required: true
@@ -2527,11 +3474,11 @@ paths:
"400":
description: errCode为400 一般为参数输入错误, token未带上等
schema:
- $ref: '#/definitions/base_info.GetGroupMembersInfoResp'
+ $ref: '#/definitions/base_info.Swagger400Resp'
"500":
description: errCode为500 一般为服务器内部错误
schema:
- $ref: '#/definitions/base_info.GetGroupMembersInfoResp'
+ $ref: '#/definitions/base_info.Swagger500Resp'
summary: 获取群成员信息
tags:
- 群组相关
@@ -2563,11 +3510,11 @@ paths:
"400":
description: errCode为400 一般为参数输入错误, token未带上等
schema:
- $ref: '#/definitions/base_info.GetGroupInfoResp'
+ $ref: '#/definitions/base_info.Swagger400Resp'
"500":
description: errCode为500 一般为服务器内部错误
schema:
- $ref: '#/definitions/base_info.GetGroupInfoResp'
+ $ref: '#/definitions/base_info.Swagger500Resp'
summary: 通过群ID列表获取群信息
tags:
- 群组相关
@@ -2606,11 +3553,11 @@ paths:
"400":
description: errCode为400 一般为参数输入错误, token未带上等
schema:
- $ref: '#/definitions/base_info.GetJoinedGroupListResp'
+ $ref: '#/definitions/base_info.Swagger400Resp'
"500":
description: errCode为500 一般为服务器内部错误
schema:
- $ref: '#/definitions/base_info.GetJoinedGroupListResp'
+ $ref: '#/definitions/base_info.Swagger500Resp'
summary: 获取用户加入群列表
tags:
- 群组相关
@@ -2638,15 +3585,22 @@ paths:
"0":
description: ""
schema:
- $ref: '#/definitions/base_info.GetGroupApplicationListResp'
+ allOf:
+ - $ref: '#/definitions/base_info.GetGroupApplicationListResp'
+ - properties:
+ data:
+ items:
+ $ref: '#/definitions/server_api_params.GroupRequest'
+ type: array
+ type: object
"400":
description: errCode为400 一般为参数输入错误, token未带上等
schema:
- $ref: '#/definitions/base_info.GetGroupApplicationListResp'
+ $ref: '#/definitions/base_info.Swagger400Resp'
"500":
description: errCode为500 一般为服务器内部错误
schema:
- $ref: '#/definitions/base_info.GetGroupApplicationListResp'
+ $ref: '#/definitions/base_info.Swagger500Resp'
summary: 获取用户收到的加群信息列表
tags:
- 群组相关
@@ -2674,15 +3628,22 @@ paths:
"0":
description: ""
schema:
- $ref: '#/definitions/base_info.GetGroupApplicationListResp'
+ allOf:
+ - $ref: '#/definitions/base_info.GetGroupApplicationListResp'
+ - properties:
+ data:
+ items:
+ $ref: '#/definitions/server_api_params.GroupRequest'
+ type: array
+ type: object
"400":
description: errCode为400 一般为参数输入错误, token未带上等
schema:
- $ref: '#/definitions/base_info.GetGroupApplicationListResp'
+ $ref: '#/definitions/base_info.Swagger400Resp'
"500":
description: errCode为500 一般为服务器内部错误
schema:
- $ref: '#/definitions/base_info.GetGroupApplicationListResp'
+ $ref: '#/definitions/base_info.Swagger500Resp'
summary: 获取用户加群申请列表
tags:
- 群组相关
@@ -2715,11 +3676,11 @@ paths:
"400":
description: errCode为400 一般为参数输入错误, token未带上等
schema:
- $ref: '#/definitions/base_info.ApplicationGroupResponseResp'
+ $ref: '#/definitions/base_info.Swagger400Resp'
"500":
description: errCode为500 一般为服务器内部错误
schema:
- $ref: '#/definitions/base_info.ApplicationGroupResponseResp'
+ $ref: '#/definitions/base_info.Swagger500Resp'
summary: 处理加群消息
tags:
- 群组相关
@@ -2751,11 +3712,11 @@ paths:
"400":
description: errCode为400 一般为参数输入错误, token未带上等
schema:
- $ref: '#/definitions/base_info.InviteUserToGroupResp'
+ $ref: '#/definitions/base_info.Swagger400Resp'
"500":
description: errCode为500 一般为服务器内部错误
schema:
- $ref: '#/definitions/base_info.InviteUserToGroupResp'
+ $ref: '#/definitions/base_info.Swagger500Resp'
summary: 将用户拉入群组
tags:
- 群组相关
@@ -2771,7 +3732,7 @@ paths:
name: token
required: true
type: string
- - description: reqMessage为申请进群信息
+ - description: reqMessage为申请进群信息
groupID为申请的群ID
in: body
name: req
required: true
@@ -2787,11 +3748,11 @@ paths:
"400":
description: errCode为400 一般为参数输入错误, token未带上等
schema:
- $ref: '#/definitions/base_info.JoinGroupResp'
+ $ref: '#/definitions/base_info.Swagger400Resp'
"500":
description: errCode为500 一般为服务器内部错误
schema:
- $ref: '#/definitions/base_info.JoinGroupResp'
+ $ref: '#/definitions/base_info.Swagger500Resp'
summary: 加入群聊
tags:
- 群组相关
@@ -2823,11 +3784,11 @@ paths:
"400":
description: errCode为400 一般为参数输入错误, token未带上等
schema:
- $ref: '#/definitions/base_info.KickGroupMemberResp'
+ $ref: '#/definitions/base_info.Swagger400Resp'
"500":
description: errCode为500 一般为服务器内部错误
schema:
- $ref: '#/definitions/base_info.KickGroupMemberResp'
+ $ref: '#/definitions/base_info.Swagger500Resp'
summary: 把用户踢出群组
tags:
- 群组相关
@@ -2895,11 +3856,11 @@ paths:
"400":
description: errCode为400 一般为参数输入错误, token未带上等
schema:
- $ref: '#/definitions/base_info.DismissGroupResp'
+ $ref: '#/definitions/base_info.Swagger400Resp'
"500":
description: errCode为500 一般为服务器内部错误
schema:
- $ref: '#/definitions/base_info.DismissGroupResp'
+ $ref: '#/definitions/base_info.Swagger500Resp'
summary: 禁言群成员
tags:
- 群组相关
@@ -2907,7 +3868,7 @@ paths:
post:
consumes:
- application/json
- description: 退出群聊
+ description: 当前用户退出群聊
operationId: QuitGroup
parameters:
- description: im token
@@ -2931,12 +3892,12 @@ paths:
"400":
description: errCode为400 一般为参数输入错误, token未带上等
schema:
- $ref: '#/definitions/base_info.QuitGroupResp'
+ $ref: '#/definitions/base_info.Swagger400Resp'
"500":
description: errCode为500 一般为服务器内部错误
schema:
- $ref: '#/definitions/base_info.QuitGroupResp'
- summary: 退出群聊
+ $ref: '#/definitions/base_info.Swagger500Resp'
+ summary: 当前用户退出群聊
tags:
- 群组相关
/group/set_group_info:
@@ -2951,8 +3912,8 @@ paths:
name: token
required: true
type: string
- - description: notification为群介绍
introduction为群公告
needVerification为加群验证
- 0为申请需要同意 邀请直接进 1为所有人进群需要验证,除了群主管理员邀请进群 2为直接进群
+ - description: groupID为要修改的群ID
groupName为新的群名称
notification为群介绍
introduction为群公告
+
needVerification为加群验证 0为申请需要同意 邀请直接进 1为所有人进群需要验证,除了群主管理员邀请进群 2为直接进群
in: body
name: req
required: true
@@ -2968,11 +3929,11 @@ paths:
"400":
description: errCode为400 一般为参数输入错误, token未带上等
schema:
- $ref: '#/definitions/base_info.SetGroupInfoResp'
+ $ref: '#/definitions/base_info.Swagger400Resp'
"500":
description: errCode为500 一般为服务器内部错误
schema:
- $ref: '#/definitions/base_info.SetGroupInfoResp'
+ $ref: '#/definitions/base_info.Swagger500Resp'
summary: 设置群信息
tags:
- 群组相关
@@ -2988,7 +3949,8 @@ paths:
name: token
required: true
type: string
- - description: 除了operationID, userID, groupID其他参数可选
+ - description: 除了operationID, userID, groupID其他参数可选
ex为拓展字段
faceURL为群头像
nickName为群昵称
roleLevel为群员角色,1为普通用户
+ 2为群主 3为管理员
in: body
name: req
required: true
@@ -3004,11 +3966,11 @@ paths:
"400":
description: errCode为400 一般为参数输入错误, token未带上等
schema:
- $ref: '#/definitions/base_info.SetGroupMemberInfoResp'
+ $ref: '#/definitions/base_info.Swagger400Resp'
"500":
description: errCode为500 一般为服务器内部错误
schema:
- $ref: '#/definitions/base_info.SetGroupMemberInfoResp'
+ $ref: '#/definitions/base_info.Swagger500Resp'
summary: 修改群成员信息
tags:
- 群组相关
@@ -3040,14 +4002,66 @@ paths:
"400":
description: errCode为400 一般为参数输入错误, token未带上等
schema:
- $ref: '#/definitions/base_info.TransferGroupOwnerResp'
+ $ref: '#/definitions/base_info.Swagger400Resp'
"500":
description: errCode为500 一般为服务器内部错误
schema:
- $ref: '#/definitions/base_info.TransferGroupOwnerResp'
+ $ref: '#/definitions/base_info.Swagger500Resp'
summary: 转让群主
tags:
- 群组相关
+ /msg/batch_send_msg:
+ post:
+ consumes:
+ - application/json
+ description: 管理员批量发送群聊单聊消息 消息格式详细见消息格式
+ operationId: ManagementBatchSendMsg
+ parameters:
+ - description: im token
+ in: header
+ name: token
+ required: true
+ type: string
+ - description: 该请求和消息结构体一样
recvIDList为接受消息的用户ID列表
+ in: body
+ name: 管理员批量发送单聊消息
+ required: true
+ schema:
+ allOf:
+ - $ref: '#/definitions/base_info.ManagementBatchSendMsgReq'
+ - properties:
+ content:
+ $ref: '#/definitions/Open_IM_internal_api_manage.TextElem'
+ type: object
+ - description: 该请求和消息结构体一样
recvIDList为接受消息的用户ID列表
+ in: body
+ name: 管理员批量发送OA通知
+ required: true
+ schema:
+ allOf:
+ - $ref: '#/definitions/base_info.ManagementSendMsgReq'
+ - properties:
+ content:
+ $ref: '#/definitions/Open_IM_internal_api_manage.OANotificationElem'
+ type: object
+ produces:
+ - application/json
+ responses:
+ "0":
+ description: serverMsgID为服务器消息ID
clientMsgID为客户端消息ID
sendTime为发送消息时间
+ schema:
+ $ref: '#/definitions/base_info.ManagementBatchSendMsgReq'
+ "400":
+ description: errCode为400 一般为参数输入错误, token未带上等
+ schema:
+ $ref: '#/definitions/base_info.ManagementBatchSendMsgReq'
+ "500":
+ description: errCode为500 一般为服务器内部错误
+ schema:
+ $ref: '#/definitions/base_info.ManagementBatchSendMsgReq'
+ summary: 管理员批量发送群聊单聊消息
+ tags:
+ - 消息相关
/msg/clear_msg:
post:
consumes:
@@ -3076,11 +4090,11 @@ paths:
"400":
description: errCode为400 一般为参数输入错误, token未带上等
schema:
- $ref: '#/definitions/base_info.CleanUpMsgResp'
+ $ref: '#/definitions/base_info.Swagger400Resp'
"500":
description: errCode为500 一般为服务器内部错误
schema:
- $ref: '#/definitions/base_info.CleanUpMsgResp'
+ $ref: '#/definitions/base_info.Swagger500Resp'
summary: 清空用户消息
tags:
- 消息相关
@@ -3112,14 +4126,185 @@ paths:
"400":
description: errCode为400 一般为参数输入错误, token未带上等
schema:
- $ref: '#/definitions/base_info.DelMsgResp'
+ $ref: '#/definitions/base_info.Swagger400Resp'
"500":
description: errCode为500 一般为服务器内部错误
schema:
- $ref: '#/definitions/base_info.DelMsgResp'
+ $ref: '#/definitions/base_info.Swagger500Resp'
summary: 根据seq列表删除消息
tags:
- 消息相关
+ /msg/get_all_conversations:
+ post:
+ consumes:
+ - application/json
+ description: 获取用户所有会话
+ operationId: GetAllConversations
+ parameters:
+ - description: im token
+ in: header
+ name: token
+ required: true
+ type: string
+ - description: ownerUserID为要获取的用户ID
+ in: body
+ name: req
+ required: true
+ schema:
+ $ref: '#/definitions/base_info.GetAllConversationsReq'
+ produces:
+ - application/json
+ responses:
+ "0":
+ description: ""
+ schema:
+ $ref: '#/definitions/base_info.GetAllConversationsResp'
+ "400":
+ description: errCode为400 一般为参数输入错误, token未带上等
+ schema:
+ $ref: '#/definitions/base_info.GetAllConversationsResp'
+ "500":
+ description: errCode为500 一般为服务器内部错误
+ schema:
+ $ref: '#/definitions/base_info.GetAllConversationsResp'
+ summary: 获取用户所有会话
+ tags:
+ - 会话相关
+ /msg/get_conversation:
+ post:
+ consumes:
+ - application/json
+ description: 根据会话ID获取会话
+ operationId: GetConversation
+ parameters:
+ - description: im token
+ in: header
+ name: token
+ required: true
+ type: string
+ - description: ownerUserID为要获取的用户ID
conversationID为要获取的会话ID
+ in: body
+ name: req
+ required: true
+ schema:
+ $ref: '#/definitions/base_info.GetConversationReq'
+ produces:
+ - application/json
+ responses:
+ "0":
+ description: ""
+ schema:
+ $ref: '#/definitions/base_info.GetConversationResp'
+ "400":
+ description: errCode为400 一般为参数输入错误, token未带上等
+ schema:
+ $ref: '#/definitions/base_info.GetConversationResp'
+ "500":
+ description: errCode为500 一般为服务器内部错误
+ schema:
+ $ref: '#/definitions/base_info.GetConversationResp'
+ summary: 根据会话ID获取会话
+ tags:
+ - 会话相关
+ /msg/get_conversations:
+ post:
+ consumes:
+ - application/json
+ description: 根据会话ID列表获取会话
+ operationId: GetConversations
+ parameters:
+ - description: im token
+ in: header
+ name: token
+ required: true
+ type: string
+ - description: ownerUserID为要获取的用户ID
conversationIDs为要获取的会话ID列表
+ in: body
+ name: req
+ required: true
+ schema:
+ $ref: '#/definitions/base_info.GetConversationsReq'
+ produces:
+ - application/json
+ responses:
+ "0":
+ description: ""
+ schema:
+ $ref: '#/definitions/base_info.GetConversationsResp'
+ "400":
+ description: errCode为400 一般为参数输入错误, token未带上等
+ schema:
+ $ref: '#/definitions/base_info.GetConversationsResp'
+ "500":
+ description: errCode为500 一般为服务器内部错误
+ schema:
+ $ref: '#/definitions/base_info.GetConversationsResp'
+ summary: 根据会话ID列表获取会话
+ tags:
+ - 会话相关
+ /msg/manage_send_msg:
+ post:
+ consumes:
+ - application/json
+ description: 管理员发送/撤回消息 消息格式详细见消息格式
+ operationId: ManagementSendMsg
+ parameters:
+ - description: im token
+ in: header
+ name: token
+ required: true
+ type: string
+ - description: 该请求和消息结构体一样
+ in: body
+ name: 管理员发送文字消息
+ required: true
+ schema:
+ allOf:
+ - $ref: '#/definitions/base_info.ManagementSendMsgReq'
+ - properties:
+ content:
+ $ref: '#/definitions/Open_IM_internal_api_manage.TextElem'
+ type: object
+ - description: 该请求和消息结构体一样
+ in: body
+ name: 管理员发送OA通知消息
+ required: true
+ schema:
+ allOf:
+ - $ref: '#/definitions/base_info.ManagementSendMsgReq'
+ - properties:
+ content:
+ $ref: '#/definitions/Open_IM_internal_api_manage.OANotificationElem'
+ type: object
+ - description: 该请求和消息结构体一样
+ in: body
+ name: 管理员撤回单聊消息
+ required: true
+ schema:
+ allOf:
+ - $ref: '#/definitions/base_info.ManagementSendMsgReq'
+ - properties:
+ content:
+ $ref: '#/definitions/Open_IM_internal_api_manage.RevokeElem'
+ type: object
+ produces:
+ - application/json
+ responses:
+ "0":
+ description: serverMsgID为服务器消息ID
clientMsgID为客户端消息ID
sendTime为发送消息时间
+ schema:
+ $ref: '#/definitions/base_info.ManagementSendMsgResp'
+ "400":
+ description: errCode为400 一般为参数输入错误, token未带上等
+ schema:
+ $ref: '#/definitions/base_info.ManagementSendMsgResp'
+ "500":
+ description: errCode为500 一般为服务器内部错误
+ schema:
+ $ref: '#/definitions/base_info.ManagementSendMsgResp'
+ summary: 管理员发送/撤回消息
+ tags:
+ - 消息相关
/office/comment_one_work_moment:
post:
consumes:
@@ -3661,6 +4846,453 @@ paths:
summary: 修改标签
tags:
- 标签
+ /organization/create_department:
+ post:
+ consumes:
+ - application/json
+ description: 创建部门
+ operationId: CreateDepartment
+ parameters:
+ - description: im token
+ in: header
+ name: token
+ required: true
+ type: string
+ - description: 请求
+ in: body
+ name: req
+ required: true
+ schema:
+ $ref: '#/definitions/base_info.CreateDepartmentReq'
+ produces:
+ - application/json
+ responses:
+ "0":
+ description: ""
+ schema:
+ allOf:
+ - $ref: '#/definitions/base_info.CreateDepartmentResp'
+ - properties:
+ data:
+ $ref: '#/definitions/server_api_params.Department'
+ type: object
+ "400":
+ description: errCode为400 一般为参数输入错误, token未带上等
+ schema:
+ $ref: '#/definitions/base_info.CreateDepartmentResp'
+ "500":
+ description: errCode为500 一般为服务器内部错误
+ schema:
+ $ref: '#/definitions/base_info.CreateDepartmentResp'
+ summary: 创建部门
+ tags:
+ - 组织架构相关
+ /organization/create_department_member:
+ post:
+ consumes:
+ - application/json
+ description: 创建部门用户
+ operationId: CreateDepartmentMember
+ parameters:
+ - description: im token
+ in: header
+ name: token
+ required: true
+ type: string
+ - description: 请求
+ in: body
+ name: req
+ required: true
+ schema:
+ $ref: '#/definitions/base_info.CreateDepartmentMemberReq'
+ produces:
+ - application/json
+ responses:
+ "0":
+ description: ""
+ schema:
+ $ref: '#/definitions/base_info.CreateDepartmentMemberResp'
+ "400":
+ description: errCode为400 一般为参数输入错误, token未带上等
+ schema:
+ $ref: '#/definitions/base_info.CreateDepartmentMemberResp'
+ "500":
+ description: errCode为500 一般为服务器内部错误
+ schema:
+ $ref: '#/definitions/base_info.CreateDepartmentMemberResp'
+ summary: 创建部门用户
+ tags:
+ - 组织架构相关
+ /organization/create_organization_user:
+ post:
+ consumes:
+ - application/json
+ description: 组织架构导入用户
+ operationId: CreateOrganizationUser
+ parameters:
+ - description: im token
+ in: header
+ name: token
+ required: true
+ type: string
+ - description: 请求
+ in: body
+ name: req
+ required: true
+ schema:
+ $ref: '#/definitions/base_info.CreateOrganizationUserReq'
+ produces:
+ - application/json
+ responses:
+ "0":
+ description: ""
+ schema:
+ $ref: '#/definitions/base_info.CreateOrganizationUserResp'
+ "400":
+ description: errCode为400 一般为参数输入错误, token未带上等
+ schema:
+ $ref: '#/definitions/base_info.CreateOrganizationUserResp'
+ "500":
+ description: errCode为500 一般为服务器内部错误
+ schema:
+ $ref: '#/definitions/base_info.CreateOrganizationUserResp'
+ summary: 组织架构导入用户
+ tags:
+ - 组织架构相关
+ /organization/delete_department:
+ post:
+ consumes:
+ - application/json
+ description: 删除部门
+ operationId: DeleteDepartment
+ parameters:
+ - description: im token
+ in: header
+ name: token
+ required: true
+ type: string
+ - description: 请求
+ in: body
+ name: req
+ required: true
+ schema:
+ $ref: '#/definitions/base_info.DeleteDepartmentReq'
+ produces:
+ - application/json
+ responses:
+ "0":
+ description: ""
+ schema:
+ $ref: '#/definitions/base_info.DeleteDepartmentResp'
+ "400":
+ description: errCode为400 一般为参数输入错误, token未带上等
+ schema:
+ $ref: '#/definitions/base_info.DeleteDepartmentResp'
+ "500":
+ description: errCode为500 一般为服务器内部错误
+ schema:
+ $ref: '#/definitions/base_info.DeleteDepartmentResp'
+ summary: 删除部门
+ tags:
+ - 组织架构相关
+ /organization/delete_organization_user:
+ post:
+ consumes:
+ - application/json
+ description: 删除组织架构中某个用户
+ operationId: DeleteOrganizationUser
+ parameters:
+ - description: im token
+ in: header
+ name: token
+ required: true
+ type: string
+ - description: 请求
+ in: body
+ name: req
+ required: true
+ schema:
+ $ref: '#/definitions/base_info.DeleteOrganizationUserReq'
+ produces:
+ - application/json
+ responses:
+ "0":
+ description: ""
+ schema:
+ $ref: '#/definitions/base_info.DeleteOrganizationUserResp'
+ "400":
+ description: errCode为400 一般为参数输入错误, token未带上等
+ schema:
+ $ref: '#/definitions/base_info.DeleteOrganizationUserResp'
+ "500":
+ description: errCode为500 一般为服务器内部错误
+ schema:
+ $ref: '#/definitions/base_info.DeleteOrganizationUserResp'
+ summary: 删除组织架构中某个用户
+ tags:
+ - 组织架构相关
+ /organization/delete_user_in_department:
+ post:
+ consumes:
+ - application/json
+ description: 删除部门中某个用户
+ operationId: DeleteUserInDepartment
+ parameters:
+ - description: im token
+ in: header
+ name: token
+ required: true
+ type: string
+ - description: 请求
+ in: body
+ name: req
+ required: true
+ schema:
+ $ref: '#/definitions/base_info.DeleteUserInDepartmentReq'
+ produces:
+ - application/json
+ responses:
+ "0":
+ description: ""
+ schema:
+ $ref: '#/definitions/base_info.DeleteUserInDepartmentResp'
+ "400":
+ description: errCode为400 一般为参数输入错误, token未带上等
+ schema:
+ $ref: '#/definitions/base_info.DeleteUserInDepartmentResp'
+ "500":
+ description: errCode为500 一般为服务器内部错误
+ schema:
+ $ref: '#/definitions/base_info.DeleteUserInDepartmentResp'
+ summary: 删除部门中某个用户
+ tags:
+ - 组织架构相关
+ /organization/get_department_member:
+ post:
+ consumes:
+ - application/json
+ description: 获取部门中所有成员
+ operationId: GetDepartmentMember
+ parameters:
+ - description: im token
+ in: header
+ name: token
+ required: true
+ type: string
+ - description: 请求
+ in: body
+ name: req
+ required: true
+ schema:
+ $ref: '#/definitions/base_info.GetDepartmentMemberReq'
+ produces:
+ - application/json
+ responses:
+ "0":
+ description: ""
+ schema:
+ allOf:
+ - $ref: '#/definitions/base_info.GetDepartmentMemberResp'
+ - properties:
+ data:
+ $ref: '#/definitions/server_api_params.UserDepartmentMember'
+ type: object
+ "400":
+ description: errCode为400 一般为参数输入错误, token未带上等
+ schema:
+ $ref: '#/definitions/base_info.GetDepartmentMemberResp'
+ "500":
+ description: errCode为500 一般为服务器内部错误
+ schema:
+ $ref: '#/definitions/base_info.GetDepartmentMemberResp'
+ summary: 获取部门中所有成员
+ tags:
+ - 组织架构相关
+ /organization/get_sub_department:
+ post:
+ consumes:
+ - application/json
+ description: 获取子部门列表
+ operationId: GetSubDepartment
+ parameters:
+ - description: im token
+ in: header
+ name: token
+ required: true
+ type: string
+ - description: 请求
+ in: body
+ name: req
+ required: true
+ schema:
+ $ref: '#/definitions/base_info.GetSubDepartmentReq'
+ produces:
+ - application/json
+ responses:
+ "0":
+ description: ""
+ schema:
+ $ref: '#/definitions/base_info.GetSubDepartmentResp'
+ "400":
+ description: errCode为400 一般为参数输入错误, token未带上等
+ schema:
+ $ref: '#/definitions/base_info.GetSubDepartmentResp'
+ "500":
+ description: errCode为500 一般为服务器内部错误
+ schema:
+ $ref: '#/definitions/base_info.GetSubDepartmentResp'
+ summary: 获取子部门列表
+ tags:
+ - 组织架构相关
+ /organization/get_user_in_department:
+ post:
+ consumes:
+ - application/json
+ description: 获取部门中的所有用户
+ operationId: GetUserInDepartment
+ parameters:
+ - description: im token
+ in: header
+ name: token
+ required: true
+ type: string
+ - description: 请求
+ in: body
+ name: req
+ required: true
+ schema:
+ $ref: '#/definitions/base_info.GetUserInDepartmentReq'
+ produces:
+ - application/json
+ responses:
+ "0":
+ description: ""
+ schema:
+ allOf:
+ - $ref: '#/definitions/base_info.GetUserInDepartmentResp'
+ - properties:
+ data:
+ $ref: '#/definitions/server_api_params.UserInDepartment'
+ type: object
+ "400":
+ description: errCode为400 一般为参数输入错误, token未带上等
+ schema:
+ $ref: '#/definitions/base_info.GetUserInDepartmentResp'
+ "500":
+ description: errCode为500 一般为服务器内部错误
+ schema:
+ $ref: '#/definitions/base_info.GetUserInDepartmentResp'
+ summary: 获取部门中的所有用户
+ tags:
+ - 组织架构相关
+ /organization/update_department:
+ post:
+ consumes:
+ - application/json
+ description: 更新部门信息
+ operationId: UpdateDepartment
+ parameters:
+ - description: im token
+ in: header
+ name: token
+ required: true
+ type: string
+ - description: 请求
+ in: body
+ name: req
+ required: true
+ schema:
+ $ref: '#/definitions/base_info.UpdateDepartmentReq'
+ produces:
+ - application/json
+ responses:
+ "0":
+ description: ""
+ schema:
+ $ref: '#/definitions/base_info.UpdateDepartmentResp'
+ "400":
+ description: errCode为400 一般为参数输入错误, token未带上等
+ schema:
+ $ref: '#/definitions/base_info.UpdateDepartmentResp'
+ "500":
+ description: errCode为500 一般为服务器内部错误
+ schema:
+ $ref: '#/definitions/base_info.UpdateDepartmentResp'
+ summary: 更新部门信息
+ tags:
+ - 组织架构相关
+ /organization/update_organization_user:
+ post:
+ consumes:
+ - application/json
+ description: 更新组织架构中的用户
+ operationId: UpdateOrganizationUser
+ parameters:
+ - description: im token
+ in: header
+ name: token
+ required: true
+ type: string
+ - description: 请求
+ in: body
+ name: req
+ required: true
+ schema:
+ $ref: '#/definitions/base_info.UpdateOrganizationUserReq'
+ produces:
+ - application/json
+ responses:
+ "0":
+ description: ""
+ schema:
+ $ref: '#/definitions/base_info.UpdateOrganizationUserResp'
+ "400":
+ description: errCode为400 一般为参数输入错误, token未带上等
+ schema:
+ $ref: '#/definitions/base_info.UpdateOrganizationUserResp'
+ "500":
+ description: errCode为500 一般为服务器内部错误
+ schema:
+ $ref: '#/definitions/base_info.UpdateOrganizationUserResp'
+ summary: 更新组织架构中的用户
+ tags:
+ - 组织架构相关
+ /organization/update_user_in_department:
+ post:
+ consumes:
+ - application/json
+ description: 更新部门中某个用户
+ operationId: UpdateUserInDepartment
+ parameters:
+ - description: im token
+ in: header
+ name: token
+ required: true
+ type: string
+ - description: 请求
+ in: body
+ name: req
+ required: true
+ schema:
+ $ref: '#/definitions/base_info.UpdateUserInDepartmentReq'
+ produces:
+ - application/json
+ responses:
+ "0":
+ description: ""
+ schema:
+ $ref: '#/definitions/base_info.UpdateUserInDepartmentResp'
+ "400":
+ description: errCode为400 一般为参数输入错误, token未带上等
+ schema:
+ $ref: '#/definitions/base_info.UpdateUserInDepartmentResp'
+ "500":
+ description: errCode为500 一般为服务器内部错误
+ schema:
+ $ref: '#/definitions/base_info.UpdateUserInDepartmentResp'
+ summary: 更新部门中某个用户
+ tags:
+ - 组织架构相关
/third/minio_upload:
post:
consumes:
@@ -3698,11 +5330,11 @@ paths:
"400":
description: errCode为400 一般为参数输入错误, token未带上等
schema:
- $ref: '#/definitions/base_info.MinioUploadFileResp'
+ $ref: '#/definitions/base_info.Swagger400Resp'
"500":
description: errCode为500 一般为服务器内部错误
schema:
- $ref: '#/definitions/base_info.MinioUploadFileResp'
+ $ref: '#/definitions/base_info.Swagger500Resp'
summary: minio上传文件(web api)
tags:
- 第三方服务相关
@@ -3811,11 +5443,11 @@ paths:
"400":
description: errCode为400 一般为参数输入错误, token未带上等
schema:
- $ref: '#/definitions/base_info.GetSelfUserInfoResp'
+ $ref: '#/definitions/base_info.Swagger400Resp'
"500":
description: errCode为500 一般为服务器内部错误
schema:
- $ref: '#/definitions/base_info.GetSelfUserInfoResp'
+ $ref: '#/definitions/base_info.Swagger500Resp'
summary: 获取自己的信息
tags:
- 用户相关
@@ -3843,15 +5475,22 @@ paths:
"0":
description: ""
schema:
- $ref: '#/definitions/base_info.GetUsersInfoResp'
+ allOf:
+ - $ref: '#/definitions/base_info.GetUsersInfoResp'
+ - properties:
+ Data:
+ items:
+ $ref: '#/definitions/server_api_params.PublicUserInfo'
+ type: array
+ type: object
"400":
description: errCode为400 一般为参数输入错误, token未带上等
schema:
- $ref: '#/definitions/base_info.GetUsersInfoResp'
+ $ref: '#/definitions/base_info.Swagger400Resp'
"500":
description: errCode为500 一般为服务器内部错误
schema:
- $ref: '#/definitions/base_info.GetUsersInfoResp'
+ $ref: '#/definitions/base_info.Swagger500Resp'
summary: 获取用户信息
tags:
- 用户相关
@@ -3883,11 +5522,11 @@ paths:
"400":
description: errCode为400 一般为参数输入错误, token未带上等
schema:
- $ref: '#/definitions/base_info.GetUsersOnlineStatusResp'
+ $ref: '#/definitions/base_info.Swagger400Resp'
"500":
description: errCode为500 一般为服务器内部错误
schema:
- $ref: '#/definitions/base_info.GetUsersOnlineStatusResp'
+ $ref: '#/definitions/base_info.Swagger500Resp'
summary: 获取用户在线状态
tags:
- 用户相关
@@ -3903,7 +5542,7 @@ paths:
name: token
required: true
type: string
- - description: 请求体
+ - description: globalRecvMsgOpt为全局免打扰设置0为关闭 1为开启
in: body
name: req
required: true
@@ -3919,11 +5558,11 @@ paths:
"400":
description: errCode为400 一般为参数输入错误, token未带上等
schema:
- $ref: '#/definitions/base_info.SetGlobalRecvMessageOptResp'
+ $ref: '#/definitions/base_info.Swagger400Resp'
"500":
description: errCode为500 一般为服务器内部错误
schema:
- $ref: '#/definitions/base_info.SetGlobalRecvMessageOptResp'
+ $ref: '#/definitions/base_info.Swagger500Resp'
summary: 设置全局免打扰
tags:
- 用户相关
@@ -3955,11 +5594,11 @@ paths:
"400":
description: errCode为400 一般为参数输入错误, token未带上等
schema:
- $ref: '#/definitions/base_info.UpdateUserInfoResp'
+ $ref: '#/definitions/base_info.Swagger400Resp'
"500":
description: errCode为500 一般为服务器内部错误
schema:
- $ref: '#/definitions/base_info.UpdateUserInfoResp'
+ $ref: '#/definitions/base_info.Swagger500Resp'
summary: 修改用户信息
tags:
- 用户相关
diff --git a/cmd/open_im_api/main.go b/cmd/open_im_api/main.go
index 42b715180..37ceefff2 100644
--- a/cmd/open_im_api/main.go
+++ b/cmd/open_im_api/main.go
@@ -29,6 +29,13 @@ import (
"Open_IM/pkg/common/constant"
)
+// @title open-IM-Server API
+// @version 1.0
+// @description open-IM-Server 的API服务器文档, 文档中所有请求都有一个operationID字段用于链路追踪
+
+// @license.name Apache 2.0
+// @license.url http://www.apache.org/licenses/LICENSE-2.0.html
+// @BasePath /
func main() {
log.NewPrivateLog(constant.LogFileName)
gin.SetMode(gin.ReleaseMode)
diff --git a/internal/api/auth/auth.go b/internal/api/auth/auth.go
index 1f06ec847..540e6cc92 100644
--- a/internal/api/auth/auth.go
+++ b/internal/api/auth/auth.go
@@ -16,17 +16,17 @@ import (
"strings"
)
-// @Summary 用户登录
-// @Description 用户登录
+// @Summary 用户注册
+// @Description 用户注册
// @Tags 鉴权认证
// @ID UserRegister
// @Accept json
// @Param token header string true "im token"
-// @Param req body api.UserRegisterReq true "secret为openIM密钥, 详细见服务端config.yaml secret字段
platform为平台ID
ex为拓展字段"
+// @Param req body api.UserRegisterReq true "secret为openIM密钥, 详细见服务端config.yaml secret字段
platform为平台ID
ex为拓展字段
gender为性别, 0为女, 1为男"
// @Produce json
// @Success 0 {object} api.UserRegisterResp
-// @Failure 500 {object} api.UserRegisterResp "errCode为500 一般为服务器内部错误"
-// @Failure 400 {object} api.UserRegisterResp "errCode为400 一般为参数输入错误, token未带上等"
+// @Failure 500 {object} api.Swagger500Resp "errCode为500 一般为服务器内部错误"
+// @Failure 400 {object} api.Swagger400Resp "errCode为400 一般为参数输入错误, token未带上等"
// @Router /auth/user_register [post]
func UserRegister(c *gin.Context) {
params := api.UserRegisterReq{}
@@ -91,11 +91,11 @@ func UserRegister(c *gin.Context) {
// @ID UserToken
// @Accept json
// @Param token header string true "im token"
-// @Param req body api.UserTokenReq true "secret为openIM密钥, 详细见服务端config.yaml secret字段, platform为平台ID"
+// @Param req body api.UserTokenReq true "secret为openIM密钥, 详细见服务端config.yaml secret字段
platform为平台ID"
// @Produce json
// @Success 0 {object} api.UserTokenResp
-// @Failure 500 {object} api.UserTokenResp "errCode为500 一般为服务器内部错误"
-// @Failure 400 {object} api.UserTokenResp "errCode为400 一般为参数输入错误, token未带上等"
+// @Failure 500 {object} api.Swagger500Resp "errCode为500 一般为服务器内部错误"
+// @Failure 400 {object} api.Swagger400Resp "errCode为400 一般为参数输入错误, token未带上等"
// @Router /auth/user_token [post]
func UserToken(c *gin.Context) {
params := api.UserTokenReq{}
@@ -135,17 +135,17 @@ func UserToken(c *gin.Context) {
c.JSON(http.StatusOK, resp)
}
-// @Summary 解析token
-// @Description 解析用户token
+// @Summary 解析当前用户token
+// @Description 解析当前用户token(token在请求头中传入)
// @Tags 鉴权认证
// @ID ParseToken
// @Accept json
// @Param token header string true "im token"
-// @Param req body api.ParseTokenReq true "secret为openIM密钥, 详细见服务端config.yaml secret字段, platform为平台ID"
+// @Param req body api.ParseTokenReq true "secret为openIM密钥, 详细见服务端config.yaml secret字段
platform为平台ID"
// @Produce json
-// @Success 0 {object} api.ParseTokenResp
-// @Failure 500 {object} api.ParseTokenResp "errCode为500 一般为服务器内部错误"
-// @Failure 400 {object} api.ParseTokenResp "errCode为400 一般为参数输入错误, token未带上等"
+// @Success 0 {object} api.ParseTokenResp{Data=api.ExpireTime}
+// @Failure 500 {object} api.Swagger500Resp "errCode为500 一般为服务器内部错误"
+// @Failure 400 {object} api.Swagger400Resp "errCode为400 一般为参数输入错误, token未带上等"
// @Router /auth/parse_token [post]
func ParseToken(c *gin.Context) {
params := api.ParseTokenReq{}
@@ -179,11 +179,11 @@ func ParseToken(c *gin.Context) {
// @ID ForceLogout
// @Accept json
// @Param token header string true "im token"
-// @Param req body api.ForceLogoutReq true "platform为平台ID, fromUserID为要执行强制登出的用户ID"
+// @Param req body api.ForceLogoutReq true "platform为平台ID
fromUserID为要执行强制登出的用户ID"
// @Produce json
// @Success 0 {object} api.ForceLogoutResp
-// @Failure 500 {object} api.ForceLogoutResp "errCode为500 一般为服务器内部错误"
-// @Failure 400 {object} api.ForceLogoutResp "errCode为400 一般为参数输入错误, token未带上等"
+// @Failure 500 {object} api.Swagger500Resp "errCode为500 一般为服务器内部错误"
+// @Failure 400 {object} api.Swagger400Resp "errCode为400 一般为参数输入错误, token未带上等"
// @Router /auth/force_logout [post]
func ForceLogout(c *gin.Context) {
params := api.ForceLogoutReq{}
diff --git a/internal/api/chat/del_msg.go b/internal/api/chat/del_msg.go
index d993ef23f..c6a6da385 100644
--- a/internal/api/chat/del_msg.go
+++ b/internal/api/chat/del_msg.go
@@ -25,8 +25,8 @@ import (
// @Param req body api.DelMsgReq true "userID为要删除的用户ID
seqList为seq列表"
// @Produce json
// @Success 0 {object} api.DelMsgResp
-// @Failure 500 {object} api.DelMsgResp "errCode为500 一般为服务器内部错误"
-// @Failure 400 {object} api.DelMsgResp "errCode为400 一般为参数输入错误, token未带上等"
+// @Failure 500 {object} api.Swagger500Resp "errCode为500 一般为服务器内部错误"
+// @Failure 400 {object} api.Swagger400Resp "errCode为400 一般为参数输入错误, token未带上等"
// @Router /msg/del_msg [post]
func DelMsg(c *gin.Context) {
var (
@@ -82,8 +82,8 @@ func DelMsg(c *gin.Context) {
// @Param req body api.CleanUpMsgReq true "userID为要清空的用户ID"
// @Produce json
// @Success 0 {object} api.CleanUpMsgResp
-// @Failure 500 {object} api.CleanUpMsgResp "errCode为500 一般为服务器内部错误"
-// @Failure 400 {object} api.CleanUpMsgResp "errCode为400 一般为参数输入错误, token未带上等"
+// @Failure 500 {object} api.Swagger500Resp "errCode为500 一般为服务器内部错误"
+// @Failure 400 {object} api.Swagger400Resp "errCode为400 一般为参数输入错误, token未带上等"
// @Router /msg/clear_msg [post]
func ClearMsg(c *gin.Context) {
params := api.CleanUpMsgReq{}
diff --git a/internal/api/conversation/conversation.go b/internal/api/conversation/conversation.go
index b60b89ed4..36d7388bf 100644
--- a/internal/api/conversation/conversation.go
+++ b/internal/api/conversation/conversation.go
@@ -127,6 +127,18 @@ func BatchSetConversations(c *gin.Context) {
c.JSON(http.StatusOK, resp)
}
+// @Summary 获取用户所有会话
+// @Description 获取用户所有会话
+// @Tags 会话相关
+// @ID GetAllConversations
+// @Accept json
+// @Param token header string true "im token"
+// @Param req body api.GetAllConversationsReq true "ownerUserID为要获取的用户ID"
+// @Produce json
+// @Success 0 {object} api.GetAllConversationsResp
+// @Failure 500 {object} api.GetAllConversationsResp "errCode为500 一般为服务器内部错误"
+// @Failure 400 {object} api.GetAllConversationsResp "errCode为400 一般为参数输入错误, token未带上等"
+// @Router /msg/get_all_conversations [post]
func GetAllConversations(c *gin.Context) {
var (
req api.GetAllConversationsReq
@@ -165,6 +177,18 @@ func GetAllConversations(c *gin.Context) {
c.JSON(http.StatusOK, resp)
}
+// @Summary 根据会话ID获取会话
+// @Description 根据会话ID获取会话
+// @Tags 会话相关
+// @ID GetConversation
+// @Accept json
+// @Param token header string true "im token"
+// @Param req body api.GetConversationReq true "ownerUserID为要获取的用户ID
conversationID为要获取的会话ID"
+// @Produce json
+// @Success 0 {object} api.GetConversationResp
+// @Failure 500 {object} api.GetConversationResp "errCode为500 一般为服务器内部错误"
+// @Failure 400 {object} api.GetConversationResp "errCode为400 一般为参数输入错误, token未带上等"
+// @Router /msg/get_conversation [post]
func GetConversation(c *gin.Context) {
var (
req api.GetConversationReq
@@ -203,6 +227,18 @@ func GetConversation(c *gin.Context) {
c.JSON(http.StatusOK, resp)
}
+// @Summary 根据会话ID列表获取会话
+// @Description 根据会话ID列表获取会话
+// @Tags 会话相关
+// @ID GetConversations
+// @Accept json
+// @Param token header string true "im token"
+// @Param req body api.GetConversationsReq true "ownerUserID为要获取的用户ID
conversationIDs为要获取的会话ID列表"
+// @Produce json
+// @Success 0 {object} api.GetConversationsResp
+// @Failure 500 {object} api.GetConversationsResp "errCode为500 一般为服务器内部错误"
+// @Failure 400 {object} api.GetConversationsResp "errCode为400 一般为参数输入错误, token未带上等"
+// @Router /msg/get_conversations [post]
func GetConversations(c *gin.Context) {
var (
req api.GetConversationsReq
diff --git a/internal/api/friend/friend.go b/internal/api/friend/friend.go
index 1170a3363..ac637275f 100644
--- a/internal/api/friend/friend.go
+++ b/internal/api/friend/friend.go
@@ -22,11 +22,11 @@ import (
// @ID AddBlack
// @Accept json
// @Param token header string true "im token"
-// @Param req body api.AddBlacklistReq true "fromUserID为设置的用户, toUserID为被设置的用户"
+// @Param req body api.AddBlacklistReq true "fromUserID为设置的用户
toUserID为被设置的用户"
// @Produce json
// @Success 0 {object} api.AddBlacklistResp
-// @Failure 500 {object} api.AddBlacklistResp "errCode为500 一般为服务器内部错误"
-// @Failure 400 {object} api.AddBlacklistResp "errCode为400 一般为参数输入错误, token未带上等"
+// @Failure 500 {object} api.Swagger500Resp "errCode为500 一般为服务器内部错误"
+// @Failure 400 {object} api.Swagger400Resp "errCode为400 一般为参数输入错误, token未带上等"
// @Router /friend/add_black [post]
func AddBlack(c *gin.Context) {
params := api.AddBlacklistReq{}
@@ -43,7 +43,7 @@ func AddBlack(c *gin.Context) {
if !ok {
errMsg := req.CommID.OperationID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token")
log.NewError(req.CommID.OperationID, errMsg)
- c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
+ c.JSON(http.StatusBadRequest, gin.H{"errCode": 500, "errMsg": errMsg})
return
}
log.NewInfo(params.OperationID, "AddBlacklist args ", req.String())
@@ -67,11 +67,11 @@ func AddBlack(c *gin.Context) {
// @ID ImportFriend
// @Accept json
// @Param token header string true "im token"
-// @Param req body api.ImportFriendReq true "fromUserID批量加好友的用户ID, friendUserIDList为"
+// @Param req body api.ImportFriendReq true "fromUserID批量加好友的用户ID
friendUserIDList为"
// @Produce json
-// @Success 0 {object} api.ImportFriendResp "data列表中对象的result-1为添加该用户失败, 0为成功"
-// @Failure 500 {object} api.ImportFriendResp "errCode为500 一般为服务器内部错误"
-// @Failure 400 {object} api.ImportFriendResp "errCode为400 一般为参数输入错误, token未带上等"
+// @Success 0 {object} api.ImportFriendResp "data列表中对象的result-1为添加该用户失败
0为成功"
+// @Failure 500 {object} api.Swagger500Resp "errCode为500 一般为服务器内部错误"
+// @Failure 400 {object} api.Swagger400Resp "errCode为400 一般为参数输入错误, token未带上等"
// @Router /friend/import_friend [post]
func ImportFriend(c *gin.Context) {
params := api.ImportFriendReq{}
@@ -88,7 +88,7 @@ func ImportFriend(c *gin.Context) {
if !ok {
errMsg := req.OperationID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token")
log.NewError(req.OperationID, errMsg)
- c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
+ c.JSON(http.StatusBadRequest, gin.H{"errCode": 500, "errMsg": errMsg})
return
}
@@ -127,11 +127,11 @@ func ImportFriend(c *gin.Context) {
// @ID AddFriend
// @Accept json
// @Param token header string true "im token"
-// @Param req body api.AddFriendReq true "reqMsg为申请信息, fromUserID为申请用户, toUserID为被添加用户"
+// @Param req body api.AddFriendReq true "reqMsg为申请信息
fromUserID为申请用户
toUserID为被添加用户"
// @Produce json
// @Success 0 {object} api.AddFriendResp
-// @Failure 500 {object} api.AddFriendResp "errCode为500 一般为服务器内部错误"
-// @Failure 400 {object} api.AddFriendResp "errCode为400 一般为参数输入错误, token未带上等"
+// @Failure 500 {object} api.Swagger500Resp "errCode为500 一般为服务器内部错误"
+// @Failure 400 {object} api.Swagger400Resp "errCode为400 一般为参数输入错误, token未带上等"
// @Router /friend/add_friend [post]
func AddFriend(c *gin.Context) {
params := api.AddFriendReq{}
@@ -182,11 +182,11 @@ func AddFriend(c *gin.Context) {
// @ID AddFriendResponse
// @Accept json
// @Param token header string true "im token"
-// @Param req body api.AddFriendResponseReq true "fromUserID同意/拒绝的用户ID, toUserID为申请用户, handleMsg为处理信息, flag为具体操作, 1为同意, 2为拒绝"
+// @Param req body api.AddFriendResponseReq true "fromUserID同意/拒绝的用户ID
toUserID为申请用户D
handleMsg为处理信息
flag为具体操作, 1为同意, 2为拒绝"
// @Produce json
// @Success 0 {object} api.AddFriendResponseResp
-// @Failure 500 {object} api.AddFriendResponseResp "errCode为500 一般为服务器内部错误"
-// @Failure 400 {object} api.AddFriendResponseResp "errCode为400 一般为参数输入错误, token未带上等"
+// @Failure 500 {object} api.Swagger500Resp "errCode为500 一般为服务器内部错误"
+// @Failure 400 {object} api.Swagger400Resp "errCode为400 一般为参数输入错误, token未带上等"
// @Router /friend/add_friend_response [post]
func AddFriendResponse(c *gin.Context) {
params := api.AddFriendResponseReq{}
@@ -240,11 +240,11 @@ func AddFriendResponse(c *gin.Context) {
// @ID DeleteFriend
// @Accept json
// @Param token header string true "im token"
-// @Param req body api.DeleteFriendReq true "fromUserID为操作用户, toUserID为被删除用户"
+// @Param req body api.DeleteFriendReq true "fromUserID为操作用户
toUserID为被删除用户"
// @Produce json
// @Success 0 {object} api.DeleteFriendResp
-// @Failure 500 {object} api.DeleteFriendResp "errCode为500 一般为服务器内部错误"
-// @Failure 400 {object} api.DeleteFriendResp "errCode为400 一般为参数输入错误, token未带上等"
+// @Failure 500 {object} api.Swagger500Resp "errCode为500 一般为服务器内部错误"
+// @Failure 400 {object} api.Swagger400Resp "errCode为400 一般为参数输入错误, token未带上等"
// @Router /friend/delete_friend [post]
func DeleteFriend(c *gin.Context) {
params := api.DeleteFriendReq{}
@@ -262,7 +262,7 @@ func DeleteFriend(c *gin.Context) {
if !ok {
errMsg := req.CommID.OperationID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token")
log.NewError(req.CommID.OperationID, errMsg)
- c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
+ c.JSON(http.StatusBadRequest, gin.H{"errCode": 500, "errMsg": errMsg})
return
}
@@ -296,9 +296,9 @@ func DeleteFriend(c *gin.Context) {
// @Param token header string true "im token"
// @Param req body api.GetBlackListReq true "fromUserID要获取黑名单的用户"
// @Produce json
-// @Success 0 {object} api.GetBlackListResp
-// @Failure 500 {object} api.GetBlackListResp "errCode为500 一般为服务器内部错误"
-// @Failure 400 {object} api.GetBlackListResp "errCode为400 一般为参数输入错误, token未带上等"
+// @Success 0 {object} api.GetBlackListResp{data=[]open_im_sdk.PublicUserInfo}
+// @Failure 500 {object} api.Swagger400Resp "errCode为500 一般为服务器内部错误"
+// @Failure 400 {object} api.Swagger500Resp "errCode为400 一般为参数输入错误, token未带上等"
// @Router /friend/get_black_list [post]
func GetBlacklist(c *gin.Context) {
params := api.GetBlackListReq{}
@@ -354,11 +354,11 @@ func GetBlacklist(c *gin.Context) {
// @ID SetFriendRemark
// @Accept json
// @Param token header string true "im token"
-// @Param req body api.SetFriendRemarkReq true "fromUserID为设置的用户, toUserID为被设置的用户, remark为好友备注"
+// @Param req body api.SetFriendRemarkReq true "fromUserID为设置的用户
toUserID为被设置的用户
remark为好友备注"
// @Produce json
// @Success 0 {object} api.SetFriendRemarkResp
-// @Failure 500 {object} api.SetFriendRemarkResp "errCode为500 一般为服务器内部错误"
-// @Failure 400 {object} api.SetFriendRemarkResp "errCode为400 一般为参数输入错误, token未带上等"
+// @Failure 500 {object} api.Swagger500Resp "errCode为500 一般为服务器内部错误"
+// @Failure 400 {object} api.Swagger400Resp "errCode为400 一般为参数输入错误, token未带上等"
// @Router /friend/set_friend_remark [post]
func SetFriendRemark(c *gin.Context) {
params := api.SetFriendRemarkReq{}
@@ -377,7 +377,7 @@ func SetFriendRemark(c *gin.Context) {
if !ok {
errMsg := req.CommID.OperationID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token")
log.NewError(req.CommID.OperationID, errMsg)
- c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
+ c.JSON(http.StatusBadRequest, gin.H{"errCode": 500, "errMsg": errMsg})
return
}
@@ -412,8 +412,8 @@ func SetFriendRemark(c *gin.Context) {
// @Param req body api.RemoveBlackListReq true "fromUserID要获取黑名单的用户"
// @Produce json
// @Success 0 {object} api.RemoveBlackListResp
-// @Failure 500 {object} api.RemoveBlackListResp "errCode为500 一般为服务器内部错误"
-// @Failure 400 {object} api.RemoveBlackListResp "errCode为400 一般为参数输入错误, token未带上等"
+// @Failure 500 {object} api.Swagger500Resp "errCode为500 一般为服务器内部错误"
+// @Failure 400 {object} api.Swagger400Resp "errCode为400 一般为参数输入错误, token未带上等"
// @Router /friend/remove_black [post]
func RemoveBlack(c *gin.Context) {
params := api.RemoveBlackListReq{}
@@ -462,11 +462,11 @@ func RemoveBlack(c *gin.Context) {
// @ID IsFriend
// @Accept json
// @Param token header string true "im token"
-// @Param req body api.IsFriendReq true "fromUserID为请求用户, toUserID为要检查的用户"
+// @Param req body api.IsFriendReq true "fromUserID为请求用户
toUserID为要检查的用户"
// @Produce json
// @Success 0 {object} api.IsFriendResp
-// @Failure 500 {object} api.IsFriendResp "errCode为500 一般为服务器内部错误"
-// @Failure 400 {object} api.IsFriendResp "errCode为400 一般为参数输入错误, token未带上等"
+// @Failure 500 {object} api.Swagger500Resp "errCode为500 一般为服务器内部错误"
+// @Failure 400 {object} api.Swagger400Resp "errCode为400 一般为参数输入错误, token未带上等"
// @Router /friend/is_friend [post]
func IsFriend(c *gin.Context) {
params := api.IsFriendReq{}
@@ -519,9 +519,9 @@ func IsFriend(c *gin.Context) {
// @Param token header string true "im token"
// @Param req body api.GetFriendListReq true "fromUserID为要获取好友列表的用户ID"
// @Produce json
-// @Success 0 {object} api.GetFriendListResp
-// @Failure 500 {object} api.GetFriendListResp "errCode为500 一般为服务器内部错误"
-// @Failure 400 {object} api.GetFriendListResp "errCode为400 一般为参数输入错误, token未带上等"
+// @Success 0 {object} api.GetFriendListResp{data=[]open_im_sdk.FriendInfo}
+// @Failure 500 {object} api.Swagger500Resp "errCode为500 一般为服务器内部错误"
+// @Failure 400 {object} api.Swagger400Resp "errCode为400 一般为参数输入错误, token未带上等"
// @Router /friend/get_friend_list [post]
func GetFriendList(c *gin.Context) {
params := api.GetFriendListReq{}
@@ -539,7 +539,7 @@ func GetFriendList(c *gin.Context) {
if !ok {
errMsg := req.CommID.OperationID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token")
log.NewError(req.CommID.OperationID, errMsg)
- c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
+ c.JSON(http.StatusBadRequest, gin.H{"errCode": 500, "errMsg": errMsg})
return
}
@@ -575,9 +575,9 @@ func GetFriendList(c *gin.Context) {
// @Param token header string true "im token"
// @Param req body api.GetFriendApplyListReq true "fromUserID为要获取申请列表的用户ID"
// @Produce json
-// @Success 0 {object} api.GetFriendApplyListResp
-// @Failure 500 {object} api.GetFriendApplyListResp "errCode为500 一般为服务器内部错误"
-// @Failure 400 {object} api.GetFriendApplyListResp "errCode为400 一般为参数输入错误, token未带上等"
+// @Success 0 {object} api.GetFriendApplyListResp{data=[]open_im_sdk.FriendRequest}
+// @Failure 500 {object} api.Swagger400Resp "errCode为500 一般为服务器内部错误"
+// @Failure 400 {object} api.Swagger400Resp "errCode为400 一般为参数输入错误, token未带上等"
// @Router /friend/get_friend_apply_list [post]
func GetFriendApplyList(c *gin.Context) {
params := api.GetFriendApplyListReq{}
@@ -631,9 +631,9 @@ func GetFriendApplyList(c *gin.Context) {
// @Param token header string true "im token"
// @Param req body api.GetSelfApplyListReq true "fromUserID为自己的用户ID"
// @Produce json
-// @Success 0 {object} api.GetSelfApplyListResp
-// @Failure 500 {object} api.GetSelfApplyListResp "errCode为500 一般为服务器内部错误"
-// @Failure 400 {object} api.GetSelfApplyListResp "errCode为400 一般为参数输入错误, token未带上等"
+// @Success 0 {object} api.GetSelfApplyListResp{data=[]open_im_sdk.FriendRequest}
+// @Failure 500 {object} api.Swagger500Resp "errCode为500 一般为服务器内部错误"
+// @Failure 400 {object} api.Swagger400Resp "errCode为400 一般为参数输入错误, token未带上等"
// @Router /friend/get_self_friend_apply_list [post]
func GetSelfFriendApplyList(c *gin.Context) {
params := api.GetSelfApplyListReq{}
diff --git a/internal/api/group/group.go b/internal/api/group/group.go
index fafb33081..e7696fb92 100644
--- a/internal/api/group/group.go
+++ b/internal/api/group/group.go
@@ -29,8 +29,8 @@ import (
// @Param req body api.KickGroupMemberReq true "GroupID为要操作的群ID
kickedUserIDList为要踢出的群用户ID
reason为原因"
// @Produce json
// @Success 0 {object} api.KickGroupMemberResp "result为结果码, -1为失败, 0为成功"
-// @Failure 500 {object} api.KickGroupMemberResp "errCode为500 一般为服务器内部错误"
-// @Failure 400 {object} api.KickGroupMemberResp "errCode为400 一般为参数输入错误, token未带上等"
+// @Failure 500 {object} api.Swagger500Resp "errCode为500 一般为服务器内部错误"
+// @Failure 400 {object} api.Swagger400Resp "errCode为400 一般为参数输入错误, token未带上等"
// @Router /group/kick_group [post]
func KickGroupMember(c *gin.Context) {
params := api.KickGroupMemberReq{}
@@ -49,7 +49,7 @@ func KickGroupMember(c *gin.Context) {
if !ok {
errMsg := req.OperationID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token")
log.NewError(req.OperationID, errMsg)
- c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
+ c.JSON(http.StatusBadRequest, gin.H{"errCode": 500, "errMsg": errMsg})
return
}
@@ -90,11 +90,11 @@ func KickGroupMember(c *gin.Context) {
// @ID GetGroupMembersInfo
// @Accept json
// @Param token header string true "im token"
-// @Param req body api.GetGroupMembersInfoReq true "memberList为要获取群成员的群ID列表"
+// @Param req body api.GetGroupMembersInfoReq true "groupID为要获取的群ID
memberList为要获取群成员的群ID列表"
// @Produce json
// @Success 0 {object} api.GetGroupMembersInfoResp{data=[]open_im_sdk.GroupMemberFullInfo}
-// @Failure 500 {object} api.GetGroupMembersInfoResp "errCode为500 一般为服务器内部错误"
-// @Failure 400 {object} api.GetGroupMembersInfoResp "errCode为400 一般为参数输入错误, token未带上等"
+// @Failure 500 {object} api.Swagger500Resp "errCode为500 一般为服务器内部错误"
+// @Failure 400 {object} api.Swagger400Resp "errCode为400 一般为参数输入错误, token未带上等"
// @Router /group/get_group_members_info [post]
func GetGroupMembersInfo(c *gin.Context) {
params := api.GetGroupMembersInfoReq{}
@@ -112,7 +112,7 @@ func GetGroupMembersInfo(c *gin.Context) {
if !ok {
errMsg := req.OperationID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token")
log.NewError(req.OperationID, errMsg)
- c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
+ c.JSON(http.StatusBadRequest, gin.H{"errCode": 500, "errMsg": errMsg})
return
}
@@ -156,7 +156,7 @@ func GetGroupMemberList(c *gin.Context) {
if !ok {
errMsg := req.OperationID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token")
log.NewError(req.OperationID, errMsg)
- c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
+ c.JSON(http.StatusBadRequest, gin.H{"errCode": 500, "errMsg": errMsg})
return
}
@@ -194,8 +194,8 @@ func GetGroupMemberList(c *gin.Context) {
// @Param req body api.GetGroupAllMemberReq true "GroupID为要获取群成员的群ID"
// @Produce json
// @Success 0 {object} api.GetGroupAllMemberResp{data=[]open_im_sdk.GroupMemberFullInfo}
-// @Failure 500 {object} api.GetGroupAllMemberResp "errCode为500 一般为服务器内部错误"
-// @Failure 400 {object} api.GetGroupAllMemberResp "errCode为400 一般为参数输入错误, token未带上等"
+// @Failure 500 {object} api.Swagger500Resp "errCode为500 一般为服务器内部错误"
+// @Failure 400 {object} api.Swagger400Resp "errCode为400 一般为参数输入错误, token未带上等"
// @Router /group/get_group_all_member_list [post]
func GetGroupAllMemberList(c *gin.Context) {
params := api.GetGroupAllMemberReq{}
@@ -213,7 +213,7 @@ func GetGroupAllMemberList(c *gin.Context) {
if !ok {
errMsg := req.OperationID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token")
log.NewError(req.OperationID, errMsg)
- c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
+ c.JSON(http.StatusBadRequest, gin.H{"errCode": 500, "errMsg": errMsg})
return
}
@@ -249,8 +249,8 @@ func GetGroupAllMemberList(c *gin.Context) {
// @Param req body api.GetJoinedGroupListReq true "fromUserID为要获取的用户ID"
// @Produce json
// @Success 0 {object} api.GetJoinedGroupListResp{data=[]open_im_sdk.GroupInfo}
-// @Failure 500 {object} api.GetJoinedGroupListResp "errCode为500 一般为服务器内部错误"
-// @Failure 400 {object} api.GetJoinedGroupListResp "errCode为400 一般为参数输入错误, token未带上等"
+// @Failure 500 {object} api.Swagger500Resp "errCode为500 一般为服务器内部错误"
+// @Failure 400 {object} api.Swagger400Resp "errCode为400 一般为参数输入错误, token未带上等"
// @Router /group/get_joined_group_list [post]
func GetJoinedGroupList(c *gin.Context) {
params := api.GetJoinedGroupListReq{}
@@ -268,7 +268,7 @@ func GetJoinedGroupList(c *gin.Context) {
if !ok {
errMsg := req.OperationID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token")
log.NewError(req.OperationID, errMsg)
- c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
+ c.JSON(http.StatusBadRequest, gin.H{"errCode": 500, "errMsg": errMsg})
return
}
@@ -304,8 +304,8 @@ func GetJoinedGroupList(c *gin.Context) {
// @Param req body api.InviteUserToGroupReq true "groupID为要拉进的群组ID
invitedUserIDList为要获取群成员的群ID列表
reason为原因"
// @Produce json
// @Success 0 {object} api.InviteUserToGroupResp "result为结果码, -1为失败, 0为成功""
-// @Failure 500 {object} api.InviteUserToGroupResp "errCode为500 一般为服务器内部错误"
-// @Failure 400 {object} api.InviteUserToGroupResp "errCode为400 一般为参数输入错误, token未带上等"
+// @Failure 500 {object} api.Swagger500Resp "errCode为500 一般为服务器内部错误"
+// @Failure 400 {object} api.Swagger400Resp "errCode为400 一般为参数输入错误, token未带上等"
// @Router /group/invite_user_to_group [post]
func InviteUserToGroup(c *gin.Context) {
params := api.InviteUserToGroupReq{}
@@ -323,7 +323,7 @@ func InviteUserToGroup(c *gin.Context) {
if !ok {
errMsg := req.OperationID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token")
log.NewError(req.OperationID, errMsg)
- c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
+ c.JSON(http.StatusBadRequest, gin.H{"errCode": 500, "errMsg": errMsg})
return
}
@@ -363,11 +363,11 @@ func InviteUserToGroup(c *gin.Context) {
// @ID CreateGroup
// @Accept json
// @Param token header string true "im token"
-// @Param req body api.CreateGroupReq true "ownerUserID为群主ID
ex为群扩展字段
roleLevel为群员角色,1为普通用户 2为群主 3为管理员"
+// @Param req body api.CreateGroupReq true "groupType这里填0代表普通群
groupName为群名称
introduction为群介绍
notification为群公共
ownerUserID为群主ID
ex为群扩展字段
memberList中对象roleLevel为群员角色,1为普通用户 2为群主 3为管理员"
// @Produce json
// @Success 0 {object} api.CreateGroupResp{data=open_im_sdk.GroupInfo}
-// @Failure 500 {object} api.CreateGroupResp "errCode为500 一般为服务器内部错误"
-// @Failure 400 {object} api.CreateGroupResp "errCode为400 一般为参数输入错误, token未带上等"
+// @Failure 500 {object} api.Swagger500Resp "errCode为500 一般为服务器内部错误"
+// @Failure 400 {object} api.Swagger400Resp "errCode为400 一般为参数输入错误, token未带上等"
// @Router /group/create_group [post]
func CreateGroup(c *gin.Context) {
params := api.CreateGroupReq{}
@@ -431,9 +431,9 @@ func CreateGroup(c *gin.Context) {
// @Param token header string true "im token"
// @Param req body api.GetGroupApplicationListReq true "fromUserID为要获取的用户ID"
// @Produce json
-// @Success 0 {object} api.GetGroupApplicationListResp
-// @Failure 500 {object} api.GetGroupApplicationListResp "errCode为500 一般为服务器内部错误"
-// @Failure 400 {object} api.GetGroupApplicationListResp "errCode为400 一般为参数输入错误, token未带上等"
+// @Success 0 {object} api.GetGroupApplicationListResp{data=[]open_im_sdk.GroupRequest}
+// @Failure 500 {object} api.Swagger500Resp "errCode为500 一般为服务器内部错误"
+// @Failure 400 {object} api.Swagger400Resp "errCode为400 一般为参数输入错误, token未带上等"
// @Router /group/get_recv_group_applicationList [post]
func GetRecvGroupApplicationList(c *gin.Context) {
params := api.GetGroupApplicationListReq{}
@@ -484,9 +484,9 @@ func GetRecvGroupApplicationList(c *gin.Context) {
// @Param token header string true "im token"
// @Param req body api.GetUserReqGroupApplicationListReq true "userID为要获取的用户ID"
// @Produce json
-// @Success 0 {object} api.GetGroupApplicationListResp
-// @Failure 500 {object} api.GetGroupApplicationListResp "errCode为500 一般为服务器内部错误"
-// @Failure 400 {object} api.GetGroupApplicationListResp "errCode为400 一般为参数输入错误, token未带上等"
+// @Success 0 {object} api.GetGroupApplicationListResp{data=[]open_im_sdk.GroupRequest}
+// @Failure 500 {object} api.Swagger500Resp "errCode为500 一般为服务器内部错误"
+// @Failure 400 {object} api.Swagger400Resp "errCode为400 一般为参数输入错误, token未带上等"
// @Router /group/get_user_req_group_applicationList [post]
func GetUserReqGroupApplicationList(c *gin.Context) {
var params api.GetUserReqGroupApplicationListReq
@@ -537,8 +537,8 @@ func GetUserReqGroupApplicationList(c *gin.Context) {
// @Param req body api.GetGroupInfoReq true "groupIDList为群ID列表"
// @Produce json
// @Success 0 {object} api.GetGroupInfoResp
-// @Failure 500 {object} api.GetGroupInfoResp "errCode为500 一般为服务器内部错误"
-// @Failure 400 {object} api.GetGroupInfoResp "errCode为400 一般为参数输入错误, token未带上等"
+// @Failure 500 {object} api.Swagger500Resp "errCode为500 一般为服务器内部错误"
+// @Failure 400 {object} api.Swagger400Resp "errCode为400 一般为参数输入错误, token未带上等"
// @Router /group/get_groups_info [post]
func GetGroupsInfo(c *gin.Context) {
params := api.GetGroupInfoReq{}
@@ -556,7 +556,7 @@ func GetGroupsInfo(c *gin.Context) {
if !ok {
errMsg := req.OperationID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token")
log.NewError(req.OperationID, errMsg)
- c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
+ c.JSON(http.StatusBadRequest, gin.H{"errCode": 500, "errMsg": errMsg})
return
}
@@ -606,8 +606,8 @@ func GetGroupsInfo(c *gin.Context) {
// @Param req body api.ApplicationGroupResponseReq true "groupID为要处理的群ID
fromUserID为要处理的用户ID
handleMsg为处理结果信息
handleResult为处理结果 1为同意加群 2为拒绝加群"
// @Produce json
// @Success 0 {object} api.ApplicationGroupResponseResp
-// @Failure 500 {object} api.ApplicationGroupResponseResp "errCode为500 一般为服务器内部错误"
-// @Failure 400 {object} api.ApplicationGroupResponseResp "errCode为400 一般为参数输入错误, token未带上等"
+// @Failure 500 {object} api.Swagger500Resp "errCode为500 一般为服务器内部错误"
+// @Failure 400 {object} api.Swagger400Resp "errCode为400 一般为参数输入错误, token未带上等"
// @Router /group/group_application_response [post]
func ApplicationGroupResponse(c *gin.Context) {
params := api.ApplicationGroupResponseReq{}
@@ -625,7 +625,7 @@ func ApplicationGroupResponse(c *gin.Context) {
if !ok {
errMsg := req.OperationID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token")
log.NewError(req.OperationID, errMsg)
- c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
+ c.JSON(http.StatusBadRequest, gin.H{"errCode": 500, "errMsg": errMsg})
return
}
@@ -657,11 +657,11 @@ func ApplicationGroupResponse(c *gin.Context) {
// @ID JoinGroup
// @Accept json
// @Param token header string true "im token"
-// @Param req body api.JoinGroupReq true "reqMessage为申请进群信息"
+// @Param req body api.JoinGroupReq true "reqMessage为申请进群信息
groupID为申请的群ID"
// @Produce json
// @Success 0 {object} api.JoinGroupResp
-// @Failure 500 {object} api.JoinGroupResp "errCode为500 一般为服务器内部错误"
-// @Failure 400 {object} api.JoinGroupResp "errCode为400 一般为参数输入错误, token未带上等"
+// @Failure 500 {object} api.Swagger500Resp "errCode为500 一般为服务器内部错误"
+// @Failure 400 {object} api.Swagger400Resp "errCode为400 一般为参数输入错误, token未带上等"
// @Router /group/join_group [post]
func JoinGroup(c *gin.Context) {
params := api.JoinGroupReq{}
@@ -704,8 +704,8 @@ func JoinGroup(c *gin.Context) {
c.JSON(http.StatusOK, resp)
}
-// @Summary 退出群聊
-// @Description 退出群聊
+// @Summary 当前用户退出群聊
+// @Description 当前用户退出群聊
// @Tags 群组相关
// @ID QuitGroup
// @Accept json
@@ -713,8 +713,8 @@ func JoinGroup(c *gin.Context) {
// @Param req body api.QuitGroupReq true "groupID为要退出的群ID"
// @Produce json
// @Success 0 {object} api.QuitGroupResp
-// @Failure 500 {object} api.QuitGroupResp "errCode为500 一般为服务器内部错误"
-// @Failure 400 {object} api.QuitGroupResp "errCode为400 一般为参数输入错误, token未带上等"
+// @Failure 500 {object} api.Swagger500Resp "errCode为500 一般为服务器内部错误"
+// @Failure 400 {object} api.Swagger400Resp "errCode为400 一般为参数输入错误, token未带上等"
// @Router /group/quit_group [post]
func QuitGroup(c *gin.Context) {
params := api.QuitGroupReq{}
@@ -732,7 +732,7 @@ func QuitGroup(c *gin.Context) {
if !ok {
errMsg := req.OperationID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token")
log.NewError(req.OperationID, errMsg)
- c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
+ c.JSON(http.StatusBadRequest, gin.H{"errCode": 500, "errMsg": errMsg})
return
}
@@ -763,11 +763,11 @@ func QuitGroup(c *gin.Context) {
// @ID SetGroupInfo
// @Accept json
// @Param token header string true "im token"
-// @Param req body api.SetGroupInfoReq true "notification为群介绍
introduction为群公告
needVerification为加群验证 0为申请需要同意 邀请直接进 1为所有人进群需要验证,除了群主管理员邀请进群 2为直接进群"
+// @Param req body api.SetGroupInfoReq true "groupID为要修改的群ID
groupName为新的群名称
notification为群介绍
introduction为群公告
needVerification为加群验证 0为申请需要同意 邀请直接进 1为所有人进群需要验证,除了群主管理员邀请进群 2为直接进群"
// @Produce json
// @Success 0 {object} api.SetGroupInfoResp
-// @Failure 500 {object} api.SetGroupInfoResp "errCode为500 一般为服务器内部错误"
-// @Failure 400 {object} api.SetGroupInfoResp "errCode为400 一般为参数输入错误, token未带上等"
+// @Failure 500 {object} api.Swagger500Resp "errCode为500 一般为服务器内部错误"
+// @Failure 400 {object} api.Swagger400Resp "errCode为400 一般为参数输入错误, token未带上等"
// @Router /group/set_group_info [post]
func SetGroupInfo(c *gin.Context) {
params := api.SetGroupInfoReq{}
@@ -791,7 +791,7 @@ func SetGroupInfo(c *gin.Context) {
if !ok {
errMsg := req.OperationID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token")
log.NewError(req.OperationID, errMsg)
- c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
+ c.JSON(http.StatusBadRequest, gin.H{"errCode": 500, "errMsg": errMsg})
return
}
@@ -825,8 +825,8 @@ func SetGroupInfo(c *gin.Context) {
// @Param req body api.TransferGroupOwnerReq true "GroupID为要操作的群ID
oldOwnerUserID为老群主ID
newOwnerUserID为新群主ID"
// @Produce json
// @Success 0 {object} api.TransferGroupOwnerResp
-// @Failure 500 {object} api.TransferGroupOwnerResp "errCode为500 一般为服务器内部错误"
-// @Failure 400 {object} api.TransferGroupOwnerResp "errCode为400 一般为参数输入错误, token未带上等"
+// @Failure 500 {object} api.Swagger500Resp "errCode为500 一般为服务器内部错误"
+// @Failure 400 {object} api.Swagger400Resp "errCode为400 一般为参数输入错误, token未带上等"
// @Router /group/transfer_group [post]
func TransferGroupOwner(c *gin.Context) {
params := api.TransferGroupOwnerReq{}
@@ -844,7 +844,7 @@ func TransferGroupOwner(c *gin.Context) {
if !ok {
errMsg := req.OperationID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token")
log.NewError(req.OperationID, errMsg)
- c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
+ c.JSON(http.StatusBadRequest, gin.H{"errCode": 500, "errMsg": errMsg})
return
}
@@ -879,8 +879,8 @@ func TransferGroupOwner(c *gin.Context) {
// @Param req body api.DismissGroupReq true "groupID为要解散的群组ID"
// @Produce json
// @Success 0 {object} api.DismissGroupResp
-// @Failure 500 {object} api.DismissGroupResp "errCode为500 一般为服务器内部错误"
-// @Failure 400 {object} api.DismissGroupResp "errCode为400 一般为参数输入错误, token未带上等"
+// @Failure 500 {object} api.Swagger500Resp "errCode为500 一般为服务器内部错误"
+// @Failure 400 {object} api.Swagger400Resp "errCode为400 一般为参数输入错误, token未带上等"
// @Router /group/dismiss_group [post]
func DismissGroup(c *gin.Context) {
params := api.DismissGroupReq{}
@@ -898,7 +898,7 @@ func DismissGroup(c *gin.Context) {
if !ok {
errMsg := req.OperationID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token")
log.NewError(req.OperationID, errMsg)
- c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
+ c.JSON(http.StatusBadRequest, gin.H{"errCode": 500, "errMsg": errMsg})
return
}
@@ -933,8 +933,8 @@ func DismissGroup(c *gin.Context) {
// @Param req body api.MuteGroupMemberReq true "groupID为群组ID
userID为要禁言的用户ID
mutedSeconds为禁言秒数"
// @Produce json
// @Success 0 {object} api.DismissGroupResp
-// @Failure 500 {object} api.DismissGroupResp "errCode为500 一般为服务器内部错误"
-// @Failure 400 {object} api.DismissGroupResp "errCode为400 一般为参数输入错误, token未带上等"
+// @Failure 500 {object} api.Swagger500Resp "errCode为500 一般为服务器内部错误"
+// @Failure 400 {object} api.Swagger400Resp "errCode为400 一般为参数输入错误, token未带上等"
// @Router /group/mute_group_member [post]
func MuteGroupMember(c *gin.Context) {
params := api.MuteGroupMemberReq{}
@@ -952,7 +952,7 @@ func MuteGroupMember(c *gin.Context) {
if !ok {
errMsg := req.OperationID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token")
log.NewError(req.OperationID, errMsg)
- c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
+ c.JSON(http.StatusBadRequest, gin.H{"errCode": 500, "errMsg": errMsg})
return
}
@@ -987,8 +987,8 @@ func MuteGroupMember(c *gin.Context) {
// @Param req body api.CancelMuteGroupMemberReq true "groupID为群组ID
userID为要取消禁言的用户ID"
// @Produce json
// @Success 0 {object} api.CancelMuteGroupMemberResp
-// @Failure 500 {object} api.CancelMuteGroupMemberResp "errCode为500 一般为服务器内部错误"
-// @Failure 400 {object} api.CancelMuteGroupMemberResp "errCode为400 一般为参数输入错误, token未带上等"
+// @Failure 500 {object} api.Swagger500Resp "errCode为500 一般为服务器内部错误"
+// @Failure 400 {object} api.Swagger400Resp "errCode为400 一般为参数输入错误, token未带上等"
// @Router /group/cancel_mute_group_member [post]
func CancelMuteGroupMember(c *gin.Context) {
params := api.CancelMuteGroupMemberReq{}
@@ -1006,7 +1006,7 @@ func CancelMuteGroupMember(c *gin.Context) {
if !ok {
errMsg := req.OperationID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token")
log.NewError(req.OperationID, errMsg)
- c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
+ c.JSON(http.StatusBadRequest, gin.H{"errCode": 500, "errMsg": errMsg})
return
}
@@ -1060,7 +1060,7 @@ func MuteGroup(c *gin.Context) {
if !ok {
errMsg := req.OperationID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token")
log.NewError(req.OperationID, errMsg)
- c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
+ c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": errMsg})
return
}
@@ -1095,8 +1095,8 @@ func MuteGroup(c *gin.Context) {
// @Param req body api.CancelMuteGroupReq true "groupID为群组ID"
// @Produce json
// @Success 0 {object} api.CancelMuteGroupResp
-// @Failure 500 {object} api.CancelMuteGroupResp "errCode为500 一般为服务器内部错误"
-// @Failure 400 {object} api.CancelMuteGroupResp "errCode为400 一般为参数输入错误, token未带上等"
+// @Failure 500 {object} api.Swagger500Resp "errCode为500 一般为服务器内部错误"
+// @Failure 400 {object} api.Swagger400Resp "errCode为400 一般为参数输入错误, token未带上等"
// @Router /group/cancel_mute_group [post]
func CancelMuteGroup(c *gin.Context) {
params := api.CancelMuteGroupReq{}
@@ -1114,7 +1114,7 @@ func CancelMuteGroup(c *gin.Context) {
if !ok {
errMsg := req.OperationID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token")
log.NewError(req.OperationID, errMsg)
- c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
+ c.JSON(http.StatusBadRequest, gin.H{"errCode": 500, "errMsg": errMsg})
return
}
@@ -1158,7 +1158,7 @@ func SetGroupMemberNickname(c *gin.Context) {
if !ok {
errMsg := req.OperationID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token")
log.NewError(req.OperationID, errMsg)
- c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
+ c.JSON(http.StatusBadRequest, gin.H{"errCode": 500, "errMsg": errMsg})
return
}
@@ -1190,11 +1190,11 @@ func SetGroupMemberNickname(c *gin.Context) {
// @ID SetGroupMemberInfo
// @Accept json
// @Param token header string true "im token"
-// @Param req body api.SetGroupMemberInfoReq true "除了operationID, userID, groupID其他参数可选"
+// @Param req body api.SetGroupMemberInfoReq true "除了operationID, userID, groupID其他参数可选
ex为拓展字段
faceURL为群头像
nickName为群昵称
roleLevel为群员角色,1为普通用户 2为群主 3为管理员"
// @Produce json
// @Success 0 {object} api.SetGroupMemberInfoResp
-// @Failure 500 {object} api.SetGroupMemberInfoResp "errCode为500 一般为服务器内部错误"
-// @Failure 400 {object} api.SetGroupMemberInfoResp "errCode为400 一般为参数输入错误, token未带上等"
+// @Failure 500 {object} api.Swagger500Resp "errCode为500 一般为服务器内部错误"
+// @Failure 400 {object} api.Swagger400Resp "errCode为400 一般为参数输入错误, token未带上等"
// @Router /group/set_group_member_info [post]
func SetGroupMemberInfo(c *gin.Context) {
var (
@@ -1212,7 +1212,7 @@ func SetGroupMemberInfo(c *gin.Context) {
if !ok {
errMsg := req.OperationID + " " + "GetUserIDFromToken failed " + errInfo + " token:" + c.Request.Header.Get("token")
log.NewError(req.OperationID, errMsg)
- c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
+ c.JSON(http.StatusBadRequest, gin.H{"errCode": 500, "errMsg": errMsg})
return
}
diff --git a/internal/api/manage/management_chat.go b/internal/api/manage/management_chat.go
index 6c9cd5ece..a70cbacf2 100644
--- a/internal/api/manage/management_chat.go
+++ b/internal/api/manage/management_chat.go
@@ -59,7 +59,6 @@ func newUserSendMsgReq(params *api.ManagementSendMsgReq) *pbChat.SendMsgReq {
OperationID: params.OperationID,
MsgData: &open_im_sdk.MsgData{
SendID: params.SendID,
- RecvID: params.RecvID,
GroupID: params.GroupID,
ClientMsgID: utils.GetMsgID(params.SendID),
SenderPlatformID: params.SenderPlatformID,
@@ -69,6 +68,7 @@ func newUserSendMsgReq(params *api.ManagementSendMsgReq) *pbChat.SendMsgReq {
MsgFrom: constant.SysMsgType,
ContentType: params.ContentType,
Content: []byte(newContent),
+ RecvID: params.RecvID,
// ForceList: params.ForceList,
CreateTime: utils.GetCurrentTimestampByMill(),
Options: options,
@@ -89,6 +89,20 @@ func init() {
validate = validator.New()
}
+// @Summary 管理员发送/撤回消息
+// @Description 管理员发送/撤回消息 消息格式详细见消息格式
+// @Tags 消息相关
+// @ID ManagementSendMsg
+// @Accept json
+// @Param token header string true "im token"
+// @Param 管理员发送文字消息 body api.ManagementSendMsgReq{content=TextElem{}} true "该请求和消息结构体一样"
+// @Param 管理员发送OA通知消息 body api.ManagementSendMsgReq{content=OANotificationElem{}} true "该请求和消息结构体一样"
+// @Param 管理员撤回单聊消息 body api.ManagementSendMsgReq{content=RevokeElem{}} true "该请求和消息结构体一样"
+// @Produce json
+// @Success 0 {object} api.ManagementSendMsgResp "serverMsgID为服务器消息ID
clientMsgID为客户端消息ID
sendTime为发送消息时间"
+// @Failure 500 {object} api.ManagementSendMsgResp "errCode为500 一般为服务器内部错误"
+// @Failure 400 {object} api.ManagementSendMsgResp "errCode为400 一般为参数输入错误, token未带上等"
+// @Router /msg/manage_send_msg [post]
func ManagementSendMsg(c *gin.Context) {
var data interface{}
params := api.ManagementSendMsgReq{}
@@ -194,6 +208,19 @@ func ManagementSendMsg(c *gin.Context) {
c.JSON(http.StatusOK, resp)
}
+// @Summary 管理员批量发送群聊单聊消息
+// @Description 管理员批量发送群聊单聊消息 消息格式详细见消息格式
+// @Tags 消息相关
+// @ID ManagementBatchSendMsg
+// @Accept json
+// @Param token header string true "im token"
+// @Param 管理员批量发送单聊消息 body api.ManagementBatchSendMsgReq{content=TextElem{}} true "该请求和消息结构体一样
recvIDList为接受消息的用户ID列表"
+// @Param 管理员批量发送OA通知 body api.ManagementSendMsgReq{content=OANotificationElem{}} true "该请求和消息结构体一样
recvIDList为接受消息的用户ID列表"
+// @Produce json
+// @Success 0 {object} api.ManagementBatchSendMsgReq "serverMsgID为服务器消息ID
clientMsgID为客户端消息ID
sendTime为发送消息时间"
+// @Failure 500 {object} api.ManagementBatchSendMsgReq "errCode为500 一般为服务器内部错误"
+// @Failure 400 {object} api.ManagementBatchSendMsgReq "errCode为400 一般为参数输入错误, token未带上等"
+// @Router /msg/batch_send_msg [post]
func ManagementBatchSendMsg(c *gin.Context) {
var data interface{}
params := api.ManagementBatchSendMsgReq{}
@@ -260,7 +287,11 @@ func ManagementBatchSendMsg(c *gin.Context) {
}
log.NewInfo(params.OperationID, "Ws call success to ManagementSendMsgReq", params)
for _, recvID := range params.RecvIDList {
- pbData := newUserSendMsgReq(¶ms.ManagementSendMsgReq)
+ req := &api.ManagementSendMsgReq{
+ ManagementSendMsg: params.ManagementSendMsg,
+ RecvID: recvID,
+ }
+ pbData := newUserSendMsgReq(req)
pbData.MsgData.RecvID = recvID
log.Info(params.OperationID, "", "api ManagementSendMsg call start..., ", pbData.String())
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfflineMessageName, params.OperationID)
diff --git a/internal/api/organization/organization.go b/internal/api/organization/organization.go
index 5998fb0dd..32273756f 100644
--- a/internal/api/organization/organization.go
+++ b/internal/api/organization/organization.go
@@ -16,6 +16,18 @@ import (
"strings"
)
+// @Summary 创建部门
+// @Description 创建部门
+// @Tags 组织架构相关
+// @ID CreateDepartment
+// @Accept json
+// @Param token header string true "im token"
+// @Param req body api.CreateDepartmentReq true "请求"
+// @Produce json
+// @Success 0 {object} api.CreateDepartmentResp{data=open_im_sdk.Department}
+// @Failure 500 {object} api.CreateDepartmentResp "errCode为500 一般为服务器内部错误"
+// @Failure 400 {object} api.CreateDepartmentResp "errCode为400 一般为参数输入错误, token未带上等"
+// @Router /organization/create_department [post]
func CreateDepartment(c *gin.Context) {
params := api.CreateDepartmentReq{}
if err := c.BindJSON(¶ms); err != nil {
@@ -59,6 +71,18 @@ func CreateDepartment(c *gin.Context) {
c.JSON(http.StatusOK, apiResp)
}
+// @Summary 更新部门信息
+// @Description 更新部门信息
+// @Tags 组织架构相关
+// @ID UpdateDepartment
+// @Accept json
+// @Param token header string true "im token"
+// @Param req body api.UpdateDepartmentReq true "请求"
+// @Produce json
+// @Success 0 {object} api.UpdateDepartmentResp
+// @Failure 500 {object} api.UpdateDepartmentResp "errCode为500 一般为服务器内部错误"
+// @Failure 400 {object} api.UpdateDepartmentResp "errCode为400 一般为参数输入错误, token未带上等"
+// @Router /organization/update_department [post]
func UpdateDepartment(c *gin.Context) {
params := api.UpdateDepartmentReq{}
if err := c.BindJSON(¶ms); err != nil {
@@ -101,6 +125,18 @@ func UpdateDepartment(c *gin.Context) {
c.JSON(http.StatusOK, apiResp)
}
+// @Summary 获取子部门列表
+// @Description 获取子部门列表
+// @Tags 组织架构相关
+// @ID GetSubDepartment
+// @Accept json
+// @Param token header string true "im token"
+// @Param req body api.GetSubDepartmentReq true "请求"
+// @Produce json
+// @Success 0 {object} api.GetSubDepartmentResp
+// @Failure 500 {object} api.GetSubDepartmentResp "errCode为500 一般为服务器内部错误"
+// @Failure 400 {object} api.GetSubDepartmentResp "errCode为400 一般为参数输入错误, token未带上等"
+// @Router /organization/get_sub_department [post]
func GetSubDepartment(c *gin.Context) {
params := api.GetSubDepartmentReq{}
if err := c.BindJSON(¶ms); err != nil {
@@ -146,6 +182,18 @@ func GetAllDepartment(c *gin.Context) {
}
+// @Summary 删除部门
+// @Description 删除部门
+// @Tags 组织架构相关
+// @ID DeleteDepartment
+// @Accept json
+// @Param token header string true "im token"
+// @Param req body api.DeleteDepartmentReq true "请求"
+// @Produce json
+// @Success 0 {object} api.DeleteDepartmentResp
+// @Failure 500 {object} api.DeleteDepartmentResp "errCode为500 一般为服务器内部错误"
+// @Failure 400 {object} api.DeleteDepartmentResp "errCode为400 一般为参数输入错误, token未带上等"
+// @Router /organization/delete_department [post]
func DeleteDepartment(c *gin.Context) {
params := api.DeleteDepartmentReq{}
if err := c.BindJSON(¶ms); err != nil {
@@ -185,6 +233,18 @@ func DeleteDepartment(c *gin.Context) {
c.JSON(http.StatusOK, apiResp)
}
+// @Summary 组织架构导入用户
+// @Description 组织架构导入用户
+// @Tags 组织架构相关
+// @ID CreateOrganizationUser
+// @Accept json
+// @Param token header string true "im token"
+// @Param req body api.CreateOrganizationUserReq true "请求"
+// @Produce json
+// @Success 0 {object} api.CreateOrganizationUserResp
+// @Failure 500 {object} api.CreateOrganizationUserResp "errCode为500 一般为服务器内部错误"
+// @Failure 400 {object} api.CreateOrganizationUserResp "errCode为400 一般为参数输入错误, token未带上等"
+// @Router /organization/create_organization_user [post]
func CreateOrganizationUser(c *gin.Context) {
params := api.CreateOrganizationUserReq{}
if err := c.BindJSON(¶ms); err != nil {
@@ -227,6 +287,18 @@ func CreateOrganizationUser(c *gin.Context) {
c.JSON(http.StatusOK, apiResp)
}
+// @Summary 更新组织架构中的用户
+// @Description 更新组织架构中的用户
+// @Tags 组织架构相关
+// @ID UpdateOrganizationUser
+// @Accept json
+// @Param token header string true "im token"
+// @Param req body api.UpdateOrganizationUserReq true "请求"
+// @Produce json
+// @Success 0 {object} api.UpdateOrganizationUserResp
+// @Failure 500 {object} api.UpdateOrganizationUserResp "errCode为500 一般为服务器内部错误"
+// @Failure 400 {object} api.UpdateOrganizationUserResp "errCode为400 一般为参数输入错误, token未带上等"
+// @Router /organization/update_organization_user [post]
func UpdateOrganizationUser(c *gin.Context) {
params := api.UpdateOrganizationUserReq{}
if err := c.BindJSON(¶ms); err != nil {
@@ -262,12 +334,23 @@ func UpdateOrganizationUser(c *gin.Context) {
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg})
return
}
-
apiResp := api.UpdateOrganizationUserResp{CommResp: api.CommResp{ErrCode: RpcResp.ErrCode, ErrMsg: RpcResp.ErrMsg}}
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "api return ", apiResp)
c.JSON(http.StatusOK, apiResp)
}
+// @Summary 创建部门用户
+// @Description 创建部门用户
+// @Tags 组织架构相关
+// @ID CreateDepartmentMember
+// @Accept json
+// @Param token header string true "im token"
+// @Param req body api.CreateDepartmentMemberReq true "请求"
+// @Produce json
+// @Success 0 {object} api.CreateDepartmentMemberResp
+// @Failure 500 {object} api.CreateDepartmentMemberResp "errCode为500 一般为服务器内部错误"
+// @Failure 400 {object} api.CreateDepartmentMemberResp "errCode为400 一般为参数输入错误, token未带上等"
+// @Router /organization/create_department_member [post]
func CreateDepartmentMember(c *gin.Context) {
params := api.CreateDepartmentMemberReq{}
if err := c.BindJSON(¶ms); err != nil {
@@ -310,6 +393,18 @@ func CreateDepartmentMember(c *gin.Context) {
c.JSON(http.StatusOK, apiResp)
}
+// @Summary 获取部门中的所有用户
+// @Description 获取部门中的所有用户
+// @Tags 组织架构相关
+// @ID GetUserInDepartment
+// @Accept json
+// @Param token header string true "im token"
+// @Param req body api.GetUserInDepartmentReq true "请求"
+// @Produce json
+// @Success 0 {object} api.GetUserInDepartmentResp{data=open_im_sdk.UserInDepartment}
+// @Failure 500 {object} api.GetUserInDepartmentResp "errCode为500 一般为服务器内部错误"
+// @Failure 400 {object} api.GetUserInDepartmentResp "errCode为400 一般为参数输入错误, token未带上等"
+// @Router /organization/get_user_in_department [post]
func GetUserInDepartment(c *gin.Context) {
params := api.GetUserInDepartmentReq{}
if err := c.BindJSON(¶ms); err != nil {
@@ -352,6 +447,18 @@ func GetUserInDepartment(c *gin.Context) {
c.JSON(http.StatusOK, apiResp)
}
+// @Summary 更新部门中某个用户
+// @Description 更新部门中某个用户
+// @Tags 组织架构相关
+// @ID UpdateUserInDepartment
+// @Accept json
+// @Param token header string true "im token"
+// @Param req body api.UpdateUserInDepartmentReq true "请求"
+// @Produce json
+// @Success 0 {object} api.UpdateUserInDepartmentResp
+// @Failure 500 {object} api.UpdateUserInDepartmentResp "errCode为500 一般为服务器内部错误"
+// @Failure 400 {object} api.UpdateUserInDepartmentResp "errCode为400 一般为参数输入错误, token未带上等"
+// @Router /organization/update_user_in_department [post]
func UpdateUserInDepartment(c *gin.Context) {
params := api.UpdateUserInDepartmentReq{}
if err := c.BindJSON(¶ms); err != nil {
@@ -393,6 +500,18 @@ func UpdateUserInDepartment(c *gin.Context) {
c.JSON(http.StatusOK, apiResp)
}
+// @Summary 删除组织架构中某个用户
+// @Description 删除组织架构中某个用户
+// @Tags 组织架构相关
+// @ID DeleteOrganizationUser
+// @Accept json
+// @Param token header string true "im token"
+// @Param req body api.DeleteOrganizationUserReq true "请求"
+// @Produce json
+// @Success 0 {object} api.DeleteOrganizationUserResp
+// @Failure 500 {object} api.DeleteOrganizationUserResp "errCode为500 一般为服务器内部错误"
+// @Failure 400 {object} api.DeleteOrganizationUserResp "errCode为400 一般为参数输入错误, token未带上等"
+// @Router /organization/delete_organization_user [post]
func DeleteOrganizationUser(c *gin.Context) {
params := api.DeleteOrganizationUserReq{}
if err := c.BindJSON(¶ms); err != nil {
@@ -434,6 +553,18 @@ func DeleteOrganizationUser(c *gin.Context) {
c.JSON(http.StatusOK, apiResp)
}
+// @Summary 获取部门中所有成员
+// @Description 获取部门中所有成员
+// @Tags 组织架构相关
+// @ID GetDepartmentMember
+// @Accept json
+// @Param token header string true "im token"
+// @Param req body api.GetDepartmentMemberReq true "请求"
+// @Produce json
+// @Success 0 {object} api.GetDepartmentMemberResp{data=open_im_sdk.UserDepartmentMember}
+// @Failure 500 {object} api.GetDepartmentMemberResp "errCode为500 一般为服务器内部错误"
+// @Failure 400 {object} api.GetDepartmentMemberResp "errCode为400 一般为参数输入错误, token未带上等"
+// @Router /organization/get_department_member [post]
func GetDepartmentMember(c *gin.Context) {
params := api.GetDepartmentMemberReq{}
if err := c.BindJSON(¶ms); err != nil {
@@ -476,6 +607,18 @@ func GetDepartmentMember(c *gin.Context) {
c.JSON(http.StatusOK, apiResp)
}
+// @Summary 删除部门中某个用户
+// @Description 删除部门中某个用户
+// @Tags 组织架构相关
+// @ID DeleteUserInDepartment
+// @Accept json
+// @Param token header string true "im token"
+// @Param req body api.DeleteUserInDepartmentReq true "请求"
+// @Produce json
+// @Success 0 {object} api.DeleteUserInDepartmentResp
+// @Failure 500 {object} api.DeleteUserInDepartmentResp "errCode为500 一般为服务器内部错误"
+// @Failure 400 {object} api.DeleteUserInDepartmentResp "errCode为400 一般为参数输入错误, token未带上等"
+// @Router /organization/delete_user_in_department [post]
func DeleteUserInDepartment(c *gin.Context) {
params := api.DeleteUserInDepartmentReq{}
if err := c.BindJSON(¶ms); err != nil {
diff --git a/internal/api/third/minio_storage_credential.go b/internal/api/third/minio_storage_credential.go
index 7d0124688..e21550044 100644
--- a/internal/api/third/minio_storage_credential.go
+++ b/internal/api/third/minio_storage_credential.go
@@ -28,13 +28,13 @@ import (
// @Param operationID formData string true "操作唯一ID"
// @Produce json
// @Success 0 {object} api.MinioUploadFileResp ""
-// @Failure 500 {object} api.MinioUploadFileResp "errCode为500 一般为服务器内部错误"
-// @Failure 400 {object} api.MinioUploadFileResp "errCode为400 一般为参数输入错误, token未带上等"
+// @Failure 500 {object} api.Swagger500Resp "errCode为500 一般为服务器内部错误"
+// @Failure 400 {object} api.Swagger400Resp "errCode为400 一般为参数输入错误, token未带上等"
// @Router /third/minio_upload [post]
func MinioUploadFile(c *gin.Context) {
var (
req api.MinioUploadFileReq
- resp api.MinioUploadFileResp
+ resp api.MinioUploadFile
)
defer func() {
if r := recover(); r != nil {
diff --git a/internal/api/user/user.go b/internal/api/user/user.go
index 81832f5b2..3047dce46 100644
--- a/internal/api/user/user.go
+++ b/internal/api/user/user.go
@@ -155,9 +155,9 @@ func GetBlackIDListFromCache(c *gin.Context) {
// @Param token header string true "im token"
// @Param req body api.GetUsersInfoReq true "请求体"
// @Produce json
-// @Success 0 {object} api.GetUsersInfoResp
-// @Failure 500 {object} api.GetUsersInfoResp "errCode为500 一般为服务器内部错误"
-// @Failure 400 {object} api.GetUsersInfoResp "errCode为400 一般为参数输入错误, token未带上等"
+// @Success 0 {object} api.GetUsersInfoResp{Data=[]open_im_sdk.PublicUserInfo}
+// @Failure 500 {object} api.Swagger500Resp "errCode为500 一般为服务器内部错误"
+// @Failure 400 {object} api.Swagger400Resp "errCode为400 一般为参数输入错误, token未带上等"
// @Router /user/get_users_info [post]
func GetUsersInfo(c *gin.Context) {
params := api.GetUsersInfoReq{}
@@ -216,8 +216,8 @@ func GetUsersInfo(c *gin.Context) {
// @Param req body api.UpdateSelfUserInfoReq true "请求体"
// @Produce json
// @Success 0 {object} api.UpdateUserInfoResp
-// @Failure 500 {object} api.UpdateUserInfoResp "errCode为500 一般为服务器内部错误"
-// @Failure 400 {object} api.UpdateUserInfoResp "errCode为400 一般为参数输入错误, token未带上等"
+// @Failure 500 {object} api.Swagger500Resp "errCode为500 一般为服务器内部错误"
+// @Failure 400 {object} api.Swagger400Resp "errCode为400 一般为参数输入错误, token未带上等"
// @Router /user/update_user_info [post]
func UpdateUserInfo(c *gin.Context) {
params := api.UpdateSelfUserInfoReq{}
@@ -264,11 +264,11 @@ func UpdateUserInfo(c *gin.Context) {
// @ID SetGlobalRecvMessageOpt
// @Accept json
// @Param token header string true "im token"
-// @Param req body api.SetGlobalRecvMessageOptReq true "请求体"
+// @Param req body api.SetGlobalRecvMessageOptReq true "globalRecvMsgOpt为全局免打扰设置0为关闭 1为开启"
// @Produce json
// @Success 0 {object} api.SetGlobalRecvMessageOptResp
-// @Failure 500 {object} api.SetGlobalRecvMessageOptResp "errCode为500 一般为服务器内部错误"
-// @Failure 400 {object} api.SetGlobalRecvMessageOptResp "errCode为400 一般为参数输入错误, token未带上等"
+// @Failure 500 {object} api.Swagger500Resp "errCode为500 一般为服务器内部错误"
+// @Failure 400 {object} api.Swagger400Resp "errCode为400 一般为参数输入错误, token未带上等"
// @Router /user/set_global_msg_recv_opt [post]
func SetGlobalRecvMessageOpt(c *gin.Context) {
params := api.SetGlobalRecvMessageOptReq{}
@@ -318,8 +318,8 @@ func SetGlobalRecvMessageOpt(c *gin.Context) {
// @Param req body api.GetSelfUserInfoReq true "请求体"
// @Produce json
// @Success 0 {object} api.GetSelfUserInfoResp{data=open_im_sdk.UserInfo}
-// @Failure 500 {object} api.GetSelfUserInfoResp "errCode为500 一般为服务器内部错误"
-// @Failure 400 {object} api.GetSelfUserInfoResp "errCode为400 一般为参数输入错误, token未带上等"
+// @Failure 500 {object} api.Swagger500Resp "errCode为500 一般为服务器内部错误"
+// @Failure 400 {object} api.Swagger400Resp "errCode为400 一般为参数输入错误, token未带上等"
// @Router /user/get_self_user_info [post]
func GetSelfUserInfo(c *gin.Context) {
params := api.GetSelfUserInfoReq{}
@@ -381,8 +381,8 @@ func GetSelfUserInfo(c *gin.Context) {
// @Param req body api.GetUsersOnlineStatusReq true "请求体"
// @Produce json
// @Success 0 {object} api.GetUsersOnlineStatusResp
-// @Failure 500 {object} api.GetUsersOnlineStatusResp "errCode为500 一般为服务器内部错误"
-// @Failure 400 {object} api.GetUsersOnlineStatusResp "errCode为400 一般为参数输入错误, token未带上等"
+// @Failure 500 {object} api.Swagger500Resp "errCode为500 一般为服务器内部错误"
+// @Failure 400 {object} api.Swagger400Resp "errCode为400 一般为参数输入错误, token未带上等"
// @Router /user/get_users_online_status [post]
func GetUsersOnlineStatus(c *gin.Context) {
params := api.GetUsersOnlineStatusReq{}
diff --git a/pkg/base_info/auth_api_struct.go b/pkg/base_info/auth_api_struct.go
index 70f0f86c9..3b2fb2b13 100644
--- a/pkg/base_info/auth_api_struct.go
+++ b/pkg/base_info/auth_api_struct.go
@@ -63,6 +63,6 @@ type ExpireTime struct {
type ParseTokenResp struct {
CommResp
- Data map[string]interface{} `json:"data"`
+ Data map[string]interface{} `json:"data" swaggerignore:"true"`
ExpireTime ExpireTime `json:"-"`
}
diff --git a/pkg/base_info/friend_api_struct.go b/pkg/base_info/friend_api_struct.go
index 3c45c393e..e15bed380 100644
--- a/pkg/base_info/friend_api_struct.go
+++ b/pkg/base_info/friend_api_struct.go
@@ -60,7 +60,7 @@ type GetBlackListReq struct {
type GetBlackListResp struct {
CommResp
BlackUserInfoList []*open_im_sdk.PublicUserInfo `json:"-"`
- Data []map[string]interface{} `json:"data"`
+ Data []map[string]interface{} `json:"data" swaggerignore:"true"`
}
//type PublicUserInfo struct {
@@ -102,7 +102,7 @@ type GetFriendsInfoReq struct {
type GetFriendsInfoResp struct {
CommResp
FriendInfoList []*open_im_sdk.FriendInfo `json:"-"`
- Data []map[string]interface{} `json:"data"`
+ Data []map[string]interface{} `json:"data" swaggerignore:"true"`
}
type GetFriendListReq struct {
@@ -112,7 +112,7 @@ type GetFriendListReq struct {
type GetFriendListResp struct {
CommResp
FriendInfoList []*open_im_sdk.FriendInfo `json:"-"`
- Data []map[string]interface{} `json:"data"`
+ Data []map[string]interface{} `json:"data" swaggerignore:"true"`
}
type GetFriendApplyListReq struct {
@@ -122,7 +122,7 @@ type GetFriendApplyListReq struct {
type GetFriendApplyListResp struct {
CommResp
FriendRequestList []*open_im_sdk.FriendRequest `json:"-"`
- Data []map[string]interface{} `json:"data"`
+ Data []map[string]interface{} `json:"data" swaggerignore:"true"`
}
type GetSelfApplyListReq struct {
@@ -132,5 +132,5 @@ type GetSelfApplyListReq struct {
type GetSelfApplyListResp struct {
CommResp
FriendRequestList []*open_im_sdk.FriendRequest `json:"-"`
- Data []map[string]interface{} `json:"data"`
+ Data []map[string]interface{} `json:"data" swaggerignore:"true"`
}
diff --git a/pkg/base_info/group_api_struct.go b/pkg/base_info/group_api_struct.go
index d38615026..dac6328ee 100644
--- a/pkg/base_info/group_api_struct.go
+++ b/pkg/base_info/group_api_struct.go
@@ -33,7 +33,7 @@ type GetGroupMembersInfoReq struct {
type GetGroupMembersInfoResp struct {
CommResp
MemberList []*open_im_sdk.GroupMemberFullInfo `json:"-"`
- Data []map[string]interface{} `json:"data"`
+ Data []map[string]interface{} `json:"data" swaggerignore:"true"`
}
type InviteUserToGroupReq struct {
@@ -54,7 +54,7 @@ type GetJoinedGroupListReq struct {
type GetJoinedGroupListResp struct {
CommResp
GroupInfoList []*open_im_sdk.GroupInfo `json:"-"`
- Data []map[string]interface{} `json:"data"`
+ Data []map[string]interface{} `json:"data" swaggerignore:"true"`
}
type GetGroupMemberListReq struct {
@@ -67,7 +67,7 @@ type GetGroupMemberListResp struct {
CommResp
NextSeq int32 `json:"nextSeq"`
MemberList []*open_im_sdk.GroupMemberFullInfo `json:"-"`
- Data []map[string]interface{} `json:"data"`
+ Data []map[string]interface{} `json:"data" swaggerignore:"true"`
}
type GetGroupAllMemberReq struct {
@@ -77,7 +77,7 @@ type GetGroupAllMemberReq struct {
type GetGroupAllMemberResp struct {
CommResp
MemberList []*open_im_sdk.GroupMemberFullInfo `json:"-"`
- Data []map[string]interface{} `json:"data"`
+ Data []map[string]interface{} `json:"data" swaggerignore:"true"`
}
type CreateGroupReq struct {
@@ -105,7 +105,7 @@ type GetGroupApplicationListReq struct {
type GetGroupApplicationListResp struct {
CommResp
GroupRequestList []*open_im_sdk.GroupRequest `json:"-"`
- Data []map[string]interface{} `json:"data"`
+ Data []map[string]interface{} `json:"data" swaggerignore:"true"`
}
type GetUserReqGroupApplicationListReq struct {
@@ -125,7 +125,7 @@ type GetGroupInfoReq struct {
type GetGroupInfoResp struct {
CommResp
GroupInfoList []*open_im_sdk.GroupInfo `json:"-"`
- Data []map[string]interface{} `json:"data"`
+ Data []map[string]interface{} `json:"data" swaggerignore:"true"`
}
//type GroupInfoAlias struct {
diff --git a/pkg/base_info/manage_api_struct.go b/pkg/base_info/manage_api_struct.go
index f8515dd5b..5c249b3f7 100644
--- a/pkg/base_info/manage_api_struct.go
+++ b/pkg/base_info/manage_api_struct.go
@@ -39,20 +39,24 @@ type AccountCheckResp struct {
ResultList []*pbUser.AccountCheckResp_SingleUserStatus `json:"data"`
}
+type ManagementSendMsg struct {
+ OperationID string `json:"operationID" binding:"required"`
+ SendID string `json:"sendID" binding:"required"`
+ GroupID string `json:"groupID" `
+ SenderNickname string `json:"senderNickname" `
+ SenderFaceURL string `json:"senderFaceURL" `
+ SenderPlatformID int32 `json:"senderPlatformID"`
+ //ForceList []string `json:"forceList" `
+ Content map[string]interface{} `json:"content" binding:"required" swaggerignore:"true"`
+ ContentType int32 `json:"contentType" binding:"required"`
+ SessionType int32 `json:"sessionType" binding:"required"`
+ IsOnlineOnly bool `json:"isOnlineOnly"`
+ OfflinePushInfo *open_im_sdk.OfflinePushInfo `json:"offlinePushInfo"`
+}
+
type ManagementSendMsgReq struct {
- OperationID string `json:"operationID" binding:"required"`
- SendID string `json:"sendID" binding:"required"`
- RecvID string `json:"recvID" `
- GroupID string `json:"groupID" `
- SenderNickname string `json:"senderNickname" `
- SenderFaceURL string `json:"senderFaceURL" `
- SenderPlatformID int32 `json:"senderPlatformID"`
- ForceList []string `json:"forceList" `
- Content map[string]interface{} `json:"content" binding:"required"`
- ContentType int32 `json:"contentType" binding:"required"`
- SessionType int32 `json:"sessionType" binding:"required"`
- IsOnlineOnly bool `json:"isOnlineOnly"`
- OfflinePushInfo *open_im_sdk.OfflinePushInfo `json:"offlinePushInfo"`
+ ManagementSendMsg
+ RecvID string `json:"recvID" `
}
type ManagementSendMsgResp struct {
@@ -61,7 +65,7 @@ type ManagementSendMsgResp struct {
}
type ManagementBatchSendMsgReq struct {
- ManagementSendMsgReq
+ ManagementSendMsg
RecvIDList []string `json:"recvIDList"`
}
diff --git a/pkg/base_info/swagger_example.go b/pkg/base_info/swagger_example.go
new file mode 100644
index 000000000..b56f26276
--- /dev/null
+++ b/pkg/base_info/swagger_example.go
@@ -0,0 +1,11 @@
+package base_info
+
+type Swagger400Resp struct {
+ ErrCode int32 `json:"errCode" example:"400"`
+ ErrMsg string `json:"errMsg" example:"err msg"`
+}
+
+type Swagger500Resp struct {
+ ErrCode int32 `json:"errCode" example:"500"`
+ ErrMsg string `json:"errMsg" example:"err msg"`
+}
diff --git a/pkg/base_info/third_api_struct.go b/pkg/base_info/third_api_struct.go
index e59e03940..72924e873 100644
--- a/pkg/base_info/third_api_struct.go
+++ b/pkg/base_info/third_api_struct.go
@@ -19,13 +19,20 @@ type MinioUploadFileReq struct {
FileType int `form:"fileType" binding:"required"`
}
-type MinioUploadFileResp struct {
+type MinioUploadFile struct {
URL string `json:"URL"`
NewName string `json:"newName"`
SnapshotURL string `json:"snapshotURL,omitempty"`
SnapshotNewName string `json:"snapshotName,omitempty"`
}
+type MinioUploadFileResp struct {
+ CommResp
+ Data struct {
+ MinioUploadFile
+ } `json:"data"`
+}
+
type UploadUpdateAppReq struct {
OperationID string `form:"operationID" binding:"required"`
Type int `form:"type" binding:"required"`