保存图片、保存语音、发送卡片消息、拍一拍群友、邀请群成员、图片 OCR、转发消息
This commit is contained in:
@@ -3,7 +3,10 @@
|
||||
pub struct Request {
|
||||
#[prost(enumeration = "Functions", tag = "1")]
|
||||
pub func: i32,
|
||||
#[prost(oneof = "request::Msg", tags = "2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13")]
|
||||
#[prost(
|
||||
oneof = "request::Msg",
|
||||
tags = "2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18"
|
||||
)]
|
||||
pub msg: ::core::option::Option<request::Msg>,
|
||||
}
|
||||
/// Nested message and enum types in `Request`.
|
||||
@@ -23,8 +26,9 @@ pub mod request {
|
||||
Query(super::DbQuery),
|
||||
#[prost(message, tag = "7")]
|
||||
V(super::Verification),
|
||||
/// 群成员管理,添加、删除、邀请
|
||||
#[prost(message, tag = "8")]
|
||||
M(super::AddMembers),
|
||||
M(super::MemberMgmt),
|
||||
#[prost(message, tag = "9")]
|
||||
Xml(super::XmlMsg),
|
||||
#[prost(message, tag = "10")]
|
||||
@@ -36,6 +40,16 @@ pub mod request {
|
||||
Ui64(u64),
|
||||
#[prost(bool, tag = "13")]
|
||||
Flag(bool),
|
||||
#[prost(message, tag = "14")]
|
||||
Att(super::AttachMsg),
|
||||
#[prost(message, tag = "15")]
|
||||
Am(super::AudioMsg),
|
||||
#[prost(message, tag = "16")]
|
||||
Rt(super::RichText),
|
||||
#[prost(message, tag = "17")]
|
||||
Pm(super::PatMsg),
|
||||
#[prost(message, tag = "18")]
|
||||
Fm(super::ForwardMsg),
|
||||
}
|
||||
}
|
||||
#[allow(clippy::derive_partial_eq_without_eq)]
|
||||
@@ -43,7 +57,7 @@ pub mod request {
|
||||
pub struct Response {
|
||||
#[prost(enumeration = "Functions", tag = "1")]
|
||||
pub func: i32,
|
||||
#[prost(oneof = "response::Msg", tags = "2, 3, 4, 5, 6, 7, 8, 9, 10")]
|
||||
#[prost(oneof = "response::Msg", tags = "2, 3, 4, 5, 6, 7, 8, 9, 10, 11")]
|
||||
pub msg: ::core::option::Option<response::Msg>,
|
||||
}
|
||||
/// Nested message and enum types in `Response`.
|
||||
@@ -78,6 +92,9 @@ pub mod response {
|
||||
/// 个人信息
|
||||
#[prost(message, tag = "10")]
|
||||
Ui(super::UserInfo),
|
||||
/// OCR 结果
|
||||
#[prost(message, tag = "11")]
|
||||
Ocr(super::OcrMsg),
|
||||
}
|
||||
}
|
||||
#[allow(clippy::derive_partial_eq_without_eq)]
|
||||
@@ -274,7 +291,7 @@ pub struct Verification {
|
||||
}
|
||||
#[allow(clippy::derive_partial_eq_without_eq)]
|
||||
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||
pub struct AddMembers {
|
||||
pub struct MemberMgmt {
|
||||
/// 要加的群ID
|
||||
#[prost(string, tag = "1")]
|
||||
pub roomid: ::prost::alloc::string::String,
|
||||
@@ -321,6 +338,84 @@ pub struct Transfer {
|
||||
#[prost(string, tag = "3")]
|
||||
pub taid: ::prost::alloc::string::String,
|
||||
}
|
||||
#[allow(clippy::derive_partial_eq_without_eq)]
|
||||
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||
pub struct AttachMsg {
|
||||
/// 消息 id
|
||||
#[prost(uint64, tag = "1")]
|
||||
pub id: u64,
|
||||
/// 消息中的 thumb
|
||||
#[prost(string, tag = "2")]
|
||||
pub thumb: ::prost::alloc::string::String,
|
||||
/// 消息中的 extra
|
||||
#[prost(string, tag = "3")]
|
||||
pub extra: ::prost::alloc::string::String,
|
||||
}
|
||||
#[allow(clippy::derive_partial_eq_without_eq)]
|
||||
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||
pub struct AudioMsg {
|
||||
/// 语音消息 id
|
||||
#[prost(uint64, tag = "1")]
|
||||
pub id: u64,
|
||||
/// 存放目录
|
||||
#[prost(string, tag = "2")]
|
||||
pub dir: ::prost::alloc::string::String,
|
||||
}
|
||||
#[allow(clippy::derive_partial_eq_without_eq)]
|
||||
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||
pub struct RichText {
|
||||
/// 显示名字
|
||||
#[prost(string, tag = "1")]
|
||||
pub name: ::prost::alloc::string::String,
|
||||
/// 公众号 id
|
||||
#[prost(string, tag = "2")]
|
||||
pub account: ::prost::alloc::string::String,
|
||||
/// 标题
|
||||
#[prost(string, tag = "3")]
|
||||
pub title: ::prost::alloc::string::String,
|
||||
/// 摘要
|
||||
#[prost(string, tag = "4")]
|
||||
pub digest: ::prost::alloc::string::String,
|
||||
/// 链接
|
||||
#[prost(string, tag = "5")]
|
||||
pub url: ::prost::alloc::string::String,
|
||||
/// 缩略图
|
||||
#[prost(string, tag = "6")]
|
||||
pub thumburl: ::prost::alloc::string::String,
|
||||
/// 接收人
|
||||
#[prost(string, tag = "7")]
|
||||
pub receiver: ::prost::alloc::string::String,
|
||||
}
|
||||
#[allow(clippy::derive_partial_eq_without_eq)]
|
||||
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||
pub struct PatMsg {
|
||||
/// 群 id
|
||||
#[prost(string, tag = "1")]
|
||||
pub roomid: ::prost::alloc::string::String,
|
||||
/// wxid
|
||||
#[prost(string, tag = "2")]
|
||||
pub wxid: ::prost::alloc::string::String,
|
||||
}
|
||||
#[allow(clippy::derive_partial_eq_without_eq)]
|
||||
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||
pub struct OcrMsg {
|
||||
/// 状态
|
||||
#[prost(int32, tag = "1")]
|
||||
pub status: i32,
|
||||
/// 结果
|
||||
#[prost(string, tag = "2")]
|
||||
pub result: ::prost::alloc::string::String,
|
||||
}
|
||||
#[allow(clippy::derive_partial_eq_without_eq)]
|
||||
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||
pub struct ForwardMsg {
|
||||
/// 待转发消息 ID
|
||||
#[prost(uint64, tag = "1")]
|
||||
pub id: u64,
|
||||
/// 转发接收目标,群为 roomId,个人为 wxid
|
||||
#[prost(string, tag = "2")]
|
||||
pub receiver: ::prost::alloc::string::String,
|
||||
}
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
|
||||
#[repr(i32)]
|
||||
pub enum Functions {
|
||||
@@ -332,20 +427,29 @@ pub enum Functions {
|
||||
FuncGetDbNames = 19,
|
||||
FuncGetDbTables = 20,
|
||||
FuncGetUserInfo = 21,
|
||||
FuncGetAudioMsg = 22,
|
||||
FuncSendTxt = 32,
|
||||
FuncSendImg = 33,
|
||||
FuncSendFile = 34,
|
||||
FuncSendXml = 35,
|
||||
FuncSendEmotion = 36,
|
||||
FuncSendRichTxt = 37,
|
||||
FuncSendPatMsg = 38,
|
||||
FuncForwardMsg = 39,
|
||||
FuncEnableRecvTxt = 48,
|
||||
FuncDisableRecvTxt = 64,
|
||||
FuncExecDbQuery = 80,
|
||||
FuncAcceptFriend = 81,
|
||||
FuncRecvTransfer = 82,
|
||||
FuncRefreshPyq = 83,
|
||||
FuncDownloadAttach = 84,
|
||||
FuncGetContactInfo = 85,
|
||||
FuncRevokeMsg = 86,
|
||||
FuncDecryptImage = 96,
|
||||
FuncExecOcr = 97,
|
||||
FuncAddRoomMembers = 112,
|
||||
FuncDelRoomMembers = 113,
|
||||
FuncInvRoomMembers = 114,
|
||||
}
|
||||
impl Functions {
|
||||
/// String value of the enum field names used in the ProtoBuf definition.
|
||||
@@ -362,20 +466,29 @@ impl Functions {
|
||||
Functions::FuncGetDbNames => "FUNC_GET_DB_NAMES",
|
||||
Functions::FuncGetDbTables => "FUNC_GET_DB_TABLES",
|
||||
Functions::FuncGetUserInfo => "FUNC_GET_USER_INFO",
|
||||
Functions::FuncGetAudioMsg => "FUNC_GET_AUDIO_MSG",
|
||||
Functions::FuncSendTxt => "FUNC_SEND_TXT",
|
||||
Functions::FuncSendImg => "FUNC_SEND_IMG",
|
||||
Functions::FuncSendFile => "FUNC_SEND_FILE",
|
||||
Functions::FuncSendXml => "FUNC_SEND_XML",
|
||||
Functions::FuncSendEmotion => "FUNC_SEND_EMOTION",
|
||||
Functions::FuncSendRichTxt => "FUNC_SEND_RICH_TXT",
|
||||
Functions::FuncSendPatMsg => "FUNC_SEND_PAT_MSG",
|
||||
Functions::FuncForwardMsg => "FUNC_FORWARD_MSG",
|
||||
Functions::FuncEnableRecvTxt => "FUNC_ENABLE_RECV_TXT",
|
||||
Functions::FuncDisableRecvTxt => "FUNC_DISABLE_RECV_TXT",
|
||||
Functions::FuncExecDbQuery => "FUNC_EXEC_DB_QUERY",
|
||||
Functions::FuncAcceptFriend => "FUNC_ACCEPT_FRIEND",
|
||||
Functions::FuncRecvTransfer => "FUNC_RECV_TRANSFER",
|
||||
Functions::FuncRefreshPyq => "FUNC_REFRESH_PYQ",
|
||||
Functions::FuncDownloadAttach => "FUNC_DOWNLOAD_ATTACH",
|
||||
Functions::FuncGetContactInfo => "FUNC_GET_CONTACT_INFO",
|
||||
Functions::FuncRevokeMsg => "FUNC_REVOKE_MSG",
|
||||
Functions::FuncDecryptImage => "FUNC_DECRYPT_IMAGE",
|
||||
Functions::FuncExecOcr => "FUNC_EXEC_OCR",
|
||||
Functions::FuncAddRoomMembers => "FUNC_ADD_ROOM_MEMBERS",
|
||||
Functions::FuncDelRoomMembers => "FUNC_DEL_ROOM_MEMBERS",
|
||||
Functions::FuncInvRoomMembers => "FUNC_INV_ROOM_MEMBERS",
|
||||
}
|
||||
}
|
||||
/// Creates an enum from field names used in the ProtoBuf definition.
|
||||
@@ -389,20 +502,29 @@ impl Functions {
|
||||
"FUNC_GET_DB_NAMES" => Some(Self::FuncGetDbNames),
|
||||
"FUNC_GET_DB_TABLES" => Some(Self::FuncGetDbTables),
|
||||
"FUNC_GET_USER_INFO" => Some(Self::FuncGetUserInfo),
|
||||
"FUNC_GET_AUDIO_MSG" => Some(Self::FuncGetAudioMsg),
|
||||
"FUNC_SEND_TXT" => Some(Self::FuncSendTxt),
|
||||
"FUNC_SEND_IMG" => Some(Self::FuncSendImg),
|
||||
"FUNC_SEND_FILE" => Some(Self::FuncSendFile),
|
||||
"FUNC_SEND_XML" => Some(Self::FuncSendXml),
|
||||
"FUNC_SEND_EMOTION" => Some(Self::FuncSendEmotion),
|
||||
"FUNC_SEND_RICH_TXT" => Some(Self::FuncSendRichTxt),
|
||||
"FUNC_SEND_PAT_MSG" => Some(Self::FuncSendPatMsg),
|
||||
"FUNC_FORWARD_MSG" => Some(Self::FuncForwardMsg),
|
||||
"FUNC_ENABLE_RECV_TXT" => Some(Self::FuncEnableRecvTxt),
|
||||
"FUNC_DISABLE_RECV_TXT" => Some(Self::FuncDisableRecvTxt),
|
||||
"FUNC_EXEC_DB_QUERY" => Some(Self::FuncExecDbQuery),
|
||||
"FUNC_ACCEPT_FRIEND" => Some(Self::FuncAcceptFriend),
|
||||
"FUNC_RECV_TRANSFER" => Some(Self::FuncRecvTransfer),
|
||||
"FUNC_REFRESH_PYQ" => Some(Self::FuncRefreshPyq),
|
||||
"FUNC_DOWNLOAD_ATTACH" => Some(Self::FuncDownloadAttach),
|
||||
"FUNC_GET_CONTACT_INFO" => Some(Self::FuncGetContactInfo),
|
||||
"FUNC_REVOKE_MSG" => Some(Self::FuncRevokeMsg),
|
||||
"FUNC_DECRYPT_IMAGE" => Some(Self::FuncDecryptImage),
|
||||
"FUNC_EXEC_OCR" => Some(Self::FuncExecOcr),
|
||||
"FUNC_ADD_ROOM_MEMBERS" => Some(Self::FuncAddRoomMembers),
|
||||
"FUNC_DEL_ROOM_MEMBERS" => Some(Self::FuncDelRoomMembers),
|
||||
"FUNC_INV_ROOM_MEMBERS" => Some(Self::FuncInvRoomMembers),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user