feat(wxapi): 随官方更新微信小店达人橱窗管理相关接口模型

This commit is contained in:
Fu Diwei 2025-05-06 15:27:18 +08:00
parent bff3d94f6d
commit 782b564546
16 changed files with 234 additions and 10 deletions

View File

@ -4064,6 +4064,29 @@ namespace SKIT.FlurlHttpClient.Wechat.Api
return await client.SendFlurlRequestAsJsonAsync<Models.ChannelsECOrderDeliveryInfoUpdateResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
}
/// <summary>
/// <para>异步调用 [POST] /channels/ec/order/deliverycompanylist/new/get 接口。</para>
/// <para>
/// REF: <br/>
/// <![CDATA[ https://developers.weixin.qq.com/doc/store/shop/API/ewaybill/deliverycompanylist_get_new.html ]]>
/// </para>
/// </summary>
/// <param name="client"></param>
/// <param name="request"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
public static async Task<Models.ChannelsECOrderDeliveryCompanyListNewGetResponse> ExecuteChannelsECOrderDeliveryCompanyListNewGetAsync(this WechatApiClient client, Models.ChannelsECOrderDeliveryCompanyListNewGetRequest 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, "channels", "ec", "order", "deliverycompanylist", "new", "get")
.SetQueryParam("access_token", request.AccessToken);
return await client.SendFlurlRequestAsJsonAsync<Models.ChannelsECOrderDeliveryCompanyListNewGetResponse>(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false);
}
/// <summary>
/// <para>异步调用 [POST] /channels/ec/order/deliverycompanylist/get 接口。</para>
/// <para>

View File

@ -6,17 +6,24 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
public class ChannelsECLeagueHeadSupplierWindowAuthGetRequest : WechatApiRequest, IInferable<ChannelsECLeagueHeadSupplierWindowAuthGetRequest, ChannelsECLeagueHeadSupplierWindowAuthGetResponse>
{
/// <summary>
/// 获取或设置视频号 ID。与字段 <see cref="OpenId" />选一。
/// 获取或设置视频号 ID。与字段 <see cref="OpenId" />、<see cref="TalentAppId"/> 三选一。
/// </summary>
[Newtonsoft.Json.JsonProperty("finder_id")]
[System.Text.Json.Serialization.JsonPropertyName("finder_id")]
public string? FinderId { get; set; }
/// <summary>
/// 获取或设置用户 OpenId。与字段 <see cref="FinderId" />选一。
/// 获取或设置用户 OpenId。与字段 <see cref="FinderId" />、<see cref="TalentAppId"/> 三选一。
/// </summary>
[Newtonsoft.Json.JsonProperty("openid")]
[System.Text.Json.Serialization.JsonPropertyName("openid")]
public string? OpenId { get; set; }
/// <summary>
/// 获取或设置带货达人 AppId。与字段 <see cref="FinderId" />、<see cref="OpenId"/> 三选一。
/// </summary>
[Newtonsoft.Json.JsonProperty("talent_appid")]
[System.Text.Json.Serialization.JsonPropertyName("talent_appid")]
public string? TalentAppId { get; set; }
}
}

View File

@ -6,10 +6,31 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
public class ChannelsECLeagueHeadSupplierWindowAuthStatusGetRequest : WechatApiRequest, IInferable<ChannelsECLeagueHeadSupplierWindowAuthStatusGetRequest, ChannelsECLeagueHeadSupplierWindowAuthStatusGetResponse>
{
/// <summary>
/// 获取或设置视频号 ID。
/// 获取或设置视频号 ID。与字段 <see cref="OpenId" />、<see cref="TalentAppId"/>、<see cref="OpenFinderId"/> 四选一。
/// </summary>
[Newtonsoft.Json.JsonProperty("finder_id")]
[System.Text.Json.Serialization.JsonPropertyName("finder_id")]
public string FinderId { get; set; } = string.Empty;
public string? FinderId { get; set; }
/// <summary>
/// 获取或设置用户 OpenId。与字段 <see cref="FinderId" />、<see cref="TalentAppId"/>、<see cref="OpenFinderId"/> 四选一。
/// </summary>
[Newtonsoft.Json.JsonProperty("openid")]
[System.Text.Json.Serialization.JsonPropertyName("openid")]
public string? OpenId { get; set; }
/// <summary>
/// 获取或设置带货达人 OpenFinderId。与字段 <see cref="FinderId" />、<see cref="OpenId"/>、<see cref="TalentAppId"/> 四选一。
/// </summary>
[Newtonsoft.Json.JsonProperty("openfinderid")]
[System.Text.Json.Serialization.JsonPropertyName("openfinderid")]
public string? OpenFinderId { get; set; }
/// <summary>
/// 获取或设置带货达人 AppId。与字段 <see cref="FinderId" />、<see cref="OpenId"/>、<see cref="OpenFinderId"/> 四选一。
/// </summary>
[Newtonsoft.Json.JsonProperty("talent_appid")]
[System.Text.Json.Serialization.JsonPropertyName("talent_appid")]
public string? TalentAppId { get; set; }
}
}

