feat(work): 随官方更新客服消息相关接口模型

This commit is contained in:
Fu Diwei
2023-10-09 11:19:06 +08:00
parent 21a40a0abe
commit aa0937373f
14 changed files with 362 additions and 220 deletions

View File

@@ -1,11 +1,36 @@
namespace SKIT.FlurlHttpClient.Wechat.Work.Events namespace SKIT.FlurlHttpClient.Wechat.Work.Events
{ {
/// <summary> /// <summary>
/// <para>表示 INFO.change_auth 事件的数据。</para> /// <para>表示 INFO.change_auth 事件的数据。</para>
/// <para>REF: https://developer.work.weixin.qq.com/document/path/90642 </para> /// <para>REF: https://developer.work.weixin.qq.com/document/path/90642 </para>
/// <para>REF: https://developer.work.weixin.qq.com/document/path/99401 </para>
/// </summary> /// </summary>
public class ChangeAuthEvent : WechatWorkEvent, WechatWorkEvent.Serialization.IXmlSerializable public class ChangeAuthEvent : WechatWorkEvent, WechatWorkEvent.Serialization.IXmlSerializable
{ {
public static class Types
{
public class Extra
{
public static class Types
{
public class AuthorizedOpenKfIdList
{
/// <summary>
/// 获取或设置客服账号列表。
/// </summary>
[System.Xml.Serialization.XmlElement("OpenKfId", Type = typeof(string))]
public string[] Items { get; set; } = default!;
}
}
/// <summary>
/// 获取或设置用户本次授权的客服账号列表。
/// </summary>
[System.Xml.Serialization.XmlElement("AuthOpenKfIdList", IsNullable = true)]
public Types.AuthorizedOpenKfIdList? AuthorizedOpenKfIdList { get; set; }
}
}
/// <summary> /// <summary>
/// 获取或设置第三方应用的 SuiteId。 /// 获取或设置第三方应用的 SuiteId。
/// </summary> /// </summary>
@@ -17,5 +42,11 @@
/// </summary> /// </summary>
[System.Xml.Serialization.XmlElement("AuthCorpId")] [System.Xml.Serialization.XmlElement("AuthCorpId")]
public string AuthorizerCorpId { get; set; } = default!; public string AuthorizerCorpId { get; set; } = default!;
/// <summary>
/// 获取或设置事件信息。
/// </summary>
[System.Xml.Serialization.XmlElement("ExtraInfo", IsNullable = true)]
public Types.Extra? Extra { get; set; }
} }
} }

View File

@@ -1,4 +1,4 @@
namespace SKIT.FlurlHttpClient.Wechat.Work.Models namespace SKIT.FlurlHttpClient.Wechat.Work.Models
{ {
/// <summary> /// <summary>
/// <para>表示 [POST] /cgi-bin/appchat/send 接口的请求。</para> /// <para>表示 [POST] /cgi-bin/appchat/send 接口的请求。</para>
@@ -63,63 +63,63 @@
/// </summary> /// </summary>
[Newtonsoft.Json.JsonProperty("text")] [Newtonsoft.Json.JsonProperty("text")]
[System.Text.Json.Serialization.JsonPropertyName("text")] [System.Text.Json.Serialization.JsonPropertyName("text")]
public Types.TextMessage? MessageContentForText { get; set; } public Types.TextMessage? MessageContentAsText { get; set; }
/// <summary> /// <summary>
/// 获取或设置图片消息信息。 /// 获取或设置图片消息信息。
/// </summary> /// </summary>
[Newtonsoft.Json.JsonProperty("image")] [Newtonsoft.Json.JsonProperty("image")]
[System.Text.Json.Serialization.JsonPropertyName("image")] [System.Text.Json.Serialization.JsonPropertyName("image")]
public Types.ImageMessage? MessageContentForImage { get; set; } public Types.ImageMessage? MessageContentAsImage { get; set; }
/// <summary> /// <summary>
/// 获取或设置语音消息信息。 /// 获取或设置语音消息信息。
/// </summary> /// </summary>
[Newtonsoft.Json.JsonProperty("voice")] [Newtonsoft.Json.JsonProperty("voice")]
[System.Text.Json.Serialization.JsonPropertyName("voice")] [System.Text.Json.Serialization.JsonPropertyName("voice")]
public Types.VoiceMessage? MessageContentForVoice { get; set; } public Types.VoiceMessage? MessageContentAsVoice { get; set; }
/// <summary> /// <summary>
/// 获取或设置视频消息信息。 /// 获取或设置视频消息信息。
/// </summary> /// </summary>
[Newtonsoft.Json.JsonProperty("video")] [Newtonsoft.Json.JsonProperty("video")]
[System.Text.Json.Serialization.JsonPropertyName("video")] [System.Text.Json.Serialization.JsonPropertyName("video")]
public Types.VideoMessage? MessageContentForVideo { get; set; } public Types.VideoMessage? MessageContentAsVideo { get; set; }
/// <summary> /// <summary>
/// 获取或设置文件消息信息。 /// 获取或设置文件消息信息。
/// </summary> /// </summary>
[Newtonsoft.Json.JsonProperty("file")] [Newtonsoft.Json.JsonProperty("file")]
[System.Text.Json.Serialization.JsonPropertyName("file")] [System.Text.Json.Serialization.JsonPropertyName("file")]
public Types.FileMessage? MessageContentForFile { get; set; } public Types.FileMessage? MessageContentAsFile { get; set; }
/// <summary> /// <summary>
/// 获取或设置文本卡片消息信息。 /// 获取或设置文本卡片消息信息。
/// </summary> /// </summary>
[Newtonsoft.Json.JsonProperty("textcard")] [Newtonsoft.Json.JsonProperty("textcard")]
[System.Text.Json.Serialization.JsonPropertyName("textcard")] [System.Text.Json.Serialization.JsonPropertyName("textcard")]
public Types.TextCardMessage? MessageContentForTextCard { get; set; } public Types.TextCardMessage? MessageContentAsTextCard { get; set; }
/// <summary> /// <summary>
/// 获取或设置图文消息信息。 /// 获取或设置图文消息信息。
/// </summary> /// </summary>
[Newtonsoft.Json.JsonProperty("news")] [Newtonsoft.Json.JsonProperty("news")]
[System.Text.Json.Serialization.JsonPropertyName("news")] [System.Text.Json.Serialization.JsonPropertyName("news")]
public Types.NewsMessage? MessageContentForNews { get; set; } public Types.NewsMessage? MessageContentAsNews { get; set; }
/// <summary> /// <summary>
/// 获取或设置图文消息信息。 /// 获取或设置图文消息信息。
/// </summary> /// </summary>
[Newtonsoft.Json.JsonProperty("mpnews")] [Newtonsoft.Json.JsonProperty("mpnews")]
[System.Text.Json.Serialization.JsonPropertyName("mpnews")] [System.Text.Json.Serialization.JsonPropertyName("mpnews")]
public Types.MpNewsMessage? MessageContentForMpNews { get; set; } public Types.MpNewsMessage? MessageContentAsMpNews { get; set; }
/// <summary> /// <summary>
/// 获取或设置 Markdown 消息信息。 /// 获取或设置 Markdown 消息信息。
/// </summary> /// </summary>
[Newtonsoft.Json.JsonProperty("markdown")] [Newtonsoft.Json.JsonProperty("markdown")]
[System.Text.Json.Serialization.JsonPropertyName("markdown")] [System.Text.Json.Serialization.JsonPropertyName("markdown")]
public Types.MarkdownMessage? MessageContentForMarkdown { get; set; } public Types.MarkdownMessage? MessageContentAsMarkdown { get; set; }
/// <summary> /// <summary>
/// 获取或设置是否是保密消息。 /// 获取或设置是否是保密消息。

View File

@@ -122,63 +122,63 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.Models
/// </summary> /// </summary>
[Newtonsoft.Json.JsonProperty("text")] [Newtonsoft.Json.JsonProperty("text")]
[System.Text.Json.Serialization.JsonPropertyName("text")] [System.Text.Json.Serialization.JsonPropertyName("text")]
public Types.TextMessage? MessageContentForText { get; set; } public Types.TextMessage? MessageContentAsText { get; set; }
/// <summary> /// <summary>
/// 获取或设置图片消息信息。 /// 获取或设置图片消息信息。
/// </summary> /// </summary>
[Newtonsoft.Json.JsonProperty("image")] [Newtonsoft.Json.JsonProperty("image")]
[System.Text.Json.Serialization.JsonPropertyName("image")] [System.Text.Json.Serialization.JsonPropertyName("image")]
public Types.ImageMessage? MessageContentForImage { get; set; } public Types.ImageMessage? MessageContentAsImage { get; set; }
/// <summary> /// <summary>
/// 获取或设置语音消息信息。 /// 获取或设置语音消息信息。
/// </summary> /// </summary>
[Newtonsoft.Json.JsonProperty("voice")] [Newtonsoft.Json.JsonProperty("voice")]
[System.Text.Json.Serialization.JsonPropertyName("voice")] [System.Text.Json.Serialization.JsonPropertyName("voice")]
public Types.VoiceMessage? MessageContentForVoice { get; set; } public Types.VoiceMessage? MessageContentAsVoice { get; set; }
/// <summary> /// <summary>
/// 获取或设置视频消息信息。 /// 获取或设置视频消息信息。
/// </summary> /// </summary>
[Newtonsoft.Json.JsonProperty("video")] [Newtonsoft.Json.JsonProperty("video")]
[System.Text.Json.Serialization.JsonPropertyName("video")] [System.Text.Json.Serialization.JsonPropertyName("video")]
public Types.VideoMessage? MessageContentForVideo { get; set; } public Types.VideoMessage? MessageContentAsVideo { get; set; }
/// <summary> /// <summary>
/// 获取或设置文件消息信息。 /// 获取或设置文件消息信息。
/// </summary> /// </summary>
[Newtonsoft.Json.JsonProperty("file")] [Newtonsoft.Json.JsonProperty("file")]
[System.Text.Json.Serialization.JsonPropertyName("file")] [System.Text.Json.Serialization.JsonPropertyName("file")]
public Types.FileMessage? MessageContentForFile { get; set; } public Types.FileMessage? MessageContentAsFile { get; set; }
/// <summary> /// <summary>
/// 获取或设置文本卡片消息信息。 /// 获取或设置文本卡片消息信息。
/// </summary> /// </summary>
[Newtonsoft.Json.JsonProperty("textcard")] [Newtonsoft.Json.JsonProperty("textcard")]
[System.Text.Json.Serialization.JsonPropertyName("textcard")] [System.Text.Json.Serialization.JsonPropertyName("textcard")]
public Types.TextCardMessage? MessageContentForTextCard { get; set; } public Types.TextCardMessage? MessageContentAsTextCard { get; set; }
/// <summary> /// <summary>
/// 获取或设置图文消息信息。 /// 获取或设置图文消息信息。
/// </summary> /// </summary>
[Newtonsoft.Json.JsonProperty("news")] [Newtonsoft.Json.JsonProperty("news")]
[System.Text.Json.Serialization.JsonPropertyName("news")] [System.Text.Json.Serialization.JsonPropertyName("news")]
public Types.NewsMessage? MessageContentForNews { get; set; } public Types.NewsMessage? MessageContentAsNews { get; set; }
/// <summary> /// <summary>
/// 获取或设置图文消息信息。 /// 获取或设置图文消息信息。
/// </summary> /// </summary>
[Newtonsoft.Json.JsonProperty("mpnews")] [Newtonsoft.Json.JsonProperty("mpnews")]
[System.Text.Json.Serialization.JsonPropertyName("mpnews")] [System.Text.Json.Serialization.JsonPropertyName("mpnews")]
public Types.MpNewsMessage? MessageContentForMpNews { get; set; } public Types.MpNewsMessage? MessageContentAsMpNews { get; set; }
/// <summary> /// <summary>
/// 获取或设置小程序消息信息。 /// 获取或设置小程序消息信息。
/// </summary> /// </summary>
[Newtonsoft.Json.JsonProperty("miniprogram")] [Newtonsoft.Json.JsonProperty("miniprogram")]
[System.Text.Json.Serialization.JsonPropertyName("miniprogram")] [System.Text.Json.Serialization.JsonPropertyName("miniprogram")]
public Types.MiniProgramMessage? MessageContentForMiniProgram { get; set; } public Types.MiniProgramMessage? MessageContentAsMiniProgram { get; set; }
/// <summary> /// <summary>
/// 获取或设置应用 ID。如果不指定将使用构造 <see cref="WechatWorkClient"/> 时的 <see cref="WechatWorkClientOptions.AgentId"/> 参数。 /// 获取或设置应用 ID。如果不指定将使用构造 <see cref="WechatWorkClient"/> 时的 <see cref="WechatWorkClientOptions.AgentId"/> 参数。

View File

@@ -42,13 +42,13 @@
/// </summary> /// </summary>
[Newtonsoft.Json.JsonProperty("text")] [Newtonsoft.Json.JsonProperty("text")]
[System.Text.Json.Serialization.JsonPropertyName("text")] [System.Text.Json.Serialization.JsonPropertyName("text")]
public Types.TextMessage? MessageContentForText { get; set; } public Types.TextMessage? MessageContentAsText { get; set; }
/// <summary> /// <summary>
/// 获取或设置菜单消息信息。 /// 获取或设置菜单消息信息。
/// </summary> /// </summary>
[Newtonsoft.Json.JsonProperty("msgmenu")] [Newtonsoft.Json.JsonProperty("msgmenu")]
[System.Text.Json.Serialization.JsonPropertyName("msgmenu")] [System.Text.Json.Serialization.JsonPropertyName("msgmenu")]
public Types.MenuMessage? MessageContentForMenu { get; set; } public Types.MenuMessage? MessageContentAsMenu { get; set; }
} }
} }

