From 4809c8fe319bac6d95026fe1b1f06e17257af79d Mon Sep 17 00:00:00 2001 From: Fu Diwei Date: Sat, 1 Jun 2024 15:43:01 +0800 Subject: [PATCH] =?UTF-8?q?feat(work):=20=E6=96=B0=E5=A2=9E=E9=AB=98?= =?UTF-8?q?=E7=BA=A7=E5=8A=9F=E8=83=BD=E7=94=B3=E8=AF=B7=E5=AE=A1=E6=89=B9?= =?UTF-8?q?=E7=9B=B8=E5=85=B3=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/WechatWork/Basic_ModelDefinition.md | 1 + .../FinishVipAccountApprovalEvent.cs | 36 +++++++ .../SubmitVipAccountApprovalEvent.cs | 44 +++++++++ ...tExecuteCgibinAdvancedFeatureExtensions.cs | 81 +++++++++++++++ ...binAdvancedFeatureGetApplyIdListRequest.cs | 43 ++++++++ ...inAdvancedFeatureGetApplyIdListResponse.cs | 29 ++++++ ...inAdvancedFeatureGetApprovalInfoRequest.cs | 15 +++ ...nAdvancedFeatureGetApprovalInfoResponse.cs | 84 ++++++++++++++++ ...AdvancedFeatureSetApprovalDetailRequest.cs | 99 +++++++++++++++++++ ...dvancedFeatureSetApprovalDetailResponse.cs | 9 ++ .../FinishVipAccountApprovalEvent.xml | 10 ++ .../SubmitVipAccountApprovalEvent.xml | 11 +++ ...nAdvancedFeatureGetApplyIdListRequest.json | 6 ++ ...AdvancedFeatureGetApplyIdListResponse.json | 10 ++ ...AdvancedFeatureGetApprovalInfoRequest.json | 3 + ...dvancedFeatureGetApprovalInfoResponse.json | 15 +++ ...vancedFeatureSetApprovalDetailRequest.json | 24 +++++ 17 files changed, 520 insertions(+) create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Work/Events/AdvancedFeature/FinishVipAccountApprovalEvent.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Work/Events/AdvancedFeature/SubmitVipAccountApprovalEvent.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Work/Extensions/WechatWorkClientExecuteCgibinAdvancedFeatureExtensions.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Work/Models/CgibinAdvancedFeature/CgibinAdvancedFeatureGetApplyIdListRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Work/Models/CgibinAdvancedFeature/CgibinAdvancedFeatureGetApplyIdListResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Work/Models/CgibinAdvancedFeature/CgibinAdvancedFeatureGetApprovalInfoRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Work/Models/CgibinAdvancedFeature/CgibinAdvancedFeatureGetApprovalInfoResponse.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Work/Models/CgibinAdvancedFeature/CgibinAdvancedFeatureSetApprovalDetailRequest.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Work/Models/CgibinAdvancedFeature/CgibinAdvancedFeatureSetApprovalDetailResponse.cs create mode 100644 test/SKIT.FlurlHttpClient.Wechat.Work.UnitTests/EventSamples/AdvancedFeature/FinishVipAccountApprovalEvent.xml create mode 100644 test/SKIT.FlurlHttpClient.Wechat.Work.UnitTests/EventSamples/AdvancedFeature/SubmitVipAccountApprovalEvent.xml create mode 100644 test/SKIT.FlurlHttpClient.Wechat.Work.UnitTests/ModelSamples/CgibinAdvancedFeature/CgibinAdvancedFeatureGetApplyIdListRequest.json create mode 100644 test/SKIT.FlurlHttpClient.Wechat.Work.UnitTests/ModelSamples/CgibinAdvancedFeature/CgibinAdvancedFeatureGetApplyIdListResponse.json create mode 100644 test/SKIT.FlurlHttpClient.Wechat.Work.UnitTests/ModelSamples/CgibinAdvancedFeature/CgibinAdvancedFeatureGetApprovalInfoRequest.json create mode 100644 test/SKIT.FlurlHttpClient.Wechat.Work.UnitTests/ModelSamples/CgibinAdvancedFeature/CgibinAdvancedFeatureGetApprovalInfoResponse.json create mode 100644 test/SKIT.FlurlHttpClient.Wechat.Work.UnitTests/ModelSamples/CgibinAdvancedFeature/CgibinAdvancedFeatureSetApprovalDetailRequest.json diff --git a/docs/WechatWork/Basic_ModelDefinition.md b/docs/WechatWork/Basic_ModelDefinition.md index f4f8afe3..4edfa9f7 100644 --- a/docs/WechatWork/Basic_ModelDefinition.md +++ b/docs/WechatWork/Basic_ModelDefinition.md @@ -62,6 +62,7 @@ | √ | 办公:汇报 | 企业 | | | √ | 办公:人事助手 | 企业 | | | √ | 办公:会议室 | 企业 | | +| √ | 办公:高级功能 | 企业 | | | √ | 办公:紧急通知 | 企业 | | | √ | 智慧硬件 | 第三方 | | | √ | 硬件云端接入 | 智慧硬件 | | diff --git a/src/SKIT.FlurlHttpClient.Wechat.Work/Events/AdvancedFeature/FinishVipAccountApprovalEvent.cs b/src/SKIT.FlurlHttpClient.Wechat.Work/Events/AdvancedFeature/FinishVipAccountApprovalEvent.cs new file mode 100644 index 00000000..b697e0e9 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Work/Events/AdvancedFeature/FinishVipAccountApprovalEvent.cs @@ -0,0 +1,36 @@ +namespace SKIT.FlurlHttpClient.Wechat.Work.Events +{ + /// + /// 表示 EVENT.finish_vip_account_approval 事件的数据。 + /// + /// REF:
+ /// + ///
+ ///
+ public class FinishVipAccountApprovalEvent : WechatWorkEvent + { + /// + /// 获取或设置应用 ID。 + /// + [Newtonsoft.Json.JsonProperty("AgentID")] + [System.Text.Json.Serialization.JsonPropertyName("AgentID")] + [System.Xml.Serialization.XmlElement("AgentID")] + public int AgentId { get; set; } + + /// + /// 获取或设置状态改变类型。 + /// + [Newtonsoft.Json.JsonProperty("FinishType")] + [System.Text.Json.Serialization.JsonPropertyName("FinishType")] + [System.Xml.Serialization.XmlElement("FinishType")] + public int FinishType { get; set; } + + /// + /// 获取或设置申请 ID。 + /// + [Newtonsoft.Json.JsonProperty("ApplyId")] + [System.Text.Json.Serialization.JsonPropertyName("ApplyId")] + [System.Xml.Serialization.XmlElement("ApplyId")] + public string ApplyId { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Work/Events/AdvancedFeature/SubmitVipAccountApprovalEvent.cs b/src/SKIT.FlurlHttpClient.Wechat.Work/Events/AdvancedFeature/SubmitVipAccountApprovalEvent.cs new file mode 100644 index 00000000..76b73b2b --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Work/Events/AdvancedFeature/SubmitVipAccountApprovalEvent.cs @@ -0,0 +1,44 @@ +namespace SKIT.FlurlHttpClient.Wechat.Work.Events +{ + /// + /// 表示 EVENT.submit_vip_account_approval 事件的数据。 + /// + /// REF:
+ /// + ///
+ ///
+ public class SubmitVipAccountApprovalEvent : WechatWorkEvent + { + /// + /// 获取或设置应用 ID。 + /// + [Newtonsoft.Json.JsonProperty("AgentID")] + [System.Text.Json.Serialization.JsonPropertyName("AgentID")] + [System.Xml.Serialization.XmlElement("AgentID")] + public int AgentId { get; set; } + + /// + /// 获取或设置申请的高级账号类型。 + /// + [Newtonsoft.Json.JsonProperty("BusinessType")] + [System.Text.Json.Serialization.JsonPropertyName("BusinessType")] + [System.Xml.Serialization.XmlElement("BusinessType")] + public int BusinessType { get; set; } + + /// + /// 获取或设置申请 ID。 + /// + [Newtonsoft.Json.JsonProperty("ApplyId")] + [System.Text.Json.Serialization.JsonPropertyName("ApplyId")] + [System.Xml.Serialization.XmlElement("ApplyId")] + public string ApplyId { get; set; } = default!; + + /// + /// 获取或设置申请原因。 + /// + [Newtonsoft.Json.JsonProperty("ApplyReason")] + [System.Text.Json.Serialization.JsonPropertyName("ApplyReason")] + [System.Xml.Serialization.XmlElement("ApplyReason")] + public string ApplyReason { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Work/Extensions/WechatWorkClientExecuteCgibinAdvancedFeatureExtensions.cs b/src/SKIT.FlurlHttpClient.Wechat.Work/Extensions/WechatWorkClientExecuteCgibinAdvancedFeatureExtensions.cs new file mode 100644 index 00000000..fd2187a6 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Work/Extensions/WechatWorkClientExecuteCgibinAdvancedFeatureExtensions.cs @@ -0,0 +1,81 @@ +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 WechatWorkClientExecuteCgibinAdvancedFeatureExtensions + { + /// + /// 异步调用 [POST] /cgi-bin/advanced_feature/set_approval_detail 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteCgibinAdvancedFeatureSetApprovalDetailAsync(this WechatWorkClient client, Models.CgibinAdvancedFeatureSetApprovalDetailRequest 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 + .CreateFlurlRequest(request, HttpMethod.Post, "cgi-bin", "advanced_feature", "set_approval_detail") + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /cgi-bin/advanced_feature/get_apply_id_list 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteCgibinAdvancedFeatureGetApplyIdListAsync(this WechatWorkClient client, Models.CgibinAdvancedFeatureGetApplyIdListRequest 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 + .CreateFlurlRequest(request, HttpMethod.Post, "cgi-bin", "advanced_feature", "get_apply_id_list") + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /cgi-bin/advanced_feature/get_approval_info 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteCgibinAdvancedFeatureGetApprovalInfoAsync(this WechatWorkClient client, Models.CgibinAdvancedFeatureGetApprovalInfoRequest 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 + .CreateFlurlRequest(request, HttpMethod.Post, "cgi-bin", "advanced_feature", "get_approval_info") + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Work/Models/CgibinAdvancedFeature/CgibinAdvancedFeatureGetApplyIdListRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Work/Models/CgibinAdvancedFeature/CgibinAdvancedFeatureGetApplyIdListRequest.cs new file mode 100644 index 00000000..1639a3d4 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Work/Models/CgibinAdvancedFeature/CgibinAdvancedFeatureGetApplyIdListRequest.cs @@ -0,0 +1,43 @@ +namespace SKIT.FlurlHttpClient.Wechat.Work.Models +{ + /// + /// 表示 [POST] /cgi-bin/advanced_feature/get_apply_id_list 接口的请求。 + /// + public class CgibinAdvancedFeatureGetApplyIdListRequest : WechatWorkRequest + { + /// + /// 获取或设置申请的高级账号类型。 + /// + [Newtonsoft.Json.JsonProperty("business_type")] + [System.Text.Json.Serialization.JsonPropertyName("business_type")] + public int BusinessType { get; set; } + + /// + /// 获取或设置申请的成员账号。 + /// + [Newtonsoft.Json.JsonProperty("userid")] + [System.Text.Json.Serialization.JsonPropertyName("userid")] + public string UserId { get; set; } = string.Empty; + + /// + /// 获取或设置申请类型。 + /// + [Newtonsoft.Json.JsonProperty("req_type")] + [System.Text.Json.Serialization.JsonPropertyName("req_type")] + public int? RequestType { get; set; } + + /// + /// 获取或设置分页游标。 + /// + [Newtonsoft.Json.JsonProperty("cursor")] + [System.Text.Json.Serialization.JsonPropertyName("cursor")] + public string? Cursor { get; set; } + + /// + /// 获取或设置分页每页数量。 + /// + [Newtonsoft.Json.JsonProperty("limit")] + [System.Text.Json.Serialization.JsonPropertyName("limit")] + public int? Limit { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Work/Models/CgibinAdvancedFeature/CgibinAdvancedFeatureGetApplyIdListResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Work/Models/CgibinAdvancedFeature/CgibinAdvancedFeatureGetApplyIdListResponse.cs new file mode 100644 index 00000000..263029dd --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Work/Models/CgibinAdvancedFeature/CgibinAdvancedFeatureGetApplyIdListResponse.cs @@ -0,0 +1,29 @@ +namespace SKIT.FlurlHttpClient.Wechat.Work.Models +{ + /// + /// 表示 [POST] /cgi-bin/advanced_feature/get_apply_id_list 接口的响应。 + /// + public class CgibinAdvancedFeatureGetApplyIdListResponse : WechatWorkResponse + { + /// + /// 获取或设置申请 ID 列表。 + /// + [Newtonsoft.Json.JsonProperty("apply_id_list")] + [System.Text.Json.Serialization.JsonPropertyName("apply_id_list")] + public string[] ApplyIdList { get; set; } = default!; + + /// + /// 获取或设置分页游标。 + /// + [Newtonsoft.Json.JsonProperty("next_cursor")] + [System.Text.Json.Serialization.JsonPropertyName("next_cursor")] + public string? NextCursor { get; set; } + + /// + /// 获取或设置是否还有更多数据。 + /// + [Newtonsoft.Json.JsonProperty("has_more")] + [System.Text.Json.Serialization.JsonPropertyName("has_more")] + public bool HasMore { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Work/Models/CgibinAdvancedFeature/CgibinAdvancedFeatureGetApprovalInfoRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Work/Models/CgibinAdvancedFeature/CgibinAdvancedFeatureGetApprovalInfoRequest.cs new file mode 100644 index 00000000..924f64f1 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Work/Models/CgibinAdvancedFeature/CgibinAdvancedFeatureGetApprovalInfoRequest.cs @@ -0,0 +1,15 @@ +namespace SKIT.FlurlHttpClient.Wechat.Work.Models +{ + /// + /// 表示 [POST] /cgi-bin/advanced_feature/get_approval_info 接口的请求。 + /// + public class CgibinAdvancedFeatureGetApprovalInfoRequest : WechatWorkRequest + { + /// + /// 获取或设置申请 ID。 + /// + [Newtonsoft.Json.JsonProperty("apply_id")] + [System.Text.Json.Serialization.JsonPropertyName("apply_id")] + public string ApplyId { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Work/Models/CgibinAdvancedFeature/CgibinAdvancedFeatureGetApprovalInfoResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Work/Models/CgibinAdvancedFeature/CgibinAdvancedFeatureGetApprovalInfoResponse.cs new file mode 100644 index 00000000..f05c295f --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Work/Models/CgibinAdvancedFeature/CgibinAdvancedFeatureGetApprovalInfoResponse.cs @@ -0,0 +1,84 @@ +namespace SKIT.FlurlHttpClient.Wechat.Work.Models +{ + /// + /// 表示 [POST] /cgi-bin/advanced_feature/get_approval_info 接口的响应。 + /// + public class CgibinAdvancedFeatureGetApprovalInfoResponse : WechatWorkResponse + { + public static class Types + { + public class Approval + { + /// + /// 获取或设置申请的高级账号类型。 + /// + [Newtonsoft.Json.JsonProperty("business_type")] + [System.Text.Json.Serialization.JsonPropertyName("business_type")] + public int BusinessType { get; set; } + + /// + /// 获取或设置申请 ID。 + /// + [Newtonsoft.Json.JsonProperty("apply_id")] + [System.Text.Json.Serialization.JsonPropertyName("apply_id")] + public string ApplyId { get; set; } = default!; + + /// + /// 获取或设置审批 ID。 + /// + [Newtonsoft.Json.JsonProperty("approval_id")] + [System.Text.Json.Serialization.JsonPropertyName("approval_id")] + public string ApprovalId { get; set; } = default!; + + /// + /// 获取或设置审批类型。 + /// + [Newtonsoft.Json.JsonProperty("approval_type")] + [System.Text.Json.Serialization.JsonPropertyName("approval_type")] + public int ApprovalType { get; set; } + + /// + /// 获取或设置审批单状态。 + /// + [Newtonsoft.Json.JsonProperty("approval_status")] + [System.Text.Json.Serialization.JsonPropertyName("approval_status")] + public int ApprovalStatus { get; set; } + + /// + /// 获取或设置审批跳转链接。 + /// + [Newtonsoft.Json.JsonProperty("approval_url")] + [System.Text.Json.Serialization.JsonPropertyName("approval_url")] + public string ApprovalUrl { get; set; } = default!; + + /// + /// 获取或设置申请人成员账号。 + /// + [Newtonsoft.Json.JsonProperty("applicant")] + [System.Text.Json.Serialization.JsonPropertyName("applicant")] + public string ApplicantUserId { get; set; } = default!; + + /// + /// 获取或设置申请原因。 + /// + [Newtonsoft.Json.JsonProperty("request_reason")] + [System.Text.Json.Serialization.JsonPropertyName("request_reason")] + public string ApplyReason { get; set; } = default!; + + /// + /// 获取或设置创建时间戳。 + /// + [Newtonsoft.Json.JsonProperty("create_time")] + [System.Text.Json.Serialization.JsonPropertyName("create_time")] + public long CreateTimestamp { get; set; } + } + } + + /// + /// 获取或设置审批信息。 + /// + [Newtonsoft.Json.JsonProperty("approval_info")] + [System.Text.Json.Serialization.JsonPropertyName("approval_info")] + public Types.Approval Approval { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Work/Models/CgibinAdvancedFeature/CgibinAdvancedFeatureSetApprovalDetailRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Work/Models/CgibinAdvancedFeature/CgibinAdvancedFeatureSetApprovalDetailRequest.cs new file mode 100644 index 00000000..c5946c93 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Work/Models/CgibinAdvancedFeature/CgibinAdvancedFeatureSetApprovalDetailRequest.cs @@ -0,0 +1,99 @@ +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.Wechat.Work.Models +{ + /// + /// 表示 [POST] /cgi-bin/advanced_feature/set_approval_detail 接口的请求。 + /// + public class CgibinAdvancedFeatureSetApprovalDetailRequest : WechatWorkRequest + { + public static class Types + { + public class Process + { + public static class Types + { + public class Node + { + /// + /// 获取或设置审批节点状态。 + /// + [Newtonsoft.Json.JsonProperty("node_apv_status")] + [System.Text.Json.Serialization.JsonPropertyName("node_apv_status")] + public int NodeApproveStatus { get; set; } + + /// + /// 获取或设置多人审批方式。 + /// + [Newtonsoft.Json.JsonProperty("node_apv_rel")] + [System.Text.Json.Serialization.JsonPropertyName("node_apv_rel")] + public int NodeApproversRelation { get; set; } + + /// + /// 获取或设置待处理人成员账号列表。 + /// + [Newtonsoft.Json.JsonProperty("current_approvers")] + [System.Text.Json.Serialization.JsonPropertyName("current_approvers")] + public IList? CurrentApproversUserIdList { get; set; } + + /// + /// 获取或设置已处理人成员账号列表。 + /// + [Newtonsoft.Json.JsonProperty("completed_approvers")] + [System.Text.Json.Serialization.JsonPropertyName("completed_approvers")] + public IList? CompletedApproversUserIdList { get; set; } + + /// + /// 获取或设置更新时间戳。 + /// + [Newtonsoft.Json.JsonProperty("apv_update_time")] + [System.Text.Json.Serialization.JsonPropertyName("apv_update_time")] + public long UpdateTimestamp { get; set; } + } + } + + /// + /// 获取或设置节点列表。 + /// + [Newtonsoft.Json.JsonProperty("node_list")] + [System.Text.Json.Serialization.JsonPropertyName("node_list")] + public IList NodeList { get; set; } = new List(); + } + } + + /// + /// 获取或设置申请 ID。 + /// + [Newtonsoft.Json.JsonProperty("apply_id")] + [System.Text.Json.Serialization.JsonPropertyName("apply_id")] + public string ApplyId { get; set; } = string.Empty; + + /// + /// 获取或设置审批 ID。 + /// + [Newtonsoft.Json.JsonProperty("approval_id")] + [System.Text.Json.Serialization.JsonPropertyName("approval_id")] + public string ApprovalId { get; set; } = string.Empty; + + /// + /// 获取或设置审批单状态。 + /// + [Newtonsoft.Json.JsonProperty("approval_status")] + [System.Text.Json.Serialization.JsonPropertyName("approval_status")] + public int ApprovalStatus { get; set; } + + /// + /// 获取或设置审批跳转链接。 + /// + [Newtonsoft.Json.JsonProperty("approval_url")] + [System.Text.Json.Serialization.JsonPropertyName("approval_url")] + public string ApprovalUrl { get; set; } = string.Empty; + + /// + /// 获取或设置审批流程信息。 + /// + [Newtonsoft.Json.JsonProperty("process_list")] + [System.Text.Json.Serialization.JsonPropertyName("process_list")] + public Types.Process Process { get; set; } = new Types.Process(); + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Work/Models/CgibinAdvancedFeature/CgibinAdvancedFeatureSetApprovalDetailResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Work/Models/CgibinAdvancedFeature/CgibinAdvancedFeatureSetApprovalDetailResponse.cs new file mode 100644 index 00000000..1cb0ab6d --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Work/Models/CgibinAdvancedFeature/CgibinAdvancedFeatureSetApprovalDetailResponse.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.Wechat.Work.Models +{ + /// + /// 表示 [POST] /cgi-bin/advanced_feature/set_approval_detail 接口的响应。 + /// + public class CgibinAdvancedFeatureSetApprovalDetailResponse : WechatWorkResponse + { + } +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Work.UnitTests/EventSamples/AdvancedFeature/FinishVipAccountApprovalEvent.xml b/test/SKIT.FlurlHttpClient.Wechat.Work.UnitTests/EventSamples/AdvancedFeature/FinishVipAccountApprovalEvent.xml new file mode 100644 index 00000000..99c85ede --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Work.UnitTests/EventSamples/AdvancedFeature/FinishVipAccountApprovalEvent.xml @@ -0,0 +1,10 @@ + + + + 1715681559 + + + 1 + + 1 + diff --git a/test/SKIT.FlurlHttpClient.Wechat.Work.UnitTests/EventSamples/AdvancedFeature/SubmitVipAccountApprovalEvent.xml b/test/SKIT.FlurlHttpClient.Wechat.Work.UnitTests/EventSamples/AdvancedFeature/SubmitVipAccountApprovalEvent.xml new file mode 100644 index 00000000..4c30e2e7 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Work.UnitTests/EventSamples/AdvancedFeature/SubmitVipAccountApprovalEvent.xml @@ -0,0 +1,11 @@ + + + + 1715681559 + + + + 1 + + 1 + diff --git a/test/SKIT.FlurlHttpClient.Wechat.Work.UnitTests/ModelSamples/CgibinAdvancedFeature/CgibinAdvancedFeatureGetApplyIdListRequest.json b/test/SKIT.FlurlHttpClient.Wechat.Work.UnitTests/ModelSamples/CgibinAdvancedFeature/CgibinAdvancedFeatureGetApplyIdListRequest.json new file mode 100644 index 00000000..95080255 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Work.UnitTests/ModelSamples/CgibinAdvancedFeature/CgibinAdvancedFeatureGetApplyIdListRequest.json @@ -0,0 +1,6 @@ +{ + "business_type": 1, + "limit": 10, + "cursor": "CURSOR", + "req_type": 1 +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Work.UnitTests/ModelSamples/CgibinAdvancedFeature/CgibinAdvancedFeatureGetApplyIdListResponse.json b/test/SKIT.FlurlHttpClient.Wechat.Work.UnitTests/ModelSamples/CgibinAdvancedFeature/CgibinAdvancedFeatureGetApplyIdListResponse.json new file mode 100644 index 00000000..073b1991 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Work.UnitTests/ModelSamples/CgibinAdvancedFeature/CgibinAdvancedFeatureGetApplyIdListResponse.json @@ -0,0 +1,10 @@ +{ + "errcode": 0, + "errmsg": "ok", + "next_cursor": "CURSOR", + "apply_id_list": [ + "APPLY_ID1", + "APPLY_ID2" + ], + "has_more": true +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Work.UnitTests/ModelSamples/CgibinAdvancedFeature/CgibinAdvancedFeatureGetApprovalInfoRequest.json b/test/SKIT.FlurlHttpClient.Wechat.Work.UnitTests/ModelSamples/CgibinAdvancedFeature/CgibinAdvancedFeatureGetApprovalInfoRequest.json new file mode 100644 index 00000000..8f622785 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Work.UnitTests/ModelSamples/CgibinAdvancedFeature/CgibinAdvancedFeatureGetApprovalInfoRequest.json @@ -0,0 +1,3 @@ +{ + "apply_id": "APPLY_ID" +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Work.UnitTests/ModelSamples/CgibinAdvancedFeature/CgibinAdvancedFeatureGetApprovalInfoResponse.json b/test/SKIT.FlurlHttpClient.Wechat.Work.UnitTests/ModelSamples/CgibinAdvancedFeature/CgibinAdvancedFeatureGetApprovalInfoResponse.json new file mode 100644 index 00000000..c66c7c1c --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Work.UnitTests/ModelSamples/CgibinAdvancedFeature/CgibinAdvancedFeatureGetApprovalInfoResponse.json @@ -0,0 +1,15 @@ +{ + "errcode": 0, + "errmsg": "ok", + "approval_info": { + "applicant": "USERID", + "create_time": 1715681559, + "business_type": 1, + "approval_id": "APPROVAL_ID", + "apply_id": "ApplyId", + "approval_url": "APPROVAL_URL", + "approval_status": 0, + "approval_type": 1, + "request_reason": "我有很多客户资料要管理,需要更多微盘空间" + } +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Work.UnitTests/ModelSamples/CgibinAdvancedFeature/CgibinAdvancedFeatureSetApprovalDetailRequest.json b/test/SKIT.FlurlHttpClient.Wechat.Work.UnitTests/ModelSamples/CgibinAdvancedFeature/CgibinAdvancedFeatureSetApprovalDetailRequest.json new file mode 100644 index 00000000..3b983fc5 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Work.UnitTests/ModelSamples/CgibinAdvancedFeature/CgibinAdvancedFeatureSetApprovalDetailRequest.json @@ -0,0 +1,24 @@ +{ + "approval_id": "APPROVALID", + "approval_status": 1, + "apply_id": "ApplyId", + "approval_url": "www.qq.com", + "process_list": { + "node_list": [ + { + "current_approvers": [ "LEADER1", "LEADER2" ], + "completed_approvers": [ "LEADER0" ], + "node_apv_status": 1, + "node_apv_rel": 1, + "apv_update_time": 1715741759 + }, + { + "current_approvers": [ "LEADER3", "LEADER4" ], + "completed_approvers": [ "LEADER5" ], + "node_apv_status": 1, + "node_apv_rel": 1, + "apv_update_time": 1715741759 + } + ] + } +}