feat(work): 随官方更新读取微信客服消息的接口模型

This commit is contained in:
Fu Diwei 2022-08-15 20:08:13 +08:00
parent fabc25935f
commit 226a01424c
4 changed files with 49 additions and 0 deletions

View File

@ -99,6 +99,16 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.Models
{
public static class Types
{
public class Text
{
/// <summary>
/// 获取或设置菜单项内容。
/// </summary>
[Newtonsoft.Json.JsonProperty("content")]
[System.Text.Json.Serialization.JsonPropertyName("content")]
public string Content { get; set; } = string.Empty;
}
public class Click
{
/// <summary>
@ -165,6 +175,13 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.Models
[System.Text.Json.Serialization.JsonPropertyName("type")]
public string Type { get; set; } = string.Empty;
/// <summary>
/// 获取或设置文本信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("text")]
[System.Text.Json.Serialization.JsonPropertyName("text")]
public Types.Text? Text { get; set; }
/// <summary>
/// 获取或设置点击项信息。
/// </summary>

View File

@ -182,6 +182,13 @@
[Newtonsoft.Json.JsonProperty("wechat_channels")]
[System.Text.Json.Serialization.JsonPropertyName("wechat_channels")]
public Types.WechatChannels? WechatChannels { get; set; }
/// <summary>
/// 获取或设置撤回的消息 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("recall_msgid")]
[System.Text.Json.Serialization.JsonPropertyName("recall_msgid")]
public string? RecalledMessageId { get; set; }
}
}

View File

@ -61,6 +61,12 @@
"pagepath": "pages/index?userid=zhangsan&orderid=123123123",
"content": "点击打开小程序查询更多"
}
},
{
"type": "text",
"text": {
"content": "纯文本,支持\n换行"
}
}
],
"tail_content": "欢迎再次光临"

View File

@ -12,6 +12,25 @@
"origin": 3,
"servicer_userid": "Zhangsan",
"msgtype": "MSG_TYPE"
},
{
"msgtype": "event",
"event": {
"event_type": "user_recall_msg",
"open_kfid": "wkAJ2GCAAASSm4_FhToWMFea0xAFfd3Q",
"external_userid": "wmAJ2GCAAAme1XQRC-NI-q0_ZM9ukoAw",
"recall_msgid": "RECALL_MSGID"
}
},
{
"msgtype": "event",
"event": {
"event_type": "servicer_recall_msg",
"open_kfid": "wkAJ2GCAAASSm4_FhToWMFea0xAFfd3Q",
"external_userid": "wmAJ2GCAAAme1XQRC-NI-q0_ZM9ukoAw",
"recall_msgid": "RECALL_MSGID",
"servicer_userid": "SERVICER_USERID"
}
}
]
}