View File

@@ -311,69 +311,69 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.Models
/// </summary> /// </summary>
[Newtonsoft.Json.JsonProperty("text")] [Newtonsoft.Json.JsonProperty("text")]
[System.Text.Json.Serialization.JsonPropertyName("text")] [System.Text.Json.Serialization.JsonPropertyName("text")]
public Types.TextMessage? MessageContentForText { get; set; } public Types.TextMessage? MessageContentAsText { get; set; }
/// <summary> /// <summary>
/// 获取或设置图片消息信息。 /// 获取或设置图片消息信息。
/// </summary> /// </summary>
[Newtonsoft.Json.JsonProperty("image")] [Newtonsoft.Json.JsonProperty("image")]
[System.Text.Json.Serialization.JsonPropertyName("image")] [System.Text.Json.Serialization.JsonPropertyName("image")]
public Types.ImageMessage? MessageContentForImage { get; set; } public Types.ImageMessage? MessageContentAsImage { get; set; }
/// <summary> /// <summary>
/// 获取或设置语音消息信息。 /// 获取或设置语音消息信息。
/// </summary> /// </summary>
[Newtonsoft.Json.JsonProperty("voice")] [Newtonsoft.Json.JsonProperty("voice")]
[System.Text.Json.Serialization.JsonPropertyName("voice")] [System.Text.Json.Serialization.JsonPropertyName("voice")]
public Types.VoiceMessage? MessageContentForVoice { get; set; } public Types.VoiceMessage? MessageContentAsVoice { get; set; }
/// <summary> /// <summary>
/// 获取或设置视频消息信息。 /// 获取或设置视频消息信息。
/// </summary> /// </summary>
[Newtonsoft.Json.JsonProperty("video")] [Newtonsoft.Json.JsonProperty("video")]
[System.Text.Json.Serialization.JsonPropertyName("video")] [System.Text.Json.Serialization.JsonPropertyName("video")]
public Types.VideoMessage? MessageContentForVideo { get; set; } public Types.VideoMessage? MessageContentAsVideo { get; set; }
/// <summary> /// <summary>
/// 获取或设置文件消息信息。 /// 获取或设置文件消息信息。
/// </summary> /// </summary>
[Newtonsoft.Json.JsonProperty("file")] [Newtonsoft.Json.JsonProperty("file")]
[System.Text.Json.Serialization.JsonPropertyName("file")] [System.Text.Json.Serialization.JsonPropertyName("file")]
public Types.FileMessage? MessageContentForFile { get; set; } public Types.FileMessage? MessageContentAsFile { get; set; }
/// <summary> /// <summary>
/// 获取或设置图文链接消息信息。 /// 获取或设置图文链接消息信息。
/// </summary> /// </summary>
[Newtonsoft.Json.JsonProperty("link")] [Newtonsoft.Json.JsonProperty("link")]
[System.Text.Json.Serialization.JsonPropertyName("link")] [System.Text.Json.Serialization.JsonPropertyName("link")]
public Types.LinkMessage? MessageContentForLink { get; set; } public Types.LinkMessage? MessageContentAsLink { get; set; }
/// <summary> /// <summary>
/// 获取或设置小程序消息信息。 /// 获取或设置小程序消息信息。
/// </summary> /// </summary>
[Newtonsoft.Json.JsonProperty("miniprogram")] [Newtonsoft.Json.JsonProperty("miniprogram")]
[System.Text.Json.Serialization.JsonPropertyName("miniprogram")] [System.Text.Json.Serialization.JsonPropertyName("miniprogram")]
public Types.MiniProgramMessage? MessageContentForMiniProgram { get; set; } public Types.MiniProgramMessage? MessageContentAsMiniProgram { get; set; }
/// <summary> /// <summary>
/// 获取或设置菜单消息信息。 /// 获取或设置菜单消息信息。
/// </summary> /// </summary>
[Newtonsoft.Json.JsonProperty("msgmenu")] [Newtonsoft.Json.JsonProperty("msgmenu")]
[System.Text.Json.Serialization.JsonPropertyName("msgmenu")] [System.Text.Json.Serialization.JsonPropertyName("msgmenu")]
public Types.MenuMessage? MessageContentForMenu { get; set; } public Types.MenuMessage? MessageContentAsMenu { get; set; }
/// <summary> /// <summary>
/// 获取或设置地理位置消息信息。 /// 获取或设置地理位置消息信息。
/// </summary> /// </summary>
[Newtonsoft.Json.JsonProperty("location")] [Newtonsoft.Json.JsonProperty("location")]
[System.Text.Json.Serialization.JsonPropertyName("location")] [System.Text.Json.Serialization.JsonPropertyName("location")]
public Types.LocationMessage? MessageContentForLocation { get; set; } public Types.LocationMessage? MessageContentAsLocation { get; set; }
/// <summary> /// <summary>
/// 获取或设置名片消息。 /// 获取或设置名片消息。
/// </summary> /// </summary>
[Newtonsoft.Json.JsonProperty("business_card")] [Newtonsoft.Json.JsonProperty("business_card")]
[System.Text.Json.Serialization.JsonPropertyName("business_card")] [System.Text.Json.Serialization.JsonPropertyName("business_card")]
public Types.BusinessCardMessage? MessageContentForBusinessCard { get; set; } public Types.BusinessCardMessage? MessageContentAsBusinessCard { get; set; }
} }
} }

View File

@@ -198,6 +198,30 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.Models
public string? RecalledMessageId { get; set; } public string? RecalledMessageId { get; set; }
} }
public class ChannelsMessage
{
/// <summary>
/// 获取或设置视频号消息类型。
/// </summary>
[Newtonsoft.Json.JsonProperty("sub_type")]
[System.Text.Json.Serialization.JsonPropertyName("sub_type")]
public int SubType { get; set; }
/// <summary>
/// 获取或设置视频号名称。
/// </summary>
[Newtonsoft.Json.JsonProperty("nickname")]
[System.Text.Json.Serialization.JsonPropertyName("nickname")]
public string Nickname { get; set; } = default!;
/// <summary>
/// 获取或设置视频号动态标题。
/// </summary>
[Newtonsoft.Json.JsonProperty("title")]
[System.Text.Json.Serialization.JsonPropertyName("title")]
public string? Title { get; set; }
}
public class ChannelsShopProductMessage public class ChannelsShopProductMessage
{ {
/// <summary> /// <summary>
@@ -288,6 +312,57 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.Models
[System.Text.Json.Serialization.JsonPropertyName("shop_nickname")] [System.Text.Json.Serialization.JsonPropertyName("shop_nickname")]
public string ShopNickname { get; set; } = default!; public string ShopNickname { get; set; } = default!;
} }
public class MergedMessage
{
public static class Types
{
public class Item
{
/// <summary>
/// 获取或设置发送者名称。
/// </summary>
[Newtonsoft.Json.JsonProperty("sender_name")]
[System.Text.Json.Serialization.JsonPropertyName("sender_name")]
public string SenderName { get; set; } = default!;
/// <summary>
/// 获取或设置消息类型。
/// </summary>
[Newtonsoft.Json.JsonProperty("msgtype")]
[System.Text.Json.Serialization.JsonPropertyName("msgtype")]
public string MessageType { get; set; } = default!;
/// <summary>
/// 获取或设置消息内容JSON 格式)。
/// </summary>
[Newtonsoft.Json.JsonProperty("msg_content")]
[System.Text.Json.Serialization.JsonPropertyName("msg_content")]
public string MessageContentJson { get; set; } = default!;
/// <summary>
/// 获取或设置发送时间戳。
/// </summary>
[Newtonsoft.Json.JsonProperty("send_time")]
[System.Text.Json.Serialization.JsonPropertyName("send_time")]
public long SendTimestamp { get; set; }
}
}
/// <summary>
/// 获取或设置聊天记录标题。
/// </summary>
[Newtonsoft.Json.JsonProperty("title")]
[System.Text.Json.Serialization.JsonPropertyName("title")]
public string Title { get; set; } = default!;
/// <summary>
/// 获取或设置聊天记录列表。
/// </summary>
[Newtonsoft.Json.JsonProperty("item")]
[System.Text.Json.Serialization.JsonPropertyName("item")]
public Types.Item[] ItemList { get; set; } = default!;
}
} }
/// <summary> /// <summary>
@@ -337,91 +412,105 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.Models
/// </summary> /// </summary>
[Newtonsoft.Json.JsonProperty("text")] [Newtonsoft.Json.JsonProperty("text")]
[System.Text.Json.Serialization.JsonPropertyName("text")] [System.Text.Json.Serialization.JsonPropertyName("text")]
public Types.TextMessage? MessageContentForText { get; set; } public Types.TextMessage? MessageContentAsText { get; set; }
/// <summary> /// <summary>
/// 获取或设置图片消息信息。 /// 获取或设置图片消息信息。
/// </summary> /// </summary>
[Newtonsoft.Json.JsonProperty("image")] [Newtonsoft.Json.JsonProperty("image")]
[System.Text.Json.Serialization.JsonPropertyName("image")] [System.Text.Json.Serialization.JsonPropertyName("image")]
public Types.ImageMessage? MessageContentForImage { get; set; } public Types.ImageMessage? MessageContentAsImage { get; set; }
/// <summary> /// <summary>
/// 获取或设置语音消息信息。 /// 获取或设置语音消息信息。
/// </summary> /// </summary>
[Newtonsoft.Json.JsonProperty("voice")] [Newtonsoft.Json.JsonProperty("voice")]
[System.Text.Json.Serialization.JsonPropertyName("voice")] [System.Text.Json.Serialization.JsonPropertyName("voice")]
public Types.VoiceMessage? MessageContentForVoice { get; set; } public Types.VoiceMessage? MessageContentAsVoice { get; set; }
/// <summary> /// <summary>
/// 获取或设置视频消息信息。 /// 获取或设置视频消息信息。
/// </summary> /// </summary>
[Newtonsoft.Json.JsonProperty("video")] [Newtonsoft.Json.JsonProperty("video")]
[System.Text.Json.Serialization.JsonPropertyName("video")] [System.Text.Json.Serialization.JsonPropertyName("video")]
public Types.VideoMessage? MessageContentForVideo { get; set; } public Types.VideoMessage? MessageContentAsVideo { get; set; }
/// <summary> /// <summary>
/// 获取或设置文件消息信息。 /// 获取或设置文件消息信息。
/// </summary> /// </summary>
[Newtonsoft.Json.JsonProperty("file")] [Newtonsoft.Json.JsonProperty("file")]
[System.Text.Json.Serialization.JsonPropertyName("file")] [System.Text.Json.Serialization.JsonPropertyName("file")]
public Types.FileMessage? MessageContentForFile { get; set; } public Types.FileMessage? MessageContentAsFile { get; set; }
/// <summary> /// <summary>
/// 获取或设置图文链接消息信息。 /// 获取或设置图文链接消息信息。
/// </summary> /// </summary>
[Newtonsoft.Json.JsonProperty("link")] [Newtonsoft.Json.JsonProperty("link")]
[System.Text.Json.Serialization.JsonPropertyName("link")] [System.Text.Json.Serialization.JsonPropertyName("link")]
public Types.LinkMessage? MessageContentForLink { get; set; } public Types.LinkMessage? MessageContentAsLink { get; set; }
/// <summary> /// <summary>
/// 获取或设置小程序消息信息。 /// 获取或设置小程序消息信息。
/// </summary> /// </summary>
[Newtonsoft.Json.JsonProperty("miniprogram")] [Newtonsoft.Json.JsonProperty("miniprogram")]
[System.Text.Json.Serialization.JsonPropertyName("miniprogram")] [System.Text.Json.Serialization.JsonPropertyName("miniprogram")]
public Types.MiniProgramMessage? MessageContentForMiniProgram { get; set; } public Types.MiniProgramMessage? MessageContentAsMiniProgram { get; set; }
/// <summary> /// <summary>
/// 获取或设置菜单消息信息。 /// 获取或设置菜单消息信息。
/// </summary> /// </summary>
[Newtonsoft.Json.JsonProperty("msgmenu")] [Newtonsoft.Json.JsonProperty("msgmenu")]
[System.Text.Json.Serialization.JsonPropertyName("msgmenu")] [System.Text.Json.Serialization.JsonPropertyName("msgmenu")]
public Types.MenuMessage? MessageContentForMenu { get; set; } public Types.MenuMessage? MessageContentAsMenu { get; set; }
/// <summary> /// <summary>
/// 获取或设置地理位置消息信息。 /// 获取或设置地理位置消息信息。
/// </summary> /// </summary>
[Newtonsoft.Json.JsonProperty("location")] [Newtonsoft.Json.JsonProperty("location")]
[System.Text.Json.Serialization.JsonPropertyName("location")] [System.Text.Json.Serialization.JsonPropertyName("location")]
public Types.LocationMessage? MessageContentForLocation { get; set; } public Types.LocationMessage? MessageContentAsLocation { get; set; }
/// <summary> /// <summary>
/// 获取或设置名片消息信息。 /// 获取或设置名片消息信息。
/// </summary> /// </summary>
[Newtonsoft.Json.JsonProperty("business_card")] [Newtonsoft.Json.JsonProperty("business_card")]
[System.Text.Json.Serialization.JsonPropertyName("business_card")] [System.Text.Json.Serialization.JsonPropertyName("business_card")]
public Types.BusinessCardMessage? MessageContentForBusinessCard { get; set; } public Types.BusinessCardMessage? MessageContentAsBusinessCard { get; set; }
/// <summary> /// <summary>
/// 获取或设置事件消息信息。 /// 获取或设置事件消息信息。
/// </summary> /// </summary>
[Newtonsoft.Json.JsonProperty("event")] [Newtonsoft.Json.JsonProperty("event")]
[System.Text.Json.Serialization.JsonPropertyName("event")] [System.Text.Json.Serialization.JsonPropertyName("event")]
public Types.EventMessage? MessageContentForEvent { get; set; } public Types.EventMessage? MessageContentAsEvent { get; set; }
/// <summary>
/// 获取或设置视频号消息信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("channels")]
[System.Text.Json.Serialization.JsonPropertyName("channels")]
public Types.ChannelsMessage? MessageContentAsChannels { get; set; }
/// <summary> /// <summary>
/// 获取或设置视频号商品消息信息。 /// 获取或设置视频号商品消息信息。
/// </summary> /// </summary>
[Newtonsoft.Json.JsonProperty("channels_shop_product")] [Newtonsoft.Json.JsonProperty("channels_shop_product")]
[System.Text.Json.Serialization.JsonPropertyName("channels_shop_product")] [System.Text.Json.Serialization.JsonPropertyName("channels_shop_product")]
public Types.ChannelsShopProductMessage? MessageContentForChannelsShopProduct { get; set; } public Types.ChannelsShopProductMessage? MessageContentAsChannelsShopProduct { get; set; }
/// <summary> /// <summary>
/// 获取或设置视频号订单消息信息。 /// 获取或设置视频号订单消息信息。
/// </summary> /// </summary>
[Newtonsoft.Json.JsonProperty("channels_shop_order")] [Newtonsoft.Json.JsonProperty("channels_shop_order")]
[System.Text.Json.Serialization.JsonPropertyName("channels_shop_order")] [System.Text.Json.Serialization.JsonPropertyName("channels_shop_order")]
public Types.ChannelsShopOrderMessage? MessageContentForChannelsShopOrder { get; set; } public Types.ChannelsShopOrderMessage? MessageContentAsChannelsShopOrder { get; set; }
/// <summary>
/// 获取或设置聊天记录消息信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("merged_msg")]
[System.Text.Json.Serialization.JsonPropertyName("merged_msg")]
public Types.MergedMessage? MessageContentAsMerged { get; set; }
/// <summary> /// <summary>
/// 获取或设置发送时间戳。 /// 获取或设置发送时间戳。

