client/docs/mcs/mcs.swagger.json

214 lines
4.4 KiB
JSON

{
"swagger": "2.0",
"info": {
"title": "blocks.proto",
"version": "version not set"
},
"tags": [
{
"name": "Auth"
},
{
"name": "History"
},
{
"name": "Msg"
},
{
"name": "Api"
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"paths": {},
"definitions": {
"mcsDeviceType": {
"type": "string",
"enum": [
"Pc",
"Android",
"Ios",
"Web"
],
"default": "Pc"
},
"mcsMcsRegisterReply": {
"type": "object",
"properties": {
"status": {
"type": "integer",
"format": "int32",
"title": "状态"
},
"secretKey": {
"type": "string",
"title": "秘钥"
},
"endpoints": {
"type": "array",
"items": {
"type": "string"
},
"title": "服务器地址。"
}
}
},
"mcsMessageItem": {
"type": "object",
"properties": {
"timeSequence": {
"type": "string",
"format": "int64",
"title": "时间序列,也是创建时间"
},
"sessionIdent": {
"type": "string",
"title": "会话唯一标识"
},
"senderId": {
"type": "string",
"format": "int64"
},
"senderIdentity": {
"type": "string"
},
"targetId": {
"type": "string",
"format": "int64"
},
"targetIdentity": {
"type": "string"
},
"groupId": {
"type": "string",
"format": "int64"
},
"groupIdentity": {
"type": "string",
"title": "扩展字段,上传时无需上传"
},
"msgType": {
"type": "integer",
"format": "int32",
"title": "消息类型"
},
"bodyType": {
"type": "integer",
"format": "int32",
"title": "正文类型"
},
"body": {
"type": "string",
"title": "消息体"
},
"deletedAt": {
"type": "string",
"format": "int64",
"title": "删除时间,时间戳,毫秒"
}
}
},
"mcsMsgType": {
"type": "string",
"enum": [
"Exception",
"Chat",
"Group",
"System",
"Event"
],
"default": "Exception",
"description": "- Exception: 异常提示\n - Chat: 单聊\n - Group: 群聊\n - System: 系统提示\n - Event: 事件",
"title": "消息类型"
},
"mcsPullItemRequest": {
"type": "object",
"properties": {
"ident": {
"type": "string",
"title": "唯一标识,对话唯一标识/群组唯一标识"
},
"sequence": {
"type": "string",
"format": "int64"
},
"msgType": {
"$ref": "#/definitions/mcsMsgType",
"title": "消息类型"
},
"limit": {
"type": "integer",
"format": "int32",
"title": "最大读取条数"
}
}
},
"mcsPullReply": {
"type": "object",
"properties": {
"total": {
"type": "integer",
"format": "int32"
},
"execTimeNs": {
"type": "string",
"format": "int64"
},
"messages": {
"type": "array",
"items": {
"type": "object",
"$ref": "#/definitions/mcsMessageItem"
}
}
}
},
"mcsStatusReply": {
"type": "object",
"properties": {
"data": {
"type": "string",
"title": "数据"
},
"timeseq": {
"type": "string",
"format": "int64",
"title": "响应时间序列"
}
}
},
"protobufAny": {
"type": "object",
"properties": {
"@type": {
"type": "string"
}
},
"additionalProperties": {}
},
"rpcStatus": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"format": "int32"
},
"message": {
"type": "string"
},
"details": {
"type": "array",
"items": {
"type": "object",
"$ref": "#/definitions/protobufAny"
}
}
}
}
}
}