mirror of
https://gitee.com/fudiwei/DotNetCore.SKIT.FlurlHttpClient.Wechat.git
synced 2025-12-31 02:44:43 +08:00
feat(work): 新增智慧硬件开发设备管理相关 API 封装
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/hardware/get_device_feature 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class CgibinHardwareGetDeviceFeatureRequest : WechatWorkRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置服务商 AccessToken。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public override string? AccessToken { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置设备序列号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("device_sn")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("device_sn")]
|
||||
public string DeviceSerialNumber { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/hardware/get_device_feature 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class CgibinHardwareGetDeviceFeatureResponse : WechatWorkResponse
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置设备反馈的自定义标识串。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("device_feature")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("device_feature")]
|
||||
public string DeviceFeature { get; set; } = default!;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/service/add_device 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class CgibinServiceAddDeviceRequest : WechatWorkRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置服务商 AccessToken。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public override string? AccessToken { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置设备型号 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("model_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("model_id")]
|
||||
public string ModelId { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置设备序列号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("device_sn")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("device_sn")]
|
||||
public string DeviceSerialNumber { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置备注名称。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("remark_name")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("remark_name")]
|
||||
public string? RemarkName { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/service/add_device 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class CgibinServiceAddDeviceResponse : WechatWorkResponse
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Device
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置设备型号 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("model_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("model_id")]
|
||||
public string ModelId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置设备 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("device_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("device_id")]
|
||||
public long DeviceId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置设备序列号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("device_sn")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("device_sn")]
|
||||
public string DeviceSerialNumber { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置设备密钥。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("secret_no")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("secret_no")]
|
||||
public string? SecretNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置设备二维码数据。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("qr_code")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("qr_code")]
|
||||
public string? QrcodeData { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置创建时间戳。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("create_time")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("create_time")]
|
||||
public long CreateTimestamp { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置设备信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("device_info")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("device_info")]
|
||||
public Types.Device Device { get; set; } = default!;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/service/del_device 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class CgibinServiceDeleteDeviceRequest : WechatWorkRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置服务商 AccessToken。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public override string? AccessToken { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置设备序列号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("device_sn")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("device_sn")]
|
||||
public string DeviceSerialNumber { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/service/del_device 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class CgibinServiceDeleteDeviceResponse : WechatWorkResponse
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/service/fetch_device_log 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class CgibinServiceFetchDeviceLogRequest : WechatWorkRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置服务商 AccessToken。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public override string? AccessToken { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置设备序列号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("device_sn")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("device_sn")]
|
||||
public string DeviceSerialNumber { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置提示参数。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("hint")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("hint")]
|
||||
public string? Hint { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/service/fetch_device_log 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class CgibinServiceFetchDeviceLogResponse : WechatWorkResponse
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/service/get_device_auth_info 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class CgibinServiceGetDeviceAuthInfoRequest : WechatWorkRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置服务商 AccessToken。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public override string? AccessToken { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置设备序列号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("device_sn")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("device_sn")]
|
||||
public string DeviceSerialNumber { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/service/get_device_auth_info 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class CgibinServiceGetDeviceAuthInfoResponse : WechatWorkResponse
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class AuthorizerCorp : CgibinServiceGetAuthInfoResponse.Types.DealerCorp
|
||||
{
|
||||
}
|
||||
|
||||
public class Device
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置设备型号 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("model_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("model_id")]
|
||||
public string ModelId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置备注名称。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("remark_name")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("remark_name")]
|
||||
public string? RemarkName { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置授权方企业信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("auth_corp_info")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("auth_corp_info")]
|
||||
public Types.AuthorizerCorp AuthorizerCorp { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置设备信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("device_info")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("device_info")]
|
||||
public Types.Device Device { get; set; } = default!;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/service/list_device 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class CgibinServiceListDeviceRequest : WechatWorkRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置服务商 AccessToken。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public override string? AccessToken { 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,38 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/service/list_device 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class CgibinServiceListDeviceResponse : WechatWorkResponse
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Device
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置设备型号 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("model_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("model_id")]
|
||||
public string ModelId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置设备序列号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("device_sn")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("device_sn")]
|
||||
public string DeviceSerialNumber { get; set; } = default!;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置设备列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("device_list")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("device_list")]
|
||||
public Types.Device[] DeviceList { get; set; } = default!;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/service/reset_secret_no 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class CgibinServiceResetSecretNumberRequest : WechatWorkRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置服务商 AccessToken。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public override string? AccessToken { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置设备序列号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("device_sn")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("device_sn")]
|
||||
public string DeviceSerialNumber { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/service/reset_secret_no 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class CgibinServiceResetSecretNumberResponse : WechatWorkResponse
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/service/set_printer_support_state 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class CgibinServiceSetPrinterSupportStateRequest : WechatWorkRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置服务商 AccessToken。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public override string? AccessToken { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置设备序列号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("device_sn")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("device_sn")]
|
||||
public string DeviceSerialNumber { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置是否不支持打印机。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("not_supported_printer")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("not_supported_printer")]
|
||||
public bool IsUnsupportedPrinter { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/service/set_printer_support_state 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class CgibinServiceSetPrinterSupportStateResponse : WechatWorkResponse
|
||||
{
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user