mirror of
https://gitee.com/fudiwei/DotNetCore.SKIT.FlurlHttpClient.Wechat.git
synced 2025-09-19 01:58:14 +08:00
feat(work): 封装部分企业微信接口
This commit is contained in:
@@ -0,0 +1,98 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Flurl;
|
||||
using Flurl.Http;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work
|
||||
{
|
||||
public static class WechatWorkClientExecuteCgibinHealthExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /cgi-bin/health/get_health_report_stat 接口。</para>
|
||||
/// <para>REF: https://open.work.weixin.qq.com/api/doc/90000/90135/93676 </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.CgibinHealthGetHealthReportStatisticsResponse> ExecuteCgibinHealthGetHealthReportStatisticsAsync(this WechatWorkClient client, Models.CgibinHealthGetHealthReportStatisticsRequest 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(HttpMethod.Post, "cgi-bin", "health", "get_health_report_stat")
|
||||
.SetOptions(request)
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.CgibinHealthGetHealthReportStatisticsResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /cgi-bin/health/get_report_jobids 接口。</para>
|
||||
/// <para>REF: https://open.work.weixin.qq.com/api/doc/90000/90135/93677 </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.CgibinHealthGetReportJobIdsResponse> ExecuteCgibinHealthGetReportJobIdsAsync(this WechatWorkClient client, Models.CgibinHealthGetReportJobIdsRequest 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(HttpMethod.Post, "cgi-bin", "health", "get_report_jobids")
|
||||
.SetOptions(request)
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.CgibinHealthGetReportJobIdsResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /cgi-bin/health/get_report_job_info 接口。</para>
|
||||
/// <para>REF: https://open.work.weixin.qq.com/api/doc/90000/90135/93678 </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.CgibinHealthGetReportJobInfoResponse> ExecuteCgibinHealthGetReportJobInfoAsync(this WechatWorkClient client, Models.CgibinHealthGetReportJobInfoRequest 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(HttpMethod.Post, "cgi-bin", "health", "get_report_job_info")
|
||||
.SetOptions(request)
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.CgibinHealthGetReportJobInfoResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /cgi-bin/health/get_report_answer 接口。</para>
|
||||
/// <para>REF: https://open.work.weixin.qq.com/api/doc/90000/90135/93679 </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.CgibinHealthGetReportAnswerResponse> ExecuteCgibinHealthGetReportAnswerAsync(this WechatWorkClient client, Models.CgibinHealthGetReportAnswerRequest 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(HttpMethod.Post, "cgi-bin", "health", "get_report_answer")
|
||||
.SetOptions(request)
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.CgibinHealthGetReportAnswerResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
}
|
||||
}
|
@@ -98,6 +98,78 @@ namespace SKIT.FlurlHttpClient.Wechat.Work
|
||||
}
|
||||
|
||||
#region User
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [GET] /cgi-bin/school/user/get 接口。</para>
|
||||
/// <para>REF: https://open.work.weixin.qq.com/api/doc/90000/90135/92337 </para>
|
||||
/// <para>REF: https://open.work.weixin.qq.com/api/doc/90001/90143/92038 </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.CgibinSchoolUserGetResponse> ExecuteCgibinSchoolUserGetAsync(this WechatWorkClient client, Models.CgibinSchoolUserGetRequest 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(HttpMethod.Get, "cgi-bin", "school", "user", "get")
|
||||
.SetOptions(request)
|
||||
.SetQueryParam("access_token", request.AccessToken)
|
||||
.SetQueryParam("userid", request.StudentOrParentUserId);
|
||||
|
||||
return await client.SendRequestAsync<Models.CgibinSchoolUserGetResponse>(flurlReq, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [GET] /cgi-bin/school/user/list 接口。</para>
|
||||
/// <para>REF: https://open.work.weixin.qq.com/api/doc/90000/90135/92338 </para>
|
||||
/// <para>REF: https://open.work.weixin.qq.com/api/doc/90001/90143/92043 </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.CgibinSchoolUserListResponse> ExecuteCgibinSchoolUserListAsync(this WechatWorkClient client, Models.CgibinSchoolUserListRequest 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(HttpMethod.Get, "cgi-bin", "school", "user", "list")
|
||||
.SetOptions(request)
|
||||
.SetQueryParam("access_token", request.AccessToken)
|
||||
.SetQueryParam("department_id", request.DeparmentId);
|
||||
|
||||
if (request.RequireFetchChild.HasValue)
|
||||
flurlReq.SetQueryParam("fetch_child", request.RequireFetchChild.Value ? 1 : 0);
|
||||
|
||||
return await client.SendRequestAsync<Models.CgibinSchoolUserListResponse>(flurlReq, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [GET] /cgi-bin/school/user/list_parent 接口。</para>
|
||||
/// <para>REF: https://open.work.weixin.qq.com/api/doc/90000/90135/92446 </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.CgibinSchoolUserListParentResponse> ExecuteCgibinSchoolUserListParentAsync(this WechatWorkClient client, Models.CgibinSchoolUserListParentRequest 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(HttpMethod.Get, "cgi-bin", "school", "user", "list_parent")
|
||||
.SetOptions(request)
|
||||
.SetQueryParam("access_token", request.AccessToken)
|
||||
.SetQueryParam("department_id", request.DeparmentId);
|
||||
|
||||
return await client.SendRequestAsync<Models.CgibinSchoolUserListParentResponse>(flurlReq, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
#region UserStudent
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /cgi-bin/school/user/create_student 接口。</para>
|
||||
@@ -368,77 +440,71 @@ namespace SKIT.FlurlHttpClient.Wechat.Work
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region UserHealth
|
||||
/// <summary>
|
||||
/// <para>异步调用 [GET] /cgi-bin/school/user/get 接口。</para>
|
||||
/// <para>REF: https://open.work.weixin.qq.com/api/doc/90000/90135/92337 </para>
|
||||
/// <para>REF: https://open.work.weixin.qq.com/api/doc/90001/90143/92038 </para>
|
||||
/// <para>异步调用 [POST] /cgi-bin/school/user/get_teacher_customize_health_info 接口。</para>
|
||||
/// <para>REF: https://open.work.weixin.qq.com/api/doc/90000/90135/93744 </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.CgibinSchoolUserGetResponse> ExecuteCgibinSchoolUserGetAsync(this WechatWorkClient client, Models.CgibinSchoolUserGetRequest request, CancellationToken cancellationToken = default)
|
||||
public static async Task<Models.CgibinSchoolUserGetTeacherCustomizeHealthInfoResponse> ExecuteCgibinSchoolUserGetTeacherCustomizeHealthInfoAsync(this WechatWorkClient client, Models.CgibinSchoolUserGetTeacherCustomizeHealthInfoRequest 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(HttpMethod.Get, "cgi-bin", "school", "user", "get")
|
||||
.CreateRequest(HttpMethod.Post, "cgi-bin", "school", "user", "get_teacher_customize_health_info")
|
||||
.SetOptions(request)
|
||||
.SetQueryParam("access_token", request.AccessToken)
|
||||
.SetQueryParam("userid", request.StudentOrParentUserId);
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestAsync<Models.CgibinSchoolUserGetResponse>(flurlReq, cancellationToken: cancellationToken);
|
||||
return await client.SendRequestWithJsonAsync<Models.CgibinSchoolUserGetTeacherCustomizeHealthInfoResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [GET] /cgi-bin/school/user/list 接口。</para>
|
||||
/// <para>REF: https://open.work.weixin.qq.com/api/doc/90000/90135/92338 </para>
|
||||
/// <para>REF: https://open.work.weixin.qq.com/api/doc/90001/90143/92043 </para>
|
||||
/// <para>异步调用 [POST] /cgi-bin/school/user/get_student_customize_health_info 接口。</para>
|
||||
/// <para>REF: https://open.work.weixin.qq.com/api/doc/90000/90135/93745 </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.CgibinSchoolUserListResponse> ExecuteCgibinSchoolUserListAsync(this WechatWorkClient client, Models.CgibinSchoolUserListRequest request, CancellationToken cancellationToken = default)
|
||||
public static async Task<Models.CgibinSchoolUserGetStudentCustomizeHealthInfoResponse> ExecuteCgibinSchoolUserGetStudentCustomizeHealthInfoAsync(this WechatWorkClient client, Models.CgibinSchoolUserGetStudentCustomizeHealthInfoRequest 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(HttpMethod.Get, "cgi-bin", "school", "user", "list")
|
||||
.CreateRequest(HttpMethod.Post, "cgi-bin", "school", "user", "get_student_customize_health_info")
|
||||
.SetOptions(request)
|
||||
.SetQueryParam("access_token", request.AccessToken)
|
||||
.SetQueryParam("department_id", request.DeparmentId);
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
if (request.RequireFetchChild.HasValue)
|
||||
flurlReq.SetQueryParam("fetch_child", request.RequireFetchChild.Value ? 1 : 0);
|
||||
|
||||
return await client.SendRequestAsync<Models.CgibinSchoolUserListResponse>(flurlReq, cancellationToken: cancellationToken);
|
||||
return await client.SendRequestWithJsonAsync<Models.CgibinSchoolUserGetStudentCustomizeHealthInfoResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [GET] /cgi-bin/school/user/list_parent 接口。</para>
|
||||
/// <para>REF: https://open.work.weixin.qq.com/api/doc/90000/90135/92446 </para>
|
||||
/// <para>异步调用 [POST] /cgi-bin/school/user/get_health_qrcode 接口。</para>
|
||||
/// <para>REF: https://open.work.weixin.qq.com/api/doc/90000/90135/93746 </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.CgibinSchoolUserListParentResponse> ExecuteCgibinSchoolUserListParentAsync(this WechatWorkClient client, Models.CgibinSchoolUserListParentRequest request, CancellationToken cancellationToken = default)
|
||||
public static async Task<Models.CgibinSchoolUserGetHealthQrcodeResponse> ExecuteCgibinSchoolUserGetHealthQrcodeAsync(this WechatWorkClient client, Models.CgibinSchoolUserGetHealthQrcodeRequest 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(HttpMethod.Get, "cgi-bin", "school", "user", "list_parent")
|
||||
.CreateRequest(HttpMethod.Post, "cgi-bin", "school", "user", "get_health_qrcode")
|
||||
.SetOptions(request)
|
||||
.SetQueryParam("access_token", request.AccessToken)
|
||||
.SetQueryParam("department_id", request.DeparmentId);
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestAsync<Models.CgibinSchoolUserListParentResponse>(flurlReq, cancellationToken: cancellationToken);
|
||||
return await client.SendRequestWithJsonAsync<Models.CgibinSchoolUserGetHealthQrcodeResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
#region Department
|
||||
/// <summary>
|
||||
|
@@ -265,6 +265,28 @@ namespace SKIT.FlurlHttpClient.Wechat.Work
|
||||
return await client.SendRequestWithJsonAsync<Models.CgibinUserGetUserIdResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /cgi-bin/user/get_active_stat 接口。</para>
|
||||
/// <para>REF: https://open.work.weixin.qq.com/api/doc/90000/90135/92714 </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.CgibinUserGetActiveStatResponse> ExecuteCgibinUserGetActiveStatAsync(this WechatWorkClient client, Models.CgibinUserGetActiveStatRequest 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(HttpMethod.Post, "cgi-bin", "user", "get_active_stat")
|
||||
.SetOptions(request)
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.CgibinUserGetActiveStatResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
#region Auth
|
||||
/// <summary>
|
||||
/// <para>异步调用 [GET] /cgi-bin/user/authsucc 接口。</para>
|
||||
/// <para>REF: https://open.work.weixin.qq.com/api/doc/90000/90135/90203 </para>
|
||||
@@ -289,24 +311,53 @@ namespace SKIT.FlurlHttpClient.Wechat.Work
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /cgi-bin/user/get_active_stat 接口。</para>
|
||||
/// <para>REF: https://open.work.weixin.qq.com/api/doc/90000/90135/92714 </para>
|
||||
/// <para>异步调用 [GET] /cgi-bin/user/list_member_auth 接口。</para>
|
||||
/// <para>REF: https://open.work.weixin.qq.com/api/doc/90001/90143/94513 </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.CgibinUserGetActiveStatResponse> ExecuteCgibinUserGetActiveStatAsync(this WechatWorkClient client, Models.CgibinUserGetActiveStatRequest request, CancellationToken cancellationToken = default)
|
||||
public static async Task<Models.CgibinUserListMemberAuthResponse> ExecuteCgibinUserListMemberAuthAsync(this WechatWorkClient client, Models.CgibinUserListMemberAuthRequest 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(HttpMethod.Post, "cgi-bin", "user", "get_active_stat")
|
||||
.CreateRequest(HttpMethod.Get, "cgi-bin", "user", "list_member_auth")
|
||||
.SetOptions(request)
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.CgibinUserGetActiveStatResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
if (!string.IsNullOrEmpty(request.NextCursor))
|
||||
flurlReq.SetQueryParam("cursor", request.NextCursor);
|
||||
|
||||
if (request.Limit.HasValue)
|
||||
flurlReq.SetQueryParam("limit", request.Limit);
|
||||
|
||||
return await client.SendRequestAsync<Models.CgibinUserListMemberAuthResponse>(flurlReq, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [GET] /cgi-bin/user/check_member_auth 接口。</para>
|
||||
/// <para>REF: https://open.work.weixin.qq.com/api/doc/90001/90143/94514 </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.CgibinUserCheckMemberAuthResponse> ExecuteCgibinUserCheckMemberAuthAsync(this WechatWorkClient client, Models.CgibinUserCheckMemberAuthRequest 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(HttpMethod.Get, "cgi-bin", "user", "check_member_auth")
|
||||
.SetOptions(request)
|
||||
.SetQueryParam("access_token", request.AccessToken)
|
||||
.SetQueryParam("open_userid", request.OpenUserId);
|
||||
|
||||
return await client.SendRequestAsync<Models.CgibinUserCheckMemberAuthResponse>(flurlReq, cancellationToken: cancellationToken);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
@@ -4,7 +4,7 @@ using System.Collections.Generic;
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/gettoken 接口的请求。</para>
|
||||
/// <para>表示 [POST] /cgi-bin/dial/get_dial_record 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class CgibinDialogGetDialogRecordRequest : WechatWorkRequest
|
||||
{
|
||||
|
@@ -4,7 +4,7 @@ using System.Collections.Generic;
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/gettoken 接口的响应。</para>
|
||||
/// <para>表示 [POST] /cgi-bin/dial/get_dial_record 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class CgibinDialogGetDialogRecordResponse : WechatWorkResponse
|
||||
{
|
||||
|
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/health/get_health_report_stat 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class CgibinHealthGetHealthReportStatisticsRequest : WechatWorkRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置指定查询的日期字符串(格式:yyyy-MM-dd)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("date")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("date")]
|
||||
public string DateString { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
@@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/health/get_health_report_stat 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class CgibinHealthGetHealthReportStatisticsResponse : WechatWorkResponse
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置应用使用次数。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("pv")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("pv")]
|
||||
public int PV { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置应用使用人数。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("uv")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("uv")]
|
||||
public int UV { get; set; }
|
||||
}
|
||||
}
|
@@ -0,0 +1,39 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/health/get_report_answer 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class CgibinHealthGetReportAnswerRequest : WechatWorkRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置任务 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("jobid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("jobid")]
|
||||
public string ReportJobId { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置任务日期字符串(格式:yyyy-MM-dd)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("date")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("date")]
|
||||
public string DateString { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置分页起始位置。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("offset")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("offset")]
|
||||
public int? Offset { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置分页每页数量。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("limit")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("limit")]
|
||||
public int? Limit { get; set; }
|
||||
}
|
||||
}
|
@@ -0,0 +1,100 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/health/get_report_answer 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class CgibinHealthGetReportAnswerResponse : WechatWorkResponse
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Answer
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class ReportValue
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置问题 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("question_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("question_id")]
|
||||
public int QuestionId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置单选题答案编号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("single_choice")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("single_choice")]
|
||||
public int? SignleChoice { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置单选题答案编号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("multi_choice")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("multi_choice")]
|
||||
public int[]? MultipleChoice { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置填空题答案内容。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("text")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("text")]
|
||||
public string? Text { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置文件 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("fileid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("fileid")]
|
||||
public string[]? FileIdList { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置 ID 类型。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("id_type")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("id_type")]
|
||||
public int IdType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置填写人成员账号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("userid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("userid")]
|
||||
public string? UserId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置填写人学生账号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("student_userid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("student_userid")]
|
||||
public string? StudentUserId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置填写人家长账号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("parent_userid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("parent_userid")]
|
||||
public string? ParentUserId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置填写答案列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("report_values")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("report_values")]
|
||||
public Types.ReportValue[] ReportValueList { get; set; } = default!;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置答案列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("answers")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("answers")]
|
||||
public Types.Answer[] AnswerList { get; set; } = default!;
|
||||
}
|
||||
}
|
@@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/health/get_report_jobids 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class CgibinHealthGetReportJobIdsRequest : WechatWorkRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置分页起始位置。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("offset")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("offset")]
|
||||
public int? Offset { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置分页每页数量。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("limit")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("limit")]
|
||||
public int? Limit { get; set; }
|
||||
}
|
||||
}
|
@@ -0,0 +1,27 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/health/get_report_jobids 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class CgibinHealthGetReportJobIdsResponse : WechatWorkResponse
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置任务 ID 列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("jobids")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("jobids")]
|
||||
public string[] ReportJobIdList { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置翻页是否结束。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("ending")]
|
||||
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.NumberTypedBooleanConverter))]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("ending")]
|
||||
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumberTypedBooleanConverter))]
|
||||
public bool IsEnding { get; set; }
|
||||
}
|
||||
}
|
@@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/health/get_report_job_info 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class CgibinHealthGetReportJobInfoRequest : WechatWorkRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置任务 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("jobid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("jobid")]
|
||||
public string ReportJobId { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置任务日期字符串(格式:yyyy-MM-dd)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("date")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("date")]
|
||||
public string DateString { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
@@ -0,0 +1,179 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/health/get_report_job_info 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class CgibinHealthGetReportJobInfoResponse : WechatWorkResponse
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class ReportJob
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class ReportRange
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置用户 UserId 列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("userids")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("userids")]
|
||||
public string[]? UserIdList { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置部门 ID 列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("partyids")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("partyids")]
|
||||
public int[]? DepartmentIdList { get; set; }
|
||||
}
|
||||
|
||||
public class ReportTo
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置用户 UserId 列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("userids")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("userids")]
|
||||
public string[]? UserIdList { get; set; }
|
||||
}
|
||||
|
||||
public class QuestionTemplate
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Option
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置选项 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("option_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("option_id")]
|
||||
public int OptionId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置选项文本。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("option_text")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("option_text")]
|
||||
public string Text { get; set; } = default!;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置问题 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("question_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("question_id")]
|
||||
public int QuestionId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置问题标题。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("title")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("title")]
|
||||
public string Title { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置问题类型。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("question_type")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("question_type")]
|
||||
public int Type { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置是否必填。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("is_required")]
|
||||
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.NumberTypedBooleanConverter))]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("is_required")]
|
||||
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumberTypedBooleanConverter))]
|
||||
public bool IsRequired { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置选项列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("option_list")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("option_list")]
|
||||
public Types.Option[]? OptionList { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置任务名称。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("title")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("title")]
|
||||
public string Title { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置发起人成员账号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("creator")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("creator")]
|
||||
public string CreatorUserId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置 ID 类型。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("type")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("type")]
|
||||
public int IdType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置已完成上报人数。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("finish_cnt")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("finish_cnt")]
|
||||
public int FinishCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置上报方式。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("report_type")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("report_type")]
|
||||
public int ReportType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置上报范围信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("apply_range")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("apply_range")]
|
||||
public Types.ReportRange ReportRange { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置汇报对象信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("report_to")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("report_to")]
|
||||
public Types.ReportTo ReportTo { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置非工作日是否需要上报。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("skip_weekend")]
|
||||
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.NumberTypedBooleanConverter))]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("skip_weekend")]
|
||||
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumberTypedBooleanConverter))]
|
||||
public bool IsSkipWeekend { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置上报问题列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("question_templates")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("question_templates")]
|
||||
public Types.QuestionTemplate[] QuestionTemplateList { get; set; } = default!;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置任务信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("job_info")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("job_info")]
|
||||
public Types.ReportJob ReportJob { get; set; } = default!;
|
||||
}
|
||||
}
|
@@ -47,6 +47,20 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
[System.Text.Json.Serialization.JsonPropertyName("is_mic")]
|
||||
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumberTypedBooleanConverter))]
|
||||
public bool IsMic { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置邀请人的成员账号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("invitor_userid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("invitor_userid")]
|
||||
public string? InvitorUserId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置邀请人的外部联系人账号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("invitor_external_userid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("invitor_external_userid")]
|
||||
public string? InvitorExternalUserId { get; set; }
|
||||
}
|
||||
|
||||
public class ExternalUser
|
||||
@@ -96,6 +110,20 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
[System.Text.Json.Serialization.JsonPropertyName("is_mic")]
|
||||
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumberTypedBooleanConverter))]
|
||||
public bool IsMic { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置邀请人的成员账号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("invitor_userid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("invitor_userid")]
|
||||
public string? InvitorUserId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置邀请人的外部联系人账号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("invitor_external_userid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("invitor_external_userid")]
|
||||
public string? InvitorExternalUserId { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -367,6 +367,50 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
[System.Text.Json.Serialization.JsonPropertyName("btn")]
|
||||
public IList<Types.Button> ButtonList { get; set; } = new List<Types.Button>();
|
||||
}
|
||||
|
||||
public class TemplateMessage
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class KeyValue
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置消息内容的 Key。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("key")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("key")]
|
||||
public string Key { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置消息内容的值。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("value")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("value")]
|
||||
public string Value { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置模板 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("template_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("template_id")]
|
||||
public string TemplateId { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置点击模板消息后的跳转链接。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("url")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("url")]
|
||||
public string Url { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置消息内容键值对。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("content_item")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("content_item")]
|
||||
public IList<Types.KeyValue> ContentItemList { get; set; } = new List<Types.KeyValue>();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -480,6 +524,13 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
[System.Text.Json.Serialization.JsonPropertyName("interactive_taskcard")]
|
||||
public Types.TaskCardMessage? MessageContentForTaskCard { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置模板消息信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("template_msg")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("template_msg")]
|
||||
public Types.TemplateMessage? MessageContentForTemplate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置应用 ID。如果不指定将使用构造 <see cref="WechatWorkClient"/> 时的 <see cref="WechatWorkClientOptions.AgentId"/> 参数。
|
||||
/// </summary>
|
||||
@@ -487,6 +538,13 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
[System.Text.Json.Serialization.JsonPropertyName("agentid")]
|
||||
public int? AgentId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置用户选择凭证列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("selected_ticket_list")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("selected_ticket_list")]
|
||||
public IList<string>? SelectedTicketList { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置是否是保密消息。
|
||||
/// </summary>
|
||||
|
@@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/school/user/get_health_qrcode 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class CgibinSchoolUserGetHealthQrcodeRequest : WechatWorkRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置 ID 类型。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("type")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("type")]
|
||||
public int IdType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置用户 UserId 列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("userids")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("userids")]
|
||||
public IList<string> UserIdList { get; set; } = new List<string>();
|
||||
}
|
||||
}
|
@@ -0,0 +1,52 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/school/user/get_health_qrcode 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class CgibinSchoolUserGetHealthQrcodeResponse : WechatWorkResponse
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Result
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置错误码。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("errcode")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("errcode")]
|
||||
public int ErrorCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置错误信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("errmsg")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("errmsg")]
|
||||
public string? ErrorMessage { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置用户 UserId。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("userid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("userid")]
|
||||
public string UserId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置二维码数据。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("qrcode_data")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("qrcode_data")]
|
||||
public string? QrcodeData { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置健康码结果列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("result_list")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("result_list")]
|
||||
public Types.Result[] ResultList { get; set; } = default!;
|
||||
}
|
||||
}
|
@@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/school/user/get_student_customize_health_info 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class CgibinSchoolUserGetStudentCustomizeHealthInfoRequest : CgibinSchoolUserGetTeacherCustomizeHealthInfoRequest
|
||||
{
|
||||
}
|
||||
}
|
@@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/school/user/get_student_customize_health_info 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class CgibinSchoolUserGetStudentCustomizeHealthInfoResponse : CgibinSchoolUserGetTeacherCustomizeHealthInfoResponse
|
||||
{
|
||||
}
|
||||
}
|
@@ -0,0 +1,32 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/school/user/get_teacher_customize_health_info 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class CgibinSchoolUserGetTeacherCustomizeHealthInfoRequest : WechatWorkRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置指定查询的日期字符串(格式:yyyy-MM-dd)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("date")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("date")]
|
||||
public string DateString { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置翻页标记。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("next_key")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("next_key")]
|
||||
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,180 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/school/user/get_teacher_customize_health_info 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class CgibinSchoolUserGetTeacherCustomizeHealthInfoResponse : WechatWorkResponse
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class HealthInfo
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class ReportValue
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置问题 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("question_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("question_id")]
|
||||
public int QuestionId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置单选题答案编号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("single_chose")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("single_chose")]
|
||||
public int? SignleChoice { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置填空题答案内容。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("text")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("text")]
|
||||
public string? Text { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置用户 UserId。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("userid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("userid")]
|
||||
public string UserId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置健康码状态。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("health_qrcode_status")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("health_qrcode_status")]
|
||||
public int HealthQrcodeStatus { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置健康状态是否为本人填写。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("self_submit")]
|
||||
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.NumberTypedBooleanConverter))]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("self_submit")]
|
||||
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumberTypedBooleanConverter))]
|
||||
public bool IsSelfSubmit { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置填写答案列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("report_values")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("report_values")]
|
||||
public Types.ReportValue[] ReportValueList { get; set; } = default!;
|
||||
}
|
||||
|
||||
public class QuestionTemplate
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Option
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置选项 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("option_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("option_id")]
|
||||
public int OptionId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置选项文本。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("option_text")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("option_text")]
|
||||
public string Text { get; set; } = default!;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置问题 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("question_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("question_id")]
|
||||
public int QuestionId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置问题标题。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("title")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("title")]
|
||||
public string Title { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置问题类型。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("question_type")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("question_type")]
|
||||
public int Type { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置是否必填。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("is_must_fill")]
|
||||
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.NumberTypedBooleanConverter))]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("is_must_fill")]
|
||||
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumberTypedBooleanConverter))]
|
||||
public bool IsRequired { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置是否隐藏。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("is_not_display")]
|
||||
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.NumberTypedBooleanConverter))]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("is_not_display")]
|
||||
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumberTypedBooleanConverter))]
|
||||
public bool IsHidden { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置选项列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("option_list")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("option_list")]
|
||||
public Types.Option[]? OptionList { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置自定义问题模板 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("template_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("template_id")]
|
||||
public string TemplateId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置自定义问题列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("question_templates")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("question_templates")]
|
||||
public Types.QuestionTemplate[] QuestionTemplateList { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置健康信息列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("health_infos")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("health_infos")]
|
||||
public Types.HealthInfo[] HealthInfoList { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置翻页是否结束。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("ending")]
|
||||
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.NumberTypedBooleanConverter))]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("ending")]
|
||||
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumberTypedBooleanConverter))]
|
||||
public bool IsEnding { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置翻页标记。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("next_key")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("next_key")]
|
||||
public string? NextCursor { get; set; }
|
||||
}
|
||||
}
|
@@ -220,6 +220,13 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
[System.Text.Json.Serialization.JsonPropertyName("appid")]
|
||||
public int? AppId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置授权模式。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("auth_mode")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("auth_mode")]
|
||||
public int AuthMode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置应用权限信息。
|
||||
/// </summary>
|
||||
|
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [GET] /cgi-bin/user/check_member_auth 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class CgibinUserCheckMemberAuthRequest : WechatWorkRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置第三方成员唯一标识。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public string OpenUserId { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [GET] /cgi-bin/user/check_member_auth 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class CgibinUserCheckMemberAuthResponse : WechatWorkResponse
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置成员是否已授权。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("is_member_auth")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("is_member_auth")]
|
||||
public bool IsMemberAuth { get; set; }
|
||||
}
|
||||
}
|
@@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [GET] /cgi-bin/user/list_member_auth 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class CgibinUserListMemberAuthRequest : WechatWorkRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置翻页标记。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public string? NextCursor { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置分页每页数量。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public int? Limit { get; set; }
|
||||
}
|
||||
}
|
@@ -0,0 +1,38 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [GET] /cgi-bin/user/list_member_auth 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class CgibinUserListMemberAuthResponse : WechatWorkResponse
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class MemberAuth
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置第三方成员唯一标识。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("open_userid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("open_userid")]
|
||||
public string OepnUserId { get; set; } = default!;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置成员授权列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("member_auth_list")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("member_auth_list")]
|
||||
public Types.MemberAuth[] MemberAuthList { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置翻页标记。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("next_cursor")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("next_cursor")]
|
||||
public string? NextCursor { get; set; }
|
||||
}
|
||||
}
|
@@ -261,7 +261,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("order")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("order")]
|
||||
public int[] DepartmentOrderList { get; set; } = default!;
|
||||
public int[]? DepartmentOrderList { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置部门领导状态列表。
|
||||
|
Reference in New Issue
Block a user