View File

@@ -92,70 +92,70 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.Models
/// </summary> /// </summary>
[Newtonsoft.Json.JsonProperty("text")] [Newtonsoft.Json.JsonProperty("text")]
[System.Text.Json.Serialization.JsonPropertyName("text")] [System.Text.Json.Serialization.JsonPropertyName("text")]
public Types.TextMessage? MessageContentForText { get; set; } public Types.TextMessage? MessageContentAsText { get; set; }
/// <summary> /// <summary>
/// 获取或设置图片消息信息。 /// 获取或设置图片消息信息。
/// </summary> /// </summary>
[Newtonsoft.Json.JsonProperty("image")] [Newtonsoft.Json.JsonProperty("image")]
[System.Text.Json.Serialization.JsonPropertyName("image")] [System.Text.Json.Serialization.JsonPropertyName("image")]
public Types.ImageMessage? MessageContentForImage { get; set; } public Types.ImageMessage? MessageContentAsImage { get; set; }
/// <summary> /// <summary>
/// 获取或设置语音消息信息。 /// 获取或设置语音消息信息。
/// </summary> /// </summary>
[Newtonsoft.Json.JsonProperty("voice")] [Newtonsoft.Json.JsonProperty("voice")]
[System.Text.Json.Serialization.JsonPropertyName("voice")] [System.Text.Json.Serialization.JsonPropertyName("voice")]
public Types.VoiceMessage? MessageContentForVoice { get; set; } public Types.VoiceMessage? MessageContentAsVoice { get; set; }
/// <summary> /// <summary>
/// 获取或设置视频消息信息。 /// 获取或设置视频消息信息。
/// </summary> /// </summary>
[Newtonsoft.Json.JsonProperty("video")] [Newtonsoft.Json.JsonProperty("video")]
[System.Text.Json.Serialization.JsonPropertyName("video")] [System.Text.Json.Serialization.JsonPropertyName("video")]
public Types.VideoMessage? MessageContentForVideo { get; set; } public Types.VideoMessage? MessageContentAsVideo { get; set; }
/// <summary> /// <summary>
/// 获取或设置文件消息信息。 /// 获取或设置文件消息信息。
/// </summary> /// </summary>
[Newtonsoft.Json.JsonProperty("file")] [Newtonsoft.Json.JsonProperty("file")]
[System.Text.Json.Serialization.JsonPropertyName("file")] [System.Text.Json.Serialization.JsonPropertyName("file")]
public Types.FileMessage? MessageContentForFile { get; set; } public Types.FileMessage? MessageContentAsFile { get; set; }
/// <summary> /// <summary>
/// 获取或设置文本卡片消息信息。 /// 获取或设置文本卡片消息信息。
/// </summary> /// </summary>
[Newtonsoft.Json.JsonProperty("textcard")] [Newtonsoft.Json.JsonProperty("textcard")]
[System.Text.Json.Serialization.JsonPropertyName("textcard")] [System.Text.Json.Serialization.JsonPropertyName("textcard")]
public Types.TextCardMessage? MessageContentForTextCard { get; set; } public Types.TextCardMessage? MessageContentAsTextCard { get; set; }
/// <summary> /// <summary>
/// 获取或设置图文消息信息。 /// 获取或设置图文消息信息。
/// </summary> /// </summary>
[Newtonsoft.Json.JsonProperty("news")] [Newtonsoft.Json.JsonProperty("news")]
[System.Text.Json.Serialization.JsonPropertyName("news")] [System.Text.Json.Serialization.JsonPropertyName("news")]
public Types.NewsMessage? MessageContentForNews { get; set; } public Types.NewsMessage? MessageContentAsNews { get; set; }
/// <summary> /// <summary>
/// 获取或设置图文消息信息。 /// 获取或设置图文消息信息。
/// </summary> /// </summary>
[Newtonsoft.Json.JsonProperty("mpnews")] [Newtonsoft.Json.JsonProperty("mpnews")]
[System.Text.Json.Serialization.JsonPropertyName("mpnews")] [System.Text.Json.Serialization.JsonPropertyName("mpnews")]
public Types.MpNewsMessage? MessageContentForMpNews { get; set; } public Types.MpNewsMessage? MessageContentAsMpNews { get; set; }
/// <summary> /// <summary>
/// 获取或设置 Markdown 消息信息。 /// 获取或设置 Markdown 消息信息。
/// </summary> /// </summary>
[Newtonsoft.Json.JsonProperty("markdown")] [Newtonsoft.Json.JsonProperty("markdown")]
[System.Text.Json.Serialization.JsonPropertyName("markdown")] [System.Text.Json.Serialization.JsonPropertyName("markdown")]
public Types.MarkdownMessage? MessageContentForMarkdown { get; set; } public Types.MarkdownMessage? MessageContentAsMarkdown { get; set; }
/// <summary> /// <summary>
/// 获取或设置小程序通知消息信息。 /// 获取或设置小程序通知消息信息。
/// </summary> /// </summary>
[Newtonsoft.Json.JsonProperty("miniprogram_notice")] [Newtonsoft.Json.JsonProperty("miniprogram_notice")]
[System.Text.Json.Serialization.JsonPropertyName("miniprogram_notice")] [System.Text.Json.Serialization.JsonPropertyName("miniprogram_notice")]
public Types.MiniProgramNoticeMessage? MessageContentForMiniProgramNotice { get; set; } public Types.MiniProgramNoticeMessage? MessageContentAsMiniProgramNotice { get; set; }
/// <summary> /// <summary>
/// 获取或设置应用 ID。如果不指定将使用构造 <see cref="WechatWorkClient"/> 时的 <see cref="WechatWorkClientOptions.AgentId"/> 参数。 /// 获取或设置应用 ID。如果不指定将使用构造 <see cref="WechatWorkClient"/> 时的 <see cref="WechatWorkClientOptions.AgentId"/> 参数。

View File

