From d6794bbb5f4760c72ee04842482be087fa650969 Mon Sep 17 00:00:00 2001 From: Fu Diwei Date: Mon, 21 Nov 2022 18:29:27 +0800 Subject: [PATCH] =?UTF-8?q?feat(wxapi):=20=E9=9A=8F=E5=AE=98=E6=96=B9?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=AC=AC=E4=B8=89=E6=96=B9=E5=B9=B3=E5=8F=B0?= =?UTF-8?q?=E8=8E=B7=E5=8F=96=E6=8E=88=E6=9D=83=E5=B8=90=E5=8F=B7=E8=AF=A6?= =?UTF-8?q?=E6=83=85=E6=8E=A5=E5=8F=A3=E6=A8=A1=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...inComponentApiGetAuthorizerInfoResponse.cs | 84 +++++++++++++++++-- .../CgibinComponentApiQueryAuthResponse.cs | 27 +++++- 2 files changed, 99 insertions(+), 12 deletions(-) diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComponent/CgibinComponentApiGetAuthorizerInfoResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComponent/CgibinComponentApiGetAuthorizerInfoResponse.cs index a4260ff3..ebb49064 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComponent/CgibinComponentApiGetAuthorizerInfoResponse.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComponent/CgibinComponentApiGetAuthorizerInfoResponse.cs @@ -1,4 +1,4 @@ -namespace SKIT.FlurlHttpClient.Wechat.Api.Models +namespace SKIT.FlurlHttpClient.Wechat.Api.Models { /// /// 表示 [POST] /cgi-bin/component/api_get_authorizer_info 接口的响应。 @@ -19,6 +19,13 @@ [Newtonsoft.Json.JsonProperty("id")] [System.Text.Json.Serialization.JsonPropertyName("id")] public int Id { get; set; } + + /// + /// 获取或设置类型名称。 + /// + [Newtonsoft.Json.JsonProperty("name")] + [System.Text.Json.Serialization.JsonPropertyName("name")] + public string? Name { get; set; } } public class VerifyType : ServiceType @@ -161,6 +168,23 @@ [System.Text.Json.Serialization.JsonPropertyName("visit_status")] public int VisitStatus { get; set; } } + + public class BasicConfiguration + { + /// + /// 获取或设置是否已经绑定手机号。 + /// + [Newtonsoft.Json.JsonProperty("is_phone_configured")] + [System.Text.Json.Serialization.JsonPropertyName("is_phone_configured")] + public bool IsPhoneConfigured { get; set; } + + /// + /// 获取或设置是否已经绑定邮箱。 + /// + [Newtonsoft.Json.JsonProperty("is_email_configured")] + [System.Text.Json.Serialization.JsonPropertyName("is_email_configured")] + public bool IsEmailConfigured { get; set; } + } } /// @@ -219,6 +243,13 @@ [System.Text.Json.Serialization.JsonPropertyName("signature")] public string? Signature { get; set; } + /// + /// 获取或设置二维码图片 URL。 + /// + [Newtonsoft.Json.JsonProperty("qrcode_url")] + [System.Text.Json.Serialization.JsonPropertyName("qrcode_url")] + public string? QrcodeUrl { get; set; } + /// /// 获取或设置功能信息。 /// @@ -227,18 +258,32 @@ public Types.Business Business { get; set; } = default!; /// - /// 获取或设置二维码图片 URL。 - /// - [Newtonsoft.Json.JsonProperty("qrcode_url")] - [System.Text.Json.Serialization.JsonPropertyName("qrcode_url")] - public string QrcodeUrl { get; set; } = default!; - - /// - /// 获取或设置小程序配置信息。 + /// 获取或设置小程序信息。 /// [Newtonsoft.Json.JsonProperty("MiniProgramInfo")] [System.Text.Json.Serialization.JsonPropertyName("MiniProgramInfo")] public Types.MiniProgram? MiniProgram { get; set; } + + /// + /// 获取或设置账号状态。 + /// + [Newtonsoft.Json.JsonProperty("account_status")] + [System.Text.Json.Serialization.JsonPropertyName("account_status")] + public int AccountStatus { get; set; } + + /// + /// 获取或设置注册方式。 + /// + [Newtonsoft.Json.JsonProperty("register_type")] + [System.Text.Json.Serialization.JsonPropertyName("register_type")] + public int? RegisterType { get; set; } + + /// + /// 获取或设置基础配置信息。 + /// + [Newtonsoft.Json.JsonProperty("basic_config")] + [System.Text.Json.Serialization.JsonPropertyName("basic_config")] + public Types.BasicConfiguration? BasicConfiguration { get; set; } } public class Authorization @@ -257,6 +302,27 @@ [System.Text.Json.Serialization.JsonPropertyName("authorizer_appid")] public string AuthorizerAppId { get; set; } = default!; + /// + /// 获取或设置授权方 AccessToken。 + /// + [Newtonsoft.Json.JsonProperty("authorizer_access_token")] + [System.Text.Json.Serialization.JsonPropertyName("authorizer_access_token")] + public string? AuthorizerAccessToken { get; set; } + + /// + /// 获取或设置授权方 RefreshToken。 + /// + [Newtonsoft.Json.JsonProperty("authorizer_refresh_token")] + [System.Text.Json.Serialization.JsonPropertyName("authorizer_refresh_token")] + public string? AuthorizerRefreshToken { get; set; } + + /// + /// 获取或设置授权方 AccessToken 有效期(单位:秒)。 + /// + [Newtonsoft.Json.JsonProperty("expires_in")] + [System.Text.Json.Serialization.JsonPropertyName("expires_in")] + public int? ExpiresIn { get; set; } + /// /// 获取或设置授权给开发者的权限集列表。 /// diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComponent/CgibinComponentApiQueryAuthResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComponent/CgibinComponentApiQueryAuthResponse.cs index 589b46e6..cf8f25a4 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComponent/CgibinComponentApiQueryAuthResponse.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Models/CgibinComponent/CgibinComponentApiQueryAuthResponse.cs @@ -1,4 +1,4 @@ -namespace SKIT.FlurlHttpClient.Wechat.Api.Models +namespace SKIT.FlurlHttpClient.Wechat.Api.Models { /// /// 表示 [POST] /cgi-bin/component/api_query_auth 接口的响应。 @@ -18,16 +18,37 @@ public class ScopeCategory { /// - /// 获取或设置权限分类 ID。 + /// 获取或设置权限集 ID。 /// [Newtonsoft.Json.JsonProperty("id")] [System.Text.Json.Serialization.JsonPropertyName("id")] public int Id { get; set; } + + /// + /// 获取或设置权限集类型。 + /// + [Newtonsoft.Json.JsonProperty("type")] + [System.Text.Json.Serialization.JsonPropertyName("type")] + public int Type { get; set; } + + /// + /// 获取或设置权限集名称。 + /// + [Newtonsoft.Json.JsonProperty("name")] + [System.Text.Json.Serialization.JsonPropertyName("name")] + public string Name { get; set; } = default!; + + /// + /// 获取或设置权限集描述。 + /// + [Newtonsoft.Json.JsonProperty("desc")] + [System.Text.Json.Serialization.JsonPropertyName("desc")] + public string Description { get; set; } = default!; } } /// - /// 获取或设置权限分类分类信息。 + /// 获取或设置权限集信息。 /// [Newtonsoft.Json.JsonProperty("funcscope_category")] [System.Text.Json.Serialization.JsonPropertyName("funcscope_category")]