gewe_core/message/
forward.rs

1use serde::{Deserialize, Serialize};
2
3#[derive(Debug, Clone, Serialize, Deserialize)]
4#[serde(rename_all = "camelCase")]
5pub struct ForwardImageRequest<'a> {
6    #[serde(rename = "appId")]
7    pub app_id: &'a str,
8    #[serde(rename = "toWxid")]
9    pub to_wxid: &'a str,
10    pub xml: &'a str,
11}
12
13#[derive(Debug, Clone, Serialize, Deserialize, Default)]
14#[serde(rename_all = "camelCase")]
15pub struct ForwardImageResponse {
16    pub to_wxid: String,
17    #[serde(default, skip_serializing_if = "Option::is_none")]
18    pub create_time: Option<i64>,
19    pub msg_id: i64,
20    pub new_msg_id: i64,
21    #[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
22    pub msg_type: Option<i32>,
23    pub aes_key: String,
24    pub file_id: String,
25    #[serde(default, skip_serializing_if = "Option::is_none")]
26    pub length: Option<i64>,
27    #[serde(default, skip_serializing_if = "Option::is_none")]
28    pub width: Option<i64>,
29    #[serde(default, skip_serializing_if = "Option::is_none")]
30    pub height: Option<i64>,
31    #[serde(default, skip_serializing_if = "Option::is_none")]
32    pub md5: Option<String>,
33}
34
35#[derive(Debug, Clone, Serialize, Deserialize)]
36#[serde(rename_all = "camelCase")]
37pub struct ForwardVideoRequest<'a> {
38    #[serde(rename = "appId")]
39    pub app_id: &'a str,
40    #[serde(rename = "toWxid")]
41    pub to_wxid: &'a str,
42    pub xml: &'a str,
43}
44
45#[derive(Debug, Clone, Serialize, Deserialize, Default)]
46#[serde(rename_all = "camelCase")]
47pub struct ForwardVideoResponse {
48    pub to_wxid: String,
49    #[serde(default, skip_serializing_if = "Option::is_none")]
50    pub create_time: Option<i64>,
51    pub msg_id: i64,
52    pub new_msg_id: i64,
53    #[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
54    pub msg_type: Option<i32>,
55    pub aes_key: String,
56    #[serde(default, skip_serializing_if = "Option::is_none")]
57    pub file_id: Option<String>,
58    #[serde(default, skip_serializing_if = "Option::is_none")]
59    pub length: Option<i64>,
60}
61
62#[derive(Debug, Clone, Serialize, Deserialize)]
63#[serde(rename_all = "camelCase")]
64pub struct ForwardFileRequest<'a> {
65    #[serde(rename = "appId")]
66    pub app_id: &'a str,
67    #[serde(rename = "toWxid")]
68    pub to_wxid: &'a str,
69    pub xml: &'a str,
70}
71
72pub type ForwardFileResponse = super::SendTextResponse;
73
74#[derive(Debug, Clone, Serialize, Deserialize)]
75#[serde(rename_all = "camelCase")]
76pub struct ForwardMiniAppRequest<'a> {
77    #[serde(rename = "appId")]
78    pub app_id: &'a str,
79    #[serde(rename = "toWxid")]
80    pub to_wxid: &'a str,
81    pub xml: &'a str,
82    #[serde(rename = "coverImgUrl")]
83    pub cover_img_url: &'a str,
84}
85
86pub type ForwardMiniAppResponse = super::SendTextResponse;
87
88#[derive(Debug, Clone, Serialize, Deserialize)]
89#[serde(rename_all = "camelCase")]
90pub struct ForwardUrlRequest<'a> {
91    #[serde(rename = "appId")]
92    pub app_id: &'a str,
93    #[serde(rename = "toWxid")]
94    pub to_wxid: &'a str,
95    pub xml: &'a str,
96}
97
98pub type ForwardUrlResponse = super::SendTextResponse;