@@ -1013,91 +1013,91 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.Models
/// </summary> /// </summary>
[Newtonsoft.Json.JsonProperty("text")] [Newtonsoft.Json.JsonProperty("text")]
[System.Text.Json.Serialization.JsonPropertyName("text")] [System.Text.Json.Serialization.JsonPropertyName("text")]
public Types.TextMessage? MessageContentForText { get; set; } public Types.TextMessage? MessageContentAsText { get; set; }
/// <summary> /// <summary>
/// 获取或设置图片消息信息。 /// 获取或设置图片消息信息。
/// </summary> /// </summary>
[Newtonsoft.Json.JsonProperty("image")] [Newtonsoft.Json.JsonProperty("image")]
[System.Text.Json.Serialization.JsonPropertyName("image")] [System.Text.Json.Serialization.JsonPropertyName("image")]
public Types.ImageMessage? MessageContentForImage { get; set; } public Types.ImageMessage? MessageContentAsImage { get; set; }
/// <summary> /// <summary>
/// 获取或设置语音消息信息。 /// 获取或设置语音消息信息。
/// </summary> /// </summary>
[Newtonsoft.Json.JsonProperty("voice")] [Newtonsoft.Json.JsonProperty("voice")]
[System.Text.Json.Serialization.JsonPropertyName("voice")] [System.Text.Json.Serialization.JsonPropertyName("voice")]
public Types.VoiceMessage? MessageContentForVoice { get; set; } public Types.VoiceMessage? MessageContentAsVoice { get; set; }
/// <summary> /// <summary>
/// 获取或设置视频消息信息。 /// 获取或设置视频消息信息。
/// </summary> /// </summary>
[Newtonsoft.Json.JsonProperty("video")] [Newtonsoft.Json.JsonProperty("video")]
[System.Text.Json.Serialization.JsonPropertyName("video")] [System.Text.Json.Serialization.JsonPropertyName("video")]
public Types.VideoMessage? MessageContentForVideo { get; set; } public Types.VideoMessage? MessageContentAsVideo { get; set; }
/// <summary> /// <summary>
/// 获取或设置文件消息信息。 /// 获取或设置文件消息信息。
/// </summary> /// </summary>
[Newtonsoft.Json.JsonProperty("file")] [Newtonsoft.Json.JsonProperty("file")]
[System.Text.Json.Serialization.JsonPropertyName("file")] [System.Text.Json.Serialization.JsonPropertyName("file")]
public Types.FileMessage? MessageContentForFile { get; set; } public Types.FileMessage? MessageContentAsFile { get; set; }
/// <summary> /// <summary>
/// 获取或设置文本卡片消息信息。 /// 获取或设置文本卡片消息信息。
/// </summary> /// </summary>
[Newtonsoft.Json.JsonProperty("textcard")] [Newtonsoft.Json.JsonProperty("textcard")]
[System.Text.Json.Serialization.JsonPropertyName("textcard")] [System.Text.Json.Serialization.JsonPropertyName("textcard")]
public Types.TextCardMessage? MessageContentForTextCard { get; set; } public Types.TextCardMessage? MessageContentAsTextCard { get; set; }
/// <summary> /// <summary>
/// 获取或设置图文消息信息。 /// 获取或设置图文消息信息。
/// </summary> /// </summary>
[Newtonsoft.Json.JsonProperty("news")] [Newtonsoft.Json.JsonProperty("news")]
[System.Text.Json.Serialization.JsonPropertyName("news")] [System.Text.Json.Serialization.JsonPropertyName("news")]
public Types.NewsMessage? MessageContentForNews { get; set; } public Types.NewsMessage? MessageContentAsNews { get; set; }
/// <summary> /// <summary>
/// 获取或设置图文消息信息。 /// 获取或设置图文消息信息。
/// </summary> /// </summary>
[Newtonsoft.Json.JsonProperty("mpnews")] [Newtonsoft.Json.JsonProperty("mpnews")]
[System.Text.Json.Serialization.JsonPropertyName("mpnews")] [System.Text.Json.Serialization.JsonPropertyName("mpnews")]
public Types.MpNewsMessage? MessageContentForMpNews { get; set; } public Types.MpNewsMessage? MessageContentAsMpNews { get; set; }
/// <summary> /// <summary>
/// 获取或设置 Markdown 消息信息。 /// 获取或设置 Markdown 消息信息。
/// </summary> /// </summary>
[Newtonsoft.Json.JsonProperty("markdown")] [Newtonsoft.Json.JsonProperty("markdown")]
[System.Text.Json.Serialization.JsonPropertyName("markdown")] [System.Text.Json.Serialization.JsonPropertyName("markdown")]
public Types.MarkdownMessage? MessageContentForMarkdown { get; set; } public Types.MarkdownMessage? MessageContentAsMarkdown { get; set; }
/// <summary> /// <summary>
/// 获取或设置小程序通知消息信息。 /// 获取或设置小程序通知消息信息。
/// </summary> /// </summary>
[Newtonsoft.Json.JsonProperty("miniprogram_notice")] [Newtonsoft.Json.JsonProperty("miniprogram_notice")]
[System.Text.Json.Serialization.JsonPropertyName("miniprogram_notice")] [System.Text.Json.Serialization.JsonPropertyName("miniprogram_notice")]
public Types.MiniProgramNoticeMessage? MessageContentForMiniProgramNotice { get; set; } public Types.MiniProgramNoticeMessage? MessageContentAsMiniProgramNotice { get; set; }
/// <summary> /// <summary>
/// 获取或设置任务卡片消息信息。 /// 获取或设置任务卡片消息信息。
/// </summary> /// </summary>
[Newtonsoft.Json.JsonProperty("interactive_taskcard")] [Newtonsoft.Json.JsonProperty("interactive_taskcard")]
[System.Text.Json.Serialization.JsonPropertyName("interactive_taskcard")] [System.Text.Json.Serialization.JsonPropertyName("interactive_taskcard")]
public Types.TaskCardMessage? MessageContentForTaskCard { get; set; } public Types.TaskCardMessage? MessageContentAsTaskCard { get; set; }
/// <summary> /// <summary>
/// 获取或设置模板卡片消息信息。 /// 获取或设置模板卡片消息信息。
/// </summary> /// </summary>
[Newtonsoft.Json.JsonProperty("template_card")] [Newtonsoft.Json.JsonProperty("template_card")]
[System.Text.Json.Serialization.JsonPropertyName("template_card")] [System.Text.Json.Serialization.JsonPropertyName("template_card")]
public Types.TemplateCardMessage? MessageContentForTemplateCard { get; set; } public Types.TemplateCardMessage? MessageContentAsTemplateCard { get; set; }
/// <summary> /// <summary>
/// 获取或设置模板信息信息。 /// 获取或设置模板信息信息。
/// </summary> /// </summary>
[Newtonsoft.Json.JsonProperty("template_msg")] [Newtonsoft.Json.JsonProperty("template_msg")]
[System.Text.Json.Serialization.JsonPropertyName("template_msg")] [System.Text.Json.Serialization.JsonPropertyName("template_msg")]
public Types.TemplateMessage? MessageContentForTemplate { get; set; } public Types.TemplateMessage? MessageContentAsTemplate { get; set; }
/// <summary> /// <summary>
/// 获取或设置应用 ID。如果不指定将使用构造 <see cref="WechatWorkClient"/> 时的 <see cref="WechatWorkClientOptions.AgentId"/> 参数。 /// 获取或设置应用 ID。如果不指定将使用构造 <see cref="WechatWorkClient"/> 时的 <see cref="WechatWorkClientOptions.AgentId"/> 参数。

View File

@@ -1,4 +1,4 @@
using System.Collections.Generic; using System.Collections.Generic;
namespace SKIT.FlurlHttpClient.Wechat.Work.Models namespace SKIT.FlurlHttpClient.Wechat.Work.Models
{ {
@@ -93,14 +93,14 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.Models
/// </summary> /// </summary>
[Newtonsoft.Json.JsonProperty("members")] [Newtonsoft.Json.JsonProperty("members")]
[System.Text.Json.Serialization.JsonPropertyName("members")] [System.Text.Json.Serialization.JsonPropertyName("members")]
public IList<ContactControlValueForUser>? ContactMembers { get; set; } public IList<ContactControlValueAsUser>? ContactMembers { get; set; }
/// <summary> /// <summary>
/// 获取或设置 Contact 控件部门值。 /// 获取或设置 Contact 控件部门值。
/// </summary> /// </summary>
[Newtonsoft.Json.JsonProperty("departments")] [Newtonsoft.Json.JsonProperty("departments")]
[System.Text.Json.Serialization.JsonPropertyName("departments")] [System.Text.Json.Serialization.JsonPropertyName("departments")]
public IList<ContactControlValueForDepartment>? ContactDepartments { get; set; } public IList<ContactControlValueAsDepartment>? ContactDepartments { get; set; }
/// <summary> /// <summary>
/// 获取或设置 File 控件值。 /// 获取或设置 File 控件值。
@@ -213,7 +213,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.Models
public IList<Types.Option> OptionList { get; set; } = new List<Types.Option>(); public IList<Types.Option> OptionList { get; set; } = new List<Types.Option>();
} }
public class ContactControlValueForUser public class ContactControlValueAsUser
{ {
/// <summary> /// <summary>
/// 获取或设置成员账号。 /// 获取或设置成员账号。
@@ -230,7 +230,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.Models
public string? Name { get; set; } public string? Name { get; set; }
} }
public class ContactControlValueForDepartment public class ContactControlValueAsDepartment
{ {
/// <summary> /// <summary>
/// 获取或设置部门 ID。 /// 获取或设置部门 ID。

View File

@@ -172,14 +172,14 @@
/// </summary> /// </summary>
[Newtonsoft.Json.JsonProperty("members")] [Newtonsoft.Json.JsonProperty("members")]
[System.Text.Json.Serialization.JsonPropertyName("members")] [System.Text.Json.Serialization.JsonPropertyName("members")]
public ContactControlValueForUser[]? ContactMembers { get; set; } public ContactControlValueAsUser[]? ContactMembers { get; set; }
/// <summary> /// <summary>
/// 获取或设置 Contact 控件部门值。 /// 获取或设置 Contact 控件部门值。
/// </summary> /// </summary>
[Newtonsoft.Json.JsonProperty("departments")] [Newtonsoft.Json.JsonProperty("departments")]
[System.Text.Json.Serialization.JsonPropertyName("departments")] [System.Text.Json.Serialization.JsonPropertyName("departments")]
public ContactControlValueForDepartment[]? ContactDepartments { get; set; } public ContactControlValueAsDepartment[]? ContactDepartments { get; set; }
/// <summary> /// <summary>
/// 获取或设置 File 控件值。 /// 获取或设置 File 控件值。
@@ -300,7 +300,7 @@
public Types.Option[] OptionList { get; set; } = default!; public Types.Option[] OptionList { get; set; } = default!;
} }
public class ContactControlValueForUser public class ContactControlValueAsUser
{ {
/// <summary> /// <summary>
/// 获取或设置成员账号。 /// 获取或设置成员账号。
@@ -317,7 +317,7 @@
public string? Name { get; set; } public string? Name { get; set; }
} }
public class ContactControlValueForDepartment public class ContactControlValueAsDepartment
{ {
/// <summary> /// <summary>
/// 获取或设置部门 ID。 /// 获取或设置部门 ID。

View File

@@ -75,14 +75,14 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.Models
/// </summary> /// </summary>
[Newtonsoft.Json.JsonProperty("members")] [Newtonsoft.Json.JsonProperty("members")]
[System.Text.Json.Serialization.JsonPropertyName("members")] [System.Text.Json.Serialization.JsonPropertyName("members")]
public ContactControlValueForUser[]? ContactMembers { get; set; } public ContactControlValueAsUser[]? ContactMembers { get; set; }
/// <summary> /// <summary>
/// 获取或设置 Contact 控件部门值。 /// 获取或设置 Contact 控件部门值。
/// </summary> /// </summary>
[Newtonsoft.Json.JsonProperty("departments")] [Newtonsoft.Json.JsonProperty("departments")]
[System.Text.Json.Serialization.JsonPropertyName("departments")] [System.Text.Json.Serialization.JsonPropertyName("departments")]
public ContactControlValueForDepartment[]? ContactDepartments { get; set; } public ContactControlValueAsDepartment[]? ContactDepartments { get; set; }
/// <summary> /// <summary>
/// 获取或设置 File 控件值。 /// 获取或设置 File 控件值。
@@ -197,11 +197,11 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.Models
public new Types.Option[] OptionList { get; set; } = default!; public new Types.Option[] OptionList { get; set; } = default!;
} }
public class ContactControlValueForUser : CgibinOAGetApprovalDetailResponse.Types.Approval.Types.ApplyData.Types.ApplyContent.Types.ContactControlValueForUser public class ContactControlValueAsUser : CgibinOAGetApprovalDetailResponse.Types.Approval.Types.ApplyData.Types.ApplyContent.Types.ContactControlValueAsUser
{ {
} }
public class ContactControlValueForDepartment : CgibinOAGetApprovalDetailResponse.Types.Approval.Types.ApplyData.Types.ApplyContent.Types.ContactControlValueForDepartment public class ContactControlValueAsDepartment : CgibinOAGetApprovalDetailResponse.Types.Approval.Types.ApplyData.Types.ApplyContent.Types.ContactControlValueAsDepartment
{ {
} }

View File

