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
91af6a61e4
commit
3844ef377a
@ -1247,5 +1247,127 @@ namespace SKIT.FlurlHttpClient.Wechat.Work
|
||||
return await client.SendRequestWithJsonAsync<Models.CgibinExternalContactDeleteStrategyTagResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region CustomerStrategy
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /cgi-bin/externalcontact/moment_strategy/list 接口。</para>
|
||||
/// <para>REF: https://work.weixin.qq.com/api/doc/90000/90135/94890 </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.CgibinExternalContactMomentStrategyListResponse> ExecuteCgibinExternalContactMomentStrategyListAsync(this WechatWorkClient client, Models.CgibinExternalContactMomentStrategyListRequest 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", "externalcontact", "moment_strategy", "list")
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.CgibinExternalContactMomentStrategyListResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /cgi-bin/externalcontact/moment_strategy/get 接口。</para>
|
||||
/// <para>REF: https://work.weixin.qq.com/api/doc/90000/90135/94883 </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.CgibinExternalContactMomentStrategyGetResponse> ExecuteCgibinExternalContactMomentStrategyGetAsync(this WechatWorkClient client, Models.CgibinExternalContactMomentStrategyGetRequest 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", "externalcontact", "moment_strategy", "get")
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.CgibinExternalContactMomentStrategyGetResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /cgi-bin/externalcontact/moment_strategy/get_range 接口。</para>
|
||||
/// <para>REF: https://work.weixin.qq.com/api/doc/90000/90135/94890 </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.CgibinExternalContactMomentStrategyGetRangeResponse> ExecuteCgibinExternalContactMomentStrategyGetRangeAsync(this WechatWorkClient client, Models.CgibinExternalContactMomentStrategyGetRangeRequest 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", "externalcontact", "moment_strategy", "get_range")
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.CgibinExternalContactMomentStrategyGetRangeResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /cgi-bin/externalcontact/moment_strategy/create 接口。</para>
|
||||
/// <para>REF: https://work.weixin.qq.com/api/doc/90000/90135/94890 </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.CgibinExternalContactMomentStrategyCreateResponse> ExecuteCgibinExternalContactMomentStrategyCreateAsync(this WechatWorkClient client, Models.CgibinExternalContactMomentStrategyCreateRequest 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", "externalcontact", "moment_strategy", "create")
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.CgibinExternalContactMomentStrategyCreateResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /cgi-bin/externalcontact/moment_strategy/edit 接口。</para>
|
||||
/// <para>REF: https://work.weixin.qq.com/api/doc/90000/90135/94883 </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.CgibinExternalContactMomentStrategyEditResponse> ExecuteCgibinExternalContactMomentStrategyEditAsync(this WechatWorkClient client, Models.CgibinExternalContactMomentStrategyEditRequest 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", "externalcontact", "moment_strategy", "edit")
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.CgibinExternalContactMomentStrategyEditResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /cgi-bin/externalcontact/moment_strategy/del 接口。</para>
|
||||
/// <para>REF: https://work.weixin.qq.com/api/doc/90000/90135/94883 </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.CgibinExternalContactMomentStrategyDeleteResponse> ExecuteCgibinExternalContactMomentStrategyDeleteAsync(this WechatWorkClient client, Models.CgibinExternalContactMomentStrategyDeleteRequest 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", "externalcontact", "moment_strategy", "del")
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.CgibinExternalContactMomentStrategyDeleteResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,90 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/externalcontact/moment_strategy/create 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class CgibinExternalContactMomentStrategyCreateRequest : WechatWorkRequest
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Privilege
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置是否可以查看成员的全部客户朋友圈发表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("view_moment_list")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("view_moment_list")]
|
||||
public bool? EnableViewMomentList { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置是否可以发表客户朋友圈。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("send_moment")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("send_moment")]
|
||||
public bool? EnableSendMoment { get; set; }
|
||||
}
|
||||
|
||||
public class Range
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置节点类型。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("type")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("type")]
|
||||
public int Type { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置管理范围内配置的成员 UserId。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("userid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("userid")]
|
||||
public string? UserId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置管理范围内配置的部门 UserId。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("partyid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("partyid")]
|
||||
public int? DepartmentId { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置父规则组 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("parent_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("parent_id")]
|
||||
public int? ParentStrategyId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置规则组名称。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("strategy_name")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("strategy_name")]
|
||||
public string Name { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置管理员 UserId 列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("admin_list")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("admin_list")]
|
||||
public IList<string> AdminUserIdList { get; set; } = new List<string>();
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置权限信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("privilege")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("privilege")]
|
||||
public Types.Privilege Privilege { get; set; } = new Types.Privilege();
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置规则组范围列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("range")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("range")]
|
||||
public IList<Types.Range> RangeList { get; set; } = new List<Types.Range>();
|
||||
}
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/externalcontact/moment_strategy/create 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class CgibinExternalContactMomentStrategyCreateResponse : WechatWorkResponse
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置规则组 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("strategy_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("strategy_id")]
|
||||
public int StrategyId { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/externalcontact/moment_strategy/del 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class CgibinExternalContactMomentStrategyDeleteRequest : WechatWorkRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置规则组 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("strategy_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("strategy_id")]
|
||||
public int StrategyId { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/externalcontact/moment_strategy/del 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class CgibinExternalContactMomentStrategyDeleteResponse : WechatWorkResponse
|
||||
{
|
||||
}
|
||||
}
|
@ -0,0 +1,64 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/externalcontact/moment_strategy/edit 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class CgibinExternalContactMomentStrategyEditRequest : WechatWorkRequest
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Privilege : CgibinExternalContactMomentStrategyCreateRequest.Types.Privilege
|
||||
{
|
||||
}
|
||||
|
||||
public class Range : CgibinExternalContactMomentStrategyCreateRequest.Types.Range
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置规则组 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("strategy_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("strategy_id")]
|
||||
public int StrategyId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置规则组名称。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("strategy_name")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("strategy_name")]
|
||||
public string? Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置管理员 UserId 列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("admin_list")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("admin_list")]
|
||||
public IList<string>? AdminUserIdList { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置权限信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("privilege")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("privilege")]
|
||||
public Types.Privilege? Privilege { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置要添加的规则组范围列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("range_add")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("range_add")]
|
||||
public IList<Types.Range>? AddRangeList { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置要删除的规则组范围列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("range_del")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("range_del")]
|
||||
public IList<Types.Range>? DeleteRangeList { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/externalcontact/moment_strategy/edit 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class CgibinExternalContactMomentStrategyEditResponse : WechatWorkResponse
|
||||
{
|
||||
}
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/externalcontact/moment_strategy/get_range 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class CgibinExternalContactMomentStrategyGetRangeRequest : WechatWorkRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置规则组 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("strategy_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("strategy_id")]
|
||||
public int StrategyId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置翻页标记。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("cursor")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("cursor")]
|
||||
public string? NextCursor { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置分页每页数量。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("limit")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("limit")]
|
||||
public int? Limit { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,52 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/externalcontact/moment_strategy/get_range 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class CgibinExternalContactMomentStrategyGetRangeResponse : WechatWorkResponse
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Range
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置节点类型。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("type")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("type")]
|
||||
public int Type { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置管理范围内配置的成员 UserId。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("userid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("userid")]
|
||||
public string? UserId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置管理范围内配置的部门 UserId。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("partyid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("partyid")]
|
||||
public int? DepartmentId { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置规则组范围列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("range")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("range")]
|
||||
public Types.Range[] RangeList { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置翻页标记。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("next_cursor")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("next_cursor")]
|
||||
public string? NextCursor { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/externalcontact/moment_strategy/get 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class CgibinExternalContactMomentStrategyGetRequest : WechatWorkRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置规则组 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("strategy_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("strategy_id")]
|
||||
public int StrategyId { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,86 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/externalcontact/moment_strategy/get 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class CgibinExternalContactMomentStrategyGetResponse : WechatWorkResponse
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Strategy
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Privilege
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置是否可以查看成员的全部客户朋友圈发表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("view_moment_list")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("view_moment_list")]
|
||||
public bool EnableViewMomentList { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置是否可以成员发表客户朋友圈。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("send_moment")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("send_moment")]
|
||||
public bool EnableSendMoment { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置规则组 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("strategy_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("strategy_id")]
|
||||
public int StrategyId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置父规则组 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("parent_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("parent_id")]
|
||||
public int ParentStrategyId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置规则组名称。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("strategy_name")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("strategy_name")]
|
||||
public string Name { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置管理员 UserId 列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("admin_list")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("admin_list")]
|
||||
public string[] AdminUserIdList { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置权限信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("privilege")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("privilege")]
|
||||
public Types.Privilege Privilege { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置创建时间戳。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("create_time")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("create_time")]
|
||||
public long CreateTimestamp { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置规则组信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("strategy")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("strategy")]
|
||||
public Types.Strategy Strategy { get; set; } = default!;
|
||||
}
|
||||
}
|
@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/externalcontact/moment_strategy/list 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class CgibinExternalContactMomentStrategyListRequest : WechatWorkRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置翻页标记。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("cursor")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("cursor")]
|
||||
public string? NextCursor { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置分页每页数量。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("limit")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("limit")]
|
||||
public int? Limit { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,38 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/externalcontact/moment_strategy/list 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class CgibinExternalContactMomentStrategyListResponse : WechatWorkResponse
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Strategy
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置规则组 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("strategy_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("strategy_id")]
|
||||
public int StrategyId { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置规则组列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("strategy")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("strategy")]
|
||||
public Types.Strategy[] StrategyList { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置翻页标记。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("next_cursor")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("next_cursor")]
|
||||
public string? NextCursor { get; set; }
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user