View File

@ -11,5 +11,19 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
[Newtonsoft.Json.JsonProperty("window_auth_status")]
[System.Text.Json.Serialization.JsonPropertyName("window_auth_status")]
public int AuthStatus { get; set; }
/// <summary>
/// 获取或设置对应的 OpenFinderId。
/// </summary>
[Newtonsoft.Json.JsonProperty("openfinderid")]
[System.Text.Json.Serialization.JsonPropertyName("openfinderid")]
public string? OpenFinderId { get; set; }
/// <summary>
/// 获取或设置对应的 OpenTalentId。
/// </summary>
[Newtonsoft.Json.JsonProperty("opentalentid")]
[System.Text.Json.Serialization.JsonPropertyName("opentalentid")]
public string? OpenTalentId { get; set; }
}
}

View File

@ -24,6 +24,41 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
/// </summary>
[Newtonsoft.Json.JsonProperty("finder_id")]
[System.Text.Json.Serialization.JsonPropertyName("finder_id")]
public string FinderId { get; set; } = string.Empty;
public string? FinderId { get; set; }
/// <summary>
/// 获取或设置视频号 OpenFinderId。
/// </summary>
[Newtonsoft.Json.JsonProperty("openfinderid")]
[System.Text.Json.Serialization.JsonPropertyName("openfinderid")]
public string? OpenFinderId { get; set; }
/// <summary>
/// 获取或设置带货达人 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("opentalentid")]
[System.Text.Json.Serialization.JsonPropertyName("opentalentid")]
public string? OpenTalentId { get; set; }
/// <summary>
/// 获取或设置联盟商品链接。
/// </summary>
[Newtonsoft.Json.JsonProperty("product_link")]
[System.Text.Json.Serialization.JsonPropertyName("product_link")]
public string? ProductLink { get; set; }
/// <summary>
/// 获取或设置计划类型。
/// </summary>
[Newtonsoft.Json.JsonProperty("plan_type")]
[System.Text.Json.Serialization.JsonPropertyName("plan_type")]
public int? PlanType { get; set; }
/// <summary>
/// 获取或设置是否需要在个人橱窗页隐藏。
/// </summary>
[Newtonsoft.Json.JsonProperty("is_hide_for_window")]
[System.Text.Json.Serialization.JsonPropertyName("is_hide_for_window")]
public bool? IsHideForWindow { get; set; }
}
}

View File

@ -17,7 +17,21 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
/// </summary>
[Newtonsoft.Json.JsonProperty("finder_id")]
[System.Text.Json.Serialization.JsonPropertyName("finder_id")]
public string FinderId { get; set; } = string.Empty;
public string? FinderId { get; set; }
/// <summary>
/// 获取或设置视频号 OpenFinderId。
/// </summary>
[Newtonsoft.Json.JsonProperty("openfinderid")]
[System.Text.Json.Serialization.JsonPropertyName("openfinderid")]
public string? OpenFinderId { get; set; }
/// <summary>
/// 获取或设置带货达人 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("opentalentid")]
[System.Text.Json.Serialization.JsonPropertyName("opentalentid")]
public string? OpenTalentId { get; set; }
/// <summary>
/// 获取或设置分页起始位置。
@ -40,5 +54,12 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
[Newtonsoft.Json.JsonProperty("need_total_num")]
[System.Text.Json.Serialization.JsonPropertyName("need_total_num")]
public bool? RequireTotalCount { get; set; }
/// <summary>
/// 获取或设置是否需要查询达人所有橱窗商品。
/// </summary>
[Newtonsoft.Json.JsonProperty("is_get_all")]
[System.Text.Json.Serialization.JsonPropertyName("is_get_all")]
public bool? IsGetAll { get; set; }
}
}

View File