@@ -164,175 +164,175 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.SDK.Finance.Models
/// </summary> /// </summary>
[Newtonsoft.Json.JsonProperty("text")] [Newtonsoft.Json.JsonProperty("text")]
[System.Text.Json.Serialization.JsonPropertyName("text")] [System.Text.Json.Serialization.JsonPropertyName("text")]
public Types.TextMessage? MessageContentForText { get; set; } public Types.TextMessage? MessageContentAsText { get; set; }
/// <summary> /// <summary>
/// 获取或设置图片消息信息。 /// 获取或设置图片消息信息。
/// </summary> /// </summary>
[Newtonsoft.Json.JsonProperty("image")] [Newtonsoft.Json.JsonProperty("image")]
[System.Text.Json.Serialization.JsonPropertyName("image")] [System.Text.Json.Serialization.JsonPropertyName("image")]
public Types.ImageMessage? MessageContentForImage { get; set; } public Types.ImageMessage? MessageContentAsImage { get; set; }
/// <summary> /// <summary>
/// 获取或设置撤回消息信息。 /// 获取或设置撤回消息信息。
/// </summary> /// </summary>
[Newtonsoft.Json.JsonProperty("revoke")] [Newtonsoft.Json.JsonProperty("revoke")]
[System.Text.Json.Serialization.JsonPropertyName("revoke")] [System.Text.Json.Serialization.JsonPropertyName("revoke")]
public Types.RevokeMessage? MessageContentForRevoke { get; set; } public Types.RevokeMessage? MessageContentAsRevoke { get; set; }
/// <summary> /// <summary>
/// 获取或设置同意/不同意消息信息。 /// 获取或设置同意/不同意消息信息。
/// </summary> /// </summary>
[Newtonsoft.Json.JsonProperty("agree")] [Newtonsoft.Json.JsonProperty("agree")]
[System.Text.Json.Serialization.JsonPropertyName("agree")] [System.Text.Json.Serialization.JsonPropertyName("agree")]
public Types.AgreeMessage? MessageContentForAgree { get; set; } public Types.AgreeMessage? MessageContentAsAgree { get; set; }
/// <summary> /// <summary>
/// 获取或设置语音消息信息。 /// 获取或设置语音消息信息。
/// </summary> /// </summary>
[Newtonsoft.Json.JsonProperty("voice")] [Newtonsoft.Json.JsonProperty("voice")]
[System.Text.Json.Serialization.JsonPropertyName("voice")] [System.Text.Json.Serialization.JsonPropertyName("voice")]
public Types.VoiceMessage? MessageContentForVoice { get; set; } public Types.VoiceMessage? MessageContentAsVoice { get; set; }
/// <summary> /// <summary>
/// 获取或设置视频消息信息。 /// 获取或设置视频消息信息。
/// </summary> /// </summary>
[Newtonsoft.Json.JsonProperty("video")] [Newtonsoft.Json.JsonProperty("video")]
[System.Text.Json.Serialization.JsonPropertyName("video")] [System.Text.Json.Serialization.JsonPropertyName("video")]
public Types.VideoMessage? MessageContentForVideo { get; set; } public Types.VideoMessage? MessageContentAsVideo { get; set; }
/// <summary> /// <summary>
/// 获取或设置名片消息信息。 /// 获取或设置名片消息信息。
/// </summary> /// </summary>
[Newtonsoft.Json.JsonProperty("card")] [Newtonsoft.Json.JsonProperty("card")]
[System.Text.Json.Serialization.JsonPropertyName("card")] [System.Text.Json.Serialization.JsonPropertyName("card")]
public Types.BusinessCardMessage? MessageContentForBusinessCard { get; set; } public Types.BusinessCardMessage? MessageContentAsBusinessCard { get; set; }
/// <summary> /// <summary>
/// 获取或设置位置消息信息。 /// 获取或设置位置消息信息。
/// </summary> /// </summary>
[Newtonsoft.Json.JsonProperty("location")] [Newtonsoft.Json.JsonProperty("location")]
[System.Text.Json.Serialization.JsonPropertyName("location")] [System.Text.Json.Serialization.JsonPropertyName("location")]
public Types.LocationMessage? MessageContentForLocation { get; set; } public Types.LocationMessage? MessageContentAsLocation { get; set; }
/// <summary> /// <summary>
/// 获取或设置表情消息信息。 /// 获取或设置表情消息信息。
/// </summary> /// </summary>
[Newtonsoft.Json.JsonProperty("emotion")] [Newtonsoft.Json.JsonProperty("emotion")]
[System.Text.Json.Serialization.JsonPropertyName("emotion")] [System.Text.Json.Serialization.JsonPropertyName("emotion")]
public Types.EmotionMessage? MessageContentForEmotion { get; set; } public Types.EmotionMessage? MessageContentAsEmotion { get; set; }
/// <summary> /// <summary>
/// 获取或设置文件消息信息。 /// 获取或设置文件消息信息。
/// </summary> /// </summary>
[Newtonsoft.Json.JsonProperty("file")] [Newtonsoft.Json.JsonProperty("file")]
[System.Text.Json.Serialization.JsonPropertyName("file")] [System.Text.Json.Serialization.JsonPropertyName("file")]
public Types.FileMessage? MessageContentForFile { get; set; } public Types.FileMessage? MessageContentAsFile { get; set; }
/// <summary> /// <summary>
/// 获取或设置图文链接消息信息。 /// 获取或设置图文链接消息信息。
/// </summary> /// </summary>
[Newtonsoft.Json.JsonProperty("link")] [Newtonsoft.Json.JsonProperty("link")]
[System.Text.Json.Serialization.JsonPropertyName("link")] [System.Text.Json.Serialization.JsonPropertyName("link")]
public Types.LinkMessage? MessageContentForLink { get; set; } public Types.LinkMessage? MessageContentAsLink { get; set; }
/// <summary> /// <summary>
/// 获取或设置小程序消息信息。 /// 获取或设置小程序消息信息。
/// </summary> /// </summary>
[Newtonsoft.Json.JsonProperty("weapp")] [Newtonsoft.Json.JsonProperty("weapp")]
[System.Text.Json.Serialization.JsonPropertyName("weapp")] [System.Text.Json.Serialization.JsonPropertyName("weapp")]
public Types.MiniProgramMessage? MessageContentForMiniProgram { get; set; } public Types.MiniProgramMessage? MessageContentAsMiniProgram { get; set; }
/// <summary> /// <summary>
/// 获取或设置会话记录消息信息。 /// 获取或设置会话记录消息信息。
/// </summary> /// </summary>
[Newtonsoft.Json.JsonProperty("chatrecord")] [Newtonsoft.Json.JsonProperty("chatrecord")]
[System.Text.Json.Serialization.JsonPropertyName("chatrecord")] [System.Text.Json.Serialization.JsonPropertyName("chatrecord")]
public Types.ChatRecordMessage? MessageContentForChatRecord { get; set; } public Types.ChatRecordMessage? MessageContentAsChatRecord { get; set; }
/// <summary> /// <summary>
/// 获取或设置待办消息信息。 /// 获取或设置待办消息信息。
/// </summary> /// </summary>
[Newtonsoft.Json.JsonProperty("todo")] [Newtonsoft.Json.JsonProperty("todo")]
[System.Text.Json.Serialization.JsonPropertyName("todo")] [System.Text.Json.Serialization.JsonPropertyName("todo")]
public Types.TodoMessage? MessageContentForTodo { get; set; } public Types.TodoMessage? MessageContentAsTodo { get; set; }
/// <summary> /// <summary>
/// 获取或设置投票消息信息。 /// 获取或设置投票消息信息。
/// </summary> /// </summary>
[Newtonsoft.Json.JsonProperty("vote")] [Newtonsoft.Json.JsonProperty("vote")]
[System.Text.Json.Serialization.JsonPropertyName("vote")] [System.Text.Json.Serialization.JsonPropertyName("vote")]
public Types.VoteMessage? MessageContentForVote { get; set; } public Types.VoteMessage? MessageContentAsVote { get; set; }
/// <summary> /// <summary>
/// 获取或设置填表消息信息。 /// 获取或设置填表消息信息。
/// </summary> /// </summary>
[Newtonsoft.Json.JsonProperty("collect")] [Newtonsoft.Json.JsonProperty("collect")]
[System.Text.Json.Serialization.JsonPropertyName("collect")] [System.Text.Json.Serialization.JsonPropertyName("collect")]
public Types.CollectMessage? MessageContentForCollect { get; set; } public Types.CollectMessage? MessageContentAsCollect { get; set; }
/// <summary> /// <summary>
/// 获取或设置红包消息信息。 /// 获取或设置红包消息信息。
/// </summary> /// </summary>
[Newtonsoft.Json.JsonProperty("redpacket")] [Newtonsoft.Json.JsonProperty("redpacket")]
[System.Text.Json.Serialization.JsonPropertyName("redpacket")] [System.Text.Json.Serialization.JsonPropertyName("redpacket")]
public Types.RedPacketMessage? MessageContentForRedPacket { get; set; } public Types.RedPacketMessage? MessageContentAsRedPacket { get; set; }
/// <summary> /// <summary>
/// 获取或设置会议消息信息。 /// 获取或设置会议消息信息。
/// </summary> /// </summary>
[Newtonsoft.Json.JsonProperty("meeting")] [Newtonsoft.Json.JsonProperty("meeting")]
[System.Text.Json.Serialization.JsonPropertyName("meeting")] [System.Text.Json.Serialization.JsonPropertyName("meeting")]
public Types.MeetingMessage? MessageContentForMeeting { get; set; } public Types.MeetingMessage? MessageContentAsMeeting { get; set; }
/// <summary> /// <summary>
/// 获取或设置在线文档消息信息。 /// 获取或设置在线文档消息信息。
/// </summary> /// </summary>
[Newtonsoft.Json.JsonProperty("doc")] [Newtonsoft.Json.JsonProperty("doc")]
[System.Text.Json.Serialization.JsonPropertyName("doc")] [System.Text.Json.Serialization.JsonPropertyName("doc")]
public Types.DocumentMessage? MessageContentForDocument { get; set; } public Types.DocumentMessage? MessageContentAsDocument { get; set; }
/// <summary> /// <summary>
/// 获取或设置 Markdown、图文消息或音视频通话信息。 /// 获取或设置 Markdown、图文消息或音视频通话信息。
/// </summary> /// </summary>
[Newtonsoft.Json.JsonProperty("info")] [Newtonsoft.Json.JsonProperty("info")]
[System.Text.Json.Serialization.JsonPropertyName("info")] [System.Text.Json.Serialization.JsonPropertyName("info")]
public Types.InfoMessage? MessageContentForInfo { get; set; } public Types.InfoMessage? MessageContentAsInfo { get; set; }
/// <summary> /// <summary>
/// 获取或设置日程消息信息。 /// 获取或设置日程消息信息。
/// </summary> /// </summary>
[Newtonsoft.Json.JsonProperty("calendar")] [Newtonsoft.Json.JsonProperty("calendar")]
[System.Text.Json.Serialization.JsonPropertyName("calendar")] [System.Text.Json.Serialization.JsonPropertyName("calendar")]
public Types.CalendarMessage? MessageContentForCalendar { get; set; } public Types.CalendarMessage? MessageContentAsCalendar { get; set; }
/// <summary> /// <summary>
/// 获取或设置混合消息信息。 /// 获取或设置混合消息信息。
/// </summary> /// </summary>
[Newtonsoft.Json.JsonProperty("mixed")] [Newtonsoft.Json.JsonProperty("mixed")]
[System.Text.Json.Serialization.JsonPropertyName("mixed")] [System.Text.Json.Serialization.JsonPropertyName("mixed")]
public Types.MixedMessage? MessageContentForMixed { get; set; } public Types.MixedMessage? MessageContentAsMixed { get; set; }
/// <summary> /// <summary>
/// 获取或设置会议音频存档消息信息。 /// 获取或设置会议音频存档消息信息。
/// </summary> /// </summary>
[Newtonsoft.Json.JsonProperty("meeting_voice_call")] [Newtonsoft.Json.JsonProperty("meeting_voice_call")]
[System.Text.Json.Serialization.JsonPropertyName("meeting_voice_call")] [System.Text.Json.Serialization.JsonPropertyName("meeting_voice_call")]
public Types.MeetingVoiceCallMessage? MessageContentForMeetingVoiceCall { get; set; } public Types.MeetingVoiceCallMessage? MessageContentAsMeetingVoiceCall { get; set; }
/// <summary> /// <summary>
/// 获取或设置 VoIP 音频存档消息信息。 /// 获取或设置 VoIP 音频存档消息信息。
/// </summary> /// </summary>
[Newtonsoft.Json.JsonProperty("voip_doc_share")] [Newtonsoft.Json.JsonProperty("voip_doc_share")]
[System.Text.Json.Serialization.JsonPropertyName("voip_doc_share")] [System.Text.Json.Serialization.JsonPropertyName("voip_doc_share")]
public Types.VoIPDocumentShareMessage? MessageContentForVoIPDocumentShare { get; set; } public Types.VoIPDocumentShareMessage? MessageContentAsVoIPDocumentShare { get; set; }
/// <summary> /// <summary>
/// 获取或设置视频号消息信息。 /// 获取或设置视频号消息信息。
/// </summary> /// </summary>
[Newtonsoft.Json.JsonProperty("sphfeed")] [Newtonsoft.Json.JsonProperty("sphfeed")]
[System.Text.Json.Serialization.JsonPropertyName("sphfeed")] [System.Text.Json.Serialization.JsonPropertyName("sphfeed")]
public Types.ChannelsFeedMessage? MessageContentForChannelsFeed { get; set; } public Types.ChannelsFeedMessage? MessageContentAsChannelsFeed { get; set; }
/// <summary> /// <summary>
/// 获取或设置音频 ID。 /// 获取或设置音频 ID。

View File

