mirror of
https://gitee.com/fudiwei/DotNetCore.SKIT.FlurlHttpClient.Wechat.git
synced 2026-02-15 04:48:16 +08:00
feat(work): 新增企业邮箱群组相关接口
This commit is contained in:
@@ -0,0 +1,123 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/exmail/group/create 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class CgibinExmailGroupCreateRequest : WechatWorkRequest
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class EmailList
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置邮箱列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("list")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("list")]
|
||||
public IList<string> Items { get; set; } = new List<string>();
|
||||
}
|
||||
|
||||
public class EmailGroupList
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置邮箱群组列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("list")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("list")]
|
||||
public IList<string> Items { get; set; } = new List<string>();
|
||||
}
|
||||
|
||||
public class TagIdList
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置标签 ID 列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("list")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("list")]
|
||||
public IList<int> Items { get; set; } = new List<int>();
|
||||
}
|
||||
|
||||
public class DepartmentIdList
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置部门 ID 列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("list")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("list")]
|
||||
public IList<long> Items { get; set; } = new List<long>();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置邮件群组 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("groupid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("groupid")]
|
||||
public string GroupId { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置邮件群组名称。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("groupname")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("groupname")]
|
||||
public string GroupName { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置邮箱列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("email_list")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("email_list")]
|
||||
public Types.EmailList? EmailList { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置邮箱群组列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("group_list")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("group_list")]
|
||||
public Types.EmailGroupList? EmailGroupList { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置标签 ID 列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("tag_list")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("tag_list")]
|
||||
public Types.TagIdList? TagIdList { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置部门 ID 列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("department_list")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("department_list")]
|
||||
public Types.DepartmentIdList? DepartmentIdList { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置使用权限。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("allow_type")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("allow_type")]
|
||||
public int? AllowType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置使用权限。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("allow_emaillist")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("allow_emaillist")]
|
||||
public Types.EmailList? AllowEmailList { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置允许使用的标签 ID 列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("allow_taglist")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("allow_taglist")]
|
||||
public Types.TagIdList? AllowTagIdList { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置允许使用的部门 ID 列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("allow_departmentlist")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("allow_departmentlist")]
|
||||
public Types.DepartmentIdList? AllowDepartmentIdList { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/exmail/group/create 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class CgibinExmailGroupCreateResponse : WechatWorkResponse
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/exmail/group/delete 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class CgibinExmailGroupDeleteRequest : WechatWorkRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置邮件群组 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("groupid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("groupid")]
|
||||
public string GroupId { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/exmail/group/delete 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class CgibinExmailGroupDeleteResponse : WechatWorkResponse
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [GET] /cgi-bin/exmail/group/get 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class CgibinExmailGroupGetRequest : WechatWorkRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置邮件群组 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public string GroupId { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,121 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [GET] /cgi-bin/exmail/group/get 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class CgibinExmailGroupGetResponse : WechatWorkResponse
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class EmailList
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置邮箱列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("list")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("list")]
|
||||
public string[] Items { get; set; } = default!;
|
||||
}
|
||||
|
||||
public class EmailGroupList
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置邮箱群组列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("list")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("list")]
|
||||
public string[] Items { get; set; } = default!;
|
||||
}
|
||||
|
||||
public class TagIdList
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置标签 ID 列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("list")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("list")]
|
||||
public int[] Items { get; set; } = default!;
|
||||
}
|
||||
|
||||
public class DepartmentIdList
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置部门 ID 列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("list")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("list")]
|
||||
public long[] Items { get; set; } = default!;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置邮件群组 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("groupid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("groupid")]
|
||||
public string GroupId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置邮件群组名称。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("groupname")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("groupname")]
|
||||
public string GroupName { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置邮箱列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("email_list")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("email_list")]
|
||||
public Types.EmailList? EmailList { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置邮箱群组列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("group_list")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("group_list")]
|
||||
public Types.EmailGroupList? EmailGroupList { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置标签 ID 列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("tag_list")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("tag_list")]
|
||||
public Types.TagIdList? TagIdList { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置部门 ID 列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("department_list")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("department_list")]
|
||||
public Types.DepartmentIdList? DepartmentIdList { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置使用权限。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("allow_type")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("allow_type")]
|
||||
public int AllowType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置使用权限。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("allow_emaillist")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("allow_emaillist")]
|
||||
public Types.EmailList? AllowEmailList { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置允许使用的标签 ID 列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("allow_taglist")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("allow_taglist")]
|
||||
public Types.TagIdList? AllowTagIdList { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置允许使用的部门 ID 列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("allow_departmentlist")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("allow_departmentlist")]
|
||||
public Types.DepartmentIdList? AllowDepartmentIdList { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [GET] /cgi-bin/exmail/group/search 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class CgibinExmailGroupSearchRequest : WechatWorkRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置是否开启模糊搜索。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public bool IsFuzzy { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置邮件群组 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public string? GroupId { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [GET] /cgi-bin/exmail/group/search 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class CgibinExmailGroupSearchResponse : WechatWorkResponse
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class EmailGroup
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置邮件群组ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("groupid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("groupid")]
|
||||
public string GroupId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置邮件群组名称。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("groupname")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("groupname")]
|
||||
public string GroupName { get; set; } = default!;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置邮件群组列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("groups")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("groups")]
|
||||
public Types.EmailGroup[] EmailGroupList { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置返回条数。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("count")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("count")]
|
||||
public int Count { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/exmail/group/update 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class CgibinExmailGroupUpdateRequest : WechatWorkRequest
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class EmailList : CgibinExmailGroupCreateRequest.Types.EmailList
|
||||
{
|
||||
}
|
||||
|
||||
public class EmailGroupList : CgibinExmailGroupCreateRequest.Types.EmailGroupList
|
||||
{
|
||||
}
|
||||
|
||||
public class TagIdList : CgibinExmailGroupCreateRequest.Types.TagIdList
|
||||
{
|
||||
}
|
||||
|
||||
public class DepartmentIdList : CgibinExmailGroupCreateRequest.Types.DepartmentIdList
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置邮件群组 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("groupid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("groupid")]
|
||||
public string GroupId { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置邮件群组名称。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("groupname")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("groupname")]
|
||||
public string? GroupName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置邮箱列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("email_list")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("email_list")]
|
||||
public Types.EmailList? EmailList { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置邮箱群组列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("group_list")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("group_list")]
|
||||
public Types.EmailGroupList? EmailGroupList { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置标签 ID 列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("tag_list")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("tag_list")]
|
||||
public Types.TagIdList? TagIdList { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置部门 ID 列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("department_list")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("department_list")]
|
||||
public Types.DepartmentIdList? DepartmentIdList { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置使用权限。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("allow_type")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("allow_type")]
|
||||
public int? AllowType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置使用权限。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("allow_emaillist")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("allow_emaillist")]
|
||||
public Types.EmailList? AllowEmailList { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置允许使用的标签 ID 列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("allow_taglist")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("allow_taglist")]
|
||||
public Types.TagIdList? AllowTagIdList { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置允许使用的部门 ID 列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("allow_departmentlist")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("allow_departmentlist")]
|
||||
public Types.DepartmentIdList? AllowDepartmentIdList { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/exmail/group/update 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class CgibinExmailGroupUpdateResponse : WechatWorkResponse
|
||||
{
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user