mirror of
https://gitee.com/fudiwei/DotNetCore.SKIT.FlurlHttpClient.Wechat.git
synced 2025-04-05 17:37:54 +08:00
feat(work): 新增部分企业微信回调通知事件
This commit is contained in:
parent
31fe0f9690
commit
667455bfbc
@ -0,0 +1,38 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Events
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示被动回复图片消息的数据。</para>
|
||||
/// <para>REF: https://open.work.weixin.qq.com/api/doc/90000/90135/90241#%E5%9B%BE%E7%89%87%E6%B6%88%E6%81%AF </para>
|
||||
/// <para>REF: https://open.work.weixin.qq.com/api/doc/90001/90143/90377#%E5%9B%BE%E7%89%87%E6%B6%88%E6%81%AF </para>
|
||||
/// <para>REF: https://open.work.weixin.qq.com/api/doc/90002/90151/90859#%E5%9B%BE%E7%89%87%E6%B6%88%E6%81%AF </para>
|
||||
/// </summary>
|
||||
public class ImageMessageReply : WechatWorkEvent, WechatWorkEvent.Types.IXmlSerializable
|
||||
{
|
||||
public new static class Types
|
||||
{
|
||||
public class Image
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置图片 MediaId。
|
||||
/// </summary>
|
||||
[System.Xml.Serialization.XmlElement("MediaId")]
|
||||
public string MediaId { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置图片信息。
|
||||
/// </summary>
|
||||
[System.Xml.Serialization.XmlElement("Image")]
|
||||
public Types.Image Image { get; set; } = new Types.Image();
|
||||
|
||||
public ImageMessageReply()
|
||||
{
|
||||
Event = null;
|
||||
MessageType = "image";
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,71 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Events
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示被动回复图文消息的数据。</para>
|
||||
/// <para>REF: https://open.work.weixin.qq.com/api/doc/90000/90135/90241#%E5%9B%BE%E6%96%87%E6%B6%88%E6%81%AF </para>
|
||||
/// <para>REF: https://open.work.weixin.qq.com/api/doc/90001/90143/90377#%E5%9B%BE%E6%96%87%E6%B6%88%E6%81%AF </para>
|
||||
/// <para>REF: https://open.work.weixin.qq.com/api/doc/90002/90151/90859#%E5%9B%BE%E6%96%87%E6%B6%88%E6%81%AF </para>
|
||||
/// </summary>
|
||||
public class NewsMessageReply : WechatWorkEvent, WechatWorkEvent.Types.IXmlSerializable
|
||||
{
|
||||
public new static class Types
|
||||
{
|
||||
public class ArticleItem
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置图文链接。
|
||||
/// </summary>
|
||||
[System.Xml.Serialization.XmlElement("Url")]
|
||||
public string Url { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置图文封面图片链接。
|
||||
/// </summary>
|
||||
[System.Xml.Serialization.XmlElement("PicUrl")]
|
||||
public string PictureUrl { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置图文标题。
|
||||
/// </summary>
|
||||
[System.Xml.Serialization.XmlElement("Title")]
|
||||
public string Title { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置图文描述。
|
||||
/// </summary>
|
||||
[System.Xml.Serialization.XmlElement("Description")]
|
||||
public string Description { get; set; } = string.Empty;
|
||||
}
|
||||
|
||||
public class ArticleList
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置图文列表。
|
||||
/// </summary>
|
||||
[System.Xml.Serialization.XmlElement("item", Type = typeof(ArticleItem))]
|
||||
public ArticleItem[] Items { get; set; } = new ArticleItem[0];
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置图文数量。
|
||||
/// </summary>
|
||||
[System.Xml.Serialization.XmlElement("ArticleCount")]
|
||||
public int ArticleCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置图文列表。
|
||||
/// </summary>
|
||||
[System.Xml.Serialization.XmlElement("Articles")]
|
||||
public Types.ArticleList ArticleList { get; set; } = new Types.ArticleList();
|
||||
|
||||
public NewsMessageReply()
|
||||
{
|
||||
Event = null;
|
||||
MessageType = "news";
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,26 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Events
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示被动回复文本消息的数据。</para>
|
||||
/// <para>REF: https://open.work.weixin.qq.com/api/doc/90000/90135/90241#%E6%96%87%E6%9C%AC%E6%B6%88%E6%81%AF </para>
|
||||
/// <para>REF: https://open.work.weixin.qq.com/api/doc/90001/90143/90377#%E6%96%87%E6%9C%AC%E6%B6%88%E6%81%AF </para>
|
||||
/// <para>REF: https://open.work.weixin.qq.com/api/doc/90002/90151/90859#%E6%96%87%E6%9C%AC%E6%B6%88%E6%81%AF </para>
|
||||
/// </summary>
|
||||
public class TextMessageReply : WechatWorkEvent, WechatWorkEvent.Types.IXmlSerializable
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置消息内容。
|
||||
/// </summary>
|
||||
[System.Xml.Serialization.XmlElement("Content")]
|
||||
public string Content { get; set; } = string.Empty;
|
||||
|
||||
public TextMessageReply()
|
||||
{
|
||||
Event = null;
|
||||
MessageType = "text";
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,38 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Events
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示被动回复任务卡片更新消息的数据。</para>
|
||||
/// <para>REF: https://open.work.weixin.qq.com/api/doc/90000/90135/90241#%E4%BB%BB%E5%8A%A1%E5%8D%A1%E7%89%87%E6%9B%B4%E6%96%B0%E6%B6%88%E6%81%AF </para>
|
||||
/// <para>REF: https://open.work.weixin.qq.com/api/doc/90001/90143/90377#%E4%BB%BB%E5%8A%A1%E5%8D%A1%E7%89%87%E6%9B%B4%E6%96%B0%E6%B6%88%E6%81%AF </para>
|
||||
/// <para>REF: https://open.work.weixin.qq.com/api/doc/90002/90151/90859#%E4%BB%BB%E5%8A%A1%E5%8D%A1%E7%89%87%E6%9B%B4%E6%96%B0%E6%B6%88%E6%81%AF </para>
|
||||
/// </summary>
|
||||
public class UpdateTaskCardReply : WechatWorkEvent, WechatWorkEvent.Types.IXmlSerializable
|
||||
{
|
||||
public new static class Types
|
||||
{
|
||||
public class TaskCard
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置点击任务卡片按钮后显示的按钮名称。
|
||||
/// </summary>
|
||||
[System.Xml.Serialization.XmlElement("ReplaceName")]
|
||||
public string ReplacementText { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置任务卡片信息。
|
||||
/// </summary>
|
||||
[System.Xml.Serialization.XmlElement("TaskCard")]
|
||||
public Types.TaskCard? TaskCard { get; set; }
|
||||
|
||||
public UpdateTaskCardReply()
|
||||
{
|
||||
Event = null;
|
||||
MessageType = "update_taskcard";
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,50 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Events
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示被动回复视频消息的数据。</para>
|
||||
/// <para>REF: https://open.work.weixin.qq.com/api/doc/90000/90135/90241#%E8%A7%86%E9%A2%91%E6%B6%88%E6%81%AF </para>
|
||||
/// <para>REF: https://open.work.weixin.qq.com/api/doc/90001/90143/90377#%E8%A7%86%E9%A2%91%E6%B6%88%E6%81%AF </para>
|
||||
/// <para>REF: https://open.work.weixin.qq.com/api/doc/90002/90151/90859#%E8%A7%86%E9%A2%91%E6%B6%88%E6%81%AF </para>
|
||||
/// </summary>
|
||||
public class VideoMessageReply : WechatWorkEvent, WechatWorkEvent.Types.IXmlSerializable
|
||||
{
|
||||
public new static class Types
|
||||
{
|
||||
public class Video
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置视频 MediaId。
|
||||
/// </summary>
|
||||
[System.Xml.Serialization.XmlElement("MediaId")]
|
||||
public string MediaId { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置视频标题。
|
||||
/// </summary>
|
||||
[System.Xml.Serialization.XmlElement("Title")]
|
||||
public string Title { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置视频描述。
|
||||
/// </summary>
|
||||
[System.Xml.Serialization.XmlElement("Description")]
|
||||
public string Description { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置视频信息。
|
||||
/// </summary>
|
||||
[System.Xml.Serialization.XmlElement("Video")]
|
||||
public Types.Video Video { get; set; } = new Types.Video();
|
||||
|
||||
public VideoMessageReply()
|
||||
{
|
||||
Event = null;
|
||||
MessageType = "video";
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,38 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Events
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示被动回复语音消息的数据。</para>
|
||||
/// <para>REF: https://open.work.weixin.qq.com/api/doc/90000/90135/90241#%E8%AF%AD%E9%9F%B3%E6%B6%88%E6%81%AF </para>
|
||||
/// <para>REF: https://open.work.weixin.qq.com/api/doc/90001/90143/90377#%E8%AF%AD%E9%9F%B3%E6%B6%88%E6%81%AF </para>
|
||||
/// <para>REF: https://open.work.weixin.qq.com/api/doc/90002/90151/90859#%E8%AF%AD%E9%9F%B3%E6%B6%88%E6%81%AF </para>
|
||||
/// </summary>
|
||||
public class VoiceMessageReply : WechatWorkEvent, WechatWorkEvent.Types.IXmlSerializable
|
||||
{
|
||||
public new static class Types
|
||||
{
|
||||
public class Voice
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置语音 MediaId。
|
||||
/// </summary>
|
||||
[System.Xml.Serialization.XmlElement("MediaId")]
|
||||
public string MediaId { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置语音信息。
|
||||
/// </summary>
|
||||
[System.Xml.Serialization.XmlElement("Voice")]
|
||||
public Types.Voice Voice { get; set; } = new Types.Voice();
|
||||
|
||||
public VoiceMessageReply()
|
||||
{
|
||||
Event = null;
|
||||
MessageType = "voice";
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user