@@ -53,6 +53,28 @@
"image_url": "IMAGE_URL", "image_url": "IMAGE_URL",
"shop_nickname": "SHOP_NICKNAME" "shop_nickname": "SHOP_NICKNAME"
} }
},
{
"msgtype": "channels",
"channels": {
"sub_type": 1,
"nickname": "视频号名称",
"title": "动态标题"
}
},
{
"msgtype": "merged_msg",
"merged_msg": {
"title": "群聊的聊天记录",
"item": [
{
"send_time": 1665649618,
"msgtype": "text",
"sender_name": "发送者",
"msg_content": "{\"msgtype\":\"text\",\"text\":{\"content\":\"消息内容\"}}"
}
]
}
} }
] ]
} }

View File

@@ -49,12 +49,12 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.UnitTests
{ {
var reqGetMediaFile = new GetMediaFileRequest() var reqGetMediaFile = new GetMediaFileRequest()
{ {
FileId = resDecryptChatRecord.MessageContentForImage!.FileId FileId = resDecryptChatRecord.MessageContentAsImage!.FileId
}; };
var resGetMediaFile = await client.ExecuteGetMediaFileAsync(reqGetMediaFile); var resGetMediaFile = await client.ExecuteGetMediaFileAsync(reqGetMediaFile);
Assert.True(resGetMediaFile.IsSuccessful()); Assert.True(resGetMediaFile.IsSuccessful());
Assert.Equal(resDecryptChatRecord.MessageContentForImage!.FileSize, resGetMediaFile.FileBytes.Length); Assert.Equal(resDecryptChatRecord.MessageContentAsImage!.FileSize, resGetMediaFile.FileBytes.Length);
} }
break; break;
@@ -62,12 +62,12 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.UnitTests
{ {
var reqGetMediaFile = new GetMediaFileRequest() var reqGetMediaFile = new GetMediaFileRequest()
{ {
FileId = resDecryptChatRecord.MessageContentForVoice!.FileId FileId = resDecryptChatRecord.MessageContentAsVoice!.FileId
}; };
var resGetMediaFile = await client.ExecuteGetMediaFileAsync(reqGetMediaFile); var resGetMediaFile = await client.ExecuteGetMediaFileAsync(reqGetMediaFile);
Assert.True(resGetMediaFile.IsSuccessful()); Assert.True(resGetMediaFile.IsSuccessful());
Assert.Equal(resDecryptChatRecord.MessageContentForVoice!.FileSize, resGetMediaFile.FileBytes.Length); Assert.Equal(resDecryptChatRecord.MessageContentAsVoice!.FileSize, resGetMediaFile.FileBytes.Length);
} }
break; break;
@@ -75,12 +75,12 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.UnitTests
{ {
var reqGetMediaFile = new GetMediaFileRequest() var reqGetMediaFile = new GetMediaFileRequest()
{ {
FileId = resDecryptChatRecord.MessageContentForVideo!.FileId FileId = resDecryptChatRecord.MessageContentAsVideo!.FileId
}; };
var resGetMediaFile = await client.ExecuteGetMediaFileAsync(reqGetMediaFile); var resGetMediaFile = await client.ExecuteGetMediaFileAsync(reqGetMediaFile);
Assert.True(resGetMediaFile.IsSuccessful()); Assert.True(resGetMediaFile.IsSuccessful());
Assert.Equal(resDecryptChatRecord.MessageContentForVideo!.FileSize, resGetMediaFile.FileBytes.Length); Assert.Equal(resDecryptChatRecord.MessageContentAsVideo!.FileSize, resGetMediaFile.FileBytes.Length);
} }
break; break;
@@ -88,12 +88,12 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.UnitTests
{ {
var reqGetMediaFile = new GetMediaFileRequest() var reqGetMediaFile = new GetMediaFileRequest()
{ {
FileId = resDecryptChatRecord.MessageContentForFile!.FileId FileId = resDecryptChatRecord.MessageContentAsFile!.FileId
}; };
var resGetMediaFile = await client.ExecuteGetMediaFileAsync(reqGetMediaFile); var resGetMediaFile = await client.ExecuteGetMediaFileAsync(reqGetMediaFile);
Assert.True(resGetMediaFile.IsSuccessful()); Assert.True(resGetMediaFile.IsSuccessful());
Assert.Equal(resDecryptChatRecord.MessageContentForFile!.FileSize, resGetMediaFile.FileBytes.Length); Assert.Equal(resDecryptChatRecord.MessageContentAsFile!.FileSize, resGetMediaFile.FileBytes.Length);
} }
break; break;
} }
@@ -174,7 +174,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.UnitTests
var model = serializer.Deserialize<DecryptChatRecordResponse>(json); var model = serializer.Deserialize<DecryptChatRecordResponse>(json);
Assert.Equal("text", model.MessageType); Assert.Equal("text", model.MessageType);
Assert.Equal("test", model.MessageContentForText!.Content); Assert.Equal("test", model.MessageContentAsText!.Content);
} }
AssertModelWithJsonSerializer(newtonsoftJsonSerializer); AssertModelWithJsonSerializer(newtonsoftJsonSerializer);
@@ -203,9 +203,9 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.UnitTests
var model = serializer.Deserialize<DecryptChatRecordResponse>(json); var model = serializer.Deserialize<DecryptChatRecordResponse>(json);
Assert.Equal("image", model.MessageType); Assert.Equal("image", model.MessageType);
Assert.Equal("FILEID", model.MessageContentForImage!.FileId); Assert.Equal("FILEID", model.MessageContentAsImage!.FileId);
Assert.Equal("50de8e5ae8ffe4f1df7a93841f71993a", model.MessageContentForImage!.FileMD5); Assert.Equal("50de8e5ae8ffe4f1df7a93841f71993a", model.MessageContentAsImage!.FileMD5);
Assert.Equal(70961, model.MessageContentForImage!.FileSize); Assert.Equal(70961, model.MessageContentAsImage!.FileSize);
} }
AssertModelWithJsonSerializer(newtonsoftJsonSerializer); AssertModelWithJsonSerializer(newtonsoftJsonSerializer);
@@ -232,7 +232,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.UnitTests
var model = serializer.Deserialize<DecryptChatRecordResponse>(json); var model = serializer.Deserialize<DecryptChatRecordResponse>(json);
Assert.Equal("revoke", model.MessageType); Assert.Equal("revoke", model.MessageType);
Assert.Equal("14822339130656386894_1603875600", model.MessageContentForRevoke!.PreviousMessageId); Assert.Equal("14822339130656386894_1603875600", model.MessageContentAsRevoke!.PreviousMessageId);
} }
AssertModelWithJsonSerializer(newtonsoftJsonSerializer); AssertModelWithJsonSerializer(newtonsoftJsonSerializer);
@@ -260,8 +260,8 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.UnitTests
var model = serializer.Deserialize<DecryptChatRecordResponse>(json); var model = serializer.Deserialize<DecryptChatRecordResponse>(json);
Assert.Equal("agree", model.MessageType); Assert.Equal("agree", model.MessageType);
Assert.Equal("wmGAgeDQAAvQeaTqWwkMTxGMkvI7OOuQ", model.MessageContentForAgree!.UserId); Assert.Equal("wmGAgeDQAAvQeaTqWwkMTxGMkvI7OOuQ", model.MessageContentAsAgree!.UserId);
Assert.Equal(1603875826656, model.MessageContentForAgree!.AgreeTimeMilliseconds); Assert.Equal(1603875826656, model.MessageContentAsAgree!.AgreeTimeMilliseconds);
} }
AssertModelWithJsonSerializer(newtonsoftJsonSerializer); AssertModelWithJsonSerializer(newtonsoftJsonSerializer);
@@ -291,10 +291,10 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.UnitTests
var model = serializer.Deserialize<DecryptChatRecordResponse>(json); var model = serializer.Deserialize<DecryptChatRecordResponse>(json);
Assert.Equal("voice", model.MessageType); Assert.Equal("voice", model.MessageType);
Assert.Equal("FILEID", model.MessageContentForVoice!.FileId); Assert.Equal("FILEID", model.MessageContentAsVoice!.FileId);
Assert.Equal("9db09c7fa627c9e53f17736c786a74d5", model.MessageContentForVoice!.FileMD5); Assert.Equal("9db09c7fa627c9e53f17736c786a74d5", model.MessageContentAsVoice!.FileMD5);
Assert.Equal(6810, model.MessageContentForVoice!.FileSize); Assert.Equal(6810, model.MessageContentAsVoice!.FileSize);
Assert.Equal(10, model.MessageContentForVoice!.Duration); Assert.Equal(10, model.MessageContentAsVoice!.Duration);
} }
AssertModelWithJsonSerializer(newtonsoftJsonSerializer); AssertModelWithJsonSerializer(newtonsoftJsonSerializer);
@@ -324,10 +324,10 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.UnitTests
var model = serializer.Deserialize<DecryptChatRecordResponse>(json); var model = serializer.Deserialize<DecryptChatRecordResponse>(json);
Assert.Equal("video", model.MessageType); Assert.Equal("video", model.MessageType);
Assert.Equal("FILEID", model.MessageContentForVideo!.FileId); Assert.Equal("FILEID", model.MessageContentAsVideo!.FileId);
Assert.Equal("d06fc80c01d6fbffcca3b229ba41eac6", model.MessageContentForVideo!.FileMD5); Assert.Equal("d06fc80c01d6fbffcca3b229ba41eac6", model.MessageContentAsVideo!.FileMD5);
Assert.Equal(15169724, model.MessageContentForVideo!.FileSize); Assert.Equal(15169724, model.MessageContentAsVideo!.FileSize);
Assert.Equal(108, model.MessageContentForVideo!.Duration); Assert.Equal(108, model.MessageContentAsVideo!.Duration);
} }
AssertModelWithJsonSerializer(newtonsoftJsonSerializer); AssertModelWithJsonSerializer(newtonsoftJsonSerializer);
@@ -355,8 +355,8 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.UnitTests
var model = serializer.Deserialize<DecryptChatRecordResponse>(json); var model = serializer.Deserialize<DecryptChatRecordResponse>(json);
Assert.Equal("card", model.MessageType); Assert.Equal("card", model.MessageType);
Assert.Equal("微信联系人", model.MessageContentForBusinessCard!.CorpName); Assert.Equal("微信联系人", model.MessageContentAsBusinessCard!.CorpName);
Assert.Equal("wmGAgeDQAAGjFmfnP7A3j2JxQDdLNhSw", model.MessageContentForBusinessCard!.UserId); Assert.Equal("wmGAgeDQAAGjFmfnP7A3j2JxQDdLNhSw", model.MessageContentAsBusinessCard!.UserId);
} }
AssertModelWithJsonSerializer(newtonsoftJsonSerializer); AssertModelWithJsonSerializer(newtonsoftJsonSerializer);
@@ -387,11 +387,11 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.UnitTests
var model = serializer.Deserialize<DecryptChatRecordResponse>(json); var model = serializer.Deserialize<DecryptChatRecordResponse>(json);
Assert.Equal("location", model.MessageType); Assert.Equal("location", model.MessageType);
Assert.Equal(116.586285899, model.MessageContentForLocation!.Longitude); Assert.Equal(116.586285899, model.MessageContentAsLocation!.Longitude);
Assert.Equal(39.911125799, model.MessageContentForLocation!.Latitude); Assert.Equal(39.911125799, model.MessageContentAsLocation!.Latitude);
Assert.Equal("北京市xxx区xxx路xxx大厦x座", model.MessageContentForLocation.Address); Assert.Equal("北京市xxx区xxx路xxx大厦x座", model.MessageContentAsLocation.Address);
Assert.Equal("xxx管理中心", model.MessageContentForLocation.Title); Assert.Equal("xxx管理中心", model.MessageContentAsLocation.Title);
Assert.Equal(15, model.MessageContentForLocation.Zoom); Assert.Equal(15, model.MessageContentAsLocation.Zoom);
} }
AssertModelWithJsonSerializer(newtonsoftJsonSerializer); AssertModelWithJsonSerializer(newtonsoftJsonSerializer);
@@ -423,12 +423,12 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.UnitTests
var model = serializer.Deserialize<DecryptChatRecordResponse>(json); var model = serializer.Deserialize<DecryptChatRecordResponse>(json);
Assert.Equal("emotion", model.MessageType); Assert.Equal("emotion", model.MessageType);
Assert.Equal(1, model.MessageContentForEmotion!.Type); Assert.Equal(1, model.MessageContentAsEmotion!.Type);
Assert.Equal(290, model.MessageContentForEmotion!.Width); Assert.Equal(290, model.MessageContentAsEmotion!.Width);
Assert.Equal(290, model.MessageContentForEmotion!.Height); Assert.Equal(290, model.MessageContentAsEmotion!.Height);
Assert.Equal("FILEID", model.MessageContentForEmotion.FileId); Assert.Equal("FILEID", model.MessageContentAsEmotion.FileId);
Assert.Equal("94c2b0bba52cc456cb8221b248096612", model.MessageContentForEmotion.FileMD5); Assert.Equal("94c2b0bba52cc456cb8221b248096612", model.MessageContentAsEmotion.FileMD5);
Assert.Equal(962604, model.MessageContentForEmotion.FileSize); Assert.Equal(962604, model.MessageContentAsEmotion.FileSize);
} }
AssertModelWithJsonSerializer(newtonsoftJsonSerializer); AssertModelWithJsonSerializer(newtonsoftJsonSerializer);
@@ -459,11 +459,11 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.UnitTests
var model = serializer.Deserialize<DecryptChatRecordResponse>(json); var model = serializer.Deserialize<DecryptChatRecordResponse>(json);
Assert.Equal("file", model.MessageType); Assert.Equal("file", model.MessageType);
Assert.Equal("资料.docx", model.MessageContentForFile!.FileName); Assert.Equal("资料.docx", model.MessageContentAsFile!.FileName);
Assert.Equal("docx", model.MessageContentForFile!.FileExtension); Assert.Equal("docx", model.MessageContentAsFile!.FileExtension);
Assert.Equal("FILEID", model.MessageContentForFile.FileId); Assert.Equal("FILEID", model.MessageContentAsFile.FileId);
Assert.Equal("18e93fc2ea884df23b3d2d3b8667b9f0", model.MessageContentForFile.FileMD5); Assert.Equal("18e93fc2ea884df23b3d2d3b8667b9f0", model.MessageContentAsFile.FileMD5);
Assert.Equal(18181, model.MessageContentForFile.FileSize); Assert.Equal(18181, model.MessageContentAsFile.FileSize);
} }
AssertModelWithJsonSerializer(newtonsoftJsonSerializer); AssertModelWithJsonSerializer(newtonsoftJsonSerializer);
@@ -493,10 +493,10 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.UnitTests
var model = serializer.Deserialize<DecryptChatRecordResponse>(json); var model = serializer.Deserialize<DecryptChatRecordResponse>(json);
Assert.Equal("link", model.MessageType); Assert.Equal("link", model.MessageType);
Assert.Equal("邀请你加入群聊", model.MessageContentForLink!.Title); Assert.Equal("邀请你加入群聊", model.MessageContentAsLink!.Title);
Assert.Equal("技术支持群,进入可查看详情", model.MessageContentForLink!.Description); Assert.Equal("技术支持群,进入可查看详情", model.MessageContentAsLink!.Description);
Assert.Equal("https://work.weixin.qq.com/wework_admin/external_room/join/exceed?vcode=xxx", model.MessageContentForLink.LinkUrl); Assert.Equal("https://work.weixin.qq.com/wework_admin/external_room/join/exceed?vcode=xxx", model.MessageContentAsLink.LinkUrl);
Assert.Equal("https://wework.qpic.cn/wwpic/xxx/0", model.MessageContentForLink.ImageUrl); Assert.Equal("https://wework.qpic.cn/wwpic/xxx/0", model.MessageContentAsLink.ImageUrl);
} }
AssertModelWithJsonSerializer(newtonsoftJsonSerializer); AssertModelWithJsonSerializer(newtonsoftJsonSerializer);
@@ -526,10 +526,10 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.UnitTests
var model = serializer.Deserialize<DecryptChatRecordResponse>(json); var model = serializer.Deserialize<DecryptChatRecordResponse>(json);
Assert.Equal("weapp", model.MessageType); Assert.Equal("weapp", model.MessageType);
Assert.Equal("开始聊天前请仔细阅读服务须知事项", model.MessageContentForMiniProgram!.Title); Assert.Equal("开始聊天前请仔细阅读服务须知事项", model.MessageContentAsMiniProgram!.Title);
Assert.Equal("客户需同意存档聊天记录", model.MessageContentForMiniProgram!.Description); Assert.Equal("客户需同意存档聊天记录", model.MessageContentAsMiniProgram!.Description);
Assert.Equal("xxx@app", model.MessageContentForMiniProgram.UserName); Assert.Equal("xxx@app", model.MessageContentAsMiniProgram.UserName);
Assert.Equal("服务须知", model.MessageContentForMiniProgram.DisplayName); Assert.Equal("服务须知", model.MessageContentAsMiniProgram.DisplayName);
} }
AssertModelWithJsonSerializer(newtonsoftJsonSerializer); AssertModelWithJsonSerializer(newtonsoftJsonSerializer);
@@ -567,10 +567,10 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.UnitTests
var model = serializer.Deserialize<DecryptChatRecordResponse>(json); var model = serializer.Deserialize<DecryptChatRecordResponse>(json);
Assert.Equal("chatrecord", model.MessageType); Assert.Equal("chatrecord", model.MessageType);
Assert.Equal("群聊", model.MessageContentForChatRecord!.Title); Assert.Equal("群聊", model.MessageContentAsChatRecord!.Title);
Assert.Equal("ChatRecordText", model.MessageContentForChatRecord!.RecordList[0]!.MessageType); Assert.Equal("ChatRecordText", model.MessageContentAsChatRecord!.RecordList[0]!.MessageType);
Assert.Equal("{\"content\":\"test\"}", model.MessageContentForChatRecord!.RecordList[0]!.MessageContentJson); Assert.Equal("{\"content\":\"test\"}", model.MessageContentAsChatRecord!.RecordList[0]!.MessageContentJson);
Assert.Equal(1603875610, model.MessageContentForChatRecord!.RecordList[0]!.MessageTimestamp); Assert.Equal(1603875610, model.MessageContentAsChatRecord!.RecordList[0]!.MessageTimestamp);
} }
AssertModelWithJsonSerializer(newtonsoftJsonSerializer); AssertModelWithJsonSerializer(newtonsoftJsonSerializer);
@@ -598,8 +598,8 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.UnitTests
var model = serializer.Deserialize<DecryptChatRecordResponse>(json); var model = serializer.Deserialize<DecryptChatRecordResponse>(json);
Assert.Equal("todo", model.MessageType); Assert.Equal("todo", model.MessageType);
Assert.Equal("来源文本", model.MessageContentForTodo!.Title); Assert.Equal("来源文本", model.MessageContentAsTodo!.Title);
Assert.Equal("具体内容", model.MessageContentForTodo!.Content); Assert.Equal("具体内容", model.MessageContentAsTodo!.Content);
} }
AssertModelWithJsonSerializer(newtonsoftJsonSerializer); AssertModelWithJsonSerializer(newtonsoftJsonSerializer);
@@ -629,10 +629,10 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.UnitTests
var model = serializer.Deserialize<DecryptChatRecordResponse>(json); var model = serializer.Deserialize<DecryptChatRecordResponse>(json);
Assert.Equal("vote", model.MessageType); Assert.Equal("vote", model.MessageType);
Assert.Equal(101, model.MessageContentForVote!.Type); Assert.Equal(101, model.MessageContentAsVote!.Type);
Assert.Equal("1603875610", model.MessageContentForVote!.VoteId); Assert.Equal("1603875610", model.MessageContentAsVote!.VoteId);
Assert.Equal("投票主题", model.MessageContentForVote!.Title); Assert.Equal("投票主题", model.MessageContentAsVote!.Title);
Assert.Equal("投票选项", model.MessageContentForVote!.Options[0]!); Assert.Equal("投票选项", model.MessageContentAsVote!.Options[0]!);
} }
AssertModelWithJsonSerializer(newtonsoftJsonSerializer); AssertModelWithJsonSerializer(newtonsoftJsonSerializer);
@@ -679,13 +679,13 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.UnitTests
var model = serializer.Deserialize<DecryptChatRecordResponse>(json); var model = serializer.Deserialize<DecryptChatRecordResponse>(json);
Assert.Equal("collect", model.MessageType); Assert.Equal("collect", model.MessageType);
Assert.Equal("这是一个群", model.MessageContentForCollect!.RoomName); Assert.Equal("这是一个群", model.MessageContentAsCollect!.RoomName);
Assert.Equal("nick", model.MessageContentForCollect!.CreatorName); Assert.Equal("nick", model.MessageContentAsCollect!.CreatorName);
Assert.Equal("2019-12-11 11:21:22", model.MessageContentForCollect!.CreateTimeString); Assert.Equal("2019-12-11 11:21:22", model.MessageContentAsCollect!.CreateTimeString);
Assert.Equal("这是填表title", model.MessageContentForCollect!.Title); Assert.Equal("这是填表title", model.MessageContentAsCollect!.Title);
Assert.Equal(1, model.MessageContentForCollect!.DetailList[0]!.ID); Assert.Equal(1, model.MessageContentAsCollect!.DetailList[0]!.ID);
Assert.Equal("Text", model.MessageContentForCollect!.DetailList[0]!.Type); Assert.Equal("Text", model.MessageContentAsCollect!.DetailList[0]!.Type);
Assert.Equal("表项1文本", model.MessageContentForCollect!.DetailList[0]!.Question); Assert.Equal("表项1文本", model.MessageContentAsCollect!.DetailList[0]!.Question);
} }
AssertModelWithJsonSerializer(newtonsoftJsonSerializer); AssertModelWithJsonSerializer(newtonsoftJsonSerializer);
@@ -715,10 +715,10 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.UnitTests
var model = serializer.Deserialize<DecryptChatRecordResponse>(json); var model = serializer.Deserialize<DecryptChatRecordResponse>(json);
Assert.Equal("redpacket", model.MessageType); Assert.Equal("redpacket", model.MessageType);
Assert.Equal(1, model.MessageContentForRedPacket!.Type); Assert.Equal(1, model.MessageContentAsRedPacket!.Type);
Assert.Equal("恭喜发财,大吉大利", model.MessageContentForRedPacket!.Wishing); Assert.Equal("恭喜发财,大吉大利", model.MessageContentAsRedPacket!.Wishing);
Assert.Equal(10, model.MessageContentForRedPacket!.TotalCount); Assert.Equal(10, model.MessageContentAsRedPacket!.TotalCount);
Assert.Equal(3000, model.MessageContentForRedPacket!.TotalAmount); Assert.Equal(3000, model.MessageContentAsRedPacket!.TotalAmount);
} }
AssertModelWithJsonSerializer(newtonsoftJsonSerializer); AssertModelWithJsonSerializer(newtonsoftJsonSerializer);
@@ -752,14 +752,14 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.UnitTests
var model = serializer.Deserialize<DecryptChatRecordResponse>(json); var model = serializer.Deserialize<DecryptChatRecordResponse>(json);
Assert.Equal("meeting", model.MessageType); Assert.Equal("meeting", model.MessageType);
Assert.Equal(102, model.MessageContentForMeeting!.Type); Assert.Equal(102, model.MessageContentAsMeeting!.Type);
Assert.Equal(1210342560, model.MessageContentForMeeting!.MeetingId); Assert.Equal(1210342560, model.MessageContentAsMeeting!.MeetingId);
Assert.Equal("夕会", model.MessageContentForMeeting!.Topic); Assert.Equal("夕会", model.MessageContentAsMeeting!.Topic);
Assert.Equal(1603877400, model.MessageContentForMeeting!.StartTimestamp); Assert.Equal(1603877400, model.MessageContentAsMeeting!.StartTimestamp);
Assert.Equal(1603881000, model.MessageContentForMeeting!.EndTimestamp); Assert.Equal(1603881000, model.MessageContentAsMeeting!.EndTimestamp);
Assert.Equal("地址", model.MessageContentForMeeting!.Address); Assert.Equal("地址", model.MessageContentAsMeeting!.Address);
Assert.Equal("备注", model.MessageContentForMeeting!.Remark); Assert.Equal("备注", model.MessageContentAsMeeting!.Remark);
Assert.Equal(1, model.MessageContentForMeeting!.Status); Assert.Equal(1, model.MessageContentAsMeeting!.Status);
} }
AssertModelWithJsonSerializer(newtonsoftJsonSerializer); AssertModelWithJsonSerializer(newtonsoftJsonSerializer);
@@ -809,9 +809,9 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.UnitTests
var model = serializer.Deserialize<DecryptChatRecordResponse>(json); var model = serializer.Deserialize<DecryptChatRecordResponse>(json);
Assert.Equal("docmsg", model.MessageType); Assert.Equal("docmsg", model.MessageType);
Assert.Equal("测试&演示客户", model.MessageContentForDocument!.Title); Assert.Equal("测试&演示客户", model.MessageContentAsDocument!.Title);
Assert.Equal("test", model.MessageContentForDocument!.CreatorUserId); Assert.Equal("test", model.MessageContentAsDocument!.CreatorUserId);
Assert.Equal("https://doc.weixin.qq.com/txdoc/excel?docid=xxx", model.MessageContentForDocument!.LinkUrl); Assert.Equal("https://doc.weixin.qq.com/txdoc/excel?docid=xxx", model.MessageContentAsDocument!.LinkUrl);
} }
AssertModelWithJsonSerializer(newtonsoftJsonSerializer); AssertModelWithJsonSerializer(newtonsoftJsonSerializer);
@@ -838,7 +838,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.UnitTests
var model = serializer.Deserialize<DecryptChatRecordResponse>(json); var model = serializer.Deserialize<DecryptChatRecordResponse>(json);
Assert.Equal("markdown", model.MessageType); Assert.Equal("markdown", model.MessageType);
Assert.Equal("请前往系统查看,谢谢。", model.MessageContentForInfo!.MarkdownContent); Assert.Equal("请前往系统查看,谢谢。", model.MessageContentAsInfo!.MarkdownContent);
} }
AssertModelWithJsonSerializer(newtonsoftJsonSerializer); AssertModelWithJsonSerializer(newtonsoftJsonSerializer);
@@ -871,13 +871,13 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.UnitTests
var model = serializer.Deserialize<DecryptChatRecordResponse>(json); var model = serializer.Deserialize<DecryptChatRecordResponse>(json);
Assert.Equal("calendar", model.MessageType); Assert.Equal("calendar", model.MessageType);
Assert.Equal("xxx业绩复盘会", model.MessageContentForCalendar!.Title); Assert.Equal("xxx业绩复盘会", model.MessageContentAsCalendar!.Title);
Assert.Equal("test", model.MessageContentForCalendar!.CreatorName); Assert.Equal("test", model.MessageContentAsCalendar!.CreatorName);
Assert.Equal("aaa", model.MessageContentForCalendar!.AttendeeNameList[0]); Assert.Equal("aaa", model.MessageContentAsCalendar!.AttendeeNameList[0]);
Assert.Equal(1603882800, model.MessageContentForCalendar!.StartTimestamp); Assert.Equal(1603882800, model.MessageContentAsCalendar!.StartTimestamp);
Assert.Equal(1603886400, model.MessageContentForCalendar!.EndTimestamp); Assert.Equal(1603886400, model.MessageContentAsCalendar!.EndTimestamp);
Assert.Equal("地点", model.MessageContentForCalendar!.Place); Assert.Equal("地点", model.MessageContentAsCalendar!.Place);
Assert.Equal("备注", model.MessageContentForCalendar!.Remark); Assert.Equal("备注", model.MessageContentAsCalendar!.Remark);
} }
AssertModelWithJsonSerializer(newtonsoftJsonSerializer); AssertModelWithJsonSerializer(newtonsoftJsonSerializer);
@@ -910,8 +910,8 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.UnitTests
var model = serializer.Deserialize<DecryptChatRecordResponse>(json); var model = serializer.Deserialize<DecryptChatRecordResponse>(json);
Assert.Equal("mixed", model.MessageType); Assert.Equal("mixed", model.MessageType);
Assert.Equal("text", model.MessageContentForMixed!.MessageList[0]!.Type); Assert.Equal("text", model.MessageContentAsMixed!.MessageList[0]!.Type);
Assert.Equal("{\"content\":\"你好[微笑]\\n\"}", model.MessageContentForMixed!.MessageList[0]!.ContentJson); Assert.Equal("{\"content\":\"你好[微笑]\\n\"}", model.MessageContentAsMixed!.MessageList[0]!.ContentJson);
} }
AssertModelWithJsonSerializer(newtonsoftJsonSerializer); AssertModelWithJsonSerializer(newtonsoftJsonSerializer);
@@ -951,15 +951,15 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.UnitTests
var model = serializer.Deserialize<DecryptChatRecordResponse>(json); var model = serializer.Deserialize<DecryptChatRecordResponse>(json);
Assert.Equal("meeting_voice_call", model.MessageType); Assert.Equal("meeting_voice_call", model.MessageType);
Assert.Equal("grb8a4c48a3c094a70982c518d55e40557", model.VoiceId); Assert.Equal("grb8a4c48a3c094a70982c518d55e40557", model.VoiceId);
Assert.Equal(1594197635, model.MessageContentForMeetingVoiceCall!.EndTimestamp); Assert.Equal(1594197635, model.MessageContentAsMeetingVoiceCall!.EndTimestamp);
Assert.Equal("FILEID", model.MessageContentForMeetingVoiceCall!.FileId); Assert.Equal("FILEID", model.MessageContentAsMeetingVoiceCall!.FileId);
Assert.Equal("65eb1cdd3e7a3c1740ecd74220b6c627.docx", model.MessageContentForMeetingVoiceCall!.ShareFileDataList![0]!.FileName); Assert.Equal("65eb1cdd3e7a3c1740ecd74220b6c627.docx", model.MessageContentAsMeetingVoiceCall!.ShareFileDataList![0]!.FileName);
Assert.Equal("wo137MCgAAYW6pIiKKrDe5SlzEhSgwbA", model.MessageContentForMeetingVoiceCall!.ShareFileDataList![0]!.OperatorUserId); Assert.Equal("wo137MCgAAYW6pIiKKrDe5SlzEhSgwbA", model.MessageContentAsMeetingVoiceCall!.ShareFileDataList![0]!.OperatorUserId);
Assert.Equal(1594197599, model.MessageContentForMeetingVoiceCall!.ShareFileDataList![0]!.StartTimestamp); Assert.Equal(1594197599, model.MessageContentAsMeetingVoiceCall!.ShareFileDataList![0]!.StartTimestamp);
Assert.Equal(1594197609, model.MessageContentForMeetingVoiceCall!.ShareFileDataList![0]!.EndTimestamp); Assert.Equal(1594197609, model.MessageContentAsMeetingVoiceCall!.ShareFileDataList![0]!.EndTimestamp);
Assert.Equal("wo137MCgAAYW6pIiKKrDe5SlzEhSgwbA", model.MessageContentForMeetingVoiceCall!.ShareScreenDataList![0]!.SharerUserId); Assert.Equal("wo137MCgAAYW6pIiKKrDe5SlzEhSgwbA", model.MessageContentAsMeetingVoiceCall!.ShareScreenDataList![0]!.SharerUserId);
Assert.Equal(1594197624, model.MessageContentForMeetingVoiceCall!.ShareScreenDataList![0]!.StartTimestamp); Assert.Equal(1594197624, model.MessageContentAsMeetingVoiceCall!.ShareScreenDataList![0]!.StartTimestamp);
Assert.Equal(1594197624, model.MessageContentForMeetingVoiceCall!.ShareScreenDataList![0]!.EndTimestamp); Assert.Equal(1594197624, model.MessageContentAsMeetingVoiceCall!.ShareScreenDataList![0]!.EndTimestamp);
} }
AssertModelWithJsonSerializer(newtonsoftJsonSerializer); AssertModelWithJsonSerializer(newtonsoftJsonSerializer);
@@ -990,10 +990,10 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.UnitTests
var model = serializer.Deserialize<DecryptChatRecordResponse>(json); var model = serializer.Deserialize<DecryptChatRecordResponse>(json);
Assert.Equal("voip_doc_share", model.MessageType); Assert.Equal("voip_doc_share", model.MessageType);
Assert.Equal("gr2751c98b19300571f8afb3b74514bd32", model.VoIPId); Assert.Equal("gr2751c98b19300571f8afb3b74514bd32", model.VoIPId);
Assert.Equal("欢迎使用微盘.pdf", model.MessageContentForVoIPDocumentShare!.FileName); Assert.Equal("欢迎使用微盘.pdf", model.MessageContentAsVoIPDocumentShare!.FileName);
Assert.Equal("FILEID", model.MessageContentForVoIPDocumentShare!.FileId); Assert.Equal("FILEID", model.MessageContentAsVoIPDocumentShare!.FileId);
Assert.Equal("ff893900f24e55e216e617a40e5c4648", model.MessageContentForVoIPDocumentShare!.FileMD5); Assert.Equal("ff893900f24e55e216e617a40e5c4648", model.MessageContentAsVoIPDocumentShare!.FileMD5);
Assert.Equal(4400654, model.MessageContentForVoIPDocumentShare!.FileSize); Assert.Equal(4400654, model.MessageContentAsVoIPDocumentShare!.FileSize);
} }
AssertModelWithJsonSerializer(newtonsoftJsonSerializer); AssertModelWithJsonSerializer(newtonsoftJsonSerializer);
@@ -1023,10 +1023,10 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.UnitTests
var model = serializer.Deserialize<DecryptChatRecordResponse>(json); var model = serializer.Deserialize<DecryptChatRecordResponse>(json);
Assert.Equal("external_redpacket", model.MessageType); Assert.Equal("external_redpacket", model.MessageType);
Assert.Equal(1, model.MessageContentForRedPacket!.Type); Assert.Equal(1, model.MessageContentAsRedPacket!.Type);
Assert.Equal("恭喜发财,大吉大利", model.MessageContentForRedPacket!.Wishing); Assert.Equal("恭喜发财,大吉大利", model.MessageContentAsRedPacket!.Wishing);
Assert.Equal(2, model.MessageContentForRedPacket!.TotalCount); Assert.Equal(2, model.MessageContentAsRedPacket!.TotalCount);
Assert.Equal(20, model.MessageContentForRedPacket!.TotalAmount); Assert.Equal(20, model.MessageContentAsRedPacket!.TotalAmount);
} }
AssertModelWithJsonSerializer(newtonsoftJsonSerializer); AssertModelWithJsonSerializer(newtonsoftJsonSerializer);
@@ -1055,9 +1055,9 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.UnitTests
var model = serializer.Deserialize<DecryptChatRecordResponse>(json); var model = serializer.Deserialize<DecryptChatRecordResponse>(json);
Assert.Equal("sphfeed", model.MessageType); Assert.Equal("sphfeed", model.MessageType);
Assert.Equal(4, model.MessageContentForChannelsFeed!.FeedType); Assert.Equal(4, model.MessageContentAsChannelsFeed!.FeedType);
Assert.Equal("云游天地旅行家", model.MessageContentForChannelsFeed!.ChannelsNickName); Assert.Equal("云游天地旅行家", model.MessageContentAsChannelsFeed!.ChannelsNickName);
Assert.Equal("瑞士丨盖尔默缆车,名副其实的过山车~\n\n#旅行#风景#热门", model.MessageContentForChannelsFeed!.Description); Assert.Equal("瑞士丨盖尔默缆车,名副其实的过山车~\n\n#旅行#风景#热门", model.MessageContentAsChannelsFeed!.Description);
} }
AssertModelWithJsonSerializer(newtonsoftJsonSerializer); AssertModelWithJsonSerializer(newtonsoftJsonSerializer);
@@ -1085,8 +1085,8 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.UnitTests
var model = serializer.Deserialize<DecryptChatRecordResponse>(json); var model = serializer.Deserialize<DecryptChatRecordResponse>(json);
Assert.Equal("voiptext", model.MessageType); Assert.Equal("voiptext", model.MessageType);
Assert.Equal(9, model.MessageContentForInfo!.VoIPCallDuration); Assert.Equal(9, model.MessageContentAsInfo!.VoIPCallDuration);
Assert.Equal(2, model.MessageContentForInfo!.VoIPInviteType); Assert.Equal(2, model.MessageContentAsInfo!.VoIPInviteType);
} }
AssertModelWithJsonSerializer(newtonsoftJsonSerializer); AssertModelWithJsonSerializer(newtonsoftJsonSerializer);
@@ -1113,7 +1113,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.UnitTests
var model = serializer.Deserialize<DecryptChatRecordResponse>(json); var model = serializer.Deserialize<DecryptChatRecordResponse>(json);
Assert.Equal("qydiskfile", model.MessageType); Assert.Equal("qydiskfile", model.MessageType);
Assert.Equal(".sys.log", model.MessageContentForInfo!.WedriveFileName); Assert.Equal(".sys.log", model.MessageContentAsInfo!.WedriveFileName);
} }
AssertModelWithJsonSerializer(newtonsoftJsonSerializer); AssertModelWithJsonSerializer(newtonsoftJsonSerializer);