2023-02-16 06:09:37 +08:00
|
|
|
|
syntax = "proto3";
|
|
|
|
|
|
|
|
|
|
package wcf;
|
2023-03-17 23:45:39 +08:00
|
|
|
|
option java_package = "com.iamteer";
|
2023-02-16 06:09:37 +08:00
|
|
|
|
|
|
|
|
|
enum Functions {
|
|
|
|
|
FUNC_RESERVED = 0x00;
|
|
|
|
|
FUNC_IS_LOGIN = 0x01;
|
|
|
|
|
FUNC_GET_SELF_WXID = 0x10;
|
|
|
|
|
FUNC_GET_MSG_TYPES = 0x11;
|
|
|
|
|
FUNC_GET_CONTACTS = 0x12;
|
|
|
|
|
FUNC_GET_DB_NAMES = 0x13;
|
|
|
|
|
FUNC_GET_DB_TABLES = 0x14;
|
2023-04-11 23:26:38 +08:00
|
|
|
|
FUNC_GET_USER_INFO = 0x15;
|
2023-02-16 06:09:37 +08:00
|
|
|
|
FUNC_SEND_TXT = 0x20;
|
|
|
|
|
FUNC_SEND_IMG = 0x21;
|
2023-02-23 07:42:58 +08:00
|
|
|
|
FUNC_SEND_FILE = 0x22;
|
2023-03-01 04:03:53 +08:00
|
|
|
|
FUNC_SEND_XML = 0x23;
|
2023-03-13 00:09:32 +08:00
|
|
|
|
FUNC_SEND_EMOTION = 0x24;
|
2023-02-16 06:09:37 +08:00
|
|
|
|
FUNC_ENABLE_RECV_TXT = 0x30;
|
|
|
|
|
FUNC_DISABLE_RECV_TXT = 0x40;
|
|
|
|
|
FUNC_EXEC_DB_QUERY = 0x50;
|
|
|
|
|
FUNC_ACCEPT_FRIEND = 0x51;
|
2023-02-28 20:14:22 +08:00
|
|
|
|
FUNC_ADD_ROOM_MEMBERS = 0x52;
|
2023-02-16 06:09:37 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
message Request
|
|
|
|
|
{
|
|
|
|
|
Functions func = 1;
|
|
|
|
|
oneof msg
|
|
|
|
|
{
|
|
|
|
|
Empty empty = 2;
|
|
|
|
|
string str = 3;
|
|
|
|
|
TextMsg txt = 4;
|
2023-02-20 01:10:40 +08:00
|
|
|
|
PathMsg file = 5;
|
2023-02-16 06:09:37 +08:00
|
|
|
|
DbQuery query = 6;
|
|
|
|
|
Verification v = 7;
|
2023-02-28 20:14:22 +08:00
|
|
|
|
AddMembers m = 8;
|
2023-03-01 04:03:53 +08:00
|
|
|
|
XmlMsg xml = 9;
|
2023-02-16 06:09:37 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
message Response
|
|
|
|
|
{
|
|
|
|
|
Functions func = 1;
|
|
|
|
|
oneof msg
|
|
|
|
|
{
|
2023-04-11 23:26:38 +08:00
|
|
|
|
int32 status = 2; // Int 状态,通用
|
|
|
|
|
string str = 3; // 字符串
|
|
|
|
|
WxMsg wxmsg = 4; // 微信消息
|
|
|
|
|
MsgTypes types = 5; // 消息类型
|
|
|
|
|
RpcContacts contacts = 6; // 联系人
|
|
|
|
|
DbNames dbs = 7; // 数据库列表
|
|
|
|
|
DbTables tables = 8; // 表列表
|
|
|
|
|
DbRows rows = 9; // 行列表
|
|
|
|
|
UserInfo ui = 10; // 个人信息
|
2023-02-16 06:09:37 +08:00
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
message Empty { }
|
|
|
|
|
|
|
|
|
|
message WxMsg
|
|
|
|
|
{
|
2023-04-11 21:53:50 +08:00
|
|
|
|
bool is_self = 1; // 是否自己发送的
|
|
|
|
|
bool is_group = 2; // 是否群消息
|
|
|
|
|
int32 type = 3; // 消息类型
|
|
|
|
|
string id = 4; // 消息 id
|
|
|
|
|
string xml = 5; // 消息 xml
|
|
|
|
|
string sender = 6; // 消息发送者
|
|
|
|
|
string roomid = 7; // 群 id(如果是群消息的话)
|
|
|
|
|
string content = 8; // 消息内容
|
|
|
|
|
string thumb = 9; // 缩略图
|
2023-04-11 16:12:02 +08:00
|
|
|
|
string extra = 10; // 附加内容
|
2023-02-16 06:09:37 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
message TextMsg
|
|
|
|
|
{
|
|
|
|
|
string msg = 1; // 要发送的消息内容
|
|
|
|
|
string receiver = 2; // 消息接收人,当为群时可@
|
|
|
|
|
string aters = 3; // 要@的人列表,逗号分隔
|
|
|
|
|
}
|
|
|
|
|
|
2023-02-20 01:10:40 +08:00
|
|
|
|
message PathMsg
|
2023-02-16 06:09:37 +08:00
|
|
|
|
{
|
|
|
|
|
string path = 1; // 要发送的图片的路径
|
|
|
|
|
string receiver = 2; // 消息接收人
|
|
|
|
|
}
|
|
|
|
|
|
2023-03-01 04:03:53 +08:00
|
|
|
|
message XmlMsg
|
|
|
|
|
{
|
|
|
|
|
string receiver = 1; // 消息接收人
|
|
|
|
|
string content = 2; // xml 内容
|
|
|
|
|
string path = 3; // 图片路径
|
|
|
|
|
int32 type = 4; // 消息类型
|
|
|
|
|
}
|
|
|
|
|
|
2023-02-16 06:09:37 +08:00
|
|
|
|
message MsgTypes { map<int32, string> types = 1; }
|
|
|
|
|
|
|
|
|
|
message RpcContact
|
|
|
|
|
{
|
|
|
|
|
string wxid = 1; // 微信 id
|
|
|
|
|
string code = 2; // 微信号
|
|
|
|
|
string name = 3; // 微信昵称
|
|
|
|
|
string country = 4; // 国家
|
|
|
|
|
string province = 5; // 省/州
|
|
|
|
|
string city = 6; // 城市
|
|
|
|
|
int32 gender = 7; // 性别
|
|
|
|
|
}
|
|
|
|
|
message RpcContacts { repeated RpcContact contacts = 1; }
|
|
|
|
|
|
|
|
|
|
message DbNames { repeated string names = 1; }
|
|
|
|
|
|
|
|
|
|
message DbTable
|
|
|
|
|
{
|
|
|
|
|
string name = 1; // 表名
|
|
|
|
|
string sql = 2; // 建表 SQL
|
|
|
|
|
}
|
|
|
|
|
message DbTables { repeated DbTable tables = 1; }
|
|
|
|
|
|
|
|
|
|
message DbQuery
|
|
|
|
|
{
|
|
|
|
|
string db = 1; // 目标数据库
|
|
|
|
|
string sql = 2; // 查询 SQL
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
message DbField
|
|
|
|
|
{
|
|
|
|
|
int32 type = 1; // 字段类型
|
|
|
|
|
string column = 2; // 字段名称
|
|
|
|
|
bytes content = 3; // 字段内容
|
|
|
|
|
}
|
|
|
|
|
message DbRow { repeated DbField fields = 1; }
|
|
|
|
|
message DbRows { repeated DbRow rows = 1; }
|
|
|
|
|
|
|
|
|
|
message Verification
|
|
|
|
|
{
|
|
|
|
|
string v3 = 1;
|
|
|
|
|
string v4 = 2;
|
|
|
|
|
}
|
2023-02-28 20:14:22 +08:00
|
|
|
|
|
|
|
|
|
message AddMembers
|
|
|
|
|
{
|
|
|
|
|
string roomid = 1; // 要加的群ID
|
|
|
|
|
string wxids = 2; // 要加群的人列表,逗号分隔
|
|
|
|
|
}
|
2023-04-11 23:26:38 +08:00
|
|
|
|
|
|
|
|
|
message UserInfo
|
|
|
|
|
{
|
|
|
|
|
string wxid = 1; // 微信ID
|
|
|
|
|
string name = 2; // 昵称
|
|
|
|
|
string mobile = 3; // 手机号
|
|
|
|
|
string home = 4; // 文件/图片等父路径
|
|
|
|
|
}
|