@ -24,6 +24,20 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
/// </summary>
[Newtonsoft.Json.JsonProperty("finder_id")]
[System.Text.Json.Serialization.JsonPropertyName("finder_id")]
public string FinderId { get; set; } = string.Empty;
public string? FinderId { get; set; }
/// <summary>
/// 获取或设置视频号 OpenFinderId。
/// </summary>
[Newtonsoft.Json.JsonProperty("openfinderid")]
[System.Text.Json.Serialization.JsonPropertyName("openfinderid")]
public string? OpenFinderId { get; set; }
/// <summary>
/// 获取或设置带货达人 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("opentalentid")]
[System.Text.Json.Serialization.JsonPropertyName("opentalentid")]
public string? OpenTalentId { get; set; }
}
}

View File

@ -68,6 +68,13 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
[Newtonsoft.Json.JsonProperty("cats_v2")]
[System.Text.Json.Serialization.JsonPropertyName("cats_v2")]
public Types.Category[]? CategoryV2List { get; set; }
/// <summary>
/// 获取或设置商品小程序跳转小店场景添加商品时传递的跟佣信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("product_promotion_link")]
[System.Text.Json.Serialization.JsonPropertyName("product_promotion_link")]
public string? ProductPromotionLink { get; set; }
}
}

View File

@ -12,6 +12,13 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
[System.Text.Json.Serialization.JsonPropertyName("product_id")]
public long ProductId { get; set; }
/// <summary>
/// 获取或设置商品在橱窗的 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("product_window_id")]
[System.Text.Json.Serialization.JsonPropertyName("product_window_id")]
public long? ProductWindowId { get; set; }
/// <summary>
/// 获取或设置小店 AppId。
/// </summary>
@ -24,6 +31,20 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
/// </summary>
[Newtonsoft.Json.JsonProperty("finder_id")]
[System.Text.Json.Serialization.JsonPropertyName("finder_id")]
public string FinderId { get; set; } = string.Empty;
public string? FinderId { get; set; }
/// <summary>
/// 获取或设置视频号 OpenFinderId。
/// </summary>
[Newtonsoft.Json.JsonProperty("openfinderid")]
[System.Text.Json.Serialization.JsonPropertyName("openfinderid")]
public string? OpenFinderId { get; set; }
/// <summary>
/// 获取或设置带货达人 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("opentalentid")]
[System.Text.Json.Serialization.JsonPropertyName("opentalentid")]
public string? OpenTalentId { get; set; }
}
}

View File

@ -868,7 +868,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
public string? OpenFinderId { get; set; }
/// <summary>
/// 获取或设置新带货平台 ID。
/// 获取或设置带货达人 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("talent_id")]
[System.Text.Json.Serialization.JsonPropertyName("talent_id")]

View File

@ -0,0 +1,15 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /channels/ec/order/deliverycompanylist/new/get 接口的请求。</para>
/// </summary>
public class ChannelsECOrderDeliveryCompanyListNewGetRequest : WechatApiRequest, IInferable<ChannelsECOrderDeliveryCompanyListNewGetRequest, ChannelsECOrderDeliveryCompanyListNewGetResponse>
{
/// <summary>
/// 获取或设置是否仅返回接入电子面单的快递公司。
/// </summary>
[Newtonsoft.Json.JsonProperty("ewaybill_only")]
[System.Text.Json.Serialization.JsonPropertyName("ewaybill_only")]
public bool? IsOnlyEWayBill { get; set; }
}
}

View File

@ -0,0 +1,22 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /channels/ec/order/deliverycompanylist/new/get 接口的响应。</para>
/// </summary>
public class ChannelsECOrderDeliveryCompanyListNewGetResponse : WechatApiResponse
{
public static class Types
{
public class DeliveryCompany : ChannelsECOrderDeliveryCompanyListGetResponse.Types.DeliveryCompany
{
}
}
/// <summary>
/// 获取或设置快递公司列表。
/// </summary>
[Newtonsoft.Json.JsonProperty("company_list")]
[System.Text.Json.Serialization.JsonPropertyName("company_list")]
public Types.DeliveryCompany[] DeliveryCompanyList { get; set; } = default!;
}
}

View File

@ -1,5 +1,7 @@
{
"errcode": 0,
"errmsg": "ok",
"window_auth_status": 1
"window_auth_status": 1,
"openfinderid": "",
"opentalentid": ""
}

View File

@ -1,5 +1,6 @@
{
"appid": "app1234",
"finder_id": "sph1234",
"openfinderid": "xxxxx",
"product_id": 1234
}

View File

@ -0,0 +1,18 @@
{
"errcode": 0,
"errmsg": "ok",
"company_list": [
{
"delivery_id": "SF",
"delivery_name": "顺丰速运"
},
{
"delivery_id": "YTO",
"delivery_name": "圆通快速"
},
{
"delivery_id": "ZTO",
"delivery_name": "中通快速"
}
]
}