mirror of
https://gitee.com/fudiwei/DotNetCore.SKIT.FlurlHttpClient.Wechat.git
synced 2025-09-19 01:58:14 +08:00
feat(work): 新增若干回调通知事件模型
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Events
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 EVENT.close_inactive_agent 事件的数据。</para>
|
||||
/// <para>REF: https://developer.work.weixin.qq.com/document/path/90240 </para>
|
||||
/// <para>REF: https://developer.work.weixin.qq.com/document/path/90376 </para>
|
||||
/// <para>REF: https://developer.work.weixin.qq.com/document/path/90858 </para>
|
||||
/// </summary>
|
||||
public class CloseInactiveAgentEvent : WechatWorkEvent, WechatWorkEvent.Serialization.IXmlSerializable
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置应用 ID。
|
||||
/// </summary>
|
||||
[System.Xml.Serialization.XmlElement("AgentID")]
|
||||
public int AgentId { get; set; }
|
||||
}
|
||||
}
|
@@ -0,0 +1,17 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Events
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 EVENT.reopen_inactive_agent 事件的数据。</para>
|
||||
/// <para>REF: https://developer.work.weixin.qq.com/document/path/90240 </para>
|
||||
/// <para>REF: https://developer.work.weixin.qq.com/document/path/90376 </para>
|
||||
/// <para>REF: https://developer.work.weixin.qq.com/document/path/90858 </para>
|
||||
/// </summary>
|
||||
public class ReopenInactiveAgentEvent : WechatWorkEvent, WechatWorkEvent.Serialization.IXmlSerializable
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置应用 ID。
|
||||
/// </summary>
|
||||
[System.Xml.Serialization.XmlElement("AgentID")]
|
||||
public int AgentId { get; set; }
|
||||
}
|
||||
}
|
@@ -0,0 +1,58 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Events
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 INFO.enter_register_package 事件的数据。</para>
|
||||
/// <para>REF: https://developer.work.weixin.qq.com/document/path/90585 </para>
|
||||
/// <para>REF: https://developer.work.weixin.qq.com/document/path/90810 </para>
|
||||
/// </summary>
|
||||
public class EnterRegisterPackageEvent : WechatWorkEvent, WechatWorkEvent.Serialization.IXmlSerializable
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class AuthorizerUser
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置成员账号。
|
||||
/// </summary>
|
||||
[System.Xml.Serialization.XmlElement("UserId")]
|
||||
public string UserId { get; set; } = default!;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置服务商 CorpId。
|
||||
/// </summary>
|
||||
[System.Xml.Serialization.XmlElement("ServiceCorpId")]
|
||||
public string ServiceCorpId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置授权方的 CorpId。
|
||||
/// </summary>
|
||||
[System.Xml.Serialization.XmlElement("AuthCorpId")]
|
||||
public string AuthorizerCorpId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置注册码。
|
||||
/// </summary>
|
||||
[System.Xml.Serialization.XmlElement("RegisterCode")]
|
||||
public string RegisterCode { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置授权管理员信息。
|
||||
/// </summary>
|
||||
[System.Xml.Serialization.XmlElement("AuthUserInfo", IsNullable = true)]
|
||||
public Types.AuthorizerUser? AuthorizerUser { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置推广包 ID。
|
||||
/// </summary>
|
||||
[System.Xml.Serialization.XmlElement("TemplateId")]
|
||||
public string TemplateId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置自定义渠道参数。
|
||||
/// </summary>
|
||||
[System.Xml.Serialization.XmlElement("State", IsNullable = true)]
|
||||
public string? State { get; set; }
|
||||
}
|
||||
}
|
@@ -1,10 +1,12 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Events
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Events
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 EVENT.doc_change 事件的数据。</para>
|
||||
/// <para>REF: https://developer.work.weixin.qq.com/document/path/97833 </para>
|
||||
/// <para>REF: https://developer.work.weixin.qq.com/document/path/97834 </para>
|
||||
/// <para>REF: https://developer.work.weixin.qq.com/document/path/97835 </para>
|
||||
/// <para>REF: https://developer.work.weixin.qq.com/document/path/98095 </para>
|
||||
/// <para>REF: https://developer.work.weixin.qq.com/document/path/98096 </para>
|
||||
/// </summary>
|
||||
public class DocumentChangeEvent : WechatWorkEvent, WechatWorkEvent.Serialization.IXmlSerializable
|
||||
{
|
||||
@@ -17,7 +19,13 @@
|
||||
/// <summary>
|
||||
/// 获取或设置文档 ID 列表。
|
||||
/// </summary>
|
||||
[System.Xml.Serialization.XmlElement("DocId", Type = typeof(string))]
|
||||
public string[] DocumentIdList { get; set; } = default!;
|
||||
[System.Xml.Serialization.XmlElement("DocId", Type = typeof(string), IsNullable = true)]
|
||||
public string[]? DocumentIdList { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置收集表 ID 列表。
|
||||
/// </summary>
|
||||
[System.Xml.Serialization.XmlElement("FormId", Type = typeof(string), IsNullable = true)]
|
||||
public string[]? FormIdList { get; set; }
|
||||
}
|
||||
}
|
||||
|
@@ -0,0 +1,8 @@
|
||||
<xml>
|
||||
<ToUserName><![CDATA[toUser]]></ToUserName>
|
||||
<FromUserName><![CDATA[FromUser]]></FromUserName>
|
||||
<CreateTime>123456789</CreateTime>
|
||||
<MsgType><![CDATA[event]]></MsgType>
|
||||
<Event><![CDATA[close_inactive_agent]]></Event>
|
||||
<AgentID>1</AgentID>
|
||||
</xml>
|
@@ -0,0 +1,8 @@
|
||||
<xml>
|
||||
<ToUserName><![CDATA[toUser]]></ToUserName>
|
||||
<FromUserName><![CDATA[FromUser]]></FromUserName>
|
||||
<CreateTime>123456789</CreateTime>
|
||||
<MsgType><![CDATA[event]]></MsgType>
|
||||
<Event><![CDATA[reopen_inactive_agent]]></Event>
|
||||
<AgentID>1</AgentID>
|
||||
</xml>
|
@@ -0,0 +1,12 @@
|
||||
<xml>
|
||||
<ServiceCorpId><![CDATA[wwddddccc7775555aab]]></ServiceCorpId>
|
||||
<InfoType><![CDATA[enter_register_package]]></InfoType>
|
||||
<TimeStamp>1671632600</TimeStamp>
|
||||
<AuthCorpId><![CDATA[wwddddccc7775555aaa]]></AuthCorpId>
|
||||
<AuthUserInfo>
|
||||
<UserId><![CDATA[zhangshan]]></UserId>
|
||||
</AuthUserInfo>
|
||||
<RegisterCode><![CDATA[pIKi3wRPNWCGF-YU5KWjD]]></RegisterCode>
|
||||
<State><![CDATA[state1]]></State>
|
||||
<TemplateId><![CDATA[tpl1test]]></TemplateId>
|
||||
</xml>
|
@@ -7,4 +7,6 @@
|
||||
<ChangeType><![CDATA[doc_member_change]]></ChangeType>
|
||||
<DocId><![CDATA[wcjgewCwAAqeJcPI1d8Pwbjt7nttzAAA]]></DocId>
|
||||
<DocId><![CDATA[wcjgewCwAAqeJcPI1d8Pwbjt7nttzBBB]]></DocId>
|
||||
<FormId><![CDATA[wcjgewCwAAqeJcPI1d8Pwbjt7nttzAAA]]></FormId>
|
||||
<FormId><![CDATA[wcjgewCwAAqeJcPI1d8Pwbjt7nttzBBB]]></FormId>
|
||||
</xml>
|
||||
|
Reference in New Issue
Block a user