mirror of
https://gitee.com/fudiwei/DotNetCore.SKIT.FlurlHttpClient.Wechat.git
synced 2025-04-05 17:37:54 +08:00
feat(wxapi): 随官方更新内容安全相关字段
This commit is contained in:
parent
e28178efb9
commit
2e2bb4a928
@ -6,10 +6,71 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Events
|
||||
/// <summary>
|
||||
/// <para>表示 EVENT.wxa_media_check 事件的数据。</para>
|
||||
/// <para>https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/sec-check/security.mediaCheckAsync.html </para>
|
||||
/// <para>https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/sec-check/security.mediaCheckAsync-v1.html </para>
|
||||
/// <para>https://developers.weixin.qq.com/minigame/dev/api-backend/open-api/sec-check/security.mediaCheckAsync.html </para>
|
||||
/// <para>https://developers.weixin.qq.com/minigame/dev/api-backend/open-api/sec-check/security.mediaCheckAsync-v1.html </para>
|
||||
/// </summary>
|
||||
public class WxaMediaCheckEvent : WechatApiEvent, WechatApiEvent.Types.IJsonSerializable
|
||||
{
|
||||
public new static class Types
|
||||
{
|
||||
public class Result
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置建议类型。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("suggest")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("suggest")]
|
||||
public string SuggestType { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置命中标签枚举值。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("label")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("label")]
|
||||
public int Label { get; set; }
|
||||
}
|
||||
|
||||
public class Detail
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置错误码。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("errcode")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("errcode")]
|
||||
public int ErrorCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置策略类型。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("strategy")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("strategy")]
|
||||
public string Strategy { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置建议类型。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("suggest")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("suggest")]
|
||||
public string? SuggestType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置命中标签枚举值。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("label")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("label")]
|
||||
public int? Label { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置置信度。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("prob")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("prob")]
|
||||
public int? Probability { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置微信商户号。
|
||||
/// </summary>
|
||||
@ -45,5 +106,26 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Events
|
||||
[Newtonsoft.Json.JsonProperty("status_code")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("status_code")]
|
||||
public int StatusCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置版本号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("version")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("version")]
|
||||
public int? Version { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置综合结果信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("result")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("result")]
|
||||
public Types.Result? Result { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置详细结果列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("detail")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("detail")]
|
||||
public Types.Detail[]? DetailList { get; set; }
|
||||
}
|
||||
}
|
||||
|
@ -344,7 +344,9 @@ namespace SKIT.FlurlHttpClient.Wechat.Api
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /wxa/media_check_async 接口。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/sec-check/security.mediaCheckAsync.html </para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/sec-check/security.mediaCheckAsync-v1.html </para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/minigame/dev/api-backend/open-api/sec-check/security.mediaCheckAsync.html </para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/minigame/dev/api-backend/open-api/sec-check/security.mediaCheckAsync-v1.html </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
@ -365,7 +367,9 @@ namespace SKIT.FlurlHttpClient.Wechat.Api
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /wxa/msg_sec_check 接口。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/sec-check/security.msgSecCheck.html </para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/sec-check/security.msgSecCheck-v1.html </para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/minigame/dev/api-backend/open-api/sec-check/security.msgSecCheck.html </para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/minigame/dev/api-backend/open-api/sec-check/security.msgSecCheck-v1.html </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
|
@ -21,5 +21,26 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
[Newtonsoft.Json.JsonProperty("media_type")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("media_type")]
|
||||
public int MediaType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置版本号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("version")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("version")]
|
||||
public int? Version { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置场景值。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("scene")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("scene")]
|
||||
public int? Scene { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置用户的 OpenId。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("openid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("openid")]
|
||||
public string? OpenId { get; set; }
|
||||
}
|
||||
}
|
||||
|
@ -8,11 +8,53 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
/// </summary>
|
||||
public class WxaMessageSecurityCheckRequest : WechatApiRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置用户昵称。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("nickname")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("nickname")]
|
||||
public string? Nickname { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置用户个性签名。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("signature")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("signature")]
|
||||
public string? Signature { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置文本标题。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("title")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("title")]
|
||||
public string? Title { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置文本内容。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("content")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("content")]
|
||||
public string Content { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置版本号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("version")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("version")]
|
||||
public int? Version { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置场景值。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("scene")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("scene")]
|
||||
public int? Scene { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置用户的 OpenId。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("openid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("openid")]
|
||||
public string? OpenId { get; set; }
|
||||
}
|
||||
}
|
||||
|
@ -8,5 +8,97 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
/// </summary>
|
||||
public class WxaMessageSecurityCheckResponse : WechatApiResponse
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Result
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置建议类型。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("suggest")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("suggest")]
|
||||
public string SuggestType { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置命中标签枚举值。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("label")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("label")]
|
||||
public int Label { get; set; }
|
||||
}
|
||||
|
||||
public class Detail
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置错误码。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("errcode")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("errcode")]
|
||||
public int ErrorCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置策略类型。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("strategy")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("strategy")]
|
||||
public string Strategy { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置建议类型。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("suggest")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("suggest")]
|
||||
public string? SuggestType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置命中标签枚举值。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("label")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("label")]
|
||||
public int? Label { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置级别。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("level")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("level")]
|
||||
public int? Level { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置置信度。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("prob")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("prob")]
|
||||
public int? Probability { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置命中的自定义关键词。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("keyword")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("keyword")]
|
||||
public string? Keyword { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置任务 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("trace_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("trace_id")]
|
||||
public string TraceId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置综合结果信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("result")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("result")]
|
||||
public Types.Result? Result { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置详细结果列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("detail")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("detail")]
|
||||
public Types.Detail[]? DetailList { get; set; }
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user