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
dcead8cad3
commit
5608151f1d
@ -0,0 +1,119 @@
|
||||
using System;
|
||||
using System.Net.Http;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Flurl;
|
||||
using Flurl.Http;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work
|
||||
{
|
||||
public static class WechatWorkClientExecuteCgibinExmailExtensions
|
||||
{
|
||||
#region Group
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /cgi-bin/exmail/group/create 接口。</para>
|
||||
/// <para>REF: https://developer.work.weixin.qq.com/document/path/95510 </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.CgibinExmailGroupCreateResponse> ExecuteCgibinExmailGroupCreateAsync(this WechatWorkClient client, Models.CgibinExmailGroupCreateRequest request, CancellationToken cancellationToken = default)
|
||||
{
|
||||
if (client is null) throw new ArgumentNullException(nameof(client));
|
||||
if (request is null) throw new ArgumentNullException(nameof(request));
|
||||
|
||||
IFlurlRequest flurlReq = client
|
||||
.CreateRequest(request, HttpMethod.Post, "cgi-bin", "exmail", "group", "create")
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.CgibinExmailGroupCreateResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /cgi-bin/exmail/group/update 接口。</para>
|
||||
/// <para>REF: https://developer.work.weixin.qq.com/document/path/95510 </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.CgibinExmailGroupUpdateResponse> ExecuteCgibinExmailGroupUpdateAsync(this WechatWorkClient client, Models.CgibinExmailGroupUpdateRequest request, CancellationToken cancellationToken = default)
|
||||
{
|
||||
if (client is null) throw new ArgumentNullException(nameof(client));
|
||||
if (request is null) throw new ArgumentNullException(nameof(request));
|
||||
|
||||
IFlurlRequest flurlReq = client
|
||||
.CreateRequest(request, HttpMethod.Post, "cgi-bin", "exmail", "group", "update")
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.CgibinExmailGroupUpdateResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /cgi-bin/exmail/group/delete 接口。</para>
|
||||
/// <para>REF: https://developer.work.weixin.qq.com/document/path/95510 </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.CgibinExmailGroupDeleteResponse> ExecuteCgibinExmailGroupDeleteAsync(this WechatWorkClient client, Models.CgibinExmailGroupDeleteRequest request, CancellationToken cancellationToken = default)
|
||||
{
|
||||
if (client is null) throw new ArgumentNullException(nameof(client));
|
||||
if (request is null) throw new ArgumentNullException(nameof(request));
|
||||
|
||||
IFlurlRequest flurlReq = client
|
||||
.CreateRequest(request, HttpMethod.Post, "cgi-bin", "exmail", "group", "delete")
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.CgibinExmailGroupDeleteResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [GET] /cgi-bin/exmail/group/search 接口。</para>
|
||||
/// <para>REF: https://developer.work.weixin.qq.com/document/path/95510 </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.CgibinExmailGroupSearchResponse> ExecuteCgibinExmailGroupSearchAsync(this WechatWorkClient client, Models.CgibinExmailGroupSearchRequest request, CancellationToken cancellationToken = default)
|
||||
{
|
||||
if (client is null) throw new ArgumentNullException(nameof(client));
|
||||
if (request is null) throw new ArgumentNullException(nameof(request));
|
||||
|
||||
IFlurlRequest flurlReq = client
|
||||
.CreateRequest(request, HttpMethod.Get, "cgi-bin", "exmail", "group", "search")
|
||||
.SetQueryParam("access_token", request.AccessToken)
|
||||
.SetQueryParam("fuzzy", request.IsFuzzy ? 1 : 0);
|
||||
|
||||
if (request.GroupId != null)
|
||||
flurlReq.SetQueryParam("groupid", request.GroupId);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.CgibinExmailGroupSearchResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [GET] /cgi-bin/exmail/group/get 接口。</para>
|
||||
/// <para>REF: https://developer.work.weixin.qq.com/document/path/95510 </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.CgibinExmailGroupGetResponse> ExecuteCgibinExmailGroupGetAsync(this WechatWorkClient client, Models.CgibinExmailGroupGetRequest request, CancellationToken cancellationToken = default)
|
||||
{
|
||||
if (client is null) throw new ArgumentNullException(nameof(client));
|
||||
if (request is null) throw new ArgumentNullException(nameof(request));
|
||||
|
||||
IFlurlRequest flurlReq = client
|
||||
.CreateRequest(request, HttpMethod.Get, "cgi-bin", "exmail", "group", "get")
|
||||
.SetQueryParam("access_token", request.AccessToken)
|
||||
.SetQueryParam("groupid", request.GroupId);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.CgibinExmailGroupGetResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
@ -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
|
||||
{
|
||||
}
|
||||
}
|
@ -0,0 +1,26 @@
|
||||
{
|
||||
"groupid": "zhangsangroup@gzdev.com",
|
||||
"groupname": "zhangsangroup",
|
||||
"email_list": {
|
||||
"list": ["lisi@gzdev.com", "wangwu@gzdev.com"]
|
||||
},
|
||||
"tag_list": {
|
||||
"list": [2, 5]
|
||||
},
|
||||
"department_list": {
|
||||
"list": [1, 2]
|
||||
},
|
||||
"group_list": {
|
||||
"list": ["aaa@gzdev.com"]
|
||||
},
|
||||
"allow_type": 3,
|
||||
"allow_emaillist": {
|
||||
"list": ["zhangsanp@gzdev.com"]
|
||||
},
|
||||
"allow_departmentlist": {
|
||||
"list": [1, 2]
|
||||
},
|
||||
"allow_taglist": {
|
||||
"list": [1, 3]
|
||||
}
|
||||
}
|
@ -0,0 +1,4 @@
|
||||
{
|
||||
"errcode": 0,
|
||||
"errmsg": "ok"
|
||||
}
|
@ -0,0 +1,3 @@
|
||||
{
|
||||
"groupid": "zhangsangroup@gzdev.com"
|
||||
}
|
@ -0,0 +1,4 @@
|
||||
{
|
||||
"errcode": 0,
|
||||
"errmsg": "ok"
|
||||
}
|
@ -0,0 +1,28 @@
|
||||
{
|
||||
"errcode": 0,
|
||||
"errmsg": "ok",
|
||||
"groupid": "zhangsangroup@gzdev.com",
|
||||
"groupname": "zhangsangroup",
|
||||
"email_list": {
|
||||
"list": ["lisi@gzdev.com", "wangwu@gzdev.com"]
|
||||
},
|
||||
"tag_list": {
|
||||
"list": [2, 5]
|
||||
},
|
||||
"department_list": {
|
||||
"list": [1, 2]
|
||||
},
|
||||
"group_list": {
|
||||
"list": ["aaa@gzdev.com"]
|
||||
},
|
||||
"allow_type": 3,
|
||||
"allow_emaillist": {
|
||||
"list": ["zhangsanp@gzdev.com"]
|
||||
},
|
||||
"allow_departmentlist": {
|
||||
"list": [1, 2]
|
||||
},
|
||||
"allow_taglist": {
|
||||
"list": [1, 3]
|
||||
}
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
{
|
||||
"errcode": 0,
|
||||
"errmsg": "ok",
|
||||
"count": 2,
|
||||
"groups": [
|
||||
{
|
||||
"groupid": "g_all@gzdev.com",
|
||||
"groupname": "任何人"
|
||||
},
|
||||
{
|
||||
"groupid": "g_inner@gzdev.com",
|
||||
"groupname": "组内成员"
|
||||
}
|
||||
]
|
||||
}
|
@ -0,0 +1,26 @@
|
||||
{
|
||||
"groupid": "zhangsangroup@gzdev.com",
|
||||
"groupname": "zhangsangroup",
|
||||
"email_list": {
|
||||
"list": ["lisi@gzdev.com", "wangwu@gzdev.com"]
|
||||
},
|
||||
"tag_list": {
|
||||
"list": [2, 5]
|
||||
},
|
||||
"department_list": {
|
||||
"list": [1, 2]
|
||||
},
|
||||
"group_list": {
|
||||
"list": ["aaa@gzdev.com"]
|
||||
},
|
||||
"allow_type": 3,
|
||||
"allow_emaillist": {
|
||||
"list": ["zhangsanp@gzdev.com"]
|
||||
},
|
||||
"allow_departmentlist": {
|
||||
"list": [1, 2]
|
||||
},
|
||||
"allow_taglist": {
|
||||
"list": [1, 3]
|
||||
}
|
||||
}
|
@ -0,0 +1,4 @@
|
||||
{
|
||||
"errcode": 0,
|
||||
"errmsg": "ok"
|
||||
}
|
Loading…
Reference in New Issue
Block a user