mirror of
https://gitee.com/fudiwei/DotNetCore.SKIT.FlurlHttpClient.Wechat.git
synced 2025-09-20 02:29:40 +08:00
feat(work): 新增上下游规则相关接口
This commit is contained in:
@@ -94,7 +94,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Work
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [GET] /cgi-bin/corpgroup/corp/get_chain_corpinfo_list 接口。</para>
|
||||
/// <para>异步调用 [POST] /cgi-bin/corpgroup/corp/get_chain_corpinfo_list 接口。</para>
|
||||
/// <para>REF: https://developer.work.weixin.qq.com/document/path/95315 </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
@@ -107,15 +107,8 @@ namespace SKIT.FlurlHttpClient.Wechat.Work
|
||||
if (request is null) throw new ArgumentNullException(nameof(request));
|
||||
|
||||
IFlurlRequest flurlReq = client
|
||||
.CreateRequest(request, HttpMethod.Get, "cgi-bin", "corpgroup", "corp", "get_chain_corpinfo_list")
|
||||
.SetQueryParam("access_token", request.AccessToken)
|
||||
.SetQueryParam("chain_id", request.ChainId);
|
||||
|
||||
if (request.GroupId != null)
|
||||
flurlReq.SetQueryParam("groupid", request.GroupId.Value);
|
||||
|
||||
if (request.RequireFetchChild != null)
|
||||
flurlReq.SetQueryParam("fetch_child", request.RequireFetchChild.Value ? 1 : 0);
|
||||
.CreateRequest(request, HttpMethod.Post, "cgi-bin", "corpgroup", "corp", "get_chain_corpinfo_list")
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.CgibinCorpGroupCropGetChainCorpInfoListResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
@@ -139,5 +132,107 @@ namespace SKIT.FlurlHttpClient.Wechat.Work
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.CgibinCorpGroupUnionidToExternalUserIdResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
#region Rule
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /cgi-bin/corpgroup/rule/list_ids 接口。</para>
|
||||
/// <para>REF: https://developer.work.weixin.qq.com/document/path/95631 </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.CgibinCorpGroupRuleListIdsResponse> ExecuteCgibinCorpGroupRuleListIdsAsync(this WechatWorkClient client, Models.CgibinCorpGroupRuleListIdsRequest 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", "corpgroup", "rule", "list_ids")
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.CgibinCorpGroupRuleListIdsResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /cgi-bin/corpgroup/rule/delete_rule 接口。</para>
|
||||
/// <para>REF: https://developer.work.weixin.qq.com/document/path/95632 </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.CgibinCorpGroupRuleDeleteRuleResponse> ExecuteCgibinCorpGroupRuleDeleteRuleAsync(this WechatWorkClient client, Models.CgibinCorpGroupRuleDeleteRuleRequest 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", "corpgroup", "rule", "delete_rule")
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.CgibinCorpGroupRuleDeleteRuleResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /cgi-bin/corpgroup/rule/get_rule_info 接口。</para>
|
||||
/// <para>REF: https://developer.work.weixin.qq.com/document/path/95634 </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.CgibinCorpGroupRuleGetRuleInfoResponse> ExecuteCgibinCorpGroupRuleGetRuleInfoAsync(this WechatWorkClient client, Models.CgibinCorpGroupRuleGetRuleInfoRequest 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", "corpgroup", "rule", "get_rule_info")
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.CgibinCorpGroupRuleGetRuleInfoResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /cgi-bin/corpgroup/rule/add_rule 接口。</para>
|
||||
/// <para>REF: https://developer.work.weixin.qq.com/document/path/95634 </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.CgibinCorpGroupRuleAddRuleResponse> ExecuteCgibinCorpGroupRuleAddRuleAsync(this WechatWorkClient client, Models.CgibinCorpGroupRuleAddRuleRequest 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", "corpgroup", "rule", "add_rule")
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.CgibinCorpGroupRuleAddRuleResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /cgi-bin/corpgroup/rule/modify_rule 接口。</para>
|
||||
/// <para>REF: https://developer.work.weixin.qq.com/document/path/95635 </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.CgibinCorpGroupRuleModifyRuleResponse> ExecuteCgibinCorpGroupRuleModifyRuleAsync(this WechatWorkClient client, Models.CgibinCorpGroupRuleModifyRuleRequest 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", "corpgroup", "rule", "modify_rule")
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.CgibinCorpGroupRuleModifyRuleResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
@@ -1,29 +1,31 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [GET] /cgi-bin/corpgroup/corp/get_chain_corpinfo_list 接口的请求。</para>
|
||||
/// <para>表示 [POST] /cgi-bin/corpgroup/corp/get_chain_corpinfo_list 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class CgibinCorpGroupCropGetChainCorpInfoListRequest : WechatWorkRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置上下游 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
[Newtonsoft.Json.JsonProperty("chain_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("chain_id")]
|
||||
public string ChainId { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置分组 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
[Newtonsoft.Json.JsonProperty("groupid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("groupid")]
|
||||
public int? GroupId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置是否递归获取子分组企业。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
[Newtonsoft.Json.JsonProperty("fetch_child")]
|
||||
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.NumericalNullableBooleanConverter))]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("fetch_child")]
|
||||
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumericalNullableBooleanConverter))]
|
||||
public bool? RequireFetchChild { get; set; }
|
||||
}
|
||||
}
|
||||
|
@@ -1,7 +1,7 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [GET] /cgi-bin/corpgroup/corp/get_chain_corpinfo_list 接口的响应。</para>
|
||||
/// <para>表示 [POST] /cgi-bin/corpgroup/corp/get_chain_corpinfo_list 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class CgibinCorpGroupCropGetChainCorpInfoListResponse : WechatWorkResponse
|
||||
{
|
||||
@@ -36,6 +36,13 @@
|
||||
[Newtonsoft.Json.JsonProperty("custom_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("custom_id")]
|
||||
public string? CustomId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置该上下游的邀请人的 UserId。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("invite_userid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("invite_userid")]
|
||||
public string? InviteUserId { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -0,0 +1,81 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/corpgroup/rule/add_rule 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class CgibinCorpGroupRuleAddRuleRequest : WechatWorkRequest
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Rule
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class OwnerCorpRange
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置 UserId 列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("userids")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("userids")]
|
||||
public IList<string>? UserIdList { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置部门 ID 列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("departmentids")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("departmentids")]
|
||||
public IList<long>? DepartmentIdList { get; set; }
|
||||
}
|
||||
|
||||
public class MemberCorpRange
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置分组 ID 列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("groupids")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("groupids")]
|
||||
public IList<int>? GroupIdList { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置企业 ID 列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("corpids")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("corpids")]
|
||||
public IList<string>? CorpIdList { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置上游企业的对接人规则信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("owner_corp_range")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("owner_corp_range")]
|
||||
public Types.OwnerCorpRange OwnerCorpRange { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置下游企业规则范围信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("member_corp_range")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("member_corp_range")]
|
||||
public Types.MemberCorpRange MemberCorpRange { get; set; } = default!;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置上下游 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("chain_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("chain_id")]
|
||||
public string ChainId { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置上下游关系规则信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("rule_info")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("rule_info")]
|
||||
public Types.Rule Rule { get; set; } = new Types.Rule();
|
||||
}
|
||||
}
|
@@ -0,0 +1,15 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/corpgroup/rule/add_rule 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class CgibinCorpGroupRuleAddRuleResponse : WechatWorkResponse
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置上下游关系规则 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("rule_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("rule_id")]
|
||||
public int RuleId { get; set; }
|
||||
}
|
||||
}
|
@@ -0,0 +1,22 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/corpgroup/rule/delete_rule 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class CgibinCorpGroupRuleDeleteRuleRequest : WechatWorkRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置上下游 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("chain_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("chain_id")]
|
||||
public string ChainId { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置上下游关系规则 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("rule_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("rule_id")]
|
||||
public int RuleId { get; set; }
|
||||
}
|
||||
}
|
@@ -0,0 +1,9 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/corpgroup/rule/delete_rule 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class CgibinCorpGroupRuleDeleteRuleResponse : WechatWorkResponse
|
||||
{
|
||||
}
|
||||
}
|
@@ -0,0 +1,22 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/corpgroup/rule/get_rule_info 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class CgibinCorpGroupRuleGetRuleInfoRequest : WechatWorkRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置上下游 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("chain_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("chain_id")]
|
||||
public string ChainId { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置上下游关系规则 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("rule_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("rule_id")]
|
||||
public int RuleId { get; set; }
|
||||
}
|
||||
}
|
@@ -0,0 +1,72 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/corpgroup/rule/get_rule_info 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class CgibinCorpGroupRuleGetRuleInfoResponse : WechatWorkResponse
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Rule
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class OwnerCorpRange
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置 UserId 列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("userids")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("userids")]
|
||||
public string[]? UserIdList { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置部门 ID 列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("departmentids")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("departmentids")]
|
||||
public long[]? DepartmentIdList { get; set; }
|
||||
}
|
||||
|
||||
public class MemberCorpRange
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置分组 ID 列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("groupids")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("groupids")]
|
||||
public int[]? GroupIdList { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置企业 ID 列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("corpids")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("corpids")]
|
||||
public string[]? CorpIdList { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置上游企业的对接人规则信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("owner_corp_range")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("owner_corp_range")]
|
||||
public Types.OwnerCorpRange OwnerCorpRange { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置下游企业规则范围信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("member_corp_range")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("member_corp_range")]
|
||||
public Types.MemberCorpRange MemberCorpRange { get; set; } = default!;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置上下游关系规则信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("rule_info")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("rule_info")]
|
||||
public Types.Rule Rule { get; set; } = default!;
|
||||
}
|
||||
}
|
@@ -0,0 +1,15 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/corpgroup/rule/list_ids 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class CgibinCorpGroupRuleListIdsRequest : WechatWorkRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置上下游 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("chain_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("chain_id")]
|
||||
public string ChainId { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
@@ -0,0 +1,15 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/corpgroup/rule/list_ids 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class CgibinCorpGroupRuleListIdsResponse : WechatWorkResponse
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置上下游关系规则的 ID 列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("rule_ids")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("rule_ids")]
|
||||
public int[] RuleIdList { get; set; } = default!;
|
||||
}
|
||||
}
|
@@ -0,0 +1,60 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/corpgroup/rule/modify_rule 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class CgibinCorpGroupRuleModifyRuleRequest : WechatWorkRequest
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Rule
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class OwnerCorpRange : CgibinCorpGroupRuleAddRuleRequest.Types.Rule.Types.OwnerCorpRange
|
||||
{
|
||||
}
|
||||
|
||||
public class MemberCorpRange : CgibinCorpGroupRuleAddRuleRequest.Types.Rule.Types.MemberCorpRange
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置上游企业的对接人规则信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("owner_corp_range")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("owner_corp_range")]
|
||||
public Types.OwnerCorpRange OwnerCorpRange { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置下游企业规则范围信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("member_corp_range")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("member_corp_range")]
|
||||
public Types.MemberCorpRange MemberCorpRange { get; set; } = default!;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置上下游 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("chain_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("chain_id")]
|
||||
public string ChainId { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置上下游关系规则 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("rule_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("rule_id")]
|
||||
public int RuleId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置上下游关系规则信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("rule_info")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("rule_info")]
|
||||
public Types.Rule Rule { get; set; } = new Types.Rule();
|
||||
}
|
||||
}
|
@@ -0,0 +1,9 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/corpgroup/rule/modify_rule 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class CgibinCorpGroupRuleModifyRuleResponse : WechatWorkResponse
|
||||
{
|
||||
}
|
||||
}
|
@@ -26,6 +26,6 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("department_id_list")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("department_id_list")]
|
||||
public IList<int>? DepartmentIdList { get; set; }
|
||||
public IList<long>? DepartmentIdList { get; set; }
|
||||
}
|
||||
}
|
||||
|
@@ -26,6 +26,6 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("department_id_list")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("department_id_list")]
|
||||
public IList<int>? DepartmentIdList { get; set; }
|
||||
public IList<long>? DepartmentIdList { get; set; }
|
||||
}
|
||||
}
|
||||
|
@@ -28,7 +28,7 @@
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("department_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("department_id")]
|
||||
public int? DepartmentId { get; set; }
|
||||
public long? DepartmentId { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"chain_id": "Chxxxxxx",
|
||||
"groupid": 1,
|
||||
"fetch_child": 0
|
||||
}
|
@@ -6,7 +6,8 @@
|
||||
"groupid": 2,
|
||||
"corpid": "wwxxxx",
|
||||
"corp_name": "美馨粮油公司",
|
||||
"custom_id": "wof3du51quo5sl1is"
|
||||
"custom_id": "custom_id",
|
||||
"invite_userid": "zhangsan"
|
||||
}
|
||||
]
|
||||
}
|
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"chain_id": "Chxxxxxx",
|
||||
"rule_info": {
|
||||
"owner_corp_range": {
|
||||
"departmentids": [ 123 ],
|
||||
"userids": [ "userid1", "userid2" ]
|
||||
},
|
||||
"member_corp_range": {
|
||||
"groupids": [ 123 ],
|
||||
"corpids": [ "corpid1", "corpid2" ]
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"errcode": 0,
|
||||
"errmsg": "ok",
|
||||
"rule_id": 1
|
||||
}
|
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"chain_id": "Chxxxxxx",
|
||||
"rule_id": 1
|
||||
}
|
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"chain_id": "Chxxxxxx",
|
||||
"rule_id": 1
|
||||
}
|
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"errcode": 0,
|
||||
"errmsg": "ok",
|
||||
"rule_info": {
|
||||
"owner_corp_range": {
|
||||
"departmentids": [ 123 ],
|
||||
"userids": [ "userid1", "userid2" ]
|
||||
},
|
||||
"member_corp_range": {
|
||||
"groupids": [ 123 ],
|
||||
"corpids": [ "corpid1", "corpid2" ]
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"chain_id": "Chxxxxxx"
|
||||
}
|
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"errcode": 0,
|
||||
"errmsg": "ok",
|
||||
"rule_ids": [ 1, 2 ]
|
||||
}
|
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"chain_id": "Chxxxxxx",
|
||||
"rule_id": 1,
|
||||
"rule_info": {
|
||||
"owner_corp_range": {
|
||||
"departmentids": [ 123 ],
|
||||
"userids": [ "userid1", "userid2" ]
|
||||
},
|
||||
"member_corp_range": {
|
||||
"groupids": [ 123 ],
|
||||
"corpids": [ "corpid1", "corpid2" ]
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user