diff --git a/CHANGELOG.md b/CHANGELOG.md index 5981545f..9da7cc27 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -33,6 +33,34 @@ [展开查看] +- Release 3.0.0 (2024-03-09) + + - **新增**:新增 URL Link v2、URL Schema v2、二维码 v2、订阅消息 v2、推广计划 v2、流量主 v2 等相关接口。 + + - **新增**:新增内容安全图片检测 v3、普通二维码绑定 v3 等相关接口。 + + - **新增**:新增线索组件、视频能力、搜索能力、任务能力、用户信息、分享等相关接口。 + + - **新增**:新增小程序能力申请、抖音号绑定等相关接口。 + + - **新增**:新增泛知识角色系统抖音号绑定相关接口。 + + - **新增**:新增服务商平台代开发小程序授权 v2、代开发小程序模板管理 v2、代开发小程序基础信息管理 v2、代开发小程序开发管理 v2 等相关接口。 + + - **新增**:新增服务商平台代开发小程序备案相关接口。 + + - **新增**:独立化直播小玩法 API 客户端,支持自动生成请求签名。 + + - **变更**:升级公共组件至 v3.0.0。完整变更说明请参阅迁移指南。 + + - **变更**:重命名客户端 `ByteDanceMicroAppClient` 为 `DouyinMicroAppClient`。 + + - **变更**:移除部分已废弃接口。 + + - **修复**:修复泛知识课程库添加课程接口模型定义错误。 + + - **修复**:修复担保支付相关接口 GET 请求签名错误。(_via_ [GitHub #20](https://github.com/fudiwei/DotNetCore.SKIT.FlurlHttpClient.ByteDance/pull/20)) + - Release 2.5.0 (2023-07-17) - **新增**:新增担保支付自动结算结果查询接口。(_via_ [GitHub #12](https://github.com/fudiwei/DotNetCore.SKIT.FlurlHttpClient.ByteDance/pull/12)) diff --git a/docs/MicroApp/Advanced_Dispose.md b/docs/MicroApp/Advanced_Dispose.md new file mode 100644 index 00000000..cf2f55e3 --- /dev/null +++ b/docs/MicroApp/Advanced_Dispose.md @@ -0,0 +1,13 @@ +## 如何销毁客户端? + +--- + +本功能来自于公共组件,请参阅公共组件下的相关文档: + +> [《SKIT.FlurlHttpClient FAQ:如何销毁客户端(避免内存泄漏)?》](https://github.com/fudiwei/DotNetCore.SKIT.FlurlHttpClient/blob/main/docs/README.md) + +--- + +### 镜像站点 + +国内用户如访问 GitHub 网络状况不佳,可在打开上述链接后,手动将域名部分的 **github.com** 替换为 **gitee.com**、剩余路径部分保持不变,即可访问。 diff --git a/docs/MicroApp/Advanced_IHttpClientFactory.md b/docs/MicroApp/Advanced_IHttpClientFactory.md index d73d446a..48061b9b 100644 --- a/docs/MicroApp/Advanced_IHttpClientFactory.md +++ b/docs/MicroApp/Advanced_IHttpClientFactory.md @@ -1,10 +1,10 @@ -## 如何在 ASP.NET Core 中与 `IHttpClientFactory` 集成? +## 如何与 `IHttpClientFactory` 集成? --- 本功能来自于公共组件,请参阅公共组件下的相关文档: -> [《SKIT.FlurlHttpClient FAQ:如何在 ASP.NET Core 中与 IHttpClientFactory 集成?》](https://github.com/fudiwei/DotNetCore.SKIT.FlurlHttpClient/blob/main/docs/FAQ_IHttpClientFactory.md) +> [《SKIT.FlurlHttpClient FAQ:如何与 IHttpClientFactory 集成?》](https://github.com/fudiwei/DotNetCore.SKIT.FlurlHttpClient/blob/main/docs/README.md) --- diff --git a/docs/MicroApp/Advanced_Interceptor.md b/docs/MicroApp/Advanced_Interceptor.md index 2bc28620..23f63eb1 100644 --- a/docs/MicroApp/Advanced_Interceptor.md +++ b/docs/MicroApp/Advanced_Interceptor.md @@ -4,7 +4,7 @@ 本功能来自于公共组件,请参阅公共组件下的相关文档: -> [《SKIT.FlurlHttpClient FAQ:如何使用拦截器?》](https://github.com/fudiwei/DotNetCore.SKIT.FlurlHttpClient/blob/main/docs/FAQ_Interceptor.md) +> [《SKIT.FlurlHttpClient FAQ:如何使用拦截器?》](https://github.com/fudiwei/DotNetCore.SKIT.FlurlHttpClient/blob/main/docs/README.md) --- diff --git a/docs/MicroApp/Advanced_JsonSerializer.md b/docs/MicroApp/Advanced_JsonSerializer.md index a9df787e..251fe34f 100644 --- a/docs/MicroApp/Advanced_JsonSerializer.md +++ b/docs/MicroApp/Advanced_JsonSerializer.md @@ -4,7 +4,7 @@ 本功能来自于公共组件,请参阅公共组件下的相关文档: -> [《SKIT.FlurlHttpClient FAQ:如何指定 JSON 序列化器?》](https://github.com/fudiwei/DotNetCore.SKIT.FlurlHttpClient/blob/main/docs/FAQ_JsonSerializer.md) +> [《SKIT.FlurlHttpClient FAQ:如何指定 JSON 序列化器?》](https://github.com/fudiwei/DotNetCore.SKIT.FlurlHttpClient/blob/main/docs/README.md) --- diff --git a/docs/MicroApp/Basic_EventDeserialization.md b/docs/MicroApp/Basic_EventDeserialization.md index 35e37bc8..f5a89302 100644 --- a/docs/MicroApp/Basic_EventDeserialization.md +++ b/docs/MicroApp/Basic_EventDeserialization.md @@ -2,46 +2,46 @@ --- -对于字节小程序推送过来的回调通知事件,本库封装了直接解析成事件模型的扩展方法,下面给出一个示例: +对于抖音小程序推送过来的回调通知事件,本库封装了直接解析成事件模型的扩展方法,下面给出一个示例: ```csharp /* 如果是 JSON 格式的通知内容,以 text 事件为例 */ -string callbackJson = "{ ... }"; -var callbackModel = client.DeserializeEventFromJson(callbackJson); +string webhookJson = "{ ... }"; +var webhookModel = client.DeserializeEventFromJson(webhookJson); /* 如果是 XML 格式的通知内容,以 text 事件为例 */ -string callbackXml = " ... "; -var callbackModel = client.DeserializeEventFromXml(callbackXml); +string webhookXml = " ... "; +var webhookModel = client.DeserializeEventFromXml(webhookXml); ``` -完整的回调通知模型定义可以参考项目目录下的 _src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Events_、_src/SKIT.FlurlHttpClient.ByteDance.Api/SDK/ProductApi/Events_、_src/SKIT.FlurlHttpClient.ByteDance.Api/SDK/OpenApi/Events_ 目录。 +完整的回调通知模型定义可以参考项目目录下的 _src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Events_、_src/SKIT.FlurlHttpClient.ByteDance.Api/ExtendedSDK/OpenApi/Events_、_src/SKIT.FlurlHttpClient.ByteDance.Api/ExtendedSDK/ProductApi/Events_ 目录。 --- ### 事件类型: -由于字节小程序会将全部事件推送到同一个回调通知地址上,开发者需要根据事件类型才能决定如何反序列化。 +由于抖音小程序会将全部事件推送到同一个回调通知地址上,开发者需要根据事件类型才能决定如何反序列化。 这里给出两种解决方案。 一种是利用 `System.Xml.Linq`: ```csharp -XDocument xDoc = XDocument.Parse(callbackXml); +XDocument xDoc = XDocument.Parse(webhookXml); string msgType = xDoc.Root?.Element("MsgType")?.Value?.ToUpper(); ``` 另一种是利用本库的扩展方法: ```csharp -ByteDanceMicroAppEvent eventModel = client.DeserializeEventFromXml(callbackXml); +ByteDanceMicroAppEvent eventModel = client.DeserializeEventFromXml(webhookXml); string msgType = eventModel.MessageType?.ToUpper(); switch (msgType) { case "TEXT": { - var callbackModel = client.DeserializeEventFromXml(callbackXml); + var webhookModel = client.DeserializeEventFromXml(webhookXml); } break; // 省略其他情况 diff --git a/docs/MicroApp/Basic_EventSignatureVerification.md b/docs/MicroApp/Basic_EventSignatureVerification.md index e6c0bf9c..a7661713 100644 --- a/docs/MicroApp/Basic_EventSignatureVerification.md +++ b/docs/MicroApp/Basic_EventSignatureVerification.md @@ -4,25 +4,24 @@ > 请先自行阅读: > -> [《字节小程序文档 - 消息推送客服:验证消息来自今日头条》](https://microapp.bytedance.com/docs/zh-CN/mini-app/develop/component/message-push-customer-service) +> [《抖音小程序文档 - 消息推送客服:验证消息来自今日头条》](https://microapp.bytedance.com/docs/zh-CN/mini-app/develop/component/message-push-customer-service) 同样的,你既可以利用本库提供的 `SHA1Utility` 工具类自行进行签名验证,也可以通过扩展方法实现: ```csharp /* 在初始化客户端时需指定服务器推送的相关参数 */ -var options = new ByteDanceMicroAppClientOptions() +var options = new DouyinMicroAppClientOptions() { - AppId = "字节小程序 AppId", - AppSecret = "字节小程序 AppSecret", + // 其他配置项略 PushToken = "服务器推送的 Token" }; -var client = new ByteDanceMicroAppClient(options); +var client = DouyinMicroAppClientBuilder.Create(options).Build(); -/* 验证字节小程序服务器 */ +/* 验证抖音服务器 */ bool ret = client.VerifyEventSignatureForEcho( - callbackTimestamp: "字节小程序回调通知中的 timestamp 字段", - callbackNonce: "字节小程序回调通知中的 nonce 字段", - callbackMessage: "头条回调通知中的 msg 字段", - callbackSignature: "头条回调通知中的 signature 字段" + webhookTimestamp: "抖音小程序回调通知中的 timestamp 字段", + webhookNonce: "抖音小程序回调通知中的 nonce 字段", + webhookMsg: "抖音回调通知中的 msg 字段", + webhookSignature: "抖音回调通知中的 signature 字段" ); ``` diff --git a/docs/MicroApp/Basic_Extensions.md b/docs/MicroApp/Basic_Extensions.md index ab08244d..855bd998 100644 --- a/docs/MicroApp/Basic_Extensions.md +++ b/docs/MicroApp/Basic_Extensions.md @@ -5,26 +5,26 @@ 如果有某些接口本库尚未支持,你可按照下面的示例自行扩展: ```csharp -/* 继承 ByteDanceMicroAppRequest 实现自定义请求类 */ -public class MyFakeRequest : ByteDanceMicroAppRequest +/* 继承 DouyinMicroAppRequest 实现自定义请求类 */ +public class MyFakeRequest : DouyinMicroAppRequest { [Newtonsoft.Json.JsonProperty("my_fake_props")] [System.Text.Json.Serialization.JsonPropertyName("my_fake_props")] public string MyFakeProps { get; set; } } -/* 继承 ByteDanceMicroAppResponse 实现自定义响应类 */ -public class MyFakeResponse : ByteDanceMicroAppResponse +/* 继承 DouyinMicroAppResponse 实现自定义响应类 */ +public class MyFakeResponse : DouyinMicroAppResponse { [Newtonsoft.Json.JsonProperty("my_fake_props")] [System.Text.Json.Serialization.JsonPropertyName("my_fake_props")] public string MyFakeProps { get; set; } } -/* 扩展 ByteDanceMicroAppClient 方法 */ +/* 扩展 DouyinMicroAppClient 方法 */ public static class MyFakeClientExtensions { - public static async Task ExecuteMyFakeAsync(this ByteDanceMicroAppClient client, MyFakeRequest request, CancellationToken cancellationToken = default) + public static async Task ExecuteMyFakeAsync(this DouyinMicroAppClient client, MyFakeRequest request, CancellationToken cancellationToken = default) { if (client is null) throw new ArgumentNullException(nameof(client)); if (request is null) throw new ArgumentNullException(nameof(request)); @@ -41,16 +41,16 @@ public static class MyFakeClientExtensions 同样的,你也可自行扩展回调通知事件模型: ```csharp -/* 继承 ByteDanceMicroAppEvent 实现自定义的 JSON 格式的回调通知事件 */ -public class MyFakeEvent : ByteDanceMicroAppEvent, ByteDanceMicroAppEvent.Serialization.IJsonSerializable +/* 继承 DouyinMicroAppEvent 实现自定义的 JSON 格式的回调通知事件 */ +public class MyFakeEvent : DouyinMicroAppEvent, DouyinMicroAppEvent.Serialization.IJsonSerializable { [Newtonsoft.Json.JsonProperty("my_fake_props")] [System.Text.Json.Serialization.JsonPropertyName("my_fake_props")] public string MyFakeProps { get; set; } } -/* 继承 ByteDanceMicroAppEvent 实现自定义的 XML 格式的回调通知事件 */ -public class MyFakeEvent : ByteDanceMicroAppEvent, ByteDanceMicroAppEvent.Serialization.IXmlSerializable +/* 继承 DouyinMicroAppEvent 实现自定义的 XML 格式的回调通知事件 */ +public class MyFakeEvent : DouyinMicroAppEvent, DouyinMicroAppEvent.Serialization.IXmlSerializable { [System.Xml.Serialization.XmlElement("my_fake_props")] public string MyFakeProps { get; set; } diff --git a/docs/MicroApp/Basic_ModelDefinition.md b/docs/MicroApp/Basic_ModelDefinition.md index 68b68ac0..fb0f770e 100644 --- a/docs/MicroApp/Basic_ModelDefinition.md +++ b/docs/MicroApp/Basic_ModelDefinition.md @@ -8,11 +8,11 @@ 再有,每个对象的命名与官方文档的接口地址大体保持一致。例如刚刚提到的发送订阅消息,它的接口地址是 `[POST] /apps/message/custom/send`,将其中的反斜杠去掉、并以大驼峰命名法的方式调整它,就可以得到前文提到的几个对象了。如果路由中带有版本信息,那么版本号一般都在结尾处,例如接口 `[POST] /v2/tags/image` 对应的是 `TagsImageV2`。 -完整的模型定义可以参考项目目录下的 _src/SKIT.FlurlHttpClient.ByteDance.Api/Models_、_src/SKIT.FlurlHttpClient.ByteDance.Api/SDK/ProductApi/Models_、_src/SKIT.FlurlHttpClient.ByteDance.Api/SDK/OpenApi/Models_ 目录。 +完整的模型定义可以参考项目目录下的 _src/SKIT.FlurlHttpClient.ByteDance.Api/Models_、_src/SKIT.FlurlHttpClient.ByteDance.Api/ExtendedSdk/OpenApi/Models_、_src/SKIT.FlurlHttpClient.ByteDance.Api/ExtendedSdk/ProductApi/Models_、_src/SKIT.FlurlHttpClient.ByteDance.Api/ExtendedSdk/RoleApi/Models_、_src/SKIT.FlurlHttpClient.ByteDance.Api/ExtendedSdk/Webcast/Models_ 目录。 --- -### 字节小程序开放平台 API 支持情况: +### 抖音小程序开放平台 API 支持情况: #### 1. 小程序 @@ -20,27 +20,50 @@ [展开查看] -| | 字节 API | 备注 | -| :-: | :------------------------------------: | :------------------: | -| √ | 接口调用凭证 | | -| √ | 登录 | | -| √ | 数据缓存 | | -| √ | 分享 | | -| √ | 客服 | | -| × | 交易系统 | 异构协议,需独立模块 | -| √ | 二维码 | | -| √ | 内容安全 | | -| √ | 课程库 | | -| √ | 担保支付 | | -| √ | 评价 | | -| √ | 订阅消息 | | -| √ | 其它:直播间自定义封面 | | -| √ | 其它:抖音开放平台与小程序视频打通能力 | | -| √ | 小程序推广计划 | | -| √ | 挂载 | | -| √ | 分发 | | -| √ | 引导关注抖音号 | | -| √ | 数据分析 | | +| | 抖音 API | 备注 | +| :-: | :---------------------------------------: | :--------------------------------: | +| × | 联合授权 | 异构协议,请使用 `DouyinOpen` 模块 | +| × | 接口调用凭证:经营能力调用凭证 | 异构协议,请使用 `DouyinOpen` 模块 | +| × | 接口调用凭证:用户授权调用凭证 | 异构协议,请使用 `DouyinOpen` 模块 | +| √ | 接口调用凭证:非用户授权调用凭证 | | +| × | 私聊和群聊 | 异构协议,请使用 `DouyinOpen` 模块 | +| √ | 登录 | | +| √ | 小程序码与小程序链接 | | +| √ | 线索组件 | | +| √ | 视频能力 | | +| √ | 搜索能力 | | +| √ | 任务能力 | | +| × | 电商 | _开发中_ | +| × | 生活服务 | _开发中_ | +| √ | 用户信息 | | +| √ | 分享 | | +| √ | 客服 | | +| × | 交易工具 | _开发中_ | +| × | 小程序券 | _开发中_ | +| × | 交易系统 | _开发中_ | +| √ | 内容安全 | | +| √ | 泛知识:角色系统 | | +| √ | 泛知识:课程库 | | +| √ | 担保支付 | | +| √ | 评价 | | +| √ | 其他:直播间自定义封面 | | +| √ | 其他:抖音开放平台与小程序视频打通能力 | | +| × | 其他:开放能力配置 | _开发中_ | +| √ | 其他:上传资源 | | +| × | 其他:解决方案测试实体管理 | _开发中_ | +| √ | 订阅消息 | | +| √ | 小程序推广计划 | | +| √ | 挂载 | | +| √ | 分发 | | +| × | 数据分析 | _开发中_ | +| √ | 服务类目 | | +| √ | 直播间能力 | | +| √ | 抖音开放能力 | | +| √ | 页面结构自定义 | | +| √ | 普通二维码绑定 | | +| √ | 抖音号绑定 | | +| √ | 流量主 | | +| × | 抖店绑定 | _开发中_ | @@ -50,7 +73,7 @@ [展开查看] -| | 字节 API | 备注 | +| | 抖音 API | 备注 | | :-: | :----------: | :--: | | √ | 接口调用凭证 | | | √ | 登录 | | @@ -66,13 +89,24 @@ [展开查看] -| | 字节 API | 备注 | -| :-: | :--------------------: | :--: | -| √ | 授权相关接口 | | -| √ | 域名相关接口 | | -| √ | 模板管理接口 | | -| √ | 代商家管理小程序 | | -| √ | 代商家管理小程序 | | -| √ | 代商家入驻抖音开放平台 | | +| | 抖音 API | 备注 | +| :-: | :----------------------------------: | :------: | +| √ | 代开发小程序:上传资源 | | +| √ | 代开发小程序:授权 | | +| √ | 代开发小程序:域名 | | +| √ | 代开发小程序:模板管理 | | +| √ | 代开发小程序:代商家管理小程序 | | +| √ | 代开发小程序:代商家入驻抖音开放平台 | | +| × | 代开发生活服务商家应用 | _开发中_ | + +#### 4. 直播小玩法 + +
+ +[展开查看] + +| | 抖音 API | 备注 | +| :-: | :------: | :--: | +| √ | 直播能力 | | diff --git a/docs/MicroApp/README.md b/docs/MicroApp/README.md index 63564402..876f87aa 100644 --- a/docs/MicroApp/README.md +++ b/docs/MicroApp/README.md @@ -1,19 +1,25 @@ # SKIT.FlurlHttpClient.ByteDance.MicroApp -基于 `Flurl.Http` 的[字节小程序开放平台](https://microapp.bytedance.com/) HTTP API SDK。 +基于 `Flurl.Http` 的[抖音小程序开放平台](https://microapp.bytedance.com/) HTTP API SDK。 + +本模块仅支持抖音小程序专属的 API,如需接入与抖音开放平台共享的 API,请移步 [`SKIT.FlurlHttpClient.ByteDance.DouyinOpen`](../DouyinOpen/README.md) 模块。 --- ## 功能 -- 基于字节小程序开放平台 API 封装。 -- 提供了字节小程序所需的 AES、MD5、SHA-1、HMAC-SHA-256 等算法工具类。 +- 基于抖音小程序开放平台 API 封装。 +- 提供了抖音小程序所需的 RSA、AES、MD5、SHA-1、HMAC-SHA-256 等算法工具类。 - 提供了解析回调通知事件等扩展方法。 +- 配合 [SKIT.FlurlHttpClient.ByteDance.DouyinOpen](../DouyinOpen/README.md) 模块,可无缝对接抖音开放平台。 --- ## 快速入门 +> [!IMPORTANT] +> 此目录下的文档适用于 v3.x 版本的模块。如果你正在使用 2.x 版本,请移步至 GitHub/Gitee 的已归档分支。 + ### 安装: 提示:如果你使用 Visual Studio NuGet 管理器图形化界面,请在搜索结果中勾选“**包括预发行版**”。 @@ -29,41 +35,15 @@ ### 初始化: ```csharp -/* 以基础 API 为例 */ using SKIT.FlurlHttpClient.ByteDance.MicroApp; -var options = new ByteDanceMicroAppClientOptions() +var options = new DouyinMicroAppClientOptions() { - Endpoints = ByteDanceMicroAppEndpoints.API_MINIAPP, // 指定接入点。需注意小程序、小游戏拥有不同的接入点。 - AppId = "字节小程序 AppId", - AppSecret = "字节小程序 AppSecret", + AppId = "抖音小程序 AppId", + AppSecret = "抖音小程序 AppSecret", ECPaySalt = "担保支付相关服务的密钥,不用则不填" }; -var client = new ByteDanceMicroAppClient(options); - - - -/* 以泛知识课程库 API 为例 */ -using SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.ProductApi; - -var options = new ByteDanceMicroAppProductApiClientOptions() -{ - AppId = "字节小程序 AppId", - AppSecret = "字节小程序 AppSecret" -}; -var client = new ByteDanceMicroAppProductApiClient(options); - - - -/* 以服务商平台 API 为例 */ -using SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi; - -var options = new ByteDanceMicroAppOpenApiClientOptions() -{ - ComponentAppId = "字节小程序第三方应用 AppId", - ComponentAppSecret = "字节小程序第三方应用 AppSecret" -}; -var client = new ByteDanceMicroAppOpenApiClient(options); +var client = DouyinMicroAppClientBuilder.Create(options).Build(); ``` ### 请求 & 响应: @@ -87,16 +67,77 @@ if (response.IsSuccessful()) } else { - Console.WriteLine("错误代码:" + response.ErrorCode); - Console.WriteLine("错误描述:" + response.ErrorMessage); + Console.WriteLine("错误代码:" + response.ErrorNumber); + Console.WriteLine("错误描述:" + response.ErrorTips); } ``` +### 独立的扩展客户端(服务商平台、泛知识课程库、泛知识角色系统、直播小玩法等): + +部分 API 的接入点、接口模型公共参数等配置项与基础 API 完全不同,需要使用独立的扩展客户端。 + +- 服务商平台: + +```csharp +using SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi; + +var options = new DouyinMicroAppOpenApiClientOptions() +{ + ComponentAppId = "第三方应用 AppId", + ComponentAppSecret = "第三方应用 AppSecret" +}; +var client = DouyinMicroAppOpenApiClientBuilder.Create(options).Build(); +``` + +- 泛知识课程库: + +```csharp +using SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.ProductApi; + +var options = new DouyinMicroAppProductApiClientOptions() +{ + AppId = "抖音小程序 AppId", + AppSecret = "抖音小程序 AppSecret" +}; +var client = DouyinMicroAppProductApiClientBuilder.Create(options).Build(); +``` + +- 泛知识角色系统: + +```csharp +using SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.RoleApi; + +var options = new DouyinMicroAppRoleApiClientOptions() +{ + AppId = "抖音小程序 AppId", + AppSecret = "抖音小程序 AppSecret" +}; +var client = DouyinMicroAppRoleApiClientBuilder.Create(options).Build(); +``` + +- 直播小玩法: + +```csharp +using SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.Webcast; + +var options = new DouyinMicroAppWebcastClientOptions() +{ + AppId = "抖音小程序 AppId", + AppSecret = "抖音小程序 AppSecret", + ApplicationPublicKeyVersion = "应用密钥公钥版本号", + ApplicationPrivateKey = "应用密钥私钥", + PlatformPublicKey = "平台密钥公钥" +}; +var client = DouyinMicroAppWebcastClientBuilder.Create(options).Build(); +``` + +这些扩展客户端在用法上基础客户端完全相同,只需引入各自的命名空间即可。 + --- ## 基础用法 -- [如何快速找到需要调用的 API 模型类名 / 方法名?](./Basic_ModelDefinition.md) +- ⭐ [如何快速找到需要调用的 API 模型类名 / 方法名?](./Basic_ModelDefinition.md) - [如何解析回调通知事件?](./Basic_EventDeserialization.md) @@ -106,9 +147,11 @@ else --- -## 快速高级技巧入门 +## 高级技巧 + +- [如何销毁客户端?](./Advanced_Dispose.md) -- [如何在 ASP.NET Core 中与 `IHttpClientFactory` 集成?](./Advanced_IHttpClientFactory.md) +- [如何与 `IHttpClientFactory` 集成?](./Advanced_IHttpClientFactory.md) - [如何指定 JSON 序列化器?](./Advanced_JsonSerializer.md) diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ByteDanceMicroAppClient.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ByteDanceMicroAppClient.cs deleted file mode 100644 index b5f8440b..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ByteDanceMicroAppClient.cs +++ /dev/null @@ -1,137 +0,0 @@ -using System; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Flurl.Http; - -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp -{ - /// - /// 一个字节小程序 API HTTP 客户端。 - /// - public class ByteDanceMicroAppClient : CommonClientBase, ICommonClient - { - /// - /// 获取当前客户端使用的字节小程序凭证。 - /// - public Settings.Credentials Credentials { get; } - - /// - /// 获取当前客户端使用的字节小程序 API 接入点。 - /// - protected internal string Endpoint { get; } - - /// - /// 获取当前客户端使用的字节小程序直播小玩法 API 接入点。 - /// - protected internal string EndpointForWebcastAPI { get; } - - /// - /// 用指定的配置项初始化 类的新实例。 - /// - /// 配置项。 - public ByteDanceMicroAppClient(ByteDanceMicroAppClientOptions options) - : base() - { - if (options == null) throw new ArgumentNullException(nameof(options)); - - Credentials = new Settings.Credentials(options); - Endpoint = options.Endpoint; - EndpointForWebcastAPI = options.EndpointForWebcastAPI; - - FlurlClient.BaseUrl = options.Endpoint ?? ByteDanceMicroAppEndpoints.API_MINIAPP; - FlurlClient.WithTimeout(TimeSpan.FromMilliseconds(options.Timeout)); - } - - /// - /// 用指定的字节小程序 AppId、字节小程序 AppSecret 初始化 类的新实例。 - /// - /// 字节小程序应用 AppId。 - /// 字节小程序 AppSecret。 - public ByteDanceMicroAppClient(string appId, string appSecret) - : this(new ByteDanceMicroAppClientOptions() { AppId = appId, AppSecret = appSecret }) - { - } - - /// - /// 使用当前客户端生成一个新的 对象。 - /// - /// - /// - /// - /// - public IFlurlRequest CreateRequest(ByteDanceMicroAppRequest request, HttpMethod method, params object[] urlSegments) - { - IFlurlRequest flurlRequest = FlurlClient.Request(urlSegments).WithVerb(method); - - if (request.Timeout != null) - { - flurlRequest.WithTimeout(TimeSpan.FromMilliseconds(request.Timeout.Value)); - } - - return flurlRequest; - } - - /// - /// 异步发起请求。 - /// - /// - /// - /// - /// - /// - public async Task SendRequestAsync(IFlurlRequest flurlRequest, HttpContent? httpContent = null, CancellationToken cancellationToken = default) - where T : ByteDanceMicroAppResponse, new() - { - if (flurlRequest == null) throw new ArgumentNullException(nameof(flurlRequest)); - - try - { - using IFlurlResponse flurlResponse = await base.SendRequestAsync(flurlRequest, httpContent, cancellationToken); - return await WrapResponseWithJsonAsync(flurlResponse, cancellationToken); - } - catch (FlurlHttpTimeoutException ex) - { - throw new Exceptions.ByteDanceMicroAppRequestTimeoutException(ex.Message, ex); - } - catch (FlurlHttpException ex) - { - throw new ByteDanceMicroAppException(ex.Message, ex); - } - } - - /// - /// 异步发起请求。 - /// - /// - /// - /// - /// - /// - public async Task SendRequestWithJsonAsync(IFlurlRequest flurlRequest, object? data = null, CancellationToken cancellationToken = default) - where T : ByteDanceMicroAppResponse, new() - { - if (flurlRequest == null) throw new ArgumentNullException(nameof(flurlRequest)); - - try - { - bool isSimpleRequest = data == null || - flurlRequest.Verb == HttpMethod.Get || - flurlRequest.Verb == HttpMethod.Head || - flurlRequest.Verb == HttpMethod.Options; - using IFlurlResponse flurlResponse = isSimpleRequest ? - await base.SendRequestAsync(flurlRequest, null, cancellationToken) : - await base.SendRequestWithJsonAsync(flurlRequest, data, cancellationToken); - return await WrapResponseWithJsonAsync(flurlResponse, cancellationToken); - } - catch (FlurlHttpTimeoutException ex) - { - throw new Exceptions.ByteDanceMicroAppRequestTimeoutException(ex.Message, ex); - } - catch (FlurlHttpException ex) - { - throw new ByteDanceMicroAppException(ex.Message, ex); - } - } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ByteDanceMicroAppClientOptions.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ByteDanceMicroAppClientOptions.cs deleted file mode 100644 index 5d9a12a1..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ByteDanceMicroAppClientOptions.cs +++ /dev/null @@ -1,51 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp -{ - /// - /// 一个用于构造 时使用的配置项。 - /// - public class ByteDanceMicroAppClientOptions - { - /// - /// 获取或设置请求超时时间(单位:毫秒)。 - /// 默认值:30000 - /// - public int Timeout { get; set; } = 30 * 1000; - - /// - /// 获取或设置字节小程序 API 入口点。 - /// 默认值: - /// - public string Endpoint { get; set; } = ByteDanceMicroAppEndpoints.API_MINIAPP; - - /// - /// 获取或设置字节小程序直播小玩法 API 入口点。 - /// 默认值: - /// - public string EndpointForWebcastAPI { get; set; } = ByteDanceMicroAppWebcastEndpoints.DEFAULT; - - /// - /// 获取或设置字节小程序 AppId。 - /// - public string AppId { get; set; } = default!; - - /// - /// 获取或设置字节小程序 AppSecret。 - /// - public string AppSecret { get; set; } = default!; - - /// - /// 获取或设置头条服务器推送的 Token。 - /// - public string? PushToken { get; set; } - - /// - /// 获取或设置头条服务器推送的 EncodingAESKey。 - /// - public string? PushEncodingAESKey { get; set; } - - /// - /// 获取或设置用于担保支付请求签名的密钥。 - /// - public string? ECPaySalt { get; set; } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ByteDanceMicroAppEndpoints.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ByteDanceMicroAppEndpoints.cs deleted file mode 100644 index 286ade5c..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ByteDanceMicroAppEndpoints.cs +++ /dev/null @@ -1,34 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp -{ - /// - /// 字节小程序 API 接口域名。 - /// - public static class ByteDanceMicroAppEndpoints - { - /// - /// 小程序 API 域名(默认)。 - /// - public const string API_MINIAPP = "https://developer.toutiao.com/api"; - - /// - /// 小程序 API 沙盒环境域名。 - /// - public const string API_MINIAPP_SANDBOX = "https://open-sandbox.douyin.com/api"; - - /// - /// 小游戏 API 域名。 - /// - public const string API_MINIGAME = "https://minigame.zijieapi.com/mgplatform/api"; - } - - /// - /// 字节小程序直播小玩法 API 接口域名。 - /// - public static class ByteDanceMicroAppWebcastEndpoints - { - /// - /// 主域名(默认)。 - /// - public const string DEFAULT = "https://webcast.bytedance.com/api"; - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ByteDanceMicroAppEvent.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ByteDanceMicroAppEvent.cs deleted file mode 100644 index a25f90f5..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ByteDanceMicroAppEvent.cs +++ /dev/null @@ -1,54 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp -{ - /// - /// 表示字节小程序 API 消息推送事件的基类。 - /// - public class ByteDanceMicroAppEvent - { - public static class Serialization - { - [Newtonsoft.Json.JsonObject] - public interface IJsonSerializable - { - } - - [System.Xml.Serialization.XmlRoot("xml")] - public interface IXmlSerializable - { - } - } - - /// - /// 获取或设置消息接收方账号。 - /// - [Newtonsoft.Json.JsonProperty("ToUserName")] - [System.Text.Json.Serialization.JsonPropertyName("ToUserName")] - [System.Xml.Serialization.XmlElement("ToUserName", IsNullable = true)] - public virtual string? ToUserName { get; set; } - - /// - /// 获取或设置消息发送方账号。 - /// - [Newtonsoft.Json.JsonProperty("FromUserName")] - [System.Text.Json.Serialization.JsonPropertyName("FromUserName")] - [System.Xml.Serialization.XmlElement("FromUserName", IsNullable = true)] - public virtual string? FromUserName { get; set; } - - /// - /// 获取或设置消息类型。 - /// - [Newtonsoft.Json.JsonProperty("MsgType")] - [System.Text.Json.Serialization.JsonPropertyName("MsgType")] - [System.Xml.Serialization.XmlElement("MsgType", IsNullable = true)] - public virtual string? MessageType { get; set; } - - /// - /// 获取或设置消息创建时间戳。 - /// - [Newtonsoft.Json.JsonProperty("CreateTime")] - [System.Text.Json.Serialization.JsonPropertyName("CreateTime")] - [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)] - [System.Xml.Serialization.XmlElement("CreateTime")] - public virtual long CreateTimestamp { get; set; } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ByteDanceMicroAppException.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ByteDanceMicroAppException.cs deleted file mode 100644 index 28afcb64..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ByteDanceMicroAppException.cs +++ /dev/null @@ -1,27 +0,0 @@ -using System; - -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp -{ - /// - /// 字节小程序 API 出错时引发的异常。 - /// - public class ByteDanceMicroAppException : CommonExceptionBase - { - /// - public ByteDanceMicroAppException() - { - } - - /// - public ByteDanceMicroAppException(string message) - : base(message) - { - } - - /// - public ByteDanceMicroAppException(string message, Exception innerException) - : base(message, innerException) - { - } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ByteDanceMicroAppRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ByteDanceMicroAppRequest.cs deleted file mode 100644 index f74d1c90..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ByteDanceMicroAppRequest.cs +++ /dev/null @@ -1,23 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp -{ - /// - /// 字节小程序 API 请求的基类。 - /// - public abstract class ByteDanceMicroAppRequest : ICommonRequest - { - /// - /// 获取或设置请求超时时间(单位:毫秒)。如果不指定将使用构造 时的 参数,这在需要指定特定耗时请求(比如上传或下载文件)的超时时间时很有用。 - /// - [Newtonsoft.Json.JsonIgnore] - [System.Text.Json.Serialization.JsonIgnore] - public virtual int? Timeout { get; set; } - - /// - /// 获取或设置字节小程序的 AccessToken。 - /// 注意:部分第三方平台的接口中该字段表示授权方的 AuthorizerAccessToken。 - /// - [Newtonsoft.Json.JsonIgnore] - [System.Text.Json.Serialization.JsonIgnore] - public virtual string? AccessToken { get; set; } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ByteDanceMicroAppResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ByteDanceMicroAppResponse.cs deleted file mode 100644 index 256d8db7..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ByteDanceMicroAppResponse.cs +++ /dev/null @@ -1,89 +0,0 @@ -using System.Collections.Generic; - -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp -{ - /// - /// 字节小程序 API 响应的基类。 - /// - public abstract class ByteDanceMicroAppResponse : ICommonResponse - { - /// - /// - /// - int ICommonResponse.RawStatus { get; set; } - - /// - /// - /// - IDictionary ICommonResponse.RawHeaders { get; set; } = default!; - - /// - /// - /// - byte[] ICommonResponse.RawBytes { get; set; } = default!; - - /// - /// 获取原始的 HTTP 响应状态码。 - /// - [Newtonsoft.Json.JsonIgnore] - [System.Text.Json.Serialization.JsonIgnore] - public int RawStatus - { - get { return ((ICommonResponse)this).RawStatus; } - internal set { ((ICommonResponse)this).RawStatus = value; } - } - - /// - /// 获取原始的 HTTP 响应表头集合。 - /// - [Newtonsoft.Json.JsonIgnore] - [System.Text.Json.Serialization.JsonIgnore] - public IDictionary RawHeaders - { - get { return ((ICommonResponse)this).RawHeaders; } - internal set { ((ICommonResponse)this).RawHeaders = value; } - } - - /// - /// 获取原始的 HTTP 响应正文。 - /// - [Newtonsoft.Json.JsonIgnore] - [System.Text.Json.Serialization.JsonIgnore] - public byte[] RawBytes - { - get { return ((ICommonResponse)this).RawBytes; } - internal set { ((ICommonResponse)this).RawBytes = value; } - } - - /// - /// 获取字节小程序 API 返回的详细错误号。 - /// - [Newtonsoft.Json.JsonProperty("errcode")] - [System.Text.Json.Serialization.JsonPropertyName("errcode")] - public virtual long ErrorCode { get; set; } - - /// - /// 获取字节小程序 API 返回的错误描述。 - /// - [Newtonsoft.Json.JsonProperty("errmsg")] - [System.Text.Json.Serialization.JsonPropertyName("errmsg")] - public virtual string? ErrorMessage { get; set; } - - /// - /// 获取字节小程序 API 返回的日志 ID。 - /// - [Newtonsoft.Json.JsonProperty("log_id")] - [System.Text.Json.Serialization.JsonPropertyName("log_id")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumericalStringReadOnlyConverter))] - public virtual string? LogId { get; set; } - - /// - /// 获取一个值,该值指示调用字节小程序 API 是否成功(即 HTTP 状态码为 200、且 "errcode" 值为 0)。 - /// - /// - public virtual bool IsSuccessful() - { - return RawStatus == 200 && ErrorCode == 0; - } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Converters/Internal/Newtonsoft.Json/DateTimeOffset/CSTDateTimeOffsetConverter.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Converters/Internal/Newtonsoft.Json/DateTimeOffset/CSTDateTimeOffsetConverter.cs deleted file mode 100644 index 2f9d22d1..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Converters/Internal/Newtonsoft.Json/DateTimeOffset/CSTDateTimeOffsetConverter.cs +++ /dev/null @@ -1,54 +0,0 @@ -using System; -using System.Globalization; - -namespace Newtonsoft.Json.Converters -{ - internal class CSTDateTimeOffsetConverter : JsonConverter - { - internal const string DATETIME_FORMAT = "yyyy-MM-dd HH:mm:ss zzz CST"; - - public override bool CanRead - { - get { return true; } - } - - public override bool CanWrite - { - get { return true; } - } - - public override DateTimeOffset ReadJson(JsonReader reader, Type objectType, DateTimeOffset existingValue, bool hasExistingValue, JsonSerializer serializer) - { - if (reader.TokenType == JsonToken.Null) - { - return existingValue; - } - else if (reader.TokenType == JsonToken.String) - { - string? value = serializer.Deserialize(reader); - if (string.IsNullOrEmpty(value)) - return existingValue; - - if (DateTimeOffset.TryParseExact(value, DATETIME_FORMAT, DateTimeFormatInfo.InvariantInfo, DateTimeStyles.None, out DateTimeOffset d)) - return d; - - if (DateTimeOffset.TryParse(value, out d)) - return d; - - throw new JsonSerializationException($"Could not parse String '{value}' to DateTimeOffset."); - } - else if (reader.TokenType == JsonToken.Date) - { - reader.DateFormatString = DATETIME_FORMAT; - return serializer.Deserialize(reader); - } - - throw new JsonSerializationException($"Unexpected token type '{reader.TokenType}' when deserializing. Path '{reader.Path}'."); - } - - public override void WriteJson(JsonWriter writer, DateTimeOffset value, JsonSerializer serializer) - { - writer.WriteValue(value.ToString(DATETIME_FORMAT, DateTimeFormatInfo.InvariantInfo)); - } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Converters/Internal/System.Text.Json/DateTimeOffset/CSTDateTimeOffsetConverter.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Converters/Internal/System.Text.Json/DateTimeOffset/CSTDateTimeOffsetConverter.cs deleted file mode 100644 index a094d3c3..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Converters/Internal/System.Text.Json/DateTimeOffset/CSTDateTimeOffsetConverter.cs +++ /dev/null @@ -1,39 +0,0 @@ -using System.Globalization; -using System.Text.Json.Serialization; - -namespace System.Text.Json.Converters -{ - internal class CSTDateTimeOffsetConverter : JsonConverter - { - internal const string DATETIME_FORMAT = Newtonsoft.Json.Converters.CSTDateTimeOffsetConverter.DATETIME_FORMAT; - - public override DateTimeOffset Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - if (reader.TokenType == JsonTokenType.Null) - { - return default; - } - else if (reader.TokenType == JsonTokenType.String) - { - string? value = reader.GetString(); - if (string.IsNullOrEmpty(value)) - return default; - - if (DateTimeOffset.TryParseExact(value, DATETIME_FORMAT, DateTimeFormatInfo.InvariantInfo, DateTimeStyles.None, out DateTimeOffset d)) - return d; - - if (DateTimeOffset.TryParse(value, out d)) - return d; - - throw new JsonException($"Could not parse String '{value}' to DateTimeOffset."); - } - - throw new JsonException($"Unexpected JSON token type '{reader.TokenType}' when reading."); - } - - public override void Write(Utf8JsonWriter writer, DateTimeOffset value, JsonSerializerOptions options) - { - writer.WriteStringValue(value.ToString(DATETIME_FORMAT, DateTimeFormatInfo.InvariantInfo)); - } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Converters/__Internal/Newtonsoft.Json/DateTimeOffset/CstDateTimeOffsetConverter.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Converters/__Internal/Newtonsoft.Json/DateTimeOffset/CstDateTimeOffsetConverter.cs new file mode 100644 index 00000000..42aa68e8 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Converters/__Internal/Newtonsoft.Json/DateTimeOffset/CstDateTimeOffsetConverter.cs @@ -0,0 +1,7 @@ +namespace Newtonsoft.Json.Converters.Internal +{ + internal class CstDateTimeOffsetConverter : Common.FormattedDateTimeOffsetConverterBase + { + protected override string FormatString => "yyyy-MM-dd HH:mm:ss zzz CST"; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Converters/__Internal/System.Text.Json/DateTimeOffset/CstDateTimeOffsetConverter.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Converters/__Internal/System.Text.Json/DateTimeOffset/CstDateTimeOffsetConverter.cs new file mode 100644 index 00000000..94687a50 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Converters/__Internal/System.Text.Json/DateTimeOffset/CstDateTimeOffsetConverter.cs @@ -0,0 +1,7 @@ +namespace System.Text.Json.Serialization.Internal +{ + internal class CstDateTimeOffsetConverter : Common.FormattedDateTimeOffsetConverterBase + { + protected override string FormatString => "yyyy-MM-dd HH:mm:ss zzz CST"; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/DouyinMicroAppClient.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/DouyinMicroAppClient.cs new file mode 100644 index 00000000..843e473e --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/DouyinMicroAppClient.cs @@ -0,0 +1,103 @@ +using System; +using System.Net.Http; +using System.Threading; +using System.Threading.Tasks; +using Flurl.Http; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp +{ + /// + /// 一个抖音小程序 API HTTP 客户端。 + /// + public class DouyinMicroAppClient : CommonClientBase, ICommonClient + { + public readonly string _BASEURL_LEGACY; + + /// + /// 获取当前客户端使用的抖音小程序凭证。 + /// + public Settings.Credentials Credentials { get; } + + /// + /// 用指定的配置项初始化 类的新实例。 + /// + /// 配置项。 + public DouyinMicroAppClient(DouyinMicroAppClientOptions options) + : this(options, null) + { + } + + /// + /// + /// + /// + /// + /// + internal protected DouyinMicroAppClient(DouyinMicroAppClientOptions options, HttpClient? httpClient, bool disposeClient = true) + : base(httpClient, disposeClient) + { + if (options is null) throw new ArgumentNullException(nameof(options)); + + Credentials = new Settings.Credentials(options); + + FlurlClient.BaseUrl = options.Endpoint ?? DouyinMicroAppEndpoints.DEFAULT; + FlurlClient.WithTimeout(options.Timeout <= 0 ? Timeout.InfiniteTimeSpan : TimeSpan.FromMilliseconds(options.Timeout)); + + _BASEURL_LEGACY = options.EndpointForLegacy ?? DouyinMicroAppEndpoints.LEGACY_DEFAULT; + } + + /// + /// 使用当前客户端生成一个新的 对象。 + /// + /// + /// + /// + /// + public IFlurlRequest CreateFlurlRequest(DouyinMicroAppRequest request, HttpMethod httpMethod, params object[] urlSegments) + { + IFlurlRequest flurlRequest = base.CreateFlurlRequest(request, httpMethod, urlSegments); + + return flurlRequest; + } + + /// + /// 异步发起请求。 + /// + /// + /// + /// + /// + /// + public async Task SendFlurlRequestAsync(IFlurlRequest flurlRequest, HttpContent? httpContent = null, CancellationToken cancellationToken = default) + where T : DouyinMicroAppResponse, new() + { + if (flurlRequest is null) throw new ArgumentNullException(nameof(flurlRequest)); + + using IFlurlResponse flurlResponse = await base.SendFlurlRequestAsync(flurlRequest, httpContent, cancellationToken).ConfigureAwait(false); + return await WrapFlurlResponseAsJsonAsync(flurlResponse, cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步发起请求。 + /// + /// + /// + /// + /// + /// + public async Task SendFlurlRequestAsJsonAsync(IFlurlRequest flurlRequest, object? data = null, CancellationToken cancellationToken = default) + where T : DouyinMicroAppResponse, new() + { + if (flurlRequest is null) throw new ArgumentNullException(nameof(flurlRequest)); + + bool isSimpleRequest = data is null || + flurlRequest.Verb == HttpMethod.Get || + flurlRequest.Verb == HttpMethod.Head || + flurlRequest.Verb == HttpMethod.Options; + using IFlurlResponse flurlResponse = isSimpleRequest ? + await base.SendFlurlRequestAsync(flurlRequest, null, cancellationToken) : + await base.SendFlurlRequestAsJsonAsync(flurlRequest, data, cancellationToken).ConfigureAwait(false); + return await WrapFlurlResponseAsJsonAsync(flurlResponse, cancellationToken).ConfigureAwait(false); + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/DouyinMicroAppClientBuilder.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/DouyinMicroAppClientBuilder.cs new file mode 100644 index 00000000..22efdb02 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/DouyinMicroAppClientBuilder.cs @@ -0,0 +1,94 @@ +using System; +using System.Collections.Generic; +using System.Net.Http; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp +{ + /// + /// 用于构造 实例的构造器。 + /// + public partial class DouyinMicroAppClientBuilder : ICommonClientBuilder + { + private readonly DouyinMicroAppClientOptions _options; + private readonly IList> _configures; + private readonly IList _interceptors; + private HttpClient? _httpClient; + private bool? _disposeClient; + + private DouyinMicroAppClientBuilder(DouyinMicroAppClientOptions options) + { + _options = options; + _configures = new List>(); + _interceptors = new List(); + } + + ICommonClientBuilder ICommonClientBuilder.ConfigureSettings(Action configure) + { + return ConfigureSettings(configure); + } + + ICommonClientBuilder ICommonClientBuilder.UseInterceptor(HttpInterceptor interceptor) + { + return UseInterceptor(interceptor); + } + + ICommonClientBuilder ICommonClientBuilder.UseHttpClient(HttpClient httpClient, bool disposeClient) + { + return UseHttpClient(httpClient, disposeClient); + } + + public DouyinMicroAppClientBuilder ConfigureSettings(Action configure) + { + if (configure is null) throw new ArgumentNullException(nameof(configure)); + + _configures.Add(configure); + return this; + } + + public DouyinMicroAppClientBuilder UseInterceptor(HttpInterceptor interceptor) + { + if (interceptor is null) throw new ArgumentNullException(nameof(interceptor)); + + _interceptors.Add(interceptor); + return this; + } + + public DouyinMicroAppClientBuilder UseHttpClient(HttpClient httpClient, bool disposeClient = true) + { + if (httpClient is null) throw new ArgumentNullException(nameof(httpClient)); + + _httpClient = httpClient; + _disposeClient = disposeClient; + return this; + } + + public DouyinMicroAppClient Build() + { + DouyinMicroAppClient client = _disposeClient.HasValue + ? new DouyinMicroAppClient(_options, _httpClient, _disposeClient.Value) + : new DouyinMicroAppClient(_options, _httpClient); + + foreach (Action configure in _configures) + { + client.Configure(configure); + } + + foreach (HttpInterceptor interceptor in _interceptors) + { + client.Interceptors.Add(interceptor); + } + + return client; + } + } + + partial class DouyinMicroAppClientBuilder + { + public static DouyinMicroAppClientBuilder Create(DouyinMicroAppClientOptions options) + { + if (options is null) throw new ArgumentNullException(nameof(options)); + + return new DouyinMicroAppClientBuilder(options); + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/DouyinMicroAppClientOptions.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/DouyinMicroAppClientOptions.cs new file mode 100644 index 00000000..b9366aac --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/DouyinMicroAppClientOptions.cs @@ -0,0 +1,51 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp +{ + /// + /// 一个用于构造 时使用的配置项。 + /// + public class DouyinMicroAppClientOptions + { + /// + /// 获取或设置请求超时时间(单位:毫秒)。 + /// 默认值:30000 + /// + public int Timeout { get; set; } = 30 * 1000; + + /// + /// 获取或设置抖音小程序 API 入口点。 + /// 默认值: + /// + public string Endpoint { get; set; } = DouyinMicroAppEndpoints.DEFAULT; + + /// + /// 获取或设置抖音小程序旧版 API 入口点。 + /// 默认值: + /// + public string EndpointForLegacy { get; set; } = DouyinMicroAppEndpoints.LEGACY_DEFAULT; + + /// + /// 获取或设置抖音小程序 AppId。 + /// + public string AppId { get; set; } = default!; + + /// + /// 获取或设置抖音小程序 AppSecret。 + /// + public string AppSecret { get; set; } = default!; + + /// + /// 获取或设置抖音服务器推送的 Token。 + /// + public string? PushToken { get; set; } + + /// + /// 获取或设置抖音服务器推送的 EncodingAESKey。 + /// + public string? PushEncodingAESKey { get; set; } + + /// + /// 获取或设置用于担保支付请求签名的密钥。 + /// + public string? ECPaySalt { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/DouyinMicroAppEndpoints.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/DouyinMicroAppEndpoints.cs new file mode 100644 index 00000000..49ae3e76 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/DouyinMicroAppEndpoints.cs @@ -0,0 +1,23 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp +{ + /// + /// 抖音小程序 API 接口域名。 + /// + public static class DouyinMicroAppEndpoints + { + /// + /// 默认域名。 + /// + public const string DEFAULT = "https://open.douyin.com/api"; + + /// + /// 旧版接口默认域名。 + /// + public const string LEGACY_DEFAULT = "https://developer.toutiao.com/api"; + + /// + /// 旧版接口沙盒环境域名。 + /// + public const string LEGACY_SANGBOX = "https://open-sandbox.douyin.com/api"; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/DouyinMicroAppEvent.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/DouyinMicroAppEvent.cs new file mode 100644 index 00000000..68e69563 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/DouyinMicroAppEvent.cs @@ -0,0 +1,43 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp +{ + /// + /// 表示抖音小程序 API 消息推送事件的基类。 + /// + [Newtonsoft.Json.JsonObject] + [System.Xml.Serialization.XmlRoot("xml")] + public class DouyinMicroAppEvent : ICommonWebhookEvent + { + /// + /// 获取或设置消息接收方账号。 + /// + [Newtonsoft.Json.JsonProperty("ToUserName")] + [System.Text.Json.Serialization.JsonPropertyName("ToUserName")] + [System.Xml.Serialization.XmlElement("ToUserName", IsNullable = true)] + public virtual string? ToUserName { get; set; } + + /// + /// 获取或设置消息发送方账号。 + /// + [Newtonsoft.Json.JsonProperty("FromUserName")] + [System.Text.Json.Serialization.JsonPropertyName("FromUserName")] + [System.Xml.Serialization.XmlElement("FromUserName", IsNullable = true)] + public virtual string? FromUserName { get; set; } + + /// + /// 获取或设置消息类型。 + /// + [Newtonsoft.Json.JsonProperty("MsgType")] + [System.Text.Json.Serialization.JsonPropertyName("MsgType")] + [System.Xml.Serialization.XmlElement("MsgType", IsNullable = true)] + public virtual string? MessageType { get; set; } + + /// + /// 获取或设置消息创建时间戳。 + /// + [Newtonsoft.Json.JsonProperty("CreateTime")] + [System.Text.Json.Serialization.JsonPropertyName("CreateTime")] + [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)] + [System.Xml.Serialization.XmlElement("CreateTime")] + public virtual long CreateTimestamp { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/DouyinMicroAppException.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/DouyinMicroAppException.cs new file mode 100644 index 00000000..52e39674 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/DouyinMicroAppException.cs @@ -0,0 +1,27 @@ +using System; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp +{ + /// + /// 当调用抖音小程序 API 出错时引发的异常。 + /// + public class DouyinMicroAppException : CommonException + { + /// + public DouyinMicroAppException() + { + } + + /// + public DouyinMicroAppException(string message) + : base(message) + { + } + + /// + public DouyinMicroAppException(string message, Exception innerException) + : base(message, innerException) + { + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/DouyinMicroAppRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/DouyinMicroAppRequest.cs new file mode 100644 index 00000000..f7fe0b77 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/DouyinMicroAppRequest.cs @@ -0,0 +1,18 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp +{ + /// + /// 抖音小程序 API 请求的基类。 + /// + public abstract class DouyinMicroAppRequest : CommonRequestBase, ICommonRequest + { + /// + /// 获取或设置抖音小程序的 AccessToken/ClientToken/BusinessToken。 + /// + /// 注意:部分第三方平台的接口中该字段表示授权方的 AuthorizerAccessToken。 + /// + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public virtual string? AccessToken { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/DouyinMicroAppResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/DouyinMicroAppResponse.cs new file mode 100644 index 00000000..77e6c9ed --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/DouyinMicroAppResponse.cs @@ -0,0 +1,49 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp +{ + /// + /// 抖音小程序 API 响应的基类。 + /// + public abstract class DouyinMicroAppResponse : CommonResponseBase, ICommonResponse + { + /// + /// 获取抖音小程序 API 返回的错误号。 + /// + [Newtonsoft.Json.JsonProperty("err_no")] + [System.Text.Json.Serialization.JsonPropertyName("err_no")] + public virtual int ErrorNumber { get; set; } + + /// + /// 获取抖音小程序 API 返回的错误信息。 + /// + [Newtonsoft.Json.JsonProperty("err_tips")] + [System.Text.Json.Serialization.JsonPropertyName("err_tips")] + public virtual string? ErrorTips { get; set; } + + /// + /// 获取抖音小程序 API 返回的错误描述。 + /// + [Newtonsoft.Json.JsonProperty("err_msg")] + [System.Text.Json.Serialization.JsonPropertyName("err_msg")] + public virtual string? ErrorMessage { get; set; } + + /// + /// 获取抖音小程序 API 返回的日志 ID。 + /// + [Newtonsoft.Json.JsonProperty("log_id")] + [System.Text.Json.Serialization.JsonPropertyName("log_id")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] + public virtual string? LogId { get; set; } + + /// + /// 获取一个值,该值指示调用抖音小程序 API 是否成功。 + /// + ///(即 HTTP 状态码为 200,且 值为 0) + /// + /// + /// + public override bool IsSuccessful() + { + return GetRawStatus() == 200 && ErrorNumber == 0; + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Events/Message/ImageMessageEvent.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Events/Message/ImageMessageEvent.cs index dbdd380f..6edb1f52 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Events/Message/ImageMessageEvent.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Events/Message/ImageMessageEvent.cs @@ -1,10 +1,13 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Events +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Events { /// /// 表示 image 事件的数据。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/component/message-push-customer-service + /// + /// REF:
+ /// + ///
///
- public class ImageMessageEvent : ByteDanceMicroAppEvent, ByteDanceMicroAppEvent.Serialization.IJsonSerializable, ByteDanceMicroAppEvent.Serialization.IXmlSerializable + public class ImageMessageEvent : DouyinMicroAppEvent { /// /// 获取或设置图片 URL。 diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Events/Message/TextMessageEvent.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Events/Message/TextMessageEvent.cs index b5d4b833..65b3ecf1 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Events/Message/TextMessageEvent.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Events/Message/TextMessageEvent.cs @@ -2,9 +2,12 @@ namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Events { /// /// 表示 text 事件的数据。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/component/message-push-customer-service + /// + /// REF:
+ /// + ///
///
- public class TextMessageEvent : ByteDanceMicroAppEvent, ByteDanceMicroAppEvent.Serialization.IJsonSerializable, ByteDanceMicroAppEvent.Serialization.IXmlSerializable + public class TextMessageEvent : DouyinMicroAppEvent { /// /// 获取或设置消息内容。 diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Exceptions/ByteDanceMicroAppEventSerializationException.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Exceptions/ByteDanceMicroAppEventSerializationException.cs deleted file mode 100644 index 64cf1da3..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Exceptions/ByteDanceMicroAppEventSerializationException.cs +++ /dev/null @@ -1,24 +0,0 @@ -using System; - -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Exceptions -{ - public class ByteDanceMicroAppEventSerializationException : ByteDanceMicroAppException - { - /// - internal ByteDanceMicroAppEventSerializationException() - { - } - - /// - internal ByteDanceMicroAppEventSerializationException(string message) - : base(message) - { - } - - /// - internal ByteDanceMicroAppEventSerializationException(string message, Exception innerException) - : base(message, innerException) - { - } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Exceptions/ByteDanceMicroAppRequestTimeoutException.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Exceptions/ByteDanceMicroAppRequestTimeoutException.cs deleted file mode 100644 index cda3e0e6..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Exceptions/ByteDanceMicroAppRequestTimeoutException.cs +++ /dev/null @@ -1,24 +0,0 @@ -using System; - -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Exceptions -{ - public class ByteDanceMicroAppRequestTimeoutException : ByteDanceMicroAppException - { - /// - internal ByteDanceMicroAppRequestTimeoutException() - { - } - - /// - internal ByteDanceMicroAppRequestTimeoutException(string message) - : base(message) - { - } - - /// - internal ByteDanceMicroAppRequestTimeoutException(string message, Exception innerException) - : base(message, innerException) - { - } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/DouyinMicroAppOpenApiClient.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/DouyinMicroAppOpenApiClient.cs new file mode 100644 index 00000000..8db0f802 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/DouyinMicroAppOpenApiClient.cs @@ -0,0 +1,108 @@ +using System; +using System.Net.Http; +using System.Threading; +using System.Threading.Tasks; +using Flurl.Http; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi +{ + /// + /// 一个抖音小程序服务商平台 API HTTP 客户端。 + /// + public class DouyinMicroAppOpenApiClient : CommonClientBase, ICommonClient + { + public readonly string _BASEURL_LEGACY; + + /// + /// 获取当前客户端使用的抖音小程序凭证。 + /// + public Settings.Credentials Credentials { get; } + + /// + /// 用指定的配置项初始化 类的新实例。 + /// + /// 配置项。 + public DouyinMicroAppOpenApiClient(DouyinMicroAppOpenApiClientOptions options) + : this(options, null) + { + } + + /// + /// + /// + /// + /// + /// + internal protected DouyinMicroAppOpenApiClient(DouyinMicroAppOpenApiClientOptions options, HttpClient? httpClient, bool disposeClient = true) + : base(httpClient, disposeClient) + { + if (options is null) throw new ArgumentNullException(nameof(options)); + + Credentials = new Settings.Credentials(options); + + FlurlClient.BaseUrl = options.Endpoints ?? DouyinMicroAppOpenApiEndpoints.DEFAULT; + FlurlClient.WithTimeout(options.Timeout <= 0 ? Timeout.InfiniteTimeSpan : TimeSpan.FromMilliseconds(options.Timeout)); + + _BASEURL_LEGACY = options.EndpointForLegacy ?? DouyinMicroAppEndpoints.LEGACY_DEFAULT; + } + + /// + /// 使用当前客户端生成一个新的 对象。 + /// + /// + /// + /// + /// + public IFlurlRequest CreateFlurlRequest(DouyinMicroAppOpenApiRequest request, HttpMethod httpMethod, params object[] urlSegments) + { + IFlurlRequest flurlRequest = base.CreateFlurlRequest(request, httpMethod, urlSegments); + + if (request.ComponentAppId is null) + { + request.ComponentAppId = Credentials.ComponentAppId; + } + + return flurlRequest; + } + + /// + /// 异步发起请求。 + /// + /// + /// + /// + /// + /// + public async Task SendFlurlRequestAsync(IFlurlRequest flurlRequest, HttpContent? httpContent = null, CancellationToken cancellationToken = default) + where T : DouyinMicroAppOpenApiResponse, new() + { + if (flurlRequest is null) throw new ArgumentNullException(nameof(flurlRequest)); + + using IFlurlResponse flurlResponse = await base.SendFlurlRequestAsync(flurlRequest, httpContent, cancellationToken).ConfigureAwait(false); + return await WrapFlurlResponseAsJsonAsync(flurlResponse, cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步发起请求。 + /// + /// + /// + /// + /// + /// + public async Task SendFlurlRequestAsJsonAsync(IFlurlRequest flurlRequest, object? data = null, CancellationToken cancellationToken = default) + where T : DouyinMicroAppOpenApiResponse, new() + { + if (flurlRequest is null) throw new ArgumentNullException(nameof(flurlRequest)); + + bool isSimpleRequest = data is null || + flurlRequest.Verb == HttpMethod.Get || + flurlRequest.Verb == HttpMethod.Head || + flurlRequest.Verb == HttpMethod.Options; + using IFlurlResponse flurlResponse = isSimpleRequest ? + await base.SendFlurlRequestAsync(flurlRequest, null, cancellationToken) : + await base.SendFlurlRequestAsJsonAsync(flurlRequest, data, cancellationToken).ConfigureAwait(false); + return await WrapFlurlResponseAsJsonAsync(flurlResponse, cancellationToken).ConfigureAwait(false); + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/DouyinMicroAppOpenApiClientBuilder.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/DouyinMicroAppOpenApiClientBuilder.cs new file mode 100644 index 00000000..b4bce120 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/DouyinMicroAppOpenApiClientBuilder.cs @@ -0,0 +1,94 @@ +using System; +using System.Collections.Generic; +using System.Net.Http; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi +{ + /// + /// 用于构造 实例的构造器。 + /// + public partial class DouyinMicroAppOpenApiClientBuilder : ICommonClientBuilder + { + private readonly DouyinMicroAppOpenApiClientOptions _options; + private readonly IList> _configures; + private readonly IList _interceptors; + private HttpClient? _httpClient; + private bool? _disposeClient; + + private DouyinMicroAppOpenApiClientBuilder(DouyinMicroAppOpenApiClientOptions options) + { + _options = options; + _configures = new List>(); + _interceptors = new List(); + } + + ICommonClientBuilder ICommonClientBuilder.ConfigureSettings(Action configure) + { + return ConfigureSettings(configure); + } + + ICommonClientBuilder ICommonClientBuilder.UseInterceptor(HttpInterceptor interceptor) + { + return UseInterceptor(interceptor); + } + + ICommonClientBuilder ICommonClientBuilder.UseHttpClient(HttpClient httpClient, bool disposeClient) + { + return UseHttpClient(httpClient, disposeClient); + } + + public DouyinMicroAppOpenApiClientBuilder ConfigureSettings(Action configure) + { + if (configure is null) throw new ArgumentNullException(nameof(configure)); + + _configures.Add(configure); + return this; + } + + public DouyinMicroAppOpenApiClientBuilder UseInterceptor(HttpInterceptor interceptor) + { + if (interceptor is null) throw new ArgumentNullException(nameof(interceptor)); + + _interceptors.Add(interceptor); + return this; + } + + public DouyinMicroAppOpenApiClientBuilder UseHttpClient(HttpClient httpClient, bool disposeClient = true) + { + if (httpClient is null) throw new ArgumentNullException(nameof(httpClient)); + + _httpClient = httpClient; + _disposeClient = disposeClient; + return this; + } + + public DouyinMicroAppOpenApiClient Build() + { + DouyinMicroAppOpenApiClient client = _disposeClient.HasValue + ? new DouyinMicroAppOpenApiClient(_options, _httpClient, _disposeClient.Value) + : new DouyinMicroAppOpenApiClient(_options, _httpClient); + + foreach (Action configure in _configures) + { + client.Configure(configure); + } + + foreach (HttpInterceptor interceptor in _interceptors) + { + client.Interceptors.Add(interceptor); + } + + return client; + } + } + + partial class DouyinMicroAppOpenApiClientBuilder + { + public static DouyinMicroAppOpenApiClientBuilder Create(DouyinMicroAppOpenApiClientOptions options) + { + if (options is null) throw new ArgumentNullException(nameof(options)); + + return new DouyinMicroAppOpenApiClientBuilder(options); + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/DouyinMicroAppOpenApiClientOptions.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/DouyinMicroAppOpenApiClientOptions.cs new file mode 100644 index 00000000..264d36a4 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/DouyinMicroAppOpenApiClientOptions.cs @@ -0,0 +1,46 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi +{ + /// + /// 一个用于构造 时使用的配置项。 + /// + public class DouyinMicroAppOpenApiClientOptions + { + /// + /// 获取或设置请求超时时间(单位:毫秒)。 + /// 默认值:30000 + /// + public int Timeout { get; set; } = 30 * 1000; + + /// + /// 获取或设置抖音小程序服务商平台 API 入口点。 + /// 默认值: + /// + public string Endpoints { get; set; } = DouyinMicroAppOpenApiEndpoints.DEFAULT; + + /// + /// 获取或设置抖音小程序服务商平台旧版 API 入口点。 + /// 默认值: + /// + public string EndpointForLegacy { get; set; } = DouyinMicroAppOpenApiEndpoints.LEGACY_DEFAULT; + + /// + /// 获取或设置抖音小程序服务商 AppId。 + /// + public string ComponentAppId { get; set; } = default!; + + /// + /// 获取或设置抖音小程序服务商 AppSecret。 + /// + public string ComponentAppSecret { get; set; } = default!; + + /// + /// 获取或设置头条服务器推送的 Token。 + /// + public string? PushToken { get; set; } + + /// + /// 获取或设置头条服务器推送的 EncodingAESKey。 + /// + public string? PushEncodingAESKey { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/DouyinMicroAppOpenApiEndpoints.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/DouyinMicroAppOpenApiEndpoints.cs new file mode 100644 index 00000000..19f53ccf --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/DouyinMicroAppOpenApiEndpoints.cs @@ -0,0 +1,18 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi +{ + /// + /// 抖音小程序服务商平台 API 接口域名。 + /// + public static class DouyinMicroAppOpenApiEndpoints + { + /// + /// 默认域名。 + /// + public const string DEFAULT = "https://open.douyin.com/api"; + + /// + /// 旧版接口服务商平台接口域名。 + /// + public const string LEGACY_DEFAULT = "https://open.microapp.bytedance.com/openapi"; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/DouyinMicroAppOpenApiEvent.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/DouyinMicroAppOpenApiEvent.cs new file mode 100644 index 00000000..dd4b4cf3 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/DouyinMicroAppOpenApiEvent.cs @@ -0,0 +1,41 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi +{ + /// + /// 表示抖音小程序服务商平台 API 消息推送事件的基类。 + /// + public class DouyinMicroAppOpenApiEvent : ICommonWebhookEvent + { + /// + /// 获取或设置第三方平台 AppId。 + /// + [Newtonsoft.Json.JsonProperty("TpAppId")] + [System.Text.Json.Serialization.JsonPropertyName("TpAppId")] + [System.Xml.Serialization.XmlElement("TpAppId", IsNullable = true)] + public virtual string? ComponentAppId { get; set; } + + /// + /// 获取或设置授权方 AppId。 + /// + [Newtonsoft.Json.JsonProperty("AppId")] + [System.Text.Json.Serialization.JsonPropertyName("AppId")] + [System.Xml.Serialization.XmlElement("AppId", IsNullable = true)] + public virtual string? AuthorizerAppId { get; set; } + + /// + /// 获取或设置事件类型。 + /// + [Newtonsoft.Json.JsonProperty("Event")] + [System.Text.Json.Serialization.JsonPropertyName("Event")] + [System.Xml.Serialization.XmlElement("Event", IsNullable = true)] + public virtual string? Event { get; set; } + + /// + /// 获取或设置事件产生时间字符串(格式:yyyy-MM-dd HH:mm:ss)。 + /// + [Newtonsoft.Json.JsonProperty("EventTime")] + [System.Text.Json.Serialization.JsonPropertyName("EventTime")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] + [System.Xml.Serialization.XmlElement("EventTime", IsNullable = true)] + public virtual string? EventTimeString { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/DouyinMicroAppOpenApiRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/DouyinMicroAppOpenApiRequest.cs new file mode 100644 index 00000000..759d34d1 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/DouyinMicroAppOpenApiRequest.cs @@ -0,0 +1,38 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi +{ + /// + /// 抖音小程序服务商平台 API 请求的基类。 + /// + public abstract class DouyinMicroAppOpenApiRequest : CommonRequestBase, ICommonRequest + { + /// + /// 获取或设置抖音小程序第三方 AppId。如果不指定将使用构造 时的 参数。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public virtual string? ComponentAppId { get; set; } + + /// + /// 获取或设置抖音小程序第三方的 AccessToken。 + /// 注意:v1、v2 版的 ComponentAccessToken 不可混用。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public virtual string? ComponentAccessToken { get; set; } + + /// + /// 获取或设置抖音小程序授权方 AppId。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public virtual string? AuthorizerAppId { get; set; } + + /// + /// 获取或设置抖音小程序授权方的 AccessToken。 + /// 注意:v1、v2 版的 AuthorizerAccessToken 不可混用。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public virtual string? AuthorizerAccessToken { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/DouyinMicroAppOpenApiResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/DouyinMicroAppOpenApiResponse.cs new file mode 100644 index 00000000..6fde12df --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/DouyinMicroAppOpenApiResponse.cs @@ -0,0 +1,42 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi +{ + /// + /// 抖音小程序服务商平台 API 响应的基类。 + /// + public abstract class DouyinMicroAppOpenApiResponse : CommonResponseBase, ICommonResponse + { + /// + /// 获取抖音小程序 API 返回的错误码。 + /// + [Newtonsoft.Json.JsonProperty("err_no")] + [System.Text.Json.Serialization.JsonPropertyName("err_no")] + public virtual int ErrorNumber { get; set; } + + /// + /// 获取抖音小程序 API 返回的错误描述。 + /// + [Newtonsoft.Json.JsonProperty("err_msg")] + [System.Text.Json.Serialization.JsonPropertyName("err_msg")] + public virtual string? ErrorMessage { get; set; } + + /// + /// 获取抖音小程序 API 返回的日志 ID。 + /// + [Newtonsoft.Json.JsonProperty("log_id")] + [System.Text.Json.Serialization.JsonPropertyName("log_id")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] + public virtual string? LogId { get; set; } + + /// + /// 获取一个值,该值指示调用抖音小程序 API 是否成功。 + /// + ///(即 HTTP 状态码为 200,且 值为 0) + /// + /// + /// + public override bool IsSuccessful() + { + return GetRawStatus() == 200 && ErrorNumber == 0; + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Events/Auth/ComponentAuthorizedEvent.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Events/Auth/ComponentAuthorizedEvent.cs similarity index 83% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Events/Auth/ComponentAuthorizedEvent.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Events/Auth/ComponentAuthorizedEvent.cs index 0715de82..e70e5e66 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Events/Auth/ComponentAuthorizedEvent.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Events/Auth/ComponentAuthorizedEvent.cs @@ -1,10 +1,13 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Events +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Events { /// /// 表示 EVENT.AUTHORIZED 事件的数据。 - /// REF: https://partner.open-douyin.com/docs/resource/zh-CN/thirdparty/API/smallprogram/authorization/notify + /// + /// REF:
+ /// + ///
///
- public class ComponentAuthorizedEvent : ByteDanceMicroAppOpenApiEvent, ByteDanceMicroAppOpenApiEvent.Serialization.IJsonSerializable, ByteDanceMicroAppOpenApiEvent.Serialization.IXmlSerializable + public class ComponentAuthorizedEvent : DouyinMicroAppOpenApiEvent { /// /// 获取或设置授权码。 @@ -12,7 +15,7 @@ public class ComponentAuthorizedEvent : ByteDanceMicroAppOpenApiEvent, ByteDance [Newtonsoft.Json.JsonProperty("AuthorizationCode")] [System.Text.Json.Serialization.JsonPropertyName("AuthorizationCode")] [System.Xml.Serialization.XmlElement("AuthorizationCode")] - public string AuthCode { get; set; } = default!; + public string AuthorizationCode { get; set; } = default!; /// /// 获取或设置授权码有效期(单位:秒)。 @@ -20,7 +23,7 @@ public class ComponentAuthorizedEvent : ByteDanceMicroAppOpenApiEvent, ByteDance [Newtonsoft.Json.JsonProperty("AuthorizationCodeExpiresIn")] [System.Text.Json.Serialization.JsonPropertyName("AuthorizationCodeExpiresIn")] [System.Xml.Serialization.XmlElement("AuthorizationCodeExpiresIn")] - public long AuthCodeExpiresIn { get; set; } + public long AuthorizationCodeExpiresIn { get; set; } /// /// 获取或设置代创建的小程序名称。 diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Events/Auth/ComponentPushTicketEvent.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Events/Auth/ComponentPushTicketEvent.cs similarity index 78% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Events/Auth/ComponentPushTicketEvent.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Events/Auth/ComponentPushTicketEvent.cs index df6e86f8..1df06dc4 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Events/Auth/ComponentPushTicketEvent.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Events/Auth/ComponentPushTicketEvent.cs @@ -1,10 +1,13 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Events +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Events { /// /// 表示 PUSH.Ticket 事件的数据。 - /// REF: https://partner.open-douyin.com/docs/resource/zh-CN/thirdparty/API/smallprogram/authorization/componentticket + /// + /// REF:
+ /// + ///
///
- public class ComponentPushTicketEvent : ByteDanceMicroAppOpenApiEvent, ByteDanceMicroAppOpenApiEvent.Serialization.IJsonSerializable, ByteDanceMicroAppOpenApiEvent.Serialization.IXmlSerializable + public class ComponentPushTicketEvent : DouyinMicroAppOpenApiEvent { /// /// 获取或设置消息发送方账号。 diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Events/Auth/ComponentUnauthorizedEvent.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Events/Auth/ComponentUnauthorizedEvent.cs new file mode 100644 index 00000000..61fe2ab8 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Events/Auth/ComponentUnauthorizedEvent.cs @@ -0,0 +1,13 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Events +{ + /// + /// 表示 EVENT.UNAUTHORIZED 事件的数据。 + /// + /// REF:
+ /// + ///
+ ///
+ public class ComponentUnauthorizedEvent : DouyinMicroAppOpenApiEvent + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Events/Auth/ComponentUpdateAuthorizedEvent.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Events/Auth/ComponentUpdateAuthorizedEvent.cs new file mode 100644 index 00000000..d1e180f8 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Events/Auth/ComponentUpdateAuthorizedEvent.cs @@ -0,0 +1,28 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Events +{ + /// + /// 表示 EVENT.UPDATE_AUTHORIZED 事件的数据。 + /// + /// REF:
+ /// + ///
+ ///
+ public class ComponentUpdateAuthorizedEvent : DouyinMicroAppOpenApiEvent + { + /// + /// 获取或设置授权码。 + /// + [Newtonsoft.Json.JsonProperty("AuthorizationCode")] + [System.Text.Json.Serialization.JsonPropertyName("AuthorizationCode")] + [System.Xml.Serialization.XmlElement("AuthorizationCode")] + public string AuthorizationCode { get; set; } = default!; + + /// + /// 获取或设置授权码有效期(单位:秒)。 + /// + [Newtonsoft.Json.JsonProperty("AuthorizationCodeExpiresIn")] + [System.Text.Json.Serialization.JsonPropertyName("AuthorizationCodeExpiresIn")] + [System.Xml.Serialization.XmlElement("AuthorizationCodeExpiresIn")] + public long AuthorizationCodeExpiresIn { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Events/MicroAppManagement/AppNameResetEvent.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Events/MicroAppManagement/AppNameResetEvent.cs new file mode 100644 index 00000000..f09b440d --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Events/MicroAppManagement/AppNameResetEvent.cs @@ -0,0 +1,20 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Events +{ + /// + /// 表示 EVENT.APP_NAME_RESET_NOTIFICATION 事件的数据。 + /// + /// REF:
+ /// + ///
+ ///
+ public class AppNameResetEvent : DouyinMicroAppOpenApiEvent + { + /// + /// 获取或设置名称重置通知。 + /// + [Newtonsoft.Json.JsonProperty("AppNameResetNotification")] + [System.Text.Json.Serialization.JsonPropertyName("AppNameResetNotification")] + [System.Xml.Serialization.XmlElement("AppNameResetNotification")] + public string AppNameResetNotification { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Events/MicroAppManagement/ModifyAppCategoryEvent.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Events/MicroAppManagement/ModifyAppCategoryEvent.cs similarity index 80% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Events/MicroAppManagement/ModifyAppCategoryEvent.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Events/MicroAppManagement/ModifyAppCategoryEvent.cs index ac4c8903..07946cba 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Events/MicroAppManagement/ModifyAppCategoryEvent.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Events/MicroAppManagement/ModifyAppCategoryEvent.cs @@ -1,11 +1,14 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Events +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Events { /// /// 表示 EVENT.MODIFY_APP_CATEGORY 事件的数据。 - /// REF: https://partner.open-douyin.com/docs/resource/zh-CN/thirdparty/API/smallprogram/auth-app-manage/base-info/add-category - /// REF: https://partner.open-douyin.com/docs/resource/zh-CN/thirdparty/API/smallprogram/auth-app-manage/base-info/supply-category + /// + /// REF:
+ ///
+ /// + ///
///
- public class ModifyAppCategoryEvent : ByteDanceMicroAppOpenApiEvent, ByteDanceMicroAppOpenApiEvent.Serialization.IJsonSerializable, ByteDanceMicroAppOpenApiEvent.Serialization.IXmlSerializable + public class ModifyAppCategoryEvent : DouyinMicroAppOpenApiEvent { public static class Types { diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Events/MicroAppManagement/ModifyAppIconEvent.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Events/MicroAppManagement/ModifyAppIconEvent.cs similarity index 77% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Events/MicroAppManagement/ModifyAppIconEvent.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Events/MicroAppManagement/ModifyAppIconEvent.cs index 4f97e5bc..f5caa00f 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Events/MicroAppManagement/ModifyAppIconEvent.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Events/MicroAppManagement/ModifyAppIconEvent.cs @@ -1,10 +1,13 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Events +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Events { /// /// 表示 EVENT.MODIFY_APP_ICON 事件的数据。 - /// REF: https://partner.open-douyin.com/docs/resource/zh-CN/thirdparty/API/smallprogram/auth-app-manage/base-info/modify-icon + /// + /// REF:
+ /// + ///
///
- public class ModifyAppIconEvent : ByteDanceMicroAppOpenApiEvent, ByteDanceMicroAppOpenApiEvent.Serialization.IJsonSerializable, ByteDanceMicroAppOpenApiEvent.Serialization.IXmlSerializable + public class ModifyAppIconEvent : DouyinMicroAppOpenApiEvent { public static class Types { diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Events/MicroAppManagement/ModifyAppIntroductionEvent.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Events/MicroAppManagement/ModifyAppIntroductionEvent.cs similarity index 76% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Events/MicroAppManagement/ModifyAppIntroductionEvent.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Events/MicroAppManagement/ModifyAppIntroductionEvent.cs index c9acc349..559eb635 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Events/MicroAppManagement/ModifyAppIntroductionEvent.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Events/MicroAppManagement/ModifyAppIntroductionEvent.cs @@ -1,10 +1,13 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Events +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Events { /// /// 表示 EVENT.MODIFY_APP_INTRO 事件的数据。 - /// REF: https://partner.open-douyin.com/docs/resource/zh-CN/thirdparty/API/smallprogram/auth-app-manage/base-info/modify-intro + /// + /// REF:
+ /// + ///
///
- public class ModifyAppIntroductionEvent : ByteDanceMicroAppOpenApiEvent, ByteDanceMicroAppOpenApiEvent.Serialization.IJsonSerializable, ByteDanceMicroAppOpenApiEvent.Serialization.IXmlSerializable + public class ModifyAppIntroductionEvent : DouyinMicroAppOpenApiEvent { public static class Types { diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Events/MicroAppManagement/ModifyAppNameEvent.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Events/MicroAppManagement/ModifyAppNameEvent.cs similarity index 81% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Events/MicroAppManagement/ModifyAppNameEvent.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Events/MicroAppManagement/ModifyAppNameEvent.cs index ce4eaffd..50aa2479 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Events/MicroAppManagement/ModifyAppNameEvent.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Events/MicroAppManagement/ModifyAppNameEvent.cs @@ -1,10 +1,13 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Events +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Events { /// /// 表示 EVENT.MODIFY_APP_NAME 事件的数据。 - /// REF: https://partner.open-douyin.com/docs/resource/zh-CN/thirdparty/API/smallprogram/auth-app-manage/base-info/modify-name + /// + /// REF:
+ /// + ///
///
- public class ModifyAppNameEvent : ByteDanceMicroAppOpenApiEvent, ByteDanceMicroAppOpenApiEvent.Serialization.IJsonSerializable, ByteDanceMicroAppOpenApiEvent.Serialization.IXmlSerializable + public class ModifyAppNameEvent : DouyinMicroAppOpenApiEvent { public static class Types { diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Events/MicroAppManagement/PackageAuditEvent.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Events/MicroAppManagement/PackageAuditEvent.cs similarity index 92% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Events/MicroAppManagement/PackageAuditEvent.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Events/MicroAppManagement/PackageAuditEvent.cs index c6004401..939ee49b 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Events/MicroAppManagement/PackageAuditEvent.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Events/MicroAppManagement/PackageAuditEvent.cs @@ -1,10 +1,13 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Events +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Events { /// /// 表示 EVENT.PACKAGE_AUDIT 事件的数据。 - /// REF: https://partner.open-douyin.com/docs/resource/zh-CN/thirdparty/API/smallprogram/auth-app-manage/develop/audit-code + /// + /// REF:
+ /// + ///
///
- public class PackageAuditEvent : ByteDanceMicroAppOpenApiEvent, ByteDanceMicroAppOpenApiEvent.Serialization.IJsonSerializable, ByteDanceMicroAppOpenApiEvent.Serialization.IXmlSerializable + public class PackageAuditEvent : DouyinMicroAppOpenApiEvent { public static class Types { diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Events/MicroAppOperation/AliasAuditResultEvent.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Events/MicroAppOperation/AliasAuditResultEvent.cs similarity index 80% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Events/MicroAppOperation/AliasAuditResultEvent.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Events/MicroAppOperation/AliasAuditResultEvent.cs index f691266d..49080198 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Events/MicroAppOperation/AliasAuditResultEvent.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Events/MicroAppOperation/AliasAuditResultEvent.cs @@ -1,10 +1,13 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Events +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Events { /// /// 表示 EVENT.ALIAS_AUDIT_RESULT 事件的数据。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/thirdparty/API/smallprogram/auth-app-manage/operation/microapp/alias-search-tag + /// + /// REF:
+ /// + ///
///
- public class AliasAuditResultEvent : ByteDanceMicroAppOpenApiEvent, ByteDanceMicroAppOpenApiEvent.Serialization.IJsonSerializable, ByteDanceMicroAppOpenApiEvent.Serialization.IXmlSerializable + public class AliasAuditResultEvent : DouyinMicroAppOpenApiEvent { public static class Types { diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Events/MicroAppOperation/ApplyCapabilityEvent.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Events/MicroAppOperation/ApplyCapabilityEvent.cs new file mode 100644 index 00000000..0bbee4b1 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Events/MicroAppOperation/ApplyCapabilityEvent.cs @@ -0,0 +1,55 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Events +{ + /// + /// 表示 EVENT.APPLY_CAPACITY 事件的数据。 + /// + /// REF:
+ ///
+ ///
+ ///
+ ///
+ ///
+ /// + ///
+ ///
+ public class ApplyCapabilityEvent : DouyinMicroAppOpenApiEvent + { + public static class Types + { + public class EventContent + { + /// + /// 获取或设置挂载能力标识。 + /// + [Newtonsoft.Json.JsonProperty("capacity_key")] + [System.Text.Json.Serialization.JsonPropertyName("capacity_key")] + [System.Xml.Serialization.XmlElement("capacity_key")] + public string CapacityKey { get; set; } = default!; + + /// + /// 获取或设置审核结果。 + /// + [Newtonsoft.Json.JsonProperty("status")] + [System.Text.Json.Serialization.JsonPropertyName("status")] + [System.Xml.Serialization.XmlElement("status")] + public int Status { get; set; } + + /// + /// 获取或设置审核拒绝原因。 + /// + [Newtonsoft.Json.JsonProperty("reason")] + [System.Text.Json.Serialization.JsonPropertyName("reason")] + [System.Xml.Serialization.XmlElement("reason", IsNullable = true)] + public string? RejectReason { get; set; } + } + } + + /// + /// 获取或设置事件内容。 + /// + [Newtonsoft.Json.JsonProperty("EventContent")] + [System.Text.Json.Serialization.JsonPropertyName("EventContent")] + [System.Xml.Serialization.XmlElement("EventContent")] + public Types.EventContent EventContent { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Events/MicroAppOperation/ApplyLiveCapabilityEvent.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Events/MicroAppOperation/ApplyLiveCapabilityEvent.cs similarity index 76% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Events/MicroAppOperation/ApplyLiveCapabilityEvent.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Events/MicroAppOperation/ApplyLiveCapabilityEvent.cs index 848ff52a..b7eda5d1 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Events/MicroAppOperation/ApplyLiveCapabilityEvent.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Events/MicroAppOperation/ApplyLiveCapabilityEvent.cs @@ -1,10 +1,13 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Events +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Events { /// /// 表示 EVENT.APPLY_LIVE_CAPABILITY 事件的数据。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/thirdparty/API/smallprogram/auth-app-manage/operation/microapp/live-application + /// + /// REF:
+ /// + ///
///
- public class ApplyLiveCapabilityEvent : ByteDanceMicroAppOpenApiEvent, ByteDanceMicroAppOpenApiEvent.Serialization.IJsonSerializable, ByteDanceMicroAppOpenApiEvent.Serialization.IXmlSerializable + public class ApplyLiveCapabilityEvent : DouyinMicroAppOpenApiEvent { public static class Types { diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Events/MicroAppOperation/ApplyPhoneNumberCapabilityEvent.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Events/MicroAppOperation/ApplyPhoneNumberCapabilityEvent.cs similarity index 76% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Events/MicroAppOperation/ApplyPhoneNumberCapabilityEvent.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Events/MicroAppOperation/ApplyPhoneNumberCapabilityEvent.cs index 8330d110..0759e388 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Events/MicroAppOperation/ApplyPhoneNumberCapabilityEvent.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Events/MicroAppOperation/ApplyPhoneNumberCapabilityEvent.cs @@ -1,10 +1,13 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Events +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Events { /// /// 表示 EVENT.APPLY_PHONE_NUMBER_CAPABILITY 事件的数据。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/thirdparty/API/smallprogram/auth-app-manage/operation/microapp/phone-number-application + /// + /// REF:
+ /// + ///
///
- public class ApplyPhoneNumberCapabilityEvent : ByteDanceMicroAppOpenApiEvent, ByteDanceMicroAppOpenApiEvent.Serialization.IJsonSerializable, ByteDanceMicroAppOpenApiEvent.Serialization.IXmlSerializable + public class ApplyPhoneNumberCapabilityEvent : DouyinMicroAppOpenApiEvent { public static class Types { diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Events/MicroAppOperation/ApplyShareTemplateEvent.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Events/MicroAppOperation/ApplyShareTemplateEvent.cs similarity index 75% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Events/MicroAppOperation/ApplyShareTemplateEvent.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Events/MicroAppOperation/ApplyShareTemplateEvent.cs index a48ba10b..1068d404 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Events/MicroAppOperation/ApplyShareTemplateEvent.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Events/MicroAppOperation/ApplyShareTemplateEvent.cs @@ -1,11 +1,14 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Events +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Events { /// /// 表示 EVENT.APPLY_SHARE_TEMPLATE 事件的数据。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/thirdparty/API/smallprogram/auth-app-manage/operation/microapp/addShareTpl - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/thirdparty/API/smallprogram/auth-app-manage/operation/microapp/modifyShareTpl + /// + /// REF:
+ ///
+ /// + ///
///
- public class ApplyShareTemplateEvent : ByteDanceMicroAppOpenApiEvent, ByteDanceMicroAppOpenApiEvent.Serialization.IJsonSerializable, ByteDanceMicroAppOpenApiEvent.Serialization.IXmlSerializable + public class ApplyShareTemplateEvent : DouyinMicroAppOpenApiEvent { public static class Types { diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Events/MicroAppOperation/ApplyVideoCapabilityEvent.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Events/MicroAppOperation/ApplyVideoCapabilityEvent.cs similarity index 76% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Events/MicroAppOperation/ApplyVideoCapabilityEvent.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Events/MicroAppOperation/ApplyVideoCapabilityEvent.cs index 3a97d483..1ca404c6 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Events/MicroAppOperation/ApplyVideoCapabilityEvent.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Events/MicroAppOperation/ApplyVideoCapabilityEvent.cs @@ -1,10 +1,13 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Events +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Events { /// /// 表示 EVENT.APPLY_VIDEO_CAPABILITY 事件的数据。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/thirdparty/API/smallprogram/auth-app-manage/operation/microapp/video-application + /// + /// REF:
+ /// + ///
///
- public class ApplyVideoCapabilityEvent : ByteDanceMicroAppOpenApiEvent, ByteDanceMicroAppOpenApiEvent.Serialization.IJsonSerializable, ByteDanceMicroAppOpenApiEvent.Serialization.IXmlSerializable + public class ApplyVideoCapabilityEvent : DouyinMicroAppOpenApiEvent { public static class Types { diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Events/MicroAppOperation/AwemePermissionAuditResultEvent.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Events/MicroAppOperation/AwemePermissionAuditResultEvent.cs similarity index 81% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Events/MicroAppOperation/AwemePermissionAuditResultEvent.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Events/MicroAppOperation/AwemePermissionAuditResultEvent.cs index c61e93f9..3d4511ed 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Events/MicroAppOperation/AwemePermissionAuditResultEvent.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Events/MicroAppOperation/AwemePermissionAuditResultEvent.cs @@ -1,10 +1,13 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Events +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Events { /// /// 表示 EVENT.AWEME_PERMISSION_AUDIT_RESULT 事件的数据。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/thirdparty/API/smallprogram/auth-app-manage/operation/all/douyin + /// + /// REF:
+ /// + ///
///
- public class AwemePermissionAuditResultEvent : ByteDanceMicroAppOpenApiEvent, ByteDanceMicroAppOpenApiEvent.Serialization.IJsonSerializable, ByteDanceMicroAppOpenApiEvent.Serialization.IXmlSerializable + public class AwemePermissionAuditResultEvent : DouyinMicroAppOpenApiEvent { public static class Types { diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Events/MicroAppOperation/AwemeVideoKeywordAuditResultEvent.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Events/MicroAppOperation/AwemeVideoKeywordAuditResultEvent.cs similarity index 80% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Events/MicroAppOperation/AwemeVideoKeywordAuditResultEvent.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Events/MicroAppOperation/AwemeVideoKeywordAuditResultEvent.cs index c9ef8ded..f8bcc588 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Events/MicroAppOperation/AwemeVideoKeywordAuditResultEvent.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Events/MicroAppOperation/AwemeVideoKeywordAuditResultEvent.cs @@ -1,10 +1,13 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Events +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Events { /// /// 表示 EVENT.AWEME_VIDEO_KEYWORD_AUDIT_RESULT 事件的数据。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/thirdparty/API/smallprogram/auth-app-manage/operation/all/aweme-video-keyword + /// + /// REF:
+ /// + ///
///
- public class AwemeVideoKeywordAuditResultEvent : ByteDanceMicroAppOpenApiEvent, ByteDanceMicroAppOpenApiEvent.Serialization.IJsonSerializable, ByteDanceMicroAppOpenApiEvent.Serialization.IXmlSerializable + public class AwemeVideoKeywordAuditResultEvent : DouyinMicroAppOpenApiEvent { public static class Types { diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Events/MicroAppOperation/BindAwemeUserEvent.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Events/MicroAppOperation/BindAwemeUserEvent.cs similarity index 83% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Events/MicroAppOperation/BindAwemeUserEvent.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Events/MicroAppOperation/BindAwemeUserEvent.cs index 19016557..d9a2db8d 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Events/MicroAppOperation/BindAwemeUserEvent.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Events/MicroAppOperation/BindAwemeUserEvent.cs @@ -1,10 +1,13 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Events +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Events { /// /// 表示 EVENT.BIND_AWEME_USER 事件的数据。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/thirdparty/API/smallprogram/auth-app-manage/operation/microapp/follow-aweme + /// + /// REF:
+ /// + ///
///
- public class BindAwemeUserEvent : ByteDanceMicroAppOpenApiEvent, ByteDanceMicroAppOpenApiEvent.Serialization.IJsonSerializable, ByteDanceMicroAppOpenApiEvent.Serialization.IXmlSerializable + public class BindAwemeUserEvent : DouyinMicroAppOpenApiEvent { public static class Types { diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Events/MicroAppOperation/CreateSubscribeNotificationTemplateResultEvent.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Events/MicroAppOperation/CreateSubscribeNotificationTemplateResultEvent.cs similarity index 85% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Events/MicroAppOperation/CreateSubscribeNotificationTemplateResultEvent.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Events/MicroAppOperation/CreateSubscribeNotificationTemplateResultEvent.cs index 860fcfbd..354783db 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Events/MicroAppOperation/CreateSubscribeNotificationTemplateResultEvent.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Events/MicroAppOperation/CreateSubscribeNotificationTemplateResultEvent.cs @@ -1,10 +1,13 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Events +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Events { /// /// 表示 EVENT.CREATE_SUBSCRIBE_NOTIFICATION_TEMPLATE_RESULT 事件的数据。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/thirdparty/API/smallprogram/auth-app-manage/operation/microapp/subscribe-notification-template + /// + /// REF:
+ /// + ///
///
- public class CreateSubscribeNotificationTemplateResultEvent : ByteDanceMicroAppOpenApiEvent, ByteDanceMicroAppOpenApiEvent.Serialization.IJsonSerializable, ByteDanceMicroAppOpenApiEvent.Serialization.IXmlSerializable + public class CreateSubscribeNotificationTemplateResultEvent : DouyinMicroAppOpenApiEvent { public static class Types { diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Events/MicroAppOperation/ScopeQuotaAuditResultEvent.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Events/MicroAppOperation/ScopeQuotaAuditResultEvent.cs similarity index 87% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Events/MicroAppOperation/ScopeQuotaAuditResultEvent.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Events/MicroAppOperation/ScopeQuotaAuditResultEvent.cs index 8865289b..6fde3687 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Events/MicroAppOperation/ScopeQuotaAuditResultEvent.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Events/MicroAppOperation/ScopeQuotaAuditResultEvent.cs @@ -1,10 +1,13 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Events +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Events { /// /// 表示 EVENT.SCOPE_QUOTA_AUDIT_RESULT 事件的数据。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/thirdparty/API/smallprogram/auth-app-manage/operation/all/scope-quota + /// + /// REF:
+ /// + ///
///
- public class ScopeQuotaAuditResultEvent : ByteDanceMicroAppOpenApiEvent, ByteDanceMicroAppOpenApiEvent.Serialization.IJsonSerializable, ByteDanceMicroAppOpenApiEvent.Serialization.IXmlSerializable + public class ScopeQuotaAuditResultEvent : DouyinMicroAppOpenApiEvent { public static class Types { diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Events/MicroAppOperation/SearchTagAuditResultEvent.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Events/MicroAppOperation/SearchTagAuditResultEvent.cs similarity index 80% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Events/MicroAppOperation/SearchTagAuditResultEvent.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Events/MicroAppOperation/SearchTagAuditResultEvent.cs index 2d09b250..7dac167c 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Events/MicroAppOperation/SearchTagAuditResultEvent.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Events/MicroAppOperation/SearchTagAuditResultEvent.cs @@ -1,10 +1,13 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Events +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Events { /// /// 表示 EVENT.SEARCH_TAG_AUDIT_RESULT 事件的数据。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/thirdparty/API/smallprogram/auth-app-manage/operation/microapp/alias-search-tag + /// + /// REF:
+ /// + ///
///
- public class SearchTagAuditResultEvent : ByteDanceMicroAppOpenApiEvent, ByteDanceMicroAppOpenApiEvent.Serialization.IJsonSerializable, ByteDanceMicroAppOpenApiEvent.Serialization.IXmlSerializable + public class SearchTagAuditResultEvent : DouyinMicroAppOpenApiEvent { public static class Types { diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Events/MicroAppOperation/SelfMountBindEvent.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Events/MicroAppOperation/SelfMountBindEvent.cs similarity index 83% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Events/MicroAppOperation/SelfMountBindEvent.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Events/MicroAppOperation/SelfMountBindEvent.cs index 0771083d..20737026 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Events/MicroAppOperation/SelfMountBindEvent.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Events/MicroAppOperation/SelfMountBindEvent.cs @@ -1,10 +1,13 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Events +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Events { /// /// 表示 EVENT.SELT_MOUNT_BIND 事件的数据。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/thirdparty/API/smallprogram/auth-app-manage/operation/microapp/self-mount + /// + /// REF:
+ /// + ///
///
- public class SelfMountBindEvent : ByteDanceMicroAppOpenApiEvent, ByteDanceMicroAppOpenApiEvent.Serialization.IJsonSerializable, ByteDanceMicroAppOpenApiEvent.Serialization.IXmlSerializable + public class SelfMountBindEvent : DouyinMicroAppOpenApiEvent { public static class Types { diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Extensions/DouyinMicroAppOpenApiClientEventExtensions.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Extensions/DouyinMicroAppOpenApiClientEventExtensions.cs new file mode 100644 index 00000000..1cf24b9a --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Extensions/DouyinMicroAppOpenApiClientEventExtensions.cs @@ -0,0 +1,222 @@ +using System; +using System.Xml.Linq; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi +{ + using SKIT.FlurlHttpClient.Primitives; + + /// + /// 为 提供回调通知事件的扩展方法。 + /// + public static partial class DouyinMicroAppOpenApiClientEventExtensions + { + /// + /// 从 JSON 反序列化得到 对象。 + /// + /// + /// + /// + /// + public static TEvent DeserializeEventFromJson(this DouyinMicroAppOpenApiClient client, string webhookJson) + where TEvent : DouyinMicroAppOpenApiEvent, new() + { + return InnerDeserializeEventFromJson(client, webhookJson); + } + + /// + /// 从 JSON 反序列化得到 对象。 + /// + /// + /// + /// + public static DouyinMicroAppOpenApiEvent DeserializeEventFromJson(this DouyinMicroAppOpenApiClient client, string webhookJson) + { + return InnerDeserializeEventFromJson(client, webhookJson); + } + + /// + /// 从 XML 反序列化得到 对象。 + /// + /// + /// + /// + /// + public static TEvent DeserializeEventFromXml(this DouyinMicroAppOpenApiClient client, string webhookXml) + where TEvent : DouyinMicroAppOpenApiEvent, new() + { + return InnerDeserializeEventFromXml(client, webhookXml); + } + + /// + /// 从 XML 反序列化得到 对象。 + /// + /// + /// + /// + public static DouyinMicroAppOpenApiEvent DeserializeEventFromXml(this DouyinMicroAppOpenApiClient client, string webhookXml) + { + return InnerDeserializeEventFromXml(client, webhookXml); + } + + /// + /// 验证回调通知事件签名。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + public static ErroredResult VerifyEventSignatureFromJson(this DouyinMicroAppOpenApiClient client, string webhookJson) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + + ErroredResult result; + + try + { + InnerEncryptedEvent encryptedEvent = client.JsonSerializer.Deserialize(webhookJson); + bool valid = Utilities.DyMsgCryptor.VerifySignature( + sToken: client.Credentials.PushToken!, + sTimestamp: encryptedEvent.TimestampString, + sNonce: encryptedEvent.Nonce, + sMsgEncrypt: encryptedEvent.EncryptedData, + sMsgSign: encryptedEvent.Signature + ); + + if (valid) + result = ErroredResult.Ok(); + else + result = ErroredResult.Fail(new Exception($"Signature does not match.")); + } + catch (Exception ex) + { + result = ErroredResult.Fail(ex); + } + + return result; + } + + /// + /// 验证回调通知事件签名。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + public static ErroredResult VerifyEventSignatureFromXml(this DouyinMicroAppOpenApiClient client, string webhookXml) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + + ErroredResult result; + + try + { + XDocument xdoc = XDocument.Parse(webhookXml); + bool valid = Utilities.DyMsgCryptor.VerifySignature( + sToken: client.Credentials.PushToken!, + sTimestamp: xdoc.Root!.Element("TimeStamp")!.Value, + sNonce: xdoc.Root!.Element("Nonce")!.Value, + sMsgEncrypt: xdoc.Root!.Element("Encrypt")!.Value, + sMsgSign: xdoc.Root!.Element("MsgSignature")!.Value + ); + + if (valid) + result = ErroredResult.Ok(); + else + result = ErroredResult.Fail(new Exception($"Signature does not match.")); + } + catch (Exception ex) + { + result = ErroredResult.Fail(ex); + } + + return result; + } + } + + partial class DouyinMicroAppOpenApiClientEventExtensions + { + private class InnerEncryptedEvent + { + [Newtonsoft.Json.JsonProperty("Encrypt")] + [System.Text.Json.Serialization.JsonPropertyName("Encrypt")] + [System.Xml.Serialization.XmlElement("Encrypt")] + public string EncryptedData { get; set; } = default!; + + [Newtonsoft.Json.JsonProperty("TimeStamp")] + [System.Text.Json.Serialization.JsonPropertyName("TimeStamp")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringConverter))] + [System.Xml.Serialization.XmlElement("TimeStamp")] + public string TimestampString { get; set; } = default!; + + [Newtonsoft.Json.JsonProperty("Nonce")] + [System.Text.Json.Serialization.JsonPropertyName("Nonce")] + [System.Xml.Serialization.XmlElement("Nonce")] + public string Nonce { get; set; } = default!; + + [Newtonsoft.Json.JsonProperty("MsgSignature")] + [System.Text.Json.Serialization.JsonPropertyName("MsgSignature")] + [System.Xml.Serialization.XmlElement("MsgSignature")] + public string Signature { get; set; } = default!; + } + + private static TEvent InnerDeserializeEventFromJson(DouyinMicroAppOpenApiClient client, string webhookJson) + where TEvent : DouyinMicroAppOpenApiEvent + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (webhookJson is null) throw new ArgumentNullException(webhookJson); + + try + { + if (webhookJson.Contains("\"Encrypt\"")) + { + InnerEncryptedEvent encryptedEvent = client.JsonSerializer.Deserialize(webhookJson); + webhookJson = Utilities.DyMsgCryptor.AESDecrypt(cipherText: encryptedEvent.EncryptedData, encodingAESKey: client.Credentials.PushEncodingAESKey!, out _); + } + + return client.JsonSerializer.Deserialize(webhookJson); + } + catch (DouyinMicroAppException) + { + throw; + } + catch (Exception ex) + { + throw new DouyinMicroAppException("Failed to deserialize event data. Please see the inner exception for more details.", ex); + } + } + + private static TEvent InnerDeserializeEventFromXml(DouyinMicroAppOpenApiClient client, string webhookXml) + where TEvent : DouyinMicroAppOpenApiEvent + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (webhookXml is null) throw new ArgumentNullException(webhookXml); + + try + { + if (webhookXml.Contains("") && webhookXml.Contains("")) + { + if (!Utilities.DyMsgCryptor.TryParseXml(webhookXml, out string encryptedXml)) + throw new DouyinMicroAppException("Failed to decrypt event data, because the encrypted data is empty."); + + webhookXml = Utilities.DyMsgCryptor.AESDecrypt(cipherText: encryptedXml, encodingAESKey: client.Credentials.PushEncodingAESKey!, out _); + } + + return Utilities.XmlHelper.Deserialize(webhookXml); + } + catch (DouyinMicroAppException) + { + throw; + } + catch (Exception ex) + { + throw new DouyinMicroAppException("Failed to deserialize event data. Please see the inner exception for more details.", ex); + } + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Extensions/DouyinMicroAppOpenApiClientExecuteAppsBasicInfoExtensions.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Extensions/DouyinMicroAppOpenApiClientExecuteAppsBasicInfoExtensions.cs new file mode 100644 index 00000000..72c3938d --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Extensions/DouyinMicroAppOpenApiClientExecuteAppsBasicInfoExtensions.cs @@ -0,0 +1,149 @@ +using System; +using System.Net.Http; +using System.Threading; +using System.Threading.Tasks; +using Flurl.Http; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi +{ + public static class DouyinMicroAppOpenApiClientExecuteAppsBasicInfoExtensions + { + /// + /// 异步调用 [GET] /apps/v2/basic_info/get_info 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteOpenAppsBasicInfoGetInfoV2Async(this DouyinMicroAppOpenApiClient client, Models.OpenAppsBasicInfoGetInfoV2Request 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.Get, "apps", "v2", "basic_info", "get_info") + .WithHeader("access-token", request.AuthorizerAccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [GET] /apps/v2/basic_info/check_app_name 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteOpenAppsBasicInfoCheckAppNameV2Async(this DouyinMicroAppOpenApiClient client, Models.OpenAppsBasicInfoCheckAppNameV2Request 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.Get, "apps", "v2", "basic_info", "check_app_name") + .WithHeader("access-token", request.AuthorizerAccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /apps/v2/basic_info/modify_app_name 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteOpenAppsBasicInfoModifyAppNameV2Async(this DouyinMicroAppOpenApiClient client, Models.OpenAppsBasicInfoModifyAppNameV2Request 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, "apps", "v2", "basic_info", "modify_app_name") + .WithHeader("access-token", request.AuthorizerAccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /apps/v2/basic_info/modify_app_intro 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteOpenAppsBasicInfoModifyAppIntroductionV2Async(this DouyinMicroAppOpenApiClient client, Models.OpenAppsBasicInfoModifyAppIntroductionV2Request 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, "apps", "v2", "basic_info", "modify_app_intro") + .WithHeader("access-token", request.AuthorizerAccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /apps/v2/basic_info/modify_app_icon 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteOpenAppsBasicInfoModifyAppIconV2Async(this DouyinMicroAppOpenApiClient client, Models.OpenAppsBasicInfoModifyAppIconV2Request 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, "apps", "v2", "basic_info", "modify_app_icon") + .WithHeader("access-token", request.AuthorizerAccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /apps/v2/basic_info/get_qr_code 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteOpenAppsBasicInfoGetQrcodeV2Async(this DouyinMicroAppOpenApiClient client, Models.OpenAppsBasicInfoGetQrcodeV2Request 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, "apps", "v2", "basic_info", "get_qr_code") + .WithHeader("access-token", request.AuthorizerAccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Extensions/DouyinMicroAppOpenApiClientExecuteAppsCategoryExtensions.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Extensions/DouyinMicroAppOpenApiClientExecuteAppsCategoryExtensions.cs new file mode 100644 index 00000000..bfca97cc --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Extensions/DouyinMicroAppOpenApiClientExecuteAppsCategoryExtensions.cs @@ -0,0 +1,126 @@ +using System; +using System.Net.Http; +using System.Threading; +using System.Threading.Tasks; +using Flurl.Http; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi +{ + public static class DouyinMicroAppOpenApiClientExecuteAppsCategoryExtensions + { + /// + /// 异步调用 [GET] /apps/v1/category/get_all_categories 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteOpenAppsCategoryGetAllCategoriesV1Async(this DouyinMicroAppOpenApiClient client, Models.OpenAppsCategoryGetAllCategoriesV1Request 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.Get, "apps", "v1", "category", "get_all_categories") + .WithHeader("access-token", request.AuthorizerAccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [GET] /apps/v1/category/get_audit_categories 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteOpenAppsCategoryGetAuditCategoriesV1Async(this DouyinMicroAppOpenApiClient client, Models.OpenAppsCategoryGetAuditCategoriesV1Request 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.Get, "apps", "v1", "category", "get_audit_categories") + .WithHeader("access-token", request.AuthorizerAccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /apps/v1/category/add_categories 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteOpenAppsCategoryAddCategoriesV1Async(this DouyinMicroAppOpenApiClient client, Models.OpenAppsCategoryAddCategoriesV1Request 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, "apps", "v1", "category", "add_categories") + .WithHeader("access-token", request.AuthorizerAccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /apps/v1/category/del_categories 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteOpenAppsCategoryDeleteCategoriesV1Async(this DouyinMicroAppOpenApiClient client, Models.OpenAppsCategoryDeleteCategoriesV1Request 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, "apps", "v1", "category", "del_categories") + .WithHeader("access-token", request.AuthorizerAccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /apps/v1/category/supply_categories 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteOpenAppsCategorySupplyCategoriesV1Async(this DouyinMicroAppOpenApiClient client, Models.OpenAppsCategorySupplyCategoriesV1Request 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, "apps", "v1", "category", "supply_categories") + .WithHeader("access-token", request.AuthorizerAccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Extensions/DouyinMicroAppOpenApiClientExecuteAppsCreditScoreExtensions.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Extensions/DouyinMicroAppOpenApiClientExecuteAppsCreditScoreExtensions.cs new file mode 100644 index 00000000..d765ffc5 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Extensions/DouyinMicroAppOpenApiClientExecuteAppsCreditScoreExtensions.cs @@ -0,0 +1,34 @@ +using System; +using System.Net.Http; +using System.Threading; +using System.Threading.Tasks; +using Flurl.Http; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi +{ + public static class DouyinMicroAppOpenApiClientExecuteAppsCreditScoreExtensions + { + /// + /// 异步调用 [GET] /apps/v2/credit_score/get_credit_score 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteOpenAppsCreditScoreGetCreditScoreV2Async(this DouyinMicroAppOpenApiClient client, Models.OpenAppsCreditScoreGetCreditScoreV2Request 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.Get, "apps", "v2", "credit_score", "get_credit_score") + .WithHeader("access-token", request.AuthorizerAccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Extensions/DouyinMicroAppOpenApiClientExecuteAppsDomainExtensions.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Extensions/DouyinMicroAppOpenApiClientExecuteAppsDomainExtensions.cs new file mode 100644 index 00000000..41f8363a --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Extensions/DouyinMicroAppOpenApiClientExecuteAppsDomainExtensions.cs @@ -0,0 +1,57 @@ +using System; +using System.Net.Http; +using System.Threading; +using System.Threading.Tasks; +using Flurl.Http; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi +{ + public static class DouyinMicroAppOpenApiClientExecuteAppsDomainExtensions + { + /// + /// 异步调用 [POST] /apps/v2/domain/modify_server_domain 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteOpenAppsDomainModifyServerDomainV2Async(this DouyinMicroAppOpenApiClient client, Models.OpenAppsDomainModifyServerDomainV2Request 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, "apps", "v2", "domain", "modify_server_domain") + .WithHeader("access-token", request.AuthorizerAccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /apps/v2/domain/modify_webview_domain 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteOpenAppsDomainModifyWebviewDomainV2Async(this DouyinMicroAppOpenApiClient client, Models.OpenAppsDomainModifyWebviewDomainV2Request 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, "apps", "v2", "domain", "modify_webview_domain") + .WithHeader("access-token", request.AuthorizerAccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Extensions/DouyinMicroAppOpenApiClientExecuteAppsFileExtensions.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Extensions/DouyinMicroAppOpenApiClientExecuteAppsFileExtensions.cs new file mode 100644 index 00000000..1ec16af2 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Extensions/DouyinMicroAppOpenApiClientExecuteAppsFileExtensions.cs @@ -0,0 +1,44 @@ +using System; +using System.Net.Http; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using Flurl.Http; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi +{ + public static class DouyinMicroAppOpenApiClientExecuteAppsFileExtensions + { + /// + /// 异步调用 [POST] /apps/v2/file/upload_material 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteOpenAppsFileUploadMaterialV2Async(this DouyinMicroAppOpenApiClient client, Models.OpenAppsFileUploadMaterialV2Request request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (request.MaterialFileName is null) + request.MaterialFileName = Guid.NewGuid().ToString("N").ToLower() + (request.MaterialType == 8 ? ".pdf" : ".jpg"); + + if (request.MaterialFileContentType is null) + request.MaterialFileContentType = Utilities.FileNameToContentTypeMapper.GetContentTypeForMaterial(request.MaterialFileName) ?? (request.MaterialType == 8 ? "application/pdf" : "image/jpeg"); + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "apps", "v2", "file", "upload_material") + .WithHeader("access-token", request.AuthorizerAccessToken); + + using var httpContent = Utilities.FileHttpContentBuilder.Build(fileName: request.MaterialFileName, fileBytes: request.MaterialFileBytes, fileContentType: request.MaterialFileContentType, formDataName: "material_file"); + httpContent.Add(new ByteArrayContent(Encoding.UTF8.GetBytes(request.MaterialType.ToString())), "material_type"); + + return await client.SendFlurlRequestAsync(flurlReq, httpContent: httpContent, cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Extensions/DouyinMicroAppOpenApiClientExecuteAppsICPRecordExtensions.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Extensions/DouyinMicroAppOpenApiClientExecuteAppsICPRecordExtensions.cs new file mode 100644 index 00000000..480df29c --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Extensions/DouyinMicroAppOpenApiClientExecuteAppsICPRecordExtensions.cs @@ -0,0 +1,276 @@ +using System; +using System.Net.Http; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using Flurl.Http; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi +{ + public static class DouyinMicroAppOpenApiClientExecuteAppsICPRecordExtensions + { + /// + /// 异步调用 [POST] /apps/v1/icp_record/upload_image/ 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteOpenAppsICPRecordUploadImageV1Async(this DouyinMicroAppOpenApiClient client, Models.OpenAppsICPRecordUploadImageV1Request request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (request.ImageFileName is null) + request.ImageFileName = Guid.NewGuid().ToString("N").ToLower() + ".jpg"; + + if (request.ImageFileContentType is null) + request.ImageFileContentType = Utilities.FileNameToContentTypeMapper.GetContentTypeForMaterial(request.ImageFileName) ?? "image/jpeg"; + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "apps", "v1", "icp_record", "upload_image", "") + .WithHeader("access-token", request.AuthorizerAccessToken); + + using var httpContent = Utilities.FileHttpContentBuilder.Build(fileName: request.ImageFileName, fileBytes: request.ImageFileBytes, fileContentType: request.ImageFileContentType, formDataName: "image"); + httpContent.Add(new ByteArrayContent(Encoding.UTF8.GetBytes(request.ImageType.ToString())), "image_type"); + + return await client.SendFlurlRequestAsync(flurlReq, httpContent: httpContent, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [GET] /apps/v1/icp_record/get_facial_recognition_url/ 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteOpenAppsICPRecordGetFacialRecognitionUrlV1Async(this DouyinMicroAppOpenApiClient client, Models.OpenAppsICPRecordGetFacialRecognitionUrlV1Request 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.Get, "apps", "v1", "icp_record", "get_facial_recognition_url", "") + .SetQueryParam("province_code", request.ProvinceCode) + .WithHeader("access-token", request.AuthorizerAccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /apps/v1/icp_record/send_facial_recognition_notify/ 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteOpenAppsICPRecordSendFacialRecognitionNotifyV1Async(this DouyinMicroAppOpenApiClient client, Models.OpenAppsICPRecordSendFacialRecognitionNotifyV1Request 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, "apps", "v1", "icp_record", "send_facial_recognition_notify", "") + .WithHeader("access-token", request.AuthorizerAccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [GET] /apps/v1/icp_record/query_facial_recognition_status/ 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteOpenAppsICPRecordQueryFacialRecognitionStatusV1Async(this DouyinMicroAppOpenApiClient client, Models.OpenAppsICPRecordQueryFacialRecognitionStatusV1Request 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.Get, "apps", "v1", "icp_record", "query_facial_recognition_status", "") + .SetQueryParam("facial_recognition_token", request.FacialRecognitionToken) + .WithHeader("access-token", request.AuthorizerAccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [GET] /apps/v1/icp_record/query_corp_type_list/ 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteOpenAppsICPRecordQueryCorpTypeListV1Async(this DouyinMicroAppOpenApiClient client, Models.OpenAppsICPRecordQueryCorpTypeListV1Request 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.Get, "apps", "v1", "icp_record", "query_corp_type_list", "") + .WithHeader("access-token", request.AuthorizerAccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [GET] /apps/v1/icp_record/query_region_list/ 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteOpenAppsICPRecordQueryRegionListV1Async(this DouyinMicroAppOpenApiClient client, Models.OpenAppsICPRecordQueryRegionListV1Request 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.Get, "apps", "v1", "icp_record", "query_region_list", "") + .WithHeader("access-token", request.AuthorizerAccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [GET] /apps/v1/icp_record/query_incharge_people_credentials_type_list/ 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteOpenAppsICPRecordQueryInchargePeopleCredentialsTypeListV1Async(this DouyinMicroAppOpenApiClient client, Models.OpenAppsICPRecordQueryInchargePeopleCredentialsTypeListV1Request 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.Get, "apps", "v1", "icp_record", "query_incharge_people_credentials_type_list", "") + .WithHeader("access-token", request.AuthorizerAccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [GET] /apps/v1/icp_record/query_service_content_type_list/ 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteOpenAppsICPRecordQueryServiceContentTypeListV1Async(this DouyinMicroAppOpenApiClient client, Models.OpenAppsICPRecordQueryServiceContentTypeListV1Request 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.Get, "apps", "v1", "icp_record", "query_incharge_people_credentials_type_list", "") + .WithHeader("access-token", request.AuthorizerAccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [GET] /apps/v1/icp_record/query_pre_approval_item_type_list/ 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteOpenAppsICPRecordQueryPreApprovalItemTypeListV1Async(this DouyinMicroAppOpenApiClient client, Models.OpenAppsICPRecordQueryPreApprovalItemTypeListV1Request 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.Get, "apps", "v1", "icp_record", "query_pre_approval_item_type_list", "") + .WithHeader("access-token", request.AuthorizerAccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [GET] /apps/v1/icp_record/query_record_status/ 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteOpenAppsICPRecordQueryRecordStatusV1Async(this DouyinMicroAppOpenApiClient client, Models.OpenAppsICPRecordQueryRecordStatusV1Request 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.Get, "apps", "v1", "icp_record", "query_record_status", "") + .WithHeader("access-token", request.AuthorizerAccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /apps/v1/icp_record/submit_record_info/ 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteOpenAppsICPRecordSubmitRecordInfoV1Async(this DouyinMicroAppOpenApiClient client, Models.OpenAppsICPRecordSubmitRecordInfoV1Request 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, "apps", "v1", "icp_record", "submit_record_info", "") + .WithHeader("access-token", request.AuthorizerAccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Extensions/DouyinMicroAppOpenApiClientExecuteAppsPackageVersionExtensions.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Extensions/DouyinMicroAppOpenApiClientExecuteAppsPackageVersionExtensions.cs new file mode 100644 index 00000000..e0f98f5f --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Extensions/DouyinMicroAppOpenApiClientExecuteAppsPackageVersionExtensions.cs @@ -0,0 +1,172 @@ +using System; +using System.Net.Http; +using System.Threading; +using System.Threading.Tasks; +using Flurl.Http; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi +{ + public static class DouyinMicroAppOpenApiClientExecuteAppsPackageVersionExtensions + { + /// + /// 异步调用 [POST] /apps/v1/package_version/upload/ 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteOpenAppsPackageVersionUploadV1Async(this DouyinMicroAppOpenApiClient client, Models.OpenAppsPackageVersionUploadV1Request 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, "apps", "v1", "package_version", "upload", "") + .WithHeader("access-token", request.AuthorizerAccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [GET] /apps/v1/package_version/get_audit_hosts/ 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteOpenAppsPackageVersionGetAuditHostsV1Async(this DouyinMicroAppOpenApiClient client, Models.OpenAppsPackageVersionGetAuditHostsV1Request 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.Get, "apps", "v1", "package_version", "get_audit_hosts", "") + .WithHeader("access-token", request.AuthorizerAccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /apps/v1/package_version/audit/ 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteOpenAppsPackageVersionAuditV1Async(this DouyinMicroAppOpenApiClient client, Models.OpenAppsPackageVersionAuditV1Request 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, "apps", "v1", "package_version", "audit", "") + .WithHeader("access-token", request.AuthorizerAccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /apps/v1/package_version/revoke_audit/ 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteOpenAppsPackageVersionRevokeAuditV1Async(this DouyinMicroAppOpenApiClient client, Models.OpenAppsPackageVersionRevokeAuditV1Request 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, "apps", "v1", "package_version", "revoke_audit", "") + .WithHeader("access-token", request.AuthorizerAccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /apps/v1/package_version/release/ 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteOpenAppsPackageVersionReleaseV1Async(this DouyinMicroAppOpenApiClient client, Models.OpenAppsPackageVersionReleaseV1Request 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, "apps", "v1", "package_version", "release", "") + .WithHeader("access-token", request.AuthorizerAccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /apps/v1/package_version/rollback/ 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteOpenAppsPackageVersionRollbackV1Async(this DouyinMicroAppOpenApiClient client, Models.OpenAppsPackageVersionRollbackV1Request 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, "apps", "v1", "package_version", "rollback", "") + .WithHeader("access-token", request.AuthorizerAccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [GET] /apps/v1/package_version/versions/ 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteOpenAppsPackageVersionGetVersionsV1Async(this DouyinMicroAppOpenApiClient client, Models.OpenAppsPackageVersionGetVersionsV1Request 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.Get, "apps", "v1", "package_version", "versions", "") + .WithHeader("access-token", request.AuthorizerAccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Extensions/DouyinMicroAppOpenApiClientExecuteAppsTrialExtensions.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Extensions/DouyinMicroAppOpenApiClientExecuteAppsTrialExtensions.cs new file mode 100644 index 00000000..90949bbb --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Extensions/DouyinMicroAppOpenApiClientExecuteAppsTrialExtensions.cs @@ -0,0 +1,34 @@ +using System; +using System.Net.Http; +using System.Threading; +using System.Threading.Tasks; +using Flurl.Http; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi +{ + public static class DouyinMicroAppOpenApiClientExecuteAppsTrialExtensions + { + /// + /// 异步调用 [GET] /apps/v2/trial/get_trial_info 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteOpenAppsTrialGetTrialInfoV2Async(this DouyinMicroAppOpenApiClient client, Models.OpenAppsTrialGetTrialInfoV2Request 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.Get, "apps", "v2", "trial", "get_trial_info") + .WithHeader("access-token", request.AuthorizerAccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Extensions/DouyinMicroAppOpenApiClientExecuteLegacyAuthExtensions.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Extensions/DouyinMicroAppOpenApiClientExecuteLegacyAuthExtensions.cs new file mode 100644 index 00000000..89726d8a --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Extensions/DouyinMicroAppOpenApiClientExecuteLegacyAuthExtensions.cs @@ -0,0 +1,146 @@ +using System; +using System.Net.Http; +using System.Threading; +using System.Threading.Tasks; +using Flurl; +using Flurl.Http; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi +{ + public static class DouyinMicroAppOpenApiClientExecuteLegacyAuthExtensions + { + /// + /// 异步调用 [GET] /v1/oauth/token 接口。 + /// + /// REF:
+ ///
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteOpenApiOAuthTokenV1Async(this DouyinMicroAppOpenApiClient client, Models.OpenApiOAuthTokenV1Request 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.Get, "v1", "oauth", "token") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("v1", "oauth", "token")) + .SetQueryParam("component_appid", request.ComponentAppId) + .SetQueryParam("component_access_token", request.ComponentAccessToken) + .SetQueryParam("grant_type", request.GrantType) + .SetQueryParam("authorization_code", request.AuthorizationCode) + .SetQueryParam("authorizer_refresh_token", request.AuthorizerRefreshToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [GET] /v1/auth/tp/token 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteOpenApiAuthThirdPartyTokenV1Async(this DouyinMicroAppOpenApiClient client, Models.OpenApiAuthThirdPartyTokenV1Request request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (request.ComponentAppSecret is null) + request.ComponentAppSecret = client.Credentials.ComponentAppSecret; + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Get, "v1", "auth", "tp", "token") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("v1", "auth", "tp", "token")) + .SetQueryParam("component_appid", request.ComponentAppId) + .SetQueryParam("component_appsecret", request.ComponentAppSecret) + .SetQueryParam("component_ticket", request.ComponentTicket); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /v2/auth/pre_auth_code 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteOpenApiAuthPreAuthCodeV2Async(this DouyinMicroAppOpenApiClient client, Models.OpenApiAuthPreAuthCodeV2Request 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, "v2", "auth", "pre_auth_code") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("v2", "auth", "pre_auth_code")) + .SetQueryParam("component_appid", request.ComponentAppId) + .SetQueryParam("component_access_token", request.ComponentAccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /v2/auth/gen_link 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteOpenApiAuthGenerateLinkV2Async(this DouyinMicroAppOpenApiClient client, Models.OpenApiAuthGenerateLinkV2Request 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, "v2", "auth", "gen_link") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("v2", "auth", "gen_link")) + .SetQueryParam("component_appid", request.ComponentAppId) + .SetQueryParam("component_access_token", request.ComponentAccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /v1/auth/retrieve 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteOpenApiAuthRetrieveV1Async(this DouyinMicroAppOpenApiClient client, Models.OpenApiAuthRetrieveV1Request 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, "v1", "auth", "retrieve") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("v1", "auth", "retrieve")) + .SetQueryParam("component_appid", request.ComponentAppId) + .SetQueryParam("component_access_token", request.ComponentAccessToken) + .SetQueryParam("authorization_appid", request.AuthorizerAppId); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Extensions/DouyinMicroAppOpenApiClientExecuteLegacyMicroAppExtensions.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Extensions/DouyinMicroAppOpenApiClientExecuteLegacyMicroAppExtensions.cs new file mode 100644 index 00000000..1ed24a45 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Extensions/DouyinMicroAppOpenApiClientExecuteLegacyMicroAppExtensions.cs @@ -0,0 +1,982 @@ +using System; +using System.Net.Http; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using Flurl; +using Flurl.Http; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi +{ + public static class DouyinMicroAppOpenApiClientExecuteLegacyMicroAppExtensions + { + /// + /// 异步调用 [GET] /v1/microapp/code2session 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteOpenApiMicroAppCode2SessionV1Async(this DouyinMicroAppOpenApiClient client, Models.OpenApiMicroAppCode2SessionV1Request 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.Get, "v1", "microapp", "code2session") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("v1", "microapp", "code2session")) + .SetQueryParam("component_appid", request.ComponentAppId) + .SetQueryParam("authorizer_access_token", request.AuthorizerAccessToken) + .SetQueryParam("code", request.Code) + .SetQueryParam("anonymous_code", request.AnoymousCode); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /v1/microapp/upload_material 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + [Obsolete("相关接口或字段于 2024-01-23 下线。")] + public static async Task ExecuteOpenApiMicroAppUploadMaterialV1Async(this DouyinMicroAppOpenApiClient client, Models.OpenApiMicroAppUploadMaterialV1Request request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (request.MaterialFileName is null) + request.MaterialFileName = Guid.NewGuid().ToString("N").ToLower() + (request.MaterialType == 8 ? ".pdf" : ".jpg"); + + if (request.MaterialFileContentType is null) + request.MaterialFileContentType = Utilities.FileNameToContentTypeMapper.GetContentTypeForMaterial(request.MaterialFileName) ?? (request.MaterialType == 8 ? "application/pdf" : "image/jpeg"); + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "v1", "microapp", "upload_material") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("v1", "microapp", "upload_material")) + .SetQueryParam("component_appid", request.ComponentAppId) + .SetQueryParam("authorizer_access_token", request.AuthorizerAccessToken); + + using var httpContent = Utilities.FileHttpContentBuilder.Build(fileName: request.MaterialFileName, fileBytes: request.MaterialFileBytes, fileContentType: request.MaterialFileContentType, formDataName: "material_file"); + httpContent.Add(new ByteArrayContent(Encoding.UTF8.GetBytes(request.MaterialType.ToString())), "material_type"); + + return await client.SendFlurlRequestAsync(flurlReq, httpContent: httpContent, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + #region App + /// + /// 异步调用 [GET] /v1/microapp/app/info 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + [Obsolete("相关接口或字段于 2024-01-23 下线。")] + public static async Task ExecuteOpenApiMicroAppAppInfoV1Async(this DouyinMicroAppOpenApiClient client, Models.OpenApiMicroAppAppInfoV1Request 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.Get, "v1", "microapp", "app", "info") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("v1", "microapp", "app", "info")) + .SetQueryParam("component_appid", request.ComponentAppId) + .SetQueryParam("authorizer_access_token", request.AuthorizerAccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /v1/microapp/app/qrcode 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + [Obsolete("相关接口或字段于 2024-01-23 下线。")] + public static async Task ExecuteOpenApiMicroAppAppQrcodeV1Async(this DouyinMicroAppOpenApiClient client, Models.OpenApiMicroAppAppQrcodeV1Request 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, "v1", "microapp", "app", "qrcode") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("v1", "microapp", "app", "qrcode")) + .SetQueryParam("component_appid", request.ComponentAppId) + .SetQueryParam("authorizer_access_token", request.AuthorizerAccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [GET] /v1/microapp/app/check_app_name 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + [Obsolete("相关接口或字段于 2024-01-23 下线。")] + public static async Task ExecuteOpenApiMicroAppAppCheckAppNameV1Async(this DouyinMicroAppOpenApiClient client, Models.OpenApiMicroAppAppCheckAppNameV1Request 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.Get, "v1", "microapp", "app", "check_app_name") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("v1", "microapp", "app", "check_app_name")) + .SetQueryParam("component_appid", request.ComponentAppId) + .SetQueryParam("authorizer_access_token", request.AuthorizerAccessToken) + .SetQueryParam("app_name", request.AppName); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /v1/microapp/app/modify_app_name 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + [Obsolete("相关接口或字段于 2024-01-23 下线。")] + public static async Task ExecuteOpenApiMicroAppAppModifyAppNameV1Async(this DouyinMicroAppOpenApiClient client, Models.OpenApiMicroAppAppModifyAppNameV1Request 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, "v1", "microapp", "app", "modify_app_name") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("v1", "microapp", "app", "modify_app_name")) + .SetQueryParam("component_appid", request.ComponentAppId) + .SetQueryParam("authorizer_access_token", request.AuthorizerAccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /v1/microapp/app/modify_app_intro 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + [Obsolete("相关接口或字段于 2024-01-23 下线。")] + public static async Task ExecuteOpenApiMicroAppAppModifyAppIntroductionV1Async(this DouyinMicroAppOpenApiClient client, Models.OpenApiMicroAppAppModifyAppIntroductionV1Request 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, "v1", "microapp", "app", "modify_app_intro") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("v1", "microapp", "app", "modify_app_intro")) + .SetQueryParam("component_appid", request.ComponentAppId) + .SetQueryParam("authorizer_access_token", request.AuthorizerAccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /v1/microapp/app/modify_app_icon 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + [Obsolete("相关接口或字段于 2024-01-23 下线。")] + public static async Task ExecuteOpenApiMicroAppAppModifyAppIconV1Async(this DouyinMicroAppOpenApiClient client, Models.OpenApiMicroAppAppModifyAppIconV1Request 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, "v1", "microapp", "app", "modify_app_icon") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("v1", "microapp", "app", "modify_app_icon")) + .SetQueryParam("component_appid", request.ComponentAppId) + .SetQueryParam("authorizer_access_token", request.AuthorizerAccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [GET] /v1/microapp/app/all_categories 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + [Obsolete("相关接口或字段于 2024-01-23 下线。")] + public static async Task ExecuteOpenApiMicroAppAppAllCategoriesV1Async(this DouyinMicroAppOpenApiClient client, Models.OpenApiMicroAppAppAllCategoriesV1Request 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.Get, "v1", "microapp", "app", "all_categories") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("v1", "microapp", "app", "all_categories")) + .SetQueryParam("component_appid", request.ComponentAppId) + .SetQueryParam("authorizer_access_token", request.AuthorizerAccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [GET] /v1/microapp/app/categories 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + [Obsolete("相关接口或字段于 2024-01-23 下线。")] + public static async Task ExecuteOpenApiMicroAppAppCategoriesV1Async(this DouyinMicroAppOpenApiClient client, Models.OpenApiMicroAppAppCategoriesV1Request 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.Get, "v1", "microapp", "app", "categories") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("v1", "microapp", "app", "categories")) + .SetQueryParam("component_appid", request.ComponentAppId) + .SetQueryParam("authorizer_access_token", request.AuthorizerAccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /v1/microapp/app/add_categories 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + [Obsolete("相关接口或字段于 2024-01-23 下线。")] + public static async Task ExecuteOpenApiMicroAppAppAddCategoriesV1Async(this DouyinMicroAppOpenApiClient client, Models.OpenApiMicroAppAppAddCategoriesV1Request 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, "v1", "microapp", "app", "add_categories") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("v1", "microapp", "app", "add_categories")) + .SetQueryParam("component_appid", request.ComponentAppId) + .SetQueryParam("authorizer_access_token", request.AuthorizerAccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /v1/microapp/app/del_categories 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + [Obsolete("相关接口或字段于 2024-01-23 下线。")] + public static async Task ExecuteOpenApiMicroAppAppDeleteCategoriesV1Async(this DouyinMicroAppOpenApiClient client, Models.OpenApiMicroAppAppDeleteCategoriesV1Request 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, "v1", "microapp", "app", "del_categories") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("v1", "microapp", "app", "del_categories")) + .SetQueryParam("component_appid", request.ComponentAppId) + .SetQueryParam("authorizer_access_token", request.AuthorizerAccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /v1/microapp/app/supply_categories 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + [Obsolete("相关接口或字段于 2024-01-23 下线。")] + public static async Task ExecuteOpenApiMicroAppAppSupplyCategoriesV1Async(this DouyinMicroAppOpenApiClient client, Models.OpenApiMicroAppAppSupplyCategoriesV1Request 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, "v1", "microapp", "app", "supply_categories") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("v1", "microapp", "app", "supply_categories")) + .SetQueryParam("component_appid", request.ComponentAppId) + .SetQueryParam("authorizer_access_token", request.AuthorizerAccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /v1/microapp/app/modify_server_domain 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + [Obsolete("相关接口或字段于 2024-01-23 下线。")] + public static async Task ExecuteOpenApiMicroAppAppModifyServerDomainV1Async(this DouyinMicroAppOpenApiClient client, Models.OpenApiMicroAppAppModifyServerDomainV1Request 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, "v1", "microapp", "app", "modify_server_domain") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("v1", "microapp", "app", "modify_server_domain")) + .SetQueryParam("component_appid", request.ComponentAppId) + .SetQueryParam("authorizer_access_token", request.AuthorizerAccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /v1/microapp/app/modify_webview_domain 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + [Obsolete("相关接口或字段于 2024-01-23 下线。")] + public static async Task ExecuteOpenApiMicroAppAppModifyWebviewDomainV1Async(this DouyinMicroAppOpenApiClient client, Models.OpenApiMicroAppAppModifyWebviewDomainV1Request 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, "v1", "microapp", "app", "modify_webview_domain") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("v1", "microapp", "app", "modify_webview_domain")) + .SetQueryParam("component_appid", request.ComponentAppId) + .SetQueryParam("authorizer_access_token", request.AuthorizerAccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [GET] /v1/microapp/app/quality_rating 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + [Obsolete("相关接口或字段于 2023-10-23 下线。")] + public static async Task ExecuteOpenApiMicroAppAppQualityRatingV1Async(this DouyinMicroAppOpenApiClient client, Models.OpenApiMicroAppAppQualityRatingV1Request 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.Get, "v1", "microapp", "app", "quality_rating") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("v1", "microapp", "app", "quality_rating")) + .SetQueryParam("component_appid", request.ComponentAppId) + .SetQueryParam("authorizer_access_token", request.AuthorizerAccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [GET] /v1/microapp/app/credit_score 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + [Obsolete("相关接口或字段于 2024-01-23 下线。")] + public static async Task ExecuteOpenApiMicroAppAppCreditScoreV1Async(this DouyinMicroAppOpenApiClient client, Models.OpenApiMicroAppAppCreditScoreV1Request 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.Get, "v1", "microapp", "app", "credit_score") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("v1", "microapp", "app", "credit_score")) + .SetQueryParam("component_appid", request.ComponentAppId) + .SetQueryParam("authorizer_access_token", request.AuthorizerAccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + #endregion + + #region Operation + /// + /// 异步调用 [GET] /v1/microapp/operation/video_application_status 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteOpenApiMicroAppOperationVideoApplicationStatusV1Async(this DouyinMicroAppOpenApiClient client, Models.OpenApiMicroAppOperationVideoApplicationStatusV1Request 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.Get, "v1", "microapp", "operation", "video_application_status") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("v1", "microapp", "operation", "video_application_status")) + .SetQueryParam("component_appid", request.ComponentAppId) + .SetQueryParam("authorizer_access_token", request.AuthorizerAccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /v1/microapp/operation/video_application 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteOpenApiMicroAppOperationVideoApplicationV1Async(this DouyinMicroAppOpenApiClient client, Models.OpenApiMicroAppOperationVideoApplicationV1Request 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, "v1", "microapp", "operation", "video_application") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("v1", "microapp", "operation", "video_application")) + .SetQueryParam("component_appid", request.ComponentAppId) + .SetQueryParam("authorizer_access_token", request.AuthorizerAccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [GET] /v1/microapp/operation/live_application_status 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteOpenApiMicroAppOperationLiveApplicationStatusV1Async(this DouyinMicroAppOpenApiClient client, Models.OpenApiMicroAppOperationLiveApplicationStatusV1Request 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.Get, "v1", "microapp", "operation", "live_application_status") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("v1", "microapp", "operation", "live_application_status")) + .SetQueryParam("component_appid", request.ComponentAppId) + .SetQueryParam("authorizer_access_token", request.AuthorizerAccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /v1/microapp/operation/live_application 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteOpenApiMicroAppOperationLiveApplicationV1Async(this DouyinMicroAppOpenApiClient client, Models.OpenApiMicroAppOperationLiveApplicationV1Request 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, "v1", "microapp", "operation", "live_application") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("v1", "microapp", "operation", "live_application")) + .SetQueryParam("component_appid", request.ComponentAppId) + .SetQueryParam("authorizer_access_token", request.AuthorizerAccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [GET] /v1/microapp/operation/phone_number_application_status 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteOpenApiMicroAppOperationPhoneNumberApplicationStatusV1Async(this DouyinMicroAppOpenApiClient client, Models.OpenApiMicroAppOperationPhoneNumberApplicationStatusV1Request 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.Get, "v1", "microapp", "operation", "phone_number_application_status") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("v1", "microapp", "operation", "phone_number_application_status")) + .SetQueryParam("component_appid", request.ComponentAppId) + .SetQueryParam("authorizer_access_token", request.AuthorizerAccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /v1/microapp/operation/phone_number_application 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteOpenApiMicroAppOperationPhoneNumberApplicationV1Async(this DouyinMicroAppOpenApiClient client, Models.OpenApiMicroAppOperationPhoneNumberApplicationV1Request 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, "v1", "microapp", "operation", "phone_number_application") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("v1", "microapp", "operation", "phone_number_application")) + .SetQueryParam("component_appid", request.ComponentAppId) + .SetQueryParam("authorizer_access_token", request.AuthorizerAccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [GET] /v1/microapp/operation/share_tpl_list 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteOpenApiMicroAppOperationShareTemplateListV1Async(this DouyinMicroAppOpenApiClient client, Models.OpenApiMicroAppOperationShareTemplateListV1Request 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.Get, "v1", "microapp", "operation", "share_tpl_list") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("v1", "microapp", "operation", "share_tpl_list")) + .SetQueryParam("component_appid", request.ComponentAppId) + .SetQueryParam("authorizer_access_token", request.AuthorizerAccessToken) + .SetQueryParam("page", request.PageNumber) + .SetQueryParam("size", request.PageSize); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /v1/microapp/operation/add_share_tpl 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteOpenApiMicroAppOperationAddShareTemplateV1Async(this DouyinMicroAppOpenApiClient client, Models.OpenApiMicroAppOperationAddShareTemplateV1Request 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, "v1", "microapp", "operation", "add_share_tpl") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("v1", "microapp", "operation", "add_share_tpl")) + .SetQueryParam("component_appid", request.ComponentAppId) + .SetQueryParam("authorizer_access_token", request.AuthorizerAccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /v1/microapp/operation/modify_share_tpl 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteOpenApiMicroAppOperationModifyShareTemplateV1Async(this DouyinMicroAppOpenApiClient client, Models.OpenApiMicroAppOperationModifyShareTemplateV1Request 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, "v1", "microapp", "operation", "modify_share_tpl") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("v1", "microapp", "operation", "modify_share_tpl")) + .SetQueryParam("component_appid", request.ComponentAppId) + .SetQueryParam("authorizer_access_token", request.AuthorizerAccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /v1/microapp/operation/del_share_tpl 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteOpenApiMicroAppOperationDeleteShareTemplateV1Async(this DouyinMicroAppOpenApiClient client, Models.OpenApiMicroAppOperationDeleteShareTemplateV1Request 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, "v1", "microapp", "operation", "del_share_tpl") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("v1", "microapp", "operation", "del_share_tpl")) + .SetQueryParam("component_appid", request.ComponentAppId) + .SetQueryParam("authorizer_access_token", request.AuthorizerAccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /v1/microapp/operation/set_default_share_tpl 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteOpenApiMicroAppOperationSetDefaultShareTemplateV1Async(this DouyinMicroAppOpenApiClient client, Models.OpenApiMicroAppOperationSetDefaultShareTemplateV1Request 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, "v1", "microapp", "operation", "set_default_share_tpl") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("v1", "microapp", "operation", "set_default_share_tpl")) + .SetQueryParam("component_appid", request.ComponentAppId) + .SetQueryParam("authorizer_access_token", request.AuthorizerAccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /v1/microapp/operation/add_shop_material 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteOpenApiMicroAppOperationAddShopMaterialV1Async(this DouyinMicroAppOpenApiClient client, Models.OpenApiMicroAppOperationAddShopMaterialV1Request 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, "v1", "microapp", "operation", "add_shop_material") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("v1", "microapp", "operation", "add_shop_material")) + .SetQueryParam("component_appid", request.ComponentAppId) + .SetQueryParam("authorizer_access_token", request.AuthorizerAccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [GET] /v1/microapp/operation/query_shop_material 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteOpenApiMicroAppOperationQueryShopMaterialV1Async(this DouyinMicroAppOpenApiClient client, Models.OpenApiMicroAppOperationQueryShopMaterialV1Request 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.Get, "v1", "microapp", "operation", "query_shop_material") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("v1", "microapp", "operation", "query_shop_material")) + .SetQueryParam("component_appid", request.ComponentAppId) + .SetQueryParam("authorizer_access_token", request.AuthorizerAccessToken) + .SetQueryParam("supplier_ext_id", request.SupplierExternalId); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + #endregion + + #region Package + /// + /// 异步调用 [POST] /v1/microapp/package/upload 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + [Obsolete("相关接口或字段于 2024-02-21 下线。")] + public static async Task ExecuteOpenApiMicroAppPackageUploadV1Async(this DouyinMicroAppOpenApiClient client, Models.OpenApiMicroAppPackageUploadV1Request 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, "v1", "microapp", "package", "upload") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("v1", "microapp", "package", "upload")) + .SetQueryParam("component_appid", request.ComponentAppId) + .SetQueryParam("authorizer_access_token", request.AuthorizerAccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [GET] /v1/microapp/package/audit_hosts 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + [Obsolete("相关接口或字段于 2024-02-21 下线。")] + public static async Task ExecuteOpenApiMicroAppPackageAuditHostsV1Async(this DouyinMicroAppOpenApiClient client, Models.OpenApiMicroAppPackageAuditHostsV1Request 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.Get, "v1", "microapp", "package", "audit_hosts") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("v1", "microapp", "package", "audit_hosts")) + .SetQueryParam("component_appid", request.ComponentAppId) + .SetQueryParam("authorizer_access_token", request.AuthorizerAccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /v2/microapp/package/audit 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + [Obsolete("相关接口或字段于 2024-02-21 下线。")] + public static async Task ExecuteOpenApiMicroAppPackageAuditV2Async(this DouyinMicroAppOpenApiClient client, Models.OpenApiMicroAppPackageAuditV2Request 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, "v2", "microapp", "package", "audit") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("v2", "microapp", "package", "audit")) + .SetQueryParam("component_appid", request.ComponentAppId) + .SetQueryParam("authorizer_access_token", request.AuthorizerAccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /v1/microapp/package/revoke_audit 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + [Obsolete("相关接口或字段于 2024-02-21 下线。")] + public static async Task ExecuteOpenApiMicroAppPackageRevokeAuditV1Async(this DouyinMicroAppOpenApiClient client, Models.OpenApiMicroAppPackageRevokeAuditV1Request 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, "v1", "microapp", "package", "revoke_audit") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("v1", "microapp", "package", "revoke_audit")) + .SetQueryParam("component_appid", request.ComponentAppId) + .SetQueryParam("authorizer_access_token", request.AuthorizerAccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /v1/microapp/package/release 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + [Obsolete("相关接口或字段于 2024-02-21 下线。")] + public static async Task ExecuteOpenApiMicroAppPackageReleaseV1Async(this DouyinMicroAppOpenApiClient client, Models.OpenApiMicroAppPackageReleaseV1Request 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, "v1", "microapp", "package", "release") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("v1", "microapp", "package", "release")) + .SetQueryParam("component_appid", request.ComponentAppId) + .SetQueryParam("authorizer_access_token", request.AuthorizerAccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /v1/microapp/package/rollback 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + [Obsolete("相关接口或字段于 2024-02-21 下线。")] + public static async Task ExecuteOpenApiMicroAppPackageRollbackV1Async(this DouyinMicroAppOpenApiClient client, Models.OpenApiMicroAppPackageRollbackV1Request 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, "v1", "microapp", "package", "rollback") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("v1", "microapp", "package", "rollback")) + .SetQueryParam("component_appid", request.ComponentAppId) + .SetQueryParam("authorizer_access_token", request.AuthorizerAccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [GET] /v1/microapp/package/versions 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + [Obsolete("相关接口或字段于 2024-02-21 下线。")] + public static async Task ExecuteOpenApiMicroAppPackageVersionsV1Async(this DouyinMicroAppOpenApiClient client, Models.OpenApiMicroAppPackageVersionsV1Request 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.Get, "v1", "microapp", "package", "versions") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("v1", "microapp", "package", "versions")) + .SetQueryParam("component_appid", request.ComponentAppId) + .SetQueryParam("authorizer_access_token", request.AuthorizerAccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + #endregion + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Extensions/DouyinMicroAppOpenApiClientExecuteLegacySettleExtensions.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Extensions/DouyinMicroAppOpenApiClientExecuteLegacySettleExtensions.cs new file mode 100644 index 00000000..24bbd334 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Extensions/DouyinMicroAppOpenApiClientExecuteLegacySettleExtensions.cs @@ -0,0 +1,88 @@ +using System; +using System.Net.Http; +using System.Threading; +using System.Threading.Tasks; +using Flurl; +using Flurl.Http; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi +{ + public static class DouyinMicroAppOpenApiClientExecuteLegacySettleExtensions + { + /// + /// 异步调用 [POST] /v1/settle/pre_check 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteOpenApiSettlePreCheckV1Async(this DouyinMicroAppOpenApiClient client, Models.OpenApiSettlePreCheckV1Request 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, "v1", "settle", "pre_check") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("v1", "settle", "pre_check")) + .SetQueryParam("component_appid", request.ComponentAppId) + .SetQueryParam("component_access_token", request.ComponentAccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /v1/settle/apply 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteOpenApiSettleApplyV1Async(this DouyinMicroAppOpenApiClient client, Models.OpenApiSettleApplyV1Request 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, "v1", "settle", "apply") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("v1", "settle", "apply")) + .SetQueryParam("component_appid", request.ComponentAppId) + .SetQueryParam("component_access_token", request.ComponentAccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [GET] /v1/settle/get_apply_status 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteOpenApiSettleGetApplyStatusV1Async(this DouyinMicroAppOpenApiClient client, Models.OpenApiSettleGetApplyStatusV1Request 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.Get, "v1", "settle", "get_apply_status") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("v1", "settle", "get_apply_status")) + .SetQueryParam("component_appid", request.ComponentAppId) + .SetQueryParam("component_access_token", request.ComponentAccessToken) + .SetQueryParam("apply_id", request.ApplyId); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Extensions/DouyinMicroAppOpenApiClientExecuteLegacyThirdPartyExtensions.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Extensions/DouyinMicroAppOpenApiClientExecuteLegacyThirdPartyExtensions.cs new file mode 100644 index 00000000..b66fca2e --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Extensions/DouyinMicroAppOpenApiClientExecuteLegacyThirdPartyExtensions.cs @@ -0,0 +1,364 @@ +using System; +using System.Net.Http; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using Flurl; +using Flurl.Http; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi +{ + public static class DouyinMicroAppOpenApiClientExecuteLegacyThirdPartyExtensions + { + /// + /// 异步调用 [GET] /v1/tp/auth_app_list 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteOpenApiThirdPartyAuthAppListV1Async(this DouyinMicroAppOpenApiClient client, Models.OpenApiThirdPartyAuthAppListV1Request 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.Get, "v1", "tp", "auth_app_list") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("v1", "tp", "auth_app_list")) + .SetQueryParam("component_appid", request.ComponentAppId) + .SetQueryParam("component_access_token", request.ComponentAccessToken) + .SetQueryParam("page", request.PageNumber) + .SetQueryParam("size", request.PageSize); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /v1/tp/upload_pic_material 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + [Obsolete("相关接口或字段于 2024-01-23 下线。")] + public static async Task ExecuteOpenApiThirdPartyUploadPictureMaterialV1Async(this DouyinMicroAppOpenApiClient client, Models.OpenApiThirdPartyUploadPictureMaterialV1Request request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (request.MaterialFileName is null) + request.MaterialFileName = Guid.NewGuid().ToString("N").ToLower() + ".jpg"; + + if (request.MaterialFileContentType is null) + request.MaterialFileContentType = Utilities.FileNameToContentTypeMapper.GetContentTypeForMaterial(request.MaterialFileName) ?? "image/jpeg"; + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "v1", "tp", "upload_pic_material") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("v1", "tp", "upload_pic_material")) + .SetQueryParam("component_appid", request.ComponentAppId) + .SetQueryParam("component_access_token", request.ComponentAccessToken); + + using var httpContent = Utilities.FileHttpContentBuilder.Build(fileName: request.MaterialFileName, fileBytes: request.MaterialFileBytes, fileContentType: request.MaterialFileContentType, formDataName: "material_file"); + httpContent.Add(new ByteArrayContent(Encoding.UTF8.GetBytes(request.MaterialType.ToString())), "material_type"); + + return await client.SendFlurlRequestAsync(flurlReq, httpContent: httpContent, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + #region Domain + /// + /// 异步调用 [GET] /v1/tp/download/webview_file 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteOpenApiThirdPartyDownloadWebviewFileV1Async(this DouyinMicroAppOpenApiClient client, Models.OpenApiThirdPartyDownloadWebviewFileV1Request 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.Get, "v1", "tp", "download", "webview_file") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("v1", "tp", "download", "webview_file")) + .SetQueryParam("component_appid", request.ComponentAppId) + .SetQueryParam("component_access_token", request.ComponentAccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + #endregion + + #region POI + /// + /// 异步调用 [POST] /v1/tp/poi/supplier/match 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteOpenApiThirdPartyPOISupplierMatchV1Async(this DouyinMicroAppOpenApiClient client, Models.OpenApiThirdPartyPOISupplierMatchV1Request 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, "v1", "tp", "poi", "supplier", "match") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("v1", "tp", "poi", "supplier", "match")) + .SetQueryParam("component_appid", request.ComponentAppId) + .SetQueryParam("component_access_token", request.ComponentAccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [GET] /v1/tp/poi/supplier/query/match_task 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteOpenApiThirdPartyPOISupplierQueryMatchTaskV1Async(this DouyinMicroAppOpenApiClient client, Models.OpenApiThirdPartyPOISupplierQueryMatchTaskV1Request 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.Get, "v1", "tp", "poi", "supplier", "query", "match_task") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("v1", "tp", "poi", "supplier", "query", "match_task")) + .SetQueryParam("component_appid", request.ComponentAppId) + .SetQueryParam("component_access_token", request.ComponentAccessToken) + .SetQueryParam("task_ids", string.Join(",", request.TaskIdList)); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [GET] /v1/tp/poi/supplier/query/match 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteOpenApiThirdPartyPOISupplierQueryMatchV1Async(this DouyinMicroAppOpenApiClient client, Models.OpenApiThirdPartyPOISupplierQueryMatchV1Request 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.Get, "v1", "tp", "poi", "supplier", "query", "match") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("v1", "tp", "poi", "supplier", "query", "match")) + .SetQueryParam("component_appid", request.ComponentAppId) + .SetQueryParam("component_access_token", request.ComponentAccessToken) + .SetQueryParam("supplier_ext_ids", string.Join(",", request.SupplierExternalIds)); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /v1/tp/poi/supplier/sync 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteOpenApiThirdPartyPOISupplierSyncV1Async(this DouyinMicroAppOpenApiClient client, Models.OpenApiThirdPartyPOISupplierSyncV1Request 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, "v1", "tp", "poi", "supplier", "sync") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("v1", "tp", "poi", "supplier", "sync")) + .SetQueryParam("component_appid", request.ComponentAppId) + .SetQueryParam("component_access_token", request.ComponentAccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [GET] /v1/tp/poi/supplier/query 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteOpenApiThirdPartyPOISupplierQueryV1Async(this DouyinMicroAppOpenApiClient client, Models.OpenApiThirdPartyPOISupplierQueryV1Request 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.Get, "v1", "tp", "poi", "supplier", "query") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("v1", "tp", "poi", "supplier", "query")) + .SetQueryParam("component_appid", request.ComponentAppId) + .SetQueryParam("component_access_token", request.ComponentAccessToken) + .SetQueryParam("supplier_ext_id", request.SupplierExternalId); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [GET] /v1/tp/poi/base/query/amap 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteOpenApiThirdPartyPOIBaseQueryAMapV1Async(this DouyinMicroAppOpenApiClient client, Models.OpenApiThirdPartyPOIBaseQueryAMapV1Request 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.Get, "v1", "tp", "poi", "base", "query", "amap") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("v1", "tp", "poi", "base", "query", "amap")) + .SetQueryParam("component_appid", request.ComponentAppId) + .SetQueryParam("component_access_token", request.ComponentAccessToken) + .SetQueryParam("amap_id", request.AMapId); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + #endregion + + #region Template + /// + /// 异步调用 [GET] /v1/tp/template/get_tpl_list 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + [Obsolete("相关接口或字段于 2024-01-23 下线。")] + public static async Task ExecuteOpenApiThirdPartyTemplateGetTemplateListV1Async(this DouyinMicroAppOpenApiClient client, Models.OpenApiThirdPartyTemplateGetTemplateListV1Request 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.Get, "v1", "tp", "template", "get_tpl_list") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("v1", "tp", "template", "get_tpl_list")) + .SetQueryParam("component_appid", request.ComponentAppId) + .SetQueryParam("component_access_token", request.ComponentAccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [GET] /v1/tp/template/get_tpl_app_list 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + [Obsolete("相关接口或字段于 2024-01-23 下线。")] + public static async Task ExecuteOpenApiThirdPartyTemplateGetTemplateAppListV1Async(this DouyinMicroAppOpenApiClient client, Models.OpenApiThirdPartyTemplateGetTemplateAppListV1Request 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.Get, "v1", "tp", "template", "get_tpl_app_list") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("v1", "tp", "template", "get_tpl_app_list")) + .SetQueryParam("component_appid", request.ComponentAppId) + .SetQueryParam("component_access_token", request.ComponentAccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /v1/tp/template/add_tpl 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + [Obsolete("相关接口或字段于 2024-01-23 下线。")] + public static async Task ExecuteOpenApiThirdPartyTemplateAddTemplateV1Async(this DouyinMicroAppOpenApiClient client, Models.OpenApiThirdPartyTemplateAddTemplateV1Request 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, "v1", "tp", "template", "add_tpl") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("v1", "tp", "template", "add_tpl")) + .SetQueryParam("component_appid", request.ComponentAppId) + .SetQueryParam("component_access_token", request.ComponentAccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /v1/tp/template/del_tpl 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + [Obsolete("相关接口或字段于 2024-01-23 下线。")] + public static async Task ExecuteOpenApiThirdPartyTemplateDeleteTemplateV1Async(this DouyinMicroAppOpenApiClient client, Models.OpenApiThirdPartyTemplateDeleteTemplateV1Request 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, "v1", "tp", "template", "del_tpl") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("v1", "tp", "template", "del_tpl")) + .SetQueryParam("component_appid", request.ComponentAppId) + .SetQueryParam("component_access_token", request.ComponentAccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + #endregion + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Extensions/DouyinMicroAppOpenApiClientExecutePlatformWebhookExtensions.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Extensions/DouyinMicroAppOpenApiClientExecutePlatformWebhookExtensions.cs new file mode 100644 index 00000000..397df718 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Extensions/DouyinMicroAppOpenApiClientExecutePlatformWebhookExtensions.cs @@ -0,0 +1,105 @@ +using System; +using System.Net.Http; +using System.Threading; +using System.Threading.Tasks; +using Flurl.Http; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi +{ + public static class DouyinMicroAppOpenApiClientExecutePlatformWebhookExtensions + { + #region Webhook + /// + /// 异步调用 [GET] /platform/v1/webhook/reset_secret/ 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteOpenPlatformWebhookResetSecretV1Async(this DouyinMicroAppOpenApiClient client, Models.OpenPlatformWebhookResetSecretV1Request 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.Get, "platform", "v1", "webhook", "reset_secret", "") + .WithHeader("access-token", request.AuthorizerAccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /platform/v1/webhook/save_callback_url/ 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteOpenPlatformWebhookSaveCallbackUrlV1Async(this DouyinMicroAppOpenApiClient client, Models.OpenPlatformWebhookSaveCallbackUrlV1Request 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, "platform", "v1", "webhook", "save_callback_url", "") + .WithHeader("access-token", request.AuthorizerAccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [GET] /platform/v1/webhook/event_status_list/ 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteOpenPlatformWebhookEventStatusListV1Async(this DouyinMicroAppOpenApiClient client, Models.OpenPlatformWebhookEventStatusListV1Request 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.Get, "platform", "v1", "webhook", "event_status_list", "") + .WithHeader("access-token", request.AuthorizerAccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /platform/v1/webhook/update_event_status/ 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteOpenPlatformWebhookUpdateEventStatusV1Async(this DouyinMicroAppOpenApiClient client, Models.OpenPlatformWebhookUpdateEventStatusV1Request 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, "platform", "v1", "webhook", "update_event_status", "") + .WithHeader("access-token", request.AuthorizerAccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + #endregion + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Extensions/DouyinMicroAppOpenApiClientExecuteTpAppAuthExtensions.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Extensions/DouyinMicroAppOpenApiClientExecuteTpAppAuthExtensions.cs new file mode 100644 index 00000000..54a78deb --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Extensions/DouyinMicroAppOpenApiClientExecuteTpAppAuthExtensions.cs @@ -0,0 +1,141 @@ +using System; +using System.Net.Http; +using System.Threading; +using System.Threading.Tasks; +using Flurl; +using Flurl.Http; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi +{ + public static class DouyinMicroAppOpenApiClientExecuteTpAppAuthExtensions + { + /// + /// 异步调用 [GET] /openapi/v2/auth/tp/token 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteOpenAuthThirdPartyTokenV2Async(this DouyinMicroAppOpenApiClient client, Models.OpenAuthThirdPartyTokenV2Request request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (request.ComponentAppId is null) + request.ComponentAppId = client.Credentials.ComponentAppId; + + if (request.ComponentAppSecret is null) + request.ComponentAppSecret = client.Credentials.ComponentAppSecret; + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Get, "openapi", "v2", "auth", "token") + .WithUrl(url => url.RemovePath().AppendPathSegments("openapi", "v2", "auth", "token")) // NOTICE: 特殊入口点 + .SetQueryParam("component_appid", request.ComponentAppId) + .SetQueryParam("component_appsecret", request.ComponentAppSecret) + .SetQueryParam("component_ticket", request.ComponentTicket); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /tpapp/v3/auth/gen_link 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteOpenTpAppAuthGenerateLinkV3Async(this DouyinMicroAppOpenApiClient client, Models.OpenTpAppAuthGenerateLinkV3Request 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, "tpapp", "v3", "auth", "gen_link") + .WithHeader("access-token", request.ComponentAccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [GET] /tpapp/v2/auth/get_auth_token 接口。 + /// + /// REF:
+ ///
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteOpenTpAppAuthGetAuthTokenV2Async(this DouyinMicroAppOpenApiClient client, Models.OpenTpAppAuthGetAuthTokenV2Request 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.Get, "tpapp", "v2", "auth", "get_auth_token") + .SetQueryParam("grant_type", request.GrantType) + .SetQueryParam("authorization_code", request.AuthorizationCode) + .SetQueryParam("authorizer_refresh_token", request.AuthorizerAccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /tpapp/v2/auth/retrieve_auth_code 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteOpenTpAppAuthRetrieveAuthCodeV2Async(this DouyinMicroAppOpenApiClient client, Models.OpenTpAppAuthRetrieveAuthCodeV2Request 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, "tpapp", "v2", "auth", "retrieve_auth_code") + .WithHeader("access-token", request.ComponentAccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [GET] /tpapp/v2/auth/get_auth_app_list 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteOpenTpAppAuthGetAuthAppListV2Async(this DouyinMicroAppOpenApiClient client, Models.OpenTpAppAuthGetAuthAppListV2Request 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.Get, "tpapp", "v2", "auth", "get_auth_app_list") + .SetQueryParam("page", request.PageNumber) + .SetQueryParam("size", request.PageSize) + .WithHeader("access-token", request.ComponentAccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Extensions/DouyinMicroAppOpenApiClientExecuteTpAppFileExtensions.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Extensions/DouyinMicroAppOpenApiClientExecuteTpAppFileExtensions.cs new file mode 100644 index 00000000..66398a55 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Extensions/DouyinMicroAppOpenApiClientExecuteTpAppFileExtensions.cs @@ -0,0 +1,44 @@ +using System; +using System.Net.Http; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using Flurl.Http; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi +{ + public static class DouyinMicroAppOpenApiClientExecuteTpAppFileExtensions + { + /// + /// 异步调用 [POST] /tpapp/v2/file/upload_material 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteOpenTpAppFileUploadMaterialV2Async(this DouyinMicroAppOpenApiClient client, Models.OpenTpAppFileUploadMaterialV2Request request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (request.MaterialFileName is null) + request.MaterialFileName = Guid.NewGuid().ToString("N").ToLower() + ".jpg"; + + if (request.MaterialFileContentType is null) + request.MaterialFileContentType = Utilities.FileNameToContentTypeMapper.GetContentTypeForMaterial(request.MaterialFileName) ?? "image/jpeg"; + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "tpapp", "v2", "file", "upload_material") + .WithHeader("access-token", request.ComponentAccessToken); + + using var httpContent = Utilities.FileHttpContentBuilder.Build(fileName: request.MaterialFileName, fileBytes: request.MaterialFileBytes, fileContentType: request.MaterialFileContentType, formDataName: "material_file"); + httpContent.Add(new ByteArrayContent(Encoding.UTF8.GetBytes(request.MaterialType.ToString())), "material_type"); + + return await client.SendFlurlRequestAsync(flurlReq, httpContent: httpContent, cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Extensions/DouyinMicroAppOpenApiClientExecuteTpAppTemplateExtensions.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Extensions/DouyinMicroAppOpenApiClientExecuteTpAppTemplateExtensions.cs new file mode 100644 index 00000000..78480068 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Extensions/DouyinMicroAppOpenApiClientExecuteTpAppTemplateExtensions.cs @@ -0,0 +1,103 @@ +using System; +using System.Net.Http; +using System.Threading; +using System.Threading.Tasks; +using Flurl.Http; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi +{ + public static class DouyinMicroAppOpenApiClientExecuteTpAppTemplateExtensions + { + /// + /// 异步调用 [GET] /tpapp/v2/template/get_tpl_app_list 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteOpenTpAppTemplateGetTemplateAppListV2Async(this DouyinMicroAppOpenApiClient client, Models.OpenTpAppTemplateGetTemplateAppListV2Request 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.Get, "tpapp", "v2", "template", "get_tpl_app_list") + .WithHeader("access-token", request.ComponentAccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [GET] /tpapp/v2/template/get_tpl_list 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteOpenTpAppTemplateGetTemplateListV2Async(this DouyinMicroAppOpenApiClient client, Models.OpenTpAppTemplateGetTemplateListV2Request 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.Get, "tpapp", "v2", "template", "get_tpl_list") + .WithHeader("access-token", request.ComponentAccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /tpapp/v2/template/add_tpl 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteOpenTpAppTemplateAddTemplateV2Async(this DouyinMicroAppOpenApiClient client, Models.OpenTpAppTemplateAddTemplateV2Request 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, "tpapp", "v2", "template", "add_tpl") + .WithHeader("access-token", request.ComponentAccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /tpapp/v2/template/del_tpl 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteOpenTpAppTemplateDeleteTemplateV2Async(this DouyinMicroAppOpenApiClient client, Models.OpenTpAppTemplateDeleteTemplateV2Request 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, "tpapp", "v2", "template", "add_tpl") + .WithHeader("access-token", request.ComponentAccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Extensions/DouyinMicroAppOpenApiClientParameterExtensions.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Extensions/DouyinMicroAppOpenApiClientParameterExtensions.cs new file mode 100644 index 00000000..897d1a17 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Extensions/DouyinMicroAppOpenApiClientParameterExtensions.cs @@ -0,0 +1,30 @@ +using Flurl; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi +{ + public static class DouyinMicroAppOpenApiClientParameterExtensions + { + private const string BASE_URL = "https://open.microapp.bytedance.com"; + + /// + /// 生成第三方应用服务商授权 URL。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static string GenerateParameterizedUrlForOpenComponentThirdPartyAuthorization(this DouyinMicroAppOpenApiClient client, string preAuthCode, string redirectUrl) + { + return new Url(BASE_URL) + .AppendPathSegments("mappconsole", "tp", "authorization") + .SetQueryParam("component_appid", client.Credentials.ComponentAppId) + .SetQueryParam("pre_auth_code", preAuthCode) + .SetQueryParam("redirect_uri", redirectUrl) + .ToString(); + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsBasicInfo/OpenAppsBasicInfoCheckAppNameV2Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsBasicInfo/OpenAppsBasicInfoCheckAppNameV2Request.cs new file mode 100644 index 00000000..7fbab145 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsBasicInfo/OpenAppsBasicInfoCheckAppNameV2Request.cs @@ -0,0 +1,15 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [GET] /apps/v2/basic_info/check_app_name 接口的请求。 + /// + public class OpenAppsBasicInfoCheckAppNameV2Request : DouyinMicroAppOpenApiRequest + { + /// + /// 获取或设置待检测的小程序名称。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string AppName { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsBasicInfo/OpenAppsBasicInfoCheckAppNameV2Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsBasicInfo/OpenAppsBasicInfoCheckAppNameV2Response.cs new file mode 100644 index 00000000..72b6d4cc --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsBasicInfo/OpenAppsBasicInfoCheckAppNameV2Response.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [GET] /apps/v2/basic_info/check_app_name 接口的响应。 + /// + public class OpenAppsBasicInfoCheckAppNameV2Response : DouyinMicroAppOpenApiResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsBasicInfo/OpenAppsBasicInfoGetInfoV2Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsBasicInfo/OpenAppsBasicInfoGetInfoV2Request.cs new file mode 100644 index 00000000..8f975394 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsBasicInfo/OpenAppsBasicInfoGetInfoV2Request.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [GET] /apps/v2/basic_info/get_info 接口的请求。 + /// + public class OpenAppsBasicInfoGetInfoV2Request : DouyinMicroAppOpenApiRequest + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsBasicInfo/OpenAppsBasicInfoGetInfoV2Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsBasicInfo/OpenAppsBasicInfoGetInfoV2Response.cs new file mode 100644 index 00000000..0b1a7bd1 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsBasicInfo/OpenAppsBasicInfoGetInfoV2Response.cs @@ -0,0 +1,256 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [GET] /apps/v2/basic_info/get_info 接口的响应。 + /// + public class OpenAppsBasicInfoGetInfoV2Response : DouyinMicroAppOpenApiResponse + { + public static class Types + { + public class Data + { + public static class Types + { + public class NewNameAuditInfo + { + /// + /// 获取或设置新名称。 + /// + [Newtonsoft.Json.JsonProperty("new_name")] + [System.Text.Json.Serialization.JsonPropertyName("new_name")] + public string NewName { get; set; } = default!; + + /// + /// 获取或设置审核状态。 + /// + [Newtonsoft.Json.JsonProperty("new_name_audit_state")] + [System.Text.Json.Serialization.JsonPropertyName("new_name_audit_state")] + public int AuditState { get; set; } + + /// + /// 获取或设置剩余更改次数。 + /// + [Newtonsoft.Json.JsonProperty("remaining_times")] + [System.Text.Json.Serialization.JsonPropertyName("remaining_times")] + public int RemainingTimes { get; set; } + + /// + /// 获取或设置审核拒绝原因。 + /// + [Newtonsoft.Json.JsonProperty("reason")] + [System.Text.Json.Serialization.JsonPropertyName("reason")] + public string? RejectReason { get; set; } + + /// + /// 获取或设置修改建议。 + /// + [Newtonsoft.Json.JsonProperty("advice")] + [System.Text.Json.Serialization.JsonPropertyName("advice")] + public string? Advice { get; set; } + } + + public class NewIntroductionAuditInfo + { + /// + /// 获取或设置新简介。 + /// + [Newtonsoft.Json.JsonProperty("new_intro")] + [System.Text.Json.Serialization.JsonPropertyName("new_intro")] + public string NewIntroduction { get; set; } = default!; + + /// + /// 获取或设置审核状态。 + /// + [Newtonsoft.Json.JsonProperty("new_intro_audit_state")] + [System.Text.Json.Serialization.JsonPropertyName("new_intro_audit_state")] + public int AuditState { get; set; } + + /// + /// 获取或设置剩余更改次数。 + /// + [Newtonsoft.Json.JsonProperty("remaining_times")] + [System.Text.Json.Serialization.JsonPropertyName("remaining_times")] + public int RemainingTimes { get; set; } + + /// + /// 获取或设置审核拒绝原因。 + /// + [Newtonsoft.Json.JsonProperty("reason")] + [System.Text.Json.Serialization.JsonPropertyName("reason")] + public string? RejectReason { get; set; } + + /// + /// 获取或设置修改建议。 + /// + [Newtonsoft.Json.JsonProperty("advice")] + [System.Text.Json.Serialization.JsonPropertyName("advice")] + public string? Advice { get; set; } + } + + public class NewIconAuditInfo + { + /// + /// 获取或设置新图标 URL。 + /// + [Newtonsoft.Json.JsonProperty("new_icon")] + [System.Text.Json.Serialization.JsonPropertyName("new_icon")] + public string NewIconUrl { get; set; } = default!; + + /// + /// 获取或设置审核状态。 + /// + [Newtonsoft.Json.JsonProperty("new_icon_audit_state")] + [System.Text.Json.Serialization.JsonPropertyName("new_icon_audit_state")] + public int AuditState { get; set; } + + /// + /// 获取或设置剩余更改次数。 + /// + [Newtonsoft.Json.JsonProperty("remaining_times")] + [System.Text.Json.Serialization.JsonPropertyName("remaining_times")] + public int RemainingTimes { get; set; } + + /// + /// 获取或设置审核拒绝原因。 + /// + [Newtonsoft.Json.JsonProperty("reason")] + [System.Text.Json.Serialization.JsonPropertyName("reason")] + public string? RejectReason { get; set; } + + /// + /// 获取或设置修改建议。 + /// + [Newtonsoft.Json.JsonProperty("advice")] + [System.Text.Json.Serialization.JsonPropertyName("advice")] + public string? Advice { get; set; } + } + + public class CategoryAuditInfo + { + /// + /// 获取或设置服务类目 ID 字符串(以逗号分隔)。 + /// + [Newtonsoft.Json.JsonProperty("app_category")] + [System.Text.Json.Serialization.JsonPropertyName("app_category")] + public string CategoryIdString { get; set; } = default!; + + /// + /// 获取或设置服务类目名称(以短横线分隔)。 + /// + [Newtonsoft.Json.JsonProperty("app_category_name")] + [System.Text.Json.Serialization.JsonPropertyName("app_category_name")] + public string CategoryNameString { get; set; } = default!; + + /// + /// 获取或设置审核状态。 + /// + [Newtonsoft.Json.JsonProperty("app_category_audit_state")] + [System.Text.Json.Serialization.JsonPropertyName("app_category_audit_state")] + public int AuditState { get; set; } + + /// + /// 获取或设置审核拒绝原因。 + /// + [Newtonsoft.Json.JsonProperty("reason")] + [System.Text.Json.Serialization.JsonPropertyName("reason")] + public string? RejectReason { get; set; } + } + + public class SubjectAuditInfo + { + /// + /// 获取或设置主体类型。 + /// + [Newtonsoft.Json.JsonProperty("subject_type")] + [System.Text.Json.Serialization.JsonPropertyName("subject_type")] + public int SubjectType { get; set; } + + /// + /// 获取或设置主体名称。 + /// + [Newtonsoft.Json.JsonProperty("subject_name")] + [System.Text.Json.Serialization.JsonPropertyName("subject_name")] + public string SubjectName { get; set; } = default!; + } + } + + /// + /// 获取或设置小程序 AppId。 + /// + [Newtonsoft.Json.JsonProperty("app_id")] + [System.Text.Json.Serialization.JsonPropertyName("app_id")] + public string AppId { get; set; } = default!; + + /// + /// 获取或设置小程序名称。 + /// + [Newtonsoft.Json.JsonProperty("app_name")] + [System.Text.Json.Serialization.JsonPropertyName("app_name")] + public string AppName { get; set; } = default!; + + /// + /// 获取或设置小程序状态。 + /// + [Newtonsoft.Json.JsonProperty("app_state")] + [System.Text.Json.Serialization.JsonPropertyName("app_state")] + public int AppState { get; set; } + + /// + /// 获取或设置小程序简介。 + /// + [Newtonsoft.Json.JsonProperty("app_intro")] + [System.Text.Json.Serialization.JsonPropertyName("app_intro")] + public string AppIntroduction { get; set; } = default!; + + /// + /// 获取或设置小程序图标 URL。 + /// + [Newtonsoft.Json.JsonProperty("app_icon")] + [System.Text.Json.Serialization.JsonPropertyName("app_icon")] + public string AppIconUrl { get; set; } = default!; + + /// + /// 获取或设置新名称审核信息。 + /// + [Newtonsoft.Json.JsonProperty("new_name_audit_info")] + [System.Text.Json.Serialization.JsonPropertyName("new_name_audit_info")] + public Types.NewNameAuditInfo? NewNameAuditInfo { get; set; } + + /// + /// 获取或设置新简介审核信息。 + /// + [Newtonsoft.Json.JsonProperty("new_intro_audit_info")] + [System.Text.Json.Serialization.JsonPropertyName("new_intro_audit_info")] + public Types.NewIntroductionAuditInfo? NewIntroductionAuditInfo { get; set; } + + /// + /// 获取或设置新图标审核信息。 + /// + [Newtonsoft.Json.JsonProperty("new_icon_audit_info")] + [System.Text.Json.Serialization.JsonPropertyName("new_icon_audit_info")] + public Types.NewIconAuditInfo? NewIconAuditInfo { get; set; } + + /// + /// 获取或设置服务类目审核信息列表。 + /// + [Newtonsoft.Json.JsonProperty("app_categories_audit_info")] + [System.Text.Json.Serialization.JsonPropertyName("app_categories_audit_info")] + public Types.CategoryAuditInfo[]? CategoryAuditInfoList { get; set; } + + /// + /// 获取或设置主体审核信息。 + /// + [Newtonsoft.Json.JsonProperty("subject_audit_info")] + [System.Text.Json.Serialization.JsonPropertyName("subject_audit_info")] + public Types.SubjectAuditInfo? SubjectAuditInfo { get; set; } + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsBasicInfo/OpenAppsBasicInfoGetQrcodeV2Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsBasicInfo/OpenAppsBasicInfoGetQrcodeV2Request.cs new file mode 100644 index 00000000..77ef6caa --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsBasicInfo/OpenAppsBasicInfoGetQrcodeV2Request.cs @@ -0,0 +1,23 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [POST] /apps/v2/basic_info/get_qr_code 接口的请求。 + /// + public class OpenAppsBasicInfoGetQrcodeV2Request : DouyinMicroAppOpenApiRequest + { + /// + /// 获取或设置版本。 + /// 默认值:"current" + /// + [Newtonsoft.Json.JsonProperty("version")] + [System.Text.Json.Serialization.JsonPropertyName("version")] + public string Version { get; set; } = "current"; + + /// + /// 获取或设置小程序页面路径。 + /// + [Newtonsoft.Json.JsonProperty("path")] + [System.Text.Json.Serialization.JsonPropertyName("path")] + public string PagePath { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsBasicInfo/OpenAppsBasicInfoGetQrcodeV2Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsBasicInfo/OpenAppsBasicInfoGetQrcodeV2Response.cs new file mode 100644 index 00000000..c2b2d8ab --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsBasicInfo/OpenAppsBasicInfoGetQrcodeV2Response.cs @@ -0,0 +1,28 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [POST] /apps/v2/basic_info/get_qr_code 接口的响应。 + /// + public class OpenAppsBasicInfoGetQrcodeV2Response : DouyinMicroAppOpenApiResponse + { + public static class Types + { + public class Data + { + /// + /// 获取或设置二维码链接。 + /// + [Newtonsoft.Json.JsonProperty("qr_code_url")] + [System.Text.Json.Serialization.JsonPropertyName("qr_code_url")] + public string QrcodeUrl { get; set; } = default!; + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsBasicInfo/OpenAppsBasicInfoModifyAppIconV2Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsBasicInfo/OpenAppsBasicInfoModifyAppIconV2Request.cs new file mode 100644 index 00000000..c815f301 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsBasicInfo/OpenAppsBasicInfoModifyAppIconV2Request.cs @@ -0,0 +1,15 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [POST] /apps/v2/basic_info/modify_app_icon 接口的请求。 + /// + public class OpenAppsBasicInfoModifyAppIconV2Request : DouyinMicroAppOpenApiRequest + { + /// + /// 获取或设置准备修改的小程序图标路径。 + /// + [Newtonsoft.Json.JsonProperty("new_icon_path")] + [System.Text.Json.Serialization.JsonPropertyName("new_icon_path")] + public string NewIconPath { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsBasicInfo/OpenAppsBasicInfoModifyAppIconV2Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsBasicInfo/OpenAppsBasicInfoModifyAppIconV2Response.cs new file mode 100644 index 00000000..43de879a --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsBasicInfo/OpenAppsBasicInfoModifyAppIconV2Response.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [POST] /apps/v2/basic_info/modify_app_icon 接口的响应。 + /// + public class OpenAppsBasicInfoModifyAppIconV2Response : DouyinMicroAppOpenApiResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsBasicInfo/OpenAppsBasicInfoModifyAppIntroductionV2Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsBasicInfo/OpenAppsBasicInfoModifyAppIntroductionV2Request.cs new file mode 100644 index 00000000..1735d15d --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsBasicInfo/OpenAppsBasicInfoModifyAppIntroductionV2Request.cs @@ -0,0 +1,15 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [POST] /apps/v2/basic_info/modify_app_intro 接口的请求。 + /// + public class OpenAppsBasicInfoModifyAppIntroductionV2Request : DouyinMicroAppOpenApiRequest + { + /// + /// 获取或设置准备修改的小程序简介。 + /// + [Newtonsoft.Json.JsonProperty("new_intro")] + [System.Text.Json.Serialization.JsonPropertyName("new_intro")] + public string NewIntroduction { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsBasicInfo/OpenAppsBasicInfoModifyAppIntroductionV2Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsBasicInfo/OpenAppsBasicInfoModifyAppIntroductionV2Response.cs new file mode 100644 index 00000000..f9e82222 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsBasicInfo/OpenAppsBasicInfoModifyAppIntroductionV2Response.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [POST] /apps/v2/basic_info/modify_app_intro 接口的响应。 + /// + public class OpenAppsBasicInfoModifyAppIntroductionV2Response : DouyinMicroAppOpenApiResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsBasicInfo/OpenAppsBasicInfoModifyAppNameV2Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsBasicInfo/OpenAppsBasicInfoModifyAppNameV2Request.cs new file mode 100644 index 00000000..3ebee0dc --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsBasicInfo/OpenAppsBasicInfoModifyAppNameV2Request.cs @@ -0,0 +1,22 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [POST] /apps/v2/basic_info/modify_app_name 接口的请求。 + /// + public class OpenAppsBasicInfoModifyAppNameV2Request : DouyinMicroAppOpenApiRequest + { + /// + /// 获取或设置准备修改的小程序名称。 + /// + [Newtonsoft.Json.JsonProperty("new_name")] + [System.Text.Json.Serialization.JsonPropertyName("new_name")] + public string NewName { get; set; } = string.Empty; + + /// + /// 获取或设置审核材料路径。 + /// + [Newtonsoft.Json.JsonProperty("material_file_path")] + [System.Text.Json.Serialization.JsonPropertyName("material_file_path")] + public string? MaterialFilePath { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsBasicInfo/OpenAppsBasicInfoModifyAppNameV2Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsBasicInfo/OpenAppsBasicInfoModifyAppNameV2Response.cs new file mode 100644 index 00000000..ab0d2c9c --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsBasicInfo/OpenAppsBasicInfoModifyAppNameV2Response.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [POST] /apps/v2/basic_info/modify_app_name 接口的响应。 + /// + public class OpenAppsBasicInfoModifyAppNameV2Response : DouyinMicroAppOpenApiResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsCategory/OpenAppsCategoryAddCategoriesV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsCategory/OpenAppsCategoryAddCategoriesV1Request.cs new file mode 100644 index 00000000..6199aee4 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsCategory/OpenAppsCategoryAddCategoriesV1Request.cs @@ -0,0 +1,64 @@ +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [POST] /apps/v1/category/add_categories 接口的请求。 + /// + public class OpenAppsCategoryAddCategoriesV1Request : DouyinMicroAppOpenApiRequest + { + public static class Types + { + public class CategoryInfo + { + public static class Types + { + public class Certification + { + /// + /// 获取或设置资质 ID。 + /// + [Newtonsoft.Json.JsonProperty("id")] + [System.Text.Json.Serialization.JsonPropertyName("id")] + public string Id { get; set; } = string.Empty; + + /// + /// 获取或设置资质名称。 + /// + [Newtonsoft.Json.JsonProperty("name")] + [System.Text.Json.Serialization.JsonPropertyName("name")] + public string Name { get; set; } = string.Empty; + + /// + /// 获取或设置资质文件路径列表。 + /// + [Newtonsoft.Json.JsonProperty("path_list")] + [System.Text.Json.Serialization.JsonPropertyName("path_list")] + public IList? FilePathList { get; set; } + } + } + + /// + /// 获取或设置服务类目 ID 字符串(以逗号分隔)。 + /// + [Newtonsoft.Json.JsonProperty("category")] + [System.Text.Json.Serialization.JsonPropertyName("category")] + public string CategoryIdString { get; set; } = string.Empty; + + /// + /// 获取或设置服务类目资质信息列表。 + /// + [Newtonsoft.Json.JsonProperty("category_cert")] + [System.Text.Json.Serialization.JsonPropertyName("category_cert")] + public IList? CertificationList { get; set; } + } + } + + /// + /// 获取或设置服务类目信息列表。 + /// + [Newtonsoft.Json.JsonProperty("category_info")] + [System.Text.Json.Serialization.JsonPropertyName("category_info")] + public IList CategoryInfoList { get; set; } = new List(); + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsCategory/OpenAppsCategoryAddCategoriesV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsCategory/OpenAppsCategoryAddCategoriesV1Response.cs new file mode 100644 index 00000000..963eb374 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsCategory/OpenAppsCategoryAddCategoriesV1Response.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [POST] /apps/v1/category/add_categories 接口的响应。 + /// + public class OpenAppsCategoryAddCategoriesV1Response : DouyinMicroAppOpenApiResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsCategory/OpenAppsCategoryDeleteCategoriesV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsCategory/OpenAppsCategoryDeleteCategoriesV1Request.cs new file mode 100644 index 00000000..fcb4673b --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsCategory/OpenAppsCategoryDeleteCategoriesV1Request.cs @@ -0,0 +1,17 @@ +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [POST] /apps/v1/category/del_categories 接口的请求。 + /// + public class OpenAppsCategoryDeleteCategoriesV1Request : DouyinMicroAppOpenApiRequest + { + /// + /// 获取或设置服务类目 ID 字符串(以逗号分隔)列表。 + /// + [Newtonsoft.Json.JsonProperty("categories")] + [System.Text.Json.Serialization.JsonPropertyName("categories")] + public IList CategoryIdStringList { get; set; } = new List(); + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsCategory/OpenAppsCategoryDeleteCategoriesV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsCategory/OpenAppsCategoryDeleteCategoriesV1Response.cs new file mode 100644 index 00000000..ce045359 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsCategory/OpenAppsCategoryDeleteCategoriesV1Response.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [POST] /apps/v1/category/del_categories 接口的响应。 + /// + public class OpenAppsCategoryDeleteCategoriesV1Response : DouyinMicroAppOpenApiResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsCategory/OpenAppsCategoryGetAllCategoriesV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsCategory/OpenAppsCategoryGetAllCategoriesV1Request.cs new file mode 100644 index 00000000..ec5bdd51 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsCategory/OpenAppsCategoryGetAllCategoriesV1Request.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [GET] /apps/v1/category/get_all_categories 接口的请求。 + /// + public class OpenAppsCategoryGetAllCategoriesV1Request : DouyinMicroAppOpenApiRequest + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsCategory/OpenAppsCategoryGetAllCategoriesV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsCategory/OpenAppsCategoryGetAllCategoriesV1Response.cs new file mode 100644 index 00000000..014b2a97 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsCategory/OpenAppsCategoryGetAllCategoriesV1Response.cs @@ -0,0 +1,123 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [GET] /apps/v1/category/get_all_categories 接口的响应。 + /// + public class OpenAppsCategoryGetAllCategoriesV1Response : DouyinMicroAppOpenApiResponse + { + public static class Types + { + public class Data + { + public static class Types + { + public class Category + { + public static class Types + { + public class Certification + { + public static class Types + { + public class Detail + { + /// + /// 获取或设置资质 ID。 + /// + [Newtonsoft.Json.JsonProperty("id")] + [System.Text.Json.Serialization.JsonPropertyName("id")] + public string Id { get; set; } = default!; + + /// + /// 获取或设置资质名称。 + /// + [Newtonsoft.Json.JsonProperty("name")] + [System.Text.Json.Serialization.JsonPropertyName("name")] + public string Name { get; set; } = default!; + } + } + + /// + /// 获取或设置需要的资质汇总列表。 + /// + [Newtonsoft.Json.JsonProperty("relation")] + [System.Text.Json.Serialization.JsonPropertyName("relation")] + public string[] RelationList { get; set; } = default!; + + /// + /// 获取或设置需要的资质的详细信息列表。 + /// + [Newtonsoft.Json.JsonProperty("list")] + [System.Text.Json.Serialization.JsonPropertyName("list")] + public Types.Detail[] DetailList { get; set; } = default!; + + /// + /// 获取或设置解释说明。 + /// + [Newtonsoft.Json.JsonProperty("explanation")] + [System.Text.Json.Serialization.JsonPropertyName("explanation")] + public string Explanation { get; set; } = default!; + } + } + + /// + /// 获取或设置服务类目 ID。 + /// + [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; } = default!; + + /// + /// 获取或设置服务类目级别。 + /// + [Newtonsoft.Json.JsonProperty("level")] + [System.Text.Json.Serialization.JsonPropertyName("level")] + public int Level { get; set; } + + /// + /// 获取或设置一级类目 ID。 + /// + [Newtonsoft.Json.JsonProperty("fpid")] + [System.Text.Json.Serialization.JsonPropertyName("fpid")] + public int? FirstCategoryId { get; set; } + + /// + /// 获取或设置二级类目 ID。 + /// + [Newtonsoft.Json.JsonProperty("spid")] + [System.Text.Json.Serialization.JsonPropertyName("spid")] + public int? SecondCategoryId { get; set; } + + /// + /// 获取或设置需要的资质信息。 + /// + [Newtonsoft.Json.JsonProperty("certification")] + [System.Text.Json.Serialization.JsonPropertyName("certification")] + public Types.Certification? Certification { get; set; } + } + } + + /// + /// 获取或设置服务类目列表。 + /// + [Newtonsoft.Json.JsonProperty("category_list")] + [System.Text.Json.Serialization.JsonPropertyName("category_list")] + public Types.Category[] CategoryList { get; set; } = default!; + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsCategory/OpenAppsCategoryGetAuditCategoriesV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsCategory/OpenAppsCategoryGetAuditCategoriesV1Request.cs new file mode 100644 index 00000000..d98d6094 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsCategory/OpenAppsCategoryGetAuditCategoriesV1Request.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [GET] /apps/v1/category/get_audit_categories 接口的请求。 + /// + public class OpenAppsCategoryGetAuditCategoriesV1Request : DouyinMicroAppOpenApiRequest + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsCategory/OpenAppsCategoryGetAuditCategoriesV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsCategory/OpenAppsCategoryGetAuditCategoriesV1Response.cs new file mode 100644 index 00000000..b3cb9586 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsCategory/OpenAppsCategoryGetAuditCategoriesV1Response.cs @@ -0,0 +1,124 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [GET] /apps/v1/category/get_audit_categories 接口的响应。 + /// + public class OpenAppsCategoryGetAuditCategoriesV1Response : DouyinMicroAppOpenApiResponse + { + public static class Types + { + public class Data + { + public static class Types + { + public class CategoryAuditInfo + { + public static class Types + { + public class Certification + { + /// + /// 获取或设置资质 ID。 + /// + [Newtonsoft.Json.JsonProperty("id")] + [System.Text.Json.Serialization.JsonPropertyName("id")] + public string Id { get; set; } = default!; + + /// + /// 获取或设置资质名称。 + /// + [Newtonsoft.Json.JsonProperty("name")] + [System.Text.Json.Serialization.JsonPropertyName("name")] + public string Name { get; set; } = default!; + + /// + /// 获取或设置资质文件路径列表。 + /// + [Newtonsoft.Json.JsonProperty("path_list")] + [System.Text.Json.Serialization.JsonPropertyName("path_list")] + public string[]? FilePathList { get; set; } + } + } + + /// + /// 获取或设置服务类目 ID 字符串(以逗号分隔)。 + /// + [Newtonsoft.Json.JsonProperty("category")] + [System.Text.Json.Serialization.JsonPropertyName("category")] + public string CategoryIdString { get; set; } = default!; + + /// + /// 获取或设置服务类目名称字符串(以短横线分隔)。 + /// + [Newtonsoft.Json.JsonProperty("category_name")] + [System.Text.Json.Serialization.JsonPropertyName("category_name")] + public string CategoryNameString { get; set; } = default!; + + /// + /// 获取或设置服务类目资质 ID 字符串(以逗号分隔)。 + /// + [Newtonsoft.Json.JsonProperty("category_cert_ids")] + [System.Text.Json.Serialization.JsonPropertyName("category_cert_ids")] + public string CertificationIdString { get; set; } = default!; + + /// + /// 获取或设置服务类目资质信息列表。 + /// + [Newtonsoft.Json.JsonProperty("category_cert")] + [System.Text.Json.Serialization.JsonPropertyName("category_cert")] + public Types.Certification[] CertificationList { get; set; } = default!; + + /// + /// 获取或设置审核状态。 + /// + [Newtonsoft.Json.JsonProperty("category_audit_state")] + [System.Text.Json.Serialization.JsonPropertyName("category_audit_state")] + public int AuditState { get; set; } + + /// + /// 获取或设置审核拒绝原因。 + /// + [Newtonsoft.Json.JsonProperty("reason")] + [System.Text.Json.Serialization.JsonPropertyName("reason")] + public string? RejectReason { get; set; } + } + } + + /// + /// 获取或设置服务类目审核信息列表。 + /// + [Newtonsoft.Json.JsonProperty("app_category_audit_info")] + [System.Text.Json.Serialization.JsonPropertyName("app_category_audit_info")] + public Types.CategoryAuditInfo[] CategoryAuditInfoList { get; set; } = default!; + + /// + /// 获取或设置剩余修改次数。 + /// + [Newtonsoft.Json.JsonProperty("remaining_times")] + [System.Text.Json.Serialization.JsonPropertyName("remaining_times")] + public int RemainingTimes { get; set; } + + /// + /// 获取或设置本月总共可以修改次数。 + /// + [Newtonsoft.Json.JsonProperty("category_change_limit")] + [System.Text.Json.Serialization.JsonPropertyName("category_change_limit")] + public int CategoryChangeLimit { get; set; } + + /// + /// 获取或设置最多可以设置的服务类目数量。 + /// + [Newtonsoft.Json.JsonProperty("category_limit")] + [System.Text.Json.Serialization.JsonPropertyName("category_limit")] + public int CategoryTotalLimit { get; set; } + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsCategory/OpenAppsCategorySupplyCategoriesV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsCategory/OpenAppsCategorySupplyCategoriesV1Request.cs new file mode 100644 index 00000000..20217671 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsCategory/OpenAppsCategorySupplyCategoriesV1Request.cs @@ -0,0 +1,44 @@ +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [POST] /apps/v1/category/supply_categories 接口的请求。 + /// + public class OpenAppsCategorySupplyCategoriesV1Request : DouyinMicroAppOpenApiRequest + { + public static class Types + { + public class CategoryInfo + { + public static class Types + { + public class Certification : OpenAppsCategoryAddCategoriesV1Request.Types.CategoryInfo.Types.Certification + { + } + } + + /// + /// 获取或设置服务类目 ID 字符串(以逗号分隔)。 + /// + [Newtonsoft.Json.JsonProperty("category")] + [System.Text.Json.Serialization.JsonPropertyName("category")] + public string CategoryIdString { get; set; } = string.Empty; + + /// + /// 获取或设置服务类目资质信息列表。 + /// + [Newtonsoft.Json.JsonProperty("category_cert")] + [System.Text.Json.Serialization.JsonPropertyName("category_cert")] + public IList? CertificationList { get; set; } + } + } + + /// + /// 获取或设置服务类目信息列表。 + /// + [Newtonsoft.Json.JsonProperty("category_info")] + [System.Text.Json.Serialization.JsonPropertyName("category_info")] + public IList CategoryInfoList { get; set; } = new List(); + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsCategory/OpenAppsCategorySupplyCategoriesV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsCategory/OpenAppsCategorySupplyCategoriesV1Response.cs new file mode 100644 index 00000000..9a69a7a9 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsCategory/OpenAppsCategorySupplyCategoriesV1Response.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [POST] /apps/v1/category/supply_categories 接口的响应。 + /// + public class OpenAppsCategorySupplyCategoriesV1Response : DouyinMicroAppOpenApiResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsCreditScore/OpenAppsCreditScoreGetCreditScoreV2Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsCreditScore/OpenAppsCreditScoreGetCreditScoreV2Request.cs new file mode 100644 index 00000000..5670ae2d --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsCreditScore/OpenAppsCreditScoreGetCreditScoreV2Request.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [GET] /apps/v2/credit_score/get_credit_score 接口的请求。 + /// + public class OpenAppsCreditScoreGetCreditScoreV2Request : DouyinMicroAppOpenApiRequest + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsCreditScore/OpenAppsCreditScoreGetCreditScoreV2Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsCreditScore/OpenAppsCreditScoreGetCreditScoreV2Response.cs new file mode 100644 index 00000000..cba5d1ef --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsCreditScore/OpenAppsCreditScoreGetCreditScoreV2Response.cs @@ -0,0 +1,28 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [GET] /apps/v2/credit_score/get_credit_score 接口的响应。 + /// + public class OpenAppsCreditScoreGetCreditScoreV2Response : DouyinMicroAppOpenApiResponse + { + public static class Types + { + public class Data + { + /// + /// 获取或设置信用分分值。 + /// + [Newtonsoft.Json.JsonProperty("credit_score")] + [System.Text.Json.Serialization.JsonPropertyName("credit_score")] + public int CreditScore { get; set; } + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsDomain/OpenAppsDomainModifyServerDomainV2Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsDomain/OpenAppsDomainModifyServerDomainV2Request.cs new file mode 100644 index 00000000..34b39455 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsDomain/OpenAppsDomainModifyServerDomainV2Request.cs @@ -0,0 +1,46 @@ +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [POST] /apps/v2/domain/modify_server_domain 接口的请求。 + /// + public class OpenAppsDomainModifyServerDomainV2Request : DouyinMicroAppOpenApiRequest + { + /// + /// 获取或设置执行动作。 + /// 默认值:"get" + /// + [Newtonsoft.Json.JsonProperty("action")] + [System.Text.Json.Serialization.JsonPropertyName("action")] + public string Action { get; set; } = "get"; + + /// + /// 获取或设置 HTTP 域名列表。 + /// + [Newtonsoft.Json.JsonProperty("request")] + [System.Text.Json.Serialization.JsonPropertyName("request")] + public IList? RequestDomainList { get; set; } + + /// + /// 获取或设置 WebSocket 域名列表。 + /// + [Newtonsoft.Json.JsonProperty("socket")] + [System.Text.Json.Serialization.JsonPropertyName("socket")] + public IList? SocketDomainList { get; set; } + + /// + /// 获取或设置上传域名列表。 + /// + [Newtonsoft.Json.JsonProperty("upload")] + [System.Text.Json.Serialization.JsonPropertyName("upload")] + public IList? UploadDomainList { get; set; } + + /// + /// 获取或设置下载域名列表。 + /// + [Newtonsoft.Json.JsonProperty("download")] + [System.Text.Json.Serialization.JsonPropertyName("download")] + public IList? DownloadDomainList { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsDomain/OpenAppsDomainModifyServerDomainV2Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsDomain/OpenAppsDomainModifyServerDomainV2Response.cs new file mode 100644 index 00000000..8e496148 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsDomain/OpenAppsDomainModifyServerDomainV2Response.cs @@ -0,0 +1,49 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [POST] /apps/v2/domain/modify_server_domain 接口的响应。 + /// + public class OpenAppsDomainModifyServerDomainV2Response : DouyinMicroAppOpenApiResponse + { + public static class Types + { + public class Data + { + /// + /// 获取或设置 HTTP 域名列表。 + /// + [Newtonsoft.Json.JsonProperty("request")] + [System.Text.Json.Serialization.JsonPropertyName("request")] + public string[]? RequestDomainList { get; set; } + + /// + /// 获取或设置 WebSocket 域名列表。 + /// + [Newtonsoft.Json.JsonProperty("socket")] + [System.Text.Json.Serialization.JsonPropertyName("socket")] + public string[]? SocketDomainList { get; set; } + + /// + /// 获取或设置上传域名列表。 + /// + [Newtonsoft.Json.JsonProperty("upload")] + [System.Text.Json.Serialization.JsonPropertyName("upload")] + public string[]? UploadDomainList { get; set; } + + /// + /// 获取或设置下载域名列表。 + /// + [Newtonsoft.Json.JsonProperty("download")] + [System.Text.Json.Serialization.JsonPropertyName("download")] + public string[]? DownloadDomainList { get; set; } + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data? Data { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsDomain/OpenAppsDomainModifyWebviewDomainV2Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsDomain/OpenAppsDomainModifyWebviewDomainV2Request.cs new file mode 100644 index 00000000..9ade28ca --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsDomain/OpenAppsDomainModifyWebviewDomainV2Request.cs @@ -0,0 +1,25 @@ +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [POST] /apps/v2/domain/modify_webview_domain 接口的请求。 + /// + public class OpenAppsDomainModifyWebviewDomainV2Request : DouyinMicroAppOpenApiRequest + { + /// + /// 获取或设置执行动作。 + /// 默认值:"get" + /// + [Newtonsoft.Json.JsonProperty("action")] + [System.Text.Json.Serialization.JsonPropertyName("action")] + public string Action { get; set; } = "get"; + + /// + /// 获取或设置 Webview 域名列表。 + /// + [Newtonsoft.Json.JsonProperty("webview")] + [System.Text.Json.Serialization.JsonPropertyName("webview")] + public IList? WebviewDomainList { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsDomain/OpenAppsDomainModifyWebviewDomainV2Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsDomain/OpenAppsDomainModifyWebviewDomainV2Response.cs new file mode 100644 index 00000000..74aabbcd --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsDomain/OpenAppsDomainModifyWebviewDomainV2Response.cs @@ -0,0 +1,28 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [POST] /apps/v2/domain/modify_webview_domain 接口的响应。 + /// + public class OpenAppsDomainModifyWebviewDomainV2Response : DouyinMicroAppOpenApiResponse + { + public static class Types + { + public class Data + { + /// + /// 获取或设置 Webview 域名列表。 + /// + [Newtonsoft.Json.JsonProperty("webview")] + [System.Text.Json.Serialization.JsonPropertyName("webview")] + public string[]? WebviewDomainList { get; set; } + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data? Data { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsFile/OpenAppsFileUploadMaterialV2Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsFile/OpenAppsFileUploadMaterialV2Request.cs new file mode 100644 index 00000000..c8c3145f --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsFile/OpenAppsFileUploadMaterialV2Request.cs @@ -0,0 +1,38 @@ +using System; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [POST] /apps/v2/file/upload_material 接口的请求。 + /// + public class OpenAppsFileUploadMaterialV2Request : DouyinMicroAppOpenApiRequest + { + /// + /// 获取或设置上传文件类型。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public int MaterialType { get; set; } + + /// + /// 获取或设置上传文件字节数组。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public byte[] MaterialFileBytes { get; set; } = Array.Empty(); + + /// + /// 获取或设置上传文件名。如果不指定将由系统自动生成。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string? MaterialFileName { get; set; } + + /// + /// 获取或设置上传文件 MIME 类型。如果不指定将由系统自动生成。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string? MaterialFileContentType { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsFile/OpenAppsFileUploadMaterialV2Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsFile/OpenAppsFileUploadMaterialV2Response.cs new file mode 100644 index 00000000..c5fde9eb --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsFile/OpenAppsFileUploadMaterialV2Response.cs @@ -0,0 +1,28 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [POST] /apps/v2/file/upload_material 接口的响应。 + /// + public class OpenAppsFileUploadMaterialV2Response : DouyinMicroAppOpenApiResponse + { + public static class Types + { + public class Data + { + /// + /// 获取或设置资源路径。 + /// + [Newtonsoft.Json.JsonProperty("path")] + [System.Text.Json.Serialization.JsonPropertyName("path")] + public string FilePath { get; set; } = default!; + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsICPRecord/OpenAppsICPRecordGetFacialRecognitionUrlV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsICPRecord/OpenAppsICPRecordGetFacialRecognitionUrlV1Request.cs new file mode 100644 index 00000000..cc4e9a08 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsICPRecord/OpenAppsICPRecordGetFacialRecognitionUrlV1Request.cs @@ -0,0 +1,15 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [GET] /apps/v1/icp_record/get_facial_recognition_url/ 接口的请求。 + /// + public class OpenAppsICPRecordGetFacialRecognitionUrlV1Request : DouyinMicroAppOpenApiRequest + { + /// + /// 获取或设置省份编码。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string ProvinceCode { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsICPRecord/OpenAppsICPRecordGetFacialRecognitionUrlV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsICPRecord/OpenAppsICPRecordGetFacialRecognitionUrlV1Response.cs new file mode 100644 index 00000000..309a537d --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsICPRecord/OpenAppsICPRecordGetFacialRecognitionUrlV1Response.cs @@ -0,0 +1,35 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [GET] /apps/v1/icp_record/get_facial_recognition_url/ 接口的响应。 + /// + public class OpenAppsICPRecordGetFacialRecognitionUrlV1Response : DouyinMicroAppOpenApiResponse + { + public static class Types + { + public class Data + { + /// + /// 获取或设置人证核验 Token。 + /// + [Newtonsoft.Json.JsonProperty("facial_recognition_token")] + [System.Text.Json.Serialization.JsonPropertyName("facial_recognition_token")] + public string FacialRecognitionToken { get; set; } = default!; + + /// + /// 获取或设置人证核验链接。 + /// + [Newtonsoft.Json.JsonProperty("facial_recognition_url")] + [System.Text.Json.Serialization.JsonPropertyName("facial_recognition_url")] + public string FacialRecognitionUrl { get; set; } = default!; + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsICPRecord/OpenAppsICPRecordQueryCorpTypeListV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsICPRecord/OpenAppsICPRecordQueryCorpTypeListV1Request.cs new file mode 100644 index 00000000..dc2d57a1 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsICPRecord/OpenAppsICPRecordQueryCorpTypeListV1Request.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [GET] /apps/v1/icp_record/query_corp_type_list/ 接口的请求。 + /// + public class OpenAppsICPRecordQueryCorpTypeListV1Request : DouyinMicroAppOpenApiRequest + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsICPRecord/OpenAppsICPRecordQueryCorpTypeListV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsICPRecord/OpenAppsICPRecordQueryCorpTypeListV1Response.cs new file mode 100644 index 00000000..5e8736ae --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsICPRecord/OpenAppsICPRecordQueryCorpTypeListV1Response.cs @@ -0,0 +1,75 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [GET] /apps/v1/icp_record/query_corp_type_list/ 接口的响应。 + /// + public class OpenAppsICPRecordQueryCorpTypeListV1Response : DouyinMicroAppOpenApiResponse + { + public static class Types + { + public class Data + { + public static class Types + { + public class CorpTypeInfo + { + public static class Types + { + public class CredentialsTypeInfo + { + /// + /// 获取或设置证件类型。 + /// + [Newtonsoft.Json.JsonProperty("credentials_type_id")] + [System.Text.Json.Serialization.JsonPropertyName("credentials_type_id")] + public int CredentialsTypeInfoId { get; set; } + + /// + /// 获取或设置证件类型名称。 + /// + [Newtonsoft.Json.JsonProperty("credentials_type_name")] + [System.Text.Json.Serialization.JsonPropertyName("credentials_type_name")] + public string CredentialsTypeInfoName { get; set; } = default!; + } + } + + /// + /// 获取或设置主体类型。 + /// + [Newtonsoft.Json.JsonProperty("corp_type_id")] + [System.Text.Json.Serialization.JsonPropertyName("corp_type_id")] + public int CorpTypeId { get; set; } + + /// + /// 获取或设置主体类型名称。 + /// + [Newtonsoft.Json.JsonProperty("corp_type_name")] + [System.Text.Json.Serialization.JsonPropertyName("corp_type_name")] + public string CorpTypeName { get; set; } = default!; + + /// + /// 获取或设置证件类型列表。 + /// + [Newtonsoft.Json.JsonProperty("credentials_type_list")] + [System.Text.Json.Serialization.JsonPropertyName("credentials_type_list")] + public Types.CredentialsTypeInfo[]? CredentialsTypeList { get; set; } + } + } + + /// + /// 获取或设置主体类型列表。 + /// + [Newtonsoft.Json.JsonProperty("corp_type_list")] + [System.Text.Json.Serialization.JsonPropertyName("corp_type_list")] + public Types.CorpTypeInfo[] CorpTypeList { get; set; } = default!; + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsICPRecord/OpenAppsICPRecordQueryFacialRecognitionStatusV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsICPRecord/OpenAppsICPRecordQueryFacialRecognitionStatusV1Request.cs new file mode 100644 index 00000000..3f0e143b --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsICPRecord/OpenAppsICPRecordQueryFacialRecognitionStatusV1Request.cs @@ -0,0 +1,15 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [GET] /apps/v1/icp_record/query_facial_recognition_status/ 接口的请求。 + /// + public class OpenAppsICPRecordQueryFacialRecognitionStatusV1Request : DouyinMicroAppOpenApiRequest + { + /// + /// 获取或设置人证核验 Token。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string FacialRecognitionToken { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsICPRecord/OpenAppsICPRecordQueryFacialRecognitionStatusV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsICPRecord/OpenAppsICPRecordQueryFacialRecognitionStatusV1Response.cs new file mode 100644 index 00000000..78715dbc --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsICPRecord/OpenAppsICPRecordQueryFacialRecognitionStatusV1Response.cs @@ -0,0 +1,28 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [GET] /apps/v1/icp_record/query_facial_recognition_status/ 接口的响应。 + /// + public class OpenAppsICPRecordQueryFacialRecognitionStatusV1Response : DouyinMicroAppOpenApiResponse + { + public static class Types + { + public class Data + { + /// + /// 获取或设置人证核验状态。 + /// + [Newtonsoft.Json.JsonProperty("facial_recognition_status")] + [System.Text.Json.Serialization.JsonPropertyName("facial_recognition_status")] + public int FacialRecognitionStatus { get; set; } + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsICPRecord/OpenAppsICPRecordQueryInchargePeopleCredentialsTypeListV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsICPRecord/OpenAppsICPRecordQueryInchargePeopleCredentialsTypeListV1Request.cs new file mode 100644 index 00000000..bbee3a0f --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsICPRecord/OpenAppsICPRecordQueryInchargePeopleCredentialsTypeListV1Request.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [GET] /apps/v1/icp_record/query_incharge_people_credentials_type_list/ 接口的请求。 + /// + public class OpenAppsICPRecordQueryInchargePeopleCredentialsTypeListV1Request : DouyinMicroAppOpenApiRequest + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsICPRecord/OpenAppsICPRecordQueryInchargePeopleCredentialsTypeListV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsICPRecord/OpenAppsICPRecordQueryInchargePeopleCredentialsTypeListV1Response.cs new file mode 100644 index 00000000..428568b1 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsICPRecord/OpenAppsICPRecordQueryInchargePeopleCredentialsTypeListV1Response.cs @@ -0,0 +1,48 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [GET] /apps/v1/icp_record/query_incharge_people_credentials_type_list/ 接口的响应。 + /// + public class OpenAppsICPRecordQueryInchargePeopleCredentialsTypeListV1Response : DouyinMicroAppOpenApiResponse + { + public static class Types + { + public class Data + { + public static class Types + { + public class CredentialsTypeInfo + { + /// + /// 获取或设置证件类型。 + /// + [Newtonsoft.Json.JsonProperty("credentials_type_id")] + [System.Text.Json.Serialization.JsonPropertyName("credentials_type_id")] + public int CredentialsTypeInfoId { get; set; } + + /// + /// 获取或设置证件类型名称。 + /// + [Newtonsoft.Json.JsonProperty("credentials_type_name")] + [System.Text.Json.Serialization.JsonPropertyName("credentials_type_name")] + public string CredentialsTypeInfoName { get; set; } = default!; + } + } + + /// + /// 获取或设置证件类型列表。 + /// + [Newtonsoft.Json.JsonProperty("credentials_type_list")] + [System.Text.Json.Serialization.JsonPropertyName("credentials_type_list")] + public Types.CredentialsTypeInfo[]? CredentialsTypeList { get; set; } + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsICPRecord/OpenAppsICPRecordQueryPreApprovalItemTypeListV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsICPRecord/OpenAppsICPRecordQueryPreApprovalItemTypeListV1Request.cs new file mode 100644 index 00000000..45f3a2cf --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsICPRecord/OpenAppsICPRecordQueryPreApprovalItemTypeListV1Request.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [GET] /apps/v1/icp_record/query_pre_approval_item_type_list/ 接口的请求。 + /// + public class OpenAppsICPRecordQueryPreApprovalItemTypeListV1Request : DouyinMicroAppOpenApiRequest + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsICPRecord/OpenAppsICPRecordQueryPreApprovalItemTypeListV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsICPRecord/OpenAppsICPRecordQueryPreApprovalItemTypeListV1Response.cs new file mode 100644 index 00000000..c609f17c --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsICPRecord/OpenAppsICPRecordQueryPreApprovalItemTypeListV1Response.cs @@ -0,0 +1,48 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [GET] /apps/v1/icp_record/query_pre_approval_item_type_list/ 接口的响应。 + /// + public class OpenAppsICPRecordQueryPreApprovalItemTypeListV1Response : DouyinMicroAppOpenApiResponse + { + public static class Types + { + public class Data + { + public static class Types + { + public class PreApprovalItemTypeInfo + { + /// + /// 获取或设置前置审批类型。 + /// + [Newtonsoft.Json.JsonProperty("pre_approval_item_id")] + [System.Text.Json.Serialization.JsonPropertyName("pre_approval_item_id")] + public int PreApprovalItemTypeId { get; set; } + + /// + /// 获取或设置前置审批类型名称。 + /// + [Newtonsoft.Json.JsonProperty("pre_approval_item_name")] + [System.Text.Json.Serialization.JsonPropertyName("pre_approval_item_name")] + public string PreApprovalItemTypeName { get; set; } = default!; + } + } + + /// + /// 获取或设置前置审批类型列表。 + /// + [Newtonsoft.Json.JsonProperty("pre_approval_item_type_list")] + [System.Text.Json.Serialization.JsonPropertyName("pre_approval_item_type_list")] + public Types.PreApprovalItemTypeInfo[] PreApprovalItemTypeList { get; set; } = default!; + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsICPRecord/OpenAppsICPRecordQueryRecordStatusV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsICPRecord/OpenAppsICPRecordQueryRecordStatusV1Request.cs new file mode 100644 index 00000000..a67f6b36 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsICPRecord/OpenAppsICPRecordQueryRecordStatusV1Request.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [GET] /apps/v1/icp_record/query_record_status/ 接口的请求。 + /// + public class OpenAppsICPRecordQueryRecordStatusV1Request : DouyinMicroAppOpenApiRequest + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsICPRecord/OpenAppsICPRecordQueryRecordStatusV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsICPRecord/OpenAppsICPRecordQueryRecordStatusV1Response.cs new file mode 100644 index 00000000..2d7ba1ee --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsICPRecord/OpenAppsICPRecordQueryRecordStatusV1Response.cs @@ -0,0 +1,35 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [GET] /apps/v1/icp_record/query_record_status/ 接口的响应。 + /// + public class OpenAppsICPRecordQueryRecordStatusV1Response : DouyinMicroAppOpenApiResponse + { + public static class Types + { + public class Data + { + /// + /// 获取或设置备案状态。 + /// + [Newtonsoft.Json.JsonProperty("status")] + [System.Text.Json.Serialization.JsonPropertyName("status")] + public int Status { get; set; } + + /// + /// 获取或设置失败原因列表。 + /// + [Newtonsoft.Json.JsonProperty("region_list")] + [System.Text.Json.Serialization.JsonPropertyName("region_list")] + public string[]? RejectReasonList { get; set; } + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsICPRecord/OpenAppsICPRecordQueryRegionListV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsICPRecord/OpenAppsICPRecordQueryRegionListV1Request.cs new file mode 100644 index 00000000..54c5b3a4 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsICPRecord/OpenAppsICPRecordQueryRegionListV1Request.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [GET] /apps/v1/icp_record/query_region_list/ 接口的请求。 + /// + public class OpenAppsICPRecordQueryRegionListV1Request : DouyinMicroAppOpenApiRequest + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsICPRecord/OpenAppsICPRecordQueryRegionListV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsICPRecord/OpenAppsICPRecordQueryRegionListV1Response.cs new file mode 100644 index 00000000..fb6471e4 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsICPRecord/OpenAppsICPRecordQueryRegionListV1Response.cs @@ -0,0 +1,62 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [GET] /apps/v1/icp_record/query_region_list/ 接口的响应。 + /// + public class OpenAppsICPRecordQueryRegionListV1Response : DouyinMicroAppOpenApiResponse + { + public static class Types + { + public class Data + { + public static class Types + { + public class Region + { + /// + /// 获取或设置区域编码。 + /// + [Newtonsoft.Json.JsonProperty("code")] + [System.Text.Json.Serialization.JsonPropertyName("code")] + public string Code { get; set; } = default!; + + /// + /// 获取或设置区域名称。 + /// + [Newtonsoft.Json.JsonProperty("name")] + [System.Text.Json.Serialization.JsonPropertyName("name")] + public string Name { get; set; } = default!; + + /// + /// 获取或设置区域类型。 + /// + [Newtonsoft.Json.JsonProperty("type")] + [System.Text.Json.Serialization.JsonPropertyName("type")] + public int Type { get; set; } + + /// + /// 获取或设置子区域列表。 + /// + [Newtonsoft.Json.JsonProperty("sub_region")] + [System.Text.Json.Serialization.JsonPropertyName("sub_region")] + public Region[]? Children { get; set; } + } + } + + /// + /// 获取或设置区域列表。 + /// + [Newtonsoft.Json.JsonProperty("region_list")] + [System.Text.Json.Serialization.JsonPropertyName("region_list")] + public Types.Region[] RegionList { get; set; } = default!; + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsICPRecord/OpenAppsICPRecordQueryServiceContentTypeListV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsICPRecord/OpenAppsICPRecordQueryServiceContentTypeListV1Request.cs new file mode 100644 index 00000000..d3950b85 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsICPRecord/OpenAppsICPRecordQueryServiceContentTypeListV1Request.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [GET] /apps/v1/icp_record/query_service_content_type_list/ 接口的请求。 + /// + public class OpenAppsICPRecordQueryServiceContentTypeListV1Request : DouyinMicroAppOpenApiRequest + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsICPRecord/OpenAppsICPRecordQueryServiceContentTypeListV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsICPRecord/OpenAppsICPRecordQueryServiceContentTypeListV1Response.cs new file mode 100644 index 00000000..ca22f6c2 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsICPRecord/OpenAppsICPRecordQueryServiceContentTypeListV1Response.cs @@ -0,0 +1,55 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [GET] /apps/v1/icp_record/query_service_content_type_list/ 接口的响应。 + /// + public class OpenAppsICPRecordQueryServiceContentTypeListV1Response : DouyinMicroAppOpenApiResponse + { + public static class Types + { + public class Data + { + public static class Types + { + public class ServiceContentTypeInfo + { + /// + /// 获取或设置服务内容类型。 + /// + [Newtonsoft.Json.JsonProperty("service_content_type_id")] + [System.Text.Json.Serialization.JsonPropertyName("service_content_type_id")] + public int ServiceContentTypeId { get; set; } + + /// + /// 获取或设置服务内容类型名称。 + /// + [Newtonsoft.Json.JsonProperty("service_content_type_name")] + [System.Text.Json.Serialization.JsonPropertyName("service_content_type_name")] + public string ServiceContentTypeName { get; set; } = default!; + + /// + /// 获取或设置子服务内容类型列表。 + /// + [Newtonsoft.Json.JsonProperty("sub_service_content_type_list")] + [System.Text.Json.Serialization.JsonPropertyName("sub_service_content_type_list")] + public ServiceContentTypeInfo[]? SubServiceContentTypeList { get; set; } + } + } + + /// + /// 获取或设置服务内容类型列表。 + /// + [Newtonsoft.Json.JsonProperty("service_content_type_list")] + [System.Text.Json.Serialization.JsonPropertyName("service_content_type_list")] + public Types.ServiceContentTypeInfo[] ServiceContentTypeList { get; set; } = default!; + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsICPRecord/OpenAppsICPRecordSendFacialRecognitionNotifyV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsICPRecord/OpenAppsICPRecordSendFacialRecognitionNotifyV1Request.cs new file mode 100644 index 00000000..1fa561c8 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsICPRecord/OpenAppsICPRecordSendFacialRecognitionNotifyV1Request.cs @@ -0,0 +1,22 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [POST] /apps/v1/icp_record/send_facial_recognition_notify/ 接口的请求。 + /// + public class OpenAppsICPRecordSendFacialRecognitionNotifyV1Request : DouyinMicroAppOpenApiRequest + { + /// + /// 获取或设置省份编码。 + /// + [Newtonsoft.Json.JsonProperty("province_code")] + [System.Text.Json.Serialization.JsonPropertyName("province_code")] + public string ProvinceCode { get; set; } = string.Empty; + + /// + /// 获取或设置小程序负责人手机号。 + /// + [Newtonsoft.Json.JsonProperty("app_incharge_people_phone")] + [System.Text.Json.Serialization.JsonPropertyName("app_incharge_people_phone")] + public string PhoneNumber { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsICPRecord/OpenAppsICPRecordSendFacialRecognitionNotifyV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsICPRecord/OpenAppsICPRecordSendFacialRecognitionNotifyV1Response.cs new file mode 100644 index 00000000..985650de --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsICPRecord/OpenAppsICPRecordSendFacialRecognitionNotifyV1Response.cs @@ -0,0 +1,28 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [POST] /apps/v1/icp_record/send_facial_recognition_notify/ 接口的响应。 + /// + public class OpenAppsICPRecordSendFacialRecognitionNotifyV1Response : DouyinMicroAppOpenApiResponse + { + public static class Types + { + public class Data + { + /// + /// 获取或设置人证核验 Token。 + /// + [Newtonsoft.Json.JsonProperty("facial_recognition_token")] + [System.Text.Json.Serialization.JsonPropertyName("facial_recognition_token")] + public string FacialRecognitionToken { get; set; } = default!; + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsICPRecord/OpenAppsICPRecordSubmitRecordInfoV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsICPRecord/OpenAppsICPRecordSubmitRecordInfoV1Request.cs new file mode 100644 index 00000000..0fcf4049 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsICPRecord/OpenAppsICPRecordSubmitRecordInfoV1Request.cs @@ -0,0 +1,343 @@ +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [POST] /apps/v1/icp_record/submit_record_info/ 接口的请求。 + /// + public class OpenAppsICPRecordSubmitRecordInfoV1Request : DouyinMicroAppOpenApiRequest + { + public static class Types + { + public class Material + { + /// + /// 获取或设置资源路径。 + /// + [Newtonsoft.Json.JsonProperty("path")] + [System.Text.Json.Serialization.JsonPropertyName("path")] + public string FilePath { get; set; } = string.Empty; + } + + public class CorpInfo + { + /// + /// 获取或设置主体类型。 + /// + [Newtonsoft.Json.JsonProperty("corp_type")] + [System.Text.Json.Serialization.JsonPropertyName("corp_type")] + public int CorpType { get; set; } + + /// + /// 获取或设置省份编号。 + /// + [Newtonsoft.Json.JsonProperty("province_code")] + [System.Text.Json.Serialization.JsonPropertyName("province_code")] + public string ProvinceCode { get; set; } = string.Empty; + + /// + /// 获取或设置省份名称。 + /// + [Newtonsoft.Json.JsonProperty("province_name")] + [System.Text.Json.Serialization.JsonPropertyName("province_name")] + public string ProvinceName { get; set; } = string.Empty; + + /// + /// 获取或设置城市编号。 + /// + [Newtonsoft.Json.JsonProperty("city_code")] + [System.Text.Json.Serialization.JsonPropertyName("city_code")] + public string CityCode { get; set; } = string.Empty; + + /// + /// 获取或设置城市名称。 + /// + [Newtonsoft.Json.JsonProperty("city_name")] + [System.Text.Json.Serialization.JsonPropertyName("city_name")] + public string CityName { get; set; } = string.Empty; + + /// + /// 获取或设置区县编号。 + /// + [Newtonsoft.Json.JsonProperty("region_code")] + [System.Text.Json.Serialization.JsonPropertyName("region_code")] + public string DistrictCode { get; set; } = string.Empty; + + /// + /// 获取或设置区县名称。 + /// + [Newtonsoft.Json.JsonProperty("region_name")] + [System.Text.Json.Serialization.JsonPropertyName("region_name")] + public string DistrictName { get; set; } = string.Empty; + + /// + /// 获取或设置通信地址。 + /// + [Newtonsoft.Json.JsonProperty("communication_address")] + [System.Text.Json.Serialization.JsonPropertyName("communication_address")] + public string CommunicationAddress { get; set; } = string.Empty; + + /// + /// 获取或设置证件类型。 + /// + [Newtonsoft.Json.JsonProperty("credentials_type")] + [System.Text.Json.Serialization.JsonPropertyName("credentials_type")] + public int CredentialsType { get; set; } + + /// + /// 获取或设置证件地址。 + /// + [Newtonsoft.Json.JsonProperty("credentials_address")] + [System.Text.Json.Serialization.JsonPropertyName("credentials_address")] + public string CredentialsAddress { get; set; } = string.Empty; + + /// + /// 获取或设置证件名称。 + /// + [Newtonsoft.Json.JsonProperty("credentials_name")] + [System.Text.Json.Serialization.JsonPropertyName("credentials_name")] + public string CredentialsName { get; set; } = string.Empty; + + /// + /// 获取或设置证件编号。 + /// + [Newtonsoft.Json.JsonProperty("credentials_number")] + [System.Text.Json.Serialization.JsonPropertyName("credentials_number")] + public string CredentialsNumber { get; set; } = string.Empty; + + /// + /// 获取或设置证件材料。 + /// + [Newtonsoft.Json.JsonProperty("credentials_pic")] + [System.Text.Json.Serialization.JsonPropertyName("credentials_pic")] + public Material CredentialsMaterial { get; set; } = new Material(); + + /// + /// 获取或设置负责人证件类型。 + /// + [Newtonsoft.Json.JsonProperty("incharge_people_credentials_type")] + [System.Text.Json.Serialization.JsonPropertyName("incharge_people_credentials_type")] + public int InchargePeopleCredentialsType { get; set; } + + /// + /// 获取或设置负责人证件编号。 + /// + [Newtonsoft.Json.JsonProperty("incharge_people_credentials_number")] + [System.Text.Json.Serialization.JsonPropertyName("incharge_people_credentials_number")] + public string InchargePeopleCredentialsNumber { get; set; } = string.Empty; + + /// + /// 获取或设置负责人证件正面材料。 + /// + [Newtonsoft.Json.JsonProperty("incharge_people_credentials_front")] + [System.Text.Json.Serialization.JsonPropertyName("incharge_people_credentials_front")] + public Material InchargePeopleCredentialsFrontMaterial { get; set; } = new Material(); + + /// + /// 获取或设置负责人证件背面材料。 + /// + [Newtonsoft.Json.JsonProperty("incharge_people_credentials_back")] + [System.Text.Json.Serialization.JsonPropertyName("incharge_people_credentials_back")] + public Material InchargePeopleCredentialsBackMaterial { get; set; } = new Material(); + + /// + /// 获取或设置负责人证件是否有有效期。 + /// + [Newtonsoft.Json.JsonProperty("incharge_people_credentials_has_end_time")] + [System.Text.Json.Serialization.JsonPropertyName("incharge_people_credentials_has_end_time")] + public bool? InchargePeopleCredentialsHasEndTime { get; set; } + + /// + /// 获取或设置负责人证件有效开始日期时间戳。 + /// + [Newtonsoft.Json.JsonProperty("incharge_people_credentials_valid_start_time")] + [System.Text.Json.Serialization.JsonPropertyName("incharge_people_credentials_valid_start_time")] + public long? InchargePeopleCredentialsValidStartTimestamp { get; set; } + + /// + /// 获取或设置负责人证件有效结束日期时间戳。 + /// + [Newtonsoft.Json.JsonProperty("incharge_people_credentials_valid_end_time")] + [System.Text.Json.Serialization.JsonPropertyName("incharge_people_credentials_valid_end_time")] + public long? InchargePeopleCredentialsValidEndTimestamp { get; set; } + + /// + /// 获取或设置负责人姓名。 + /// + [Newtonsoft.Json.JsonProperty("incharge_people_name")] + [System.Text.Json.Serialization.JsonPropertyName("incharge_people_name")] + public string InchargePeopleName { get; set; } = string.Empty; + + /// + /// 获取或设置负责人邮箱。 + /// + [Newtonsoft.Json.JsonProperty("incharge_people_email")] + [System.Text.Json.Serialization.JsonPropertyName("incharge_people_email")] + public string InchargePeopleEmail { get; set; } = string.Empty; + + /// + /// 获取或设置负责人手机号。 + /// + [Newtonsoft.Json.JsonProperty("incharge_people_phone")] + [System.Text.Json.Serialization.JsonPropertyName("incharge_people_phone")] + public string InchargePeoplePhoneNumber { get; set; } = string.Empty; + + /// + /// 获取或设置负责人应急手机号。 + /// + [Newtonsoft.Json.JsonProperty("incharge_people_emergency_phone")] + [System.Text.Json.Serialization.JsonPropertyName("incharge_people_emergency_phone")] + public string InchargePeopleEmergencyPhoneNumber { get; set; } = string.Empty; + + /// + /// 获取或设置负责人授权书材料列表。 + /// + [Newtonsoft.Json.JsonProperty("corp_authority_letter")] + [System.Text.Json.Serialization.JsonPropertyName("corp_authority_letter")] + public IList? CorpAuthorityLetterMaterialList { get; set; } + + /// + /// 获取或设置主办单位备案承诺书材料列表。 + /// + [Newtonsoft.Json.JsonProperty("corp_commitment")] + [System.Text.Json.Serialization.JsonPropertyName("corp_commitment")] + public IList? CorpCommitmentMaterialList { get; set; } + + /// + /// 获取或设置主办单位其他材料列表。 + /// + [Newtonsoft.Json.JsonProperty("corp_other_materials")] + [System.Text.Json.Serialization.JsonPropertyName("corp_other_materials")] + public IList? CorpOtherMaterialList { get; set; } + + /// + /// 获取或设置备注信息。 + /// + [Newtonsoft.Json.JsonProperty("remark")] + [System.Text.Json.Serialization.JsonPropertyName("remark")] + public string? Remark { get; set; } + } + + public class AppInfo + { + public static class Types + { + public class PreApproval + { + /// + /// 获取或设置前置审核项 ID。 + /// + [Newtonsoft.Json.JsonProperty("pre_approval_item_id")] + [System.Text.Json.Serialization.JsonPropertyName("pre_approval_item_id")] + public int PreApprovalTypeId { get; set; } + + /// + /// 获取或设置前置审批编号。 + /// + [Newtonsoft.Json.JsonProperty("pre_approval_number")] + [System.Text.Json.Serialization.JsonPropertyName("pre_approval_number")] + public string? PreApprovalNumber { get; set; } + + /// + /// 获取或设置前置审批文件材料列表。 + /// + [Newtonsoft.Json.JsonProperty("pre_approval_files")] + [System.Text.Json.Serialization.JsonPropertyName("pre_approval_files")] + public IList? PreApprovalMaterialList { get; set; } + } + } + + /// + /// 获取或设置语种列表。 + /// + [Newtonsoft.Json.JsonProperty("app_language")] + [System.Text.Json.Serialization.JsonPropertyName("app_language")] + public IList LanguageTypeList { get; set; } = new List(); + + /// + /// 获取或设置人证核验 Token。 + /// + [Newtonsoft.Json.JsonProperty("facial_recognition_token")] + [System.Text.Json.Serialization.JsonPropertyName("facial_recognition_token")] + public string FacialRecognitionToken { get; set; } = string.Empty; + + /// + /// 获取或设置负责人邮箱。 + /// + [Newtonsoft.Json.JsonProperty("incharge_people_email")] + [System.Text.Json.Serialization.JsonPropertyName("incharge_people_email")] + public string InchargePeopleEmail { get; set; } = string.Empty; + + /// + /// 获取或设置负责人手机号。 + /// + [Newtonsoft.Json.JsonProperty("incharge_people_phone")] + [System.Text.Json.Serialization.JsonPropertyName("incharge_people_phone")] + public string InchargePeoplePhoneNumber { get; set; } = string.Empty; + + /// + /// 获取或设置负责人应急手机号。 + /// + [Newtonsoft.Json.JsonProperty("incharge_people_emergency_phone")] + [System.Text.Json.Serialization.JsonPropertyName("incharge_people_emergency_phone")] + public string InchargePeopleEmergencyPhoneNumber { get; set; } = string.Empty; + + /// + /// 获取或设置是否涉及前置审批。 + /// + [Newtonsoft.Json.JsonProperty("involve_pre_approval")] + [System.Text.Json.Serialization.JsonPropertyName("involve_pre_approval")] + public bool IsPreApprovalInvolved { get; set; } + + /// + /// 获取或设置前置审批列表。 + /// + [Newtonsoft.Json.JsonProperty("pre_approval_list")] + [System.Text.Json.Serialization.JsonPropertyName("pre_approval_list")] + public IList? PreApprovalList { get; set; } + + /// + /// 获取或设置服务内容 ID 列表。 + /// + [Newtonsoft.Json.JsonProperty("service_content_type_list")] + [System.Text.Json.Serialization.JsonPropertyName("service_content_type_list")] + public IList ServiceContentTypeList { get; set; } = new List(); + + /// + /// 获取或设置负责人授权书材料列表。 + /// + [Newtonsoft.Json.JsonProperty("app_authority_letter")] + [System.Text.Json.Serialization.JsonPropertyName("app_authority_letter")] + public IList? AppAuthorityLetterMaterialList { get; set; } + + /// + /// 获取或设置其他材料列表。 + /// + [Newtonsoft.Json.JsonProperty("app_other_materials")] + [System.Text.Json.Serialization.JsonPropertyName("app_other_materials")] + public IList? AppOtherMaterialList { get; set; } + + /// + /// 获取或设置备注信息。 + /// + [Newtonsoft.Json.JsonProperty("remark")] + [System.Text.Json.Serialization.JsonPropertyName("remark")] + public string? Remark { get; set; } + } + } + + /// + /// 获取或设置备案主体信息。 + /// + [Newtonsoft.Json.JsonProperty("corp_info")] + [System.Text.Json.Serialization.JsonPropertyName("corp_info")] + public Types.CorpInfo CorpInfo { get; set; } = new Types.CorpInfo(); + + /// + /// 获取或设置备案应用信息。 + /// + [Newtonsoft.Json.JsonProperty("app_info")] + [System.Text.Json.Serialization.JsonPropertyName("app_info")] + public Types.AppInfo AppInfo { get; set; } = new Types.AppInfo(); + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsICPRecord/OpenAppsICPRecordSubmitRecordInfoV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsICPRecord/OpenAppsICPRecordSubmitRecordInfoV1Response.cs new file mode 100644 index 00000000..bd369a5d --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsICPRecord/OpenAppsICPRecordSubmitRecordInfoV1Response.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [POST] /apps/v1/icp_record/submit_record_info/ 接口的响应。 + /// + public class OpenAppsICPRecordSubmitRecordInfoV1Response : DouyinMicroAppOpenApiResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsICPRecord/OpenAppsICPRecordUploadImageV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsICPRecord/OpenAppsICPRecordUploadImageV1Request.cs new file mode 100644 index 00000000..86907612 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsICPRecord/OpenAppsICPRecordUploadImageV1Request.cs @@ -0,0 +1,38 @@ +using System; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [POST] /apps/v1/icp_record/upload_image/ 接口的请求。 + /// + public class OpenAppsICPRecordUploadImageV1Request : DouyinMicroAppOpenApiRequest + { + /// + /// 获取或设置图片类型。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public int ImageType { get; set; } + + /// + /// 获取或设置图片文件字节数组。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public byte[] ImageFileBytes { get; set; } = Array.Empty(); + + /// + /// 获取或设置图片文件名。如果不指定将由系统自动生成。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string? ImageFileName { get; set; } + + /// + /// 获取或设置图片文件 MIME 类型。如果不指定将由系统自动生成。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string? ImageFileContentType { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsICPRecord/OpenAppsICPRecordUploadImageV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsICPRecord/OpenAppsICPRecordUploadImageV1Response.cs new file mode 100644 index 00000000..8a6f7116 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsICPRecord/OpenAppsICPRecordUploadImageV1Response.cs @@ -0,0 +1,28 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [POST] /apps/v1/icp_record/upload_image/ 接口的响应。 + /// + public class OpenAppsICPRecordUploadImageV1Response : DouyinMicroAppOpenApiResponse + { + public static class Types + { + public class Data + { + /// + /// 获取或设置资源路径。 + /// + [Newtonsoft.Json.JsonProperty("path")] + [System.Text.Json.Serialization.JsonPropertyName("path")] + public string FilePath { get; set; } = default!; + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsPackageVersion/OpenAppsPackageVersionAuditV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsPackageVersion/OpenAppsPackageVersionAuditV1Request.cs new file mode 100644 index 00000000..532f1c94 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsPackageVersion/OpenAppsPackageVersionAuditV1Request.cs @@ -0,0 +1,43 @@ +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [POST] /apps/v1/package_version/audit/ 接口的请求。 + /// + public class OpenAppsPackageVersionAuditV1Request : DouyinMicroAppOpenApiRequest + { + /// + /// 获取或设置本次提审的宿主端列表。 + /// + [Newtonsoft.Json.JsonProperty("host_names")] + [System.Text.Json.Serialization.JsonPropertyName("host_names")] + public IList HostNames { get; set; } = new List(); + + /// + /// 获取或设置本次提审的备注信息。 + /// + [Newtonsoft.Json.JsonProperty("audit_note")] + [System.Text.Json.Serialization.JsonPropertyName("audit_note")] + public string? AuditNote { get; set; } + + /// + /// 获取或设置重新提审方式。 + /// + [Newtonsoft.Json.JsonProperty("audit_way")] + [System.Text.Json.Serialization.JsonPropertyName("audit_way")] + public int? AuditWay { get; set; } + + /// + /// 获取或设置版本通道。 + /// + [Newtonsoft.Json.JsonProperty("tag")] + [System.Text.Json.Serialization.JsonPropertyName("tag")] + public string? VersionTag { get; set; } + + /// + [Newtonsoft.Json.JsonProperty("TpAppID")] + [System.Text.Json.Serialization.JsonPropertyName("TpAppID")] + public override string? ComponentAppId { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsPackageVersion/OpenAppsPackageVersionAuditV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsPackageVersion/OpenAppsPackageVersionAuditV1Response.cs new file mode 100644 index 00000000..75fd3af4 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsPackageVersion/OpenAppsPackageVersionAuditV1Response.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [POST] /apps/v1/package_version/audit/ 接口的响应。 + /// + public class OpenAppsPackageVersionAuditV1Response : DouyinMicroAppOpenApiResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsPackageVersion/OpenAppsPackageVersionGetAuditHostsV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsPackageVersion/OpenAppsPackageVersionGetAuditHostsV1Request.cs new file mode 100644 index 00000000..c3329d6b --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsPackageVersion/OpenAppsPackageVersionGetAuditHostsV1Request.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [GET] /apps/v1/package_version/get_audit_hosts/ 接口的请求。 + /// + public class OpenAppsPackageVersionGetAuditHostsV1Request : DouyinMicroAppOpenApiRequest + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsPackageVersion/OpenAppsPackageVersionGetAuditHostsV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsPackageVersion/OpenAppsPackageVersionGetAuditHostsV1Response.cs new file mode 100644 index 00000000..49dd7910 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsPackageVersion/OpenAppsPackageVersionGetAuditHostsV1Response.cs @@ -0,0 +1,35 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [GET] /apps/v1/package_version/get_audit_hosts/ 接口的响应。 + /// + public class OpenAppsPackageVersionGetAuditHostsV1Response : DouyinMicroAppOpenApiResponse + { + public static class Types + { + public class Data + { + /// + /// 获取或设置本次审核可选宿主端列表。 + /// + [Newtonsoft.Json.JsonProperty("host_names")] + [System.Text.Json.Serialization.JsonPropertyName("host_names")] + public string[] HostNames { get; set; } = default!; + + /// + /// 获取或设置上次发布的宿主端列表。 + /// + [Newtonsoft.Json.JsonProperty("released_host_names")] + [System.Text.Json.Serialization.JsonPropertyName("released_host_names")] + public string[] ReleasedHostNames { get; set; } = default!; + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsPackageVersion/OpenAppsPackageVersionGetVersionsV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsPackageVersion/OpenAppsPackageVersionGetVersionsV1Request.cs new file mode 100644 index 00000000..349bf859 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsPackageVersion/OpenAppsPackageVersionGetVersionsV1Request.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [GET] /apps/v1/package_version/versions/ 接口的请求。 + /// + public class OpenAppsPackageVersionGetVersionsV1Request : DouyinMicroAppOpenApiRequest + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsPackageVersion/OpenAppsPackageVersionGetVersionsV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsPackageVersion/OpenAppsPackageVersionGetVersionsV1Response.cs new file mode 100644 index 00000000..5cb6106b --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsPackageVersion/OpenAppsPackageVersionGetVersionsV1Response.cs @@ -0,0 +1,273 @@ +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [GET] /apps/v1/package_version/versions/ 接口的响应。 + /// + public class OpenAppsPackageVersionGetVersionsV1Response : DouyinMicroAppOpenApiResponse + { + public static class Types + { + public class Data + { + public static class Types + { + public abstract class VersionInfoBase + { + /// + /// 获取或设置服务类目列表。 + /// + [Newtonsoft.Json.JsonProperty("categories")] + [System.Text.Json.Serialization.JsonPropertyName("categories")] + public string[] CategoryList { get; set; } = default!; + + /// + /// 获取或设置小程序管理员的头像 URL。 + /// + [Newtonsoft.Json.JsonProperty("developer_avatar")] + [System.Text.Json.Serialization.JsonPropertyName("developer_avatar")] + public string DeveloperAvatarUrl { get; set; } = default!; + + /// + /// 获取或设置小程序管理员的账号。 + /// + [Newtonsoft.Json.JsonProperty("developer_id")] + [System.Text.Json.Serialization.JsonPropertyName("developer_id")] + public string DeveloperId { get; set; } = default!; + + /// + /// 获取或设置小程序管理员的昵称。 + /// + [Newtonsoft.Json.JsonProperty("developer_name")] + [System.Text.Json.Serialization.JsonPropertyName("developer_name")] + public string DeveloperName { get; set; } = default!; + + /// + /// 获取或设置版本号。 + /// + [Newtonsoft.Json.JsonProperty("version")] + [System.Text.Json.Serialization.JsonPropertyName("version")] + public string Version { get; set; } = default!; + + /// + /// 获取或设置版本通道。 + /// + [Newtonsoft.Json.JsonProperty("version_tag")] + [System.Text.Json.Serialization.JsonPropertyName("version_tag")] + public string VersionTag { get; set; } = default!; + + /// + /// 获取或设置更新信息。 + /// + [Newtonsoft.Json.JsonProperty("summary")] + [System.Text.Json.Serialization.JsonPropertyName("summary")] + public string Summary { get; set; } = default!; + + /// + /// 获取或设置创建时间戳。 + /// + [Newtonsoft.Json.JsonProperty("ctime")] + [System.Text.Json.Serialization.JsonPropertyName("ctime")] + public long CreateTimestamp { get; set; } + + /// + /// 获取或设置各宿主端附件字典。 + /// + [Newtonsoft.Json.JsonProperty("attach_info")] + [System.Text.Json.Serialization.JsonPropertyName("attach_info")] + public IDictionary? AttachmentMap { get; set; } + } + + public class LatestVersionInfo : VersionInfoBase + { + /// + /// 获取或设置是否已提审。 + /// + [Newtonsoft.Json.JsonProperty("has_audit")] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.NumericalBooleanConverter))] + [System.Text.Json.Serialization.JsonPropertyName("has_audit")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalBooleanConverter))] + public bool HasAudited { get; set; } + + /// + /// 获取或设置截图 URL 列表。 + /// + [Newtonsoft.Json.JsonProperty("screenshot")] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.StringifiedStringArrayWithCommaSplitConverter))] + [System.Text.Json.Serialization.JsonPropertyName("screenshot")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.StringifiedStringArrayWithCommaSplitConverter))] + public string[]? ScreenshotUrlList { get; set; } + } + + public class AuditVersionInfo : VersionInfoBase + { + /// + /// 获取或设置通过审核的宿主端列表。 + /// + [Newtonsoft.Json.JsonProperty("approved_apps")] + [System.Text.Json.Serialization.JsonPropertyName("approved_apps")] + public string[]? ApprovedApps { get; set; } + + /// + /// 获取或设置是否已发布。 + /// + [Newtonsoft.Json.JsonProperty("has_publish")] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.NumericalBooleanConverter))] + [System.Text.Json.Serialization.JsonPropertyName("has_publish")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalBooleanConverter))] + public bool HasPublished { get; set; } + + /// + /// 获取或设置是否是被下架的版本。 + /// + [Newtonsoft.Json.JsonProperty("is_illegal_version")] + [System.Text.Json.Serialization.JsonPropertyName("is_illegal_version")] + public bool IsIllegalVersion { get; set; } + + /// + /// 获取或设置审核状态。 + /// + [Newtonsoft.Json.JsonProperty("status")] + [System.Text.Json.Serialization.JsonPropertyName("status")] + public int Status { get; set; } + + /// + /// 获取或设置审核不通过原因。 + /// + [Newtonsoft.Json.JsonProperty("reason")] + [System.Text.Json.Serialization.JsonPropertyName("reason")] + public string? RejectReason { get; set; } + + /// + /// 获取或设置各宿主端审核不通过原因字典。 + /// + [Newtonsoft.Json.JsonProperty("reason_detail")] + [System.Text.Json.Serialization.JsonPropertyName("reason_detail")] + public IDictionary? RejectReasonDetailMap { get; set; } + } + + public class GrayVersionInfo : VersionInfoBase + { + /// + /// 获取或设置各宿主端灰度比例字典。 + /// + [Newtonsoft.Json.JsonProperty("host_gray_scale")] + [System.Text.Json.Serialization.JsonPropertyName("host_gray_scale")] + public IDictionary? HostGrayScaleMap { get; set; } + } + + public class CurrentVersionInfo : VersionInfoBase + { + public static class Types + { + public class Rollback + { + /// + /// 获取或设置是否可以回退。 + /// + [Newtonsoft.Json.JsonProperty("can_rollback")] + [System.Text.Json.Serialization.JsonPropertyName("can_rollback")] + public bool CanRollback { get; set; } + + /// + /// 获取或设置可以回退到的上一版本号。 + /// + [Newtonsoft.Json.JsonProperty("last_version")] + [System.Text.Json.Serialization.JsonPropertyName("last_version")] + public string? LastVersion { get; set; } + } + } + + /// + /// 获取或设置通过审核的宿主端列表。 + /// + [Newtonsoft.Json.JsonProperty("approved_apps")] + [System.Text.Json.Serialization.JsonPropertyName("approved_apps")] + public string[]? ApprovedApps { get; set; } + + /// + /// 获取或设置没有通过审核的宿主端列表。 + /// + [Newtonsoft.Json.JsonProperty("not_approved_apps")] + [System.Text.Json.Serialization.JsonPropertyName("not_approved_apps")] + public string[]? NotApprovedApps { get; set; } + + /// + /// 获取或设置是否已下架。 + /// + [Newtonsoft.Json.JsonProperty("has_down")] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.NumericalBooleanConverter))] + [System.Text.Json.Serialization.JsonPropertyName("has_down")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalBooleanConverter))] + public bool HasDowned { get; set; } + + /// + /// 获取或设置开发者平台账号 ID。 + /// + [Newtonsoft.Json.JsonProperty("uid")] + [System.Text.Json.Serialization.JsonPropertyName("uid")] + [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)] + public long? UserUID { get; set; } + + /// + /// 获取或设置审核不通过原因。 + /// + [Newtonsoft.Json.JsonProperty("reason")] + [System.Text.Json.Serialization.JsonPropertyName("reason")] + public string? RejectReason { get; set; } + + /// + /// 获取或设置各宿主端审核不通过原因字典。 + /// + [Newtonsoft.Json.JsonProperty("reason_detail")] + [System.Text.Json.Serialization.JsonPropertyName("reason_detail")] + public IDictionary? RejectReasonDetailMap { get; set; } + + /// + /// 获取或设置回退信息。 + /// + [Newtonsoft.Json.JsonProperty("rollback")] + [System.Text.Json.Serialization.JsonPropertyName("rollback")] + public Types.Rollback? Rollback { get; set; } + } + } + + /// + /// 获取或设置测试版本信息。 + /// + [Newtonsoft.Json.JsonProperty("latest")] + [System.Text.Json.Serialization.JsonPropertyName("latest")] + public Types.LatestVersionInfo? LatestVersionInfo { get; set; } + + /// + /// 获取或设置审核版本信息。 + /// + [Newtonsoft.Json.JsonProperty("audit")] + [System.Text.Json.Serialization.JsonPropertyName("audit")] + public Types.AuditVersionInfo? AuditVersionInfo { get; set; } + + /// + /// 获取或设置灰度版本信息。 + /// + [Newtonsoft.Json.JsonProperty("gray")] + [System.Text.Json.Serialization.JsonPropertyName("gray")] + public Types.GrayVersionInfo? GrayVersionInfo { get; set; } + + /// + /// 获取或设置线上版本信息。 + /// + [Newtonsoft.Json.JsonProperty("current")] + [System.Text.Json.Serialization.JsonPropertyName("current")] + public Types.CurrentVersionInfo? CurrentVersionInfo { get; set; } + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsPackageVersion/OpenAppsPackageVersionReleaseV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsPackageVersion/OpenAppsPackageVersionReleaseV1Request.cs new file mode 100644 index 00000000..17e3c9aa --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsPackageVersion/OpenAppsPackageVersionReleaseV1Request.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [POST] /apps/v1/package_version/release/ 接口的请求。 + /// + public class OpenAppsPackageVersionReleaseV1Request : DouyinMicroAppOpenApiRequest + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsPackageVersion/OpenAppsPackageVersionReleaseV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsPackageVersion/OpenAppsPackageVersionReleaseV1Response.cs new file mode 100644 index 00000000..c5a0e77b --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsPackageVersion/OpenAppsPackageVersionReleaseV1Response.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [POST] /apps/v1/package_version/release/ 接口的响应。 + /// + public class OpenAppsPackageVersionReleaseV1Response : DouyinMicroAppOpenApiResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsPackageVersion/OpenAppsPackageVersionRevokeAuditV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsPackageVersion/OpenAppsPackageVersionRevokeAuditV1Request.cs new file mode 100644 index 00000000..d0617d6d --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsPackageVersion/OpenAppsPackageVersionRevokeAuditV1Request.cs @@ -0,0 +1,43 @@ +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [POST] /apps/v1/package_version/revoke_audit/ 接口的请求。 + /// + public class OpenAppsPackageVersionRevokeAuditV1Request : DouyinMicroAppOpenApiRequest + { + /// + /// 获取或设置本次提审的宿主端列表。 + /// + [Newtonsoft.Json.JsonProperty("host_names")] + [System.Text.Json.Serialization.JsonPropertyName("host_names")] + public IList HostNames { get; set; } = new List(); + + /// + /// 获取或设置本次提审的备注信息。 + /// + [Newtonsoft.Json.JsonProperty("audit_note")] + [System.Text.Json.Serialization.JsonPropertyName("audit_note")] + public string? AuditNote { get; set; } + + /// + /// 获取或设置重新提审方式。 + /// + [Newtonsoft.Json.JsonProperty("audit_way")] + [System.Text.Json.Serialization.JsonPropertyName("audit_way")] + public int? AuditWay { get; set; } + + /// + /// 获取或设置版本通道。 + /// + [Newtonsoft.Json.JsonProperty("tag")] + [System.Text.Json.Serialization.JsonPropertyName("tag")] + public string? Tag { get; set; } + + /// + [Newtonsoft.Json.JsonProperty("TpAppID")] + [System.Text.Json.Serialization.JsonPropertyName("TpAppID")] + public override string? ComponentAppId { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsPackageVersion/OpenAppsPackageVersionRevokeAuditV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsPackageVersion/OpenAppsPackageVersionRevokeAuditV1Response.cs new file mode 100644 index 00000000..8fa15d51 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsPackageVersion/OpenAppsPackageVersionRevokeAuditV1Response.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [POST] /apps/v1/package_version/revoke_audit/ 接口的响应。 + /// + public class OpenAppsPackageVersionRevokeAuditV1Response : DouyinMicroAppOpenApiResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsPackageVersion/OpenAppsPackageVersionRollbackV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsPackageVersion/OpenAppsPackageVersionRollbackV1Request.cs new file mode 100644 index 00000000..599bc911 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsPackageVersion/OpenAppsPackageVersionRollbackV1Request.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [POST] /apps/v1/package_version/rollback/ 接口的请求。 + /// + public class OpenAppsPackageVersionRollbackV1Request : DouyinMicroAppOpenApiRequest + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsPackageVersion/OpenAppsPackageVersionRollbackV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsPackageVersion/OpenAppsPackageVersionRollbackV1Response.cs new file mode 100644 index 00000000..c91034d2 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsPackageVersion/OpenAppsPackageVersionRollbackV1Response.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [POST] /apps/v1/package_version/rollback/ 接口的响应。 + /// + public class OpenAppsPackageVersionRollbackV1Response : DouyinMicroAppOpenApiResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsPackageVersion/OpenAppsPackageVersionUploadV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsPackageVersion/OpenAppsPackageVersionUploadV1Request.cs new file mode 100644 index 00000000..77a504f1 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsPackageVersion/OpenAppsPackageVersionUploadV1Request.cs @@ -0,0 +1,48 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [POST] /apps/v1/package_version/upload/ 接口的请求。 + /// + public class OpenAppsPackageVersionUploadV1Request : DouyinMicroAppOpenApiRequest + { + /// + /// 获取或设置提交 ID。 + /// + [Newtonsoft.Json.JsonProperty("template_id")] + [System.Text.Json.Serialization.JsonPropertyName("template_id")] + public long TemplateId { get; set; } + + /// + /// 获取或设置版本。 + /// + [Newtonsoft.Json.JsonProperty("user_version")] + [System.Text.Json.Serialization.JsonPropertyName("user_version")] + public string UserVersion { get; set; } = string.Empty; + + /// + /// 获取或设置描述。 + /// + [Newtonsoft.Json.JsonProperty("user_desc")] + [System.Text.Json.Serialization.JsonPropertyName("user_desc")] + public string UserDescription { get; set; } = string.Empty; + + /// + /// 获取或设置配置的 JSON 字符串。 + /// + [Newtonsoft.Json.JsonProperty("ext_json")] + [System.Text.Json.Serialization.JsonPropertyName("ext_json")] + public string? ExtraJson { get; set; } + + /// + /// 获取或设置版本通道。 + /// + [Newtonsoft.Json.JsonProperty("tag")] + [System.Text.Json.Serialization.JsonPropertyName("tag")] + public string? VersionTag { get; set; } + + /// + [Newtonsoft.Json.JsonProperty("TpAppID")] + [System.Text.Json.Serialization.JsonPropertyName("TpAppID")] + public override string? ComponentAppId { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsPackageVersion/OpenAppsPackageVersionUploadV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsPackageVersion/OpenAppsPackageVersionUploadV1Response.cs new file mode 100644 index 00000000..b3755345 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsPackageVersion/OpenAppsPackageVersionUploadV1Response.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [POST] /apps/v1/package_version/upload/ 接口的响应。 + /// + public class OpenAppsPackageVersionUploadV1Response : DouyinMicroAppOpenApiResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsTrial/OpenAppsTrialGetTrialInfoV2Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsTrial/OpenAppsTrialGetTrialInfoV2Request.cs new file mode 100644 index 00000000..019261b9 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsTrial/OpenAppsTrialGetTrialInfoV2Request.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [GET] /apps/v2/trial/get_trial_info 接口的请求。 + /// + public class OpenAppsTrialGetTrialInfoV2Request : DouyinMicroAppOpenApiRequest + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsTrial/OpenAppsTrialGetTrialInfoV2Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsTrial/OpenAppsTrialGetTrialInfoV2Response.cs new file mode 100644 index 00000000..1021614a --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/AppsTrial/OpenAppsTrialGetTrialInfoV2Response.cs @@ -0,0 +1,115 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [GET] /apps/v2/trial/get_trial_info 接口的响应。 + /// + public class OpenAppsTrialGetTrialInfoV2Response : DouyinMicroAppOpenApiResponse + { + public static class Types + { + public class Data + { + public static class Types + { + public class TrialLimitInfo + { + /// + /// 获取或设置是否被限制进阶能力。 + /// + [Newtonsoft.Json.JsonProperty("is_capability_limited")] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.NumericalBooleanConverter))] + [System.Text.Json.Serialization.JsonPropertyName("is_capability_limited")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalBooleanConverter))] + public bool IsCapabilityLimited { get; set; } + + /// + /// 获取或设置是否被限制支付额度。 + /// + [Newtonsoft.Json.JsonProperty("is_payment_restricted")] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.NumericalBooleanConverter))] + [System.Text.Json.Serialization.JsonPropertyName("is_payment_restricted")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalBooleanConverter))] + public bool IsPaymentRestricted { get; set; } + + /// + /// 获取或设置是否被限制流量。 + /// + [Newtonsoft.Json.JsonProperty("is_traffic_limited")] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.NumericalBooleanConverter))] + [System.Text.Json.Serialization.JsonPropertyName("is_traffic_limited")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalBooleanConverter))] + public bool IsTrafficLimited { get; set; } + } + + public class TrialTaskInfo + { + /// + /// 获取或设置任务名称。 + /// + [Newtonsoft.Json.JsonProperty("name")] + [System.Text.Json.Serialization.JsonPropertyName("name")] + public string Name { get; set; } = default!; + + /// + /// 获取或设置任务目标。 + /// + [Newtonsoft.Json.JsonProperty("target")] + [System.Text.Json.Serialization.JsonPropertyName("target")] + public int Target { get; set; } + + /// + /// 获取或设置任务进度。 + /// + [Newtonsoft.Json.JsonProperty("progress")] + [System.Text.Json.Serialization.JsonPropertyName("progress")] + public int Progress { get; set; } + } + } + + /// + /// 获取或设置信用分分值。 + /// + [Newtonsoft.Json.JsonProperty("app_credit_score")] + [System.Text.Json.Serialization.JsonPropertyName("app_credit_score")] + public int CreditScore { get; set; } + + /// + /// 获取或设置是否处于试运营期。 + /// + [Newtonsoft.Json.JsonProperty("is_trial")] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.NumericalBooleanConverter))] + [System.Text.Json.Serialization.JsonPropertyName("is_trial")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalBooleanConverter))] + public bool IsTrial { get; set; } + + /// + /// 获取或设置试运营期限制信息。 + /// + [Newtonsoft.Json.JsonProperty("trial_limit_info")] + [System.Text.Json.Serialization.JsonPropertyName("trial_limit_info")] + public Types.TrialLimitInfo? TrialLimitInfo { get; set; } + + /// + /// 获取或设置试运营期通过分数。 + /// + [Newtonsoft.Json.JsonProperty("trial_pass_score")] + [System.Text.Json.Serialization.JsonPropertyName("trial_pass_score")] + public int? TrialPassScore { get; set; } + + /// + /// 获取或设置试运营期任务列表。 + /// + [Newtonsoft.Json.JsonProperty("trial_task_info")] + [System.Text.Json.Serialization.JsonPropertyName("trial_task_info")] + public Types.TrialTaskInfo[]? TrialTaskList { get; set; } + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/Platform/Webhook/OpenPlatformWebhookEventStatusListV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/Platform/Webhook/OpenPlatformWebhookEventStatusListV1Request.cs new file mode 100644 index 00000000..387887a8 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/Platform/Webhook/OpenPlatformWebhookEventStatusListV1Request.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [GET] /platform/v1/webhook/event_status_list/ 接口的请求。 + /// + public class OpenPlatformWebhookEventStatusListV1Request : DouyinMicroAppOpenApiRequest + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/Platform/Webhook/OpenPlatformWebhookEventStatusListV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/Platform/Webhook/OpenPlatformWebhookEventStatusListV1Response.cs new file mode 100644 index 00000000..2e7e6fe3 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/Platform/Webhook/OpenPlatformWebhookEventStatusListV1Response.cs @@ -0,0 +1,86 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [GET] /platform/v1/webhook/event_status_list/ 接口的响应。 + /// + public class OpenPlatformWebhookEventStatusListV1Response : DouyinMicroAppOpenApiResponse + { + public static class Types + { + public class Data + { + public static class Types + { + public class WebhookInfo + { + /// + /// 获取或设置 Webhook Secret。 + /// + [Newtonsoft.Json.JsonProperty("secret")] + [System.Text.Json.Serialization.JsonPropertyName("secret")] + public string Secret { get; set; } = default!; + + /// + /// 获取或设置回调地址。 + /// + [Newtonsoft.Json.JsonProperty("callback_url")] + [System.Text.Json.Serialization.JsonPropertyName("callback_url")] + public string CallbackUrl { get; set; } = default!; + } + + public class EventInfo + { + /// + /// 获取或设置事件名。 + /// + [Newtonsoft.Json.JsonProperty("event")] + [System.Text.Json.Serialization.JsonPropertyName("event")] + public string Event { get; set; } = default!; + + /// + /// 获取或设置中文名称。 + /// + [Newtonsoft.Json.JsonProperty("name_cn")] + [System.Text.Json.Serialization.JsonPropertyName("name_cn")] + 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("status")] + [System.Text.Json.Serialization.JsonPropertyName("status")] + public int Status { get; set; } + } + } + + /// + /// 获取或设置 Webhook 配置信息。 + /// + [Newtonsoft.Json.JsonProperty("webhook_info")] + [System.Text.Json.Serialization.JsonPropertyName("webhook_info")] + public Types.WebhookInfo WebhookInfo { get; set; } = default!; + + /// + /// 获取或设置回调事件列表。 + /// + [Newtonsoft.Json.JsonProperty("event_list")] + [System.Text.Json.Serialization.JsonPropertyName("event_list")] + public Types.EventInfo[] EventList { get; set; } = default!; + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/Platform/Webhook/OpenPlatformWebhookResetSecretV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/Platform/Webhook/OpenPlatformWebhookResetSecretV1Request.cs new file mode 100644 index 00000000..2b4562cc --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/Platform/Webhook/OpenPlatformWebhookResetSecretV1Request.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [GET] /platform/v1/webhook/reset_secret/ 接口的请求。 + /// + public class OpenPlatformWebhookResetSecretV1Request : DouyinMicroAppOpenApiRequest + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/Platform/Webhook/OpenPlatformWebhookResetSecretV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/Platform/Webhook/OpenPlatformWebhookResetSecretV1Response.cs new file mode 100644 index 00000000..2b53038b --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/Platform/Webhook/OpenPlatformWebhookResetSecretV1Response.cs @@ -0,0 +1,28 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [GET] /platform/v1/webhook/reset_secret/ 接口的响应。 + /// + public class OpenPlatformWebhookResetSecretV1Response : DouyinMicroAppOpenApiResponse + { + public static class Types + { + public class Data + { + /// + /// 获取或设置 Webhook Secret。 + /// + [Newtonsoft.Json.JsonProperty("secret")] + [System.Text.Json.Serialization.JsonPropertyName("secret")] + public string Secret { get; set; } = default!; + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/Platform/Webhook/OpenPlatformWebhookSaveCallbackUrlV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/Platform/Webhook/OpenPlatformWebhookSaveCallbackUrlV1Request.cs new file mode 100644 index 00000000..f20d4f76 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/Platform/Webhook/OpenPlatformWebhookSaveCallbackUrlV1Request.cs @@ -0,0 +1,15 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [POST] /platform/v1/webhook/save_callback_url/ 接口的请求。 + /// + public class OpenPlatformWebhookSaveCallbackUrlV1Request : DouyinMicroAppOpenApiRequest + { + /// + /// 获取或设置回调地址。 + /// + [Newtonsoft.Json.JsonProperty("callback_url")] + [System.Text.Json.Serialization.JsonPropertyName("callback_url")] + public string CallbackUrl { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/Platform/Webhook/OpenPlatformWebhookSaveCallbackUrlV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/Platform/Webhook/OpenPlatformWebhookSaveCallbackUrlV1Response.cs new file mode 100644 index 00000000..f85b256a --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/Platform/Webhook/OpenPlatformWebhookSaveCallbackUrlV1Response.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [POST] /platform/v1/webhook/save_callback_url/ 接口的响应。 + /// + public class OpenPlatformWebhookSaveCallbackUrlV1Response : DouyinMicroAppOpenApiResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/Platform/Webhook/OpenPlatformWebhookUpdateEventStatusV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/Platform/Webhook/OpenPlatformWebhookUpdateEventStatusV1Request.cs new file mode 100644 index 00000000..bd366f00 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/Platform/Webhook/OpenPlatformWebhookUpdateEventStatusV1Request.cs @@ -0,0 +1,37 @@ +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [POST] /platform/v1/webhook/update_event_status/ 接口的请求。 + /// + public class OpenPlatformWebhookUpdateEventStatusV1Request : DouyinMicroAppOpenApiRequest + { + public static class Types + { + public class EventInfo + { + /// + /// 获取或设置事件名。 + /// + [Newtonsoft.Json.JsonProperty("event")] + [System.Text.Json.Serialization.JsonPropertyName("event")] + public string Event { get; set; } = string.Empty; + + /// + /// 获取或设置订阅状态。 + /// + [Newtonsoft.Json.JsonProperty("status")] + [System.Text.Json.Serialization.JsonPropertyName("status")] + public int Status { get; set; } + } + } + + /// + /// 获取或设置回调事件列表。 + /// + [Newtonsoft.Json.JsonProperty("event_list")] + [System.Text.Json.Serialization.JsonPropertyName("event_list")] + public IList EventList { get; set; } = new List(); + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/Platform/Webhook/OpenPlatformWebhookUpdateEventStatusV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/Platform/Webhook/OpenPlatformWebhookUpdateEventStatusV1Response.cs new file mode 100644 index 00000000..7c278a6b --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/Platform/Webhook/OpenPlatformWebhookUpdateEventStatusV1Response.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [POST] /platform/v1/webhook/update_event_status/ 接口的响应。 + /// + public class OpenPlatformWebhookUpdateEventStatusV1Response : DouyinMicroAppOpenApiResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/TpAppAuth/OpenAuthThirdPartyTokenV2Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/TpAppAuth/OpenAuthThirdPartyTokenV2Request.cs new file mode 100644 index 00000000..097ca7be --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/TpAppAuth/OpenAuthThirdPartyTokenV2Request.cs @@ -0,0 +1,22 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [GET] /openapi/v2/auth/tp/token 接口的请求。 + /// + public class OpenAuthThirdPartyTokenV2Request : DouyinMicroAppOpenApiRequest + { + /// + /// 获取或设置第三方应用 AppSecret。如果不指定将使用构造 时的 参数。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string? ComponentAppSecret { get; set; } + + /// + /// 获取或设置推送的 Ticket。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string ComponentTicket { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/TpAppAuth/OpenAuthThirdPartyTokenV2Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/TpAppAuth/OpenAuthThirdPartyTokenV2Response.cs new file mode 100644 index 00000000..fe8eaba8 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/TpAppAuth/OpenAuthThirdPartyTokenV2Response.cs @@ -0,0 +1,32 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [GET] /openapi/v2/auth/tp/token 接口的响应。 + /// + public class OpenAuthThirdPartyTokenV2Response : DouyinMicroAppOpenApiResponse + { + /// + [Newtonsoft.Json.JsonProperty("err_no")] + [System.Text.Json.Serialization.JsonPropertyName("err_no")] + public override int ErrorNumber { get; set; } + + /// + [Newtonsoft.Json.JsonProperty("err_msg")] + [System.Text.Json.Serialization.JsonPropertyName("err_msg")] + public override string? ErrorMessage { get; set; } + + /// + /// 获取或设置第三方平台 AccessToken。 + /// + [Newtonsoft.Json.JsonProperty("component_access_token")] + [System.Text.Json.Serialization.JsonPropertyName("component_access_token")] + public string ComponentAccessToken { get; set; } = default!; + + /// + /// 获取或设置第三方平台 AccessToken 有效期(单位:秒)。 + /// + [Newtonsoft.Json.JsonProperty("expires_in")] + [System.Text.Json.Serialization.JsonPropertyName("expires_in")] + public int ExpiresIn { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/TpAppAuth/OpenTpAppAuthGenerateLinkV3Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/TpAppAuth/OpenTpAppAuthGenerateLinkV3Request.cs new file mode 100644 index 00000000..8b66e2a2 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/TpAppAuth/OpenTpAppAuthGenerateLinkV3Request.cs @@ -0,0 +1,36 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [POST] /tpapp/v3/auth/gen_link 接口的请求。 + /// + public class OpenTpAppAuthGenerateLinkV3Request : DouyinMicroAppOpenApiRequest + { + /// + /// 获取或设置授权链接类型。 + /// + [Newtonsoft.Json.JsonProperty("link_type")] + [System.Text.Json.Serialization.JsonPropertyName("link_type")] + public int? LinkType { get; set; } + + /// + /// 获取或设置代创建的小程序图标文件路径。 + /// + [Newtonsoft.Json.JsonProperty("app_icon")] + [System.Text.Json.Serialization.JsonPropertyName("app_icon")] + public string? AppIconPath { get; set; } + + /// + /// 获取或设置代创建的小程序名称。 + /// + [Newtonsoft.Json.JsonProperty("app_name")] + [System.Text.Json.Serialization.JsonPropertyName("app_name")] + public string? AppName { get; set; } + + /// + /// 获取或设置授权回调地址。 + /// + [Newtonsoft.Json.JsonProperty("redirect_uri")] + [System.Text.Json.Serialization.JsonPropertyName("redirect_uri")] + public string? RedirectUrl { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/TpAppAuth/OpenTpAppAuthGenerateLinkV3Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/TpAppAuth/OpenTpAppAuthGenerateLinkV3Response.cs new file mode 100644 index 00000000..4018caad --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/TpAppAuth/OpenTpAppAuthGenerateLinkV3Response.cs @@ -0,0 +1,28 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [POST] /tpapp/v3/auth/gen_link 接口的响应。 + /// + public class OpenTpAppAuthGenerateLinkV3Response : DouyinMicroAppOpenApiResponse + { + public static class Types + { + public class Data + { + /// + /// 获取或设置授权链接。 + /// + [Newtonsoft.Json.JsonProperty("link")] + [System.Text.Json.Serialization.JsonPropertyName("link")] + public string AuthLink { get; set; } = default!; + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/TpAppAuth/OpenTpAppAuthGetAuthAppListV2Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/TpAppAuth/OpenTpAppAuthGetAuthAppListV2Request.cs new file mode 100644 index 00000000..163746e0 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/TpAppAuth/OpenTpAppAuthGetAuthAppListV2Request.cs @@ -0,0 +1,24 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [GET] /tpapp/v2/auth/get_auth_app_list 接口的请求。 + /// + public class OpenTpAppAuthGetAuthAppListV2Request : DouyinMicroAppOpenApiRequest + { + /// + /// 获取或设置分页页数。 + /// 默认值:1 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public int PageNumber { get; set; } = 1; + + /// + /// 获取或设置分页每页数量。 + /// 默认值:10 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public int PageSize { get; set; } = 10; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/TpAppAuth/OpenTpAppAuthGetAuthAppListV2Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/TpAppAuth/OpenTpAppAuthGetAuthAppListV2Response.cs new file mode 100644 index 00000000..cc980138 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/TpAppAuth/OpenTpAppAuthGetAuthAppListV2Response.cs @@ -0,0 +1,55 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [GET] /tpapp/v2/auth/get_auth_app_list 接口的响应。 + /// + public class OpenTpAppAuthGetAuthAppListV2Response : DouyinMicroAppOpenApiResponse + { + public static class Types + { + public class Data + { + public static class Types + { + public class AuthApp + { + /// + /// 获取或设置小程序 AppId。 + /// + [Newtonsoft.Json.JsonProperty("auth_appid")] + [System.Text.Json.Serialization.JsonPropertyName("auth_appid")] + public string AppId { get; set; } = default!; + + /// + /// 获取或设置授权时间戳。 + /// + [Newtonsoft.Json.JsonProperty("auth_time")] + [System.Text.Json.Serialization.JsonPropertyName("auth_time")] + public long AuthTimestamp { get; set; } + } + } + + /// + /// 获取或设置授权小程序列表。 + /// + [Newtonsoft.Json.JsonProperty("auth_app_list")] + [System.Text.Json.Serialization.JsonPropertyName("auth_app_list")] + public Types.AuthApp[] AuthAppList { get; set; } = default!; + + /// + /// 获取或设置总数量。 + /// + [Newtonsoft.Json.JsonProperty("total")] + [System.Text.Json.Serialization.JsonPropertyName("total")] + public int TotalCount { get; set; } + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/TpAppAuth/OpenTpAppAuthGetAuthTokenV2Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/TpAppAuth/OpenTpAppAuthGetAuthTokenV2Request.cs new file mode 100644 index 00000000..562b6cbc --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/TpAppAuth/OpenTpAppAuthGetAuthTokenV2Request.cs @@ -0,0 +1,30 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [GET] /tpapp/v2/auth/get_auth_token 接口的请求。 + /// + public class OpenTpAppAuthGetAuthTokenV2Request : DouyinMicroAppOpenApiRequest + { + /// + /// 获取或设置授权码。与字段 二选一。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string? AuthorizationCode { get; set; } + + /// + /// 获取或设置授权方刷新令牌。与字段 二选一。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string? AuthorizerRefreshToken { get; set; } + + /// + /// 获取或设置授权方式。 + /// 默认值:"app_to_tp_authorization_code" + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string GrantType { get; set; } = "app_to_tp_authorization_code"; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/TpAppAuth/OpenTpAppAuthGetAuthTokenV2Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/TpAppAuth/OpenTpAppAuthGetAuthTokenV2Response.cs new file mode 100644 index 00000000..ce936608 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/TpAppAuth/OpenTpAppAuthGetAuthTokenV2Response.cs @@ -0,0 +1,107 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [GET] /tpapp/v2/auth/get_auth_token 接口的响应。 + /// + public class OpenTpAppAuthGetAuthTokenV2Response : DouyinMicroAppOpenApiResponse + { + public static class Types + { + public class Data + { + public static class Types + { + public class Permission + { + /// + /// 获取或设置权限 ID。 + /// + [Newtonsoft.Json.JsonProperty("id")] + [System.Text.Json.Serialization.JsonPropertyName("id")] + public int Id { get; set; } + + /// + /// 获取或设置权限分类。 + /// + [Newtonsoft.Json.JsonProperty("category")] + [System.Text.Json.Serialization.JsonPropertyName("category")] + public string Category { get; set; } = default!; + + /// + /// 获取或设置权限描述。 + /// + [Newtonsoft.Json.JsonProperty("description")] + [System.Text.Json.Serialization.JsonPropertyName("description")] + public string Description { get; set; } = default!; + } + + public class ShareData + { + /// + /// 获取或设置服务商的分账比例上限(范围:0~30)。 + /// + [Newtonsoft.Json.JsonProperty("share_ratio")] + [System.Text.Json.Serialization.JsonPropertyName("share_ratio")] + public int? ShareRatio { get; set; } + + /// + /// 获取或设置服务商的分账金额上限(范围:0~50)。 + /// + [Newtonsoft.Json.JsonProperty("share_amount")] + [System.Text.Json.Serialization.JsonPropertyName("share_amount")] + public int? ShareAmount { get; set; } + } + } + + /// + /// 获取或设置授权方 AccessToken。 + /// + [Newtonsoft.Json.JsonProperty("authorizer_access_token")] + [System.Text.Json.Serialization.JsonPropertyName("authorizer_access_token")] + public string AuthorizerAccessToken { get; set; } = default!; + + /// + /// 获取或设置授权方 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; } + + /// + /// 获取或设置授权方 RefreshToken 有效期(单位:秒)。 + /// + [Newtonsoft.Json.JsonProperty("refresh_expires_in")] + [System.Text.Json.Serialization.JsonPropertyName("refresh_expires_in")] + public int RefreshTokenExpiresIn { get; set; } + + /// + /// 获取或设置授权方小程序 AppId。 + /// + [Newtonsoft.Json.JsonProperty("authorizer_appid")] + [System.Text.Json.Serialization.JsonPropertyName("authorizer_appid")] + public string? AuthorizerAppId { get; set; } + + /// + /// 获取或设置授权权限列表。 + /// + [Newtonsoft.Json.JsonProperty("authorize_permission")] + [System.Text.Json.Serialization.JsonPropertyName("authorize_permission")] + public Types.Permission[]? PermissionList { get; set; } + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/TpAppAuth/OpenTpAppAuthRetrieveAuthCodeV2Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/TpAppAuth/OpenTpAppAuthRetrieveAuthCodeV2Request.cs new file mode 100644 index 00000000..d4a1527b --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/TpAppAuth/OpenTpAppAuthRetrieveAuthCodeV2Request.cs @@ -0,0 +1,13 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [POST] /tpapp/v2/auth/retrieve_auth_code 接口的请求。 + /// + public class OpenTpAppAuthRetrieveAuthCodeV2Request : DouyinMicroAppOpenApiRequest + { + /// + [Newtonsoft.Json.JsonProperty("authorization_appid")] + [System.Text.Json.Serialization.JsonPropertyName("authorization_appid")] + public override string? AuthorizerAppId { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/TpAppAuth/OpenTpAppAuthRetrieveAuthCodeV2Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/TpAppAuth/OpenTpAppAuthRetrieveAuthCodeV2Response.cs new file mode 100644 index 00000000..66fdd58b --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/TpAppAuth/OpenTpAppAuthRetrieveAuthCodeV2Response.cs @@ -0,0 +1,35 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [POST] /tpapp/v2/auth/retrieve_auth_code 接口的响应。 + /// + public class OpenTpAppAuthRetrieveAuthCodeV2Response : DouyinMicroAppOpenApiResponse + { + public static class Types + { + public class Data + { + /// + /// 获取或设置授权码。 + /// + [Newtonsoft.Json.JsonProperty("authorization_code")] + [System.Text.Json.Serialization.JsonPropertyName("authorization_code")] + public string AuthorizationCode { get; set; } = default!; + + /// + /// 获取或设置授权码有效期(单位:秒)。 + /// + [Newtonsoft.Json.JsonProperty("expires_in")] + [System.Text.Json.Serialization.JsonPropertyName("expires_in")] + public int ExpiresIn { get; set; } + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/TpAppFile/OpenTpAppFileUploadMaterialV2Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/TpAppFile/OpenTpAppFileUploadMaterialV2Request.cs new file mode 100644 index 00000000..2b4d8771 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/TpAppFile/OpenTpAppFileUploadMaterialV2Request.cs @@ -0,0 +1,38 @@ +using System; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [POST] /tpapp/v2/file/upload_material 接口的请求。 + /// + public class OpenTpAppFileUploadMaterialV2Request : DouyinMicroAppOpenApiRequest + { + /// + /// 获取或设置上传的文件类型。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public int MaterialType { get; set; } + + /// + /// 获取或设置资源文件字节数组。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public byte[] MaterialFileBytes { get; set; } = Array.Empty(); + + /// + /// 获取或设置资源文件文件名。如果不指定将由系统自动生成。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string? MaterialFileName { get; set; } + + /// + /// 获取或设置资源文件 MIME 类型。如果不指定将由系统自动生成。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string? MaterialFileContentType { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/TpAppFile/OpenTpAppFileUploadMaterialV2Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/TpAppFile/OpenTpAppFileUploadMaterialV2Response.cs new file mode 100644 index 00000000..06dfc8a3 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/TpAppFile/OpenTpAppFileUploadMaterialV2Response.cs @@ -0,0 +1,28 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [POST] /tpapp/v2/file/upload_material 接口的响应。 + /// + public class OpenTpAppFileUploadMaterialV2Response : DouyinMicroAppOpenApiResponse + { + public static class Types + { + public class Data + { + /// + /// 获取或设置文件路径。 + /// + [Newtonsoft.Json.JsonProperty("path")] + [System.Text.Json.Serialization.JsonPropertyName("path")] + public string FilePath { get; set; } = default!; + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/TpAppTemplate/OpenTpAppTemplateAddTemplateV2Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/TpAppTemplate/OpenTpAppTemplateAddTemplateV2Request.cs new file mode 100644 index 00000000..c9225568 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/TpAppTemplate/OpenTpAppTemplateAddTemplateV2Request.cs @@ -0,0 +1,15 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [POST] /tpapp/v2/template/add_tpl 接口的请求。 + /// + public class OpenTpAppTemplateAddTemplateV2Request : DouyinMicroAppOpenApiRequest + { + /// + /// 获取或设置草稿 ID。 + /// + [Newtonsoft.Json.JsonProperty("draft_id")] + [System.Text.Json.Serialization.JsonPropertyName("draft_id")] + public long DraftId { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/TpAppTemplate/OpenTpAppTemplateAddTemplateV2Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/TpAppTemplate/OpenTpAppTemplateAddTemplateV2Response.cs new file mode 100644 index 00000000..823eede5 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/TpAppTemplate/OpenTpAppTemplateAddTemplateV2Response.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [POST] /tpapp/v2/template/add_tpl 接口的响应。 + /// + public class OpenTpAppTemplateAddTemplateV2Response : DouyinMicroAppOpenApiResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/TpAppTemplate/OpenTpAppTemplateDeleteTemplateV2Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/TpAppTemplate/OpenTpAppTemplateDeleteTemplateV2Request.cs new file mode 100644 index 00000000..159e3e14 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/TpAppTemplate/OpenTpAppTemplateDeleteTemplateV2Request.cs @@ -0,0 +1,15 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [POST] /tpapp/v2/template/del_tpl 接口的请求。 + /// + public class OpenTpAppTemplateDeleteTemplateV2Request : DouyinMicroAppOpenApiRequest + { + /// + /// 获取或设置模板 ID。 + /// + [Newtonsoft.Json.JsonProperty("template_id")] + [System.Text.Json.Serialization.JsonPropertyName("template_id")] + public long TemplateId { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/TpAppTemplate/OpenTpAppTemplateDeleteTemplateV2Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/TpAppTemplate/OpenTpAppTemplateDeleteTemplateV2Response.cs new file mode 100644 index 00000000..2ba95cfc --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/TpAppTemplate/OpenTpAppTemplateDeleteTemplateV2Response.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [POST] /tpapp/v2/template/del_tpl 接口的响应。 + /// + public class OpenTpAppTemplateDeleteTemplateV2Response : DouyinMicroAppOpenApiResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/TpAppTemplate/OpenTpAppTemplateGetTemplateAppListV2Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/TpAppTemplate/OpenTpAppTemplateGetTemplateAppListV2Request.cs new file mode 100644 index 00000000..8bc15ca4 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/TpAppTemplate/OpenTpAppTemplateGetTemplateAppListV2Request.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [GET] /tpapp/v2/template/get_tpl_app_list 接口的请求。 + /// + public class OpenTpAppTemplateGetTemplateAppListV2Request : DouyinMicroAppOpenApiRequest + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/TpAppTemplate/OpenTpAppTemplateGetTemplateAppListV2Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/TpAppTemplate/OpenTpAppTemplateGetTemplateAppListV2Response.cs new file mode 100644 index 00000000..14d2df15 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/TpAppTemplate/OpenTpAppTemplateGetTemplateAppListV2Response.cs @@ -0,0 +1,83 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [GET] /tpapp/v2/template/get_tpl_app_list 接口的响应。 + /// + public class OpenTpAppTemplateGetTemplateAppListV2Response : DouyinMicroAppOpenApiResponse + { + public static class Types + { + public class Data + { + public static class Types + { + public class TemplateApp + { + /// + /// 获取或设置模板小程序 ID。 + /// + [Newtonsoft.Json.JsonProperty("tpl_app_id")] + [System.Text.Json.Serialization.JsonPropertyName("tpl_app_id")] + public string TemplateAppId { get; set; } = default!; + + /// + /// 获取或设置模板小程序名称。 + /// + [Newtonsoft.Json.JsonProperty("app_name")] + [System.Text.Json.Serialization.JsonPropertyName("app_name")] + public string AppName { get; set; } = default!; + + /// + /// 获取或设置上传当前版本的用户名称。 + /// + [Newtonsoft.Json.JsonProperty("nick_name")] + [System.Text.Json.Serialization.JsonPropertyName("nick_name")] + public string? Nickname { get; set; } + + /// + /// 获取或设置版本号。 + /// + [Newtonsoft.Json.JsonProperty("user_version")] + [System.Text.Json.Serialization.JsonPropertyName("user_version")] + public string? UserVersion { get; set; } + + /// + /// 获取或设置描述。 + /// + [Newtonsoft.Json.JsonProperty("user_desc")] + [System.Text.Json.Serialization.JsonPropertyName("user_desc")] + public string? UserDescription { get; set; } + + /// + /// 获取或设置草稿 ID。 + /// + [Newtonsoft.Json.JsonProperty("draft_id")] + [System.Text.Json.Serialization.JsonPropertyName("draft_id")] + public long? DraftId { get; set; } + + /// + /// 获取或设置上传时间戳。 + /// + [Newtonsoft.Json.JsonProperty("create_time")] + [System.Text.Json.Serialization.JsonPropertyName("create_time")] + public long? CreateTimestamp { get; set; } + } + } + + /// + /// 获取或设置模板小程序列表。 + /// + [Newtonsoft.Json.JsonProperty("tpl_app_list")] + [System.Text.Json.Serialization.JsonPropertyName("tpl_app_list")] + public Types.TemplateApp[] TemplateAppList { get; set; } = default!; + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/TpAppTemplate/OpenTpAppTemplateGetTemplateListV2Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/TpAppTemplate/OpenTpAppTemplateGetTemplateListV2Request.cs new file mode 100644 index 00000000..0a98d192 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/TpAppTemplate/OpenTpAppTemplateGetTemplateListV2Request.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [GET] /tpapp/v2/template/get_tpl_list 接口的请求。 + /// + public class OpenTpAppTemplateGetTemplateListV2Request : DouyinMicroAppOpenApiRequest + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/TpAppTemplate/OpenTpAppTemplateGetTemplateListV2Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/TpAppTemplate/OpenTpAppTemplateGetTemplateListV2Response.cs new file mode 100644 index 00000000..2b4f6654 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/TpAppTemplate/OpenTpAppTemplateGetTemplateListV2Response.cs @@ -0,0 +1,62 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [GET] /tpapp/v2/template/get_tpl_list 接口的响应。 + /// + public class OpenTpAppTemplateGetTemplateListV2Response : DouyinMicroAppOpenApiResponse + { + public static class Types + { + public class Data + { + public static class Types + { + public class Template + { + /// + /// 获取或设置模板 ID。 + /// + [Newtonsoft.Json.JsonProperty("template_id")] + [System.Text.Json.Serialization.JsonPropertyName("template_id")] + public long TemplateId { get; set; } + + /// + /// 获取或设置版本号。 + /// + [Newtonsoft.Json.JsonProperty("user_version")] + [System.Text.Json.Serialization.JsonPropertyName("user_version")] + public string UserVersion { get; set; } = default!; + + /// + /// 获取或设置描述。 + /// + [Newtonsoft.Json.JsonProperty("user_desc")] + [System.Text.Json.Serialization.JsonPropertyName("user_desc")] + public string UserDescription { get; set; } = default!; + + /// + /// 获取或设置创建时间戳。 + /// + [Newtonsoft.Json.JsonProperty("create_time")] + [System.Text.Json.Serialization.JsonPropertyName("create_time")] + public long CreateTimestamp { get; set; } + } + } + + /// + /// 获取或设置模板列表。 + /// + [Newtonsoft.Json.JsonProperty("template_list")] + [System.Text.Json.Serialization.JsonPropertyName("template_list")] + public Types.Template[] TemplateList { get; set; } = default!; + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/Auth/OpenApiAuthGenerateLinkV2Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/Auth/OpenApiAuthGenerateLinkV2Request.cs new file mode 100644 index 00000000..24f28acd --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/Auth/OpenApiAuthGenerateLinkV2Request.cs @@ -0,0 +1,36 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [POST] /v2/auth/gen_link 接口的请求。 + /// + public class OpenApiAuthGenerateLinkV2Request : DouyinMicroAppOpenApiRequest + { + /// + /// 获取或设置授权链接类型。 + /// + [Newtonsoft.Json.JsonProperty("link_type")] + [System.Text.Json.Serialization.JsonPropertyName("link_type")] + public int? LinkType { get; set; } + + /// + /// 获取或设置代创建的小程序图标文件路径。 + /// + [Newtonsoft.Json.JsonProperty("app_icon")] + [System.Text.Json.Serialization.JsonPropertyName("app_icon")] + public string? AppIconPath { get; set; } + + /// + /// 获取或设置代创建的小程序名称。 + /// + [Newtonsoft.Json.JsonProperty("app_name")] + [System.Text.Json.Serialization.JsonPropertyName("app_name")] + public string? AppName { get; set; } + + /// + /// 获取或设置授权回调地址。 + /// + [Newtonsoft.Json.JsonProperty("redirect_uri")] + [System.Text.Json.Serialization.JsonPropertyName("redirect_uri")] + public string? RedirectUrl { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/Auth/OpenApiAuthGenerateLinkV2Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/Auth/OpenApiAuthGenerateLinkV2Response.cs new file mode 100644 index 00000000..cde23289 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/Auth/OpenApiAuthGenerateLinkV2Response.cs @@ -0,0 +1,15 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [POST] /v2/auth/gen_link 接口的响应。 + /// + public class OpenApiAuthGenerateLinkV2Response : OpenApiLegacyResponseBase + { + /// + /// 获取或设置授权链接。 + /// + [Newtonsoft.Json.JsonProperty("link")] + [System.Text.Json.Serialization.JsonPropertyName("link")] + public string AuthLink { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/Auth/OpenApiAuthPreAuthCodeV2Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/Auth/OpenApiAuthPreAuthCodeV2Request.cs similarity index 86% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/Auth/OpenApiAuthPreAuthCodeV2Request.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/Auth/OpenApiAuthPreAuthCodeV2Request.cs index b840d1a5..736f472b 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/Auth/OpenApiAuthPreAuthCodeV2Request.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/Auth/OpenApiAuthPreAuthCodeV2Request.cs @@ -1,9 +1,9 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Models +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models { /// /// 表示 [POST] /v2/auth/pre_auth_code 接口的请求。 /// - public class OpenApiAuthPreAuthCodeV2Request : ByteDanceMicroAppOpenApiRequest + public class OpenApiAuthPreAuthCodeV2Request : DouyinMicroAppOpenApiRequest { /// /// 获取或设置预授权码类型。 diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/Auth/OpenApiAuthPreAuthCodeV2Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/Auth/OpenApiAuthPreAuthCodeV2Response.cs similarity index 81% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/Auth/OpenApiAuthPreAuthCodeV2Response.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/Auth/OpenApiAuthPreAuthCodeV2Response.cs index edc2e79c..81c0e5c7 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/Auth/OpenApiAuthPreAuthCodeV2Response.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/Auth/OpenApiAuthPreAuthCodeV2Response.cs @@ -1,9 +1,9 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Models +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models { /// /// 表示 [POST] /v2/auth/pre_auth_code 接口的响应。 /// - public class OpenApiAuthPreAuthCodeV2Response : ByteDanceMicroAppOpenApiResponse + public class OpenApiAuthPreAuthCodeV2Response : OpenApiLegacyResponseBase { /// /// 获取或设置预授权码。 diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/Auth/OpenApiAuthRetrieveV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/Auth/OpenApiAuthRetrieveV1Request.cs new file mode 100644 index 00000000..ad70c720 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/Auth/OpenApiAuthRetrieveV1Request.cs @@ -0,0 +1,23 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [POST] /v1/auth/retrieve 接口的请求。 + /// + public class OpenApiAuthRetrieveV1Request : DouyinMicroAppOpenApiRequest + { + /// + [Newtonsoft.Json.JsonProperty("component_appid")] + [System.Text.Json.Serialization.JsonPropertyName("component_appid")] + public override string? ComponentAppId { get; set; } + + /// + [Newtonsoft.Json.JsonProperty("component_access_token")] + [System.Text.Json.Serialization.JsonPropertyName("component_access_token")] + public override string? ComponentAccessToken { get; set; } + + /// + [Newtonsoft.Json.JsonProperty("authorization_appid")] + [System.Text.Json.Serialization.JsonPropertyName("authorization_appid")] + public override string? AuthorizerAppId { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/Auth/OpenApiAuthRetrieveV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/Auth/OpenApiAuthRetrieveV1Response.cs similarity index 81% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/Auth/OpenApiAuthRetrieveV1Response.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/Auth/OpenApiAuthRetrieveV1Response.cs index 69560006..c4e864c2 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/Auth/OpenApiAuthRetrieveV1Response.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/Auth/OpenApiAuthRetrieveV1Response.cs @@ -1,9 +1,9 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Models +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models { /// /// 表示 [POST] /v1/auth/retrieve 接口的响应。 /// - public class OpenApiAuthRetrieveV1Response : ByteDanceMicroAppOpenApiResponse + public class OpenApiAuthRetrieveV1Response : OpenApiLegacyResponseBase { /// /// 获取或设置授权码。 diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/Auth/OpenApiAuthThirdPartyTokenV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/Auth/OpenApiAuthThirdPartyTokenV1Request.cs new file mode 100644 index 00000000..13f34e95 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/Auth/OpenApiAuthThirdPartyTokenV1Request.cs @@ -0,0 +1,22 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [GET] /v1/auth/tp/token 接口的请求。 + /// + public class OpenApiAuthThirdPartyTokenV1Request : DouyinMicroAppOpenApiRequest + { + /// + /// 获取或设置第三方应用 AppSecret。如果不指定将使用构造 时的 参数。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string? ComponentAppSecret { get; set; } + + /// + /// 获取或设置推送的 Ticket。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string ComponentTicket { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/Auth/OpenApiAuthThirdPartyTokenV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/Auth/OpenApiAuthThirdPartyTokenV1Response.cs similarity index 82% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/Auth/OpenApiAuthThirdPartyTokenV1Response.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/Auth/OpenApiAuthThirdPartyTokenV1Response.cs index 85eb5cea..f336be82 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/Auth/OpenApiAuthThirdPartyTokenV1Response.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/Auth/OpenApiAuthThirdPartyTokenV1Response.cs @@ -1,9 +1,9 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Models +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models { /// /// 表示 [GET] /v1/auth/tp/token 接口的响应。 /// - public class OpenApiAuthThirdPartyTokenV1Response : ByteDanceMicroAppOpenApiResponse + public class OpenApiAuthThirdPartyTokenV1Response : OpenApiLegacyResponseBase { /// /// 获取或设置第三方平台 AccessToken。 diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/Auth/OpenApiOAuthTokenV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/Auth/OpenApiOAuthTokenV1Request.cs new file mode 100644 index 00000000..40435f4b --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/Auth/OpenApiOAuthTokenV1Request.cs @@ -0,0 +1,30 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [GET] /v1/oauth/token 接口的请求。 + /// + public class OpenApiOAuthTokenV1Request : DouyinMicroAppOpenApiRequest + { + /// + /// 获取或设置授权码。与字段 二选一。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string? AuthorizationCode { get; set; } + + /// + /// 获取或设置授权方刷新令牌。与字段 二选一。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string? AuthorizerRefreshToken { get; set; } + + /// + /// 获取或设置授权方式。 + /// 默认值:"app_to_tp_authorization_code" + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string GrantType { get; set; } = "app_to_tp_authorization_code"; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/OAuth/OpenApiOAuthTokenV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/Auth/OpenApiOAuthTokenV1Response.cs similarity index 96% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/OAuth/OpenApiOAuthTokenV1Response.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/Auth/OpenApiOAuthTokenV1Response.cs index df1ab472..55b3935d 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/OAuth/OpenApiOAuthTokenV1Response.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/Auth/OpenApiOAuthTokenV1Response.cs @@ -1,9 +1,9 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Models +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models { /// /// 表示 [GET] /v1/oauth/token 接口的响应。 /// - public class OpenApiOAuthTokenV1Response : ByteDanceMicroAppOpenApiResponse + public class OpenApiOAuthTokenV1Response : OpenApiLegacyResponseBase { public static class Types { diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/App/Category/OpenApiMicroAppAppAddCategoriesV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/App/Category/OpenApiMicroAppAppAddCategoriesV1Request.cs similarity index 90% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/App/Category/OpenApiMicroAppAppAddCategoriesV1Request.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/App/Category/OpenApiMicroAppAppAddCategoriesV1Request.cs index 9983e77f..91628f20 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/App/Category/OpenApiMicroAppAppAddCategoriesV1Request.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/App/Category/OpenApiMicroAppAppAddCategoriesV1Request.cs @@ -1,11 +1,13 @@ -using System.Collections.Generic; +using System; +using System.Collections.Generic; -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Models +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models { /// /// 表示 [POST] /v1/microapp/app/add_categories 接口的请求。 /// - public class OpenApiMicroAppAppAddCategoriesV1Request : ByteDanceMicroAppOpenApiRequest + [Obsolete("相关接口或字段于 2024-01-23 下线。")] + public class OpenApiMicroAppAppAddCategoriesV1Request : DouyinMicroAppOpenApiRequest { public static class Types { diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/App/Category/OpenApiMicroAppAppAddCategoriesV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/App/Category/OpenApiMicroAppAppAddCategoriesV1Response.cs new file mode 100644 index 00000000..7c530ebd --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/App/Category/OpenApiMicroAppAppAddCategoriesV1Response.cs @@ -0,0 +1,12 @@ +using System; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [POST] /v1/microapp/app/add_categories 接口的响应。 + /// + [Obsolete("相关接口或字段于 2024-01-23 下线。")] + public class OpenApiMicroAppAppAddCategoriesV1Response : OpenApiLegacyResponseBase + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/App/Category/OpenApiMicroAppAppAllCategoriesV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/App/Category/OpenApiMicroAppAppAllCategoriesV1Request.cs new file mode 100644 index 00000000..bd3e77dc --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/App/Category/OpenApiMicroAppAppAllCategoriesV1Request.cs @@ -0,0 +1,12 @@ +using System; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [GET] /v1/microapp/app/all_categories 接口的请求。 + /// + [Obsolete("相关接口或字段于 2024-01-23 下线。")] + public class OpenApiMicroAppAppAllCategoriesV1Request : DouyinMicroAppOpenApiRequest + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/App/Category/OpenApiMicroAppAppAllCategoriesV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/App/Category/OpenApiMicroAppAppAllCategoriesV1Response.cs similarity index 95% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/App/Category/OpenApiMicroAppAppAllCategoriesV1Response.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/App/Category/OpenApiMicroAppAppAllCategoriesV1Response.cs index a89ae504..e5bf892b 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/App/Category/OpenApiMicroAppAppAllCategoriesV1Response.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/App/Category/OpenApiMicroAppAppAllCategoriesV1Response.cs @@ -1,9 +1,12 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Models +using System; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models { /// /// 表示 [GET] /v1/microapp/app/all_categories 接口的响应。 /// - public class OpenApiMicroAppAppAllCategoriesV1Response : ByteDanceMicroAppOpenApiResponse + [Obsolete("相关接口或字段于 2024-01-23 下线。")] + public class OpenApiMicroAppAppAllCategoriesV1Response : OpenApiLegacyResponseBase { public static class Types { diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/App/Category/OpenApiMicroAppAppCategoriesV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/App/Category/OpenApiMicroAppAppCategoriesV1Request.cs new file mode 100644 index 00000000..c14e6098 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/App/Category/OpenApiMicroAppAppCategoriesV1Request.cs @@ -0,0 +1,12 @@ +using System; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [GET] /v1/microapp/app/categories 接口的请求。 + /// + [Obsolete("相关接口或字段于 2024-01-23 下线。")] + public class OpenApiMicroAppAppCategoriesV1Request : DouyinMicroAppOpenApiRequest + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/App/Category/OpenApiMicroAppAppCategoriesV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/App/Category/OpenApiMicroAppAppCategoriesV1Response.cs similarity index 96% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/App/Category/OpenApiMicroAppAppCategoriesV1Response.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/App/Category/OpenApiMicroAppAppCategoriesV1Response.cs index 7e931dab..8604f161 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/App/Category/OpenApiMicroAppAppCategoriesV1Response.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/App/Category/OpenApiMicroAppAppCategoriesV1Response.cs @@ -1,9 +1,12 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Models +using System; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models { /// /// 表示 [GET] /v1/microapp/app/categories 接口的响应。 /// - public class OpenApiMicroAppAppCategoriesV1Response : ByteDanceMicroAppOpenApiResponse + [Obsolete("相关接口或字段于 2024-01-23 下线。")] + public class OpenApiMicroAppAppCategoriesV1Response : OpenApiLegacyResponseBase { public static class Types { diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/App/Category/OpenApiMicroAppAppDeleteCategoriesV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/App/Category/OpenApiMicroAppAppDeleteCategoriesV1Request.cs new file mode 100644 index 00000000..d5ba2b03 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/App/Category/OpenApiMicroAppAppDeleteCategoriesV1Request.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [POST] /v1/microapp/app/del_categories 接口的请求。 + /// + [Obsolete("相关接口或字段于 2024-01-23 下线。")] + public class OpenApiMicroAppAppDeleteCategoriesV1Request : DouyinMicroAppOpenApiRequest + { + /// + /// 获取或设置服务类目 ID 字符串(以逗号分隔)列表。 + /// + [Newtonsoft.Json.JsonProperty("categories")] + [System.Text.Json.Serialization.JsonPropertyName("categories")] + public IList CategoryIdStringList { get; set; } = new List(); + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/App/Category/OpenApiMicroAppAppDeleteCategoriesV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/App/Category/OpenApiMicroAppAppDeleteCategoriesV1Response.cs new file mode 100644 index 00000000..5ec6b57b --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/App/Category/OpenApiMicroAppAppDeleteCategoriesV1Response.cs @@ -0,0 +1,12 @@ +using System; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [POST] /v1/microapp/app/del_categories 接口的响应。 + /// + [Obsolete("相关接口或字段于 2024-01-23 下线。")] + public class OpenApiMicroAppAppDeleteCategoriesV1Response : OpenApiLegacyResponseBase + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/App/Category/OpenApiMicroAppAppSupplyCategoriesV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/App/Category/OpenApiMicroAppAppSupplyCategoriesV1Request.cs new file mode 100644 index 00000000..aeacc5fc --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/App/Category/OpenApiMicroAppAppSupplyCategoriesV1Request.cs @@ -0,0 +1,27 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [POST] /v1/microapp/app/supply_categories 接口的请求。 + /// + [Obsolete("相关接口或字段于 2024-01-23 下线。")] + public class OpenApiMicroAppAppSupplyCategoriesV1Request : DouyinMicroAppOpenApiRequest + { + public static class Types + { + public class CategoryInfo : OpenApiMicroAppAppAddCategoriesV1Request.Types.CategoryInfo + { + } + } + + + /// + /// 获取或设置服务类目信息列表。 + /// + [Newtonsoft.Json.JsonProperty("categoryInfo")] + [System.Text.Json.Serialization.JsonPropertyName("categoryInfo")] + public IList CategoryInfoList { get; set; } = new List(); + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/App/Category/OpenApiMicroAppAppSupplyCategoriesV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/App/Category/OpenApiMicroAppAppSupplyCategoriesV1Response.cs new file mode 100644 index 00000000..b718d98b --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/App/Category/OpenApiMicroAppAppSupplyCategoriesV1Response.cs @@ -0,0 +1,12 @@ +using System; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [POST] /v1/microapp/app/supply_categories 接口的响应。 + /// + [Obsolete("相关接口或字段于 2024-01-23 下线。")] + public class OpenApiMicroAppAppSupplyCategoriesV1Response : OpenApiLegacyResponseBase + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/App/OpenApiMicroAppAppCheckAppNameV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/App/OpenApiMicroAppAppCheckAppNameV1Request.cs new file mode 100644 index 00000000..0fea2060 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/App/OpenApiMicroAppAppCheckAppNameV1Request.cs @@ -0,0 +1,18 @@ +using System; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [GET] /v1/microapp/app/check_app_name 接口的请求。 + /// + [Obsolete("相关接口或字段于 2024-01-23 下线。")] + public class OpenApiMicroAppAppCheckAppNameV1Request : DouyinMicroAppOpenApiRequest + { + /// + /// 获取或设置待检测的小程序名称。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string AppName { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/App/OpenApiMicroAppAppCheckAppNameV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/App/OpenApiMicroAppAppCheckAppNameV1Response.cs new file mode 100644 index 00000000..23aa0fdd --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/App/OpenApiMicroAppAppCheckAppNameV1Response.cs @@ -0,0 +1,12 @@ +using System; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [GET] /v1/microapp/app/check_app_name 接口的响应。 + /// + [Obsolete("相关接口或字段于 2024-01-23 下线。")] + public class OpenApiMicroAppAppCheckAppNameV1Response : OpenApiLegacyResponseBase + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/App/OpenApiMicroAppAppCreditScoreV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/App/OpenApiMicroAppAppCreditScoreV1Request.cs new file mode 100644 index 00000000..714a0c63 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/App/OpenApiMicroAppAppCreditScoreV1Request.cs @@ -0,0 +1,12 @@ +using System; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [GET] /v1/microapp/app/credit_score 接口的请求。 + /// + [Obsolete("相关接口或字段于 2024-01-23 下线。")] + public class OpenApiMicroAppAppCreditScoreV1Request : DouyinMicroAppOpenApiRequest + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/App/OpenApiMicroAppAppCreditScoreV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/App/OpenApiMicroAppAppCreditScoreV1Response.cs new file mode 100644 index 00000000..d027e214 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/App/OpenApiMicroAppAppCreditScoreV1Response.cs @@ -0,0 +1,31 @@ +using System; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [GET] /v1/microapp/app/credit_score 接口的响应。 + /// + [Obsolete("相关接口或字段于 2024-01-23 下线。")] + public class OpenApiMicroAppAppCreditScoreV1Response : OpenApiLegacyResponseBase + { + public static class Types + { + public class Data + { + /// + /// 获取或设置信用分分值。 + /// + [Newtonsoft.Json.JsonProperty("creditScore")] + [System.Text.Json.Serialization.JsonPropertyName("creditScore")] + public int CreditScore { get; set; } + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/App/OpenApiMicroAppAppInfoV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/App/OpenApiMicroAppAppInfoV1Request.cs new file mode 100644 index 00000000..36f42201 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/App/OpenApiMicroAppAppInfoV1Request.cs @@ -0,0 +1,12 @@ +using System; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [GET] /v1/microapp/app/info 接口的请求。 + /// + [Obsolete("相关接口或字段于 2024-01-23 下线。")] + public class OpenApiMicroAppAppInfoV1Request : DouyinMicroAppOpenApiRequest + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/App/OpenApiMicroAppAppInfoV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/App/OpenApiMicroAppAppInfoV1Response.cs similarity index 98% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/App/OpenApiMicroAppAppInfoV1Response.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/App/OpenApiMicroAppAppInfoV1Response.cs index 48c1ec87..dd9feb60 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/App/OpenApiMicroAppAppInfoV1Response.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/App/OpenApiMicroAppAppInfoV1Response.cs @@ -1,9 +1,12 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Models +using System; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models { /// /// 表示 [GET] /v1/microapp/app/info 接口的响应。 /// - public class OpenApiMicroAppAppInfoV1Response : ByteDanceMicroAppOpenApiResponse + [Obsolete("相关接口或字段于 2024-01-23 下线。")] + public class OpenApiMicroAppAppInfoV1Response : OpenApiLegacyResponseBase { public static class Types { diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/App/OpenApiMicroAppAppModifyAppIconV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/App/OpenApiMicroAppAppModifyAppIconV1Request.cs new file mode 100644 index 00000000..45e24791 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/App/OpenApiMicroAppAppModifyAppIconV1Request.cs @@ -0,0 +1,18 @@ +using System; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [POST] /v1/microapp/app/modify_app_icon 接口的请求。 + /// + [Obsolete("相关接口或字段于 2024-01-23 下线。")] + public class OpenApiMicroAppAppModifyAppIconV1Request : DouyinMicroAppOpenApiRequest + { + /// + /// 获取或设置准备修改的小程序图标路径。 + /// + [Newtonsoft.Json.JsonProperty("new_icon_path")] + [System.Text.Json.Serialization.JsonPropertyName("new_icon_path")] + public string NewIconPath { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/App/OpenApiMicroAppAppModifyAppIconV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/App/OpenApiMicroAppAppModifyAppIconV1Response.cs new file mode 100644 index 00000000..764c5b46 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/App/OpenApiMicroAppAppModifyAppIconV1Response.cs @@ -0,0 +1,12 @@ +using System; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [POST] /v1/microapp/app/modify_app_icon 接口的响应。 + /// + [Obsolete("相关接口或字段于 2024-01-23 下线。")] + public class OpenApiMicroAppAppModifyAppIconV1Response : OpenApiLegacyResponseBase + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/App/OpenApiMicroAppAppModifyAppIntroductionV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/App/OpenApiMicroAppAppModifyAppIntroductionV1Request.cs new file mode 100644 index 00000000..e44ae8ba --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/App/OpenApiMicroAppAppModifyAppIntroductionV1Request.cs @@ -0,0 +1,18 @@ +using System; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [POST] /v1/microapp/app/modify_app_intro 接口的请求。 + /// + [Obsolete("相关接口或字段于 2024-01-23 下线。")] + public class OpenApiMicroAppAppModifyAppIntroductionV1Request : DouyinMicroAppOpenApiRequest + { + /// + /// 获取或设置准备修改的小程序简介。 + /// + [Newtonsoft.Json.JsonProperty("new_intro")] + [System.Text.Json.Serialization.JsonPropertyName("new_intro")] + public string NewIntroduction { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/App/OpenApiMicroAppAppModifyAppIntroductionV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/App/OpenApiMicroAppAppModifyAppIntroductionV1Response.cs new file mode 100644 index 00000000..9b4cfe2f --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/App/OpenApiMicroAppAppModifyAppIntroductionV1Response.cs @@ -0,0 +1,12 @@ +using System; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [POST] /v1/microapp/app/modify_app_intro 接口的响应。 + /// + [Obsolete("相关接口或字段于 2024-01-23 下线。")] + public class OpenApiMicroAppAppModifyAppIntroductionV1Response : OpenApiLegacyResponseBase + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/App/OpenApiMicroAppAppModifyAppNameV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/App/OpenApiMicroAppAppModifyAppNameV1Request.cs new file mode 100644 index 00000000..f72d554b --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/App/OpenApiMicroAppAppModifyAppNameV1Request.cs @@ -0,0 +1,25 @@ +using System; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [POST] /v1/microapp/app/modify_app_name 接口的请求。 + /// + [Obsolete("相关接口或字段于 2024-01-23 下线。")] + public class OpenApiMicroAppAppModifyAppNameV1Request : DouyinMicroAppOpenApiRequest + { + /// + /// 获取或设置准备修改的小程序名称。 + /// + [Newtonsoft.Json.JsonProperty("new_name")] + [System.Text.Json.Serialization.JsonPropertyName("new_name")] + public string NewName { get; set; } = string.Empty; + + /// + /// 获取或设置审核材料路径。 + /// + [Newtonsoft.Json.JsonProperty("material_file_path")] + [System.Text.Json.Serialization.JsonPropertyName("material_file_path")] + public string? MaterialFilePath { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/App/OpenApiMicroAppAppModifyAppNameV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/App/OpenApiMicroAppAppModifyAppNameV1Response.cs new file mode 100644 index 00000000..ed962c17 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/App/OpenApiMicroAppAppModifyAppNameV1Response.cs @@ -0,0 +1,12 @@ +using System; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [POST] /v1/microapp/app/modify_app_name 接口的响应。 + /// + [Obsolete("相关接口或字段于 2024-01-23 下线。")] + public class OpenApiMicroAppAppModifyAppNameV1Response : OpenApiLegacyResponseBase + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/App/OpenApiMicroAppAppModifyServerDomainV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/App/OpenApiMicroAppAppModifyServerDomainV1Request.cs similarity index 87% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/App/OpenApiMicroAppAppModifyServerDomainV1Request.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/App/OpenApiMicroAppAppModifyServerDomainV1Request.cs index 8ee56506..f8e87ee1 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/App/OpenApiMicroAppAppModifyServerDomainV1Request.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/App/OpenApiMicroAppAppModifyServerDomainV1Request.cs @@ -1,15 +1,17 @@ +using System; using System.Collections.Generic; -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Models +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models { /// /// 表示 [POST] /v1/microapp/app/modify_server_domain 接口的请求。 /// - public class OpenApiMicroAppAppModifyServerDomainV1Request : ByteDanceMicroAppOpenApiRequest + [Obsolete("相关接口或字段于 2024-01-23 下线。")] + public class OpenApiMicroAppAppModifyServerDomainV1Request : DouyinMicroAppOpenApiRequest { /// /// 获取或设置执行动作。 - /// 默认值:get + /// 默认值:"get" /// [Newtonsoft.Json.JsonProperty("action")] [System.Text.Json.Serialization.JsonPropertyName("action")] diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/App/OpenApiMicroAppAppModifyServerDomainV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/App/OpenApiMicroAppAppModifyServerDomainV1Response.cs similarity index 91% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/App/OpenApiMicroAppAppModifyServerDomainV1Response.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/App/OpenApiMicroAppAppModifyServerDomainV1Response.cs index 25e49851..0503c0f0 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/App/OpenApiMicroAppAppModifyServerDomainV1Response.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/App/OpenApiMicroAppAppModifyServerDomainV1Response.cs @@ -1,9 +1,12 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Models +using System; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models { /// /// 表示 [POST] /v1/microapp/app/modify_server_domain 接口的响应。 /// - public class OpenApiMicroAppAppModifyServerDomainV1Response : ByteDanceMicroAppOpenApiResponse + [Obsolete("相关接口或字段于 2024-01-23 下线。")] + public class OpenApiMicroAppAppModifyServerDomainV1Response : OpenApiLegacyResponseBase { public static class Types { diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/App/OpenApiMicroAppAppModifyWebviewDomainV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/App/OpenApiMicroAppAppModifyWebviewDomainV1Request.cs similarity index 77% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/App/OpenApiMicroAppAppModifyWebviewDomainV1Request.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/App/OpenApiMicroAppAppModifyWebviewDomainV1Request.cs index 7ba0cf84..03d742be 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/App/OpenApiMicroAppAppModifyWebviewDomainV1Request.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/App/OpenApiMicroAppAppModifyWebviewDomainV1Request.cs @@ -1,15 +1,17 @@ +using System; using System.Collections.Generic; -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Models +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models { /// /// 表示 [POST] /v1/microapp/app/modify_webview_domain 接口的请求。 /// - public class OpenApiMicroAppAppModifyWebviewDomainV1Request : ByteDanceMicroAppOpenApiRequest + [Obsolete("相关接口或字段于 2024-01-23 下线。")] + public class OpenApiMicroAppAppModifyWebviewDomainV1Request : DouyinMicroAppOpenApiRequest { /// /// 获取或设置执行动作。 - /// 默认值:get + /// 默认值:"get" /// [Newtonsoft.Json.JsonProperty("action")] [System.Text.Json.Serialization.JsonPropertyName("action")] diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/App/OpenApiMicroAppAppModifyWebviewDomainV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/App/OpenApiMicroAppAppModifyWebviewDomainV1Response.cs new file mode 100644 index 00000000..8e5de630 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/App/OpenApiMicroAppAppModifyWebviewDomainV1Response.cs @@ -0,0 +1,18 @@ +using System; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [POST] /v1/microapp/app/modify_webview_domain 接口的响应。 + /// + [Obsolete("相关接口或字段于 2024-01-23 下线。")] + public class OpenApiMicroAppAppModifyWebviewDomainV1Response : OpenApiLegacyResponseBase + { + /// + /// 获取或设置 Webview 域名列表。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public string[]? WebviewDomainList { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/App/OpenApiMicroAppAppQrcodeV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/App/OpenApiMicroAppAppQrcodeV1Request.cs new file mode 100644 index 00000000..adb48258 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/App/OpenApiMicroAppAppQrcodeV1Request.cs @@ -0,0 +1,26 @@ +using System; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [POST] /v1/microapp/app/qrcode 接口的请求。 + /// + [Obsolete("相关接口或字段于 2024-01-23 下线。")] + public class OpenApiMicroAppAppQrcodeV1Request : DouyinMicroAppOpenApiRequest + { + /// + /// 获取或设置版本。 + /// 默认值:"current" + /// + [Newtonsoft.Json.JsonProperty("version")] + [System.Text.Json.Serialization.JsonPropertyName("version")] + public string Version { get; set; } = "current"; + + /// + /// 获取或设置小程序页面路径。 + /// + [Newtonsoft.Json.JsonProperty("path")] + [System.Text.Json.Serialization.JsonPropertyName("path")] + public string PagePath { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/App/OpenApiMicroAppAppQrcodeV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/App/OpenApiMicroAppAppQrcodeV1Response.cs new file mode 100644 index 00000000..6255981c --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/App/OpenApiMicroAppAppQrcodeV1Response.cs @@ -0,0 +1,17 @@ +using System; +using System.Linq; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [POST] /v1/microapp/app/qrcode 接口的响应。 + /// + [Obsolete("相关接口或字段于 2024-01-23 下线。")] + public class OpenApiMicroAppAppQrcodeV1Response : OpenApiLegacyResponseBase + { + public override bool IsSuccessful() + { + return base.IsSuccessful() && GetRawBytes().Any(); + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/App/OpenApiMicroAppAppQualityRatingV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/App/OpenApiMicroAppAppQualityRatingV1Request.cs new file mode 100644 index 00000000..1a8bce85 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/App/OpenApiMicroAppAppQualityRatingV1Request.cs @@ -0,0 +1,12 @@ +using System; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [GET] /v1/microapp/app/quality_rating 接口的请求。 + /// + [Obsolete("相关接口或字段于 2023-10-23 下线。")] + public class OpenApiMicroAppAppQualityRatingV1Request : DouyinMicroAppOpenApiRequest + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/App/OpenApiMicroAppAppQualityRatingV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/App/OpenApiMicroAppAppQualityRatingV1Response.cs similarity index 82% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/App/OpenApiMicroAppAppQualityRatingV1Response.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/App/OpenApiMicroAppAppQualityRatingV1Response.cs index a23ccbf1..ca47b1c0 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/App/OpenApiMicroAppAppQualityRatingV1Response.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/App/OpenApiMicroAppAppQualityRatingV1Response.cs @@ -1,9 +1,12 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Models +using System; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models { /// /// 表示 [GET] /v1/microapp/app/quality_rating 接口的响应。 /// - public class OpenApiMicroAppAppQualityRatingV1Response : ByteDanceMicroAppOpenApiResponse + [Obsolete("相关接口或字段于 2023-10-23 下线。")] + public class OpenApiMicroAppAppQualityRatingV1Response : OpenApiLegacyResponseBase { public static class Types { diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/OpenApiMicroAppCode2SessionV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/OpenApiMicroAppCode2SessionV1Request.cs similarity index 77% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/OpenApiMicroAppCode2SessionV1Request.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/OpenApiMicroAppCode2SessionV1Request.cs index dac096be..354a857a 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/OpenApiMicroAppCode2SessionV1Request.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/OpenApiMicroAppCode2SessionV1Request.cs @@ -1,9 +1,9 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Models +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models { /// /// 表示 [GET] /v1/microapp/code2session 接口的请求。 /// - public class OpenApiMicroAppCode2SessionV1Request : ByteDanceMicroAppOpenApiRequest + public class OpenApiMicroAppCode2SessionV1Request : DouyinMicroAppOpenApiRequest { /// /// 获取或设置登录 Code。 diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/OpenApiMicroAppCode2SessionV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/OpenApiMicroAppCode2SessionV1Response.cs similarity index 91% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/OpenApiMicroAppCode2SessionV1Response.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/OpenApiMicroAppCode2SessionV1Response.cs index 6e4df343..f6a8191c 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/OpenApiMicroAppCode2SessionV1Response.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/OpenApiMicroAppCode2SessionV1Response.cs @@ -1,9 +1,9 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Models +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models { /// /// 表示 [GET] /v1/microapp/code2session 接口的响应。 /// - public class OpenApiMicroAppCode2SessionV1Response : ByteDanceMicroAppOpenApiResponse + public class OpenApiMicroAppCode2SessionV1Response : OpenApiLegacyResponseBase { public static class Types { diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/OpenApiMicroAppUploadMaterialV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/OpenApiMicroAppUploadMaterialV1Request.cs similarity index 83% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/OpenApiMicroAppUploadMaterialV1Request.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/OpenApiMicroAppUploadMaterialV1Request.cs index 9ea7dd10..e26c6bd2 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/OpenApiMicroAppUploadMaterialV1Request.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/OpenApiMicroAppUploadMaterialV1Request.cs @@ -1,11 +1,12 @@ -using System; +using System; -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Models +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models { /// /// 表示 [POST] /v1/microapp/upload_material 接口的请求。 /// - public class OpenApiMicroAppUploadMaterialV1Request : ByteDanceMicroAppOpenApiRequest + [Obsolete("相关接口或字段于 2024-01-23 下线。")] + public class OpenApiMicroAppUploadMaterialV1Request : DouyinMicroAppOpenApiRequest { /// /// 获取或设置上传文件类型。 diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/OpenApiMicroAppUploadMaterialV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/OpenApiMicroAppUploadMaterialV1Response.cs new file mode 100644 index 00000000..2c136b21 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/OpenApiMicroAppUploadMaterialV1Response.cs @@ -0,0 +1,31 @@ +using System; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [POST] /v1/microapp/upload_material 接口的响应。 + /// + [Obsolete("相关接口或字段于 2024-01-23 下线。")] + public class OpenApiMicroAppUploadMaterialV1Response : OpenApiLegacyResponseBase + { + public static class Types + { + public class Data + { + /// + /// 获取或设置资源路径。 + /// + [Newtonsoft.Json.JsonProperty("path")] + [System.Text.Json.Serialization.JsonPropertyName("path")] + public string FilePath { get; set; } = default!; + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/Operation/Application/OpenApiMicroAppOperationLiveApplicationStatusV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/Operation/Application/OpenApiMicroAppOperationLiveApplicationStatusV1Request.cs new file mode 100644 index 00000000..a72e181c --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/Operation/Application/OpenApiMicroAppOperationLiveApplicationStatusV1Request.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [GET] /v1/microapp/operation/live_application_status 接口的请求。 + /// + public class OpenApiMicroAppOperationLiveApplicationStatusV1Request : DouyinMicroAppOpenApiRequest + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/Operation/Application/OpenApiMicroAppOperationLiveApplicationStatusV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/Operation/Application/OpenApiMicroAppOperationLiveApplicationStatusV1Response.cs similarity index 85% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/Operation/Application/OpenApiMicroAppOperationLiveApplicationStatusV1Response.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/Operation/Application/OpenApiMicroAppOperationLiveApplicationStatusV1Response.cs index ff4fab2a..aa2732e8 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/Operation/Application/OpenApiMicroAppOperationLiveApplicationStatusV1Response.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/Operation/Application/OpenApiMicroAppOperationLiveApplicationStatusV1Response.cs @@ -1,9 +1,9 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Models +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models { /// /// 表示 [GET] /v1/microapp/operation/live_application_status 接口的响应。 /// - public class OpenApiMicroAppOperationLiveApplicationStatusV1Response : ByteDanceMicroAppOpenApiResponse + public class OpenApiMicroAppOperationLiveApplicationStatusV1Response : OpenApiLegacyResponseBase { public static class Types { diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/Operation/Application/OpenApiMicroAppOperationLiveApplicationV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/Operation/Application/OpenApiMicroAppOperationLiveApplicationV1Request.cs similarity index 90% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/Operation/Application/OpenApiMicroAppOperationLiveApplicationV1Request.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/Operation/Application/OpenApiMicroAppOperationLiveApplicationV1Request.cs index 92094866..a57ce4a3 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/Operation/Application/OpenApiMicroAppOperationLiveApplicationV1Request.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/Operation/Application/OpenApiMicroAppOperationLiveApplicationV1Request.cs @@ -1,9 +1,9 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Models +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models { /// /// 表示 [POST] /v1/microapp/operation/live_application 接口的请求。 /// - public class OpenApiMicroAppOperationLiveApplicationV1Request : ByteDanceMicroAppOpenApiRequest + public class OpenApiMicroAppOperationLiveApplicationV1Request : DouyinMicroAppOpenApiRequest { /// /// 获取或设置申请原因以及挂载内容介绍。 @@ -30,9 +30,9 @@ public class OpenApiMicroAppOperationLiveApplicationV1Request : ByteDanceMicroAp /// 获取或设置是否有广告预算。 /// [Newtonsoft.Json.JsonProperty("hasAdBudget")] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.NumericalBooleanConverter))] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.NumericalBooleanConverter))] [System.Text.Json.Serialization.JsonPropertyName("hasAdBudget")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumericalBooleanConverter))] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalBooleanConverter))] public bool HasAdBudget { get; set; } /// diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/Operation/Application/OpenApiMicroAppOperationLiveApplicationV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/Operation/Application/OpenApiMicroAppOperationLiveApplicationV1Response.cs new file mode 100644 index 00000000..bb9aa7fa --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/Operation/Application/OpenApiMicroAppOperationLiveApplicationV1Response.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [POST] /v1/microapp/operation/live_application 接口的响应。 + /// + public class OpenApiMicroAppOperationLiveApplicationV1Response : OpenApiLegacyResponseBase + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/Operation/Application/OpenApiMicroAppOperationPhoneNumberApplicationStatusV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/Operation/Application/OpenApiMicroAppOperationPhoneNumberApplicationStatusV1Request.cs new file mode 100644 index 00000000..cdbb3b6f --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/Operation/Application/OpenApiMicroAppOperationPhoneNumberApplicationStatusV1Request.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [GET] /v1/microapp/operation/phone_number_application_status 接口的请求。 + /// + public class OpenApiMicroAppOperationPhoneNumberApplicationStatusV1Request : DouyinMicroAppOpenApiRequest + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/Operation/Application/OpenApiMicroAppOperationPhoneNumberApplicationStatusV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/Operation/Application/OpenApiMicroAppOperationPhoneNumberApplicationStatusV1Response.cs similarity index 84% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/Operation/Application/OpenApiMicroAppOperationPhoneNumberApplicationStatusV1Response.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/Operation/Application/OpenApiMicroAppOperationPhoneNumberApplicationStatusV1Response.cs index 8b8b1b11..a4e9cf13 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/Operation/Application/OpenApiMicroAppOperationPhoneNumberApplicationStatusV1Response.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/Operation/Application/OpenApiMicroAppOperationPhoneNumberApplicationStatusV1Response.cs @@ -1,9 +1,9 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Models +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models { /// /// 表示 [GET] /v1/microapp/operation/phone_number_application_status 接口的响应。 /// - public class OpenApiMicroAppOperationPhoneNumberApplicationStatusV1Response : ByteDanceMicroAppOpenApiResponse + public class OpenApiMicroAppOperationPhoneNumberApplicationStatusV1Response : OpenApiLegacyResponseBase { public static class Types { diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/Operation/Application/OpenApiMicroAppOperationPhoneNumberApplicationV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/Operation/Application/OpenApiMicroAppOperationPhoneNumberApplicationV1Request.cs similarity index 91% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/Operation/Application/OpenApiMicroAppOperationPhoneNumberApplicationV1Request.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/Operation/Application/OpenApiMicroAppOperationPhoneNumberApplicationV1Request.cs index 3c9ebc44..b618fd54 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/Operation/Application/OpenApiMicroAppOperationPhoneNumberApplicationV1Request.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/Operation/Application/OpenApiMicroAppOperationPhoneNumberApplicationV1Request.cs @@ -1,11 +1,11 @@ using System.Collections.Generic; -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Models +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models { /// /// 表示 [POST] /v1/microapp/operation/phone_number_application 接口的请求。 /// - public class OpenApiMicroAppOperationPhoneNumberApplicationV1Request : ByteDanceMicroAppOpenApiRequest + public class OpenApiMicroAppOperationPhoneNumberApplicationV1Request : DouyinMicroAppOpenApiRequest { /// /// 获取或设置申请原因。 diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/Operation/Application/OpenApiMicroAppOperationPhoneNumberApplicationV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/Operation/Application/OpenApiMicroAppOperationPhoneNumberApplicationV1Response.cs new file mode 100644 index 00000000..1e97293e --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/Operation/Application/OpenApiMicroAppOperationPhoneNumberApplicationV1Response.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [POST] /v1/microapp/operation/phone_number_application 接口的响应。 + /// + public class OpenApiMicroAppOperationPhoneNumberApplicationV1Response : OpenApiLegacyResponseBase + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/Operation/Application/OpenApiMicroAppOperationVideoApplicationStatusV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/Operation/Application/OpenApiMicroAppOperationVideoApplicationStatusV1Request.cs new file mode 100644 index 00000000..90249a5e --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/Operation/Application/OpenApiMicroAppOperationVideoApplicationStatusV1Request.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [GET] /v1/microapp/operation/video_application_status 接口的请求。 + /// + public class OpenApiMicroAppOperationVideoApplicationStatusV1Request : DouyinMicroAppOpenApiRequest + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/Operation/Application/OpenApiMicroAppOperationVideoApplicationStatusV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/Operation/Application/OpenApiMicroAppOperationVideoApplicationStatusV1Response.cs similarity index 90% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/Operation/Application/OpenApiMicroAppOperationVideoApplicationStatusV1Response.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/Operation/Application/OpenApiMicroAppOperationVideoApplicationStatusV1Response.cs index 5cc54226..ee32007e 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/Operation/Application/OpenApiMicroAppOperationVideoApplicationStatusV1Response.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/Operation/Application/OpenApiMicroAppOperationVideoApplicationStatusV1Response.cs @@ -1,9 +1,9 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Models +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models { /// /// 表示 [GET] /v1/microapp/operation/video_application_status 接口的响应。 /// - public class OpenApiMicroAppOperationVideoApplicationStatusV1Response : ByteDanceMicroAppOpenApiResponse + public class OpenApiMicroAppOperationVideoApplicationStatusV1Response : OpenApiLegacyResponseBase { public static class Types { diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/Operation/Application/OpenApiMicroAppOperationVideoApplicationV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/Operation/Application/OpenApiMicroAppOperationVideoApplicationV1Request.cs similarity index 90% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/Operation/Application/OpenApiMicroAppOperationVideoApplicationV1Request.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/Operation/Application/OpenApiMicroAppOperationVideoApplicationV1Request.cs index 87b282ad..b3d039b1 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/Operation/Application/OpenApiMicroAppOperationVideoApplicationV1Request.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/Operation/Application/OpenApiMicroAppOperationVideoApplicationV1Request.cs @@ -1,9 +1,9 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Models +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models { /// /// 表示 [POST] /v1/microapp/operation/video_application 接口的请求。 /// - public class OpenApiMicroAppOperationVideoApplicationV1Request : ByteDanceMicroAppOpenApiRequest + public class OpenApiMicroAppOperationVideoApplicationV1Request : DouyinMicroAppOpenApiRequest { /// /// 获取或设置申请原因以及挂载内容介绍。 diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/Operation/Application/OpenApiMicroAppOperationVideoApplicationV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/Operation/Application/OpenApiMicroAppOperationVideoApplicationV1Response.cs new file mode 100644 index 00000000..43e1225d --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/Operation/Application/OpenApiMicroAppOperationVideoApplicationV1Response.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [POST] /v1/microapp/operation/video_application 接口的响应。 + /// + public class OpenApiMicroAppOperationVideoApplicationV1Response : OpenApiLegacyResponseBase + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/Operation/ShareTemplate/OpenApiMicroAppOperationAddShareTemplateV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/Operation/ShareTemplate/OpenApiMicroAppOperationAddShareTemplateV1Request.cs similarity index 90% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/Operation/ShareTemplate/OpenApiMicroAppOperationAddShareTemplateV1Request.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/Operation/ShareTemplate/OpenApiMicroAppOperationAddShareTemplateV1Request.cs index ca01af58..d1b6a1e4 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/Operation/ShareTemplate/OpenApiMicroAppOperationAddShareTemplateV1Request.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/Operation/ShareTemplate/OpenApiMicroAppOperationAddShareTemplateV1Request.cs @@ -1,9 +1,9 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Models +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models { /// /// 表示 [POST] /v1/microapp/operation/add_share_tpl 接口的请求。 /// - public class OpenApiMicroAppOperationAddShareTemplateV1Request : ByteDanceMicroAppOpenApiRequest + public class OpenApiMicroAppOperationAddShareTemplateV1Request : DouyinMicroAppOpenApiRequest { /// /// 获取或设置分享标题。 diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/Operation/ShareTemplate/OpenApiMicroAppOperationAddShareTemplateV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/Operation/ShareTemplate/OpenApiMicroAppOperationAddShareTemplateV1Response.cs new file mode 100644 index 00000000..33114f42 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/Operation/ShareTemplate/OpenApiMicroAppOperationAddShareTemplateV1Response.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [POST] /v1/microapp/operation/add_share_tpl 接口的响应。 + /// + public class OpenApiMicroAppOperationAddShareTemplateV1Response : OpenApiLegacyResponseBase + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/Operation/ShareTemplate/OpenApiMicroAppOperationDeleteShareTemplateV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/Operation/ShareTemplate/OpenApiMicroAppOperationDeleteShareTemplateV1Request.cs similarity index 80% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/Operation/ShareTemplate/OpenApiMicroAppOperationDeleteShareTemplateV1Request.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/Operation/ShareTemplate/OpenApiMicroAppOperationDeleteShareTemplateV1Request.cs index 257167d2..25e42651 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/Operation/ShareTemplate/OpenApiMicroAppOperationDeleteShareTemplateV1Request.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/Operation/ShareTemplate/OpenApiMicroAppOperationDeleteShareTemplateV1Request.cs @@ -1,9 +1,9 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Models +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models { /// /// 表示 [POST] /v1/microapp/operation/del_share_tpl 接口的请求。 /// - public class OpenApiMicroAppOperationDeleteShareTemplateV1Request : ByteDanceMicroAppOpenApiRequest + public class OpenApiMicroAppOperationDeleteShareTemplateV1Request : DouyinMicroAppOpenApiRequest { /// /// 获取或设置模板 ID。 diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/Operation/ShareTemplate/OpenApiMicroAppOperationDeleteShareTemplateV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/Operation/ShareTemplate/OpenApiMicroAppOperationDeleteShareTemplateV1Response.cs new file mode 100644 index 00000000..246629b7 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/Operation/ShareTemplate/OpenApiMicroAppOperationDeleteShareTemplateV1Response.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [POST] /v1/microapp/operation/del_share_tpl 接口的响应。 + /// + public class OpenApiMicroAppOperationDeleteShareTemplateV1Response : OpenApiLegacyResponseBase + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/Operation/ShareTemplate/OpenApiMicroAppOperationModifyShareTemplateV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/Operation/ShareTemplate/OpenApiMicroAppOperationModifyShareTemplateV1Request.cs similarity index 91% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/Operation/ShareTemplate/OpenApiMicroAppOperationModifyShareTemplateV1Request.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/Operation/ShareTemplate/OpenApiMicroAppOperationModifyShareTemplateV1Request.cs index d5dfca7c..0339ba9b 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/Operation/ShareTemplate/OpenApiMicroAppOperationModifyShareTemplateV1Request.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/Operation/ShareTemplate/OpenApiMicroAppOperationModifyShareTemplateV1Request.cs @@ -1,9 +1,9 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Models +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models { /// /// 表示 [POST] /v1/microapp/operation/modify_share_tpl 接口的请求。 /// - public class OpenApiMicroAppOperationModifyShareTemplateV1Request : ByteDanceMicroAppOpenApiRequest + public class OpenApiMicroAppOperationModifyShareTemplateV1Request : DouyinMicroAppOpenApiRequest { /// /// 获取或设置模板 ID。 diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/Operation/ShareTemplate/OpenApiMicroAppOperationModifyShareTemplateV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/Operation/ShareTemplate/OpenApiMicroAppOperationModifyShareTemplateV1Response.cs new file mode 100644 index 00000000..b069a7bd --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/Operation/ShareTemplate/OpenApiMicroAppOperationModifyShareTemplateV1Response.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [POST] /v1/microapp/operation/modify_share_tpl 接口的响应。 + /// + public class OpenApiMicroAppOperationModifyShareTemplateV1Response : OpenApiLegacyResponseBase + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/Operation/ShareTemplate/OpenApiMicroAppOperationSetDefaultShareTemplateV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/Operation/ShareTemplate/OpenApiMicroAppOperationSetDefaultShareTemplateV1Request.cs similarity index 80% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/Operation/ShareTemplate/OpenApiMicroAppOperationSetDefaultShareTemplateV1Request.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/Operation/ShareTemplate/OpenApiMicroAppOperationSetDefaultShareTemplateV1Request.cs index f62cceb9..75a0859c 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/Operation/ShareTemplate/OpenApiMicroAppOperationSetDefaultShareTemplateV1Request.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/Operation/ShareTemplate/OpenApiMicroAppOperationSetDefaultShareTemplateV1Request.cs @@ -1,9 +1,9 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Models +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models { /// /// 表示 [POST] /v1/microapp/operation/set_default_share_tpl 接口的请求。 /// - public class OpenApiMicroAppOperationSetDefaultShareTemplateV1Request : ByteDanceMicroAppOpenApiRequest + public class OpenApiMicroAppOperationSetDefaultShareTemplateV1Request : DouyinMicroAppOpenApiRequest { /// /// 获取或设置模板 ID。 diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/Operation/ShareTemplate/OpenApiMicroAppOperationSetDefaultShareTemplateV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/Operation/ShareTemplate/OpenApiMicroAppOperationSetDefaultShareTemplateV1Response.cs new file mode 100644 index 00000000..a56205ec --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/Operation/ShareTemplate/OpenApiMicroAppOperationSetDefaultShareTemplateV1Response.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [POST] /v1/microapp/operation/set_default_share_tpl 接口的响应。 + /// + public class OpenApiMicroAppOperationSetDefaultShareTemplateV1Response : OpenApiLegacyResponseBase + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/Operation/ShareTemplate/OpenApiMicroAppOperationShareTemplateListV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/Operation/ShareTemplate/OpenApiMicroAppOperationShareTemplateListV1Request.cs similarity index 86% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/Operation/ShareTemplate/OpenApiMicroAppOperationShareTemplateListV1Request.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/Operation/ShareTemplate/OpenApiMicroAppOperationShareTemplateListV1Request.cs index 68384396..0a29e804 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/Operation/ShareTemplate/OpenApiMicroAppOperationShareTemplateListV1Request.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/Operation/ShareTemplate/OpenApiMicroAppOperationShareTemplateListV1Request.cs @@ -1,9 +1,9 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Models +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models { /// /// 表示 [GET] /v1/microapp/operation/share_tpl_list 接口的请求。 /// - public class OpenApiMicroAppOperationShareTemplateListV1Request : ByteDanceMicroAppOpenApiRequest + public class OpenApiMicroAppOperationShareTemplateListV1Request : DouyinMicroAppOpenApiRequest { /// /// 获取或设置分页页数。 diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/Operation/ShareTemplate/OpenApiMicroAppOperationShareTemplateListV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/Operation/ShareTemplate/OpenApiMicroAppOperationShareTemplateListV1Response.cs similarity index 95% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/Operation/ShareTemplate/OpenApiMicroAppOperationShareTemplateListV1Response.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/Operation/ShareTemplate/OpenApiMicroAppOperationShareTemplateListV1Response.cs index 3c7dd80a..48a1ad2a 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/Operation/ShareTemplate/OpenApiMicroAppOperationShareTemplateListV1Response.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/Operation/ShareTemplate/OpenApiMicroAppOperationShareTemplateListV1Response.cs @@ -1,9 +1,9 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Models +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models { /// /// 表示 [GET] /v1/microapp/operation/share_tpl_list 接口的响应。 /// - public class OpenApiMicroAppOperationShareTemplateListV1Response : ByteDanceMicroAppOpenApiResponse + public class OpenApiMicroAppOperationShareTemplateListV1Response : OpenApiLegacyResponseBase { public static class Types { @@ -45,9 +45,9 @@ public class ShareTemplate /// 获取或设置是否是默认模板。 /// [Newtonsoft.Json.JsonProperty("isDefault")] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.NumericalBooleanConverter))] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.NumericalBooleanConverter))] [System.Text.Json.Serialization.JsonPropertyName("isDefault")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumericalBooleanConverter))] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalBooleanConverter))] public bool IsDefault { get; set; } /// diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/Operation/ShopMaterial/OpenApiMicroAppOperationAddShopMaterialV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/Operation/ShopMaterial/OpenApiMicroAppOperationAddShopMaterialV1Request.cs similarity index 97% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/Operation/ShopMaterial/OpenApiMicroAppOperationAddShopMaterialV1Request.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/Operation/ShopMaterial/OpenApiMicroAppOperationAddShopMaterialV1Request.cs index 15408a4b..f2a04c3a 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/Operation/ShopMaterial/OpenApiMicroAppOperationAddShopMaterialV1Request.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/Operation/ShopMaterial/OpenApiMicroAppOperationAddShopMaterialV1Request.cs @@ -1,11 +1,11 @@ using System.Collections.Generic; -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Models +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models { /// /// 表示 [POST] /v1/microapp/operation/add_shop_material 接口的请求。 /// - public class OpenApiMicroAppOperationAddShopMaterialV1Request : ByteDanceMicroAppOpenApiRequest + public class OpenApiMicroAppOperationAddShopMaterialV1Request : DouyinMicroAppOpenApiRequest { public static class Types { diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/Operation/ShopMaterial/OpenApiMicroAppOperationAddShopMaterialV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/Operation/ShopMaterial/OpenApiMicroAppOperationAddShopMaterialV1Response.cs new file mode 100644 index 00000000..f578013a --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/Operation/ShopMaterial/OpenApiMicroAppOperationAddShopMaterialV1Response.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [POST] /v1/microapp/operation/add_shop_material 接口的响应。 + /// + public class OpenApiMicroAppOperationAddShopMaterialV1Response : OpenApiLegacyResponseBase + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/Operation/ShopMaterial/OpenApiMicroAppOperationQueryShopMaterialV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/Operation/ShopMaterial/OpenApiMicroAppOperationQueryShopMaterialV1Request.cs similarity index 80% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/Operation/ShopMaterial/OpenApiMicroAppOperationQueryShopMaterialV1Request.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/Operation/ShopMaterial/OpenApiMicroAppOperationQueryShopMaterialV1Request.cs index c46043a6..9f2158ac 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/Operation/ShopMaterial/OpenApiMicroAppOperationQueryShopMaterialV1Request.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/Operation/ShopMaterial/OpenApiMicroAppOperationQueryShopMaterialV1Request.cs @@ -1,9 +1,9 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Models +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models { /// /// 表示 [GET] /v1/microapp/operation/query_shop_material 接口的请求。 /// - public class OpenApiMicroAppOperationQueryShopMaterialV1Request : ByteDanceMicroAppOpenApiRequest + public class OpenApiMicroAppOperationQueryShopMaterialV1Request : DouyinMicroAppOpenApiRequest { /// /// 获取或设置接入方店铺 ID。 diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/Operation/ShopMaterial/OpenApiMicroAppOperationQueryShopMaterialV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/Operation/ShopMaterial/OpenApiMicroAppOperationQueryShopMaterialV1Response.cs similarity index 99% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/Operation/ShopMaterial/OpenApiMicroAppOperationQueryShopMaterialV1Response.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/Operation/ShopMaterial/OpenApiMicroAppOperationQueryShopMaterialV1Response.cs index b6282a77..d1cabc8b 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/Operation/ShopMaterial/OpenApiMicroAppOperationQueryShopMaterialV1Response.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/Operation/ShopMaterial/OpenApiMicroAppOperationQueryShopMaterialV1Response.cs @@ -1,9 +1,9 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Models +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models { /// /// 表示 [GET] /v1/microapp/operation/query_shop_material 接口的响应。 /// - public class OpenApiMicroAppOperationQueryShopMaterialV1Response : ByteDanceMicroAppOpenApiResponse + public class OpenApiMicroAppOperationQueryShopMaterialV1Response : OpenApiLegacyResponseBase { public static class Types { diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/Package/OpenApiMicroAppPackageAuditHostsV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/Package/OpenApiMicroAppPackageAuditHostsV1Request.cs new file mode 100644 index 00000000..04ba49c0 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/Package/OpenApiMicroAppPackageAuditHostsV1Request.cs @@ -0,0 +1,12 @@ +using System; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [GET] /v1/microapp/package/audit_hosts 接口的请求。 + /// + [Obsolete("相关接口或字段于 2024-02-21 下线。")] + public class OpenApiMicroAppPackageAuditHostsV1Request : DouyinMicroAppOpenApiRequest + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/Package/OpenApiMicroAppPackageAuditHostsV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/Package/OpenApiMicroAppPackageAuditHostsV1Response.cs similarity index 83% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/Package/OpenApiMicroAppPackageAuditHostsV1Response.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/Package/OpenApiMicroAppPackageAuditHostsV1Response.cs index 0d9edfa8..0dcb973d 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/Package/OpenApiMicroAppPackageAuditHostsV1Response.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/Package/OpenApiMicroAppPackageAuditHostsV1Response.cs @@ -1,9 +1,12 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Models +using System; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models { /// /// 表示 [GET] /v1/microapp/package/audit_hosts 接口的响应。 /// - public class OpenApiMicroAppPackageAuditHostsV1Response : ByteDanceMicroAppOpenApiResponse + [Obsolete("相关接口或字段于 2024-02-21 下线。")] + public class OpenApiMicroAppPackageAuditHostsV1Response : OpenApiLegacyResponseBase { public static class Types { diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/Package/OpenApiMicroAppPackageAuditV2Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/Package/OpenApiMicroAppPackageAuditV2Request.cs similarity index 80% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/Package/OpenApiMicroAppPackageAuditV2Request.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/Package/OpenApiMicroAppPackageAuditV2Request.cs index 0a6fe682..d2f397a7 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/Package/OpenApiMicroAppPackageAuditV2Request.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/Package/OpenApiMicroAppPackageAuditV2Request.cs @@ -1,11 +1,13 @@ +using System; using System.Collections.Generic; -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Models +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models { /// /// 表示 [POST] /v2/microapp/package/audit 接口的请求。 /// - public class OpenApiMicroAppPackageAuditV2Request : ByteDanceMicroAppOpenApiRequest + [Obsolete("相关接口或字段于 2024-02-21 下线。")] + public class OpenApiMicroAppPackageAuditV2Request : DouyinMicroAppOpenApiRequest { /// /// 获取或设置本次提审的宿主端列表。 diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/Package/OpenApiMicroAppPackageAuditV2Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/Package/OpenApiMicroAppPackageAuditV2Response.cs new file mode 100644 index 00000000..ce33291c --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/Package/OpenApiMicroAppPackageAuditV2Response.cs @@ -0,0 +1,12 @@ +using System; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [POST] /v2/microapp/package/audit 接口的响应。 + /// + [Obsolete("相关接口或字段于 2024-02-21 下线。")] + public class OpenApiMicroAppPackageAuditV2Response : OpenApiLegacyResponseBase + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/Package/OpenApiMicroAppPackageReleaseV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/Package/OpenApiMicroAppPackageReleaseV1Request.cs new file mode 100644 index 00000000..d62a31b7 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/Package/OpenApiMicroAppPackageReleaseV1Request.cs @@ -0,0 +1,12 @@ +using System; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [POST] /v1/microapp/package/release 接口的请求。 + /// + [Obsolete("相关接口或字段于 2024-02-21 下线。")] + public class OpenApiMicroAppPackageReleaseV1Request : DouyinMicroAppOpenApiRequest + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/Package/OpenApiMicroAppPackageReleaseV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/Package/OpenApiMicroAppPackageReleaseV1Response.cs new file mode 100644 index 00000000..01932094 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/Package/OpenApiMicroAppPackageReleaseV1Response.cs @@ -0,0 +1,12 @@ +using System; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [POST] /v1/microapp/package/release 接口的响应。 + /// + [Obsolete("相关接口或字段于 2024-02-21 下线。")] + public class OpenApiMicroAppPackageReleaseV1Response : OpenApiLegacyResponseBase + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/Package/OpenApiMicroAppPackageRevokeAuditV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/Package/OpenApiMicroAppPackageRevokeAuditV1Request.cs new file mode 100644 index 00000000..471477f4 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/Package/OpenApiMicroAppPackageRevokeAuditV1Request.cs @@ -0,0 +1,12 @@ +using System; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [POST] /v1/microapp/package/revoke_audit 接口的请求。 + /// + [Obsolete("相关接口或字段于 2024-02-21 下线。")] + public class OpenApiMicroAppPackageRevokeAuditV1Request : DouyinMicroAppOpenApiRequest + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/Package/OpenApiMicroAppPackageRevokeAuditV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/Package/OpenApiMicroAppPackageRevokeAuditV1Response.cs new file mode 100644 index 00000000..7cd4d539 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/Package/OpenApiMicroAppPackageRevokeAuditV1Response.cs @@ -0,0 +1,12 @@ +using System; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [POST] /v1/microapp/package/revoke_audit 接口的响应。 + /// + [Obsolete("相关接口或字段于 2024-02-21 下线。")] + public class OpenApiMicroAppPackageRevokeAuditV1Response : OpenApiLegacyResponseBase + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/Package/OpenApiMicroAppPackageRollbackV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/Package/OpenApiMicroAppPackageRollbackV1Request.cs new file mode 100644 index 00000000..04e692e6 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/Package/OpenApiMicroAppPackageRollbackV1Request.cs @@ -0,0 +1,12 @@ +using System; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [POST] /v1/microapp/package/rollback 接口的请求。 + /// + [Obsolete("相关接口或字段于 2024-02-21 下线。")] + public class OpenApiMicroAppPackageRollbackV1Request : DouyinMicroAppOpenApiRequest + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/Package/OpenApiMicroAppPackageRollbackV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/Package/OpenApiMicroAppPackageRollbackV1Response.cs new file mode 100644 index 00000000..d3195612 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/Package/OpenApiMicroAppPackageRollbackV1Response.cs @@ -0,0 +1,12 @@ +using System; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [POST] /v1/microapp/package/rollback 接口的响应。 + /// + [Obsolete("相关接口或字段于 2024-02-21 下线。")] + public class OpenApiMicroAppPackageRollbackV1Response : OpenApiLegacyResponseBase + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/Package/OpenApiMicroAppPackageUploadV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/Package/OpenApiMicroAppPackageUploadV1Request.cs similarity index 83% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/Package/OpenApiMicroAppPackageUploadV1Request.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/Package/OpenApiMicroAppPackageUploadV1Request.cs index fb2c0cca..d73d5265 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/Package/OpenApiMicroAppPackageUploadV1Request.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/Package/OpenApiMicroAppPackageUploadV1Request.cs @@ -1,9 +1,12 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Models +using System; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models { /// /// 表示 [POST] /v1/microapp/package/upload 接口的请求。 /// - public class OpenApiMicroAppPackageUploadV1Request : ByteDanceMicroAppOpenApiRequest + [Obsolete("相关接口或字段于 2024-02-21 下线。")] + public class OpenApiMicroAppPackageUploadV1Request : DouyinMicroAppOpenApiRequest { /// /// 获取或设置提交 ID。 diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/Package/OpenApiMicroAppPackageUploadV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/Package/OpenApiMicroAppPackageUploadV1Response.cs new file mode 100644 index 00000000..653c6f12 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/Package/OpenApiMicroAppPackageUploadV1Response.cs @@ -0,0 +1,12 @@ +using System; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [POST] /v1/microapp/package/upload 接口的响应。 + /// + [Obsolete("相关接口或字段于 2024-02-21 下线。")] + public class OpenApiMicroAppPackageUploadV1Response : OpenApiLegacyResponseBase + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/Package/OpenApiMicroAppPackageVersionsV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/Package/OpenApiMicroAppPackageVersionsV1Request.cs new file mode 100644 index 00000000..aaee6bae --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/Package/OpenApiMicroAppPackageVersionsV1Request.cs @@ -0,0 +1,12 @@ +using System; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [GET] /v1/microapp/package/versions 接口的请求。 + /// + [Obsolete("相关接口或字段于 2024-02-21 下线。")] + public class OpenApiMicroAppPackageVersionsV1Request : DouyinMicroAppOpenApiRequest + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/Package/OpenApiMicroAppPackageVersionsV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/Package/OpenApiMicroAppPackageVersionsV1Response.cs similarity index 93% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/Package/OpenApiMicroAppPackageVersionsV1Response.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/Package/OpenApiMicroAppPackageVersionsV1Response.cs index d0b098a2..c692b2f0 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/Package/OpenApiMicroAppPackageVersionsV1Response.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/MicroApp/Package/OpenApiMicroAppPackageVersionsV1Response.cs @@ -1,11 +1,13 @@ -using System.Collections.Generic; +using System; +using System.Collections.Generic; -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Models +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models { /// /// 表示 [GET] /v1/microapp/package/versions 接口的响应。 /// - public class OpenApiMicroAppPackageVersionsV1Response : ByteDanceMicroAppOpenApiResponse + [Obsolete("相关接口或字段于 2024-02-21 下线。")] + public class OpenApiMicroAppPackageVersionsV1Response : OpenApiLegacyResponseBase { public static class Types { @@ -71,18 +73,18 @@ public class LatestVersionInfo : VersionInfo /// 获取或设置是否已提审。 /// [Newtonsoft.Json.JsonProperty("has_audit")] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.NumericalBooleanConverter))] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.NumericalBooleanConverter))] [System.Text.Json.Serialization.JsonPropertyName("has_audit")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumericalBooleanConverter))] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalBooleanConverter))] public bool HasAudited { get; set; } /// /// 获取或设置截图 URL 列表。 /// [Newtonsoft.Json.JsonProperty("screenshot")] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.TextualStringArrayWithCommaSplitConverter))] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.StringifiedStringArrayWithCommaSplitConverter))] [System.Text.Json.Serialization.JsonPropertyName("screenshot")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.TextualStringArrayWithCommaSplitConverter))] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.StringifiedStringArrayWithCommaSplitConverter))] public string[]? ScreenshotUrlList { get; set; } } @@ -99,9 +101,9 @@ public class AuditVersionInfo : VersionInfo /// 获取或设置是否已发布。 /// [Newtonsoft.Json.JsonProperty("has_publish")] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.NumericalBooleanConverter))] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.NumericalBooleanConverter))] [System.Text.Json.Serialization.JsonPropertyName("has_publish")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumericalBooleanConverter))] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalBooleanConverter))] public bool HasPublished { get; set; } /// @@ -180,9 +182,9 @@ public class Rollback /// 获取或设置是否已下架。 /// [Newtonsoft.Json.JsonProperty("has_down")] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.NumericalBooleanConverter))] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.NumericalBooleanConverter))] [System.Text.Json.Serialization.JsonPropertyName("has_down")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumericalBooleanConverter))] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalBooleanConverter))] public bool HasDowned { get; set; } /// diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/Settle/OpenApiSettleApplyV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/Settle/OpenApiSettleApplyV1Request.cs similarity index 95% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/Settle/OpenApiSettleApplyV1Request.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/Settle/OpenApiSettleApplyV1Request.cs index 827e9e35..87212c50 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/Settle/OpenApiSettleApplyV1Request.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/Settle/OpenApiSettleApplyV1Request.cs @@ -1,11 +1,11 @@ using System.Collections.Generic; -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Models +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models { /// /// 表示 [POST] /v1/settle/apply 接口的请求。 /// - public class OpenApiSettleApplyV1Request : ByteDanceMicroAppOpenApiRequest + public class OpenApiSettleApplyV1Request : DouyinMicroAppOpenApiRequest { /// /// 获取或设置手机号码。 @@ -102,9 +102,9 @@ public class OpenApiSettleApplyV1Request : ByteDanceMicroAppOpenApiRequest /// 获取或设置经营行业类目编号。 /// [Newtonsoft.Json.JsonProperty("category_code")] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.TextualIntegerListWithCommaSplitConverter))] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.StringifiedNumberListWithCommaSplitConverter))] [System.Text.Json.Serialization.JsonPropertyName("category_code")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.TextualIntegerListWithCommaSplitConverter))] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.StringifiedNumberListWithCommaSplitConverter))] public IList CategoryCodeList { get; set; } = new List(); /// diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/Settle/OpenApiSettleApplyV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/Settle/OpenApiSettleApplyV1Response.cs similarity index 84% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/Settle/OpenApiSettleApplyV1Response.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/Settle/OpenApiSettleApplyV1Response.cs index f688540a..68d993fa 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/Settle/OpenApiSettleApplyV1Response.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/Settle/OpenApiSettleApplyV1Response.cs @@ -1,9 +1,9 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Models +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models { /// /// 表示 [POST] /v1/settle/apply 接口的响应。 /// - public class OpenApiSettleApplyV1Response : ByteDanceMicroAppOpenApiResponse + public class OpenApiSettleApplyV1Response : OpenApiLegacyResponseBase { public static class Types { diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/Settle/OpenApiSettleGetApplyStatusV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/Settle/OpenApiSettleGetApplyStatusV1Request.cs new file mode 100644 index 00000000..3c19594e --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/Settle/OpenApiSettleGetApplyStatusV1Request.cs @@ -0,0 +1,15 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [GET] /v1/settle/get_apply_status 接口的请求。 + /// + public class OpenApiSettleGetApplyStatusV1Request : DouyinMicroAppOpenApiRequest + { + /// + /// 获取或设置申请请求 ID。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string ApplyId { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/Settle/OpenApiSettleGetApplyStatusV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/Settle/OpenApiSettleGetApplyStatusV1Response.cs similarity index 90% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/Settle/OpenApiSettleGetApplyStatusV1Response.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/Settle/OpenApiSettleGetApplyStatusV1Response.cs index 73fc7ba8..b6c80d29 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/Settle/OpenApiSettleGetApplyStatusV1Response.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/Settle/OpenApiSettleGetApplyStatusV1Response.cs @@ -1,9 +1,9 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Models +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models { /// /// 表示 [GET] /v1/settle/get_apply_status 接口的响应。 /// - public class OpenApiSettleGetApplyStatusV1Response : ByteDanceMicroAppOpenApiResponse + public class OpenApiSettleGetApplyStatusV1Response : OpenApiLegacyResponseBase { public static class Types { diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/Settle/OpenApiSettlePreCheckV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/Settle/OpenApiSettlePreCheckV1Request.cs similarity index 95% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/Settle/OpenApiSettlePreCheckV1Request.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/Settle/OpenApiSettlePreCheckV1Request.cs index f004c5f0..f7d0fd65 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/Settle/OpenApiSettlePreCheckV1Request.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/Settle/OpenApiSettlePreCheckV1Request.cs @@ -1,9 +1,9 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Models +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models { /// /// 表示 [POST] /v1/settle/pre_check 接口的请求。 /// - public class OpenApiSettlePreCheckV1Request : ByteDanceMicroAppOpenApiRequest + public class OpenApiSettlePreCheckV1Request : DouyinMicroAppOpenApiRequest { /// /// 获取或设置主体类型。 diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/Settle/OpenApiSettlePreCheckV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/Settle/OpenApiSettlePreCheckV1Response.cs new file mode 100644 index 00000000..7252ee8b --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/Settle/OpenApiSettlePreCheckV1Response.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [POST] /v1/settle/pre_check 接口的响应。 + /// + public class OpenApiSettlePreCheckV1Response : OpenApiLegacyResponseBase + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/ThirdParty/Domain/OpenApiThirdPartyDownloadWebviewFileV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/ThirdParty/Domain/OpenApiThirdPartyDownloadWebviewFileV1Request.cs new file mode 100644 index 00000000..0419959e --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/ThirdParty/Domain/OpenApiThirdPartyDownloadWebviewFileV1Request.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [GET] /v1/tp/download/webview_file 接口的请求。 + /// + public class OpenApiThirdPartyDownloadWebviewFileV1Request : DouyinMicroAppOpenApiRequest + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/ThirdParty/Domain/OpenApiThirdPartyDownloadWebviewFileV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/ThirdParty/Domain/OpenApiThirdPartyDownloadWebviewFileV1Response.cs new file mode 100644 index 00000000..a60a4803 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/ThirdParty/Domain/OpenApiThirdPartyDownloadWebviewFileV1Response.cs @@ -0,0 +1,15 @@ +using System.Linq; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [GET] /v1/tp/download/webview_file 接口的响应。 + /// + public class OpenApiThirdPartyDownloadWebviewFileV1Response : OpenApiLegacyResponseBase + { + public override bool IsSuccessful() + { + return base.IsSuccessful() && GetRawBytes().Any(); + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/ThirdParty/OpenApiThirdPartyAuthAppListV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/ThirdParty/OpenApiThirdPartyAuthAppListV1Request.cs similarity index 80% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/ThirdParty/OpenApiThirdPartyAuthAppListV1Request.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/ThirdParty/OpenApiThirdPartyAuthAppListV1Request.cs index 48e7bd8f..1808f8b8 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/ThirdParty/OpenApiThirdPartyAuthAppListV1Request.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/ThirdParty/OpenApiThirdPartyAuthAppListV1Request.cs @@ -1,9 +1,9 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Models +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models { /// /// 表示 [GET] /v1/tp/auth_app_list 接口的请求。 /// - public class OpenApiThirdPartyAuthAppListV1Request : ByteDanceMicroAppOpenApiRequest + public class OpenApiThirdPartyAuthAppListV1Request : DouyinMicroAppOpenApiRequest { /// /// 获取或设置分页页数。 diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/ThirdParty/OpenApiThirdPartyAuthAppListV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/ThirdParty/OpenApiThirdPartyAuthAppListV1Response.cs similarity index 92% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/ThirdParty/OpenApiThirdPartyAuthAppListV1Response.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/ThirdParty/OpenApiThirdPartyAuthAppListV1Response.cs index 91415c03..cf3b2511 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/ThirdParty/OpenApiThirdPartyAuthAppListV1Response.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/ThirdParty/OpenApiThirdPartyAuthAppListV1Response.cs @@ -1,9 +1,9 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Models +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models { /// /// 表示 [GET] /v1/tp/auth_app_list 接口的响应。 /// - public class OpenApiThirdPartyAuthAppListV1Response : ByteDanceMicroAppOpenApiResponse + public class OpenApiThirdPartyAuthAppListV1Response : OpenApiLegacyResponseBase { public static class Types { diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/ThirdParty/OpenApiThirdPartyUploadPictureMaterialV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/ThirdParty/OpenApiThirdPartyUploadPictureMaterialV1Request.cs new file mode 100644 index 00000000..e2d77a19 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/ThirdParty/OpenApiThirdPartyUploadPictureMaterialV1Request.cs @@ -0,0 +1,39 @@ +using System; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [POST] /v1/tp/upload_pic_material 接口的请求。 + /// + [Obsolete("相关接口或字段于 2024-01-23 下线。")] + public class OpenApiThirdPartyUploadPictureMaterialV1Request : DouyinMicroAppOpenApiRequest + { + /// + /// 获取或设置上传的文件类型。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public int MaterialType { get; set; } + + /// + /// 获取或设置资源文件字节数组。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public byte[] MaterialFileBytes { get; set; } = Array.Empty(); + + /// + /// 获取或设置资源文件文件名。如果不指定将由系统自动生成。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string? MaterialFileName { get; set; } + + /// + /// 获取或设置资源文件 MIME 类型。如果不指定将由系统自动生成。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string? MaterialFileContentType { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/ThirdParty/OpenApiThirdPartyUploadPictureMaterialV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/ThirdParty/OpenApiThirdPartyUploadPictureMaterialV1Response.cs similarity index 82% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/ThirdParty/OpenApiThirdPartyUploadPictureMaterialV1Response.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/ThirdParty/OpenApiThirdPartyUploadPictureMaterialV1Response.cs index 82531c5b..b1c05c5d 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/ThirdParty/OpenApiThirdPartyUploadPictureMaterialV1Response.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/ThirdParty/OpenApiThirdPartyUploadPictureMaterialV1Response.cs @@ -1,9 +1,12 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Models +using System; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models { /// /// 表示 [POST] /v1/tp/upload_pic_material 接口的响应。 /// - public class OpenApiThirdPartyUploadPictureMaterialV1Response : ByteDanceMicroAppOpenApiResponse + [Obsolete("相关接口或字段于 2024-01-23 下线。")] + public class OpenApiThirdPartyUploadPictureMaterialV1Response : OpenApiLegacyResponseBase { public static class Types { diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/ThirdParty/POI/OpenApiThirdPartyPOIBaseQueryAMapV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/ThirdParty/POI/OpenApiThirdPartyPOIBaseQueryAMapV1Request.cs new file mode 100644 index 00000000..204a386c --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/ThirdParty/POI/OpenApiThirdPartyPOIBaseQueryAMapV1Request.cs @@ -0,0 +1,15 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [GET] /v1/tp/poi/base/query/amap 接口的请求。 + /// + public class OpenApiThirdPartyPOIBaseQueryAMapV1Request : DouyinMicroAppOpenApiRequest + { + /// + /// 获取或设置高德 POI ID。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string AMapId { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/ThirdParty/POI/OpenApiThirdPartyPOIBaseQueryAMapV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/ThirdParty/POI/OpenApiThirdPartyPOIBaseQueryAMapV1Response.cs similarity index 91% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/ThirdParty/POI/OpenApiThirdPartyPOIBaseQueryAMapV1Response.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/ThirdParty/POI/OpenApiThirdPartyPOIBaseQueryAMapV1Response.cs index 793a6875..583c4a72 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/ThirdParty/POI/OpenApiThirdPartyPOIBaseQueryAMapV1Response.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/ThirdParty/POI/OpenApiThirdPartyPOIBaseQueryAMapV1Response.cs @@ -1,9 +1,9 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Models +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models { /// /// 表示 [GET] /v1/tp/poi/base/query/amap 接口的响应。 /// - public class OpenApiThirdPartyPOIBaseQueryAMapV1Response : ByteDanceMicroAppOpenApiResponse + public class OpenApiThirdPartyPOIBaseQueryAMapV1Response : OpenApiLegacyResponseBase { public static class Types { @@ -14,14 +14,14 @@ public class Data /// [Newtonsoft.Json.JsonProperty("latitude")] [System.Text.Json.Serialization.JsonPropertyName("latitude")] - public double Latitude { get; set; } + public decimal Latitude { get; set; } /// /// 获取或设置经度。 /// [Newtonsoft.Json.JsonProperty("longitude")] [System.Text.Json.Serialization.JsonPropertyName("longitude")] - public double Longitude { get; set; } + public decimal Longitude { get; set; } /// /// 获取或设置抖音 POI ID。 diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/ThirdParty/POI/OpenApiThirdPartyPOISupplierMatchV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/ThirdParty/POI/OpenApiThirdPartyPOISupplierMatchV1Request.cs similarity index 92% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/ThirdParty/POI/OpenApiThirdPartyPOISupplierMatchV1Request.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/ThirdParty/POI/OpenApiThirdPartyPOISupplierMatchV1Request.cs index 31eb7e42..0e45d7a8 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/ThirdParty/POI/OpenApiThirdPartyPOISupplierMatchV1Request.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/ThirdParty/POI/OpenApiThirdPartyPOISupplierMatchV1Request.cs @@ -1,11 +1,11 @@ using System.Collections.Generic; -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Models +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models { /// /// 表示 [POST] /v1/tp/poi/supplier/match 接口的请求。 /// - public class OpenApiThirdPartyPOISupplierMatchV1Request : ByteDanceMicroAppOpenApiRequest + public class OpenApiThirdPartyPOISupplierMatchV1Request : DouyinMicroAppOpenApiRequest { public static class Types { @@ -16,14 +16,14 @@ public class MatchData /// [Newtonsoft.Json.JsonProperty("latitude")] [System.Text.Json.Serialization.JsonPropertyName("latitude")] - public double Latitude { get; set; } + public decimal Latitude { get; set; } /// /// 获取或设置经度。 /// [Newtonsoft.Json.JsonProperty("longitude")] [System.Text.Json.Serialization.JsonPropertyName("longitude")] - public double Longitude { get; set; } + public decimal Longitude { get; set; } /// /// 获取或设置 POI 名称。 diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/ThirdParty/POI/OpenApiThirdPartyPOISupplierMatchV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/ThirdParty/POI/OpenApiThirdPartyPOISupplierMatchV1Response.cs similarity index 82% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/ThirdParty/POI/OpenApiThirdPartyPOISupplierMatchV1Response.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/ThirdParty/POI/OpenApiThirdPartyPOISupplierMatchV1Response.cs index 61452438..7acc5312 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/ThirdParty/POI/OpenApiThirdPartyPOISupplierMatchV1Response.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/ThirdParty/POI/OpenApiThirdPartyPOISupplierMatchV1Response.cs @@ -1,9 +1,9 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Models +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models { /// /// 表示 [POST] /v1/tp/poi/supplier/match 接口的响应。 /// - public class OpenApiThirdPartyPOISupplierMatchV1Response : ByteDanceMicroAppOpenApiResponse + public class OpenApiThirdPartyPOISupplierMatchV1Response : OpenApiLegacyResponseBase { public static class Types { diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/ThirdParty/POI/OpenApiThirdPartyPOISupplierQueryMatchTaskV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/ThirdParty/POI/OpenApiThirdPartyPOISupplierQueryMatchTaskV1Request.cs similarity index 81% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/ThirdParty/POI/OpenApiThirdPartyPOISupplierQueryMatchTaskV1Request.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/ThirdParty/POI/OpenApiThirdPartyPOISupplierQueryMatchTaskV1Request.cs index fcb5a89f..5913ddf1 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/ThirdParty/POI/OpenApiThirdPartyPOISupplierQueryMatchTaskV1Request.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/ThirdParty/POI/OpenApiThirdPartyPOISupplierQueryMatchTaskV1Request.cs @@ -1,11 +1,11 @@ using System.Collections.Generic; -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Models +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models { /// /// 表示 [GET] /v1/tp/poi/supplier/query/match_task 接口的请求。 /// - public class OpenApiThirdPartyPOISupplierQueryMatchTaskV1Request : ByteDanceMicroAppOpenApiRequest + public class OpenApiThirdPartyPOISupplierQueryMatchTaskV1Request : DouyinMicroAppOpenApiRequest { /// /// 获取或设置匹配任务 ID 列表。 diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/ThirdParty/POI/OpenApiThirdPartyPOISupplierQueryMatchTaskV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/ThirdParty/POI/OpenApiThirdPartyPOISupplierQueryMatchTaskV1Response.cs similarity index 97% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/ThirdParty/POI/OpenApiThirdPartyPOISupplierQueryMatchTaskV1Response.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/ThirdParty/POI/OpenApiThirdPartyPOISupplierQueryMatchTaskV1Response.cs index d4585020..9f2133a0 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/ThirdParty/POI/OpenApiThirdPartyPOISupplierQueryMatchTaskV1Response.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/ThirdParty/POI/OpenApiThirdPartyPOISupplierQueryMatchTaskV1Response.cs @@ -1,9 +1,9 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Models +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models { /// /// 表示 [GET] /v1/tp/poi/supplier/query/match_task 接口的响应。 /// - public class OpenApiThirdPartyPOISupplierQueryMatchTaskV1Response : ByteDanceMicroAppOpenApiResponse + public class OpenApiThirdPartyPOISupplierQueryMatchTaskV1Response : OpenApiLegacyResponseBase { public static class Types { diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/ThirdParty/POI/OpenApiThirdPartyPOISupplierQueryMatchV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/ThirdParty/POI/OpenApiThirdPartyPOISupplierQueryMatchV1Request.cs similarity index 82% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/ThirdParty/POI/OpenApiThirdPartyPOISupplierQueryMatchV1Request.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/ThirdParty/POI/OpenApiThirdPartyPOISupplierQueryMatchV1Request.cs index dfff947f..32c89437 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/ThirdParty/POI/OpenApiThirdPartyPOISupplierQueryMatchV1Request.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/ThirdParty/POI/OpenApiThirdPartyPOISupplierQueryMatchV1Request.cs @@ -1,11 +1,11 @@ using System.Collections.Generic; -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Models +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models { /// /// 表示 [GET] /v1/tp/poi/supplier/query/match 接口的请求。 /// - public class OpenApiThirdPartyPOISupplierQueryMatchV1Request : ByteDanceMicroAppOpenApiRequest + public class OpenApiThirdPartyPOISupplierQueryMatchV1Request : DouyinMicroAppOpenApiRequest { /// /// 获取或设置外部商铺 ID 列表。 diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/ThirdParty/POI/OpenApiThirdPartyPOISupplierQueryMatchV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/ThirdParty/POI/OpenApiThirdPartyPOISupplierQueryMatchV1Response.cs similarity index 95% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/ThirdParty/POI/OpenApiThirdPartyPOISupplierQueryMatchV1Response.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/ThirdParty/POI/OpenApiThirdPartyPOISupplierQueryMatchV1Response.cs index 3212ea47..e7fa074a 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/ThirdParty/POI/OpenApiThirdPartyPOISupplierQueryMatchV1Response.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/ThirdParty/POI/OpenApiThirdPartyPOISupplierQueryMatchV1Response.cs @@ -1,9 +1,9 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Models +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models { /// /// 表示 [GET] /v1/tp/poi/supplier/query/match 接口的响应。 /// - public class OpenApiThirdPartyPOISupplierQueryMatchV1Response : ByteDanceMicroAppOpenApiResponse + public class OpenApiThirdPartyPOISupplierQueryMatchV1Response : OpenApiLegacyResponseBase { public static class Types { diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/ThirdParty/POI/OpenApiThirdPartyPOISupplierQueryV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/ThirdParty/POI/OpenApiThirdPartyPOISupplierQueryV1Request.cs new file mode 100644 index 00000000..419fcb89 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/ThirdParty/POI/OpenApiThirdPartyPOISupplierQueryV1Request.cs @@ -0,0 +1,15 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [GET] /v1/tp/poi/supplier/query 接口的请求。 + /// + public class OpenApiThirdPartyPOISupplierQueryV1Request : DouyinMicroAppOpenApiRequest + { + /// + /// 获取或设置外部商铺 ID。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string SupplierExternalId { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/ThirdParty/POI/OpenApiThirdPartyPOISupplierQueryV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/ThirdParty/POI/OpenApiThirdPartyPOISupplierQueryV1Response.cs similarity index 98% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/ThirdParty/POI/OpenApiThirdPartyPOISupplierQueryV1Response.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/ThirdParty/POI/OpenApiThirdPartyPOISupplierQueryV1Response.cs index 34ca2ddc..a2143f95 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/ThirdParty/POI/OpenApiThirdPartyPOISupplierQueryV1Response.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/ThirdParty/POI/OpenApiThirdPartyPOISupplierQueryV1Response.cs @@ -1,9 +1,9 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Models +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models { /// /// 表示 [GET] /v1/tp/poi/supplier/query 接口的响应。 /// - public class OpenApiThirdPartyPOISupplierQueryV1Response : ByteDanceMicroAppOpenApiResponse + public class OpenApiThirdPartyPOISupplierQueryV1Response : OpenApiLegacyResponseBase { public static class Types { diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/ThirdParty/POI/OpenApiThirdPartyPOISupplierSyncV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/ThirdParty/POI/OpenApiThirdPartyPOISupplierSyncV1Request.cs similarity index 96% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/ThirdParty/POI/OpenApiThirdPartyPOISupplierSyncV1Request.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/ThirdParty/POI/OpenApiThirdPartyPOISupplierSyncV1Request.cs index 620059d8..2d43f098 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/ThirdParty/POI/OpenApiThirdPartyPOISupplierSyncV1Request.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/ThirdParty/POI/OpenApiThirdPartyPOISupplierSyncV1Request.cs @@ -1,11 +1,11 @@ using System.Collections.Generic; -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Models +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models { /// /// 表示 [POST] /v1/tp/poi/supplier/sync 接口的请求。 /// - public class OpenApiThirdPartyPOISupplierSyncV1Request : ByteDanceMicroAppOpenApiRequest + public class OpenApiThirdPartyPOISupplierSyncV1Request : DouyinMicroAppOpenApiRequest { public static class Types { diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/ThirdParty/POI/OpenApiThirdPartyPOISupplierSyncV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/ThirdParty/POI/OpenApiThirdPartyPOISupplierSyncV1Response.cs new file mode 100644 index 00000000..1e27540f --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/ThirdParty/POI/OpenApiThirdPartyPOISupplierSyncV1Response.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [POST] /v1/tp/poi/supplier/sync 接口的响应。 + /// + public class OpenApiThirdPartyPOISupplierSyncV1Response : OpenApiLegacyResponseBase + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/ThirdParty/Template/OpenApiThirdPartyTemplateAddTemplateV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/ThirdParty/Template/OpenApiThirdPartyTemplateAddTemplateV1Request.cs new file mode 100644 index 00000000..a5cc9258 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/ThirdParty/Template/OpenApiThirdPartyTemplateAddTemplateV1Request.cs @@ -0,0 +1,18 @@ +using System; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [POST] /v1/tp/template/add_tpl 接口的请求。 + /// + [Obsolete("相关接口或字段于 2024-01-23 下线。")] + public class OpenApiThirdPartyTemplateAddTemplateV1Request : DouyinMicroAppOpenApiRequest + { + /// + /// 获取或设置草稿 ID。 + /// + [Newtonsoft.Json.JsonProperty("draft_id")] + [System.Text.Json.Serialization.JsonPropertyName("draft_id")] + public long DraftId { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/ThirdParty/Template/OpenApiThirdPartyTemplateAddTemplateV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/ThirdParty/Template/OpenApiThirdPartyTemplateAddTemplateV1Response.cs new file mode 100644 index 00000000..0ef7251a --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/ThirdParty/Template/OpenApiThirdPartyTemplateAddTemplateV1Response.cs @@ -0,0 +1,12 @@ +using System; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [POST] /v1/tp/template/add_tpl 接口的响应。 + /// + [Obsolete("相关接口或字段于 2024-01-23 下线。")] + public class OpenApiThirdPartyTemplateAddTemplateV1Response : OpenApiLegacyResponseBase + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/ThirdParty/Template/OpenApiThirdPartyTemplateDeleteTemplateV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/ThirdParty/Template/OpenApiThirdPartyTemplateDeleteTemplateV1Request.cs new file mode 100644 index 00000000..ecd4c5a2 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/ThirdParty/Template/OpenApiThirdPartyTemplateDeleteTemplateV1Request.cs @@ -0,0 +1,18 @@ +using System; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [POST] /v1/tp/template/del_tpl 接口的请求。 + /// + [Obsolete("相关接口或字段于 2024-01-23 下线。")] + public class OpenApiThirdPartyTemplateDeleteTemplateV1Request : DouyinMicroAppOpenApiRequest + { + /// + /// 获取或设置模板 ID。 + /// + [Newtonsoft.Json.JsonProperty("template_id")] + [System.Text.Json.Serialization.JsonPropertyName("template_id")] + public long TemplateId { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/ThirdParty/Template/OpenApiThirdPartyTemplateDeleteTemplateV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/ThirdParty/Template/OpenApiThirdPartyTemplateDeleteTemplateV1Response.cs new file mode 100644 index 00000000..ad7eb6e8 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/ThirdParty/Template/OpenApiThirdPartyTemplateDeleteTemplateV1Response.cs @@ -0,0 +1,12 @@ +using System; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [POST] /v1/tp/template/del_tpl 接口的响应。 + /// + [Obsolete("相关接口或字段于 2024-01-23 下线。")] + public class OpenApiThirdPartyTemplateDeleteTemplateV1Response : OpenApiLegacyResponseBase + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/ThirdParty/Template/OpenApiThirdPartyTemplateGetTemplateAppListV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/ThirdParty/Template/OpenApiThirdPartyTemplateGetTemplateAppListV1Request.cs new file mode 100644 index 00000000..d18112c6 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/ThirdParty/Template/OpenApiThirdPartyTemplateGetTemplateAppListV1Request.cs @@ -0,0 +1,12 @@ +using System; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [GET] /v1/tp/template/get_tpl_app_list 接口的请求。 + /// + [Obsolete("相关接口或字段于 2024-01-23 下线。")] + public class OpenApiThirdPartyTemplateGetTemplateAppListV1Request : DouyinMicroAppOpenApiRequest + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/ThirdParty/Template/OpenApiThirdPartyTemplateGetTemplateAppListV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/ThirdParty/Template/OpenApiThirdPartyTemplateGetTemplateAppListV1Response.cs similarity index 93% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/ThirdParty/Template/OpenApiThirdPartyTemplateGetTemplateAppListV1Response.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/ThirdParty/Template/OpenApiThirdPartyTemplateGetTemplateAppListV1Response.cs index 57205678..f0c9d482 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/ThirdParty/Template/OpenApiThirdPartyTemplateGetTemplateAppListV1Response.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/ThirdParty/Template/OpenApiThirdPartyTemplateGetTemplateAppListV1Response.cs @@ -1,9 +1,12 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Models +using System; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models { /// /// 表示 [GET] /v1/tp/template/get_tpl_app_list 接口的响应。 /// - public class OpenApiThirdPartyTemplateGetTemplateAppListV1Response : ByteDanceMicroAppOpenApiResponse + [Obsolete("相关接口或字段于 2024-01-23 下线。")] + public class OpenApiThirdPartyTemplateGetTemplateAppListV1Response : OpenApiLegacyResponseBase { public static class Types { diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/ThirdParty/Template/OpenApiThirdPartyTemplateGetTemplateListV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/ThirdParty/Template/OpenApiThirdPartyTemplateGetTemplateListV1Request.cs new file mode 100644 index 00000000..528d7c1a --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/ThirdParty/Template/OpenApiThirdPartyTemplateGetTemplateListV1Request.cs @@ -0,0 +1,12 @@ +using System; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models +{ + /// + /// 表示 [GET] /v1/tp/template/get_tpl_list 接口的请求。 + /// + [Obsolete("相关接口或字段于 2024-01-23 下线。")] + public class OpenApiThirdPartyTemplateGetTemplateListV1Request : DouyinMicroAppOpenApiRequest + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/ThirdParty/Template/OpenApiThirdPartyTemplateGetTemplateListV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/ThirdParty/Template/OpenApiThirdPartyTemplateGetTemplateListV1Response.cs similarity index 90% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/ThirdParty/Template/OpenApiThirdPartyTemplateGetTemplateListV1Response.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/ThirdParty/Template/OpenApiThirdPartyTemplateGetTemplateListV1Response.cs index fc66e424..d4838cd3 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/ThirdParty/Template/OpenApiThirdPartyTemplateGetTemplateListV1Response.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/ThirdParty/Template/OpenApiThirdPartyTemplateGetTemplateListV1Response.cs @@ -1,9 +1,12 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Models +using System; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models { /// /// 表示 [GET] /v1/tp/template/get_tpl_list 接口的响应。 /// - public class OpenApiThirdPartyTemplateGetTemplateListV1Response : ByteDanceMicroAppOpenApiResponse + [Obsolete("相关接口或字段于 2024-01-23 下线。")] + public class OpenApiThirdPartyTemplateGetTemplateListV1Response : OpenApiLegacyResponseBase { public static class Types { diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/__Abstractions/OpenApiLegacyResponseBase.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/__Abstractions/OpenApiLegacyResponseBase.cs new file mode 100644 index 00000000..50008dda --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Models/_Legacy/__Abstractions/OpenApiLegacyResponseBase.cs @@ -0,0 +1,15 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi +{ + public abstract class OpenApiLegacyResponseBase : DouyinMicroAppOpenApiResponse + { + /// + [Newtonsoft.Json.JsonProperty("errno")] + [System.Text.Json.Serialization.JsonPropertyName("errno")] + public override int ErrorNumber { get; set; } + + /// + [Newtonsoft.Json.JsonProperty("message")] + [System.Text.Json.Serialization.JsonPropertyName("message")] + public override string? ErrorMessage { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Settings/Credentials.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Settings/Credentials.cs new file mode 100644 index 00000000..549333b6 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/OpenApi/Settings/Credentials.cs @@ -0,0 +1,37 @@ +using System; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Settings +{ + public class Credentials + { + /// + /// 初始化客户端时 的副本。 + /// + public string ComponentAppId { get; } + + /// + /// 初始化客户端时 的副本。 + /// + public string ComponentAppSecret { get; } + + /// + /// 初始化客户端时 的副本。 + /// + public string? PushToken { get; } + + /// + /// 初始化客户端时 的副本。 + /// + public string? PushEncodingAESKey { get; set; } + + internal Credentials(DouyinMicroAppOpenApiClientOptions options) + { + if (options is null) throw new ArgumentNullException(nameof(options)); + + ComponentAppId = options.ComponentAppId; + ComponentAppSecret = options.ComponentAppSecret; + PushToken = options.PushToken; + PushEncodingAESKey = options.PushEncodingAESKey; + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/DouyinMicroAppProductApiClient.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/DouyinMicroAppProductApiClient.cs new file mode 100644 index 00000000..84066734 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/DouyinMicroAppProductApiClient.cs @@ -0,0 +1,104 @@ +using System; +using System.Net.Http; +using System.Threading; +using System.Threading.Tasks; +using Flurl.Http; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.ProductApi +{ + /// + /// 一个抖音小程序泛知识课程库 API HTTP 客户端。 + /// + public class DouyinMicroAppProductApiClient : CommonClientBase, ICommonClient + { + /// + /// 获取当前客户端使用的抖音小程序凭证。 + /// + public Settings.Credentials Credentials { get; } + + /// + /// 用指定的配置项初始化 类的新实例。 + /// + /// 配置项。 + public DouyinMicroAppProductApiClient(DouyinMicroAppProductApiClientOptions options) + : this(options, null) + { + } + + /// + /// + /// + /// + /// + /// + internal protected DouyinMicroAppProductApiClient(DouyinMicroAppProductApiClientOptions options, HttpClient? httpClient, bool disposeClient = true) + : base(httpClient, disposeClient) + { + if (options is null) throw new ArgumentNullException(nameof(options)); + + Credentials = new Settings.Credentials(options); + + FlurlClient.BaseUrl = options.Endpoints ?? DouyinMicroAppProductApiEndpoints.DEFAULT; + FlurlClient.WithTimeout(options.Timeout <= 0 ? Timeout.InfiniteTimeSpan : TimeSpan.FromMilliseconds(options.Timeout)); + } + + /// + /// 使用当前客户端生成一个新的 对象。 + /// + /// + /// + /// + /// + public IFlurlRequest CreateFlurlRequest(DouyinMicroAppProductApiRequest request, HttpMethod httpMethod, params object[] urlSegments) + { + IFlurlRequest flurlRequest = base.CreateFlurlRequest(request, httpMethod, urlSegments); + + if (request.AppId is null) + { + request.AppId = Credentials.AppId; + } + + return flurlRequest; + } + + /// + /// 异步发起请求。 + /// + /// + /// + /// + /// + /// + public async Task SendFlurlRequestAsync(IFlurlRequest flurlRequest, HttpContent? httpContent = null, CancellationToken cancellationToken = default) + where T : DouyinMicroAppProductApiResponse, new() + { + if (flurlRequest is null) throw new ArgumentNullException(nameof(flurlRequest)); + + using IFlurlResponse flurlResponse = await base.SendFlurlRequestAsync(flurlRequest, httpContent, cancellationToken).ConfigureAwait(false); + return await WrapFlurlResponseAsJsonAsync(flurlResponse, cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步发起请求。 + /// + /// + /// + /// + /// + /// + public async Task SendFlurlRequestAsJsonAsync(IFlurlRequest flurlRequest, object? data = null, CancellationToken cancellationToken = default) + where T : DouyinMicroAppProductApiResponse, new() + { + if (flurlRequest is null) throw new ArgumentNullException(nameof(flurlRequest)); + + bool isSimpleRequest = data is null || + flurlRequest.Verb == HttpMethod.Get || + flurlRequest.Verb == HttpMethod.Head || + flurlRequest.Verb == HttpMethod.Options; + using IFlurlResponse flurlResponse = isSimpleRequest ? + await base.SendFlurlRequestAsync(flurlRequest, null, cancellationToken) : + await base.SendFlurlRequestAsJsonAsync(flurlRequest, data, cancellationToken).ConfigureAwait(false); + return await WrapFlurlResponseAsJsonAsync(flurlResponse, cancellationToken).ConfigureAwait(false); + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/DouyinMicroAppProductApiClientBuilder.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/DouyinMicroAppProductApiClientBuilder.cs new file mode 100644 index 00000000..9edd2691 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/DouyinMicroAppProductApiClientBuilder.cs @@ -0,0 +1,94 @@ +using System; +using System.Collections.Generic; +using System.Net.Http; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.ProductApi +{ + /// + /// 用于构造 实例的构造器。 + /// + public partial class DouyinMicroAppProductApiClientBuilder : ICommonClientBuilder + { + private readonly DouyinMicroAppProductApiClientOptions _options; + private readonly IList> _configures; + private readonly IList _interceptors; + private HttpClient? _httpClient; + private bool? _disposeClient; + + private DouyinMicroAppProductApiClientBuilder(DouyinMicroAppProductApiClientOptions options) + { + _options = options; + _configures = new List>(); + _interceptors = new List(); + } + + ICommonClientBuilder ICommonClientBuilder.ConfigureSettings(Action configure) + { + return ConfigureSettings(configure); + } + + ICommonClientBuilder ICommonClientBuilder.UseInterceptor(HttpInterceptor interceptor) + { + return UseInterceptor(interceptor); + } + + ICommonClientBuilder ICommonClientBuilder.UseHttpClient(HttpClient httpClient, bool disposeClient) + { + return UseHttpClient(httpClient, disposeClient); + } + + public DouyinMicroAppProductApiClientBuilder ConfigureSettings(Action configure) + { + if (configure is null) throw new ArgumentNullException(nameof(configure)); + + _configures.Add(configure); + return this; + } + + public DouyinMicroAppProductApiClientBuilder UseInterceptor(HttpInterceptor interceptor) + { + if (interceptor is null) throw new ArgumentNullException(nameof(interceptor)); + + _interceptors.Add(interceptor); + return this; + } + + public DouyinMicroAppProductApiClientBuilder UseHttpClient(HttpClient httpClient, bool disposeClient = true) + { + if (httpClient is null) throw new ArgumentNullException(nameof(httpClient)); + + _httpClient = httpClient; + _disposeClient = disposeClient; + return this; + } + + public DouyinMicroAppProductApiClient Build() + { + DouyinMicroAppProductApiClient client = _disposeClient.HasValue + ? new DouyinMicroAppProductApiClient(_options, _httpClient, _disposeClient.Value) + : new DouyinMicroAppProductApiClient(_options, _httpClient); + + foreach (Action configure in _configures) + { + client.Configure(configure); + } + + foreach (HttpInterceptor interceptor in _interceptors) + { + client.Interceptors.Add(interceptor); + } + + return client; + } + } + + partial class DouyinMicroAppProductApiClientBuilder + { + public static DouyinMicroAppProductApiClientBuilder Create(DouyinMicroAppProductApiClientOptions options) + { + if (options is null) throw new ArgumentNullException(nameof(options)); + + return new DouyinMicroAppProductApiClientBuilder(options); + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/DouyinMicroAppProductApiClientOptions.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/DouyinMicroAppProductApiClientOptions.cs new file mode 100644 index 00000000..d898f8ef --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/DouyinMicroAppProductApiClientOptions.cs @@ -0,0 +1,30 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.ProductApi +{ + /// + /// 一个用于构造 时使用的配置项。 + /// + public class DouyinMicroAppProductApiClientOptions + { + /// + /// 获取或设置请求超时时间(单位:毫秒)。 + /// 默认值:30000 + /// + public int Timeout { get; set; } = 30 * 1000; + + /// + /// 获取或设置抖音小程序泛知识课程库 API 入口点。 + /// 默认值: + /// + public string Endpoints { get; set; } = DouyinMicroAppProductApiEndpoints.DEFAULT; + + /// + /// 获取或设置抖音小程序 AppId。 + /// + public string AppId { get; set; } = default!; + + /// + /// 获取或设置抖音小程序 AppSecret。 + /// + public string AppSecret { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/DouyinMicroAppProductApiEndpoints.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/DouyinMicroAppProductApiEndpoints.cs new file mode 100644 index 00000000..14f2e82f --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/DouyinMicroAppProductApiEndpoints.cs @@ -0,0 +1,18 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.ProductApi +{ + /// + /// 抖音小程序泛知识课程库 API 接口域名。 + /// + public static class DouyinMicroAppProductApiEndpoints + { + /// + /// 泛知识课程接口域名(默认)。 + /// + public const string DEFAULT = "https://developer-product.zijieapi.com/product/api"; + + /// + /// 泛知识课程接口沙盒环境域名。 + /// + public const string SANDBOX = "https://open-sandbox.douyin.com/product/api"; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/DouyinMicroAppProductApiEvent.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/DouyinMicroAppProductApiEvent.cs new file mode 100644 index 00000000..5bb24e34 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/DouyinMicroAppProductApiEvent.cs @@ -0,0 +1,29 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.ProductApi +{ + /// + /// 表示抖音小程序泛知识课程库 API 消息推送事件的基类。 + /// + public class DouyinMicroAppProductApiEvent : ICommonWebhookEvent + { + /// + /// 获取或设置通知类型。 + /// + [Newtonsoft.Json.JsonProperty("notice_type")] + [System.Text.Json.Serialization.JsonPropertyName("notice_type")] + public virtual int NoticeType { get; set; } + + /// + /// 获取或设置确认通知方身份唯一的标志。 + /// + [Newtonsoft.Json.JsonProperty("developer_flag")] + [System.Text.Json.Serialization.JsonPropertyName("developer_flag")] + public virtual string DeveloperFlag { get; set; } = default!; + + /// + /// 获取或设置自定义回调数据。 + /// + [Newtonsoft.Json.JsonProperty("callback_data")] + [System.Text.Json.Serialization.JsonPropertyName("callback_data")] + public virtual string? CallbackData { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/DouyinMicroAppProductApiRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/DouyinMicroAppProductApiRequest.cs new file mode 100644 index 00000000..48c7ad6b --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/DouyinMicroAppProductApiRequest.cs @@ -0,0 +1,29 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.ProductApi +{ + /// + /// 抖音小程序泛知识课程库 API 请求的基类。 + /// + public abstract class DouyinMicroAppProductApiRequest : CommonRequestBase, ICommonRequest + { + /// + /// 获取或设置抖音小程序的 AppId。如果不指定将使用构造 时的 参数。 + /// + [Newtonsoft.Json.JsonProperty("appid")] + [System.Text.Json.Serialization.JsonPropertyName("appid")] + public virtual string? AppId { get; set; } + + /// + /// 获取或设置抖音小程序的 AccessToken。 + /// + [Newtonsoft.Json.JsonProperty("access_token")] + [System.Text.Json.Serialization.JsonPropertyName("access_token")] + public virtual string? AccessToken { get; set; } + + /// + /// 获取或设置沙盒环境自动审核参数。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public virtual string? SandboxCheckType { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/DouyinMicroAppProductApiResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/DouyinMicroAppProductApiResponse.cs new file mode 100644 index 00000000..0dfb3b1e --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/DouyinMicroAppProductApiResponse.cs @@ -0,0 +1,42 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.ProductApi +{ + /// + /// 抖音小程序泛知识课程库 API 响应的基类。 + /// + public abstract class DouyinMicroAppProductApiResponse : CommonResponseBase, ICommonResponse + { + /// + /// 获取抖音小程序 API 返回的错误码。 + /// + [Newtonsoft.Json.JsonProperty("err_no")] + [System.Text.Json.Serialization.JsonPropertyName("err_no")] + public virtual int ErrorNumber { get; set; } + + /// + /// 获取抖音小程序 API 返回的错误描述。 + /// + [Newtonsoft.Json.JsonProperty("err_msg")] + [System.Text.Json.Serialization.JsonPropertyName("err_msg")] + public virtual string? ErrorMessage { get; set; } + + /// + /// 获取抖音小程序 API 返回的日志 ID。 + /// + [Newtonsoft.Json.JsonProperty("log_id")] + [System.Text.Json.Serialization.JsonPropertyName("log_id")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] + public virtual string? LogId { get; set; } + + /// + /// 获取一个值,该值指示调用抖音小程序 API 是否成功。 + /// + /// (即 HTTP 状态码为 200,且 值为 0) + /// + /// + /// + public override bool IsSuccessful() + { + return GetRawStatus() == 200 && ErrorNumber == 0; + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/Events/ProductEvent.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Events/ProductEvent.cs similarity index 83% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/Events/ProductEvent.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Events/ProductEvent.cs index 87802616..b5e15237 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/Events/ProductEvent.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Events/ProductEvent.cs @@ -1,12 +1,15 @@ using System.Collections.Generic; -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.ProductApi.Events +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.ProductApi.Events { /// /// 表示商品事件的数据。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/pan-knowledge/sync-callback-url + /// + /// REF:
+ /// + ///
///
- public class ProductEvent : ByteDanceMicroAppProductApiEvent + public class ProductEvent : DouyinMicroAppProductApiEvent { /// /// 获取或设置商品 ID。 diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/Events/ProductFulfilmentEvent.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Events/ProductFulfilmentEvent.cs similarity index 85% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/Events/ProductFulfilmentEvent.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Events/ProductFulfilmentEvent.cs index 4ee76e21..27181d91 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/Events/ProductFulfilmentEvent.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Events/ProductFulfilmentEvent.cs @@ -1,12 +1,15 @@ using System.Collections.Generic; -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.ProductApi.Events +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.ProductApi.Events { /// /// 表示商品履约内容事件的数据。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/pan-knowledge/sync-callback-url + /// + /// REF:
+ /// + ///
///
- public class ProductFulfilmentEvent : ByteDanceMicroAppProductApiEvent + public class ProductFulfilmentEvent : DouyinMicroAppProductApiEvent { /// /// 获取或设置商品 ID。 diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/Events/ProductQualificationEvent.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Events/ProductQualificationEvent.cs similarity index 82% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/Events/ProductQualificationEvent.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Events/ProductQualificationEvent.cs index 1ba423f3..b3aefc82 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/Events/ProductQualificationEvent.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Events/ProductQualificationEvent.cs @@ -1,12 +1,15 @@ using System.Collections.Generic; -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.ProductApi.Events +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.ProductApi.Events { /// /// 表示商品资质事件的数据。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/pan-knowledge/sync-callback-url + /// + /// REF:
+ /// + ///
///
- public class ProductQualificationEvent : ByteDanceMicroAppProductApiEvent + public class ProductQualificationEvent : DouyinMicroAppProductApiEvent { /// /// 获取或设置审核主体 ID。 diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/Events/ProductResourceEvent.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Events/ProductResourceEvent.cs similarity index 80% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/Events/ProductResourceEvent.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Events/ProductResourceEvent.cs index 7acf0aa3..d583fe5a 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/Events/ProductResourceEvent.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Events/ProductResourceEvent.cs @@ -1,12 +1,15 @@ using System.Collections.Generic; -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.ProductApi.Events +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.ProductApi.Events { /// /// 表示商品资源事件的数据。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/pan-knowledge/sync-callback-url + /// + /// REF:
+ /// + ///
///
- public class ProductResourceEvent : ByteDanceMicroAppProductApiEvent + public class ProductResourceEvent : DouyinMicroAppProductApiEvent { /// /// 获取或设置资源路径。 diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Extensions/DouyinMicroAppProductApiClientEventExtensions.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Extensions/DouyinMicroAppProductApiClientEventExtensions.cs new file mode 100644 index 00000000..9f543237 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Extensions/DouyinMicroAppProductApiClientEventExtensions.cs @@ -0,0 +1,53 @@ +using System; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.ProductApi +{ + /// + /// 为 提供回调通知事件的扩展方法。 + /// + public static partial class DouyinMicroAppProductApiClientEventExtensions + { + /// + /// 从 JSON 反序列化得到 对象。 + /// + /// + /// + /// + /// + public static TEvent DeserializeEventFromJson(this DouyinMicroAppProductApiClient client, string webhookJson) + where TEvent : DouyinMicroAppProductApiEvent, new() + { + return InnerDeserializeEventFromJson(client, webhookJson); + } + + /// + /// 从 JSON 反序列化得到 对象。 + /// + /// + /// + /// + public static DouyinMicroAppProductApiEvent DeserializeEventFromJson(this DouyinMicroAppProductApiClient client, string webhookJson) + { + return InnerDeserializeEventFromJson(client, webhookJson); + } + } + + partial class DouyinMicroAppProductApiClientEventExtensions + { + private static TEvent InnerDeserializeEventFromJson(DouyinMicroAppProductApiClient client, string webhookJson) + where TEvent : DouyinMicroAppProductApiEvent + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (webhookJson is null) throw new ArgumentNullException(webhookJson); + + try + { + return client.JsonSerializer.Deserialize(webhookJson); + } + catch (Exception ex) + { + throw new DouyinMicroAppException("Failed to deserialize event data. Please see the inner exception for more details.", ex); + } + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Extensions/DouyinMicroAppProductApiClientExecuteCallbackExtensions.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Extensions/DouyinMicroAppProductApiClientExecuteCallbackExtensions.cs new file mode 100644 index 00000000..a7426095 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Extensions/DouyinMicroAppProductApiClientExecuteCallbackExtensions.cs @@ -0,0 +1,33 @@ +using System; +using System.Net.Http; +using System.Threading; +using System.Threading.Tasks; +using Flurl.Http; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.ProductApi +{ + public static class DouyinMicroAppProductApiClientExecuteCallbackExtensions + { + /// + /// 异步调用 [POST] /sync_callback_url 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteProductSyncCallbackUrlAsync(this DouyinMicroAppProductApiClient client, Models.ProductSyncCallbackUrlRequest 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, "sync_callback_url"); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Extensions/DouyinMicroAppProductApiClientExecuteProductExtensions.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Extensions/DouyinMicroAppProductApiClientExecuteProductExtensions.cs new file mode 100644 index 00000000..2ac507b0 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Extensions/DouyinMicroAppProductApiClientExecuteProductExtensions.cs @@ -0,0 +1,207 @@ +using System; +using System.Net.Http; +using System.Threading; +using System.Threading.Tasks; +using Flurl.Http; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.ProductApi +{ + public static class DouyinMicroAppProductApiClientExecuteProductExtensions + { + /// + /// 异步调用 [POST] /add 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteProductAddAsync(this DouyinMicroAppProductApiClient client, Models.ProductAddRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (request.Product.CommonProductInfo.AppId is null) + request.Product.CommonProductInfo.AppId = client.Credentials.AppId; + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "add") + .WithHeader("Aweme-Check-Type", request.SandboxCheckType); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /modify 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteProductModifyAsync(this DouyinMicroAppProductApiClient client, Models.ProductModifyRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (request.Product.CommonProductInfo.AppId is null) + request.Product.CommonProductInfo.AppId = client.Credentials.AppId; + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "modify") + .WithHeader("Aweme-Check-Type", request.SandboxCheckType); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /modify_status 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteProductModifyStatusAsync(this DouyinMicroAppProductApiClient client, Models.ProductModifyStatusRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (request.ProductStatusInfo.AppId is null) + request.ProductStatusInfo.AppId = client.Credentials.AppId; + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "modify_status") + .WithHeader("Aweme-Check-Type", request.SandboxCheckType); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /modify_no_audit 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteProductModifyNoAuditAsync(this DouyinMicroAppProductApiClient client, Models.ProductModifyNoAuditRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (request.ProductInfo is not null) + { + if (request.ProductInfo.AppId is null) + request.ProductInfo.AppId = client.Credentials.AppId; + } + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "modify_no_audit") + .WithHeader("Aweme-Check-Type", request.SandboxCheckType); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /query 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteProductQueryAsync(this DouyinMicroAppProductApiClient client, Models.ProductQueryRequest 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, "query"); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /query_review 接口。 + /// + /// REF:
+ /// + ///
+ /// + ///
+ /// + /// + /// + /// + public static async Task ExecuteProductQueryReviewAsync(this DouyinMicroAppProductApiClient client, Models.ProductQueryReviewRequest 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, "query_review"); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /query_template_info 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteProductQueryTemplateInfoAsync(this DouyinMicroAppProductApiClient client, Models.ProductQueryTemplateInfoRequest 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, "query_template_info"); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /query_class_info 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteProductQueryClassInfoAsync(this DouyinMicroAppProductApiClient client, Models.ProductQueryClassInfoRequest 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, "query_class_info"); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Extensions/DouyinMicroAppProductApiClientExecuteQualificationExtensions.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Extensions/DouyinMicroAppProductApiClientExecuteQualificationExtensions.cs new file mode 100644 index 00000000..cc9f5eb6 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Extensions/DouyinMicroAppProductApiClientExecuteQualificationExtensions.cs @@ -0,0 +1,79 @@ +using System; +using System.Net.Http; +using System.Threading; +using System.Threading.Tasks; +using Flurl.Http; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.ProductApi +{ + public static class DouyinMicroAppProductApiClientExecuteQualificationExtensions + { + /// + /// 异步调用 [POST] /add_qualification 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteProductAddQualificationAsync(this DouyinMicroAppProductApiClient client, Models.ProductAddQualificationRequest 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, "add_qualification") + .WithHeader("Aweme-Check-Type", request.SandboxCheckType); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /modify_qualification 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteProductModifyQualificationAsync(this DouyinMicroAppProductApiClient client, Models.ProductModifyQualificationRequest 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, "modify_qualification") + .WithHeader("Aweme-Check-Type", request.SandboxCheckType); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /query_qualification 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteProductQueryQualificationAsync(this DouyinMicroAppProductApiClient client, Models.ProductQueryQualificationRequest 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, "query_qualification"); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Extensions/DouyinMicroAppProductApiClientExecuteRefundRuleExtensions.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Extensions/DouyinMicroAppProductApiClientExecuteRefundRuleExtensions.cs new file mode 100644 index 00000000..634215a7 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Extensions/DouyinMicroAppProductApiClientExecuteRefundRuleExtensions.cs @@ -0,0 +1,57 @@ +using System; +using System.Net.Http; +using System.Threading; +using System.Threading.Tasks; +using Flurl.Http; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.ProductApi +{ + public static class DouyinMicroAppProductApiClientExecuteRefundRuleExtensions + { + /// + /// 异步调用 [POST] /query_refund_rule_meta 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteProductQueryRefundRuleMetaAsync(this DouyinMicroAppProductApiClient client, Models.ProductQueryRefundRuleMetaRequest 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, "query_refund_rule_meta") + .WithHeader("Aweme-Check-Type", request.SandboxCheckType); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /modify_refund_rule 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteProductModifyRefundRuleAsync(this DouyinMicroAppProductApiClient client, Models.ProductModifyRefundRuleRequest 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, "modify_refund_rule") + .WithHeader("Aweme-Check-Type", request.SandboxCheckType); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Extensions/DouyinMicroAppProductApiClientExecuteResourceExtensions.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Extensions/DouyinMicroAppProductApiClientExecuteResourceExtensions.cs new file mode 100644 index 00000000..6ee10234 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Extensions/DouyinMicroAppProductApiClientExecuteResourceExtensions.cs @@ -0,0 +1,55 @@ +using System; +using System.Net.Http; +using System.Threading; +using System.Threading.Tasks; +using Flurl.Http; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.ProductApi +{ + public static class DouyinMicroAppProductApiClientExecuteResourceExtensions + { + /// + /// 异步调用 [POST] /upload_resource 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteProductUploadResourceAsync(this DouyinMicroAppProductApiClient client, Models.ProductUploadResourceRequest 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, "upload_resource"); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /query_resource_status 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteProductQueryResourceStatusAsync(this DouyinMicroAppProductApiClient client, Models.ProductQueryResourceStatusRequest 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, "query_resource_status"); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Models/Callback/ProductSyncCallbackUrlRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Models/Callback/ProductSyncCallbackUrlRequest.cs new file mode 100644 index 00000000..8c870fe3 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Models/Callback/ProductSyncCallbackUrlRequest.cs @@ -0,0 +1,22 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.ProductApi.Models +{ + /// + /// 表示 [POST] /sync_callback_url 接口的请求。 + /// + public class ProductSyncCallbackUrlRequest : DouyinMicroAppProductApiRequest + { + /// + /// 获取或设置接受通知的 URL。 + /// + [Newtonsoft.Json.JsonProperty("callback_url")] + [System.Text.Json.Serialization.JsonPropertyName("callback_url")] + public string CallbackUrl { get; set; } = string.Empty; + + /// + /// 获取或设置确认通知方身份唯一标识。 + /// + [Newtonsoft.Json.JsonProperty("developer_flag")] + [System.Text.Json.Serialization.JsonPropertyName("developer_flag")] + public string DeveloperFlag { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Models/Callback/ProductSyncCallbackUrlResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Models/Callback/ProductSyncCallbackUrlResponse.cs new file mode 100644 index 00000000..bb7c6a23 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Models/Callback/ProductSyncCallbackUrlResponse.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.ProductApi.Models +{ + /// + /// 表示 [POST] /sync_callback_url 接口的响应。 + /// + public class ProductSyncCallbackUrlResponse : DouyinMicroAppProductApiResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Models/Product/ProductAddRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Models/Product/ProductAddRequest.cs new file mode 100644 index 00000000..d982f369 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Models/Product/ProductAddRequest.cs @@ -0,0 +1,438 @@ +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.ProductApi.Models +{ + /// + /// 表示 [POST] /add 接口的请求。 + /// + public class ProductAddRequest : DouyinMicroAppProductApiRequest + { + public static class Types + { + public class Product + { + public static class Types + { + public class CommonProductInfo + { + public static class Types + { + public class PriceInfo + { + /// + /// 获取或设置价格粒度单位。 + /// + [Newtonsoft.Json.JsonProperty("unit")] + [System.Text.Json.Serialization.JsonPropertyName("unit")] + public string Unit { get; set; } = string.Empty; + + /// + /// 获取或设置价格(单位:分)。 + /// + [Newtonsoft.Json.JsonProperty("price")] + [System.Text.Json.Serialization.JsonPropertyName("price")] + public int Price { get; set; } + + /// + /// 获取或设置实际成交价格(单位:分)。 + /// + [Newtonsoft.Json.JsonProperty("real_price")] + [System.Text.Json.Serialization.JsonPropertyName("real_price")] + public int? RealPrice { get; set; } + + /// + /// 获取或设置当前服务的实际成交价格区间最低价格(单位:分)。 + /// + [Newtonsoft.Json.JsonProperty("range_min_price")] + [System.Text.Json.Serialization.JsonPropertyName("range_min_price")] + public int? RangeMinPrice { get; set; } + + /// + /// 获取或设置当前服务的实际成交价格区间最高价格(单位:分)。 + /// + [Newtonsoft.Json.JsonProperty("range_max_price")] + [System.Text.Json.Serialization.JsonPropertyName("range_max_price")] + public int? RangeMaxPrice { get; set; } + } + + public class PathInfo + { + /// + /// 获取或设置跳转的页面。 + /// + [Newtonsoft.Json.JsonProperty("path")] + [System.Text.Json.Serialization.JsonPropertyName("path")] + public string PagePath { get; set; } = string.Empty; + + /// + /// 获取或设置页面参数字典。 + /// + [Newtonsoft.Json.JsonProperty("query")] + [System.Text.Json.Serialization.JsonPropertyName("query")] + public IDictionary? QueryMap { get; set; } + } + + public class ProductFulfilment + { + public static class Types + { + public class FulfillmentContent + { + /// + /// 获取或设置履约内容名称。 + /// + [Newtonsoft.Json.JsonProperty("name")] + [System.Text.Json.Serialization.JsonPropertyName("name")] + public string Name { get; set; } = string.Empty; + + /// + /// 获取或设置文字内容。 + /// + [Newtonsoft.Json.JsonProperty("text")] + [System.Text.Json.Serialization.JsonPropertyName("text")] + public string? Text { get; set; } + + /// + /// 获取或设置履约文件资源路径。 + /// + [Newtonsoft.Json.JsonProperty("fulfillment_uri")] + [System.Text.Json.Serialization.JsonPropertyName("fulfillment_uri")] + public string? FulfillmentPath { get; set; } + } + } + + /// + /// 获取或设置履约详情。 + /// + [Newtonsoft.Json.JsonProperty("fulfillment_content")] + [System.Text.Json.Serialization.JsonPropertyName("fulfillment_content")] + public Types.FulfillmentContent FulfillmentContent { get; set; } = new Types.FulfillmentContent(); + + /// + /// 获取或设置履约类型。 + /// + [Newtonsoft.Json.JsonProperty("fulfillment_type")] + [System.Text.Json.Serialization.JsonPropertyName("fulfillment_type")] + public int FulfillmentType { get; set; } + } + + public class ProductDetail + { + public static class Types + { + public class RichText + { + /// + /// 获取或设置富文本字符串。 + /// + [Newtonsoft.Json.JsonProperty("text")] + [System.Text.Json.Serialization.JsonPropertyName("text")] + public string? String { get; set; } + + /// + /// 获取或设置富文本资源路径。 + /// + [Newtonsoft.Json.JsonProperty("uri")] + [System.Text.Json.Serialization.JsonPropertyName("uri")] + public string? FilePath { get; set; } + } + } + + /// + /// 获取或设置文字。 + /// + [Newtonsoft.Json.JsonProperty("text")] + [System.Text.Json.Serialization.JsonPropertyName("text")] + public string? Text { get; set; } + + /// + /// 获取或设置图片资源路径。 + /// + [Newtonsoft.Json.JsonProperty("img_uri")] + [System.Text.Json.Serialization.JsonPropertyName("img_uri")] + public string? ImagePath { get; set; } + + /// + /// 获取或设置富文本内容。 + /// + [Newtonsoft.Json.JsonProperty("rich_text")] + [System.Text.Json.Serialization.JsonPropertyName("rich_text")] + public Types.RichText? RichText { get; set; } + } + + public class AnchorInfo + { + public static class Types + { + public class VideoAnchorInfo + { + /// + /// 获取或设置锚点文案。 + /// + [Newtonsoft.Json.JsonProperty("anchor_title")] + [System.Text.Json.Serialization.JsonPropertyName("anchor_title")] + public string? AnchorTitle { get; set; } + } + } + + /// + /// 获取或设置视频锚点信息。 + /// + [Newtonsoft.Json.JsonProperty("video_anchor_info")] + [System.Text.Json.Serialization.JsonPropertyName("video_anchor_info")] + public Types.VideoAnchorInfo? VideoAnchorInfo { get; set; } + } + } + + /// + /// 获取或设置小程序 AppId。如果不指定将使用构造 时的 参数。 + /// + [Newtonsoft.Json.JsonProperty("appid")] + [System.Text.Json.Serialization.JsonPropertyName("appid")] + public string? AppId { get; set; } + + /// + /// 获取或设置一级商品分类。 + /// + [Newtonsoft.Json.JsonProperty("first_class")] + [System.Text.Json.Serialization.JsonPropertyName("first_class")] + public int FirstClassId { get; set; } + + /// + /// 获取或设置二级商品分类。 + /// + [Newtonsoft.Json.JsonProperty("second_class")] + [System.Text.Json.Serialization.JsonPropertyName("second_class")] + public int SecondClassId { get; set; } + + /// + /// 获取或设置商品名称。 + /// + [Newtonsoft.Json.JsonProperty("title")] + [System.Text.Json.Serialization.JsonPropertyName("title")] + public string Title { get; set; } = string.Empty; + + /// + /// 获取或设置商品资质资源路径列表。 + /// + [Newtonsoft.Json.JsonProperty("qualification_uris")] + [System.Text.Json.Serialization.JsonPropertyName("qualification_uris")] + public IList QualificationPathList { get; set; } = new List(); + + /// + /// 获取或设置购物须知。 + /// + [Newtonsoft.Json.JsonProperty("purchase_precaution")] + [System.Text.Json.Serialization.JsonPropertyName("purchase_precaution")] + public string PurchasePrecaution { get; set; } = string.Empty; + + /// + /// 获取或设置行业类目。 + /// + [Newtonsoft.Json.JsonProperty("industry_type")] + [System.Text.Json.Serialization.JsonPropertyName("industry_type")] + public int IndustryType { get; set; } + + /// + /// 获取或设置价格信息。 + /// + [Newtonsoft.Json.JsonProperty("price_info")] + [System.Text.Json.Serialization.JsonPropertyName("price_info")] + public Types.PriceInfo PriceInfo { get; set; } = new Types.PriceInfo(); + + /// + /// 获取或设置路径信息列表。 + /// + [Newtonsoft.Json.JsonProperty("path_info_lst")] + [System.Text.Json.Serialization.JsonPropertyName("path_info_lst")] + public IList? PathInfoList { get; set; } + + /// + /// 获取或设置商品履约列表。 + /// + [Newtonsoft.Json.JsonProperty("product_fulfillment_lst")] + [System.Text.Json.Serialization.JsonPropertyName("product_fulfillment_lst")] + public IList? ProductFulfillmentList { get; set; } + + /// + /// 获取或设置商品详情列表。 + /// + [Newtonsoft.Json.JsonProperty("product_detail_lst")] + [System.Text.Json.Serialization.JsonPropertyName("product_detail_lst")] + public IList? ProductDetailLst { get; set; } = new List(); + + /// + /// 获取或设置锚点信息。 + /// + [Newtonsoft.Json.JsonProperty("anchor_info")] + [System.Text.Json.Serialization.JsonPropertyName("anchor_info")] + public Types.AnchorInfo? AnchorInfo { get; set; } + + /// + /// 获取或设置开发者回调数据。 + /// + [Newtonsoft.Json.JsonProperty("callback_data")] + [System.Text.Json.Serialization.JsonPropertyName("callback_data")] + public string? CallbackData { get; set; } + + /// + /// 获取或设置图片文件资源路径。 + /// + [Newtonsoft.Json.JsonProperty("product_img_uri")] + [System.Text.Json.Serialization.JsonPropertyName("product_img_uri")] + public string? ProductImagePath { get; set; } + } + + public class CourseInfo + { + public static class Types + { + public class RefundLabel + { + /// + /// 获取或设置退款标签类型。 + /// + [Newtonsoft.Json.JsonProperty("type")] + [System.Text.Json.Serialization.JsonPropertyName("type")] + public int Type { get; set; } = 3; + + /// + /// 获取或设置「xx天未学可退」标签信息。 + /// + [Newtonsoft.Json.JsonProperty("day_before_use_info")] + [System.Text.Json.Serialization.JsonPropertyName("day_before_use_info")] + public DayBeforeUseInfo? DayBeforeUseInfo { get; set; } + + /// + /// 获取或设置「学习进度不足xx%可退」标签信息。 + /// + [Newtonsoft.Json.JsonProperty("rest_not_learn_info")] + [System.Text.Json.Serialization.JsonPropertyName("rest_not_learn_info")] + public RestNotLearnInfo? RestNotLearnInfo { get; set; } + + /// + /// 获取或设置固定退款标签 ID。 + /// + [Newtonsoft.Json.JsonProperty("fixed")] + [System.Text.Json.Serialization.JsonPropertyName("fixed")] + public int FixedId { get; set; } + } + + public class UseLabel + { + /// + /// 获取或设置有效期字符串(格式:yyyy-MM-dd)。 + /// + [Newtonsoft.Json.JsonProperty("valid_date")] + [System.Text.Json.Serialization.JsonPropertyName("valid_date")] + public string? ValidDateString { get; set; } + } + + public class DayBeforeUseInfo + { + /// + /// 获取或设置天数。 + /// + [Newtonsoft.Json.JsonProperty("day")] + [System.Text.Json.Serialization.JsonPropertyName("day")] + public int Day { get; set; } + } + + public class RestNotLearnInfo + { + /// + /// 获取或设置比例(范围:0~100)。 + /// + [Newtonsoft.Json.JsonProperty("rest_percent")] + [System.Text.Json.Serialization.JsonPropertyName("rest_percent")] + public int RestPercent { get; set; } + } + } + + /// + /// 获取或设置老师 ID。 + /// + [Newtonsoft.Json.JsonProperty("teacher_id")] + [System.Text.Json.Serialization.JsonPropertyName("teacher_id")] + public string? TeacherId { get; set; } + + /// + /// 获取或设置机构 ID。 + /// + [Newtonsoft.Json.JsonProperty("institution_id")] + [System.Text.Json.Serialization.JsonPropertyName("institution_id")] + public string? InstitutionId { get; set; } + + /// + /// 获取或设置课程节数。 + /// + [Newtonsoft.Json.JsonProperty("course_num")] + [System.Text.Json.Serialization.JsonPropertyName("course_num")] + public int CourseCount { get; set; } + + /// + /// 获取或设置退款标签信息。 + /// + [Newtonsoft.Json.JsonProperty("refund_label")] + [System.Text.Json.Serialization.JsonPropertyName("refund_label")] + public Types.RefundLabel? RefundLabel { get; set; } + + /// + /// 获取或设置使用标签信息。 + /// + [Newtonsoft.Json.JsonProperty("use_label")] + [System.Text.Json.Serialization.JsonPropertyName("use_label")] + public Types.UseLabel? UseLabel { get; set; } + + /// + /// 获取或设置课程开始时间毫秒级时间戳。 + /// + [Newtonsoft.Json.JsonProperty("start_timestamp")] + [System.Text.Json.Serialization.JsonPropertyName("start_timestamp")] + public long? StartTimeMilliseconds { get; set; } + + /// + /// 获取或设置课程结束时间毫秒级时间戳。 + /// + [Newtonsoft.Json.JsonProperty("end_timestamp")] + [System.Text.Json.Serialization.JsonPropertyName("end_timestamp")] + public long? EndTimeMilliseconds { get; set; } + } + } + + /// + /// 获取或设置商品通用参数信息。 + /// + [Newtonsoft.Json.JsonProperty("common_product_params")] + [System.Text.Json.Serialization.JsonPropertyName("common_product_params")] + public Types.CommonProductInfo CommonProductInfo { get; set; } = new Types.CommonProductInfo(); + + /// + /// 获取或设置课程参数信息。 + /// + [Newtonsoft.Json.JsonProperty("course_params")] + [System.Text.Json.Serialization.JsonPropertyName("course_params")] + public Types.CourseInfo? CourseInfo { get; set; } + } + } + + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public override string? AppId { get; set; } + + /// + /// 获取或设置商品类型。 + /// + [Newtonsoft.Json.JsonProperty("product_type")] + [System.Text.Json.Serialization.JsonPropertyName("product_type")] + public int ProductType { get; set; } + + /// + /// 获取或设置商品信息。 + /// + [Newtonsoft.Json.JsonProperty("product")] + [System.Text.Json.Serialization.JsonPropertyName("product")] + public Types.Product Product { get; set; } = new Types.Product(); + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Models/Product/ProductAddResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Models/Product/ProductAddResponse.cs new file mode 100644 index 00000000..738f190f --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Models/Product/ProductAddResponse.cs @@ -0,0 +1,35 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.ProductApi.Models +{ + /// + /// 表示 [POST] /add 接口的响应。 + /// + public class ProductAddResponse : DouyinMicroAppProductApiResponse + { + public static class Types + { + public class Data + { + /// + /// 获取或设置商品 ID。 + /// + [Newtonsoft.Json.JsonProperty("product_id")] + [System.Text.Json.Serialization.JsonPropertyName("product_id")] + public long ProductId { get; set; } + + /// + /// 获取或设置审核 ID。 + /// + [Newtonsoft.Json.JsonProperty("audit_id")] + [System.Text.Json.Serialization.JsonPropertyName("audit_id")] + public string? AuditId { get; set; } + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Models/Product/ProductModifyNoAuditRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Models/Product/ProductModifyNoAuditRequest.cs new file mode 100644 index 00000000..869ce6cf --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Models/Product/ProductModifyNoAuditRequest.cs @@ -0,0 +1,76 @@ +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.ProductApi.Models +{ + /// + /// 表示 [POST] /modify_no_audit 接口的请求。 + /// + public class ProductModifyNoAuditRequest : DouyinMicroAppProductApiRequest + { + public static class Types + { + public class ProductInfo + { + public static class Types + { + public class PageInfo + { + /// + /// 获取或设置小程序页面路径。 + /// + [Newtonsoft.Json.JsonProperty("path")] + [System.Text.Json.Serialization.JsonPropertyName("path")] + public string PagePath { get; set; } = string.Empty; + + /// + /// 获取或设置小程序页面查询参数字典。 + /// + [Newtonsoft.Json.JsonProperty("query")] + [System.Text.Json.Serialization.JsonPropertyName("query")] + public IDictionary QueryMap { get; set; } = new Dictionary(); + } + } + + /// + /// 获取或设置小程序 AppId。如果不指定将使用构造 时的 参数。 + /// + [Newtonsoft.Json.JsonProperty("appid")] + [System.Text.Json.Serialization.JsonPropertyName("appid")] + public string AppId { get; set; } = string.Empty; + + /// + /// 获取或设置小程序页面信息列表。 + /// + [Newtonsoft.Json.JsonProperty("path_info_lst")] + [System.Text.Json.Serialization.JsonPropertyName("path_info_lst")] + public IList PageList { get; set; } = new List(); + } + } + + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public override string? AppId { get; set; } + + /// + /// 获取或设置商品 ID。 + /// + [Newtonsoft.Json.JsonProperty("product_id")] + [System.Text.Json.Serialization.JsonPropertyName("product_id")] + public long ProductId { get; set; } + + /// + /// 获取或设置商品类型。 + /// + [Newtonsoft.Json.JsonProperty("product_type")] + [System.Text.Json.Serialization.JsonPropertyName("product_type")] + public int ProductType { get; set; } + + /// + /// 获取或设置商品信息。 + /// + [Newtonsoft.Json.JsonProperty("product")] + [System.Text.Json.Serialization.JsonPropertyName("product")] + public Types.ProductInfo ProductInfo { get; set; } = new Types.ProductInfo(); + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Models/Product/ProductModifyNoAuditResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Models/Product/ProductModifyNoAuditResponse.cs new file mode 100644 index 00000000..406fb11f --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Models/Product/ProductModifyNoAuditResponse.cs @@ -0,0 +1,28 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.ProductApi.Models +{ + /// + /// 表示 [POST] /modify_no_audit 接口的响应。 + /// + public class ProductModifyNoAuditResponse : DouyinMicroAppProductApiResponse + { + public static class Types + { + public class Data + { + /// + /// 获取或设置审核 ID。 + /// + [Newtonsoft.Json.JsonProperty("audit_id")] + [System.Text.Json.Serialization.JsonPropertyName("audit_id")] + public string? AuditId { get; set; } + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Models/Product/ProductModifyRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Models/Product/ProductModifyRequest.cs new file mode 100644 index 00000000..9181c261 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Models/Product/ProductModifyRequest.cs @@ -0,0 +1,91 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.ProductApi.Models +{ + /// + /// 表示 [POST] /modify 接口的请求。 + /// + public class ProductModifyRequest : DouyinMicroAppProductApiRequest + { + public static class Types + { + public class Product : ProductAddRequest.Types.Product + { + public new static class Types + { + public class CommonProductInfo : ProductAddRequest.Types.Product.Types.CommonProductInfo + { + public new static class Types + { + public class PriceInfo : ProductAddRequest.Types.Product.Types.CommonProductInfo.Types.PriceInfo + { + } + + public class PathInfo : ProductAddRequest.Types.Product.Types.CommonProductInfo.Types.PathInfo + { + } + + public class ProductFulfilment : ProductAddRequest.Types.Product.Types.CommonProductInfo.Types.ProductFulfilment + { + public new static class Types + { + public class FulfillmentContent : ProductAddRequest.Types.Product.Types.CommonProductInfo.Types.ProductFulfilment.Types.FulfillmentContent + { + } + } + } + + public class ProductDetail : ProductAddRequest.Types.Product.Types.CommonProductInfo.Types.ProductDetail + { + public new static class Types + { + public class RichText : ProductAddRequest.Types.Product.Types.CommonProductInfo.Types.ProductDetail.Types.RichText + { + } + } + } + + public class AnchorInfo : ProductAddRequest.Types.Product.Types.CommonProductInfo.Types.AnchorInfo + { + public new static class Types + { + public class VideoAnchorInfo : ProductAddRequest.Types.Product.Types.CommonProductInfo.Types.AnchorInfo.Types.VideoAnchorInfo + { + } + } + } + } + } + + public class CourseInfo : ProductAddRequest.Types.Product.Types.CourseInfo + { + } + } + } + } + + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public override string? AppId { get; set; } + + /// + /// 获取或设置商品 ID。 + /// + [Newtonsoft.Json.JsonProperty("product_id")] + [System.Text.Json.Serialization.JsonPropertyName("product_id")] + public long ProductId { get; set; } + + /// + /// 获取或设置商品类型。 + /// + [Newtonsoft.Json.JsonProperty("product_type")] + [System.Text.Json.Serialization.JsonPropertyName("product_type")] + public int ProductType { get; set; } + + /// + /// 获取或设置商品信息。 + /// + [Newtonsoft.Json.JsonProperty("product")] + [System.Text.Json.Serialization.JsonPropertyName("product")] + public Types.Product Product { get; set; } = new Types.Product(); + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Models/Product/ProductModifyResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Models/Product/ProductModifyResponse.cs new file mode 100644 index 00000000..f8eb320e --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Models/Product/ProductModifyResponse.cs @@ -0,0 +1,28 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.ProductApi.Models +{ + /// + /// 表示 [POST] /modify 接口的响应。 + /// + public class ProductModifyResponse : DouyinMicroAppProductApiResponse + { + public static class Types + { + public class Data + { + /// + /// 获取或设置审核 ID。 + /// + [Newtonsoft.Json.JsonProperty("audit_id")] + [System.Text.Json.Serialization.JsonPropertyName("audit_id")] + public string? AuditId { get; set; } + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Models/Product/ProductModifyStatusRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Models/Product/ProductModifyStatusRequest.cs new file mode 100644 index 00000000..140248dd --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Models/Product/ProductModifyStatusRequest.cs @@ -0,0 +1,47 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.ProductApi.Models +{ + /// + /// 表示 [POST] /modify_status 接口的请求。 + /// + public class ProductModifyStatusRequest : DouyinMicroAppProductApiRequest + { + public static class Types + { + public class ProductStatusInfo + { + /// + /// 获取或设置小程序 AppId。如果不指定将使用构造 时的 参数。 + /// + [Newtonsoft.Json.JsonProperty("appid")] + [System.Text.Json.Serialization.JsonPropertyName("appid")] + public string? AppId { get; set; } + + /// + /// 获取或设置商品 ID。 + /// + [Newtonsoft.Json.JsonProperty("product_id")] + [System.Text.Json.Serialization.JsonPropertyName("product_id")] + public long? ProductId { get; set; } + + /// + /// 获取或设置商品状态。 + /// + [Newtonsoft.Json.JsonProperty("status")] + [System.Text.Json.Serialization.JsonPropertyName("status")] + public int Status { get; set; } + } + } + + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public override string? AppId { get; set; } + + /// + /// 获取或设置商品状态信息。 + /// + [Newtonsoft.Json.JsonProperty("product_status_info")] + [System.Text.Json.Serialization.JsonPropertyName("product_status_info")] + public Types.ProductStatusInfo ProductStatusInfo { get; set; } = new Types.ProductStatusInfo(); + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Models/Product/ProductModifyStatusResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Models/Product/ProductModifyStatusResponse.cs new file mode 100644 index 00000000..942faef3 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Models/Product/ProductModifyStatusResponse.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.ProductApi.Models +{ + /// + /// 表示 [POST] /modify_status 接口的响应。 + /// + public class ProductModifyStatusResponse : DouyinMicroAppProductApiResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Models/Product/ProductQueryClassInfoRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Models/Product/ProductQueryClassInfoRequest.cs new file mode 100644 index 00000000..6e543e1e --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Models/Product/ProductQueryClassInfoRequest.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.ProductApi.Models +{ + /// + /// 表示 [POST] /query_class_info 接口的请求。 + /// + public class ProductQueryClassInfoRequest : DouyinMicroAppProductApiRequest + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Models/Product/ProductQueryClassInfoResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Models/Product/ProductQueryClassInfoResponse.cs new file mode 100644 index 00000000..5ab80b94 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Models/Product/ProductQueryClassInfoResponse.cs @@ -0,0 +1,124 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.ProductApi.Models +{ + /// + /// 表示 [POST] /query_class_info 接口的响应。 + /// + public class ProductQueryClassInfoResponse : DouyinMicroAppProductApiResponse + { + public static class Types + { + public class Data + { + public static class Types + { + public class ProductClassInfo + { + public static class Types + { + public class ClassInfoDetail + { + /// + /// 获取或设置二级类目 ID。 + /// + [Newtonsoft.Json.JsonProperty("second_class_id")] + [System.Text.Json.Serialization.JsonPropertyName("second_class_id")] + public int SecondClassId { get; set; } + + /// + /// 获取或设置二级类目名称。 + /// + [Newtonsoft.Json.JsonProperty("second_class_name")] + [System.Text.Json.Serialization.JsonPropertyName("second_class_name")] + public string SecondClassName { get; set; } = default!; + + /// + /// 获取或设置分类定义。 + /// + [Newtonsoft.Json.JsonProperty("class_definition")] + [System.Text.Json.Serialization.JsonPropertyName("class_definition")] + public string? ClassDefinition { get; set; } + + /// + /// 获取或设置教师资格证要求。 + /// + [Newtonsoft.Json.JsonProperty("teacher_qualification_certificate")] + [System.Text.Json.Serialization.JsonPropertyName("teacher_qualification_certificate")] + public string? TeacherQualificationCertificate { get; set; } + + /// + /// 获取或设置获取或设置专业认证要求。 + /// + [Newtonsoft.Json.JsonProperty("professional_certification")] + [System.Text.Json.Serialization.JsonPropertyName("professional_certification")] + public string? ProfessionalCertification { get; set; } + + /// + /// 获取或设置专业性学历要求。 + /// + [Newtonsoft.Json.JsonProperty("professional_education")] + [System.Text.Json.Serialization.JsonPropertyName("professional_education")] + public string? ProfessionalEducation { get; set; } + + /// + /// 获取或设置行业资质提醒。 + /// + [Newtonsoft.Json.JsonProperty("qualification_tip")] + [System.Text.Json.Serialization.JsonPropertyName("qualification_tip")] + public string? QualificationTips { get; set; } + + /// + /// 获取或设置特殊提醒。 + /// + [Newtonsoft.Json.JsonProperty("special_tip")] + [System.Text.Json.Serialization.JsonPropertyName("special_tip")] + public string? SpecialTips { get; set; } + + /// + /// 获取或设置文档链接。 + /// + [Newtonsoft.Json.JsonProperty("document_link")] + [System.Text.Json.Serialization.JsonPropertyName("document_link")] + public string? DocumentLink { get; set; } + } + } + + /// + /// 获取或设置已入库的课程信息列表。 + /// + [Newtonsoft.Json.JsonProperty("class_info_detail_list")] + [System.Text.Json.Serialization.JsonPropertyName("class_info_detail_list")] + public Types.ClassInfoDetail[] ClassInfoDetailList { get; set; } = default!; + + /// + /// 获取或设置一级类目 ID。 + /// + [Newtonsoft.Json.JsonProperty("first_class_id")] + [System.Text.Json.Serialization.JsonPropertyName("first_class_id")] + public int FirstClassId { get; set; } + + /// + /// 获取或设置一级类目名称。 + /// + [Newtonsoft.Json.JsonProperty("first_class_name")] + [System.Text.Json.Serialization.JsonPropertyName("first_class_name")] + public string FirstClassName { get; set; } = default!; + } + } + + /// + /// 获取或设置课程类目信息列表。 + /// + [Newtonsoft.Json.JsonProperty("product_class_info_list")] + [System.Text.Json.Serialization.JsonPropertyName("product_class_info_list")] + public Types.ProductClassInfo[] ProductClassInfoList { get; set; } = default!; + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Models/Product/ProductQueryRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Models/Product/ProductQueryRequest.cs new file mode 100644 index 00000000..14084dfa --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Models/Product/ProductQueryRequest.cs @@ -0,0 +1,17 @@ +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.ProductApi.Models +{ + /// + /// 表示 [POST] /query 接口的请求。 + /// + public class ProductQueryRequest : DouyinMicroAppProductApiRequest + { + /// + /// 获取或设置商品 ID 列表。 + /// + [Newtonsoft.Json.JsonProperty("product_ids")] + [System.Text.Json.Serialization.JsonPropertyName("product_ids")] + public IList ProductIdList { get; set; } = new List(); + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Models/Product/ProductQueryResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Models/Product/ProductQueryResponse.cs new file mode 100644 index 00000000..bce94163 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Models/Product/ProductQueryResponse.cs @@ -0,0 +1,363 @@ +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.ProductApi.Models +{ + /// + /// 表示 [POST] /query 接口的响应。 + /// + public class ProductQueryResponse : DouyinMicroAppProductApiResponse + { + public static class Types + { + public class Data + { + public static class Types + { + public class Product + { + public static class Types + { + public class ProductInfo + { + public static class Types + { + public class CommonProductInfo + { + public static class Types + { + public class PriceInfo + { + /// + /// 获取或设置价格粒度单位。 + /// + [Newtonsoft.Json.JsonProperty("unit")] + [System.Text.Json.Serialization.JsonPropertyName("unit")] + public string Unit { get; set; } = default!; + + /// + /// 获取或设置价格(单位:分)。 + /// + [Newtonsoft.Json.JsonProperty("price")] + [System.Text.Json.Serialization.JsonPropertyName("price")] + public int Price { get; set; } + + /// + /// 获取或设置实际成交价格(单位:分)。 + /// + [Newtonsoft.Json.JsonProperty("real_price")] + [System.Text.Json.Serialization.JsonPropertyName("real_price")] + public int? RealPrice { get; set; } + } + + public class PathInfo + { + /// + /// 获取或设置跳转的页面。 + /// + [Newtonsoft.Json.JsonProperty("path")] + [System.Text.Json.Serialization.JsonPropertyName("path")] + public string PagePath { get; set; } = default!; + + /// + /// 获取或设置页面参数字典。 + /// + [Newtonsoft.Json.JsonProperty("query")] + [System.Text.Json.Serialization.JsonPropertyName("query")] + public IDictionary? QueryMap { get; set; } + } + + public class ProductFulfilment + { + public static class Types + { + public class FulfillmentContent + { + /// + /// 获取或设置履约内容名称。 + /// + [Newtonsoft.Json.JsonProperty("name")] + [System.Text.Json.Serialization.JsonPropertyName("name")] + public string Name { get; set; } = default!; + + /// + /// 获取或设置文字内容。 + /// + [Newtonsoft.Json.JsonProperty("text")] + [System.Text.Json.Serialization.JsonPropertyName("text")] + public string? Text { get; set; } + + /// + /// 获取或设置履约文件资源 URL。 + /// + [Newtonsoft.Json.JsonProperty("fulfillment_url")] + [System.Text.Json.Serialization.JsonPropertyName("fulfillment_url")] + public string? FulfillmentUrl { get; set; } + } + } + + /// + /// 获取或设置履约详情。 + /// + [Newtonsoft.Json.JsonProperty("fulfillment_content")] + [System.Text.Json.Serialization.JsonPropertyName("fulfillment_content")] + public Types.FulfillmentContent FulfillmentContent { get; set; } = new Types.FulfillmentContent(); + + /// + /// 获取或设置履约类型。 + /// + [Newtonsoft.Json.JsonProperty("fulfillment_type")] + [System.Text.Json.Serialization.JsonPropertyName("fulfillment_type")] + public int FulfillmentType { get; set; } + } + + public class ProductDetail + { + public static class Types + { + public class RichText + { + /// + /// 获取或设置富文本字符串。 + /// + [Newtonsoft.Json.JsonProperty("text")] + [System.Text.Json.Serialization.JsonPropertyName("text")] + public string? String { get; set; } + + /// + /// 获取或设置富文本资源 URL。 + /// + [Newtonsoft.Json.JsonProperty("url")] + [System.Text.Json.Serialization.JsonPropertyName("url")] + public string? Url { get; set; } + } + } + + /// + /// 获取或设置文字。 + /// + [Newtonsoft.Json.JsonProperty("text")] + [System.Text.Json.Serialization.JsonPropertyName("text")] + public string? Text { get; set; } + + /// + /// 获取或设置图片资源 URL。 + /// + [Newtonsoft.Json.JsonProperty("img_url")] + [System.Text.Json.Serialization.JsonPropertyName("img_url")] + public string? ImageUrl { get; set; } + + /// + /// 获取或设置富文本内容列表。 + /// + [Newtonsoft.Json.JsonProperty("rich_text")] + [System.Text.Json.Serialization.JsonPropertyName("rich_text")] + public Types.RichText[]? RichTextList { get; set; } + } + + public class AnchorInfo + { + public static class Types + { + public class VideoAnchorInfo + { + /// + /// 获取或设置锚点文案。 + /// + [Newtonsoft.Json.JsonProperty("anchor_title")] + [System.Text.Json.Serialization.JsonPropertyName("anchor_title")] + public string? AnchorTitle { get; set; } + } + } + + /// + /// 获取或设置视频锚点信息。 + /// + [Newtonsoft.Json.JsonProperty("video_anchor_info")] + [System.Text.Json.Serialization.JsonPropertyName("video_anchor_info")] + public Types.VideoAnchorInfo? VideoAnchorInfo { get; set; } + } + } + + /// + /// 获取或设置小程序 AppId。 + /// + [Newtonsoft.Json.JsonProperty("appid")] + [System.Text.Json.Serialization.JsonPropertyName("appid")] + public string AppId { get; set; } = default!; + + /// + /// 获取或设置一级商品分类。 + /// + [Newtonsoft.Json.JsonProperty("first_class")] + [System.Text.Json.Serialization.JsonPropertyName("first_class")] + public int FirstClassId { get; set; } + + /// + /// 获取或设置二级商品分类。 + /// + [Newtonsoft.Json.JsonProperty("second_class")] + [System.Text.Json.Serialization.JsonPropertyName("second_class")] + public int SecondClassId { get; set; } + + /// + /// 获取或设置商品名称。 + /// + [Newtonsoft.Json.JsonProperty("title")] + [System.Text.Json.Serialization.JsonPropertyName("title")] + public string Title { get; set; } = default!; + + /// + /// 获取或设置商品资质资源 URL 列表。 + /// + [Newtonsoft.Json.JsonProperty("qualification_urls")] + [System.Text.Json.Serialization.JsonPropertyName("qualification_urls")] + public string[] QualificationUrlList { get; set; } = default!; + + /// + /// 获取或设置购物须知。 + /// + [Newtonsoft.Json.JsonProperty("purchase_precaution")] + [System.Text.Json.Serialization.JsonPropertyName("purchase_precaution")] + public string PurchasePrecaution { get; set; } = default!; + + /// + /// 获取或设置行业类目。 + /// + [Newtonsoft.Json.JsonProperty("industry_type")] + [System.Text.Json.Serialization.JsonPropertyName("industry_type")] + public int IndustryType { get; set; } + + /// + /// 获取或设置价格信息。 + /// + [Newtonsoft.Json.JsonProperty("price_info")] + [System.Text.Json.Serialization.JsonPropertyName("price_info")] + public Types.PriceInfo PriceInfo { get; set; } = new Types.PriceInfo(); + + /// + /// 获取或设置路径信息列表。 + /// + [Newtonsoft.Json.JsonProperty("path_info_lst")] + [System.Text.Json.Serialization.JsonPropertyName("path_info_lst")] + public Types.PathInfo[]? PathInfoList { get; set; } + + /// + /// 获取或设置商品履约列表。 + /// + [Newtonsoft.Json.JsonProperty("product_fulfillment_lst")] + [System.Text.Json.Serialization.JsonPropertyName("product_fulfillment_lst")] + public Types.ProductFulfilment[]? ProductFulfillmentList { get; set; } + + /// + /// 获取或设置商品详情列表。 + /// + [Newtonsoft.Json.JsonProperty("product_detail_lst")] + [System.Text.Json.Serialization.JsonPropertyName("product_detail_lst")] + public Types.ProductDetail[]? ProductDetailLst { get; set; } = default!; + + /// + /// 获取或设置锚点信息。 + /// + [Newtonsoft.Json.JsonProperty("anchor_info")] + [System.Text.Json.Serialization.JsonPropertyName("anchor_info")] + public Types.AnchorInfo? AnchorInfo { get; set; } + } + + public class CourseInfo + { + /// + /// 获取或设置老师介绍。 + /// + [Newtonsoft.Json.JsonProperty("teacher_introduction")] + [System.Text.Json.Serialization.JsonPropertyName("teacher_introduction")] + public string? TeacherIntroduction { get; set; } + } + + public class ProductStatusInfo + { + /// + /// 获取或设置商品状态。 + /// + [Newtonsoft.Json.JsonProperty("status")] + [System.Text.Json.Serialization.JsonPropertyName("status")] + public int Status { get; set; } + + /// + /// 获取或设置下架或审核不通过原因。 + /// + [Newtonsoft.Json.JsonProperty("reject_reason")] + [System.Text.Json.Serialization.JsonPropertyName("reject_reason")] + public string? RejectReason { get; set; } + } + } + + /// + /// 获取或设置商品 ID。 + /// + [Newtonsoft.Json.JsonProperty("product_id")] + [System.Text.Json.Serialization.JsonPropertyName("product_id")] + public long ProductId { get; set; } + + /// + /// 获取或设置商品类型。 + /// + [Newtonsoft.Json.JsonProperty("product_type")] + [System.Text.Json.Serialization.JsonPropertyName("product_type")] + public int ProductType { get; set; } + + /// + /// 获取或设置商品通用参数信息。 + /// + [Newtonsoft.Json.JsonProperty("common_product_info")] + [System.Text.Json.Serialization.JsonPropertyName("common_product_info")] + public Types.CommonProductInfo CommonProductInfo { get; set; } = default!; + + /// + /// 获取或设置课程参数信息。 + /// + [Newtonsoft.Json.JsonProperty("course_info")] + [System.Text.Json.Serialization.JsonPropertyName("course_info")] + public Types.CourseInfo? CourseInfo { get; set; } + + /// + /// 获取或设置商品状态信息。 + /// + [Newtonsoft.Json.JsonProperty("product_status")] + [System.Text.Json.Serialization.JsonPropertyName("product_status")] + public Types.ProductStatusInfo? ProductStatusInfo { get; set; } = default!; + } + } + + /// + /// 获取或设置已上架的商品信息。 + /// + [Newtonsoft.Json.JsonProperty("product_on_shelf")] + [System.Text.Json.Serialization.JsonPropertyName("product_on_shelf")] + public Types.ProductInfo? ProductOnShelf { get; set; } + + /// + /// 获取或设置审核中的商品信息。 + /// + [Newtonsoft.Json.JsonProperty("product_reviewing")] + [System.Text.Json.Serialization.JsonPropertyName("product_reviewing")] + public Types.ProductInfo? ProductReviewing { get; set; } + } + } + + /// + /// 获取或设置商品列表。 + /// + [Newtonsoft.Json.JsonProperty("products")] + [System.Text.Json.Serialization.JsonPropertyName("products")] + public Types.Product[] ProductList { get; set; } = default!; + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Models/Product/ProductQueryReviewRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Models/Product/ProductQueryReviewRequest.cs new file mode 100644 index 00000000..f2def8bf --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Models/Product/ProductQueryReviewRequest.cs @@ -0,0 +1,25 @@ +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.ProductApi.Models +{ + /// + /// 表示 [POST] /query_review 接口的请求。 + /// + public class ProductQueryReviewRequest : DouyinMicroAppProductApiRequest + { + /// + /// 获取或设置商品 ID 列表。 + /// + [Newtonsoft.Json.JsonProperty("product_ids")] + [System.Text.Json.Serialization.JsonPropertyName("product_ids")] + public IList ProductIdList { get; set; } = new List(); + + /// + /// 获取或设置查询类型。 + /// 默认值:1 + /// + [Newtonsoft.Json.JsonProperty("query_type")] + [System.Text.Json.Serialization.JsonPropertyName("query_type")] + public int QueryType { get; set; } = 1; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Models/Product/ProductQueryReviewResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Models/Product/ProductQueryReviewResponse.cs new file mode 100644 index 00000000..d9479847 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Models/Product/ProductQueryReviewResponse.cs @@ -0,0 +1,108 @@ +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.ProductApi.Models +{ + /// + /// 表示 [POST] /query_review 接口的响应。 + /// + public class ProductQueryReviewResponse : DouyinMicroAppProductApiResponse + { + public static class Types + { + public class Data + { + public static class Types + { + public class ProductReview + { + public static class Types + { + public class CourseReview + { + /// + /// 获取或设置审核状态。 + /// + [Newtonsoft.Json.JsonProperty("status")] + [System.Text.Json.Serialization.JsonPropertyName("status")] + public int Status { get; set; } + + /// + /// 获取或设置下架或审核不通过原因。 + /// + [Newtonsoft.Json.JsonProperty("reject_reason")] + [System.Text.Json.Serialization.JsonPropertyName("reject_reason")] + public string? RejectReason { get; set; } + + /// + /// 获取或设置最近一次审核 ID。 + /// + [Newtonsoft.Json.JsonProperty("latest_audit_id")] + [System.Text.Json.Serialization.JsonPropertyName("latest_audit_id")] + public string? LatestAuditId { get; set; } + } + + public class FulfillmentReview + { + /// + /// 获取或设置审核状态。 + /// + [Newtonsoft.Json.JsonProperty("status")] + [System.Text.Json.Serialization.JsonPropertyName("status")] + public int Status { get; set; } + + /// + /// 获取或设置下架或审核不通过原因。 + /// + [Newtonsoft.Json.JsonProperty("reject_reason")] + [System.Text.Json.Serialization.JsonPropertyName("reject_reason")] + public string? RejectReason { get; set; } + + /// + /// 获取或设置最近一次审核 ID。 + /// + [Newtonsoft.Json.JsonProperty("latest_audit_id")] + [System.Text.Json.Serialization.JsonPropertyName("latest_audit_id")] + public string? LatestAuditId { get; set; } + + /// + /// 获取或设置履约文件资源路径。 + /// + [Newtonsoft.Json.JsonProperty("fulfillment_uri")] + [System.Text.Json.Serialization.JsonPropertyName("fulfillment_uri")] + public string? FulfillmentPath { get; set; } + } + } + + /// + /// 获取或设置课程审核信息。 + /// + [Newtonsoft.Json.JsonProperty("course")] + [System.Text.Json.Serialization.JsonPropertyName("course")] + public Types.CourseReview? CourseReview { get; set; } + + /// + /// 获取或设置履约审核信息列表。 + /// + [Newtonsoft.Json.JsonProperty("fulfillment")] + [System.Text.Json.Serialization.JsonPropertyName("fulfillment")] + public Types.FulfillmentReview[]? FulfillmentReviewList { get; set; } = default!; + } + } + + /// + /// 获取或设置商品审核信息字典。 + /// + [Newtonsoft.Json.JsonProperty("products_review")] + [System.Text.Json.Serialization.JsonPropertyName("products_review")] + public IDictionary? ProductReviewMap { get; set; } + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Models/Product/ProductQueryTemplateInfoRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Models/Product/ProductQueryTemplateInfoRequest.cs new file mode 100644 index 00000000..87e7139b --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Models/Product/ProductQueryTemplateInfoRequest.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.ProductApi.Models +{ + /// + /// 表示 [POST] /query_template_info 接口的请求。 + /// + public class ProductQueryTemplateInfoRequest : DouyinMicroAppProductApiRequest + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Models/Product/ProductQueryTemplateInfoResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Models/Product/ProductQueryTemplateInfoResponse.cs new file mode 100644 index 00000000..b8d7a8f8 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Models/Product/ProductQueryTemplateInfoResponse.cs @@ -0,0 +1,36 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.ProductApi.Models +{ + /// + /// 表示 [POST] /query_template_info 接口的响应。 + /// + public class ProductQueryTemplateInfoResponse : DouyinMicroAppProductApiResponse + { + public static class Types + { + public class Data + { + /// + /// 获取或设置商品 ID。 + /// + [Newtonsoft.Json.JsonProperty("product_id")] + [System.Text.Json.Serialization.JsonPropertyName("product_id")] + [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)] + public long ProductId { get; set; } + + /// + /// 获取或设置审核主体 ID。 + /// + [Newtonsoft.Json.JsonProperty("object_id")] + [System.Text.Json.Serialization.JsonPropertyName("object_id")] + public string ObejctId { get; set; } = default!; + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Models/Qualification/ProductAddQualificationRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Models/Qualification/ProductAddQualificationRequest.cs new file mode 100644 index 00000000..c1cbe200 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Models/Qualification/ProductAddQualificationRequest.cs @@ -0,0 +1,279 @@ +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.ProductApi.Models +{ + /// + /// 表示 [POST] /add_qualification 接口的请求。 + /// + public class ProductAddQualificationRequest : DouyinMicroAppProductApiRequest + { + public static class Types + { + public class Qualification + { + public static class Types + { + public class TeacherQualification + { + public static class Types + { + public class DouyinAuthInfo + { + /// + /// 获取或设置抖音开放平台 ClientKey。 + /// + [Newtonsoft.Json.JsonProperty("client_key")] + [System.Text.Json.Serialization.JsonPropertyName("client_key")] + public string ClientKey { get; set; } = string.Empty; + + /// + /// 获取或设置抖音开放平台用户的 OpenId。 + /// + [Newtonsoft.Json.JsonProperty("open_id")] + [System.Text.Json.Serialization.JsonPropertyName("open_id")] + public string OpenId { get; set; } = string.Empty; + } + } + + /// + /// 获取或设置姓名。 + /// + [Newtonsoft.Json.JsonProperty("name")] + [System.Text.Json.Serialization.JsonPropertyName("name")] + public string Name { get; set; } = string.Empty; + + /// + /// 获取或设置一级类目 ID。 + /// + [Newtonsoft.Json.JsonProperty("first_class")] + [System.Text.Json.Serialization.JsonPropertyName("first_class")] + public int? FirstClassId { get; set; } + + /// + /// 获取或设置二级类目 ID。 + /// + [Newtonsoft.Json.JsonProperty("second_class")] + [System.Text.Json.Serialization.JsonPropertyName("second_class")] + public int? SecondClassId { get; set; } + + /// + /// 获取或设置三级类目 ID。 + /// + [Newtonsoft.Json.JsonProperty("third_class")] + [System.Text.Json.Serialization.JsonPropertyName("third_class")] + public int? ThirdClassId { get; set; } + + /// + /// 获取或设置身份证号码。 + /// + [Newtonsoft.Json.JsonProperty("ID_number")] + [System.Text.Json.Serialization.JsonPropertyName("ID_number")] + public string IdCardNumber { get; set; } = string.Empty; + + /// + /// 获取或设置身份证照片资源路径列表。 + /// + [Newtonsoft.Json.JsonProperty("ID_img_uris")] + [System.Text.Json.Serialization.JsonPropertyName("ID_img_uris")] + public IList IdCardImagePathList { get; set; } = new List(); + + /// + /// 获取或设置照片资源路径。 + /// + [Newtonsoft.Json.JsonProperty("img_uri")] + [System.Text.Json.Serialization.JsonPropertyName("img_uri")] + public string? ImagePath { get; set; } + + /// + /// 获取或设置昵称。 + /// + [Newtonsoft.Json.JsonProperty("nickname")] + [System.Text.Json.Serialization.JsonPropertyName("nickname")] + public string Nickname { get; set; } = string.Empty; + + /// + /// 获取或设置简介。 + /// + [Newtonsoft.Json.JsonProperty("introduction")] + [System.Text.Json.Serialization.JsonPropertyName("introduction")] + public string Introduction { get; set; } = string.Empty; + + /// + /// 获取或设置材料列表。 + /// + [Newtonsoft.Json.JsonProperty("qualification_info_lst")] + [System.Text.Json.Serialization.JsonPropertyName("qualification_info_lst")] + public IList MaterialList { get; set; } = new List(); + + /// + /// 获取或设置抖音授权信息列表。 + /// + [Newtonsoft.Json.JsonProperty("douyin_auth_info")] + [System.Text.Json.Serialization.JsonPropertyName("douyin_auth_info")] + public IList? DouyinAuthInfoList { get; set; } + } + + public class InstitutionQualification + { + /// + /// 获取或设置名称。 + /// + [Newtonsoft.Json.JsonProperty("name")] + [System.Text.Json.Serialization.JsonPropertyName("name")] + public string Name { get; set; } = string.Empty; + + /// + /// 获取或设置简介。 + /// + [Newtonsoft.Json.JsonProperty("institution_introduction")] + [System.Text.Json.Serialization.JsonPropertyName("institution_introduction")] + public string Introduction { get; set; } = string.Empty; + + /// + /// 获取或设置公司名称。 + /// + [Newtonsoft.Json.JsonProperty("company_name")] + [System.Text.Json.Serialization.JsonPropertyName("company_name")] + public string CompanyIntroduction { get; set; } = string.Empty; + + /// + /// 获取或设置机构名称。 + /// + [Newtonsoft.Json.JsonProperty("institution_record_name")] + [System.Text.Json.Serialization.JsonPropertyName("institution_record_name")] + public string InstitutionRecordName { get; set; } = string.Empty; + + /// + /// 获取或设置机构场景类型。 + /// + [Newtonsoft.Json.JsonProperty("institution_scene_type")] + [System.Text.Json.Serialization.JsonPropertyName("institution_scene_type")] + public string InstitutionSceneType { get; set; } = string.Empty; + + /// + /// 获取或设置机构主体类型。 + /// + [Newtonsoft.Json.JsonProperty("institution_subject_type")] + [System.Text.Json.Serialization.JsonPropertyName("institution_subject_type")] + public string InstitutionSubjectType { get; set; } = string.Empty; + + /// + /// 获取或设置法人姓名。 + /// + [Newtonsoft.Json.JsonProperty("legal_person_name")] + [System.Text.Json.Serialization.JsonPropertyName("legal_person_name")] + public string LegalPersonName { get; set; } = string.Empty; + + /// + /// 获取或设置法人身份证号。 + /// + [Newtonsoft.Json.JsonProperty("legal_person_ID_number")] + [System.Text.Json.Serialization.JsonPropertyName("legal_person_ID_number")] + public string LegalPersonIdCardNumber { get; set; } = string.Empty; + + /// + /// 获取或设置法人身份证照片资源路径列表。 + /// + [Newtonsoft.Json.JsonProperty("legal_person_ID_img_uris")] + [System.Text.Json.Serialization.JsonPropertyName("legal_person_ID_img_uris")] + public IList LegalPersonIdCardImagePathList { get; set; } = new List(); + + /// + /// 获取或设置照片资源路径。 + /// + [Newtonsoft.Json.JsonProperty("img_uri")] + [System.Text.Json.Serialization.JsonPropertyName("img_uri")] + public string? ImagePath { get; set; } + + /// + /// 获取或设置 Logo 资源路径。 + /// + [Newtonsoft.Json.JsonProperty("institution_logo_uri")] + [System.Text.Json.Serialization.JsonPropertyName("institution_logo_uri")] + public string? LogoPath { get; set; } + + /// + /// 获取或设置商标资源路径。 + /// + [Newtonsoft.Json.JsonProperty("institution_trade_mark_uri")] + [System.Text.Json.Serialization.JsonPropertyName("institution_trade_mark_uri")] + public string? TradeMarkPath { get; set; } + + /// + /// 获取或设置昵称。 + /// + [Newtonsoft.Json.JsonProperty("nickname")] + [System.Text.Json.Serialization.JsonPropertyName("nickname")] + public string Nickname { get; set; } = string.Empty; + + /// + /// 获取或设置材料列表。 + /// + [Newtonsoft.Json.JsonProperty("qualification_info_lst")] + [System.Text.Json.Serialization.JsonPropertyName("qualification_info_lst")] + public IList MaterialList { get; set; } = new List(); + } + + public class Material + { + /// + /// 获取或设置材料类型。 + /// + [Newtonsoft.Json.JsonProperty("type")] + [System.Text.Json.Serialization.JsonPropertyName("type")] + public int Type { get; set; } + + /// + /// 获取或设置材料照片资源路径列表。 + /// + [Newtonsoft.Json.JsonProperty("image_uris")] + [System.Text.Json.Serialization.JsonPropertyName("image_uris")] + public IList ImagePathList { get; set; } = new List(); + + /// + /// 获取或设置材料有效期字符串(格式:yyyy-MM-dd / "长期有效")。 + /// + [Newtonsoft.Json.JsonProperty("validity_date")] + [System.Text.Json.Serialization.JsonPropertyName("validity_date")] + public string ValidityDateString { get; set; } = string.Empty; + + /// + /// 获取或设置证书编号。 + /// + [Newtonsoft.Json.JsonProperty("license_id")] + [System.Text.Json.Serialization.JsonPropertyName("license_id")] + public string? LicenseId { get; set; } + } + } + + /// + /// 获取或设置审核主体类型。 + /// + [Newtonsoft.Json.JsonProperty("object_type")] + [System.Text.Json.Serialization.JsonPropertyName("object_type")] + public int ObjectType { get; set; } + + /// + /// 获取或设置教师资质信息。 + /// + [Newtonsoft.Json.JsonProperty("teacher_qualification_info")] + [System.Text.Json.Serialization.JsonPropertyName("teacher_qualification_info")] + public Types.TeacherQualification? TeacherQualification { get; set; } + + /// + /// 获取或设置机构资质信息。 + /// + [Newtonsoft.Json.JsonProperty("institution_qualification_info")] + [System.Text.Json.Serialization.JsonPropertyName("institution_qualification_info")] + public Types.InstitutionQualification? InstitutionQualification { get; set; } + } + } + + /// + /// 获取或设置资质信息。 + /// + [Newtonsoft.Json.JsonProperty("qualification")] + [System.Text.Json.Serialization.JsonPropertyName("qualification")] + public Types.Qualification Qualification { get; set; } = new Types.Qualification(); + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Models/Qualification/ProductAddQualificationResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Models/Qualification/ProductAddQualificationResponse.cs new file mode 100644 index 00000000..90bff5e0 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Models/Qualification/ProductAddQualificationResponse.cs @@ -0,0 +1,35 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.ProductApi.Models +{ + /// + /// 表示 [POST] /add_qualification 接口的响应。 + /// + public class ProductAddQualificationResponse : DouyinMicroAppProductApiResponse + { + public static class Types + { + public class Data + { + /// + /// 获取或设置审核主体 ID。 + /// + [Newtonsoft.Json.JsonProperty("object_id")] + [System.Text.Json.Serialization.JsonPropertyName("object_id")] + public string ObejctId { get; set; } = default!; + + /// + /// 获取或设置审核 ID。 + /// + [Newtonsoft.Json.JsonProperty("audit_id")] + [System.Text.Json.Serialization.JsonPropertyName("audit_id")] + public string? AuditId { get; set; } + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Models/Qualification/ProductModifyQualificationRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Models/Qualification/ProductModifyQualificationRequest.cs new file mode 100644 index 00000000..56e38e81 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Models/Qualification/ProductModifyQualificationRequest.cs @@ -0,0 +1,155 @@ +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.ProductApi.Models +{ + /// + /// 表示 [POST] /modify_qualification 接口的请求。 + /// + public class ProductModifyQualificationRequest : DouyinMicroAppProductApiRequest + { + public static class Types + { + public class Qualification + { + public static class Types + { + public class TeacherQualification + { + public static class Types + { + public class DouyinAuthInfo : ProductAddQualificationRequest.Types.Qualification.Types.TeacherQualification.Types.DouyinAuthInfo + { + } + } + + /// + /// 获取或设置姓名。 + /// + [Newtonsoft.Json.JsonProperty("name")] + [System.Text.Json.Serialization.JsonPropertyName("name")] + public string Name { get; set; } = string.Empty; + + /// + /// 获取或设置一级类目 ID。 + /// + [Newtonsoft.Json.JsonProperty("first_class")] + [System.Text.Json.Serialization.JsonPropertyName("first_class")] + public int? FirstClassId { get; set; } + + /// + /// 获取或设置二级类目 ID。 + /// + [Newtonsoft.Json.JsonProperty("second_class")] + [System.Text.Json.Serialization.JsonPropertyName("second_class")] + public int? SecondClassId { get; set; } + + /// + /// 获取或设置三级类目 ID。 + /// + [Newtonsoft.Json.JsonProperty("third_class")] + [System.Text.Json.Serialization.JsonPropertyName("third_class")] + public int? ThirdClassId { get; set; } + + /// + /// 获取或设置身份证号码。 + /// + [Newtonsoft.Json.JsonProperty("ID_number")] + [System.Text.Json.Serialization.JsonPropertyName("ID_number")] + public string IdCardNumber { get; set; } = string.Empty; + + /// + /// 获取或设置身份证照片资源路径列表。 + /// + [Newtonsoft.Json.JsonProperty("ID_img_uris")] + [System.Text.Json.Serialization.JsonPropertyName("ID_img_uris")] + public IList IdCardImagePathList { get; set; } = new List(); + + /// + /// 获取或设置照片资源路径。 + /// + [Newtonsoft.Json.JsonProperty("img_uri")] + [System.Text.Json.Serialization.JsonPropertyName("img_uri")] + public string? ImagePath { get; set; } + + /// + /// 获取或设置昵称。 + /// + [Newtonsoft.Json.JsonProperty("nickname")] + [System.Text.Json.Serialization.JsonPropertyName("nickname")] + public string Nickname { get; set; } = string.Empty; + + /// + /// 获取或设置简介。 + /// + [Newtonsoft.Json.JsonProperty("introduction")] + [System.Text.Json.Serialization.JsonPropertyName("introduction")] + public string Introduction { get; set; } = string.Empty; + + /// + /// 获取或设置材料列表。 + /// + [Newtonsoft.Json.JsonProperty("qualification_info_lst")] + [System.Text.Json.Serialization.JsonPropertyName("qualification_info_lst")] + public IList MaterialList { get; set; } = new List(); + + /// + /// 获取或设置抖音授权信息列表。 + /// + [Newtonsoft.Json.JsonProperty("douyin_auth_info")] + [System.Text.Json.Serialization.JsonPropertyName("douyin_auth_info")] + public IList? DouyinAuthInfoList { get; set; } + } + + public class InstitutionQualification : ProductAddQualificationRequest.Types.Qualification.Types.InstitutionQualification + { + /// + /// 获取或设置材料列表。 + /// + [Newtonsoft.Json.JsonProperty("qualification_info_lst")] + [System.Text.Json.Serialization.JsonPropertyName("qualification_info_lst")] + public new IList MaterialList { get; set; } = new List(); + } + + public class Material : ProductAddQualificationRequest.Types.Qualification.Types.Material + { + } + } + + /// + /// 获取或设置审核主体类型。 + /// + [Newtonsoft.Json.JsonProperty("object_type")] + [System.Text.Json.Serialization.JsonPropertyName("object_type")] + public int ObjectType { get; set; } + + /// + /// 获取或设置审核主体 ID。 + /// + [Newtonsoft.Json.JsonProperty("object_id")] + [System.Text.Json.Serialization.JsonPropertyName("object_id")] + public string ObejctId { get; set; } = string.Empty; + + /// + /// 获取或设置教师资质信息。 + /// + [Newtonsoft.Json.JsonProperty("teacher_qualification_info")] + [System.Text.Json.Serialization.JsonPropertyName("teacher_qualification_info")] + public Types.TeacherQualification? TeacherQualification { get; set; } + + /// + /// 获取或设置机构资质信息。 + /// + [Newtonsoft.Json.JsonProperty("institution_qualification_info")] + [System.Text.Json.Serialization.JsonPropertyName("institution_qualification_info")] + public Types.InstitutionQualification? InstitutionQualification { get; set; } + } + } + + /// + /// 获取或设置资质信息。 + /// + [Newtonsoft.Json.JsonProperty("qualification")] + [System.Text.Json.Serialization.JsonPropertyName("qualification")] + public Types.Qualification Qualification { get; set; } = new Types.Qualification(); + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Models/Qualification/ProductModifyQualificationResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Models/Qualification/ProductModifyQualificationResponse.cs new file mode 100644 index 00000000..975e52e9 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Models/Qualification/ProductModifyQualificationResponse.cs @@ -0,0 +1,22 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.ProductApi.Models +{ + /// + /// 表示 [POST] /modify_qualification 接口的响应。 + /// + public class ProductModifyQualificationResponse : DouyinMicroAppProductApiResponse + { + public static class Types + { + public class Data : ProductAddQualificationResponse.Types.Data + { + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Models/Qualification/ProductQueryQualificationRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Models/Qualification/ProductQueryQualificationRequest.cs new file mode 100644 index 00000000..a402e778 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Models/Qualification/ProductQueryQualificationRequest.cs @@ -0,0 +1,58 @@ +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.ProductApi.Models +{ + /// + /// 表示 [POST] /query_qualification 接口的请求。 + /// + public class ProductQueryQualificationRequest : DouyinMicroAppProductApiRequest + { + public static class Types + { + public class ObjectClassification + { + /// + /// 获取或设置审核主体类型。 + /// + [Newtonsoft.Json.JsonProperty("object_type")] + [System.Text.Json.Serialization.JsonPropertyName("object_type")] + public int ObjectType { get; set; } + + /// + /// 获取或设置审核主体 ID。 + /// + [Newtonsoft.Json.JsonProperty("object_id")] + [System.Text.Json.Serialization.JsonPropertyName("object_id")] + public string ObjectId { get; set; } = string.Empty; + + /// + /// 获取或设置一级类目 ID。 + /// + [Newtonsoft.Json.JsonProperty("first_class")] + [System.Text.Json.Serialization.JsonPropertyName("first_class")] + public int? FirstClassId { get; set; } + + /// + /// 获取或设置二级类目 ID。 + /// + [Newtonsoft.Json.JsonProperty("second_class")] + [System.Text.Json.Serialization.JsonPropertyName("second_class")] + public int? SecondClassId { get; set; } + + /// + /// 获取或设置三级类目 ID。 + /// + [Newtonsoft.Json.JsonProperty("third_class")] + [System.Text.Json.Serialization.JsonPropertyName("third_class")] + public int? ThirdClassId { get; set; } + } + } + + /// + /// 获取或设置资质查询单元列表。 + /// + [Newtonsoft.Json.JsonProperty("object_id_with_classifications")] + [System.Text.Json.Serialization.JsonPropertyName("object_id_with_classifications")] + public IList ObjectClassificationList { get; set; } = new List(); + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Models/Qualification/ProductQueryQualificationResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Models/Qualification/ProductQueryQualificationResponse.cs new file mode 100644 index 00000000..a135f7ff --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Models/Qualification/ProductQueryQualificationResponse.cs @@ -0,0 +1,124 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.ProductApi.Models +{ + /// + /// 表示 [POST] /query_qualification 接口的响应。 + /// + public class ProductQueryQualificationResponse : DouyinMicroAppProductApiResponse + { + public static class Types + { + public class Data + { + public static class Types + { + public class Qualification + { + public static class Types + { + public class QualificationInfo + { + /// + /// 获取或设置审核主体类型。 + /// + [Newtonsoft.Json.JsonProperty("object_type")] + [System.Text.Json.Serialization.JsonPropertyName("object_type")] + public int ObjectType { get; set; } + + /// + /// 获取或设置审核主体 ID。 + /// + [Newtonsoft.Json.JsonProperty("object_id")] + [System.Text.Json.Serialization.JsonPropertyName("object_id")] + public string ObjectId { get; set; } = default!; + + /// + /// 获取或设置一级类目 ID。 + /// + [Newtonsoft.Json.JsonProperty("first_class")] + [System.Text.Json.Serialization.JsonPropertyName("first_class")] + public int? FirstClassId { get; set; } + + /// + /// 获取或设置二级类目 ID。 + /// + [Newtonsoft.Json.JsonProperty("second_class")] + [System.Text.Json.Serialization.JsonPropertyName("second_class")] + public int? SecondClassId { get; set; } + + /// + /// 获取或设置三级类目 ID。 + /// + [Newtonsoft.Json.JsonProperty("third_class")] + [System.Text.Json.Serialization.JsonPropertyName("third_class")] + public int? ThirdClassId { get; set; } + + /// + /// 获取或设置审核状态。 + /// + [Newtonsoft.Json.JsonProperty("status")] + [System.Text.Json.Serialization.JsonPropertyName("status")] + public int Status { get; set; } + + /// + /// 获取或设置审核主体名称。 + /// + [Newtonsoft.Json.JsonProperty("object_name")] + [System.Text.Json.Serialization.JsonPropertyName("object_name")] + public string? ObjectName { get; set; } + + /// + /// 获取或设置审核主体昵称。 + /// + [Newtonsoft.Json.JsonProperty("nick_name")] + [System.Text.Json.Serialization.JsonPropertyName("nick_name")] + public string? Nickname { get; set; } + + /// + /// 获取或设置审核失败原因。 + /// + [Newtonsoft.Json.JsonProperty("fail_reason")] + [System.Text.Json.Serialization.JsonPropertyName("fail_reason")] + public string? FailReson { get; set; } + } + } + + /// + /// 获取或设置已上架的资质信息。 + /// + [Newtonsoft.Json.JsonProperty("qualification_on_shelf")] + [System.Text.Json.Serialization.JsonPropertyName("qualification_on_shelf")] + public Types.QualificationInfo? QualificationOnShelf { get; set; } + + /// + /// 获取或设置审核中的资质信息。 + /// + [Newtonsoft.Json.JsonProperty("qualification_reviewing")] + [System.Text.Json.Serialization.JsonPropertyName("qualification_reviewing")] + public Types.QualificationInfo? QualificationReviewing { get; set; } + } + } + + /// + /// 获取或设置审核主体 ID。 + /// + [Newtonsoft.Json.JsonProperty("object_id")] + [System.Text.Json.Serialization.JsonPropertyName("object_id")] + public string ObejctId { get; set; } = default!; + + /// + /// 获取或设置资质信息列表。 + /// + [Newtonsoft.Json.JsonProperty("qualifications")] + [System.Text.Json.Serialization.JsonPropertyName("qualifications")] + public Types.Qualification[] QualificationList { get; set; } = default!; + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Models/RefundRule/ProductModifyRefundRuleRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Models/RefundRule/ProductModifyRefundRuleRequest.cs new file mode 100644 index 00000000..a16145d8 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Models/RefundRule/ProductModifyRefundRuleRequest.cs @@ -0,0 +1,17 @@ +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.ProductApi.Models +{ + /// + /// 表示 [POST] /modify_refund_rule 接口的请求。 + /// + public class ProductModifyRefundRuleRequest : DouyinMicroAppProductApiRequest + { + /// + /// 获取或设置商品 ID 以及对应的规则 ID 字典。 + /// + [Newtonsoft.Json.JsonProperty("refund_rule_map")] + [System.Text.Json.Serialization.JsonPropertyName("refund_rule_map")] + public IDictionary ProductRefundRuleMap { get; set; } = new Dictionary(); + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Models/RefundRule/ProductModifyRefundRuleResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Models/RefundRule/ProductModifyRefundRuleResponse.cs new file mode 100644 index 00000000..784068c8 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Models/RefundRule/ProductModifyRefundRuleResponse.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.ProductApi.Models +{ + /// + /// 表示 [POST] /modify_refund_rule 接口的响应。 + /// + public class ProductModifyRefundRuleResponse : DouyinMicroAppProductApiResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Models/RefundRule/ProductQueryRefundRuleMetaRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Models/RefundRule/ProductQueryRefundRuleMetaRequest.cs new file mode 100644 index 00000000..e60e5a2f --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Models/RefundRule/ProductQueryRefundRuleMetaRequest.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.ProductApi.Models +{ + /// + /// 表示 [POST] /query_refund_rule_meta 接口的请求。 + /// + public class ProductQueryRefundRuleMetaRequest : DouyinMicroAppProductApiRequest + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Models/RefundRule/ProductQueryRefundRuleMetaResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Models/RefundRule/ProductQueryRefundRuleMetaResponse.cs new file mode 100644 index 00000000..d164fb88 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Models/RefundRule/ProductQueryRefundRuleMetaResponse.cs @@ -0,0 +1,42 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.ProductApi.Models +{ + /// + /// 表示 [POST] /query_refund_rule_meta 接口的响应。 + /// + public class ProductQueryRefundRuleMetaResponse : DouyinMicroAppProductApiResponse + { + public static class Types + { + public class RefundRule + { + /// + /// 获取或设置规则 ID。 + /// + [Newtonsoft.Json.JsonProperty("id")] + [System.Text.Json.Serialization.JsonPropertyName("id")] + public int Id { get; set; } + + /// + /// 获取或设置规则描述。 + /// + [Newtonsoft.Json.JsonProperty("desc")] + [System.Text.Json.Serialization.JsonPropertyName("desc")] + public string Description { get; set; } = default!; + + /// + /// 获取或设置规则详情。 + /// + [Newtonsoft.Json.JsonProperty("details")] + [System.Text.Json.Serialization.JsonPropertyName("details")] + public string Detail { get; set; } = default!; + } + } + + /// + /// 获取或设置商品退款规则列表。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.RefundRule[] RefundRuleList { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Models/Resource/ProductQueryResourceStatusRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Models/Resource/ProductQueryResourceStatusRequest.cs new file mode 100644 index 00000000..ec2ebfca --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Models/Resource/ProductQueryResourceStatusRequest.cs @@ -0,0 +1,15 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.ProductApi.Models +{ + /// + /// 表示 [POST] /query_resource_status 接口的请求。 + /// + public class ProductQueryResourceStatusRequest : DouyinMicroAppProductApiRequest + { + /// + /// 获取或设置资源文件路径。 + /// + [Newtonsoft.Json.JsonProperty("resource_uri")] + [System.Text.Json.Serialization.JsonPropertyName("resource_uri")] + public string ResourcePath { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Models/Resource/ProductQueryResourceStatusResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Models/Resource/ProductQueryResourceStatusResponse.cs new file mode 100644 index 00000000..b038103e --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Models/Resource/ProductQueryResourceStatusResponse.cs @@ -0,0 +1,35 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.ProductApi.Models +{ + /// + /// 表示 [POST] /query_resource_status 接口的响应。 + /// + public class ProductQueryResourceStatusResponse : DouyinMicroAppProductApiResponse + { + public static class Types + { + public class Data + { + /// + /// 获取或设置资源路径 + /// + [Newtonsoft.Json.JsonProperty("resource_uri")] + [System.Text.Json.Serialization.JsonPropertyName("resource_uri")] + public string ResourcePath { get; set; } = default!; + + /// + /// 获取或设置上传状态。 + /// + [Newtonsoft.Json.JsonProperty("status")] + [System.Text.Json.Serialization.JsonPropertyName("status")] + public int Status { get; set; } + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Models/Resource/ProductUploadResourceRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Models/Resource/ProductUploadResourceRequest.cs new file mode 100644 index 00000000..d633eff8 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Models/Resource/ProductUploadResourceRequest.cs @@ -0,0 +1,29 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.ProductApi.Models +{ + /// + /// 表示 [POST] /upload_resource 接口的请求。 + /// + public class ProductUploadResourceRequest : DouyinMicroAppProductApiRequest + { + /// + /// 获取或设置资源类型。 + /// + [Newtonsoft.Json.JsonProperty("resource_type")] + [System.Text.Json.Serialization.JsonPropertyName("resource_type")] + public int ResourceType { get; set; } + + /// + /// 获取或设置资源文件 URL。 + /// + [Newtonsoft.Json.JsonProperty("resource_url")] + [System.Text.Json.Serialization.JsonPropertyName("resource_url")] + public string ResourceUrl { get; set; } = string.Empty; + + /// + /// 获取或设置自定义回调数据。 + /// + [Newtonsoft.Json.JsonProperty("callback_data")] + [System.Text.Json.Serialization.JsonPropertyName("callback_data")] + public string? CallbackData { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Models/Resource/ProductUploadResourceResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Models/Resource/ProductUploadResourceResponse.cs new file mode 100644 index 00000000..4c9202e4 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Models/Resource/ProductUploadResourceResponse.cs @@ -0,0 +1,28 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.ProductApi.Models +{ + /// + /// 表示 [POST] /upload_resource 接口的响应。 + /// + public class ProductUploadResourceResponse : DouyinMicroAppProductApiResponse + { + public static class Types + { + public class Data + { + /// + /// 获取或设置资源路径。 + /// + [Newtonsoft.Json.JsonProperty("resource_uri")] + [System.Text.Json.Serialization.JsonPropertyName("resource_uri")] + public string ResourcePath { get; set; } = default!; + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Settings/Credentials.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Settings/Credentials.cs new file mode 100644 index 00000000..0bde3496 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/ProductApi/Settings/Credentials.cs @@ -0,0 +1,25 @@ +using System; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.ProductApi.Settings +{ + public class Credentials + { + /// + /// 初始化客户端时 的副本。 + /// + public string AppId { get; } + + /// + /// 初始化客户端时 的副本。 + /// + public string AppSecret { get; } + + internal Credentials(DouyinMicroAppProductApiClientOptions options) + { + if (options is null) throw new ArgumentNullException(nameof(options)); + + AppId = options.AppId; + AppSecret = options.AppSecret; + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/DouyinMicroAppRoleApiClient.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/DouyinMicroAppRoleApiClient.cs new file mode 100644 index 00000000..201e25ae --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/DouyinMicroAppRoleApiClient.cs @@ -0,0 +1,99 @@ +using System; +using System.Net.Http; +using System.Threading; +using System.Threading.Tasks; +using Flurl.Http; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.RoleApi +{ + /// + /// 一个抖音小程序泛知识角色系统 API HTTP 客户端。 + /// + public class DouyinMicroAppRoleApiClient : CommonClientBase, ICommonClient + { + /// + /// 获取当前客户端使用的抖音小程序凭证。 + /// + public Settings.Credentials Credentials { get; } + + /// + /// 用指定的配置项初始化 类的新实例。 + /// + /// 配置项。 + public DouyinMicroAppRoleApiClient(DouyinMicroAppRoleApiClientOptions options) + : this(options, null) + { + } + + /// + /// + /// + /// + /// + /// + internal protected DouyinMicroAppRoleApiClient(DouyinMicroAppRoleApiClientOptions options, HttpClient? httpClient, bool disposeClient = true) + : base(httpClient, disposeClient) + { + if (options is null) throw new ArgumentNullException(nameof(options)); + + Credentials = new RoleApi.Settings.Credentials(options); + + FlurlClient.BaseUrl = options.Endpoints ?? DouyinMicroAppRoleApiEndpoints.DEFAULT; + FlurlClient.WithTimeout(options.Timeout <= 0 ? Timeout.InfiniteTimeSpan : TimeSpan.FromMilliseconds(options.Timeout)); + } + + /// + /// 使用当前客户端生成一个新的 对象。 + /// + /// + /// + /// + /// + public IFlurlRequest CreateFlurlRequest(DouyinMicroAppRoleApiRequest request, HttpMethod httpMethod, params object[] urlSegments) + { + IFlurlRequest flurlRequest = base.CreateFlurlRequest(request, httpMethod, urlSegments); + + return flurlRequest; + } + + /// + /// 异步发起请求。 + /// + /// + /// + /// + /// + /// + public async Task SendFlurlRequestAsync(IFlurlRequest flurlRequest, HttpContent? httpContent = null, CancellationToken cancellationToken = default) + where T : DouyinMicroAppRoleApiResponse, new() + { + if (flurlRequest is null) throw new ArgumentNullException(nameof(flurlRequest)); + + using IFlurlResponse flurlResponse = await base.SendFlurlRequestAsync(flurlRequest, httpContent, cancellationToken).ConfigureAwait(false); + return await WrapFlurlResponseAsJsonAsync(flurlResponse, cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步发起请求。 + /// + /// + /// + /// + /// + /// + public async Task SendFlurlRequestAsJsonAsync(IFlurlRequest flurlRequest, object? data = null, CancellationToken cancellationToken = default) + where T : DouyinMicroAppRoleApiResponse, new() + { + if (flurlRequest is null) throw new ArgumentNullException(nameof(flurlRequest)); + + bool isSimpleRequest = data is null || + flurlRequest.Verb == HttpMethod.Get || + flurlRequest.Verb == HttpMethod.Head || + flurlRequest.Verb == HttpMethod.Options; + using IFlurlResponse flurlResponse = isSimpleRequest ? + await base.SendFlurlRequestAsync(flurlRequest, null, cancellationToken) : + await base.SendFlurlRequestAsJsonAsync(flurlRequest, data, cancellationToken).ConfigureAwait(false); + return await WrapFlurlResponseAsJsonAsync(flurlResponse, cancellationToken).ConfigureAwait(false); + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/DouyinMicroAppRoleApiClientBuilder.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/DouyinMicroAppRoleApiClientBuilder.cs new file mode 100644 index 00000000..44d6d817 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/DouyinMicroAppRoleApiClientBuilder.cs @@ -0,0 +1,94 @@ +using System; +using System.Collections.Generic; +using System.Net.Http; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.RoleApi +{ + /// + /// 用于构造 实例的构造器。 + /// + public partial class DouyinMicroAppRoleApiClientBuilder : ICommonClientBuilder + { + private readonly DouyinMicroAppRoleApiClientOptions _options; + private readonly IList> _configures; + private readonly IList _interceptors; + private HttpClient? _httpClient; + private bool? _disposeClient; + + private DouyinMicroAppRoleApiClientBuilder(DouyinMicroAppRoleApiClientOptions options) + { + _options = options; + _configures = new List>(); + _interceptors = new List(); + } + + ICommonClientBuilder ICommonClientBuilder.ConfigureSettings(Action configure) + { + return ConfigureSettings(configure); + } + + ICommonClientBuilder ICommonClientBuilder.UseInterceptor(HttpInterceptor interceptor) + { + return UseInterceptor(interceptor); + } + + ICommonClientBuilder ICommonClientBuilder.UseHttpClient(HttpClient httpClient, bool disposeClient) + { + return UseHttpClient(httpClient, disposeClient); + } + + public DouyinMicroAppRoleApiClientBuilder ConfigureSettings(Action configure) + { + if (configure is null) throw new ArgumentNullException(nameof(configure)); + + _configures.Add(configure); + return this; + } + + public DouyinMicroAppRoleApiClientBuilder UseInterceptor(HttpInterceptor interceptor) + { + if (interceptor is null) throw new ArgumentNullException(nameof(interceptor)); + + _interceptors.Add(interceptor); + return this; + } + + public DouyinMicroAppRoleApiClientBuilder UseHttpClient(HttpClient httpClient, bool disposeClient = true) + { + if (httpClient is null) throw new ArgumentNullException(nameof(httpClient)); + + _httpClient = httpClient; + _disposeClient = disposeClient; + return this; + } + + public DouyinMicroAppRoleApiClient Build() + { + DouyinMicroAppRoleApiClient client = _disposeClient.HasValue + ? new DouyinMicroAppRoleApiClient(_options, _httpClient, _disposeClient.Value) + : new DouyinMicroAppRoleApiClient(_options, _httpClient); + + foreach (Action configure in _configures) + { + client.Configure(configure); + } + + foreach (HttpInterceptor interceptor in _interceptors) + { + client.Interceptors.Add(interceptor); + } + + return client; + } + } + + partial class DouyinMicroAppRoleApiClientBuilder + { + public static DouyinMicroAppRoleApiClientBuilder Create(DouyinMicroAppRoleApiClientOptions options) + { + if (options is null) throw new ArgumentNullException(nameof(options)); + + return new DouyinMicroAppRoleApiClientBuilder(options); + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/DouyinMicroAppRoleApiClientOptions.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/DouyinMicroAppRoleApiClientOptions.cs new file mode 100644 index 00000000..1260d0ae --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/DouyinMicroAppRoleApiClientOptions.cs @@ -0,0 +1,30 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.RoleApi +{ + /// + /// 一个用于构造 时使用的配置项。 + /// + public class DouyinMicroAppRoleApiClientOptions + { + /// + /// 获取或设置请求超时时间(单位:毫秒)。 + /// 默认值:30000 + /// + public int Timeout { get; set; } = 30 * 1000; + + /// + /// 获取或设置抖音小程序泛知识角色系统 API 入口点。 + /// 默认值: + /// + public string Endpoints { get; set; } = DouyinMicroAppRoleApiEndpoints.DEFAULT; + + /// + /// 获取或设置抖音小程序 AppId。 + /// + public string AppId { get; set; } = default!; + + /// + /// 获取或设置抖音小程序 AppSecret。 + /// + public string AppSecret { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/DouyinMicroAppRoleApiEndpoints.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/DouyinMicroAppRoleApiEndpoints.cs new file mode 100644 index 00000000..c502f478 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/DouyinMicroAppRoleApiEndpoints.cs @@ -0,0 +1,18 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.RoleApi +{ + /// + /// 抖音小程序角色系统 API 接口域名。 + /// + public class DouyinMicroAppRoleApiEndpoints + { + /// + /// 接口域名(默认)。 + /// + public const string DEFAULT = "https://developer.toutiao.com/auth/entity"; + + /// + /// 沙盒域名。 + /// + public const string SANDBOX = "https://open-sandbox.douyin.com/auth/entity"; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/DouyinMicroAppRoleApiRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/DouyinMicroAppRoleApiRequest.cs new file mode 100644 index 00000000..bcc78c74 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/DouyinMicroAppRoleApiRequest.cs @@ -0,0 +1,22 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.RoleApi +{ + /// + /// 抖音小程序泛知识角色系统 API 请求的基类。 + /// + public class DouyinMicroAppRoleApiRequest : CommonRequestBase, ICommonRequest + { + /// + /// 获取或设置抖音小程序的 AppId。如果不指定将使用构造 时的 参数。 + /// + [Newtonsoft.Json.JsonProperty("appid")] + [System.Text.Json.Serialization.JsonPropertyName("appid")] + public virtual string? AppId { get; set; } + + /// + /// 获取或设置抖音小程序的 AccessToken。 + /// + [Newtonsoft.Json.JsonProperty("access_token")] + [System.Text.Json.Serialization.JsonPropertyName("access_token")] + public virtual string? AccessToken { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/DouyinMicroAppRoleApiResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/DouyinMicroAppRoleApiResponse.cs new file mode 100644 index 00000000..99de7a93 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/DouyinMicroAppRoleApiResponse.cs @@ -0,0 +1,58 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.RoleApi +{ + /// + /// 抖音小程序泛知识角色系统 API 响应的基类。 + /// + public abstract class DouyinMicroAppRoleApiResponse : CommonResponseBase, ICommonResponse + { + /// + /// 获取抖音小程序 API 返回的错误码。 + /// + [Newtonsoft.Json.JsonProperty("err_no")] + [System.Text.Json.Serialization.JsonPropertyName("err_no")] + public virtual int ErrorNumber { get; set; } + + /// + /// 获取抖音小程序 API 返回的错误描述。 + /// + [Newtonsoft.Json.JsonProperty("err_tips")] + [System.Text.Json.Serialization.JsonPropertyName("err_tips")] + public virtual string? ErrorTips { get; set; } + + /// + /// 获取抖音小程序 API 返回的错误信息。 + /// + [Newtonsoft.Json.JsonProperty("err")] + [System.Text.Json.Serialization.JsonPropertyName("err")] + public virtual ByteDanceMicroAppRoleApiResponseError? Error { get; set; } + + /// + /// 获取一个值,该值指示调用抖音小程序 API 是否成功。 + /// + ///(即 HTTP 状态码为 200,且 值为 0、 值为 0) + /// + /// + /// + public override bool IsSuccessful() + { + return GetRawStatus() == 200 && ErrorNumber == 0 && (Error is null || Error.ErrorCode == 0); + } + } + + public class ByteDanceMicroAppRoleApiResponseError + { + /// + /// 获取抖音小程序 API 返回的错误码。 + /// + [Newtonsoft.Json.JsonProperty("err_code")] + [System.Text.Json.Serialization.JsonPropertyName("err_code")] + public int ErrorCode { get; set; } + + /// + /// 获取抖音小程序 API 返回的错误描述。 + /// + [Newtonsoft.Json.JsonProperty("err_msg")] + [System.Text.Json.Serialization.JsonPropertyName("err_msg")] + public string? ErrorMessage { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Extensions/DouyinMicroAppRoleApiClientExecuteRoleExtensions.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Extensions/DouyinMicroAppRoleApiClientExecuteRoleExtensions.cs new file mode 100644 index 00000000..f4ace14d --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Extensions/DouyinMicroAppRoleApiClientExecuteRoleExtensions.cs @@ -0,0 +1,630 @@ +using System; +using System.Net.Http; +using System.Threading; +using System.Threading.Tasks; +using Flurl.Http; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.RoleApi +{ + public static class DouyinMicroAppRoleApiClientExecuteRoleExtensions + { + /// + /// 异步调用 [POST] /upload_material 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAuthEntityUploadMaterialAsync(this DouyinMicroAppRoleApiClient client, Models.AuthEntityUploadMaterialRequest request,CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (request.AppId is null) + request.AppId = client.Credentials.AppId; + + if (request.MaterialFileName is null) + request.MaterialFileName = Guid.NewGuid().ToString("N").ToLower() + (request.MaterialType == 1010 ? ".pdf" : ".jpg"); + + if (request.MaterialFileContentType is null) + request.MaterialFileContentType = Utilities.FileNameToContentTypeMapper.GetContentTypeForMaterial(request.MaterialFileName) ?? "image/jpeg"; + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "upload_material"); + + using MultipartFormDataContent httpContent = Utilities.FileHttpContentBuilder.Build(fileName: request.MaterialFileName, fileBytes: request.MaterialFileBytes, fileContentType: request.MaterialFileContentType, formDataName: "material_file"); + httpContent.Add(new StringContent(request.AppId), "appid"); + httpContent.Add(new StringContent(request.AccessToken!), "access_token"); + httpContent.Add(new StringContent(request.MaterialType.ToString()), "material_type"); + return await client.SendFlurlRequestAsync(flurlReq, httpContent, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /query_entity_info 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAuthEntityQueryEntityInfoAsync(this DouyinMicroAppRoleApiClient client, Models.AuthEntityQueryEntityInfoRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (request.AppId is null) + request.AppId = client.Credentials.AppId; + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "query_entity_info"); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + #region Auth + /// + /// 异步调用 [POST] /bypartner 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAuthEntityByPartnerAsync(this DouyinMicroAppRoleApiClient client, Models.AuthEntityByPartnerRequest request,CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (request.AppId is null) + request.AppId = client.Credentials.AppId; + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "bypartner"); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /byself 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAuthEntityBySelfAsync(this DouyinMicroAppRoleApiClient client, Models.AuthEntityBySelfRequest request,CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (request.AppId is null) + request.AppId = client.Credentials.AppId; + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "byself"); + + var resp = await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + return resp; + } + + /// + /// 异步调用 [POST] /get_basic_auth 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAuthEntityGetBasicAuthAsync(this DouyinMicroAppRoleApiClient client, Models.AuthEntityGetBasicAuthRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (request.AppId is null) + request.AppId = client.Credentials.AppId; + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "get_basic_auth"); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /update_basic_auth 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAuthEntityUpdateBasicAuthAsync(this DouyinMicroAppRoleApiClient client, Models.AuthEntityUpdateBasicAuthRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (request.AppId is null) + request.AppId = client.Credentials.AppId; + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "update_basic_auth"); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /get_class_auth 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAuthEntityGetClassAuthAsync(this DouyinMicroAppRoleApiClient client, Models.AuthEntityGetClassAuthRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (request.AppId is null) + request.AppId = client.Credentials.AppId; + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "get_class_auth"); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /update_class_auth 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAuthEntityUpdateClassAuthAsync(this DouyinMicroAppRoleApiClient client, Models.AuthEntityUpdateClassAuthRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (request.AppId is null) + request.AppId = client.Credentials.AppId; + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "update_class_auth"); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /add_class_auth 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAuthEntityAddClassAuthAsync(this DouyinMicroAppRoleApiClient client, Models.AuthEntityAddClassAuthRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (request.AppId is null) + request.AppId = client.Credentials.AppId; + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "add_class_auth"); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /get_audit_detail 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAuthEntityGetAuditDetailAsync(this DouyinMicroAppRoleApiClient client, Models.AuthEntityGetAuditDetailRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (request.AppId is null) + request.AppId = client.Credentials.AppId; + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "get_audit_detail"); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + #endregion + + #region Bind + /// + /// 异步调用 [POST] /query_mountscope 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAuthEntityQueryMountScopeAsync(this DouyinMicroAppRoleApiClient client, Models.AuthEntityQueryMountScopeRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (request.AppId is null) + request.AppId = client.Credentials.AppId; + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "query_mountscope"); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /enable_mountscope 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAuthEntityEnableMountScopeAsync(this DouyinMicroAppRoleApiClient client, Models.AuthEntityEnableMountScopeRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (request.AppId is null) + request.AppId = client.Credentials.AppId; + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "enable_mountscope"); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /unbind_account 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAuthEntityUnbindAccountAsync(this DouyinMicroAppRoleApiClient client, Models.AuthEntityUnbindAccountRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (request.AppId is null) + request.AppId = client.Credentials.AppId; + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "unbind_account"); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /query_bind_toc_list 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAuthEntityQueryBindToCListAsync(this DouyinMicroAppRoleApiClient client, Models.AuthEntityQueryBindToCListRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (request.AppId is null) + request.AppId = client.Credentials.AppId; + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "query_bind_toc_list"); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + #endregion + + #region MerchantCode + /// + /// 异步调用 [POST] /activate_merchantcode 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAuthEntityActivateMerchantCodeAsync(this DouyinMicroAppRoleApiClient client, Models.AuthEntityActivateMerchantCodeRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (request.AppId is null) + request.AppId = client.Credentials.AppId; + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "activate_merchantcode"); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /query_merchantcode_status 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAuthEntityQueryMerchantCodeStatusAsync(this DouyinMicroAppRoleApiClient client, Models.AuthEntityQueryMerchantCodeStatusRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (request.AppId is null) + request.AppId = client.Credentials.AppId; + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "query_merchantcode_status"); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + #endregion + + #region Role + /// + /// 异步调用 [POST] /add_role 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAuthEntityAddRoleAsync(this DouyinMicroAppRoleApiClient client, Models.AuthEntityAddRoleRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (request.AppId is null) + request.AppId = client.Credentials.AppId; + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "add_role"); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /bind_role 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAuthEntityBindRoleAsync(this DouyinMicroAppRoleApiClient client, Models.AuthEntityBindRoleRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (request.AppId is null) + request.AppId = client.Credentials.AppId; + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "bind_role"); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /unbind_role 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAuthEntityUnbindRoleAsync(this DouyinMicroAppRoleApiClient client, Models.AuthEntityUnbindRoleRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (request.AppId is null) + request.AppId = client.Credentials.AppId; + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "unbind_role"); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /get_bind_list 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAuthEntityGetBindListAsync(this DouyinMicroAppRoleApiClient client, Models.AuthEntityGetBindListRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (request.AppId is null) + request.AppId = client.Credentials.AppId; + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "get_bind_list"); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /auth_role 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAuthEntityAuthRoleAsync(this DouyinMicroAppRoleApiClient client, Models.AuthEntityAuthRoleRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (request.AppId is null) + request.AppId = client.Credentials.AppId; + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "auth_role"); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /un_auth_role 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAuthEntityUnauthRoleAsync(this DouyinMicroAppRoleApiClient client, Models.AuthEntityUnauthRoleRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (request.AppId is null) + request.AppId = client.Credentials.AppId; + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "un_auth_role"); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /update_authletter 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAuthEntityUpdateAuthLetterAsync(this DouyinMicroAppRoleApiClient client, Models.AuthEntityUpdateAuthLetterRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (request.AppId is null) + request.AppId = client.Credentials.AppId; + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "update_authletter"); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /get_appid_auth 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAuthEntityGetAppIdAuthAsync(this DouyinMicroAppRoleApiClient client, Models.AuthEntityGetAppIdAuthRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (request.AppId is null) + request.AppId = client.Credentials.AppId; + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "get_appid_auth"); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + #endregion + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/Auth/AuthEntityAddClassAuthRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/Auth/AuthEntityAddClassAuthRequest.cs similarity index 97% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/Auth/AuthEntityAddClassAuthRequest.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/Auth/AuthEntityAddClassAuthRequest.cs index 06380fad..a64476d7 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/Auth/AuthEntityAddClassAuthRequest.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/Auth/AuthEntityAddClassAuthRequest.cs @@ -1,11 +1,11 @@ using System.Collections.Generic; -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.RoleApi.Models +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.RoleApi.Models { /// /// 表示 [POST] /add_class_auth 接口的请求。 /// - public class AuthEntityAddClassAuthRequest : ByteDanceMicroAppRoleApiRequest + public class AuthEntityAddClassAuthRequest : DouyinMicroAppRoleApiRequest { public static class Types { diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/Auth/AuthEntityAddClassAuthResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/Auth/AuthEntityAddClassAuthResponse.cs new file mode 100644 index 00000000..1a0fae00 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/Auth/AuthEntityAddClassAuthResponse.cs @@ -0,0 +1,15 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.RoleApi.Models +{ + /// + /// 表示 [POST] /add_class_auth 接口的响应。 + /// + public class AuthEntityAddClassAuthResponse: DouyinMicroAppRoleApiResponse + { + /// + /// 获取或设置类目审核任务 ID。 + /// + [Newtonsoft.Json.JsonProperty("class_auth_taskid")] + [System.Text.Json.Serialization.JsonPropertyName("class_auth_taskid")] + public string ClassAuthTaskId { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/Auth/AuthEntityByPartnerRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/Auth/AuthEntityByPartnerRequest.cs similarity index 98% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/Auth/AuthEntityByPartnerRequest.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/Auth/AuthEntityByPartnerRequest.cs index 7c9c7b5b..3e17ecc2 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/Auth/AuthEntityByPartnerRequest.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/Auth/AuthEntityByPartnerRequest.cs @@ -1,11 +1,11 @@ using System.Collections.Generic; -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.RoleApi.Models +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.RoleApi.Models { /// /// 表示 [POST] /bypartner 接口的请求。 /// - public class AuthEntityByPartnerRequest : ByteDanceMicroAppRoleApiRequest + public class AuthEntityByPartnerRequest : DouyinMicroAppRoleApiRequest { public static class Types { diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/Auth/AuthEntityByPartnerResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/Auth/AuthEntityByPartnerResponse.cs similarity index 86% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/Auth/AuthEntityByPartnerResponse.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/Auth/AuthEntityByPartnerResponse.cs index da24254b..02aa4c39 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/Auth/AuthEntityByPartnerResponse.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/Auth/AuthEntityByPartnerResponse.cs @@ -1,9 +1,9 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.RoleApi.Models +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.RoleApi.Models { /// /// 表示 [POST] /bypartner 接口的响应。 /// - public class AuthEntityByPartnerResponse: ByteDanceMicroAppRoleApiResponse + public class AuthEntityByPartnerResponse: DouyinMicroAppRoleApiResponse { /// /// 获取或设置基础认证任务 ID。 diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/Auth/AuthEntityBySelfRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/Auth/AuthEntityBySelfRequest.cs similarity index 98% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/Auth/AuthEntityBySelfRequest.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/Auth/AuthEntityBySelfRequest.cs index e29892b1..b3b06e26 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/Auth/AuthEntityBySelfRequest.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/Auth/AuthEntityBySelfRequest.cs @@ -1,11 +1,11 @@ using System.Collections.Generic; -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.RoleApi.Models +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.RoleApi.Models { /// /// 表示 [POST] /byself 接口的请求。 /// - public class AuthEntityBySelfRequest : ByteDanceMicroAppRoleApiRequest + public class AuthEntityBySelfRequest : DouyinMicroAppRoleApiRequest { public static class Types { diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/Auth/AuthEntityBySelfResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/Auth/AuthEntityBySelfResponse.cs similarity index 86% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/Auth/AuthEntityBySelfResponse.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/Auth/AuthEntityBySelfResponse.cs index f04263a4..a87868b8 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/Auth/AuthEntityBySelfResponse.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/Auth/AuthEntityBySelfResponse.cs @@ -1,9 +1,9 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.RoleApi.Models +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.RoleApi.Models { /// /// 表示 [POST] /byself 接口的响应。 /// - public class AuthEntityBySelfResponse: ByteDanceMicroAppRoleApiResponse + public class AuthEntityBySelfResponse: DouyinMicroAppRoleApiResponse { /// /// 获取或设置基础认证任务 ID。 diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/Auth/AuthEntityGetAuditDetailRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/Auth/AuthEntityGetAuditDetailRequest.cs similarity index 80% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/Auth/AuthEntityGetAuditDetailRequest.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/Auth/AuthEntityGetAuditDetailRequest.cs index 2bb2bb3f..371b9a17 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/Auth/AuthEntityGetAuditDetailRequest.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/Auth/AuthEntityGetAuditDetailRequest.cs @@ -1,9 +1,9 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.RoleApi.Models +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.RoleApi.Models { /// /// 表示 [POST] /get_audit_detail 接口的请求。 /// - public class AuthEntityGetAuditDetailRequest : ByteDanceMicroAppRoleApiRequest + public class AuthEntityGetAuditDetailRequest : DouyinMicroAppRoleApiRequest { /// /// 获取或设置审核类型。 diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/Auth/AuthEntityGetAuditDetailResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/Auth/AuthEntityGetAuditDetailResponse.cs similarity index 82% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/Auth/AuthEntityGetAuditDetailResponse.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/Auth/AuthEntityGetAuditDetailResponse.cs index 6fef6fa4..f8574e40 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/Auth/AuthEntityGetAuditDetailResponse.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/Auth/AuthEntityGetAuditDetailResponse.cs @@ -1,12 +1,12 @@ using System; using System.Collections.Generic; -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.RoleApi.Models +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.RoleApi.Models { /// /// 表示 [POST] /get_audit_detail 接口的响应。 /// - public class AuthEntityGetAuditDetailResponse : ByteDanceMicroAppRoleApiResponse + public class AuthEntityGetAuditDetailResponse : DouyinMicroAppRoleApiResponse { public static class Types { diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/Auth/AuthEntityGetBasicAuthRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/Auth/AuthEntityGetBasicAuthRequest.cs new file mode 100644 index 00000000..7a87cb10 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/Auth/AuthEntityGetBasicAuthRequest.cs @@ -0,0 +1,15 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.RoleApi.Models +{ + /// + /// 表示 [POST] /get_basic_auth 接口的请求。 + /// + public class AuthEntityGetBasicAuthRequest: DouyinMicroAppRoleApiRequest + { + /// + /// 获取或设置实体 ID。 + /// + [Newtonsoft.Json.JsonProperty("entity_id")] + [System.Text.Json.Serialization.JsonPropertyName("entity_id")] + public string EntityId { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/Auth/AuthEntityGetBasicAuthResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/Auth/AuthEntityGetBasicAuthResponse.cs similarity index 98% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/Auth/AuthEntityGetBasicAuthResponse.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/Auth/AuthEntityGetBasicAuthResponse.cs index 7b089d57..6393922d 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/Auth/AuthEntityGetBasicAuthResponse.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/Auth/AuthEntityGetBasicAuthResponse.cs @@ -1,9 +1,9 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.RoleApi.Models +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.RoleApi.Models { /// /// 表示 [POST] /get_basic_auth 接口的响应。 /// - public class AuthEntityGetBasicAuthResponse: ByteDanceMicroAppRoleApiResponse + public class AuthEntityGetBasicAuthResponse: DouyinMicroAppRoleApiResponse { public static class Types { diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/Auth/AuthEntityGetClassAuthRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/Auth/AuthEntityGetClassAuthRequest.cs similarity index 91% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/Auth/AuthEntityGetClassAuthRequest.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/Auth/AuthEntityGetClassAuthRequest.cs index bd2562bd..dabc9441 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/Auth/AuthEntityGetClassAuthRequest.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/Auth/AuthEntityGetClassAuthRequest.cs @@ -1,9 +1,9 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.RoleApi.Models +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.RoleApi.Models { /// /// 表示 [POST] /get_class_auth 接口的请求。 /// - public class AuthEntityGetClassAuthRequest : ByteDanceMicroAppRoleApiRequest + public class AuthEntityGetClassAuthRequest : DouyinMicroAppRoleApiRequest { public static class Types { diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/Auth/AuthEntityGetClassAuthResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/Auth/AuthEntityGetClassAuthResponse.cs similarity index 97% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/Auth/AuthEntityGetClassAuthResponse.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/Auth/AuthEntityGetClassAuthResponse.cs index 55d02019..483d2438 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/Auth/AuthEntityGetClassAuthResponse.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/Auth/AuthEntityGetClassAuthResponse.cs @@ -1,11 +1,11 @@ using System.Collections.Generic; -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.RoleApi.Models +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.RoleApi.Models { /// /// 表示 [POST] /get_class_auth 接口的响应。 /// - public class AuthEntityGetClassAuthResponse : ByteDanceMicroAppRoleApiResponse + public class AuthEntityGetClassAuthResponse : DouyinMicroAppRoleApiResponse { public static class Types { @@ -115,7 +115,7 @@ public class Partner /// [Newtonsoft.Json.JsonProperty("cooperation_cases")] [System.Text.Json.Serialization.JsonPropertyName("cooperation_cases")] - public IList? CooperationCaseList { get; set; } + public Material[]? CooperationCaseList { get; set; } } } diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/Auth/AuthEntityUpdateBasicAuthRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/Auth/AuthEntityUpdateBasicAuthRequest.cs similarity index 94% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/Auth/AuthEntityUpdateBasicAuthRequest.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/Auth/AuthEntityUpdateBasicAuthRequest.cs index dd825fd0..eb9a1a57 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/Auth/AuthEntityUpdateBasicAuthRequest.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/Auth/AuthEntityUpdateBasicAuthRequest.cs @@ -1,11 +1,11 @@ using System.Collections.Generic; -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.RoleApi.Models +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.RoleApi.Models { /// /// 表示 [POST] /update_basic_auth 接口的请求。 /// - public class AuthEntityUpdateBasicAuthRequest : ByteDanceMicroAppRoleApiRequest + public class AuthEntityUpdateBasicAuthRequest : DouyinMicroAppRoleApiRequest { public static class Types { diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/Auth/AuthEntityUpdateBasicAuthResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/Auth/AuthEntityUpdateBasicAuthResponse.cs new file mode 100644 index 00000000..f4ffb30c --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/Auth/AuthEntityUpdateBasicAuthResponse.cs @@ -0,0 +1,15 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.RoleApi.Models +{ + /// + /// 表示 [POST] /update_basic_auth 接口的响应。 + /// + public class AuthEntityUpdateBasicAuthResponse: DouyinMicroAppRoleApiResponse + { + /// + /// 获取或设置基础认证任务 ID。 + /// + [Newtonsoft.Json.JsonProperty("basic_auth_taskid")] + [System.Text.Json.Serialization.JsonPropertyName("basic_auth_taskid")] + public string BasicAuthTaskId { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/Auth/AuthEntityUpdateClassAuthRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/Auth/AuthEntityUpdateClassAuthRequest.cs similarity index 97% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/Auth/AuthEntityUpdateClassAuthRequest.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/Auth/AuthEntityUpdateClassAuthRequest.cs index b6814b8e..181181e3 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/Auth/AuthEntityUpdateClassAuthRequest.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/Auth/AuthEntityUpdateClassAuthRequest.cs @@ -1,11 +1,11 @@ using System.Collections.Generic; -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.RoleApi.Models +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.RoleApi.Models { /// /// 表示 [POST] /update_class_auth 接口的请求。 /// - public class AuthEntityUpdateClassAuthRequest : ByteDanceMicroAppRoleApiRequest + public class AuthEntityUpdateClassAuthRequest : DouyinMicroAppRoleApiRequest { public static class Types { diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/Auth/AuthEntityUpdateClassAuthResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/Auth/AuthEntityUpdateClassAuthResponse.cs new file mode 100644 index 00000000..dcc53628 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/Auth/AuthEntityUpdateClassAuthResponse.cs @@ -0,0 +1,15 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.RoleApi.Models +{ + /// + /// 表示 [POST] /update_class_auth 接口的响应。 + /// + public class AuthEntityUpdateClassAuthResponse: DouyinMicroAppRoleApiResponse + { + /// + /// 获取或设置类目审核任务 ID。 + /// + [Newtonsoft.Json.JsonProperty("class_auth_taskid")] + [System.Text.Json.Serialization.JsonPropertyName("class_auth_taskid")] + public string ClassAuthTaskId { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/AuthEntityQueryEntityInfoRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/AuthEntityQueryEntityInfoRequest.cs similarity index 75% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/AuthEntityQueryEntityInfoRequest.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/AuthEntityQueryEntityInfoRequest.cs index 67832b69..18336672 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/AuthEntityQueryEntityInfoRequest.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/AuthEntityQueryEntityInfoRequest.cs @@ -1,13 +1,11 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.RoleApi.Models +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.RoleApi.Models { /// /// 表示 [POST] /query_entity_info 接口的请求。 /// - public class AuthEntityQueryEntityInfoRequest : ByteDanceMicroAppRoleApiRequest + public class AuthEntityQueryEntityInfoRequest : DouyinMicroAppRoleApiRequest { - /// /// - /// [Newtonsoft.Json.JsonProperty("app_id")] [System.Text.Json.Serialization.JsonPropertyName("app_id")] public override string? AppId { get; set; } diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/AuthEntityQueryEntityInfoResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/AuthEntityQueryEntityInfoResponse.cs new file mode 100644 index 00000000..fcd486a2 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/AuthEntityQueryEntityInfoResponse.cs @@ -0,0 +1,15 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.RoleApi.Models +{ + /// + /// 表示 [POST] /query_entity_info 接口的响应。 + /// + public class AuthEntityQueryEntityInfoResponse : DouyinMicroAppRoleApiResponse + { + /// + /// 获取或设置实体 ID。 + /// + [Newtonsoft.Json.JsonProperty("entity_id")] + [System.Text.Json.Serialization.JsonPropertyName("entity_id")] + public string EntityId { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/AuthEntityUploadMaterialRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/AuthEntityUploadMaterialRequest.cs similarity index 88% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/AuthEntityUploadMaterialRequest.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/AuthEntityUploadMaterialRequest.cs index 4028762e..0952778e 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/AuthEntityUploadMaterialRequest.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/AuthEntityUploadMaterialRequest.cs @@ -1,11 +1,11 @@ using System; -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.RoleApi.Models +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.RoleApi.Models { /// /// 表示 [POST] /upload_material 接口的请求。 /// - public class AuthEntityUploadMaterialRequest: ByteDanceMicroAppRoleApiRequest + public class AuthEntityUploadMaterialRequest: DouyinMicroAppRoleApiRequest { /// /// 获取或设置文件类型。 diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/AuthEntityUploadMaterialResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/AuthEntityUploadMaterialResponse.cs new file mode 100644 index 00000000..3bbf1997 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/AuthEntityUploadMaterialResponse.cs @@ -0,0 +1,15 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.RoleApi.Models +{ + /// + /// 表示 [POST] /upload_material 接口的响应。 + /// + public class AuthEntityUploadMaterialResponse: DouyinMicroAppRoleApiResponse + { + /// + /// 获取或设置资源路径。 + /// + [Newtonsoft.Json.JsonProperty("path")] + [System.Text.Json.Serialization.JsonPropertyName("path")] + public string Path { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/Bind/AuthEntityEnableMountScopeRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/Bind/AuthEntityEnableMountScopeRequest.cs new file mode 100644 index 00000000..3d4e7848 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/Bind/AuthEntityEnableMountScopeRequest.cs @@ -0,0 +1,86 @@ +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.RoleApi.Models +{ + /// + /// 表示 [POST] /enable_mountscope 接口的请求。 + /// + public class AuthEntityEnableMountScopeRequest : DouyinMicroAppRoleApiRequest + { + public static class Types + { + public class User + { + /// + /// 获取或设置应用的 ClientKey。 + /// + [Newtonsoft.Json.JsonProperty("client_key")] + [System.Text.Json.Serialization.JsonPropertyName("client_key")] + public string ClientKey { get; set; } = string.Empty; + + /// + /// 获取或设置用户的 OpenId。 + /// + [Newtonsoft.Json.JsonProperty("openid")] + [System.Text.Json.Serialization.JsonPropertyName("openid")] + public string OpenId { get; set; } = string.Empty; + } + } + + /// + /// 获取或设置服务商实体 ID。 + /// + [Newtonsoft.Json.JsonProperty("partner_entity_id")] + [System.Text.Json.Serialization.JsonPropertyName("partner_entity_id")] + public string? PartnerEntityId { get; set; } + + /// + /// 获取或设置商户实体 ID。 + /// + [Newtonsoft.Json.JsonProperty("merchant_entity_id")] + [System.Text.Json.Serialization.JsonPropertyName("merchant_entity_id")] + public string? MerchantEntityId { get; set; } + + /// + /// 获取或设置用户信息。 + /// + [Newtonsoft.Json.JsonProperty("c_user")] + [System.Text.Json.Serialization.JsonPropertyName("c_user")] + public Types.User? User { get; set; } + + /// + /// 获取或设置用户的抖音号。与字段 二选一。 + /// + [Newtonsoft.Json.JsonProperty("aweme_id")] + [System.Text.Json.Serialization.JsonPropertyName("aweme_id")] + public string? AwemeId { get; set; } + + /// + /// 获取或设置授权能力。与字段 二选一。 + /// + [Newtonsoft.Json.JsonProperty("mount_scope")] + [System.Text.Json.Serialization.JsonPropertyName("mount_scope")] + public int? MountScope { get; set; } + + /// + /// 获取或设置授权能力列表。与字段 二选一。 + /// + [Newtonsoft.Json.JsonProperty("mount_scope_list")] + [System.Text.Json.Serialization.JsonPropertyName("mount_scope_list")] + public IList? MountScopeList { get; set; } + + /// + /// 获取或设置行业编码。 + /// + [Newtonsoft.Json.JsonProperty("industry_code")] + [System.Text.Json.Serialization.JsonPropertyName("industry_code")] + public int IndustryCode { get; set; } + + /// + /// 获取或设置行业角色。 + /// + [Newtonsoft.Json.JsonProperty("industry_role")] + [System.Text.Json.Serialization.JsonPropertyName("industry_role")] + public int IndustryRole { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/Bind/AuthEntityEnableMountScopeResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/Bind/AuthEntityEnableMountScopeResponse.cs new file mode 100644 index 00000000..30e801e9 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/Bind/AuthEntityEnableMountScopeResponse.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.RoleApi.Models +{ + /// + /// 表示 [POST] /enable_mountscope 接口的响应。 + /// + public class AuthEntityEnableMountScopeResponse : DouyinMicroAppRoleApiResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/Bind/AuthEntityQueryBindToCListRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/Bind/AuthEntityQueryBindToCListRequest.cs new file mode 100644 index 00000000..dfaacec4 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/Bind/AuthEntityQueryBindToCListRequest.cs @@ -0,0 +1,29 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.RoleApi.Models +{ + /// + /// 表示 [POST] /query_bind_toc_list 接口的请求。 + /// + public class AuthEntityQueryBindToCListRequest : DouyinMicroAppRoleApiRequest + { + /// + /// 获取或设置商户实体 ID。 + /// + [Newtonsoft.Json.JsonProperty("merchant_entity_id")] + [System.Text.Json.Serialization.JsonPropertyName("merchant_entity_id")] + public string? MerchantEntityId { get; set; } + + /// + /// 获取或设置行业编码。 + /// + [Newtonsoft.Json.JsonProperty("industry_code")] + [System.Text.Json.Serialization.JsonPropertyName("industry_code")] + public int IndustryCode { get; set; } + + /// + /// 获取或设置行业角色。 + /// + [Newtonsoft.Json.JsonProperty("industry_role")] + [System.Text.Json.Serialization.JsonPropertyName("industry_role")] + public int IndustryRole { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/Bind/AuthEntityQueryBindToCListResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/Bind/AuthEntityQueryBindToCListResponse.cs new file mode 100644 index 00000000..cbbbfcff --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/Bind/AuthEntityQueryBindToCListResponse.cs @@ -0,0 +1,15 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.RoleApi.Models +{ + /// + /// 表示 [POST] /query_bind_toc_list 接口的响应。 + /// + public class AuthEntityQueryBindToCListResponse : DouyinMicroAppRoleApiResponse + { + /// + /// 获取或设置抖音号列表。 + /// + [Newtonsoft.Json.JsonProperty("aweme_id_list")] + [System.Text.Json.Serialization.JsonPropertyName("aweme_id_list")] + public string[] AwemeIdList { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/Bind/AuthEntityQueryMountScopeRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/Bind/AuthEntityQueryMountScopeRequest.cs new file mode 100644 index 00000000..ab827fed --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/Bind/AuthEntityQueryMountScopeRequest.cs @@ -0,0 +1,50 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.RoleApi.Models +{ + /// + /// 表示 [POST] /query_mountscope 接口的请求。 + /// + public class AuthEntityQueryMountScopeRequest : DouyinMicroAppRoleApiRequest + { + /// + /// 获取或设置服务商实体 ID。 + /// + [Newtonsoft.Json.JsonProperty("partner_entity_id")] + [System.Text.Json.Serialization.JsonPropertyName("partner_entity_id")] + public string? PartnerEntityId { get; set; } + + /// + /// 获取或设置商户实体 ID。 + /// + [Newtonsoft.Json.JsonProperty("merchant_entity_id")] + [System.Text.Json.Serialization.JsonPropertyName("merchant_entity_id")] + public string? MerchantEntityId { get; set; } + + /// + /// 获取或设置用户的 OpenId。与字段 二选一。 + /// + [Newtonsoft.Json.JsonProperty("openid")] + [System.Text.Json.Serialization.JsonPropertyName("openid")] + public string? OpenId { get; set; } + + /// + /// 获取或设置用户的抖音号。与字段 二选一。 + /// + [Newtonsoft.Json.JsonProperty("aweme_id")] + [System.Text.Json.Serialization.JsonPropertyName("aweme_id")] + public string? AwemeId { get; set; } + + /// + /// 获取或设置行业编码。 + /// + [Newtonsoft.Json.JsonProperty("industry_code")] + [System.Text.Json.Serialization.JsonPropertyName("industry_code")] + public int IndustryCode { get; set; } + + /// + /// 获取或设置行业角色。 + /// + [Newtonsoft.Json.JsonProperty("industry_role")] + [System.Text.Json.Serialization.JsonPropertyName("industry_role")] + public int IndustryRole { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/Bind/AuthEntityQueryMountScopeResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/Bind/AuthEntityQueryMountScopeResponse.cs new file mode 100644 index 00000000..498e48f1 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/Bind/AuthEntityQueryMountScopeResponse.cs @@ -0,0 +1,22 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.RoleApi.Models +{ + /// + /// 表示 [POST] /query_mountscope 接口的响应。 + /// + public class AuthEntityQueryMountScopeResponse : DouyinMicroAppRoleApiResponse + { + /// + /// 获取或设置已授权能力列表。 + /// + [Newtonsoft.Json.JsonProperty("scope_list")] + [System.Text.Json.Serialization.JsonPropertyName("scope_list")] + public int[] MountScopeList { get; set; } = default!; + + /// + /// 获取或设置绑定状态。 + /// + [Newtonsoft.Json.JsonProperty("status")] + [System.Text.Json.Serialization.JsonPropertyName("status")] + public int Status { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/Bind/AuthEntityUnbindAccountRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/Bind/AuthEntityUnbindAccountRequest.cs new file mode 100644 index 00000000..a812bcac --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/Bind/AuthEntityUnbindAccountRequest.cs @@ -0,0 +1,70 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.RoleApi.Models +{ + /// + /// 表示 [POST] /unbind_account 接口的请求。 + /// + public class AuthEntityUnbindAccountRequest : DouyinMicroAppRoleApiRequest + { + public static class Types + { + public class User + { + /// + /// 获取或设置应用的 ClientKey。 + /// + [Newtonsoft.Json.JsonProperty("client_key")] + [System.Text.Json.Serialization.JsonPropertyName("client_key")] + public string ClientKey { get; set; } = string.Empty; + + /// + /// 获取或设置用户的 OpenId。 + /// + [Newtonsoft.Json.JsonProperty("openid")] + [System.Text.Json.Serialization.JsonPropertyName("openid")] + public string OpenId { get; set; } = string.Empty; + } + } + + /// + /// 获取或设置服务商实体 ID。 + /// + [Newtonsoft.Json.JsonProperty("partner_entity_id")] + [System.Text.Json.Serialization.JsonPropertyName("partner_entity_id")] + public string? PartnerEntityId { get; set; } + + /// + /// 获取或设置商户实体 ID。 + /// + [Newtonsoft.Json.JsonProperty("merchant_entity_id")] + [System.Text.Json.Serialization.JsonPropertyName("merchant_entity_id")] + public string? MerchantEntityId { get; set; } + + /// + /// 获取或设置用户信息。 + /// + [Newtonsoft.Json.JsonProperty("c_user")] + [System.Text.Json.Serialization.JsonPropertyName("c_user")] + public Types.User? User { get; set; } + + /// + /// 获取或设置用户的抖音号。与字段 二选一。 + /// + [Newtonsoft.Json.JsonProperty("aweme_id")] + [System.Text.Json.Serialization.JsonPropertyName("aweme_id")] + public string? AwemeId { get; set; } + + /// + /// 获取或设置行业编码。 + /// + [Newtonsoft.Json.JsonProperty("industry_code")] + [System.Text.Json.Serialization.JsonPropertyName("industry_code")] + public int IndustryCode { get; set; } + + /// + /// 获取或设置行业角色。 + /// + [Newtonsoft.Json.JsonProperty("industry_role")] + [System.Text.Json.Serialization.JsonPropertyName("industry_role")] + public int IndustryRole { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/Bind/AuthEntityUnbindAccountResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/Bind/AuthEntityUnbindAccountResponse.cs new file mode 100644 index 00000000..0ac9536d --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/Bind/AuthEntityUnbindAccountResponse.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.RoleApi.Models +{ + /// + /// 表示 [POST] /unbind_account 接口的响应。 + /// + public class AuthEntityUnbindAccountResponse : DouyinMicroAppRoleApiResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/MerchantCode/AuthEntityActivateMerchantCodeRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/MerchantCode/AuthEntityActivateMerchantCodeRequest.cs similarity index 90% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/MerchantCode/AuthEntityActivateMerchantCodeRequest.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/MerchantCode/AuthEntityActivateMerchantCodeRequest.cs index 521a08f3..d105e7d4 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/MerchantCode/AuthEntityActivateMerchantCodeRequest.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/MerchantCode/AuthEntityActivateMerchantCodeRequest.cs @@ -1,9 +1,9 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.RoleApi.Models +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.RoleApi.Models { /// /// 表示 [POST] /activate_merchantcode 接口的请求。 /// - public class AuthEntityActivateMerchantCodeRequest : ByteDanceMicroAppRoleApiRequest + public class AuthEntityActivateMerchantCodeRequest : DouyinMicroAppRoleApiRequest { /// /// 获取或设置证件号码。 diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/MerchantCode/AuthEntityActivateMerchantCodeResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/MerchantCode/AuthEntityActivateMerchantCodeResponse.cs new file mode 100644 index 00000000..ba04eeaa --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/MerchantCode/AuthEntityActivateMerchantCodeResponse.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.RoleApi.Models +{ + /// + /// 表示 [POST] /activate_merchantcode 接口的响应。 + /// + public class AuthEntityActivateMerchantCodeResponse : DouyinMicroAppRoleApiResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/MerchantCode/AuthEntityQueryMerchantCodeStatusRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/MerchantCode/AuthEntityQueryMerchantCodeStatusRequest.cs similarity index 88% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/MerchantCode/AuthEntityQueryMerchantCodeStatusRequest.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/MerchantCode/AuthEntityQueryMerchantCodeStatusRequest.cs index 6e4d9942..eaca7efe 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/MerchantCode/AuthEntityQueryMerchantCodeStatusRequest.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/MerchantCode/AuthEntityQueryMerchantCodeStatusRequest.cs @@ -1,9 +1,9 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.RoleApi.Models +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.RoleApi.Models { /// /// 表示 [POST] /query_merchantcode_status 接口的请求。 /// - public class AuthEntityQueryMerchantCodeStatusRequest : ByteDanceMicroAppRoleApiRequest + public class AuthEntityQueryMerchantCodeStatusRequest : DouyinMicroAppRoleApiRequest { /// /// 获取或设置证件号码。 diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/MerchantCode/AuthEntityQueryMerchantCodeStatusResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/MerchantCode/AuthEntityQueryMerchantCodeStatusResponse.cs similarity index 80% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/MerchantCode/AuthEntityQueryMerchantCodeStatusResponse.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/MerchantCode/AuthEntityQueryMerchantCodeStatusResponse.cs index 0f95b974..be957e84 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/MerchantCode/AuthEntityQueryMerchantCodeStatusResponse.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/MerchantCode/AuthEntityQueryMerchantCodeStatusResponse.cs @@ -1,9 +1,9 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.RoleApi.Models +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.RoleApi.Models { /// /// 表示 [POST] /query_merchantcode_status 接口的响应。 /// - public class AuthEntityQueryMerchantCodeStatusResponse : ByteDanceMicroAppRoleApiResponse + public class AuthEntityQueryMerchantCodeStatusResponse : DouyinMicroAppRoleApiResponse { /// /// 获取或设置激活状态。 diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/Role/AuthEntityAddRoleRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/Role/AuthEntityAddRoleRequest.cs similarity index 98% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/Role/AuthEntityAddRoleRequest.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/Role/AuthEntityAddRoleRequest.cs index e8fa7ce5..284c8f86 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/Role/AuthEntityAddRoleRequest.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/Role/AuthEntityAddRoleRequest.cs @@ -1,11 +1,11 @@ using System.Collections.Generic; -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.RoleApi.Models +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.RoleApi.Models { /// /// 表示 [POST] /add_role 接口的请求。 /// - public class AuthEntityAddRoleRequest : ByteDanceMicroAppRoleApiRequest + public class AuthEntityAddRoleRequest : DouyinMicroAppRoleApiRequest { public static class Types { diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/Role/AuthEntityAddRoleResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/Role/AuthEntityAddRoleResponse.cs new file mode 100644 index 00000000..940013c1 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/Role/AuthEntityAddRoleResponse.cs @@ -0,0 +1,15 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.RoleApi.Models +{ + /// + /// 表示 [POST] /add_role 接口的响应。 + /// + public class AuthEntityAddRoleResponse : DouyinMicroAppRoleApiResponse + { + /// + /// 获取或设置类目认证任务 ID。 + /// + [Newtonsoft.Json.JsonProperty("add_role_taskid")] + [System.Text.Json.Serialization.JsonPropertyName("add_role_taskid")] + public string AddRoleTaskId { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/Role/AuthEntityAuthRoleRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/Role/AuthEntityAuthRoleRequest.cs similarity index 94% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/Role/AuthEntityAuthRoleRequest.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/Role/AuthEntityAuthRoleRequest.cs index 6638228f..0668e3e1 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/Role/AuthEntityAuthRoleRequest.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/Role/AuthEntityAuthRoleRequest.cs @@ -1,11 +1,11 @@ using System.Collections.Generic; -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.RoleApi.Models +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.RoleApi.Models { /// /// 表示 [POST] /auth_role 接口的请求。 /// - public class AuthEntityAuthRoleRequest : ByteDanceMicroAppRoleApiRequest + public class AuthEntityAuthRoleRequest : DouyinMicroAppRoleApiRequest { public static class Types { diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/Role/AuthEntityAuthRoleResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/Role/AuthEntityAuthRoleResponse.cs new file mode 100644 index 00000000..ff8a61ed --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/Role/AuthEntityAuthRoleResponse.cs @@ -0,0 +1,15 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.RoleApi.Models +{ + /// + /// 表示 [POST] /auth_role 接口的响应。 + /// + public class AuthEntityAuthRoleResponse : DouyinMicroAppRoleApiResponse + { + /// + /// 获取或设置绑定审核任务 ID。 + /// + [Newtonsoft.Json.JsonProperty("bind_taskid")] + [System.Text.Json.Serialization.JsonPropertyName("bind_taskid")] + public string? BindTaskId { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/Role/AuthEntityBindRoleRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/Role/AuthEntityBindRoleRequest.cs similarity index 86% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/Role/AuthEntityBindRoleRequest.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/Role/AuthEntityBindRoleRequest.cs index 787a04ef..00d91ec1 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/Role/AuthEntityBindRoleRequest.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/Role/AuthEntityBindRoleRequest.cs @@ -1,9 +1,9 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.RoleApi.Models +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.RoleApi.Models { /// /// 表示 [POST] /bind_role 接口的请求。 /// - public class AuthEntityBindRoleRequest : ByteDanceMicroAppRoleApiRequest + public class AuthEntityBindRoleRequest : DouyinMicroAppRoleApiRequest { /// /// 获取或设置商户实体 ID。 diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/Role/AuthEntityBindRoleResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/Role/AuthEntityBindRoleResponse.cs new file mode 100644 index 00000000..003cf1a2 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/Role/AuthEntityBindRoleResponse.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.RoleApi.Models +{ + /// + /// 表示 [POST] /bind_role 接口的响应。 + /// + public class AuthEntityBindRoleResponse : DouyinMicroAppRoleApiResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/Role/AuthEntityGetAppIdAuthRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/Role/AuthEntityGetAppIdAuthRequest.cs similarity index 86% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/Role/AuthEntityGetAppIdAuthRequest.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/Role/AuthEntityGetAppIdAuthRequest.cs index 2956d41f..2808109b 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/Role/AuthEntityGetAppIdAuthRequest.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/Role/AuthEntityGetAppIdAuthRequest.cs @@ -1,9 +1,9 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.RoleApi.Models +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.RoleApi.Models { /// /// 表示 [POST] /get_appid_auth 接口的请求。 /// - public class AuthEntityGetAppIdAuthRequest : ByteDanceMicroAppRoleApiRequest + public class AuthEntityGetAppIdAuthRequest : DouyinMicroAppRoleApiRequest { /// /// 获取或设置服务商实体 ID。 diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/Role/AuthEntityGetAppIdAuthResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/Role/AuthEntityGetAppIdAuthResponse.cs similarity index 95% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/Role/AuthEntityGetAppIdAuthResponse.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/Role/AuthEntityGetAppIdAuthResponse.cs index 0c4bc422..506dcfde 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/Role/AuthEntityGetAppIdAuthResponse.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/Role/AuthEntityGetAppIdAuthResponse.cs @@ -1,9 +1,9 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.RoleApi.Models +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.RoleApi.Models { /// /// 表示 [POST] /get_appid_auth 接口的响应。 /// - public class AuthEntityGetAppIdAuthResponse : ByteDanceMicroAppRoleApiResponse + public class AuthEntityGetAppIdAuthResponse : DouyinMicroAppRoleApiResponse { public static class Types { diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/Role/AuthEntityGetBindListRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/Role/AuthEntityGetBindListRequest.cs new file mode 100644 index 00000000..710d546e --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/Role/AuthEntityGetBindListRequest.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.RoleApi.Models +{ + /// + /// 表示 [POST] /get_bind_list 接口的请求。 + /// + public class AuthEntityGetBindListRequest : DouyinMicroAppRoleApiRequest + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/Role/AuthEntityGetBindListResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/Role/AuthEntityGetBindListResponse.cs similarity index 92% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/Role/AuthEntityGetBindListResponse.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/Role/AuthEntityGetBindListResponse.cs index 3f336af1..a1e76d8a 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/Role/AuthEntityGetBindListResponse.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/Role/AuthEntityGetBindListResponse.cs @@ -1,9 +1,9 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.RoleApi.Models +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.RoleApi.Models { /// /// 表示 [POST] /get_bind_list 接口的响应。 /// - public class AuthEntityGetBindListResponse : ByteDanceMicroAppRoleApiResponse + public class AuthEntityGetBindListResponse : DouyinMicroAppRoleApiResponse { public static class Types { diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/Role/AuthEntityUnauthRoleRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/Role/AuthEntityUnauthRoleRequest.cs similarity index 86% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/Role/AuthEntityUnauthRoleRequest.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/Role/AuthEntityUnauthRoleRequest.cs index 294ba12f..01731c8d 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/Role/AuthEntityUnauthRoleRequest.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/Role/AuthEntityUnauthRoleRequest.cs @@ -1,9 +1,9 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.RoleApi.Models +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.RoleApi.Models { /// /// 表示 [POST] /un_auth_role 接口的请求。 /// - public class AuthEntityUnauthRoleRequest : ByteDanceMicroAppRoleApiRequest + public class AuthEntityUnauthRoleRequest : DouyinMicroAppRoleApiRequest { /// /// 获取或设置服务商实体 ID。 diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/Role/AuthEntityUnauthRoleResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/Role/AuthEntityUnauthRoleResponse.cs new file mode 100644 index 00000000..69022a97 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/Role/AuthEntityUnauthRoleResponse.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.RoleApi.Models +{ + /// + /// 表示 [POST] /un_auth_role 接口的响应。 + /// + public class AuthEntityUnauthRoleResponse : DouyinMicroAppRoleApiResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/Role/AuthEntityUnbindRoleRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/Role/AuthEntityUnbindRoleRequest.cs similarity index 86% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/Role/AuthEntityUnbindRoleRequest.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/Role/AuthEntityUnbindRoleRequest.cs index 62f031bc..f4325225 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/Role/AuthEntityUnbindRoleRequest.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/Role/AuthEntityUnbindRoleRequest.cs @@ -1,9 +1,9 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.RoleApi.Models +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.RoleApi.Models { /// /// 表示 [POST] /unbind_role 接口的请求。 /// - public class AuthEntityUnbindRoleRequest : ByteDanceMicroAppRoleApiRequest + public class AuthEntityUnbindRoleRequest : DouyinMicroAppRoleApiRequest { /// /// 获取或设置商户实体 ID。 diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/Role/AuthEntityUnbindRoleResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/Role/AuthEntityUnbindRoleResponse.cs new file mode 100644 index 00000000..bd1dadf7 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/Role/AuthEntityUnbindRoleResponse.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.RoleApi.Models +{ + /// + /// 表示 [POST] /unbind_role 接口的响应。 + /// + public class AuthEntityUnbindRoleResponse : DouyinMicroAppRoleApiResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/Role/AuthEntityUpdateAuthLetterRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/Role/AuthEntityUpdateAuthLetterRequest.cs similarity index 94% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/Role/AuthEntityUpdateAuthLetterRequest.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/Role/AuthEntityUpdateAuthLetterRequest.cs index f8f1544f..44e40b2c 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/Role/AuthEntityUpdateAuthLetterRequest.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/Role/AuthEntityUpdateAuthLetterRequest.cs @@ -1,11 +1,11 @@ using System.Collections.Generic; -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.RoleApi.Models +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.RoleApi.Models { /// /// 表示 [POST] /update_authletter 接口的请求。 /// - public class AuthEntityUpdateAuthLetterRequest : ByteDanceMicroAppRoleApiRequest + public class AuthEntityUpdateAuthLetterRequest : DouyinMicroAppRoleApiRequest { public static class Types { diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/Role/AuthEntityUpdateAuthLetterResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/Role/AuthEntityUpdateAuthLetterResponse.cs new file mode 100644 index 00000000..64108faf --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Models/Role/AuthEntityUpdateAuthLetterResponse.cs @@ -0,0 +1,15 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.RoleApi.Models +{ + /// + /// 表示 [POST] /update_authletter 接口的响应。 + /// + public class AuthEntityUpdateAuthLetterResponse : DouyinMicroAppRoleApiResponse + { + /// + /// 获取或设置审核任务 ID。 + /// + [Newtonsoft.Json.JsonProperty("audit_taskid")] + [System.Text.Json.Serialization.JsonPropertyName("audit_taskid")] + public string AuditTaskId { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Settings/Credentials.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Settings/Credentials.cs new file mode 100644 index 00000000..8076081c --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/RoleApi/Settings/Credentials.cs @@ -0,0 +1,25 @@ +using System; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.RoleApi.Settings +{ + public class Credentials + { + /// + /// 初始化客户端时 的副本。 + /// + public string AppId { get; } + + /// + /// 初始化客户端时 的副本。 + /// + public string AppSecret { get; } + + internal Credentials(DouyinMicroAppRoleApiClientOptions options) + { + if (options is null) throw new ArgumentNullException(nameof(options)); + + AppId = options.AppId; + AppSecret = options.AppSecret; + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/DouyinMicroAppWebcastClient.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/DouyinMicroAppWebcastClient.cs new file mode 100644 index 00000000..a21dc74d --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/DouyinMicroAppWebcastClient.cs @@ -0,0 +1,106 @@ +using System; +using System.Net.Http; +using System.Threading; +using System.Threading.Tasks; +using Flurl.Http; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.Webcast +{ + /// + /// 一个抖音小程序直播小玩法 API HTTP 客户端。 + /// + public class DouyinMicroAppWebcastClient : CommonClientBase, ICommonClient + { + /// + /// 获取当前客户端使用的抖音小程序凭证。 + /// + public Settings.Credentials Credentials { get; } + + /// + /// 用指定的配置项初始化 类的新实例。 + /// + /// 配置项。 + public DouyinMicroAppWebcastClient(DouyinMicroAppWebcastClientOptions options) + : this(options, null) + { + } + + /// + /// + /// + /// + /// + /// + internal protected DouyinMicroAppWebcastClient(DouyinMicroAppWebcastClientOptions options, HttpClient? httpClient, bool disposeClient = true) + : base(httpClient, disposeClient) + { + if (options is null) throw new ArgumentNullException(nameof(options)); + + Credentials = new Settings.Credentials(options); + + FlurlClient.BaseUrl = options.Endpoint ?? DouyinMicroAppWebcastEndpoints.DEFAULT; + FlurlClient.WithHeader(HttpHeaders.Accept, MimeTypes.Json); + FlurlClient.WithTimeout(options.Timeout <= 0 ? Timeout.InfiniteTimeSpan : TimeSpan.FromMilliseconds(options.Timeout)); + + Interceptors.Add(new Interceptors.DouyinMicroAppWebcastRequestSigningInterceptor( + appId: options.AppId, + pkVersion: options.ApplicationPublicKeyVersion, + pkPem: options.ApplicationPrivateKey + )); + } + + /// + /// 使用当前客户端生成一个新的 对象。 + /// + /// + /// + /// + /// + public IFlurlRequest CreateFlurlRequest(DouyinMicroAppWebcastRequest request, HttpMethod httpMethod, params object[] urlSegments) + { + IFlurlRequest flurlRequest = base.CreateFlurlRequest(request, httpMethod, urlSegments); + + return flurlRequest; + } + + /// + /// 异步发起请求。 + /// + /// + /// + /// + /// + /// + public async Task SendFlurlRequestAsync(IFlurlRequest flurlRequest, HttpContent? httpContent = null, CancellationToken cancellationToken = default) + where T : DouyinMicroAppWebcastResponse, new() + { + if (flurlRequest is null) throw new ArgumentNullException(nameof(flurlRequest)); + + using IFlurlResponse flurlResponse = await base.SendFlurlRequestAsync(flurlRequest, httpContent, cancellationToken).ConfigureAwait(false); + return await WrapFlurlResponseAsJsonAsync(flurlResponse, cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步发起请求。 + /// + /// + /// + /// + /// + /// + public async Task SendFlurlRequestAsJsonAsync(IFlurlRequest flurlRequest, object? data = null, CancellationToken cancellationToken = default) + where T : DouyinMicroAppWebcastResponse, new() + { + if (flurlRequest is null) throw new ArgumentNullException(nameof(flurlRequest)); + + bool isSimpleRequest = data is null || + flurlRequest.Verb == HttpMethod.Get || + flurlRequest.Verb == HttpMethod.Head || + flurlRequest.Verb == HttpMethod.Options; + using IFlurlResponse flurlResponse = isSimpleRequest ? + await base.SendFlurlRequestAsync(flurlRequest, null, cancellationToken) : + await base.SendFlurlRequestAsJsonAsync(flurlRequest, data, cancellationToken).ConfigureAwait(false); + return await WrapFlurlResponseAsJsonAsync(flurlResponse, cancellationToken).ConfigureAwait(false); + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/DouyinMicroAppWebcastClientBuilder.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/DouyinMicroAppWebcastClientBuilder.cs new file mode 100644 index 00000000..3f193e99 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/DouyinMicroAppWebcastClientBuilder.cs @@ -0,0 +1,94 @@ +using System; +using System.Collections.Generic; +using System.Net.Http; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.Webcast +{ + /// + /// 用于构造 实例的构造器。 + /// + public partial class DouyinMicroAppWebcastClientBuilder : ICommonClientBuilder + { + private readonly DouyinMicroAppWebcastClientOptions _options; + private readonly IList> _configures; + private readonly IList _interceptors; + private HttpClient? _httpClient; + private bool? _disposeClient; + + private DouyinMicroAppWebcastClientBuilder(DouyinMicroAppWebcastClientOptions options) + { + _options = options; + _configures = new List>(); + _interceptors = new List(); + } + + ICommonClientBuilder ICommonClientBuilder.ConfigureSettings(Action configure) + { + return ConfigureSettings(configure); + } + + ICommonClientBuilder ICommonClientBuilder.UseInterceptor(HttpInterceptor interceptor) + { + return UseInterceptor(interceptor); + } + + ICommonClientBuilder ICommonClientBuilder.UseHttpClient(HttpClient httpClient, bool disposeClient) + { + return UseHttpClient(httpClient, disposeClient); + } + + public DouyinMicroAppWebcastClientBuilder ConfigureSettings(Action configure) + { + if (configure is null) throw new ArgumentNullException(nameof(configure)); + + _configures.Add(configure); + return this; + } + + public DouyinMicroAppWebcastClientBuilder UseInterceptor(HttpInterceptor interceptor) + { + if (interceptor is null) throw new ArgumentNullException(nameof(interceptor)); + + _interceptors.Add(interceptor); + return this; + } + + public DouyinMicroAppWebcastClientBuilder UseHttpClient(HttpClient httpClient, bool disposeClient = true) + { + if (httpClient is null) throw new ArgumentNullException(nameof(httpClient)); + + _httpClient = httpClient; + _disposeClient = disposeClient; + return this; + } + + public DouyinMicroAppWebcastClient Build() + { + DouyinMicroAppWebcastClient client = _disposeClient.HasValue + ? new DouyinMicroAppWebcastClient(_options, _httpClient, _disposeClient.Value) + : new DouyinMicroAppWebcastClient(_options, _httpClient); + + foreach (Action configure in _configures) + { + client.Configure(configure); + } + + foreach (HttpInterceptor interceptor in _interceptors) + { + client.Interceptors.Add(interceptor); + } + + return client; + } + } + + partial class DouyinMicroAppWebcastClientBuilder + { + public static DouyinMicroAppWebcastClientBuilder Create(DouyinMicroAppWebcastClientOptions options) + { + if (options is null) throw new ArgumentNullException(nameof(options)); + + return new DouyinMicroAppWebcastClientBuilder(options); + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/DouyinMicroAppWebcastClientOptions.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/DouyinMicroAppWebcastClientOptions.cs new file mode 100644 index 00000000..4632c3bd --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/DouyinMicroAppWebcastClientOptions.cs @@ -0,0 +1,46 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.Webcast +{ + /// + /// 一个用于构造 时使用的配置项。 + /// + public class DouyinMicroAppWebcastClientOptions + { + /// + /// 获取或设置请求超时时间(单位:毫秒)。 + /// 默认值:30000 + /// + public int Timeout { get; set; } = 30 * 1000; + + /// + /// 获取或设置抖音小程序直播小玩法 API 入口点。 + /// 默认值: + /// + public string Endpoint { get; set; } = DouyinMicroAppWebcastEndpoints.DEFAULT; + + /// + /// 获取或设置抖音小程序 AppId。 + /// + public string AppId { get; set; } = default!; + + /// + /// 获取或设置抖音小程序 AppSecret。 + /// + public string AppSecret { get; set; } = default!; + + /// + /// 获取或设置抖音小程序应用公钥版本号。 + /// 默认值:"1" + /// + public string ApplicationPublicKeyVersion { get; set; } = "1"; + + /// + /// 获取或设置抖音小程序应用私钥。 + /// + public string ApplicationPrivateKey { get; set; } = default!; + + /// + /// 获取或设置抖音小程序平台公钥。 + /// + public string PlatformPublicKey { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/DouyinMicroAppWebcastEndpoints.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/DouyinMicroAppWebcastEndpoints.cs new file mode 100644 index 00000000..a507d441 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/DouyinMicroAppWebcastEndpoints.cs @@ -0,0 +1,13 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.Webcast +{ + /// + /// 抖音小程序直播小玩法 API 接口域名。 + /// + public static class DouyinMicroAppWebcastEndpoints + { + /// + /// 主域名(默认)。 + /// + public const string DEFAULT = "https://webcast.bytedance.com/api"; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/DouyinMicroAppWebcastRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/DouyinMicroAppWebcastRequest.cs new file mode 100644 index 00000000..49188a19 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/DouyinMicroAppWebcastRequest.cs @@ -0,0 +1,15 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.Webcast +{ + /// + /// 抖音小程序直播小玩法 API 请求的基类。 + /// + public abstract class DouyinMicroAppWebcastRequest : CommonRequestBase, ICommonRequest + { + /// + /// 获取或设置抖音小程序的 AccessToken。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public virtual string? AccessToken { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/DouyinMicroAppWebcastResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/DouyinMicroAppWebcastResponse.cs new file mode 100644 index 00000000..c20704af --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/DouyinMicroAppWebcastResponse.cs @@ -0,0 +1,55 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.Webcast +{ + /// + /// 抖音小程序直播小玩法 API 响应的基类。 + /// + public abstract class DouyinMicroAppWebcastResponse : CommonResponseBase, ICommonResponse + { + /// + /// 获取抖音小程序 API 返回的错误码。 + /// + [Newtonsoft.Json.JsonProperty("errcode")] + [System.Text.Json.Serialization.JsonPropertyName("errcode")] + public virtual long ErrorCode { get; set; } + + /// + /// 获取抖音小程序 API 返回的错误描述。 + /// + [Newtonsoft.Json.JsonProperty("errmsg")] + [System.Text.Json.Serialization.JsonPropertyName("errmsg")] + public virtual string? ErrorMessage { get; set; } + + /// + /// 获取抖音应答时间戳。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string ByteTimestamp { get { return GetRawHeaders().GetFirstValueOrEmpty("Byte-Timestamp"); } } + + /// + /// 获取抖音应答随机串。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string ByteNonce { get { return GetRawHeaders().GetFirstValueOrEmpty("Byte-Nonce-Str"); } } + + /// + /// 获取抖音应答签名。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string ByteSignature { get { return GetRawHeaders().GetFirstValueOrEmpty("Byte-Signature"); } } + + /// + /// 获取一个值,该值指示调用抖音小程序 API 是否成功。 + /// + ///(即 HTTP 状态码为 200,且 值为 0) + /// + /// + /// + public override bool IsSuccessful() + { + return GetRawStatus() == 200 && ErrorCode == 0; + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Extensions/DouyinMicroAppWebcastClientExecuteBusinessExtensions.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Extensions/DouyinMicroAppWebcastClientExecuteBusinessExtensions.cs new file mode 100644 index 00000000..16184c75 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Extensions/DouyinMicroAppWebcastClientExecuteBusinessExtensions.cs @@ -0,0 +1,111 @@ +using System; +using System.Net.Http; +using System.Threading; +using System.Threading.Tasks; +using Flurl.Http; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.Webcast +{ + public static class DouyinMicroAppWebcastClientExecuteBusinessExtensions + { + /// + /// 异步调用 [POST] /business/order/pre_create 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteWebcastBusinessOrderPrecreateAsync(this DouyinMicroAppWebcastClient client, Models.WebcastBusinessOrderPrecreateRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (request.AppId is null) + request.AppId = client.Credentials.AppId; + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "business", "order", "pre_create"); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /business/diamond/query 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteWebcastBusinessDiamondQueryAsync(this DouyinMicroAppWebcastClient client, Models.WebcastBusinessDiamondQueryRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (request.AppId is null) + request.AppId = client.Credentials.AppId; + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "business", "diamond", "query"); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /business/diamond/reconciliation 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteWebcastBusinessDiamondReconciliationAsync(this DouyinMicroAppWebcastClient client, Models.WebcastBusinessDiamondReconciliationRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (request.AppId is null) + request.AppId = client.Credentials.AppId; + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "business", "diamond", "reconciliation"); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /business/diamond/order_ack 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteWebcastBusinessDiamondOrderAckAsync(this DouyinMicroAppWebcastClient client, Models.WebcastBusinessDiamondOrderAckRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (request.AppId is null) + request.AppId = client.Credentials.AppId; + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "business", "diamond", "order_ack"); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Extensions/DouyinMicroAppWebcastClientExecuteCardExtensions.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Extensions/DouyinMicroAppWebcastClientExecuteCardExtensions.cs new file mode 100644 index 00000000..28522456 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Extensions/DouyinMicroAppWebcastClientExecuteCardExtensions.cs @@ -0,0 +1,172 @@ +using System; +using System.Net.Http; +using System.Threading; +using System.Threading.Tasks; +using Flurl.Http; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.Webcast +{ + public static class DouyinMicroAppWebcastClientExecuteCardExtensions + { + /// + /// 异步调用 [POST] /card/default/set 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteWebcastCardDefaultSetAsync(this DouyinMicroAppWebcastClient client, Models.WebcastCardDefaultSetRequest 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, "card", "default", "set") + .WithHeader("X-Token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /card/default/get 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteWebcastCardDefaultGetAsync(this DouyinMicroAppWebcastClient client, Models.WebcastCardDefaultGetRequest 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, "card", "default", "get") + .WithHeader("X-Token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /card/set 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteWebcastCardSetAsync(this DouyinMicroAppWebcastClient client, Models.WebcastCardSetRequest 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, "card", "set") + .WithHeader("X-Token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /card/get 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteWebcastCardGetAsync(this DouyinMicroAppWebcastClient client, Models.WebcastCardGetRequest 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, "card", "get") + .WithHeader("X-Token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /card/delete 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteWebcastCardDeleteAsync(this DouyinMicroAppWebcastClient client, Models.WebcastCardDeleteRequest 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, "card", "delete") + .WithHeader("X-Token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /card/update 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteWebcastCardUpdateAsync(this DouyinMicroAppWebcastClient client, Models.WebcastCardUpdateRequest 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, "card", "update") + .WithHeader("X-Token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /card/get_all_cards_for_user 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteWebcastCardGetAllCardsForUserAsync(this DouyinMicroAppWebcastClient client, Models.WebcastCardGetAllCardsForUserRequest 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, "card", "get_all_cards_for_user") + .WithHeader("X-Token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Extensions/DouyinMicroAppWebcastClientExecuteFileExtensions.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Extensions/DouyinMicroAppWebcastClientExecuteFileExtensions.cs new file mode 100644 index 00000000..3adc29cc --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Extensions/DouyinMicroAppWebcastClientExecuteFileExtensions.cs @@ -0,0 +1,90 @@ +using System; +using System.Net.Http; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using Flurl.Http; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.Webcast +{ + public static class DouyinMicroAppWebcastClientExecuteFileExtensions + { + /// + /// 异步调用 [POST] /file/card_image/upload 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteWebcastFileCardImageUploadAsync(this DouyinMicroAppWebcastClient client, Models.WebcastFileCardImageUploadRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (request.ImageFileName is null) + request.ImageFileName = Guid.NewGuid().ToString("N").ToLower() + ".jpg"; + + if (request.ImageFileContentType is null) + request.ImageFileContentType = "image/jpeg"; + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "file", "card_image", "upload") + .WithHeader("X-Token", request.AccessToken); + + using var httpContent = Utilities.FileHttpContentBuilder.Build(fileName: request.ImageFileName, fileBytes: request.ImageFileBytes, fileContentType: request.ImageFileContentType, formDataName: "image_file"); + httpContent.Add(new ByteArrayContent(Encoding.UTF8.GetBytes(request.ImageId)), "image_id"); + + return await client.SendFlurlRequestAsync(flurlReq, httpContent: httpContent, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /file/card_image/get 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteWebcastFileCardImageGetAsync(this DouyinMicroAppWebcastClient client, Models.WebcastFileCardImageGetRequest 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, "file", "card_image", "get") + .WithHeader("X-Token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /file/card_image/delete 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteWebcastFileCardImageDeleteAsync(this DouyinMicroAppWebcastClient client, Models.WebcastFileCardImageDeleteRequest 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, "file", "card_image", "delete") + .WithHeader("X-Token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Extensions/DouyinMicroAppWebcastClientExecuteGiftExtensions.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Extensions/DouyinMicroAppWebcastClientExecuteGiftExtensions.cs new file mode 100644 index 00000000..51308df9 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Extensions/DouyinMicroAppWebcastClientExecuteGiftExtensions.cs @@ -0,0 +1,37 @@ +using System; +using System.Net.Http; +using System.Threading; +using System.Threading.Tasks; +using Flurl.Http; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.Webcast +{ + public static class DouyinMicroAppWebcastClientExecuteGiftExtensions + { + /// + /// 异步调用 [POST] /gift/top_gift 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteWebcastGiftTopGiftAsync(this DouyinMicroAppWebcastClient client, Models.WebcastGiftTopGiftRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (request.AppId is null) + request.AppId = client.Credentials.AppId; + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "gift", "top_gift") + .WithHeader("X-Token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Extensions/DouyinMicroAppWebcastClientExecuteLinkMicExtensions.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Extensions/DouyinMicroAppWebcastClientExecuteLinkMicExtensions.cs new file mode 100644 index 00000000..47bdecf8 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Extensions/DouyinMicroAppWebcastClientExecuteLinkMicExtensions.cs @@ -0,0 +1,37 @@ +using System; +using System.Net.Http; +using System.Threading; +using System.Threading.Tasks; +using Flurl.Http; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.Webcast +{ + public static class DouyinMicroAppWebcastClientExecuteLinkMicExtensions + { + /// + /// 异步调用 [POST] /linkmic/query 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteWebcastLinkMicQueryAsync(this DouyinMicroAppWebcastClient client, Models.WebcastLinkMicQueryRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (request.AppId is null) + request.AppId = client.Credentials.AppId; + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "linkmic", "query") + .WithHeader("X-Token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Extensions/DouyinMicroAppWebcastClientExecuteLiveDataExtensions.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Extensions/DouyinMicroAppWebcastClientExecuteLiveDataExtensions.cs new file mode 100644 index 00000000..d68d50d2 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Extensions/DouyinMicroAppWebcastClientExecuteLiveDataExtensions.cs @@ -0,0 +1,123 @@ +using System; +using System.Net.Http; +using System.Threading; +using System.Threading.Tasks; +using Flurl.Http; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.Webcast +{ + public static class DouyinMicroAppWebcastClientExecuteLiveDataExtensions + { + /// + /// 异步调用 [POST] /live_data/task/start 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteWebcastLiveDataTaskStartAsync(this DouyinMicroAppWebcastClient client, Models.WebcastLiveDataTaskStartRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (request.AppId is null) + request.AppId = client.Credentials.AppId; + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "live_data", "task", "start") + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /live_data/task/stop 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteWebcastLiveDataTaskStopAsync(this DouyinMicroAppWebcastClient client, Models.WebcastLiveDataTaskStopRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (request.AppId is null) + request.AppId = client.Credentials.AppId; + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "live_data", "task", "stop") + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [GET] /live_data/task/get 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteWebcastLiveDataTaskGetAsync(this DouyinMicroAppWebcastClient client, Models.WebcastLiveDataTaskGetRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (request.AppId is null) + request.AppId = client.Credentials.AppId; + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Get, "live_data", "task", "get") + .WithHeader("access-token", request.AccessToken) + .WithHeader("appid", request.AppId) + .WithHeader("roomid", request.RoomId) + .WithHeader("msg_type", request.MessageType); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [GET] /live_data/task/fail_data/get 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteWebcastLiveDataTaskFailDataGetAsync(this DouyinMicroAppWebcastClient client, Models.WebcastLiveDataTaskFailDataGetRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (request.AppId is null) + request.AppId = client.Credentials.AppId; + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Get, "live_data", "task", "fail_data", "get") + .WithHeader("access-token", request.AccessToken) + .WithHeader("appid", request.AppId) + .WithHeader("roomid", request.RoomId) + .WithHeader("msg_type", request.MessageType) + .WithHeader("page_num", request.PageNumber) + .WithHeader("page_size", request.PageSize); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Extensions/DouyinMicroAppWebcastClientExecuteQuizExtensions.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Extensions/DouyinMicroAppWebcastClientExecuteQuizExtensions.cs new file mode 100644 index 00000000..60f3ba0f --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Extensions/DouyinMicroAppWebcastClientExecuteQuizExtensions.cs @@ -0,0 +1,43 @@ +using System; +using System.Net.Http; +using System.Threading; +using System.Threading.Tasks; +using Flurl.Http; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.Webcast +{ + public static class DouyinMicroAppWebcastClientExecuteQuizExtensions + { + /// + /// 异步调用 [GET] /quiz/get 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteWebcastQuizGetAsync(this DouyinMicroAppWebcastClient client, Models.WebcastQuizGetRequest 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.Get, "quiz", "get") + .WithHeader("X-Token", request.AccessToken); + + if (request.Level is not null) + flurlReq.SetQueryParam("level", request.Level.Value); + + if (request.Type is not null) + flurlReq.SetQueryParam("type", request.Type.Value); + + if (request.Number is not null) + flurlReq.SetQueryParam("num", request.Number.Value); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Extensions/DouyinMicroAppWebcastClientResponseVerificationExtensions.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Extensions/DouyinMicroAppWebcastClientResponseVerificationExtensions.cs new file mode 100644 index 00000000..37e5ebab --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Extensions/DouyinMicroAppWebcastClientResponseVerificationExtensions.cs @@ -0,0 +1,61 @@ +using System; +using System.Net.Http; +using System.Threading; +using System.Threading.Tasks; +using Flurl.Http; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.Webcast +{ + using System.Text; + using SKIT.FlurlHttpClient.Primitives; + + public static class DouyinMicroAppWebcastClientResponseVerificationExtensions + { + /// + /// 验证响应签名。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + public static ErroredResult VerifyResponseSignature(this DouyinMicroAppWebcastClient client, TResponse response) + where TResponse : DouyinMicroAppWebcastResponse + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (response is null) throw new ArgumentNullException(nameof(response)); + + ErroredResult result; + + try + { + StringBuilder stringBuilder = new StringBuilder(); + stringBuilder.Append(response.ByteTimestamp); + stringBuilder.Append("\n"); + stringBuilder.Append(response.ByteNonce); + stringBuilder.Append("\n"); + stringBuilder.Append(Encoding.UTF8.GetString(response.GetRawBytes())); + stringBuilder.Append("\n"); + + bool valid = Utilities.RSAUtility.Verify( + publicKeyPem: client.Credentials.PlatformPublicKey, + messageData: stringBuilder.ToString(), + encodingSignature: new EncodedString(response.ByteSignature, EncodingKinds.Base64), + Utilities.RSAUtility.DIGEST_ALGORITHM_SHA256 + ); + if (valid) + result = ErroredResult.Ok(); + else + result = ErroredResult.Fail(new Exception($"Signature does not match. Maybe \"{response.ByteSignature}\" is an illegal signature.")); + } + catch (Exception ex) + { + result = ErroredResult.Fail(ex); + } + + return result; + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Interceptors/DouyinMicroAppWebcastRequestSigningInterceptor.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Interceptors/DouyinMicroAppWebcastRequestSigningInterceptor.cs new file mode 100644 index 00000000..1408329c --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Interceptors/DouyinMicroAppWebcastRequestSigningInterceptor.cs @@ -0,0 +1,64 @@ +using System; +using System.Linq; +using System.Net.Http; +using System.Threading; +using System.Threading.Tasks; +using Flurl.Http; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Interceptors +{ + using SKIT.FlurlHttpClient.Internal; + + internal class DouyinMicroAppWebcastRequestSigningInterceptor : HttpInterceptor + { + private readonly string _appId; + private readonly string _pkVersion; + private readonly string _pkPem; + + public DouyinMicroAppWebcastRequestSigningInterceptor(string appId, string pkVersion, string pkPem) + { + _appId = appId; + _pkVersion = pkVersion; + _pkPem = pkPem; + } + + public override async Task BeforeCallAsync(HttpInterceptorContext context, CancellationToken cancellationToken = default) + { + if (context is null) throw new ArgumentNullException(nameof(context)); + if (context.FlurlCall.Completed) throw new DouyinMicroAppException("Failed to sign request. This interceptor must be called before request completed."); + + string method = context.FlurlCall.HttpRequestMessage.Method.ToString().ToUpper(); + string url = context.FlurlCall.HttpRequestMessage.RequestUri?.PathAndQuery ?? string.Empty; + string timestamp = DateTimeOffset.Now.ToLocalTime().ToUnixTimeSeconds().ToString(); + string nonce = Guid.NewGuid().ToString("N"); + string body = string.Empty; + + if (context.FlurlCall.HttpRequestMessage?.Content is not null) + { + if (context.FlurlCall.HttpRequestMessage.Content is MultipartFormDataContent) + { + // noop! + } + else if (method != "GET") + { + HttpContent httpContent = context.FlurlCall.HttpRequestMessage.Content; + body = await _AsyncEx.RunTaskWithCancellationTokenAsync(httpContent.ReadAsStringAsync(), cancellationToken).ConfigureAwait(false); + } + } + + string signData = $"{method}\n{url}\n{timestamp}\n{nonce}\n{body}\n"; + string sign; + + try + { + sign = Utilities.RSAUtility.Sign(_pkPem, signData, Utilities.RSAUtility.DIGEST_ALGORITHM_SHA256).Value!; + } + catch (Exception ex) + { + throw new DouyinMicroAppException("Failed to sign request. Please see the inner exception for more details.", ex); + } + + context.FlurlCall.Request.WithHeader("Byte-Authorization", $"SHA256-RSA2048 appid=\"{_appId}\",nonce_str=\"{nonce}\",timestamp=\"{timestamp}\",key_version=\"{_pkVersion}\",signature=\"{sign}\""); + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/Business/WebcastBusinessDiamondOrderAckRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/Business/WebcastBusinessDiamondOrderAckRequest.cs new file mode 100644 index 00000000..17e34f06 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/Business/WebcastBusinessDiamondOrderAckRequest.cs @@ -0,0 +1,36 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.Webcast.Models +{ + /// + /// 表示 [POST] /business/diamond/order_ack 接口的请求。 + /// + public class WebcastBusinessDiamondOrderAckRequest : DouyinMicroAppWebcastRequest + { + /// + /// 获取或设置应用的 AppId。如果不指定将使用构造 时的 参数。 + /// + [Newtonsoft.Json.JsonProperty("app_id")] + [System.Text.Json.Serialization.JsonPropertyName("app_id")] + public string? AppId { get; set; } + + /// + /// 获取或设置订单 ID。 + /// + [Newtonsoft.Json.JsonProperty("order_id")] + [System.Text.Json.Serialization.JsonPropertyName("order_id")] + public string OrderId { get; set; } = string.Empty; + + /// + /// 获取或设置抖币数量。 + /// + [Newtonsoft.Json.JsonProperty("diamonds")] + [System.Text.Json.Serialization.JsonPropertyName("diamonds")] + public int Diamonds { get; set; } + + /// + /// 获取或设置用户的 OpenId。 + /// + [Newtonsoft.Json.JsonProperty("open_id")] + [System.Text.Json.Serialization.JsonPropertyName("open_id")] + public string OpenId { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/Business/WebcastBusinessDiamondOrderAckResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/Business/WebcastBusinessDiamondOrderAckResponse.cs new file mode 100644 index 00000000..51c1749d --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/Business/WebcastBusinessDiamondOrderAckResponse.cs @@ -0,0 +1,15 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.Webcast.Models +{ + /// + /// 表示 [POST] /business/diamond/order_ack 接口的响应。 + /// + public class WebcastBusinessDiamondOrderAckResponse : DouyinMicroAppWebcastResponse + { + /// + /// 获取或设置支付状态。 + /// + [Newtonsoft.Json.JsonProperty("ack_status")] + [System.Text.Json.Serialization.JsonPropertyName("ack_status")] + public int AckStatus { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/Business/WebcastBusinessDiamondQueryRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/Business/WebcastBusinessDiamondQueryRequest.cs new file mode 100644 index 00000000..4452fdb5 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/Business/WebcastBusinessDiamondQueryRequest.cs @@ -0,0 +1,22 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.Webcast.Models +{ + /// + /// 表示 [POST] /business/diamond/query 接口的请求。 + /// + public class WebcastBusinessDiamondQueryRequest : DouyinMicroAppWebcastRequest + { + /// + /// 获取或设置应用的 AppId。如果不指定将使用构造 时的 参数。 + /// + [Newtonsoft.Json.JsonProperty("appid")] + [System.Text.Json.Serialization.JsonPropertyName("appid")] + public string? AppId { get; set; } + + /// + /// 获取或设置订单 ID。 + /// + [Newtonsoft.Json.JsonProperty("order_id")] + [System.Text.Json.Serialization.JsonPropertyName("order_id")] + public string OrderId { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/Business/WebcastBusinessDiamondQueryResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/Business/WebcastBusinessDiamondQueryResponse.cs new file mode 100644 index 00000000..731ea082 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/Business/WebcastBusinessDiamondQueryResponse.cs @@ -0,0 +1,43 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.Webcast.Models +{ + /// + /// 表示 [POST] /business/diamond/query 接口的响应。 + /// + public class WebcastBusinessDiamondQueryResponse : DouyinMicroAppWebcastResponse + { + /// + /// 获取或设置订单 ID。 + /// + [Newtonsoft.Json.JsonProperty("order_id")] + [System.Text.Json.Serialization.JsonPropertyName("order_id")] + public string OrderId { get; set; } = default!; + + /// + /// 获取或设置订单状态。 + /// + [Newtonsoft.Json.JsonProperty("order_status")] + [System.Text.Json.Serialization.JsonPropertyName("order_status")] + public int OrderStatus { get; set; } + + /// + /// 获取或设置付费点。 + /// + [Newtonsoft.Json.JsonProperty("pay_tag")] + [System.Text.Json.Serialization.JsonPropertyName("pay_tag")] + public string PayTag { get; set; } = default!; + + /// + /// 获取或设置用户的 OpenId。 + /// + [Newtonsoft.Json.JsonProperty("open_id")] + [System.Text.Json.Serialization.JsonPropertyName("open_id")] + public string OpenId { get; set; } = default!; + + /// + /// 获取或设置抖币数量。 + /// + [Newtonsoft.Json.JsonProperty("diamonds")] + [System.Text.Json.Serialization.JsonPropertyName("diamonds")] + public int Diamonds { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/Business/WebcastBusinessDiamondReconciliationRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/Business/WebcastBusinessDiamondReconciliationRequest.cs new file mode 100644 index 00000000..6d5cc0bf --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/Business/WebcastBusinessDiamondReconciliationRequest.cs @@ -0,0 +1,50 @@ +using System; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.Webcast.Models +{ + /// + /// 表示 [POST] /business/diamond/reconciliation 接口的请求。 + /// + public class WebcastBusinessDiamondReconciliationRequest : DouyinMicroAppWebcastRequest + { + /// + /// 获取或设置应用的 AppId。如果不指定将使用构造 时的 参数。 + /// + [Newtonsoft.Json.JsonProperty("appid")] + [System.Text.Json.Serialization.JsonPropertyName("appid")] + public string? AppId { get; set; } + + /// + /// 获取或设置查询起始时间。 + /// + [Newtonsoft.Json.JsonProperty("start_time")] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.BasicDateTimeOffsetConverter))] + [System.Text.Json.Serialization.JsonPropertyName("start_time")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.BasicDateTimeOffsetConverter))] + public DateTimeOffset StartTime { get; set; } + + /// + /// 获取或设置查询终止时间。 + /// + [Newtonsoft.Json.JsonProperty("end_time")] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.BasicDateTimeOffsetConverter))] + [System.Text.Json.Serialization.JsonPropertyName("end_time")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.BasicDateTimeOffsetConverter))] + public DateTimeOffset EndTime { get; set; } + + /// + /// 获取或设置分页每页数量。 + /// 默认值:100 + /// + [Newtonsoft.Json.JsonProperty("limit")] + [System.Text.Json.Serialization.JsonPropertyName("limit")] + public int Limit { get; set; } = 100; + + /// + /// 获取或设置分页起始位置。 + /// + [Newtonsoft.Json.JsonProperty("offset")] + [System.Text.Json.Serialization.JsonPropertyName("offset")] + public int Offset { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/Business/WebcastBusinessDiamondReconciliationResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/Business/WebcastBusinessDiamondReconciliationResponse.cs new file mode 100644 index 00000000..60d7865b --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/Business/WebcastBusinessDiamondReconciliationResponse.cs @@ -0,0 +1,81 @@ +using System; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.Webcast.Models +{ + /// + /// 表示 [POST] /business/diamond/reconciliation 接口的响应。 + /// + public class WebcastBusinessDiamondReconciliationResponse : DouyinMicroAppWebcastResponse + { + public static class Types + { + public class Order + { + /// + /// 获取或设置直播间 ID。 + /// + [Newtonsoft.Json.JsonProperty("room_id")] + [System.Text.Json.Serialization.JsonPropertyName("room_id")] + public string RoomId { get; set; } = default!; + + /// + /// 获取或设置订单 ID。 + /// + [Newtonsoft.Json.JsonProperty("order_id")] + [System.Text.Json.Serialization.JsonPropertyName("order_id")] + public string OrderId { get; set; } = default!; + + /// + /// 获取或设置订单状态。 + /// + [Newtonsoft.Json.JsonProperty("order_status")] + [System.Text.Json.Serialization.JsonPropertyName("order_status")] + public int OrderStatus { get; set; } + + /// + /// 获取或设置付费点。 + /// + [Newtonsoft.Json.JsonProperty("pay_tag")] + [System.Text.Json.Serialization.JsonPropertyName("pay_tag")] + public string PayTag { get; set; } = default!; + + /// + /// 获取或设置用户的 OpenId。 + /// + [Newtonsoft.Json.JsonProperty("open_id")] + [System.Text.Json.Serialization.JsonPropertyName("open_id")] + public string OpenId { get; set; } = default!; + + /// + /// 获取或设置抖币数量。 + /// + [Newtonsoft.Json.JsonProperty("diamonds")] + [System.Text.Json.Serialization.JsonPropertyName("diamonds")] + public int Diamonds { get; set; } + + /// + /// 获取或设置创建时间。 + /// + [Newtonsoft.Json.JsonProperty("create_time")] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.BasicDateTimeOffsetConverter))] + [System.Text.Json.Serialization.JsonPropertyName("create_time")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.BasicDateTimeOffsetConverter))] + public DateTimeOffset CreateTime { get; set; } + } + } + + /// + /// 获取或设置订单列表。 + /// + [Newtonsoft.Json.JsonProperty("order_list")] + [System.Text.Json.Serialization.JsonPropertyName("order_list")] + public Types.Order[] OrderList { get; set; } = default!; + + /// + /// 获取或设置数据总量。 + /// + [Newtonsoft.Json.JsonProperty("size")] + [System.Text.Json.Serialization.JsonPropertyName("size")] + public int TotalCount { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/Business/WebcastBusinessOrderPrecreateRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/Business/WebcastBusinessOrderPrecreateRequest.cs new file mode 100644 index 00000000..bffdf518 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/Business/WebcastBusinessOrderPrecreateRequest.cs @@ -0,0 +1,57 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.Webcast.Models +{ + /// + /// 表示 [POST] /business/order/pre_create 接口的请求。 + /// + public class WebcastBusinessOrderPrecreateRequest : DouyinMicroAppWebcastRequest + { + /// + /// 获取或设置应用的 AppId。如果不指定将使用构造 时的 参数。 + /// + [Newtonsoft.Json.JsonProperty("app_id")] + [System.Text.Json.Serialization.JsonPropertyName("app_id")] + public string? AppId { get; set; } + + /// + /// 获取或设置开发者订单号。 + /// + [Newtonsoft.Json.JsonProperty("out_trade_no")] + [System.Text.Json.Serialization.JsonPropertyName("out_trade_no")] + public string OutTradeNumber { get; set; } = string.Empty; + + /// + /// 获取或设置付费点。 + /// + [Newtonsoft.Json.JsonProperty("pay_tag")] + [System.Text.Json.Serialization.JsonPropertyName("pay_tag")] + public string PayTag { get; set; } = string.Empty; + + /// + /// 获取或设置抖币数量。 + /// + [Newtonsoft.Json.JsonProperty("diamonds")] + [System.Text.Json.Serialization.JsonPropertyName("diamonds")] + public int Diamonds { get; set; } + + /// + /// 获取或设置用户的 OpenId。 + /// + [Newtonsoft.Json.JsonProperty("open_id")] + [System.Text.Json.Serialization.JsonPropertyName("open_id")] + public string OpenId { get; set; } = string.Empty; + + /// + /// 获取或设置通知回调 URL。 + /// + [Newtonsoft.Json.JsonProperty("notify_url")] + [System.Text.Json.Serialization.JsonPropertyName("notify_url")] + public string NotifyUrl { get; set; } = string.Empty; + + /// + /// 获取或设置有效期(单位:秒)。 + /// + [Newtonsoft.Json.JsonProperty("valid_time")] + [System.Text.Json.Serialization.JsonPropertyName("valid_time")] + public int ValidIn { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/Business/WebcastBusinessOrderPrecreateResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/Business/WebcastBusinessOrderPrecreateResponse.cs new file mode 100644 index 00000000..7c5bc04f --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/Business/WebcastBusinessOrderPrecreateResponse.cs @@ -0,0 +1,15 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.Webcast.Models +{ + /// + /// 表示 [POST] /business/order/pre_create 接口的响应。 + /// + public class WebcastBusinessOrderPrecreateResponse : DouyinMicroAppWebcastResponse + { + /// + /// 获取或设置订单 ID。 + /// + [Newtonsoft.Json.JsonProperty("order_id")] + [System.Text.Json.Serialization.JsonPropertyName("order_id")] + public string OrderId { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/Card/WebcastCardDefaultGetRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/Card/WebcastCardDefaultGetRequest.cs new file mode 100644 index 00000000..fb590acc --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/Card/WebcastCardDefaultGetRequest.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.Webcast.Models +{ + /// + /// 表示 [POST] /card/default/get 接口的请求。 + /// + public class WebcastCardDefaultGetRequest : DouyinMicroAppWebcastRequest + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/Card/WebcastCardDefaultGetResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/Card/WebcastCardDefaultGetResponse.cs new file mode 100644 index 00000000..6c3689c4 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/Card/WebcastCardDefaultGetResponse.cs @@ -0,0 +1,162 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.Webcast.Models +{ + /// + /// 表示 [POST] /card/default/get 接口的响应。 + /// + public class WebcastCardDefaultGetResponse : DouyinMicroAppWebcastResponse + { + public static class Types + { + public class CardValue + { + public static class Types + { + public class TitleInfo + { + /// + /// 获取或设置主标题。 + /// + [Newtonsoft.Json.JsonProperty("main_title")] + [System.Text.Json.Serialization.JsonPropertyName("main_title")] + public string MainTitle { get; set; } = default!; + + /// + /// 获取或设置副标题。 + /// + [Newtonsoft.Json.JsonProperty("sub_title")] + [System.Text.Json.Serialization.JsonPropertyName("sub_title")] + public string? SubTitle { get; set; } + } + + public class StatusTagInfo + { + /// + /// 获取或设置标签类型。 + /// + [Newtonsoft.Json.JsonProperty("tag_type")] + [System.Text.Json.Serialization.JsonPropertyName("tag_type")] + public int? TagType { get; set; } + + /// + /// 获取或设置活动开始时间戳。 + /// + [Newtonsoft.Json.JsonProperty("start_timestamp")] + [System.Text.Json.Serialization.JsonPropertyName("start_timestamp")] + public long? StartTimestamp { get; set; } + + /// + /// 获取或设置活动结束时间戳。 + /// + [Newtonsoft.Json.JsonProperty("stop_timestamp")] + [System.Text.Json.Serialization.JsonPropertyName("stop_timestamp")] + public long? StopTimestamp { get; set; } + } + + public class PropertyTagInfo + { + /// + /// 获取或设置店铺 Logo 图片 ID。 + /// + [Newtonsoft.Json.JsonProperty("store_logo_id")] + [System.Text.Json.Serialization.JsonPropertyName("store_logo_id")] + public string? StoreLogoImageId { get; set; } + + /// + /// 获取或设置店铺名称。 + /// + [Newtonsoft.Json.JsonProperty("store_name")] + [System.Text.Json.Serialization.JsonPropertyName("store_name")] + public string? StoreName { get; set; } + } + + public class ButtonInfo + { + /// + /// 获取或设置按钮类型。 + /// + [Newtonsoft.Json.JsonProperty("btn_type")] + [System.Text.Json.Serialization.JsonPropertyName("btn_type")] + public int? ButtonType { get; set; } + + /// + /// 获取或设置价格字符串。 + /// + [Newtonsoft.Json.JsonProperty("price")] + [System.Text.Json.Serialization.JsonPropertyName("price")] + public string? PriceString { get; set; } + + /// + /// 获取或设置颜色十六进制值。 + /// + [Newtonsoft.Json.JsonProperty("color")] + [System.Text.Json.Serialization.JsonPropertyName("color")] + public string? Color { get; set; } + } + } + + /// + /// 获取或设置图片 ID。 + /// + [Newtonsoft.Json.JsonProperty("image_id")] + [System.Text.Json.Serialization.JsonPropertyName("image_id")] + public string ImageId { get; set; } = default!; + + /// + /// 获取或设置状态标签信息。 + /// + [Newtonsoft.Json.JsonProperty("status_tag")] + [System.Text.Json.Serialization.JsonPropertyName("status_tag")] + public Types.StatusTagInfo? StatusTagInfo { get; set; } + + /// + /// 获取或设置属性标签信息。 + /// + [Newtonsoft.Json.JsonProperty("property_tag")] + [System.Text.Json.Serialization.JsonPropertyName("property_tag")] + public Types.PropertyTagInfo? PropertyTagInfo { get; set; } + + /// + /// 获取或设置标题信息。 + /// + [Newtonsoft.Json.JsonProperty("title")] + [System.Text.Json.Serialization.JsonPropertyName("title")] + public Types.TitleInfo? TitleInfo { get; set; } + + /// + /// 获取或设置按钮信息。 + /// + [Newtonsoft.Json.JsonProperty("btn")] + [System.Text.Json.Serialization.JsonPropertyName("btn")] + public Types.ButtonInfo? ButtonInfo { get; set; } + } + } + + /// + /// 获取或设置讲解卡类型。 + /// + [Newtonsoft.Json.JsonProperty("card_type")] + [System.Text.Json.Serialization.JsonPropertyName("card_type")] + public int CardType { get; set; } + + /// + /// 获取或设置讲解卡内容。 + /// + [Newtonsoft.Json.JsonProperty("value")] + [System.Text.Json.Serialization.JsonPropertyName("value")] + public Types.CardValue CardValue { get; set; } = default!; + + /// + /// 获取或设置审核状态。 + /// + [Newtonsoft.Json.JsonProperty("status")] + [System.Text.Json.Serialization.JsonPropertyName("status")] + public int Status { get; set; } + + /// + /// 获取或设置审核意见。 + /// + [Newtonsoft.Json.JsonProperty("audit_opinion")] + [System.Text.Json.Serialization.JsonPropertyName("audit_opinion")] + public string? AuditOpinion { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/Card/WebcastCardDefaultSetRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/Card/WebcastCardDefaultSetRequest.cs new file mode 100644 index 00000000..0cfe354f --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/Card/WebcastCardDefaultSetRequest.cs @@ -0,0 +1,151 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.Webcast.Models +{ + /// + /// 表示 [POST] /card/default/set 接口的请求。 + /// + public class WebcastCardDefaultSetRequest : DouyinMicroAppWebcastRequest + { + public static class Types + { + public class CardValue + { + public static class Types + { + public class TitleInfo + { + /// + /// 获取或设置主标题。 + /// + [Newtonsoft.Json.JsonProperty("main_title")] + [System.Text.Json.Serialization.JsonPropertyName("main_title")] + public string MainTitle { get; set; } = string.Empty; + + /// + /// 获取或设置副标题。 + /// + [Newtonsoft.Json.JsonProperty("sub_title")] + [System.Text.Json.Serialization.JsonPropertyName("sub_title")] + public string? SubTitle { get; set; } + } + + public class StatusTagInfo + { + /// + /// 获取或设置标签类型。 + /// + [Newtonsoft.Json.JsonProperty("tag_type")] + [System.Text.Json.Serialization.JsonPropertyName("tag_type")] + public int? TagType { get; set; } + + /// + /// 获取或设置活动开始时间戳。 + /// + [Newtonsoft.Json.JsonProperty("start_timestamp")] + [System.Text.Json.Serialization.JsonPropertyName("start_timestamp")] + public long? StartTimestamp { get; set; } + + /// + /// 获取或设置活动结束时间戳。 + /// + [Newtonsoft.Json.JsonProperty("stop_timestamp")] + [System.Text.Json.Serialization.JsonPropertyName("stop_timestamp")] + public long? StopTimestamp { get; set; } + } + + public class PropertyTagInfo + { + /// + /// 获取或设置店铺 Logo 图片 ID。 + /// + [Newtonsoft.Json.JsonProperty("store_logo_id")] + [System.Text.Json.Serialization.JsonPropertyName("store_logo_id")] + public string? StoreLogoImageId { get; set; } + + /// + /// 获取或设置店铺名称。 + /// + [Newtonsoft.Json.JsonProperty("store_name")] + [System.Text.Json.Serialization.JsonPropertyName("store_name")] + public string? StoreName { get; set; } + } + + public class ButtonInfo + { + /// + /// 获取或设置按钮类型。 + /// + [Newtonsoft.Json.JsonProperty("btn_type")] + [System.Text.Json.Serialization.JsonPropertyName("btn_type")] + public int? ButtonType { get; set; } + + /// + /// 获取或设置价格字符串。 + /// + [Newtonsoft.Json.JsonProperty("price")] + [System.Text.Json.Serialization.JsonPropertyName("price")] + public string? PriceString { get; set; } + + /// + /// 获取或设置颜色十六进制值。 + /// + [Newtonsoft.Json.JsonProperty("color")] + [System.Text.Json.Serialization.JsonPropertyName("color")] + public string? Color { get; set; } + } + } + + /// + /// 获取或设置图片 ID。 + /// + [Newtonsoft.Json.JsonProperty("image_id")] + [System.Text.Json.Serialization.JsonPropertyName("image_id")] + public string ImageId { get; set; } = string.Empty; + + /// + /// 获取或设置状态标签信息。 + /// + [Newtonsoft.Json.JsonProperty("status_tag")] + [System.Text.Json.Serialization.JsonPropertyName("status_tag")] + public Types.StatusTagInfo? StatusTagInfo { get; set; } + + /// + /// 获取或设置属性标签信息。 + /// + [Newtonsoft.Json.JsonProperty("property_tag")] + [System.Text.Json.Serialization.JsonPropertyName("property_tag")] + public Types.PropertyTagInfo? PropertyTagInfo { get; set; } + + /// + /// 获取或设置标题信息。 + /// + [Newtonsoft.Json.JsonProperty("title")] + [System.Text.Json.Serialization.JsonPropertyName("title")] + public Types.TitleInfo? TitleInfo { get; set; } + + /// + /// 获取或设置按钮信息。 + /// + [Newtonsoft.Json.JsonProperty("btn")] + [System.Text.Json.Serialization.JsonPropertyName("btn")] + public Types.ButtonInfo? ButtonInfo { get; set; } + } + } + + /// + /// 获取或设置讲解卡类型。 + /// 默认值:1 + /// + [Newtonsoft.Json.JsonProperty("card_type")] + [System.Text.Json.Serialization.JsonPropertyName("card_type")] + public int CardType { get; set; } = 1; + + /// + /// 获取或设置讲解卡内容。 + /// + [Newtonsoft.Json.JsonProperty("value")] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.StringifiedObjectInJsonFormatConverter))] + [System.Text.Json.Serialization.JsonPropertyName("value")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.StringifiedObjectInJsonFormatConverter))] + public Types.CardValue CardValue { get; set; } = new Types.CardValue(); + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/Card/WebcastCardDefaultSetResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/Card/WebcastCardDefaultSetResponse.cs new file mode 100644 index 00000000..3b1baee9 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/Card/WebcastCardDefaultSetResponse.cs @@ -0,0 +1,22 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.Webcast.Models +{ + /// + /// 表示 [POST] /card/default/set 接口的响应。 + /// + public class WebcastCardDefaultSetResponse : DouyinMicroAppWebcastResponse + { + /// + /// 获取或设置审核状态。 + /// + [Newtonsoft.Json.JsonProperty("status")] + [System.Text.Json.Serialization.JsonPropertyName("status")] + public int Status { get; set; } + + /// + /// 获取或设置审核反馈。 + /// + [Newtonsoft.Json.JsonProperty("feedback")] + [System.Text.Json.Serialization.JsonPropertyName("feedback")] + public string? Feedback { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/Card/WebcastCardDeleteRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/Card/WebcastCardDeleteRequest.cs new file mode 100644 index 00000000..886d1e43 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/Card/WebcastCardDeleteRequest.cs @@ -0,0 +1,15 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.Webcast.Models +{ + /// + /// 表示 [POST] /card/delete 接口的请求。 + /// + public class WebcastCardDeleteRequest : DouyinMicroAppWebcastRequest + { + /// + /// 获取或设置小程序页面路径。 + /// + [Newtonsoft.Json.JsonProperty("url")] + [System.Text.Json.Serialization.JsonPropertyName("url")] + public string PagePath { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/Card/WebcastCardDeleteResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/Card/WebcastCardDeleteResponse.cs new file mode 100644 index 00000000..9d6fe3d9 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/Card/WebcastCardDeleteResponse.cs @@ -0,0 +1,15 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.Webcast.Models +{ + /// + /// 表示 [POST] /card/delete 接口的响应。 + /// + public class WebcastCardDeleteResponse : DouyinMicroAppWebcastResponse + { + /// + /// 获取或设置删除状态。 + /// + [Newtonsoft.Json.JsonProperty("status")] + [System.Text.Json.Serialization.JsonPropertyName("status")] + public int Status { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/Card/WebcastCardGetAllCardsForUserRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/Card/WebcastCardGetAllCardsForUserRequest.cs new file mode 100644 index 00000000..233c8b5d --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/Card/WebcastCardGetAllCardsForUserRequest.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.Webcast.Models +{ + /// + /// 表示 [POST] /card/get_all_cards_for_user 接口的请求。 + /// + public class WebcastCardGetAllCardsForUserRequest : DouyinMicroAppWebcastRequest + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/Card/WebcastCardGetAllCardsForUserResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/Card/WebcastCardGetAllCardsForUserResponse.cs new file mode 100644 index 00000000..5d9fc7cf --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/Card/WebcastCardGetAllCardsForUserResponse.cs @@ -0,0 +1,76 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.Webcast.Models +{ + /// + /// 表示 [POST] /card/get_all_cards_for_user 接口的响应。 + /// + public class WebcastCardGetAllCardsForUserResponse : DouyinMicroAppWebcastResponse + { + public static class Types + { + public class Card + { + public static class Types + { + public class CardValue : WebcastCardDefaultGetResponse.Types.CardValue + { + /// + /// 获取或设置小程序页面路径。 + /// + [Newtonsoft.Json.JsonProperty("url")] + [System.Text.Json.Serialization.JsonPropertyName("url")] + public string PagePath { get; set; } = default!; + } + } + + /// + /// 获取或设置小程序页面路径。 + /// + [Newtonsoft.Json.JsonProperty("url")] + [System.Text.Json.Serialization.JsonPropertyName("url")] + public string PagePath { get; set; } = default!; + + /// + /// 获取或设置讲解卡类型。 + /// + [Newtonsoft.Json.JsonProperty("card_type")] + [System.Text.Json.Serialization.JsonPropertyName("card_type")] + public int CardType { get; set; } + + /// + /// 获取或设置讲解卡内容。 + /// + [Newtonsoft.Json.JsonProperty("value")] + [System.Text.Json.Serialization.JsonPropertyName("value")] + public Types.CardValue CardValue { get; set; } = default!; + + /// + /// 获取或设置审核状态。 + /// + [Newtonsoft.Json.JsonProperty("status")] + [System.Text.Json.Serialization.JsonPropertyName("status")] + public int Status { get; set; } + + /// + /// 获取或设置审核意见。 + /// + [Newtonsoft.Json.JsonProperty("audit_opinion")] + [System.Text.Json.Serialization.JsonPropertyName("audit_opinion")] + public string? AuditOpinion { get; set; } + + /// + /// 获取或设置达人 UID。 + /// + [Newtonsoft.Json.JsonProperty("user_id")] + [System.Text.Json.Serialization.JsonPropertyName("user_id")] + public long? UserUID { get; set; } + } + } + + /// + /// 获取或设置讲解卡列表。 + /// + [Newtonsoft.Json.JsonProperty("card_list")] + [System.Text.Json.Serialization.JsonPropertyName("card_list")] + public Types.Card[] CardList { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/Card/WebcastCardGetRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/Card/WebcastCardGetRequest.cs new file mode 100644 index 00000000..41366143 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/Card/WebcastCardGetRequest.cs @@ -0,0 +1,15 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.Webcast.Models +{ + /// + /// 表示 [POST] /card/get 接口的请求。 + /// + public class WebcastCardGetRequest : DouyinMicroAppWebcastRequest + { + /// + /// 获取或设置小程序页面路径。 + /// + [Newtonsoft.Json.JsonProperty("url")] + [System.Text.Json.Serialization.JsonPropertyName("url")] + public string PagePath { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/Card/WebcastCardGetResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/Card/WebcastCardGetResponse.cs new file mode 100644 index 00000000..f63230cd --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/Card/WebcastCardGetResponse.cs @@ -0,0 +1,43 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.Webcast.Models +{ + /// + /// 表示 [POST] /card/get 接口的响应。 + /// + public class WebcastCardGetResponse : DouyinMicroAppWebcastResponse + { + public static class Types + { + public class CardValue : WebcastCardDefaultGetResponse.Types.CardValue + { + } + } + + /// + /// 获取或设置讲解卡类型。 + /// + [Newtonsoft.Json.JsonProperty("card_type")] + [System.Text.Json.Serialization.JsonPropertyName("card_type")] + public int CardType { get; set; } + + /// + /// 获取或设置讲解卡内容。 + /// + [Newtonsoft.Json.JsonProperty("value")] + [System.Text.Json.Serialization.JsonPropertyName("value")] + public Types.CardValue CardValue { get; set; } = default!; + + /// + /// 获取或设置审核状态。 + /// + [Newtonsoft.Json.JsonProperty("status")] + [System.Text.Json.Serialization.JsonPropertyName("status")] + public int Status { get; set; } + + /// + /// 获取或设置审核意见。 + /// + [Newtonsoft.Json.JsonProperty("audit_opinion")] + [System.Text.Json.Serialization.JsonPropertyName("audit_opinion")] + public string? AuditOpinion { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/Card/WebcastCardSetRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/Card/WebcastCardSetRequest.cs new file mode 100644 index 00000000..c86634ff --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/Card/WebcastCardSetRequest.cs @@ -0,0 +1,92 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.Webcast.Models +{ + /// + /// 表示 [POST] /card/set 接口的请求。 + /// + public class WebcastCardSetRequest : DouyinMicroAppWebcastRequest + { + public static class Types + { + public class CardValue + { + public static class Types + { + public class TitleInfo : WebcastCardDefaultSetRequest.Types.CardValue.Types.TitleInfo + { + } + + public class StatusTagInfo : WebcastCardDefaultSetRequest.Types.CardValue.Types.StatusTagInfo + { + } + + public class PropertyTagInfo : WebcastCardDefaultSetRequest.Types.CardValue.Types.PropertyTagInfo + { + } + + public class ButtonInfo : WebcastCardDefaultSetRequest.Types.CardValue.Types.ButtonInfo + { + } + } + + /// + /// 获取或设置图片 ID。 + /// + [Newtonsoft.Json.JsonProperty("image_id")] + [System.Text.Json.Serialization.JsonPropertyName("image_id")] + public string ImageId { get; set; } = string.Empty; + + /// + /// 获取或设置状态标签信息。 + /// + [Newtonsoft.Json.JsonProperty("status_tag")] + [System.Text.Json.Serialization.JsonPropertyName("status_tag")] + public Types.StatusTagInfo? StatusTagInfo { get; set; } + + /// + /// 获取或设置属性标签信息。 + /// + [Newtonsoft.Json.JsonProperty("property_tag")] + [System.Text.Json.Serialization.JsonPropertyName("property_tag")] + public Types.PropertyTagInfo? PropertyTagInfo { get; set; } + + /// + /// 获取或设置标题信息。 + /// + [Newtonsoft.Json.JsonProperty("title")] + [System.Text.Json.Serialization.JsonPropertyName("title")] + public Types.TitleInfo? TitleInfo { get; set; } + + /// + /// 获取或设置按钮信息。 + /// + [Newtonsoft.Json.JsonProperty("btn")] + [System.Text.Json.Serialization.JsonPropertyName("btn")] + public Types.ButtonInfo? ButtonInfo { get; set; } + } + } + + /// + /// 获取或设置小程序页面路径。 + /// + [Newtonsoft.Json.JsonProperty("url")] + [System.Text.Json.Serialization.JsonPropertyName("url")] + public string PagePath { get; set; } = string.Empty; + + /// + /// 获取或设置讲解卡类型。 + /// 默认值:1 + /// + [Newtonsoft.Json.JsonProperty("card_type")] + [System.Text.Json.Serialization.JsonPropertyName("card_type")] + public int CardType { get; set; } = 1; + + /// + /// 获取或设置讲解卡内容。 + /// + [Newtonsoft.Json.JsonProperty("value")] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.StringifiedObjectInJsonFormatConverter))] + [System.Text.Json.Serialization.JsonPropertyName("value")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.StringifiedObjectInJsonFormatConverter))] + public Types.CardValue CardValue { get; set; } = new Types.CardValue(); + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/Card/WebcastCardSetResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/Card/WebcastCardSetResponse.cs new file mode 100644 index 00000000..e74174e3 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/Card/WebcastCardSetResponse.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.Webcast.Models +{ + /// + /// 表示 [POST] /card/set 接口的响应。 + /// + public class WebcastCardSetResponse : WebcastCardDefaultSetResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/Card/WebcastCardUpdateRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/Card/WebcastCardUpdateRequest.cs new file mode 100644 index 00000000..41c11954 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/Card/WebcastCardUpdateRequest.cs @@ -0,0 +1,92 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.Webcast.Models +{ + /// + /// 表示 [POST] /card/update 接口的请求。 + /// + public class WebcastCardUpdateRequest : DouyinMicroAppWebcastRequest + { + public static class Types + { + public class CardValue + { + public static class Types + { + public class TitleInfo : WebcastCardDefaultSetRequest.Types.CardValue.Types.TitleInfo + { + } + + public class StatusTagInfo : WebcastCardDefaultSetRequest.Types.CardValue.Types.StatusTagInfo + { + } + + public class PropertyTagInfo : WebcastCardDefaultSetRequest.Types.CardValue.Types.PropertyTagInfo + { + } + + public class ButtonInfo : WebcastCardDefaultSetRequest.Types.CardValue.Types.ButtonInfo + { + } + } + + /// + /// 获取或设置图片 ID。 + /// + [Newtonsoft.Json.JsonProperty("image_id")] + [System.Text.Json.Serialization.JsonPropertyName("image_id")] + public string ImageId { get; set; } = string.Empty; + + /// + /// 获取或设置状态标签信息。 + /// + [Newtonsoft.Json.JsonProperty("status_tag")] + [System.Text.Json.Serialization.JsonPropertyName("status_tag")] + public Types.StatusTagInfo? StatusTagInfo { get; set; } + + /// + /// 获取或设置属性标签信息。 + /// + [Newtonsoft.Json.JsonProperty("property_tag")] + [System.Text.Json.Serialization.JsonPropertyName("property_tag")] + public Types.PropertyTagInfo? PropertyTagInfo { get; set; } + + /// + /// 获取或设置标题信息。 + /// + [Newtonsoft.Json.JsonProperty("title")] + [System.Text.Json.Serialization.JsonPropertyName("title")] + public Types.TitleInfo? TitleInfo { get; set; } + + /// + /// 获取或设置按钮信息。 + /// + [Newtonsoft.Json.JsonProperty("btn")] + [System.Text.Json.Serialization.JsonPropertyName("btn")] + public Types.ButtonInfo? ButtonInfo { get; set; } + } + } + + /// + /// 获取或设置直播间 ID。 + /// + [Newtonsoft.Json.JsonProperty("room_id")] + [System.Text.Json.Serialization.JsonPropertyName("room_id")] + public string RoomId { get; set; } = string.Empty; + + /// + /// 获取或设置讲解卡类型。 + /// 默认值:1 + /// + [Newtonsoft.Json.JsonProperty("card_type")] + [System.Text.Json.Serialization.JsonPropertyName("card_type")] + public int CardType { get; set; } = 1; + + /// + /// 获取或设置讲解卡内容。 + /// + [Newtonsoft.Json.JsonProperty("value")] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.StringifiedObjectInJsonFormatConverter))] + [System.Text.Json.Serialization.JsonPropertyName("value")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.StringifiedObjectInJsonFormatConverter))] + public Types.CardValue CardValue { get; set; } = new Types.CardValue(); + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/Card/WebcastCardUpdateResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/Card/WebcastCardUpdateResponse.cs new file mode 100644 index 00000000..cd3a2436 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/Card/WebcastCardUpdateResponse.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.Webcast.Models +{ + /// + /// 表示 [POST] /card/update 接口的响应。 + /// + public class WebcastCardUpdateResponse : WebcastCardDefaultSetResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/File/WebcastFileCardImageDeleteRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/File/WebcastFileCardImageDeleteRequest.cs new file mode 100644 index 00000000..57215fa8 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/File/WebcastFileCardImageDeleteRequest.cs @@ -0,0 +1,19 @@ +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.Webcast.Models +{ + /// + /// 表示 [POST] /file/card_image/delete 接口的请求。 + /// + public class WebcastFileCardImageDeleteRequest : DouyinMicroAppWebcastRequest + { + /// + /// 获取或设置图片 ID 列表。 + /// + [Newtonsoft.Json.JsonProperty("image_ids")] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.StringifiedObjectInJsonFormatConverter))] + [System.Text.Json.Serialization.JsonPropertyName("image_ids")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.StringifiedObjectInJsonFormatConverter))] + public IList ImageIdList { get; set; } = new List(); + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/File/WebcastFileCardImageDeleteResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/File/WebcastFileCardImageDeleteResponse.cs new file mode 100644 index 00000000..8f190d11 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/File/WebcastFileCardImageDeleteResponse.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.Webcast.Models +{ + /// + /// 表示 [POST] /file/card_image/delete 接口的响应。 + /// + public class WebcastFileCardImageDeleteResponse : DouyinMicroAppWebcastResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/File/WebcastFileCardImageGetRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/File/WebcastFileCardImageGetRequest.cs new file mode 100644 index 00000000..cc6ec531 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/File/WebcastFileCardImageGetRequest.cs @@ -0,0 +1,19 @@ +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.Webcast.Models +{ + /// + /// 表示 [POST] /file/card_image/get 接口的请求。 + /// + public class WebcastFileCardImageGetRequest : DouyinMicroAppWebcastRequest + { + /// + /// 获取或设置图片 ID 列表。 + /// + [Newtonsoft.Json.JsonProperty("image_ids")] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.StringifiedObjectInJsonFormatConverter))] + [System.Text.Json.Serialization.JsonPropertyName("image_ids")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.StringifiedObjectInJsonFormatConverter))] + public IList ImageIdList { get; set; } = new List(); + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/File/WebcastFileCardImageGetResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/File/WebcastFileCardImageGetResponse.cs new file mode 100644 index 00000000..79b8a8f5 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/File/WebcastFileCardImageGetResponse.cs @@ -0,0 +1,42 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.Webcast.Models +{ + /// + /// 表示 [POST] /file/card_image/get 接口的响应。 + /// + public class WebcastFileCardImageGetResponse : DouyinMicroAppWebcastResponse + { + public static class Types + { + public class Result + { + /// + /// 获取或设置图片 ID。 + /// + [Newtonsoft.Json.JsonProperty("image_id")] + [System.Text.Json.Serialization.JsonPropertyName("image_id")] + public string ImageId { get; set; } = default!; + + /// + /// 获取或设置图片状态。 + /// + [Newtonsoft.Json.JsonProperty("image_status")] + [System.Text.Json.Serialization.JsonPropertyName("image_status")] + public int Status { get; set; } + + /// + /// 获取或设置审核意见。 + /// + [Newtonsoft.Json.JsonProperty("audit_opinion")] + [System.Text.Json.Serialization.JsonPropertyName("audit_opinion")] + public string? AuditOpinion { get; set; } + } + } + + /// + /// 获取或设置结果列表。 + /// + [Newtonsoft.Json.JsonProperty("images_status")] + [System.Text.Json.Serialization.JsonPropertyName("images_status")] + public Types.Result[] ResultList { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/File/WebcastFileCardImageUploadRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/File/WebcastFileCardImageUploadRequest.cs new file mode 100644 index 00000000..d08c05cd --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/File/WebcastFileCardImageUploadRequest.cs @@ -0,0 +1,38 @@ +using System; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.Webcast.Models +{ + /// + /// 表示 [POST] /file/card_image/upload 接口的请求。 + /// + public class WebcastFileCardImageUploadRequest : DouyinMicroAppWebcastRequest + { + /// + /// 获取或设置图片 ID。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string ImageId { get; set; } = string.Empty; + + /// + /// 获取或设置图片文件字节数组。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public byte[] ImageFileBytes { get; set; } = Array.Empty(); + + /// + /// 获取或设置图片文件名。如果不指定将由系统自动生成。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string? ImageFileName { get; set; } + + /// + /// 获取或设置图片文件 MIME 类型。如果不指定将由系统自动生成。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string? ImageFileContentType { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/File/WebcastFileCardImageUploadResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/File/WebcastFileCardImageUploadResponse.cs new file mode 100644 index 00000000..f11ac04e --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/File/WebcastFileCardImageUploadResponse.cs @@ -0,0 +1,15 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.Webcast.Models +{ + /// + /// 表示 [POST] /file/card_image/upload 接口的响应。 + /// + public class WebcastFileCardImageUploadResponse : DouyinMicroAppWebcastResponse + { + /// + /// 获取或设置图片状态。 + /// + [Newtonsoft.Json.JsonProperty("status")] + [System.Text.Json.Serialization.JsonPropertyName("status")] + public int Status { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/Gift/WebcastGiftTopGiftRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/Gift/WebcastGiftTopGiftRequest.cs new file mode 100644 index 00000000..684858ea --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/Gift/WebcastGiftTopGiftRequest.cs @@ -0,0 +1,31 @@ +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.Webcast.Models +{ + /// + /// 表示 [POST] /gift/top_gift 接口的请求。 + /// + public class WebcastGiftTopGiftRequest : DouyinMicroAppWebcastRequest + { + /// + /// 获取或设置应用的 AppId。如果不指定将使用构造 时的 参数。 + /// + [Newtonsoft.Json.JsonProperty("app_id")] + [System.Text.Json.Serialization.JsonPropertyName("app_id")] + public string? AppId { get; set; } + + /// + /// 获取或设置直播间 ID。 + /// + [Newtonsoft.Json.JsonProperty("room_id")] + [System.Text.Json.Serialization.JsonPropertyName("room_id")] + public string RoomId { get; set; } = string.Empty; + + /// + /// 获取或设置置顶礼物的礼物 ID。 + /// + [Newtonsoft.Json.JsonProperty("sec_gift_id_list")] + [System.Text.Json.Serialization.JsonPropertyName("sec_gift_id_list")] + public IList GiftIdList { get; set; } = new List(); + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/Gift/WebcastGiftTopGiftResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/Gift/WebcastGiftTopGiftResponse.cs new file mode 100644 index 00000000..32dfb950 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/Gift/WebcastGiftTopGiftResponse.cs @@ -0,0 +1,28 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.Webcast.Models +{ + /// + /// 表示 [POST] /gift/top_gift 接口的响应。 + /// + public class WebcastGiftTopGiftResponse : DouyinMicroAppWebcastResponse + { + public static class Types + { + public class Data + { + /// + /// 获取或设置成功置顶的礼物 ID 列表。 + /// + [Newtonsoft.Json.JsonProperty("success_top_gift_id_list")] + [System.Text.Json.Serialization.JsonPropertyName("success_top_gift_id_list")] + public string[] SuccessfulGiftIdList { get; set; } = default!; + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/LinkMic/WebcastLinkMicQueryRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/LinkMic/WebcastLinkMicQueryRequest.cs new file mode 100644 index 00000000..1feda483 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/LinkMic/WebcastLinkMicQueryRequest.cs @@ -0,0 +1,22 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.Webcast.Models +{ + /// + /// 表示 [POST] /linkmic/query 接口的请求。 + /// + public class WebcastLinkMicQueryRequest : DouyinMicroAppWebcastRequest + { + /// + /// 获取或设置应用的 AppId。如果不指定将使用构造 时的 参数。 + /// + [Newtonsoft.Json.JsonProperty("app_id")] + [System.Text.Json.Serialization.JsonPropertyName("app_id")] + public string? AppId { get; set; } + + /// + /// 获取或设置直播间 ID。 + /// + [Newtonsoft.Json.JsonProperty("room_id")] + [System.Text.Json.Serialization.JsonPropertyName("room_id")] + public string RoomId { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Webcast/LinkMic/WebcastLinkMicQueryResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/LinkMic/WebcastLinkMicQueryResponse.cs similarity index 88% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Webcast/LinkMic/WebcastLinkMicQueryResponse.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/LinkMic/WebcastLinkMicQueryResponse.cs index c8151ac2..03b28653 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Webcast/LinkMic/WebcastLinkMicQueryResponse.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/LinkMic/WebcastLinkMicQueryResponse.cs @@ -1,9 +1,9 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.Webcast.Models { /// /// 表示 [POST] /linkmic/query 接口的响应。 /// - public class WebcastLinkMicQueryResponse : ByteDanceMicroAppResponse + public class WebcastLinkMicQueryResponse : DouyinMicroAppWebcastResponse { public static class Types { @@ -98,20 +98,6 @@ public class User } } - /// - /// - /// - [Newtonsoft.Json.JsonProperty("errcode")] - [System.Text.Json.Serialization.JsonPropertyName("errcode")] - public override long ErrorCode { get; set; } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("errmsg")] - [System.Text.Json.Serialization.JsonPropertyName("errmsg")] - public override string? ErrorMessage { get; set; } - /// /// 获取或设置麦位基本信息。 /// diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Webcast/LiveData/WebcastLiveDataTaskFailDataGetRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/LiveData/WebcastLiveDataTaskFailDataGetRequest.cs similarity index 78% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Webcast/LiveData/WebcastLiveDataTaskFailDataGetRequest.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/LiveData/WebcastLiveDataTaskFailDataGetRequest.cs index 25cc6205..b4b92f46 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Webcast/LiveData/WebcastLiveDataTaskFailDataGetRequest.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/LiveData/WebcastLiveDataTaskFailDataGetRequest.cs @@ -1,12 +1,12 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.Webcast.Models { /// /// 表示 [GET] /live_data/task/fail_data/get 接口的请求。 /// - public class WebcastLiveDataTaskFailDataGetRequest : ByteDanceMicroAppRequest + public class WebcastLiveDataTaskFailDataGetRequest : DouyinMicroAppWebcastRequest { /// - /// 获取或设置小玩法的 AppId。如果不指定将使用构造 时的 参数。 + /// 获取或设置应用的 AppId。如果不指定将使用构造 时的 参数。 /// [Newtonsoft.Json.JsonIgnore] [System.Text.Json.Serialization.JsonIgnore] diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Webcast/LiveData/WebcastLiveDataTaskFailDataGetResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/LiveData/WebcastLiveDataTaskFailDataGetResponse.cs similarity index 91% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Webcast/LiveData/WebcastLiveDataTaskFailDataGetResponse.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/LiveData/WebcastLiveDataTaskFailDataGetResponse.cs index c26eb6f3..f5970df9 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Webcast/LiveData/WebcastLiveDataTaskFailDataGetResponse.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/LiveData/WebcastLiveDataTaskFailDataGetResponse.cs @@ -1,9 +1,9 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.Webcast.Models { /// /// 表示 [GET] /live_data/task/fail_data/get 接口的响应。 /// - public class WebcastLiveDataTaskFailDataGetResponse : ByteDanceMicroAppResponse + public class WebcastLiveDataTaskFailDataGetResponse : DouyinMicroAppWebcastResponse { public static class Types { @@ -59,26 +59,22 @@ public class FailedData } } - /// /// - /// [Newtonsoft.Json.JsonProperty("err_no")] [System.Text.Json.Serialization.JsonPropertyName("err_no")] public override long ErrorCode { get; set; } - /// /// - /// [Newtonsoft.Json.JsonProperty("err_msg")] [System.Text.Json.Serialization.JsonPropertyName("err_msg")] public override string? ErrorMessage { get; set; } /// - /// + /// 获取或设置请求日志 ID。 /// [Newtonsoft.Json.JsonProperty("logid")] [System.Text.Json.Serialization.JsonPropertyName("logid")] - public override string? LogId { get; set; } + public string? LogId { get; set; } /// /// 获取或设置返回数据。 diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/LiveData/WebcastLiveDataTaskGetRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/LiveData/WebcastLiveDataTaskGetRequest.cs new file mode 100644 index 00000000..1a2179a1 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/LiveData/WebcastLiveDataTaskGetRequest.cs @@ -0,0 +1,29 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.Webcast.Models +{ + /// + /// 表示 [GET] /live_data/task/get 接口的请求。 + /// + public class WebcastLiveDataTaskGetRequest : DouyinMicroAppWebcastRequest + { + /// + /// 获取或设置应用的 AppId。如果不指定将使用构造 时的 参数。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string? AppId { get; set; } + + /// + /// 获取或设置直播间 ID。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string RoomId { get; set; } = string.Empty; + + /// + /// 获取或设置直播间消息类型。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string? MessageType { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Webcast/LiveData/WebcastLiveDataTaskGetResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/LiveData/WebcastLiveDataTaskGetResponse.cs similarity index 81% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Webcast/LiveData/WebcastLiveDataTaskGetResponse.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/LiveData/WebcastLiveDataTaskGetResponse.cs index 0a8f2b8d..c9f400b0 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Webcast/LiveData/WebcastLiveDataTaskGetResponse.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/LiveData/WebcastLiveDataTaskGetResponse.cs @@ -1,9 +1,9 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.Webcast.Models { /// /// 表示 [GET] /live_data/task/get 接口的响应。 /// - public class WebcastLiveDataTaskGetResponse : ByteDanceMicroAppResponse + public class WebcastLiveDataTaskGetResponse : DouyinMicroAppWebcastResponse { public static class Types { @@ -18,26 +18,22 @@ public class Data } } - /// /// - /// [Newtonsoft.Json.JsonProperty("err_no")] [System.Text.Json.Serialization.JsonPropertyName("err_no")] public override long ErrorCode { get; set; } - /// /// - /// [Newtonsoft.Json.JsonProperty("err_msg")] [System.Text.Json.Serialization.JsonPropertyName("err_msg")] public override string? ErrorMessage { get; set; } /// - /// + /// 获取或设置请求日志 ID。 /// [Newtonsoft.Json.JsonProperty("logid")] [System.Text.Json.Serialization.JsonPropertyName("logid")] - public override string? LogId { get; set; } + public string? LogId { get; set; } /// /// 获取或设置返回数据。 diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/LiveData/WebcastLiveDataTaskStartRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/LiveData/WebcastLiveDataTaskStartRequest.cs new file mode 100644 index 00000000..5ca6c2c4 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/LiveData/WebcastLiveDataTaskStartRequest.cs @@ -0,0 +1,29 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.Webcast.Models +{ + /// + /// 表示 [POST] /live_data/task/start 接口的请求。 + /// + public class WebcastLiveDataTaskStartRequest : DouyinMicroAppWebcastRequest + { + /// + /// 获取或设置应用的 AppId。如果不指定将使用构造 时的 参数。 + /// + [Newtonsoft.Json.JsonProperty("appid")] + [System.Text.Json.Serialization.JsonPropertyName("appid")] + public string? AppId { get; set; } + + /// + /// 获取或设置直播间 ID。 + /// + [Newtonsoft.Json.JsonProperty("roomid")] + [System.Text.Json.Serialization.JsonPropertyName("roomid")] + public string RoomId { get; set; } = string.Empty; + + /// + /// 获取或设置直播间消息类型。 + /// + [Newtonsoft.Json.JsonProperty("msg_type")] + [System.Text.Json.Serialization.JsonPropertyName("msg_type")] + public string? MessageType { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Webcast/LiveData/WebcastLiveDataTaskStartResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/LiveData/WebcastLiveDataTaskStartResponse.cs similarity index 81% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Webcast/LiveData/WebcastLiveDataTaskStartResponse.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/LiveData/WebcastLiveDataTaskStartResponse.cs index 822b6a96..09cc7bb5 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Webcast/LiveData/WebcastLiveDataTaskStartResponse.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/LiveData/WebcastLiveDataTaskStartResponse.cs @@ -1,9 +1,9 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.Webcast.Models { /// /// 表示 [POST] /live_data/task/start 接口的响应。 /// - public class WebcastLiveDataTaskStartResponse : ByteDanceMicroAppResponse + public class WebcastLiveDataTaskStartResponse : DouyinMicroAppWebcastResponse { public static class Types { @@ -18,26 +18,22 @@ public class Data } } - /// /// - /// [Newtonsoft.Json.JsonProperty("err_no")] [System.Text.Json.Serialization.JsonPropertyName("err_no")] public override long ErrorCode { get; set; } - /// /// - /// [Newtonsoft.Json.JsonProperty("err_msg")] [System.Text.Json.Serialization.JsonPropertyName("err_msg")] public override string? ErrorMessage { get; set; } /// - /// + /// 获取或设置请求日志 ID。 /// [Newtonsoft.Json.JsonProperty("logid")] [System.Text.Json.Serialization.JsonPropertyName("logid")] - public override string? LogId { get; set; } + public string? LogId { get; set; } /// /// 获取或设置返回数据。 diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/LiveData/WebcastLiveDataTaskStopRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/LiveData/WebcastLiveDataTaskStopRequest.cs new file mode 100644 index 00000000..d5b553ed --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/LiveData/WebcastLiveDataTaskStopRequest.cs @@ -0,0 +1,29 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.Webcast.Models +{ + /// + /// 表示 [POST] /live_data/task/stop 接口的请求。 + /// + public class WebcastLiveDataTaskStopRequest : DouyinMicroAppWebcastRequest + { + /// + /// 获取或设置应用的 AppId。如果不指定将使用构造 时的 参数。 + /// + [Newtonsoft.Json.JsonProperty("appid")] + [System.Text.Json.Serialization.JsonPropertyName("appid")] + public string? AppId { get; set; } + + /// + /// 获取或设置直播间 ID。 + /// + [Newtonsoft.Json.JsonProperty("roomid")] + [System.Text.Json.Serialization.JsonPropertyName("roomid")] + public string RoomId { get; set; } = string.Empty; + + /// + /// 获取或设置直播间消息类型。 + /// + [Newtonsoft.Json.JsonProperty("msg_type")] + [System.Text.Json.Serialization.JsonPropertyName("msg_type")] + public string? MessageType { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/LiveData/WebcastLiveDataTaskStopResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/LiveData/WebcastLiveDataTaskStopResponse.cs new file mode 100644 index 00000000..1145464c --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/LiveData/WebcastLiveDataTaskStopResponse.cs @@ -0,0 +1,25 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.Webcast.Models +{ + /// + /// 表示 [POST] /live_data/task/stop 接口的响应。 + /// + public class WebcastLiveDataTaskStopResponse : DouyinMicroAppWebcastResponse + { + /// + [Newtonsoft.Json.JsonProperty("err_no")] + [System.Text.Json.Serialization.JsonPropertyName("err_no")] + public override long ErrorCode { get; set; } + + /// + [Newtonsoft.Json.JsonProperty("err_msg")] + [System.Text.Json.Serialization.JsonPropertyName("err_msg")] + public override string? ErrorMessage { get; set; } + + /// + /// 获取或设置请求日志 ID。 + /// + [Newtonsoft.Json.JsonProperty("logid")] + [System.Text.Json.Serialization.JsonPropertyName("logid")] + public string? LogId { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/Quiz/WebcastQuizGetRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/Quiz/WebcastQuizGetRequest.cs new file mode 100644 index 00000000..30f99f28 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/Quiz/WebcastQuizGetRequest.cs @@ -0,0 +1,29 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.Webcast.Models +{ + /// + /// 表示 [GET] /quiz/get 接口的请求。 + /// + public class WebcastQuizGetRequest : DouyinMicroAppWebcastRequest + { + /// + /// 获取或设置难度等级。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public int? Level { get; set; } + + /// + /// 获取或设置题目类型。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public int? Type { get; set; } + + /// + /// 获取或设置题目数量。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public int? Number { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/Quiz/WebcastQuizGetResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/Quiz/WebcastQuizGetResponse.cs new file mode 100644 index 00000000..6a25e4fa --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Models/Quiz/WebcastQuizGetResponse.cs @@ -0,0 +1,62 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.Webcast.Models +{ + /// + /// 表示 [GET] /quiz/get 接口的响应。 + /// + public class WebcastQuizGetResponse : DouyinMicroAppWebcastResponse + { + public static class Types + { + public class Data + { + public static class Types + { + public class Quiz + { + /// + /// 获取或设置题目 ID。 + /// + [Newtonsoft.Json.JsonProperty("id")] + [System.Text.Json.Serialization.JsonPropertyName("id")] + public string Id { get; set; } = default!; + + /// + /// 获取或设置题目标题。 + /// + [Newtonsoft.Json.JsonProperty("title")] + [System.Text.Json.Serialization.JsonPropertyName("title")] + public string Title { get; set; } = default!; + + /// + /// 获取或设置题目选项列表。 + /// + [Newtonsoft.Json.JsonProperty("options")] + [System.Text.Json.Serialization.JsonPropertyName("options")] + public string[] OptionList { get; set; } = default!; + + /// + /// 获取或设置题目答案下标。 + /// + [Newtonsoft.Json.JsonProperty("answer")] + [System.Text.Json.Serialization.JsonPropertyName("answer")] + public int AnswerIndex { get; set; } + } + } + + /// + /// 获取或设置题目列表。 + /// + [Newtonsoft.Json.JsonProperty("list")] + [System.Text.Json.Serialization.JsonPropertyName("list")] + public Types.Quiz[] QuizList { get; set; } = default!; + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Settings/Credentials.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Settings/Credentials.cs new file mode 100644 index 00000000..8aebe067 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/ExtendedSDK/Webcast/Settings/Credentials.cs @@ -0,0 +1,31 @@ +using System; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.Webcast.Settings +{ + public class Credentials + { + /// + /// 初始化客户端时 的副本。 + /// + public string AppId { get; } + + /// + /// 初始化客户端时 的副本。 + /// + public string AppSecret { get; } + + /// + /// 初始化客户端时 的副本。 + /// + public string PlatformPublicKey { get; set; } = default!; + + internal Credentials(DouyinMicroAppWebcastClientOptions options) + { + if (options is null) throw new ArgumentNullException(nameof(options)); + + AppId = options.AppId; + AppSecret = options.AppSecret; + PlatformPublicKey = options.PlatformPublicKey; + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Extensions/ByteDanceMicroAppClientEventExtensions.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Extensions/ByteDanceMicroAppClientEventExtensions.cs deleted file mode 100644 index 26440d82..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Extensions/ByteDanceMicroAppClientEventExtensions.cs +++ /dev/null @@ -1,219 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Xml.Linq; - -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp -{ - /// - /// 为 提供回调通知事件的扩展方法。 - /// - public static class ByteDanceMicroAppClientEventExtensions - { - private class InnerEncryptedEvent - { - [Newtonsoft.Json.JsonProperty("Encrypt")] - [System.Text.Json.Serialization.JsonPropertyName("Encrypt")] - [System.Xml.Serialization.XmlElement("Encrypt")] - public string EncryptedData { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("TimeStamp")] - [System.Text.Json.Serialization.JsonPropertyName("TimeStamp")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumericalStringConverter))] - [System.Xml.Serialization.XmlElement("TimeStamp")] - public string TimestampString { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("Nonce")] - [System.Text.Json.Serialization.JsonPropertyName("Nonce")] - [System.Xml.Serialization.XmlElement("Nonce")] - public string Nonce { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("MsgSignature")] - [System.Text.Json.Serialization.JsonPropertyName("MsgSignature")] - [System.Xml.Serialization.XmlElement("MsgSignature")] - public string Signature { get; set; } = default!; - } - - private static TEvent InnerDeserializeEventFromJson(ByteDanceMicroAppClient client, string callbackJson) - where TEvent : ByteDanceMicroAppEvent - { - if (client == null) throw new ArgumentNullException(nameof(client)); - if (callbackJson == null) throw new ArgumentNullException(callbackJson); - - try - { - if (callbackJson.Contains("\"Encrypt\"")) - { - InnerEncryptedEvent encryptedEvent = client.JsonSerializer.Deserialize(callbackJson); - callbackJson = Utilities.TtMsgCryptor.AESDecrypt(cipherText: encryptedEvent.EncryptedData, encodingAESKey: client.Credentials.PushEncodingAESKey!, out _); - } - - return client.JsonSerializer.Deserialize(callbackJson); - } - catch (ByteDanceMicroAppException) - { - throw; - } - catch (Exception ex) - { - throw new Exceptions.ByteDanceMicroAppEventSerializationException("Failed to deserialize event data. Please see the inner exception for more details.", ex); - } - } - - private static TEvent InnerDeserializeEventFromXml(ByteDanceMicroAppClient client, string callbackXml) - where TEvent : ByteDanceMicroAppEvent - { - if (client == null) throw new ArgumentNullException(nameof(client)); - if (callbackXml == null) throw new ArgumentNullException(callbackXml); - - try - { - if (callbackXml.Contains("") && callbackXml.Contains("")) - { - string encryptedData = XDocument.Parse(callbackXml).Root!.Element("Encrypt")!.Value; - callbackXml = Utilities.TtMsgCryptor.AESDecrypt(cipherText: encryptedData, encodingAESKey: client.Credentials.PushEncodingAESKey!, out _); - } - - return Utilities.XmlUtility.Deserialize(callbackXml); - } - catch (ByteDanceMicroAppException) - { - throw; - } - catch (Exception ex) - { - throw new Exceptions.ByteDanceMicroAppEventSerializationException("Failed to deserialize event data. Please see the inner exception for more details.", ex); - } - } - - /// - /// 从 JSON 反序列化得到 对象。 - /// - /// - /// - /// - /// - public static TEvent DeserializeEventFromJson(this ByteDanceMicroAppClient client, string callbackJson) - where TEvent : ByteDanceMicroAppEvent, ByteDanceMicroAppEvent.Serialization.IJsonSerializable, new() - { - return InnerDeserializeEventFromJson(client, callbackJson); - } - - /// - /// 从 JSON 反序列化得到 对象。 - /// - /// - /// - /// - public static ByteDanceMicroAppEvent DeserializeEventFromJson(this ByteDanceMicroAppClient client, string callbackJson) - { - return InnerDeserializeEventFromJson(client, callbackJson); - } - - /// - /// 从 XML 反序列化得到 对象。 - /// - /// - /// - /// - /// - public static TEvent DeserializeEventFromXml(this ByteDanceMicroAppClient client, string callbackXml) - where TEvent : ByteDanceMicroAppEvent, ByteDanceMicroAppEvent.Serialization.IXmlSerializable, new() - { - return InnerDeserializeEventFromXml(client, callbackXml); - } - - /// - /// 从 XML 反序列化得到 对象。 - /// - /// - /// - /// - public static ByteDanceMicroAppEvent DeserializeEventFromXml(this ByteDanceMicroAppClient client, string callbackXml) - { - return InnerDeserializeEventFromXml(client, callbackXml); - } - - /// - /// 验证回调通知事件签名。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/component/message-push-customer-service - /// - /// - /// 头条回调通知中的 "timestamp" 查询参数。 - /// 头条回调通知中的 "nonce" 查询参数。 - /// 头条回调通知中的 "msg" 查询参数。 - /// 头条回调通知中的 "signature" 查询参数。 - /// - public static bool VerifyEventSignatureForEcho(this ByteDanceMicroAppClient client, string callbackTimestamp, string callbackNonce, string callbackMessage, string callbackSignature) - { - if (client == null) throw new ArgumentNullException(nameof(client)); - if (callbackTimestamp == null) throw new ArgumentNullException(nameof(callbackTimestamp)); - if (callbackNonce == null) throw new ArgumentNullException(nameof(callbackNonce)); - if (callbackMessage == null) throw new ArgumentNullException(nameof(callbackMessage)); - if (callbackSignature == null) throw new ArgumentNullException(nameof(callbackSignature)); - - List lstParams = new List() { client.Credentials.PushToken!, callbackTimestamp, callbackNonce, callbackMessage }; - lstParams.Sort(StringComparer.Ordinal); - - string sign = Utilities.SHA1Utility.Hash(string.Concat(lstParams)); - return string.Equals(sign, callbackSignature, StringComparison.OrdinalIgnoreCase); - } - - /// - /// 验证回调通知事件签名。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/thirdparty/overview-guide/smallprogram/encryption - /// - /// - /// - /// - public static bool VerifyEventSignatureFromJson(this ByteDanceMicroAppClient client, string callbackJson) - { - if (client == null) throw new ArgumentNullException(nameof(client)); - if (callbackJson == null) throw new ArgumentNullException(nameof(callbackJson)); - - try - { - InnerEncryptedEvent encryptedEvent = client.JsonSerializer.Deserialize(callbackJson); - return Utilities.TtMsgCryptor.VerifySignature( - sToken: client.Credentials.PushToken!, - sTimestamp: encryptedEvent.TimestampString, - sNonce: encryptedEvent.Nonce, - sMsgEncrypt: encryptedEvent.EncryptedData, - sMsgSign: encryptedEvent.Signature - ); - } - catch - { - return false; - } - } - - /// - /// 验证回调通知事件签名。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/thirdparty/overview-guide/smallprogram/encryption - /// - /// - /// - /// - public static bool VerifyEventSignatureFromXml(this ByteDanceMicroAppClient client, string callbackXml) - { - if (client == null) throw new ArgumentNullException(nameof(client)); - if (callbackXml == null) throw new ArgumentNullException(nameof(callbackXml)); - - try - { - XDocument xdoc = XDocument.Parse(callbackXml); - return Utilities.TtMsgCryptor.VerifySignature( - sToken: client.Credentials.PushToken!, - sTimestamp: xdoc.Root!.Element("TimeStamp")!.Value, - sNonce: xdoc.Root!.Element("Nonce")!.Value, - sMsgEncrypt: xdoc.Root!.Element("Encrypt")!.Value, - sMsgSign: xdoc.Root!.Element("MsgSignature")!.Value - ); - } - catch - { - return false; - } - } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Extensions/ByteDanceMicroAppClientExecuteAppsECPayExtensions.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Extensions/ByteDanceMicroAppClientExecuteAppsECPayExtensions.cs deleted file mode 100644 index 4256a57e..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Extensions/ByteDanceMicroAppClientExecuteAppsECPayExtensions.cs +++ /dev/null @@ -1,616 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Flurl; -using Flurl.Http; - -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp -{ - public static class ByteDanceMicroAppClientExecuteAppsECPayExtensions - { - private static string GenerateRequestSignature(this ByteDanceMicroAppClient client, TRequest request, Dictionary? extraParamMap = null) - where TRequest : ByteDanceMicroAppRequest - { - if (client == null) throw new ArgumentNullException(nameof(client)); - if (request == null) throw new ArgumentNullException(nameof(request)); - - /* - * REF: https://microapp.bytedance.com/docs/zh-CN/mini-app/develop/server/ecpay/TE/#%E4%B8%89%E3%80%81%E7%AD%BE%E5%90%8D-demo - */ - - string json = client.JsonSerializer.Serialize(request); - IList tempList = new List() { client.Credentials.ECPaySalt! }; - IDictionary paramMap = Newtonsoft.Json.JsonConvert.DeserializeObject>(json)!; - - if (extraParamMap != null) - { - foreach (KeyValuePair item in extraParamMap) - { - paramMap[item.Key] = item.Value; - } - } - - foreach (KeyValuePair item in paramMap) - { - string key = item.Key; - string? value = item.Value?.Trim(); - - if ("app_id".Equals(key) || - "thirdparty_id".Equals(key) || - "sign".Equals(key) || - "other_settle_params".Equals(key)) - { - continue; - } - - if (value != null && value.StartsWith("\"") && value.EndsWith("\"")) - { - value = value.Substring(1, value.Length - 1).Trim(); - } - - if (string.IsNullOrEmpty(value) || "null".Equals(value)) - { - continue; - } - - tempList.Add(value!); - } - - string[] tempArray = tempList.ToArray(); - Array.Sort(tempArray, StringComparer.Ordinal); - - string plainText = string.Join("&", tempArray); - return Utilities.MD5Utility.Hash(plainText).ToLower(); - } - - #region SaaS - #region SaaS - Apply - /// - /// 异步调用 [POST] /apps/ecpay/saas/create_merchant 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/ecpay/apply/create - /// - /// - /// - /// - /// - public static async Task ExecuteAppsECPaySaaSCreateMerchantAsync(this ByteDanceMicroAppClient client, Models.AppsECPaySaaSCreateMerchantRequest 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(request, HttpMethod.Post, "apps", "ecpay", "saas", "create_merchant"); - - if (request.Signature == null) - request.Signature = client.GenerateRequestSignature(request); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /apps/ecpay/saas/image_upload 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/ecpay/apply/image-upload - /// - /// - /// - /// - /// - public static async Task ExecuteAppsECPaySaaSImageUploadAsync(this ByteDanceMicroAppClient client, Models.AppsECPaySaaSImageUploadRequest 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(request, HttpMethod.Post, "apps", "ecpay", "saas", "image_upload"); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /apps/ecpay/saas/query_merchant_status 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/ecpay/apply/query - /// - /// - /// - /// - /// - public static async Task ExecuteAppsECPaySaaSQueryMerchantStatusAsync(this ByteDanceMicroAppClient client, Models.AppsECPaySaaSQueryMerchantStatusRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - if (request.Signature == null) - request.Signature = client.GenerateRequestSignature(request); - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "apps", "ecpay", "saas", "query_merchant_status"); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - #endregion - - #region SaaS - PageLinks - /// - /// 异步调用 [POST] /apps/ecpay/saas/add_merchant 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/ecpay/page-links/apply/merchant - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/ecpay/page-links/withdraw/merchant - /// - /// - /// - /// - /// - public static async Task ExecuteAppsECPaySaaSAddMerchantAsync(this ByteDanceMicroAppClient client, Models.AppsECPaySaaSAddMerchantRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - if (request.ComponentAppId == null) - request.ComponentAppId = client.Credentials.AppId; - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "apps", "ecpay", "saas", "add_merchant"); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /apps/ecpay/saas/get_app_merchant 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/ecpay/page-links/apply/app-merchant - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/ecpay/page-links/withdraw/app-merchant - /// - /// - /// - /// - /// - public static async Task ExecuteAppsECPaySaaSGetAppMerchantAsync(this ByteDanceMicroAppClient client, Models.AppsECPaySaaSGetAppMerchantRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - if (request.ComponentAppId == null) - request.ComponentAppId = client.Credentials.AppId; - - if (request.Signature == null) - request.Signature = client.GenerateRequestSignature(request); - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "apps", "ecpay", "saas", "get_app_merchant"); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /apps/ecpay/saas/app_add_sub_merchant 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/ecpay/page-links/apply/sub-merchant - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/ecpay/page-links/withdraw/app-sub-merchant - /// - /// - /// - /// - /// - public static async Task ExecuteAppsECPaySaaSAppAddSubMerchantAsync(this ByteDanceMicroAppClient client, Models.AppsECPaySaaSAppAddSubMerchantRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - if (request.Signature == null) - request.Signature = client.GenerateRequestSignature(request); - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "apps", "ecpay", "saas", "app_add_sub_merchant"); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /apps/ecpay/saas/add_sub_merchant 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/ecpay/page-links/apply/sub-merchant - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/ecpay/page-links/withdraw/sub-merchant - /// - /// - /// - /// - /// - public static async Task ExecuteAppsECPaySaaSAddSubMerchantAsync(this ByteDanceMicroAppClient client, Models.AppsECPaySaaSAddSubMerchantRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - if (request.ComponentAppId == null) - request.ComponentAppId = client.Credentials.AppId; - - if (request.Signature == null) - request.Signature = client.GenerateRequestSignature(request); - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "apps", "ecpay", "saas", "add_sub_merchant"); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - #endregion - - #region SaaS - Withdraw - /// - /// 异步调用 [POST] /apps/ecpay/saas/query_merchant_balance 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/ecpay/withdraw/query-balance - /// - /// - /// - /// - /// - public static async Task ExecuteAppsECPaySaaSQueryMerchantBalanceAsync(this ByteDanceMicroAppClient client, Models.AppsECPaySaaSQueryMerchantBalanceRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - if (request.Signature == null) - request.Signature = client.GenerateRequestSignature(request); - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "apps", "ecpay", "saas", "query_merchant_balance"); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /apps/ecpay/saas/merchant_withdraw 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/ecpay/withdraw/merchant-withdraw - /// - /// - /// - /// - /// - public static async Task ExecuteAppsECPaySaaSMerchantWithdrawAsync(this ByteDanceMicroAppClient client, Models.AppsECPaySaaSMerchantWithdrawRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - if (request.Signature == null) - request.Signature = client.GenerateRequestSignature(request); - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "apps", "ecpay", "saas", "merchant_withdraw"); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /apps/ecpay/saas/query_withdraw_order 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/ecpay/withdraw/query - /// - /// - /// - /// - /// - public static async Task ExecuteAppsECPaySaaSQueryWithdrawOrderAsync(this ByteDanceMicroAppClient client, Models.AppsECPaySaaSQueryWithdrawOrderRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - if (request.Signature == null) - request.Signature = client.GenerateRequestSignature(request); - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "apps", "ecpay", "saas", "query_withdraw_order"); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - #endregion - #endregion - - #region Order - /// - /// 异步调用 [POST] /apps/ecpay/v1/create_order 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/ecpay/pay-list/pay - /// - /// - /// - /// - /// - public static async Task ExecuteAppsECPayCreateOrderV1Async(this ByteDanceMicroAppClient client, Models.AppsECPayCreateOrderV1Request request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - if (request.AppId == null) - request.AppId = client.Credentials.AppId; - - if (request.Signature == null) - request.Signature = client.GenerateRequestSignature(request); - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "apps", "ecpay", "v1", "create_order"); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /apps/ecpay/v1/query_order 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/ecpay/pay-list/query - /// - /// - /// - /// - /// - public static async Task ExecuteAppsECPayQueryOrderV1Async(this ByteDanceMicroAppClient client, Models.AppsECPayQueryOrderV1Request request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - if (request.AppId == null) - request.AppId = client.Credentials.AppId; - - if (request.Signature == null) - request.Signature = client.GenerateRequestSignature(request); - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "apps", "ecpay", "v1", "query_order"); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /apps/ecpay/v1/create_refund 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/ecpay/refund-list/refund - /// - /// - /// - /// - /// - public static async Task ExecuteAppsECPayCreateRefundV1Async(this ByteDanceMicroAppClient client, Models.AppsECPayCreateRefundV1Request request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - if (request.AppId == null) - request.AppId = client.Credentials.AppId; - - if (request.Signature == null) - request.Signature = client.GenerateRequestSignature(request); - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "apps", "ecpay", "v1", "create_refund"); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /apps/ecpay/v1/query_refund 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/ecpay/refund-list/query - /// - /// - /// - /// - /// - public static async Task ExecuteAppsECPayQueryRefundV1Async(this ByteDanceMicroAppClient client, Models.AppsECPayQueryRefundV1Request request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - if (request.AppId == null) - request.AppId = client.Credentials.AppId; - - if (request.Signature == null) - request.Signature = client.GenerateRequestSignature(request); - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "apps", "ecpay", "v1", "query_refund"); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /apps/ecpay/v1/settle 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/ecpay/settlements/settlement - /// - /// - /// - /// - /// - public static async Task ExecuteAppsECPaySettleV1Async(this ByteDanceMicroAppClient client, Models.AppsECPaySettleV1Request request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - if (request.AppId == null) - request.AppId = client.Credentials.AppId; - - if (request.Signature == null) - request.Signature = client.GenerateRequestSignature(request); - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "apps", "ecpay", "v1", "settle"); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /apps/ecpay/v1/query_settle 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/ecpay/settlements/query - /// - /// - /// - /// - /// - public static async Task ExecuteAppsECPayQuerySettleV1Async(this ByteDanceMicroAppClient client, Models.AppsECPayQuerySettleV1Request request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - if (request.AppId == null) - request.AppId = client.Credentials.AppId; - - if (request.Signature == null) - request.Signature = client.GenerateRequestSignature(request); - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "apps", "ecpay", "v1", "query_settle"); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /apps/ecpay/v1/create_return 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/ecpay/return-settle/ReturnSettle - /// - /// - /// - /// - /// - public static async Task ExecuteAppsECPayCreateReturnV1Async(this ByteDanceMicroAppClient client, Models.AppsECPayCreateReturnV1Request request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - if (request.AppId == null) - request.AppId = client.Credentials.AppId; - - if (request.Signature == null) - request.Signature = client.GenerateRequestSignature(request); - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "apps", "ecpay", "v1", "create_return"); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /apps/ecpay/v1/query_return 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/ecpay/return-settle/query - /// - /// - /// - /// - /// - public static async Task ExecuteAppsECPayQueryReturnV1Async(this ByteDanceMicroAppClient client, Models.AppsECPayQueryReturnV1Request request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - if (request.AppId == null) - request.AppId = client.Credentials.AppId; - - if (request.Signature == null) - request.Signature = client.GenerateRequestSignature(request); - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "apps", "ecpay", "v1", "query_return"); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /apps/ecpay/v1/query_platform_order 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/ecpay/settlements/auto-settle/query - /// - /// - /// - /// - /// - public static async Task ExecuteAppsECPayQueryPlatformOrderV1Async(this ByteDanceMicroAppClient client, Models.AppsECPayQueryPlatformOrderV1Request request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - if (request.AppId == null) - request.AppId = client.Credentials.AppId; - - if (request.Signature == null) - request.Signature = client.GenerateRequestSignature(request); - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "apps", "ecpay", "v1", "query_platform_order"); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - #endregion - - /// - /// 异步调用 [GET] /apps/bills 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/ecpay/bills/bill - /// - /// - /// - /// - /// - public static async Task ExecuteAppsBillsAsync(this ByteDanceMicroAppClient client, Models.AppsBillsRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - if (request.AppId == null) - request.AppId = client.Credentials.AppId; - - if (request.Signature == null) - { - request.Signature = client.GenerateRequestSignature(request, new Dictionary() - { - { "merchant_id" , request.MerchantId }, - { "bill_date" , request.DateString }, - { "bill_type" , request.BillType } - }); - } - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Get, "apps", "bills") - .SetQueryParam("app_id", request.AppId) - .SetQueryParam("merchant_id", request.MerchantId) - .SetQueryParam("bill_date", request.DateString) - .SetQueryParam("bill_type", request.BillType) - .SetQueryParam("sign", request.Signature); - - if (request.ComponentAppId != null) - flurlReq.SetQueryParam("thirdparty_id", request.ComponentAppId); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [GET] /apps/fund/bills 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/ecpay/bills/fundbill - /// - /// - /// - /// - /// - public static async Task ExecuteAppsFundBillsAsync(this ByteDanceMicroAppClient client, Models.AppsFundBillsRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - if (request.AppId == null) - request.AppId = client.Credentials.AppId; - - if (request.Signature == null) - { - request.Signature = client.GenerateRequestSignature(request, new Dictionary() - { - { "merchant_id" , request.MerchantId }, - { "bill_date" , request.DateString }, - { "account_type" , request.AccountType }, - { "payment_type" , request.PaymentType }, - { "trade_type" , request.TradeType }, - }); - } - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Get, "apps", "fund", "bills") - .SetQueryParam("app_id", request.AppId) - .SetQueryParam("merchant_id", request.MerchantId) - .SetQueryParam("bill_date", request.DateString) - .SetQueryParam("account_type", request.AccountType) - .SetQueryParam("payment_type", request.PaymentType) - .SetQueryParam("trade_type", request.TradeType) - .SetQueryParam("sign", request.Signature); - - if (request.ComponentAppId != null) - flurlReq.SetQueryParam("thirdparty_id", request.ComponentAppId); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Extensions/ByteDanceMicroAppClientExecuteAppsExtensions.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Extensions/ByteDanceMicroAppClientExecuteAppsExtensions.cs deleted file mode 100644 index 7a9fda29..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Extensions/ByteDanceMicroAppClientExecuteAppsExtensions.cs +++ /dev/null @@ -1,1955 +0,0 @@ -using System; -using System.Net.Http; -using System.Text; -using System.Threading; -using System.Threading.Tasks; -using Flurl; -using Flurl.Http; - -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp -{ - public static class ByteDanceMicroAppClientExecuteAppsExtensions - { - /// - /// 异步调用 [POST] /apps/v2/token 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/interface-request-credential/get-access-token - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-game/develop/server/interface-request-credential/get-access-token - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/interaction/develop/server/interface-request-credential/get-access-token - /// - /// - /// - /// - /// - public static async Task ExecuteAppsTokenV2Async(this ByteDanceMicroAppClient client, Models.AppsTokenV2Request request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - if (request.AppId == null) - request.AppId = client.Credentials.AppId; - - if (request.AppSecret == null) - request.AppSecret = client.Credentials.AppSecret; - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "apps", "v2", "token"); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /apps/v2/jscode2session 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/log-in/code-2-session - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-game/develop/server/log-in/code-2-session - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/interaction/develop/server/log-in/code-2-session - /// - /// - /// - /// - /// - public static async Task ExecuteAppsJsCode2SessionV2Async(this ByteDanceMicroAppClient client, Models.AppsJsCode2SessionV2Request request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - if (request.AppId == null) - request.AppId = client.Credentials.AppId; - - if (request.AppSecret == null) - request.AppSecret = client.Credentials.AppSecret; - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "apps", "v2", "jscode2session"); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - #region Capacity - /// - /// 异步调用 [POST] /apps/v1/capacity/upload_material 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/other/upload-material - /// - /// - /// - /// - /// - public static async Task ExecuteAppsCapacityUploadMaterialV1Async(this ByteDanceMicroAppClient client, Models.AppsCapacityUploadMaterialV1Request request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - if (request.MaterialFileName == null) - request.MaterialFileName = Guid.NewGuid().ToString("N").ToLower() + ".jpg"; - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "apps", "v1", "capacity", "upload_material"); - - using var httpContent = Utilities.FileHttpContentBuilder.Build(fileName: request.MaterialFileName, fileBytes: request.MaterialFileBytes, fileContentType: "image/jpeg", formDataName: "material_file"); - httpContent.Add(new ByteArrayContent(Encoding.UTF8.GetBytes(request.MaterialType.ToString())), "material_type"); - - return await client.SendRequestAsync(flurlReq, httpContent: httpContent, cancellationToken: cancellationToken); - } - - #region Capacity/AwemeCapacity - /// - /// 异步调用 [GET] /apps/v1/capacity/query_aweme_permission_list 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/aweme-capacity/query-aweme-permission-list - /// - /// - /// - /// - /// - public static async Task ExecuteAppsCapacityQueryAwemePermissionListV1Async(this ByteDanceMicroAppClient client, Models.AppsCapacityQueryAwemePermissionListV1Request 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(request, HttpMethod.Get, "apps", "v1", "capacity", "query_aweme_permission_list") - .WithHeader("access-token", request.AccessToken); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /apps/v1/capacity/apply_aweme_permission 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/aweme-capacity/apply-aweme-permission - /// - /// - /// - /// - /// - public static async Task ExecuteAppsCapacityApplyAwemePermissionV1Async(this ByteDanceMicroAppClient client, Models.AppsCapacityApplyAwemePermissionV1Request 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(request, HttpMethod.Post, "apps", "v1", "capacity", "apply_aweme_permission") - .WithHeader("access-token", request.AccessToken); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [GET] /apps/v1/capacity/query_scope_quota_detail 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/aweme-capacity/query-scope-quota-detail - /// - /// - /// - /// - /// - public static async Task ExecuteAppsCapacityQueryScopeQuotaDetailV1Async(this ByteDanceMicroAppClient client, Models.AppsCapacityQueryScopeQuotaDetailV1Request 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(request, HttpMethod.Get, "apps", "v1", "capacity", "query_scope_quota_detail") - .WithHeader("access-token", request.AccessToken) - .SetQueryParam("permission_key", request.PermissionKey); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /apps/v1/capacity/apply_scope_quota 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/aweme-capacity/apply-scope-quota - /// - /// - /// - /// - /// - public static async Task ExecuteAppsCapacityApplyScopeQuotaV1Async(this ByteDanceMicroAppClient client, Models.AppsCapacityApplyScopeQuotaV1Request 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(request, HttpMethod.Post, "apps", "v1", "capacity", "apply_scope_quota") - .WithHeader("access-token", request.AccessToken); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [GET] /apps/v1/capacity/query_aweme_video_keyword_list 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/aweme-capacity/query-aweme-video-keyword - /// - /// - /// - /// - /// - public static async Task ExecuteAppsCapacityQueryAwemeVideoKeywordListV1Async(this ByteDanceMicroAppClient client, Models.AppsCapacityQueryAwemeVideoKeywordListV1Request 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(request, HttpMethod.Get, "apps", "v1", "capacity", "query_aweme_video_keyword_list") - .WithHeader("access-token", request.AccessToken) - .SetQueryParam("page_num", request.Page) - .SetQueryParam("page_size", request.Limit); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /apps/v1/capacity/add_aweme_video_keyword 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/aweme-capacity/add-aweme-video-keyword - /// - /// - /// - /// - /// - public static async Task ExecuteAppsCapacityAddAwemeVideoKeywordV1Async(this ByteDanceMicroAppClient client, Models.AppsCapacityAddAwemeVideoKeywordV1Request 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(request, HttpMethod.Post, "apps", "v1", "capacity", "add_aweme_video_keyword") - .WithHeader("access-token", request.AccessToken); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /apps/v1/capacity/delete_aweme_video_keyword 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/aweme-capacity/delete-aweme-video-keyword - /// - /// - /// - /// - /// - public static async Task ExecuteAppsCapacityDeleteAwemeVideoKeywordV1Async(this ByteDanceMicroAppClient client, Models.AppsCapacityDeleteAwemeVideoKeywordV1Request 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(request, HttpMethod.Post, "apps", "v1", "capacity", "delete_aweme_video_keyword") - .WithHeader("access-token", request.AccessToken); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - #endregion - - #region Capacity/Delivery - /// - /// 异步调用 [POST] /apps/v1/capacity/add_alias 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/delivery/add-alias - /// - /// - /// - /// - /// - public static async Task ExecuteAppsCapacityAddAliasV1Async(this ByteDanceMicroAppClient client, Models.AppsCapacityAddAliasV1Request 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(request, HttpMethod.Post, "apps", "v1", "capacity", "add_alias") - .WithHeader("access-token", request.AccessToken); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [GET] /apps/v1/capacity/query_alias_list 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/delivery/query-alias-list - /// - /// - /// - /// - /// - public static async Task ExecuteAppsCapacityQueryAliasListV1Async(this ByteDanceMicroAppClient client, Models.AppsCapacityQueryAliasListV1Request 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(request, HttpMethod.Get, "apps", "v1", "capacity", "query_alias_list") - .WithHeader("access-token", request.AccessToken); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /apps/v1/capacity/modify_alias 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/delivery/modify-alias - /// - /// - /// - /// - /// - public static async Task ExecuteAppsCapacityModifyAliasV1Async(this ByteDanceMicroAppClient client, Models.AppsCapacityModifyAliasV1Request 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(request, HttpMethod.Post, "apps", "v1", "capacity", "modify_alias") - .WithHeader("access-token", request.AccessToken); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /apps/v1/capacity/delete_alias 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/delivery/delete-alias - /// - /// - /// - /// - /// - public static async Task ExecuteAppsCapacityDeleteAliasV1Async(this ByteDanceMicroAppClient client, Models.AppsCapacityDeleteAliasV1Request 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(request, HttpMethod.Post, "apps", "v1", "capacity", "delete_alias") - .WithHeader("access-token", request.AccessToken); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /apps/v1/capacity/set_search_tag 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/delivery/set-search-tag - /// - /// - /// - /// - /// - public static async Task ExecuteAppsCapacitySetSearchTagV1Async(this ByteDanceMicroAppClient client, Models.AppsCapacitySetSearchTagV1Request 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(request, HttpMethod.Post, "apps", "v1", "capacity", "set_search_tag") - .WithHeader("access-token", request.AccessToken); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [GET] /apps/v1/capacity/query_search_tag_list 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/delivery/query-search-tag-list - /// - /// - /// - /// - /// - public static async Task ExecuteAppsCapacityQuerySearchTagListV1Async(this ByteDanceMicroAppClient client, Models.AppsCapacityQuerySearchTagListV1Request 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(request, HttpMethod.Get, "apps", "v1", "capacity", "query_search_tag_list") - .WithHeader("access-token", request.AccessToken); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - #endregion - - #region Capacity/FollowAweme - /// - /// 异步调用 [POST] /apps/v1/capacity/bind_aweme_user 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/follow-aweme/bind-aweme-user - /// - /// - /// - /// - /// - public static async Task ExecuteAppsCapacityBindAwemeUserV1Async(this ByteDanceMicroAppClient client, Models.AppsCapacityBindAwemeUserV1Request 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(request, HttpMethod.Post, "apps", "v1", "capacity", "bind_aweme_user") - .WithHeader("access-token", request.AccessToken); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /apps/v1/capacity/unbind_aweme_user_bind 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/follow-aweme/unbind-aweme-user - /// - /// - /// - /// - /// - public static async Task ExecuteAppsCapacityUnbindAwemeUserV1Async(this ByteDanceMicroAppClient client, Models.AppsCapacityUnbindAwemeUserV1Request 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(request, HttpMethod.Post, "apps", "v1", "capacity", "unbind_aweme_user_bind") - .WithHeader("access-token", request.AccessToken); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [GET] /apps/v1/capacity/get_aweme_user_bind_qrcode 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/follow-aweme/get-aweme-user-bind-qrcode - /// - /// - /// - /// - /// - public static async Task ExecuteAppsCapacityGetAwemeUserBindQrcodeV1Async(this ByteDanceMicroAppClient client, Models.AppsCapacityGetAwemeUserBindQrcodeV1Request 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(request, HttpMethod.Get, "apps", "v1", "capacity", "get_aweme_user_bind_qrcode") - .WithHeader("access-token", request.AccessToken) - .SetQueryParam("type", request.BindType); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [GET] /apps/v1/capacity/query_aweme_user_bind_list 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/follow-aweme/query-aweme-user-bind-list - /// - /// - /// - /// - /// - public static async Task ExecuteAppsCapacityQueryAwemeUserBindListV1Async(this ByteDanceMicroAppClient client, Models.AppsCapacityQueryAwemeUserBindListV1Request 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(request, HttpMethod.Get, "apps", "v1", "capacity", "query_aweme_user_bind_list") - .WithHeader("access-token", request.AccessToken) - .SetQueryParam("type", request.BindType) - .SetQueryParam("page_num", request.Page) - .SetQueryParam("page_size", request.Limit); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - #endregion - - #region Capacity/Mount - /// - /// 异步调用 [POST] /apps/v1/capacity/apply_capacity 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/mount/apply-self-mount - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/mount/apply-live-self-mount - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/mount/apply-video-talent-mount - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/mount/capcut-video-template/apply-capacity - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/page-layout-custom/apply-capacity - /// - /// - /// - /// - /// - public static async Task ExecuteAppsCapacityApplyCapacityV1Async(this ByteDanceMicroAppClient client, Models.AppsCapacityApplyCapacityV1Request 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(request, HttpMethod.Post, "apps", "v1", "capacity", "apply_capacity") - .WithHeader("access-token", request.AccessToken); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [GET] /apps/v1/capacity/query_apply_status 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/mount/query-video-self-mount - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/mount/query-live-self-mount - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/mount/query-video-talent-mount - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/mount/capcut-video-template/query-status - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/page-layout-custom/query-capacity-status - /// - /// - /// - /// - /// - public static async Task ExecuteAppsCapacityQueryApplyStatusV1Async(this ByteDanceMicroAppClient client, Models.AppsCapacityQueryApplyStatusV1Request 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(request, HttpMethod.Get, "apps", "v1", "capacity", "query_apply_status") - .WithHeader("access-token", request.AccessToken) - .SetQueryParam("capacity_key", request.CapacityKey); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /apps/v1/capacity/bind_self_mount_user 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/mount/bind-self-mount-user - /// - /// - /// - /// - /// - public static async Task ExecuteAppsCapacityBindSelfMountUserV1Async(this ByteDanceMicroAppClient client, Models.AppsCapacityBindSelfMountUserV1Request 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(request, HttpMethod.Post, "apps", "v1", "capacity", "bind_self_mount_user") - .WithHeader("access-token", request.AccessToken); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /apps/v1/capacity/unbind_self_mount_user 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/mount/unbind-self-mount-user - /// - /// - /// - /// - /// - public static async Task ExecuteAppsCapacityUnbindSelfMountUserV1Async(this ByteDanceMicroAppClient client, Models.AppsCapacityUnbindSelfMountUserV1Request 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(request, HttpMethod.Post, "apps", "v1", "capacity", "unbind_self_mount_user") - .WithHeader("access-token", request.AccessToken); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [GET] /apps/v1/capacity/get_self_mount_bind_qrcode 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/mount/get-self-mount-bind-qrcode - /// - /// - /// - /// - /// - public static async Task ExecuteAppsCapacityGetSelfMountBindQrcodeV1Async(this ByteDanceMicroAppClient client, Models.AppsCapacityGetSelfMountBindQrcodeV1Request 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(request, HttpMethod.Get, "apps", "v1", "capacity", "get_self_mount_bind_qrcode") - .WithHeader("access-token", request.AccessToken) - .SetQueryParam("capacity_key", request.CapacityKey); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [GET] /apps/v1/capacity/query_self_mount_user_list 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/mount/query-self-mount-user-list - /// - /// - /// - /// - /// - public static async Task ExecuteAppsCapacityQuerySelfMountUserListV1Async(this ByteDanceMicroAppClient client, Models.AppsCapacityQuerySelfMountUserListV1Request 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(request, HttpMethod.Get, "apps", "v1", "capacity", "query_self_mount_user_list") - .WithHeader("access-token", request.AccessToken) - .SetQueryParam("capacity_key", request.CapacityKey) - .SetQueryParam("page_num", request.Page) - .SetQueryParam("page_size", request.Limit); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - #region Capacity/Mount/Capcut - /// - /// 异步调用 [GET] /apps/v1/capacity/query_capcut_info 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/mount/capcut-video-template/query-capcut-info - /// - /// - /// - /// - /// - public static async Task ExecuteAppsCapacityQueryCapcutInfoV1Async(this ByteDanceMicroAppClient client, Models.AppsCapacityQueryCapcutInfoV1Request 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(request, HttpMethod.Get, "apps", "v1", "capacity", "query_capcut_info") - .WithHeader("access-token", request.AccessToken); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [GET] /apps/v1/capacity/query_capcut_template_list 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/mount/capcut-video-template/query-capcut-template-list - /// - /// - /// - /// - /// - public static async Task ExecuteAppsCapacityQueryCapcutTemplateListV1Async(this ByteDanceMicroAppClient client, Models.AppsCapacityQueryCapcutTemplateListV1Request 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(request, HttpMethod.Get, "apps", "v1", "capacity", "query_capcut_template_list") - .WithHeader("access-token", request.AccessToken) - .SetQueryParam("page_num", request.Page) - .SetQueryParam("page_size", request.Limit); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /apps/v1/capacity/update_capcut_template_status 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/mount/capcut-video-template/update-template-status - /// - /// - /// - /// - /// - public static async Task ExecuteAppsCapacityUpdateCapcutTemplateStatusV1Async(this ByteDanceMicroAppClient client, Models.AppsCapacityUpdateCapcutTemplateStatusV1Request 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(request, HttpMethod.Post, "apps", "v1", "capacity", "update_capcut_template_status") - .WithHeader("access-token", request.AccessToken); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - #endregion - #endregion - - #region Capacity/SimpleQrcode - /// - /// 异步调用 [GET] /apps/v1/capacity/query_simple_qr_bind_list 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/simple-qr-code/query-simple-qr-bind-list - /// - /// - /// - /// - /// - public static async Task ExecuteAppsCapacityQuerySimpleQrcodeBindListV1Async(this ByteDanceMicroAppClient client, Models.AppsCapacityQuerySimpleQrcodeBindListV1Request 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(request, HttpMethod.Get, "apps", "v1", "capacity", "query_simple_qr_bind_list") - .WithHeader("access-token", request.AccessToken) - .SetQueryParam("page_num", request.Page) - .SetQueryParam("page_size", request.Limit); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /apps/v1/capacity/add_simple_qr_bind 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/simple-qr-code/add-simple-qr-bind - /// - /// - /// - /// - /// - public static async Task ExecuteAppsCapacityAddSimpleQrcodeBindV1Async(this ByteDanceMicroAppClient client, Models.AppsCapacityAddSimpleQrcodeBindV1Request 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(request, HttpMethod.Post, "apps", "v1", "capacity", "add_simple_qr_bind") - .WithHeader("access-token", request.AccessToken); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /apps/v1/capacity/update_simple_qr_bind 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/simple-qr-code/update-simple-qr-bind - /// - /// - /// - /// - /// - public static async Task ExecuteAppsCapacityUpdateSimpleQrcodeBindV1Async(this ByteDanceMicroAppClient client, Models.AppsCapacityUpdateSimpleQrcodeBindV1Request 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(request, HttpMethod.Post, "apps", "v1", "capacity", "update_simple_qr_bind") - .WithHeader("access-token", request.AccessToken); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /apps/v1/capacity/update_simple_qr_bind_status 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/simple-qr-code/update-simple-qr-bind-status - /// - /// - /// - /// - /// - public static async Task ExecuteAppsCapacityUpdateSimpleQrcodeBindStatusV1Async(this ByteDanceMicroAppClient client, Models.AppsCapacityUpdateSimpleQrcodeBindStatusV1Request 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(request, HttpMethod.Post, "apps", "v1", "capacity", "update_simple_qr_bind_status") - .WithHeader("access-token", request.AccessToken); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /apps/v1/capacity/delete_simple_qr_bind 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/simple-qr-code/delete-simple-qr-bind - /// - /// - /// - /// - /// - public static async Task ExecuteAppsCapacityDeleteSimpleQrcodeBindV1Async(this ByteDanceMicroAppClient client, Models.AppsCapacityDeleteSimpleQrcodeBindV1Request 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(request, HttpMethod.Post, "apps", "v1", "capacity", "delete_simple_qr_bind") - .WithHeader("access-token", request.AccessToken); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - #endregion - - #region Capacity/SubscribeNotification - /// - /// 异步调用 [GET] /apps/v1/capacity/query_subscribe_notification_tpl_list 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/subscribe-notification/query-template-list - /// - /// - /// - /// - /// - public static async Task ExecuteAppsCapacityQuerySubscribeNotificationTemplateListV1Async(this ByteDanceMicroAppClient client, Models.AppsCapacityQuerySubscribeNotificationTemplateListV1Request 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(request, HttpMethod.Get, "apps", "v1", "capacity", "query_subscribe_notification_tpl_list") - .WithHeader("access-token", request.AccessToken) - .SetQueryParam("page_num", request.Page) - .SetQueryParam("page_size", request.Limit) - .SetQueryParam("classification", request.Classification) - .SetQueryParam("template_type", request.TemplateType); - - if (request.CategoryIdList != null) - flurlReq.SetQueryParam("category_ids", string.Join(",", request.CategoryIdList)); - - if (request.Keyword != null) - flurlReq.SetQueryParam("keyword", request.Keyword); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [GET] /apps/v1/capacity/query_app_subscribe_notification_tpl 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/subscribe-notification/query-app-template-list - /// - /// - /// - /// - /// - public static async Task ExecuteAppsCapacityQueryAppSubscribeNotificationTemplateV1Async(this ByteDanceMicroAppClient client, Models.AppsCapacityQueryAppSubscribeNotificationTemplateV1Request 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(request, HttpMethod.Get, "apps", "v1", "capacity", "query_app_subscribe_notification_tpl") - .WithHeader("access-token", request.AccessToken) - .SetQueryParam("page_num", request.Page) - .SetQueryParam("page_size", request.Limit) - .SetQueryParam("classification", request.Classification); - - if (request.CategoryIdList != null) - flurlReq.SetQueryParam("category_ids", string.Join(",", request.CategoryIdList)); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [GET] /apps/v1/capacity/query_created_subscribe_notification_tpl_list 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/subscribe-notification/query-created-template-list - /// - /// - /// - /// - /// - public static async Task ExecuteAppsCapacityQueryCreatedSubscribeNotificationTemplateListV1Async(this ByteDanceMicroAppClient client, Models.AppsCapacityQueryCreatedSubscribeNotificationTemplateListV1Request 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(request, HttpMethod.Get, "apps", "v1", "capacity", "query_created_subscribe_notification_tpl_list") - .WithHeader("access-token", request.AccessToken) - .SetQueryParam("page_num", request.Page) - .SetQueryParam("page_size", request.Limit); - - if (request.Status != null) - flurlReq.SetQueryParam("status", request.Status); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /apps/v1/capacity/add_app_subscribe_notification_tpl 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/subscribe-notification/add-template - /// - /// - /// - /// - /// - public static async Task ExecuteAppsCapacityAddAppSubscribeNotificationTemplateV1Async(this ByteDanceMicroAppClient client, Models.AppsCapacityAddAppSubscribeNotificationTemplateV1Request 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(request, HttpMethod.Post, "apps", "v1", "capacity", "add_app_subscribe_notification_tpl") - .WithHeader("access-token", request.AccessToken); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /apps/v1/capacity/modify_app_subscribe_notification_tpl 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/subscribe-notification/modify-app-template - /// - /// - /// - /// - /// - public static async Task ExecuteAppsCapacityModifyAppSubscribeNotificationTemplateV1Async(this ByteDanceMicroAppClient client, Models.AppsCapacityModifyAppSubscribeNotificationTemplateV1Request 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(request, HttpMethod.Post, "apps", "v1", "capacity", "modify_app_subscribe_notification_tpl") - .WithHeader("access-token", request.AccessToken); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /apps/v1/capacity/delete_app_subscribe_notification_tpl 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/subscribe-notification/delete-template - /// - /// - /// - /// - /// - public static async Task ExecuteAppsCapacityDeleteAppSubscribeNotificationTemplateV1Async(this ByteDanceMicroAppClient client, Models.AppsCapacityDeleteAppSubscribeNotificationTemplateV1Request 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(request, HttpMethod.Post, "apps", "v1", "capacity", "delete_app_subscribe_notification_tpl") - .WithHeader("access-token", request.AccessToken); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /apps/v1/capacity/create_subscribe_notification_tpl 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/subscribe-notification/create-template - /// - /// - /// - /// - /// - public static async Task ExecuteAppsCapacityCreateAppSubscribeNotificationTemplateV1Async(this ByteDanceMicroAppClient client, Models.AppsCapacityCreateAppSubscribeNotificationTemplateV1Request 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(request, HttpMethod.Post, "apps", "v1", "capacity", "create_subscribe_notification_tpl") - .WithHeader("access-token", request.AccessToken); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - #endregion - - #region TrafficPermission - /// - /// 异步调用 [GET] /apps/v1/capacity/query_traffic_permission_status 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/traffic-permission/query-status - /// - /// - /// - /// - /// - public static async Task ExecuteAppsCapacityQueryTrafficPermissionStatusV1Async(this ByteDanceMicroAppClient client, Models.AppsCapacityQueryTrafficPermissionStatusV1Request 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(request, HttpMethod.Get, "apps", "v1", "capacity", "query_traffic_permission_status") - .WithHeader("access-token", request.AccessToken); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /apps/v1/capacity/open_traffic_permission 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/traffic-permission/open-traffic-permission - /// - /// - /// - /// - /// - public static async Task ExecuteAppsCapacityOpenTrafficPermissionV1Async(this ByteDanceMicroAppClient client, Models.AppsCapacityOpenTrafficPermissionV1Request 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(request, HttpMethod.Post, "apps", "v1", "capacity", "open_traffic_permission") - .WithHeader("access-token", request.AccessToken); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [GET] /apps/v1/capacity/query_ad_placement_list 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/traffic-permission/query-ad-placement-list - /// - /// - /// - /// - /// - public static async Task ExecuteAppsCapacityQueryAdPlacementListV1Async(this ByteDanceMicroAppClient client, Models.AppsCapacityQueryAdPlacementListV1Request 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(request, HttpMethod.Get, "apps", "v1", "capacity", "query_ad_placement_list") - .WithHeader("access-token", request.AccessToken); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /apps/v1/capacity/add_ad_placement 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/traffic-permission/add-ad-placement - /// - /// - /// - /// - /// - public static async Task ExecuteAppsCapacityAddAdPlacementV1Async(this ByteDanceMicroAppClient client, Models.AppsCapacityAddAdPlacementV1Request 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(request, HttpMethod.Post, "apps", "v1", "capacity", "add_ad_placement") - .WithHeader("access-token", request.AccessToken); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /apps/v1/capacity/update_ad_placement_status 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/traffic-permission/update-ad-placement-status - /// - /// - /// - /// - /// - public static async Task ExecuteAppsCapacityUpdateAdPlacementStatusV1Async(this ByteDanceMicroAppClient client, Models.AppsCapacityUpdateAdPlacementStatusV1Request 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(request, HttpMethod.Post, "apps", "v1", "capacity", "update_ad_placement_status") - .WithHeader("access-token", request.AccessToken); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [GET] /apps/v1/capacity/query_ad_income 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/traffic-permission/query-ad-income - /// - /// - /// - /// - /// - public static async Task ExecuteAppsCapacityQueryAdIncomeV1Async(this ByteDanceMicroAppClient client, Models.AppsCapacityQueryAdIncomeV1Request 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(request, HttpMethod.Get, "apps", "v1", "capacity", "query_ad_income") - .WithHeader("access-token", request.AccessToken) - .SetQueryParam("start_date", request.StartDateString) - .SetQueryParam("end_date", request.EndDateString); - - if (request.HostName != null) - flurlReq.SetQueryParam("host_name", request.HostName); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [GET] /apps/v1/capacity/query_ad_settlement_list 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/traffic-permission/query-ad-settlement-list - /// - /// - /// - /// - /// - public static async Task ExecuteAppsCapacityQueryAdSettlementListV1Async(this ByteDanceMicroAppClient client, Models.AppsCapacityQueryAdSettlementListV1Request 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(request, HttpMethod.Get, "apps", "v1", "capacity", "query_ad_settlement_list") - .WithHeader("access-token", request.AccessToken); - - if (request.PeriodString != null) - flurlReq.SetQueryParam("month", request.PeriodString); - - if (request.Status != null) - flurlReq.SetQueryParam("status", request.Status); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - #endregion - #endregion - - #region Category - /// - /// 异步调用 [GET] /apps/v1/category/query_app_categories 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/category/query-app-categories - /// - /// - /// - /// - /// - public static async Task ExecuteAppsCategoryQueryAppCategoriesV1Async(this ByteDanceMicroAppClient client, Models.AppsCategoryQueryAppCategoriesV1Request 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(request, HttpMethod.Get, "apps", "v1", "category", "query_app_categories") - .WithHeader("access-token", request.AccessToken); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - #endregion - - #region Censor - /// - /// 异步调用 [POST] /apps/censor/image 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/content-security/picture-detect-v2 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/thirdparty/API/smallprogram/auth-app-manage/develop/picture-detect - /// - /// - /// - /// - /// - public static async Task ExecuteAppsCensorImageAsync(this ByteDanceMicroAppClient client, Models.AppsCensorImageRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - if (request.AppId == null) - request.AppId = client.Credentials.AppId; - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "apps", "censor", "image"); - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - #endregion - - #region Chat - /// - /// 异步调用 [GET] /apps/chat/customer_service_url 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/im/customer-service-url - /// - /// - /// - /// - /// - public static async Task ExecuteAppsChatCustomerServiceUrlAsync(this ByteDanceMicroAppClient client, Models.AppsChatCustomerServiceUrlRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - if (request.AppId == null) - request.AppId = client.Credentials.AppId; - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Get, "apps", "chat", "customer_service_url") - .WithHeader("access-token", request.AccessToken) - .SetQueryParam("appid", request.AppId) - .SetQueryParam("openid", request.OpenId) - .SetQueryParam("type", request.Type) - .SetQueryParam("scene", request.Scene); - - if (request.OrderId != null) - flurlReq.SetQueryParam("order_id", request.OrderId); - - if (request.IMType != null) - flurlReq.SetQueryParam("im_type", request.IMType); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - #endregion - - #region CustomerService - /// - /// 异步调用 [GET] /apps/customer_service/url 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/thirdparty/API/smallprogram/auth-app-manage/operation/microapp/customer-service - /// - /// - /// - /// - /// - public static async Task ExecuteAppsCustomerServiceUrlAsync(this ByteDanceMicroAppClient client, Models.AppsCustomerServiceUrlRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - if (request.AppId == null) - request.AppId = client.Credentials.AppId; - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Get, "apps", "customer_service", "url") - .SetQueryParam("access_token", request.AccessToken) - .SetQueryParam("appid", request.AppId) - .SetQueryParam("openid", request.OpenId) - .SetQueryParam("type", request.Type) - .SetQueryParam("scene", request.Scene); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - #endregion - - #region DataAnalysis - #region DataAnalysis/TransactionAnalysis - /// - /// 异步调用 [GET] /apps/v1/data_analysis/query_deal_overview_data 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/data-analysis/transaction-analysis/overview-analysis - /// - /// - /// - /// - /// - public static async Task ExecuteAppsDataAnalysisQueryDealOverviewDataV1Async(this ByteDanceMicroAppClient client, Models.AppsDataAnalysisQueryDealOverviewDataV1Request 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(request, HttpMethod.Get, "apps", "v1", "data_analysis", "query_deal_overview_data") - .WithHeader("access-token", request.AccessToken) - .SetQueryParam("start_time", request.StartTimestamp) - .SetQueryParam("end_time", request.EndTimestamp); - - if (request.HostName != null) - flurlReq.SetQueryParam("host_name", request.HostName); - - if (request.VersionType != null) - flurlReq.SetQueryParam("version_type", request.VersionType); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [GET] /apps/v1/data_analysis/query_video_deal_data 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/data-analysis/transaction-analysis/video-analysis - /// - /// - /// - /// - /// - public static async Task ExecuteAppsDataAnalysisQueryVideoDealDataV1Async(this ByteDanceMicroAppClient client, Models.AppsDataAnalysisQueryVideoDealDataV1Request 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(request, HttpMethod.Get, "apps", "v1", "data_analysis", "query_video_deal_data") - .WithHeader("access-token", request.AccessToken) - .SetQueryParam("start_time", request.StartTimestamp) - .SetQueryParam("end_time", request.EndTimestamp); - - if (request.HostName != null) - flurlReq.SetQueryParam("host_name", request.HostName); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [GET] /apps/v1/data_analysis/query_live_room 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/data-analysis/transaction-analysis/query-live-room - /// - /// - /// - /// - /// - public static async Task ExecuteAppsDataAnalysisQueryLiveRoomV1Async(this ByteDanceMicroAppClient client, Models.AppsDataAnalysisQueryLiveRoomV1Request 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(request, HttpMethod.Get, "apps", "v1", "data_analysis", "query_live_room") - .WithHeader("access-token", request.AccessToken); - - if (request.AnchorName != null) - flurlReq.SetQueryParam("anchor_name", request.AnchorName); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [GET] /apps/v1/data_analysis/query_live_room_data 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/data-analysis/transaction-analysis/live-room-data-analysis - /// - /// - /// - /// - /// - public static async Task ExecuteAppsDataAnalysisQueryLiveRoomDataV1Async(this ByteDanceMicroAppClient client, Models.AppsDataAnalysisQueryLiveRoomDataV1Request 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(request, HttpMethod.Get, "apps", "v1", "data_analysis", "query_live_room_data") - .WithHeader("access-token", request.AccessToken) - .SetQueryParam("live_room_id", request.LiveRoomId); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [GET] /apps/v1/data_analysis/query_live_deal_data 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/data-analysis/transaction-analysis/live-deal-analysis - /// - /// - /// - /// - /// - public static async Task ExecuteAppsDataAnalysisQueryLiveDealDataV1Async(this ByteDanceMicroAppClient client, Models.AppsDataAnalysisQueryLiveDealDataV1Request 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(request, HttpMethod.Get, "apps", "v1", "data_analysis", "query_live_deal_data") - .WithHeader("access-token", request.AccessToken) - .SetQueryParam("live_room_id", request.LiveRoomId); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [GET] /apps/v1/data_analysis/query_product_deal_data 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/data-analysis/transaction-analysis/product-deal-analysis - /// - /// - /// - /// - /// - public static async Task ExecuteAppsDataAnalysisQueryProductDealDataV1Async(this ByteDanceMicroAppClient client, Models.AppsDataAnalysisQueryProductDealDataV1Request 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(request, HttpMethod.Get, "apps", "v1", "data_analysis", "query_product_deal_data") - .WithHeader("access-token", request.AccessToken) - .SetQueryParam("start_time", request.StartTimestamp) - .SetQueryParam("end_time", request.EndTimestamp) - .SetQueryParam("page_num", request.Page) - .SetQueryParam("page_size", request.Limit); - - if (request.HostName != null) - flurlReq.SetQueryParam("host_name", request.HostName); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - #endregion - - #region DataAnalysis/UserAnalysis - /// - /// 异步调用 [GET] /apps/v1/data_analysis/query_behavior_data 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/data-analysis/user-analysis/behavior-analysis - /// - /// - /// - /// - /// - public static async Task ExecuteAppsDataAnalysisQueryBehaviorDataV1Async(this ByteDanceMicroAppClient client, Models.AppsDataAnalysisQueryBehaviorDataV1Request 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(request, HttpMethod.Get, "apps", "v1", "data_analysis", "query_behavior_data") - .WithHeader("access-token", request.AccessToken) - .SetQueryParam("start_time", request.StartTimestamp) - .SetQueryParam("end_time", request.EndTimestamp); - - if (request.HostName != null) - flurlReq.SetQueryParam("host_name", request.HostName); - - if (request.OS != null) - flurlReq.SetQueryParam("os", request.OS); - - if (request.VersionType != null) - flurlReq.SetQueryParam("version_type", request.VersionType); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [GET] /apps/v1/data_analysis/query_real_time_user_data 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/data-analysis/user-analysis/realtime-analysis - /// - /// - /// - /// - /// - public static async Task ExecuteAppsDataAnalysisQueryRealTimeUserDataV1Async(this ByteDanceMicroAppClient client, Models.AppsDataAnalysisQueryRealTimeUserDataV1Request 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(request, HttpMethod.Get, "apps", "v1", "data_analysis", "query_real_time_user_data") - .WithHeader("access-token", request.AccessToken); - - if (request.HostName != null) - flurlReq.SetQueryParam("host_name", request.HostName); - - if (request.VersionType != null) - flurlReq.SetQueryParam("version_type", request.VersionType); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [GET] /apps/v1/data_analysis/query_retention_data 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/data-analysis/user-analysis/retention-analysis - /// - /// - /// - /// - /// - public static async Task ExecuteAppsDataAnalysisQueryRetentionDataV1Async(this ByteDanceMicroAppClient client, Models.AppsDataAnalysisQueryRetentionDataV1Request 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(request, HttpMethod.Get, "apps", "v1", "data_analysis", "query_retention_data") - .WithHeader("access-token", request.AccessToken) - .SetQueryParam("start_time", request.StartTimestamp) - .SetQueryParam("end_time", request.EndTimestamp); - - if (request.UserType != null) - flurlReq.SetQueryParam("user_type", request.UserType); - - if (request.HostName != null) - flurlReq.SetQueryParam("host_name", request.HostName); - - if (request.OS != null) - flurlReq.SetQueryParam("os", request.OS); - - if (request.VersionType != null) - flurlReq.SetQueryParam("version_type", request.VersionType); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [GET] /apps/v1/data_analysis/query_scene_data 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/data-analysis/user-analysis/scene-analysis - /// - /// - /// - /// - /// - public static async Task ExecuteAppsDataAnalysisQuerySceneDataV1Async(this ByteDanceMicroAppClient client, Models.AppsDataAnalysisQuerySceneDataV1Request 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(request, HttpMethod.Get, "apps", "v1", "data_analysis", "query_scene_data") - .WithHeader("access-token", request.AccessToken) - .SetQueryParam("start_time", request.StartTimestamp) - .SetQueryParam("end_time", request.EndTimestamp); - - if (request.HostName != null) - flurlReq.SetQueryParam("host_name", request.HostName); - - if (request.VersionType != null) - flurlReq.SetQueryParam("version_type", request.VersionType); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [GET] /apps/v1/data_analysis/query_user_portrait_data 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/data-analysis/user-analysis/user-portrait-analysis - /// - /// - /// - /// - /// - public static async Task ExecuteAppsDataAnalysisQueryUserPortraitDataV1Async(this ByteDanceMicroAppClient client, Models.AppsDataAnalysisQueryUserPortraitDataV1Request 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(request, HttpMethod.Get, "apps", "v1", "data_analysis", "query_user_portrait_data") - .WithHeader("access-token", request.AccessToken) - .SetQueryParam("start_time", request.StartTimestamp) - .SetQueryParam("end_time", request.EndTimestamp); - - if (request.UserType != null) - flurlReq.SetQueryParam("user_type", request.UserType); - - if (request.HostName != null) - flurlReq.SetQueryParam("host_name", request.HostName); - - if (request.VersionType != null) - flurlReq.SetQueryParam("version_type", request.VersionType); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [GET] /apps/v1/data_analysis/query_client_data 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/data-analysis/user-analysis/client-analysis - /// - /// - /// - /// - /// - public static async Task ExecuteAppsDataAnalysisQueryClientDataV1Async(this ByteDanceMicroAppClient client, Models.AppsDataAnalysisQueryClientDataV1Request 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(request, HttpMethod.Get, "apps", "v1", "data_analysis", "query_client_data") - .WithHeader("access-token", request.AccessToken) - .SetQueryParam("start_time", request.StartTimestamp) - .SetQueryParam("end_time", request.EndTimestamp); - - if (request.UserType != null) - flurlReq.SetQueryParam("user_type", request.UserType); - - if (request.HostName != null) - flurlReq.SetQueryParam("host_name", request.HostName); - - if (request.VersionType != null) - flurlReq.SetQueryParam("version_type", request.VersionType); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [GET] /apps/v1/data_analysis/query_page_data 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/data-analysis/user-analysis/page-analysis - /// - /// - /// - /// - /// - public static async Task ExecuteAppsDataAnalysisQueryPageDataV1Async(this ByteDanceMicroAppClient client, Models.AppsDataAnalysisQueryPageDataV1Request 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(request, HttpMethod.Get, "apps", "v1", "data_analysis", "query_page_data") - .WithHeader("access-token", request.AccessToken) - .SetQueryParam("start_time", request.StartTimestamp) - .SetQueryParam("end_time", request.EndTimestamp); - - if (request.HostName != null) - flurlReq.SetQueryParam("host_name", request.HostName); - - if (request.OS != null) - flurlReq.SetQueryParam("os", request.OS); - - if (request.VersionType != null) - flurlReq.SetQueryParam("version_type", request.VersionType); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - #endregion - #endregion - - #region Live - /// - /// 异步调用 [POST] /apps/upload_live_image 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/other/live-bg-image - /// - /// - /// - /// - /// - public static async Task ExecuteAppsUploadLiveImageAsync(this ByteDanceMicroAppClient client, Models.AppsUploadLiveImageRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - if (request.AppId == null) - request.AppId = client.Credentials.AppId; - - if (request.ImageFileName == null) - request.ImageFileName = Guid.NewGuid().ToString("N").ToLower() + ".jpg"; - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "apps", "upload_live_image"); - - using var httpContent = Utilities.FileHttpContentBuilder.Build(fileName: request.ImageFileName, fileBytes: request.ImageFileBytes, fileContentType: "image/jpeg", formDataName: "image"); - httpContent.Add(new ByteArrayContent(Encoding.UTF8.GetBytes(request.Title)), "title"); - httpContent.Add(new ByteArrayContent(Encoding.UTF8.GetBytes(request.PagePath)), "start_page"); - if (request.RoomId != null) - httpContent.Add(new ByteArrayContent(Encoding.UTF8.GetBytes(request.RoomId.Value.ToString())), "room_id"); - - return await client.SendRequestAsync(flurlReq, httpContent: httpContent, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /apps/v1/live/set_black_white_list 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/mount/live-black-white-list - /// - /// - /// - /// - /// - public static async Task ExecuteAppsLiveSetBlackWhiteListV1Async(this ByteDanceMicroAppClient client, Models.AppsLiveSetBlackWhiteListV1Request request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - if (request.AppId == null) - request.AppId = client.Credentials.AppId; - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "apps", "v1", "live", "set_black_white_list"); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - #endregion - - #region Message - /// - /// 异步调用 [POST] /apps/message/custom/send 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/component/message-push-customer-service#%E5%8F%91%E9%80%81%E5%AE%A2%E6%9C%8D%E6%B6%88%E6%81%AF%E6%8E%A5%E5%8F%A3 - /// - /// - /// - /// - /// - public static async Task ExecuteAppsMessageCustomSendAsync(this ByteDanceMicroAppClient client, Models.AppsMessageCustomSendRequest 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(request, HttpMethod.Post, "apps", "message", "custom", "send") - .SetQueryParam("access_token", request.AccessToken); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - #endregion - - #region Order - /// - /// 异步调用 [POST] /apps/order/v2/push 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/ecpay/order/order-sync - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/thirdparty/API/smallprogram/auth-app-manage/payment/pushOrder - /// - /// - /// - /// - /// - public static async Task ExecuteAppsOrderPushV2Async(this ByteDanceMicroAppClient client, Models.AppsOrderPushV2Request 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(request, HttpMethod.Post, "apps", "order", "v2", "push") - .SetQueryParam("access_token", request.AccessToken); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /apps/order/delete 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/thirdparty/API/smallprogram/auth-app-manage/payment/deleteOrder - /// - /// - /// - /// - /// - public static async Task ExecuteAppsOrderDeleteAsync(this ByteDanceMicroAppClient client, Models.AppsOrderDeleteRequest 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(request, HttpMethod.Post, "apps", "order", "delete") - .SetQueryParam("access_token", request.AccessToken); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - #endregion - - #region Qrcode - /// - /// 异步调用 [POST] /apps/qrcode 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/qr-code/create-qr-code - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-game/develop/server/qr-code/create-qr-code - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/thirdparty/API/smallprogram/auth-app-manage/base-info/getqrcode - /// - /// - /// - /// - /// - public static async Task ExecuteAppsQrcodeAsync(this ByteDanceMicroAppClient client, Models.AppsQrcodeRequest 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(request, HttpMethod.Post, "apps", "qrcode"); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - #endregion - - #region ShareConfig - /// - /// 异步调用 [POST] /apps/share_config 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/mount/ShareConfig - /// - /// - /// - /// - /// - public static async Task ExecuteAppsShareConfigAsync(this ByteDanceMicroAppClient client, Models.AppsShareConfigRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - if (request.AppId == null) - request.AppId = client.Credentials.AppId; - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "apps", "share_config"); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - #endregion - - #region SubscribeNotification - /// - /// 异步调用 [POST] /apps/subscribe_notification/developer/v1/notify 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/subscribe-notification/notify - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-game/develop/server/subscribe-notification/notify - /// - /// - /// - /// - /// - public static async Task ExecuteAppsSubscribeNotificationDeveloperNotifyV1Async(this ByteDanceMicroAppClient client, Models.AppsSubscribeNotificationDeveloperNotifyV1Request request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - if (request.AppId == null) - request.AppId = client.Credentials.AppId; - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "apps", "subscribe_notification", "developer", "v1", "notify"); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - #endregion - - #region TaskBox - /// - /// 异步调用 [POST] /apps/taskbox/add_task 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/promote/taskbox/taskbox-task-upload - /// - /// - /// - /// - /// - public static async Task ExecuteAppsTaskBoxAddTaskAsync(this ByteDanceMicroAppClient client, Models.AppsTaskBoxAddTaskRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - if (request.AppId == null) - request.AppId = client.Credentials.AppId; - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "apps", "taskbox", "add_task"); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /apps/taskbox/update_task 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/promote/taskbox/updatetasks - /// - /// - /// - /// - /// - public static async Task ExecuteAppsTaskBoxUpdateTaskAsync(this ByteDanceMicroAppClient client, Models.AppsTaskBoxUpdateTaskRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - if (request.AppId == null) - request.AppId = client.Credentials.AppId; - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "apps", "taskbox", "update_task"); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /apps/taskbox/update/status 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/promote/taskbox/updatetaskstatus - /// - /// - /// - /// - /// - public static async Task ExecuteAppsTaskBoxUpdateStatusAsync(this ByteDanceMicroAppClient client, Models.AppsTaskBoxUpdateStatusRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - if (request.AppId == null) - request.AppId = client.Credentials.AppId; - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "apps", "taskbox", "update", "status"); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /apps/taskbox/query_app_task_id 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/promote/taskbox/taskbox-query-app-task-id - /// - /// - /// - /// - /// - public static async Task ExecuteAppsTaskBoxQueryAppTaskIdAsync(this ByteDanceMicroAppClient client, Models.AppsTaskBoxQueryAppTaskIdRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - if (request.AppId == null) - request.AppId = client.Credentials.AppId; - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "apps", "taskbox", "query_app_task_id"); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /apps/taskbox/query_task_video_data 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/promote/taskbox/taskbox-query-task-video-data - /// - /// - /// - /// - /// - public static async Task ExecuteAppsTaskBoxQueryTaskVideoDataAsync(this ByteDanceMicroAppClient client, Models.AppsTaskBoxQueryTaskVideoDataRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - if (request.AppId == null) - request.AppId = client.Credentials.AppId; - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "apps", "taskbox", "query_task_video_data"); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - #endregion - - #region UrlLink - /// - /// 异步调用 [POST] /apps/url_link/generate 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/share/url-link-generate - /// - /// - /// - /// - /// - public static async Task ExecuteAppsUrlLinkGenerateAsync(this ByteDanceMicroAppClient client, Models.AppsUrlLinkGenerateRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - if (request.AppId == null) - request.AppId = client.Credentials.AppId; - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "apps", "url_link", "generate"); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /apps/url_link/query_info 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/share/url-link-query - /// - /// - /// - /// - /// - public static async Task ExecuteAppsUrlLinkQueryInfoAsync(this ByteDanceMicroAppClient client, Models.AppsUrlLinkQueryInfoRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - if (request.AppId == null) - request.AppId = client.Credentials.AppId; - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "apps", "url_link", "query_info"); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /apps/url_link/query_quota 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/share/url-link-query-quota - /// - /// - /// - /// - /// - public static async Task ExecuteAppsUrlLinkQueryQuotaAsync(this ByteDanceMicroAppClient client, Models.AppsUrlLinkQueryQuotaRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - if (request.AppId == null) - request.AppId = client.Credentials.AppId; - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "apps", "url_link", "query_quota"); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - #endregion - - #region Video - /// - /// 异步调用 [POST] /apps/convert_video_id/video_id_to_open_item_id 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/other/video-id-convert - /// - /// - /// - /// - /// - public static async Task ExecuteAppsConvertVideoIdToOpenItemIdAsync(this ByteDanceMicroAppClient client, Models.AppsConvertVideoIdToOpenItemIdRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - if (request.AppId == null) - request.AppId = client.Credentials.AppId; - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "apps", "convert_video_id", "video_id_to_open_item_id"); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /apps/convert_video_id/open_item_id_to_encrypt_id 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/other/video-id-convert - /// - /// - /// - /// - /// - public static async Task ExecuteAppsConvertOpenItemIdToEncryptIdAsync(this ByteDanceMicroAppClient client, Models.AppsConvertOpenItemIdToEncryptIdRequest 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(request, HttpMethod.Post, "apps", "convert_video_id", "open_item_id_to_encrypt_id"); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - #endregion - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Extensions/ByteDanceMicroAppClientExecuteAppsGameExtensions.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Extensions/ByteDanceMicroAppClientExecuteAppsGameExtensions.cs deleted file mode 100644 index 83118398..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Extensions/ByteDanceMicroAppClientExecuteAppsGameExtensions.cs +++ /dev/null @@ -1,118 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using System.Web; -using Flurl.Http; - -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp -{ - public static class ByteDanceMicroAppClientExecuteAppsGameExtensions - { - private static string GenerateRequestSignature(this ByteDanceMicroAppClient client, ref TRequest request, string method, string reqLoc) - where TRequest : Models.AppsGameWalletRequestBase - { - if (client == null) throw new ArgumentNullException(nameof(client)); - if (request == null) throw new ArgumentNullException(nameof(request)); - - /* - * REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-game/develop/api/payment/payment-signature-generation-algorithm - */ - - if (request.AppId == null) - { - request.AppId = client.Credentials.AppId; - } - - if (request.Timestamp == null) - { - request.Timestamp = DateTimeOffset.Now.ToLocalTime().ToUnixTimeSeconds(); - } - - IDictionary paramMap = new SortedDictionary( - new Dictionary() - { - { "access_token", HttpUtility.UrlEncode(request.AccessToken ?? string.Empty) }, - { "appid", HttpUtility.UrlEncode(request.AppId ?? string.Empty) }, - { "openid", HttpUtility.UrlEncode(request.OpenId ?? string.Empty) }, - { "zone_id", HttpUtility.UrlEncode(request.ZoneId ?? string.Empty) }, - { "pf", HttpUtility.UrlEncode(request.Platform ?? string.Empty) }, - { "ts", request.Timestamp.ToString()! } - }, - StringComparer.Ordinal - ); - string plainText = string.Join("&", paramMap.Select(e => $"{e.Key}={e.Value}")) - + $"&org_loc={reqLoc}" - + $"&method={method.ToUpper()}"; - return Utilities.HMACUtility.HashWithSHA256(client.Credentials.ECPaySalt ?? string.Empty, plainText).ToLower(); - } - - /// - /// 异步调用 [POST] /apps/game/wallet/get_balance 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-game/develop/api/payment/acquire-mini-game-coin-balance - /// - /// - /// - /// - /// - public static async Task ExecuteAppsGameWalletGetBalanceAsync(this ByteDanceMicroAppClient client, Models.AppsGameWalletGetBalanceRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - if (request.Signature == null) - request.Signature = client.GenerateRequestSignature(ref request, HttpMethod.Post.Method, "/api/apps/game/wallet/get_balance"); - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "apps", "game", "wallet", "get_balance"); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /apps/game/wallet/game_pay 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-game/develop/api/payment/mini-game-coin-deduction-interface - /// - /// - /// - /// - /// - public static async Task ExecuteAppsGameWalletGamePayAsync(this ByteDanceMicroAppClient client, Models.AppsGameWalletGamePayRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - if (request.Signature == null) - request.Signature = client.GenerateRequestSignature(ref request, HttpMethod.Post.Method, "/api/apps/game/wallet/game_pay"); - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "apps", "game", "wallet", "game_pay"); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /apps/game/wallet/add_coin 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-game/develop/api/payment/mini-game-coin-gift-interface - /// - /// - /// - /// - /// - public static async Task ExecuteAppsGameWalletAddCoinAsync(this ByteDanceMicroAppClient client, Models.AppsGameWalletAddCoinRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - if (request.Signature == null) - request.Signature = client.GenerateRequestSignature(ref request, HttpMethod.Post.Method, "/api/apps/game/wallet/add_coin"); - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "apps", "game", "wallet", "add_coin"); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Extensions/ByteDanceMicroAppClientExecuteAppsStorageExtensions.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Extensions/ByteDanceMicroAppClientExecuteAppsStorageExtensions.cs deleted file mode 100644 index 91fb36e0..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Extensions/ByteDanceMicroAppClientExecuteAppsStorageExtensions.cs +++ /dev/null @@ -1,90 +0,0 @@ -using System; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Flurl; -using Flurl.Http; - -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp -{ - public static class ByteDanceMicroAppClientExecuteAppsStorageExtensions - { - private static string GenerateRequestSignature(this ByteDanceMicroAppClient client, TRequest request, string signMethod, string sessionKey) - where TRequest : ByteDanceMicroAppRequest - { - if (client == null) throw new ArgumentNullException(nameof(client)); - if (request == null) throw new ArgumentNullException(nameof(request)); - if (sessionKey == null) throw new ArgumentNullException(nameof(sessionKey)); - - /* - * REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/other/user-login-sign/ - * REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-game/develop/server/other/user-login-sign/ - */ - - string json = client.JsonSerializer.Serialize(request); - - switch (signMethod) - { - case "hmac_sha256": - return Utilities.HMACUtility.HashWithSHA256(sessionKey, json).ToLower(); - - default: - return string.Empty; - } - } - - /// - /// 异步调用 [POST] /apps/set_user_storage 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/data-caching/set-user-storage - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-game/develop/server/data-caching/set-user-storage - /// - /// - /// - /// - /// - public static async Task ExecuteAppsSetUserStorageAsync(this ByteDanceMicroAppClient client, Models.AppsSetUserStorageRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - if (request.Signature == null) - request.Signature = client.GenerateRequestSignature(request, request.SignMethod, request.SessionKey!); - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "apps", "set_user_storage") - .SetQueryParam("access_token", request.AccessToken) - .SetQueryParam("openid", request.OpenId) - .SetQueryParam("signature", request.Signature) - .SetQueryParam("sig_method", request.SignMethod); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /apps/remove_user_storage 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/data-caching/remove-user-storage - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-game/develop/server/data-caching/remove-user-storage - /// - /// - /// - /// - /// - public static async Task ExecuteAppsRemoveUserStorageAsync(this ByteDanceMicroAppClient client, Models.AppsRemoveUserStorageRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - if (request.Signature == null) - request.Signature = client.GenerateRequestSignature(request, request.SignMethod, request.SessionKey!); - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "apps", "remove_user_storage") - .SetQueryParam("access_token", request.AccessToken) - .SetQueryParam("openid", request.OpenId) - .SetQueryParam("signature", request.Signature) - .SetQueryParam("sig_method", request.SignMethod); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Extensions/ByteDanceMicroAppClientExecuteCommentExtensions.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Extensions/ByteDanceMicroAppClientExecuteCommentExtensions.cs deleted file mode 100644 index 9e599b35..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Extensions/ByteDanceMicroAppClientExecuteCommentExtensions.cs +++ /dev/null @@ -1,33 +0,0 @@ -using System; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Flurl.Http; - -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp -{ - public static class ByteDanceMicroAppClientExecuteCommentExtensions - { - /// - /// 异步调用 [POST] /comment/open/get 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/evolution/obtain-evolution - /// - /// - /// - /// - /// - public static async Task ExecuteCommentOpenGetAsync(this ByteDanceMicroAppClient client, Models.CommentOpenGetRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - if (request.AppId == null) - request.AppId = client.Credentials.AppId; - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "comment", "open", "get"); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Extensions/ByteDanceMicroAppClientExecuteTagsExtensions.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Extensions/ByteDanceMicroAppClientExecuteTagsExtensions.cs deleted file mode 100644 index 2f6f7cc8..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Extensions/ByteDanceMicroAppClientExecuteTagsExtensions.cs +++ /dev/null @@ -1,52 +0,0 @@ -using System; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Flurl.Http; - -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp -{ - public static class ByteDanceMicroAppClientExecuteTagsExtensions - { - /// - /// 异步调用 [POST] /v2/tags/text/antidirt 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/content-security/content-security-detect - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-game/develop/open-capacity/content-security/content-security-detect - /// - /// - /// - /// - /// - public static async Task ExecuteTagsTextAntiDirtV2Async(this ByteDanceMicroAppClient client, Models.TagsTextAntiDirtV2Request 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(request, HttpMethod.Post, "v2", "tags", "text", "antidirt") - .WithHeader("X-Token", request.AccessToken); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /v2/tags/image 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-game/develop/open-capacity/content-security/picture-detect - /// - /// - /// - /// - /// - public static async Task ExecuteTagsImageV2Async(this ByteDanceMicroAppClient client, Models.TagsImageV2Request 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(request, HttpMethod.Post, "v2", "tags", "image") - .WithHeader("X-Token", request.AccessToken); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Extensions/ByteDanceMicroAppClientExecuteWebcastExtensions.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Extensions/ByteDanceMicroAppClientExecuteWebcastExtensions.cs deleted file mode 100644 index 0d032a05..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Extensions/ByteDanceMicroAppClientExecuteWebcastExtensions.cs +++ /dev/null @@ -1,169 +0,0 @@ -using System; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Flurl.Http; - -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp -{ - public static class ByteDanceMicroAppClientExecuteWebcastExtensions - { - #region LiveData - /// - /// 异步调用 [POST] /live_data/task/start 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/interaction/develop/server/live/danmu - /// - /// - /// - /// - /// - public static async Task ExecuteWebcastLiveDataTaskStartAsync(this ByteDanceMicroAppClient client, Models.WebcastLiveDataTaskStartRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - if (request.AppId == null) - request.AppId = client.Credentials.AppId; - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "live_data", "task", "start") - .WithUrl($"{client.EndpointForWebcastAPI}/live_data/task/start") - .WithHeader("access-token", request.AccessToken); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /live_data/task/stop 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/interaction/develop/server/live/danmu - /// - /// - /// - /// - /// - public static async Task ExecuteWebcastLiveDataTaskStopAsync(this ByteDanceMicroAppClient client, Models.WebcastLiveDataTaskStopRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - if (request.AppId == null) - request.AppId = client.Credentials.AppId; - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "live_data", "task", "stop") - .WithUrl($"{client.EndpointForWebcastAPI}/live_data/task/stop") - .WithHeader("access-token", request.AccessToken); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [GET] /live_data/task/get 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/interaction/develop/server/live/danmu - /// - /// - /// - /// - /// - public static async Task ExecuteWebcastLiveDataTaskGetAsync(this ByteDanceMicroAppClient client, Models.WebcastLiveDataTaskGetRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - if (request.AppId == null) - request.AppId = client.Credentials.AppId; - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Get, "live_data", "task", "get") - .WithUrl($"{client.EndpointForWebcastAPI}/live_data/task/get") - .WithHeader("access-token", request.AccessToken) - .WithHeader("appid", request.AppId) - .WithHeader("roomid", request.RoomId) - .WithHeader("msg_type", request.MessageType); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [GET] /live_data/task/fail_data/get 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/interaction/develop/server/live/danmu - /// - /// - /// - /// - /// - public static async Task ExecuteWebcastLiveDataTaskFailDataGetAsync(this ByteDanceMicroAppClient client, Models.WebcastLiveDataTaskFailDataGetRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - if (request.AppId == null) - request.AppId = client.Credentials.AppId; - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Get, "live_data", "task", "fail_data", "get") - .WithUrl($"{client.EndpointForWebcastAPI}/live_data/task/fail_data/get") - .WithHeader("access-token", request.AccessToken) - .WithHeader("appid", request.AppId) - .WithHeader("roomid", request.RoomId) - .WithHeader("msg_type", request.MessageType) - .WithHeader("page_num", request.PageNumber) - .WithHeader("page_size", request.PageSize); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - #endregion - - #region Gift - /// - /// 异步调用 [POST] /gift/top_gift 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/interaction/develop/server/live/danmu - /// - /// - /// - /// - /// - public static async Task ExecuteWebcastGiftTopGiftAsync(this ByteDanceMicroAppClient client, Models.WebcastGiftTopGiftRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - if (request.AppId == null) - request.AppId = client.Credentials.AppId; - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "gift", "top_gift") - .WithUrl($"{client.EndpointForWebcastAPI}/gift/top_gift") - .WithHeader("x-token", request.AccessToken); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - #endregion - - #region LinkMic - /// - /// 异步调用 [POST] /linkmic/query 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/interaction/develop/server/live/mic - /// - /// - /// - /// - /// - public static async Task ExecuteWebcastLinkMicQueryAsync(this ByteDanceMicroAppClient client, Models.WebcastLinkMicQueryRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - if (request.AppId == null) - request.AppId = client.Credentials.AppId; - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "linkmic", "query") - .WithUrl($"{client.EndpointForWebcastAPI}/linkmic/query") - .WithHeader("x-token", request.AccessToken); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - #endregion - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Extensions/DouyinMicroAppClientEventExtensions.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Extensions/DouyinMicroAppClientEventExtensions.cs new file mode 100644 index 00000000..1f7ef113 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Extensions/DouyinMicroAppClientEventExtensions.cs @@ -0,0 +1,262 @@ +using System; +using System.Collections.Generic; +using System.Xml.Linq; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp +{ + using SKIT.FlurlHttpClient.Primitives; + + /// + /// 为 提供回调通知事件的扩展方法。 + /// + public static partial class DouyinMicroAppClientEventExtensions + { + /// + /// 从 JSON 反序列化得到 对象。 + /// + /// + /// + /// + /// + public static TEvent DeserializeEventFromJson(this DouyinMicroAppClient client, string webhookJson) + where TEvent : DouyinMicroAppEvent, new() + { + return InnerDeserializeEventFromJson(client, webhookJson); + } + + /// + /// 从 JSON 反序列化得到 对象。 + /// + /// + /// + /// + public static DouyinMicroAppEvent DeserializeEventFromJson(this DouyinMicroAppClient client, string webhookJson) + { + return InnerDeserializeEventFromJson(client, webhookJson); + } + + /// + /// 从 XML 反序列化得到 对象。 + /// + /// + /// + /// + /// + public static TEvent DeserializeEventFromXml(this DouyinMicroAppClient client, string webhookXml) + where TEvent : DouyinMicroAppEvent, new() + { + return InnerDeserializeEventFromXml(client, webhookXml); + } + + /// + /// 从 XML 反序列化得到 对象。 + /// + /// + /// + /// + public static DouyinMicroAppEvent DeserializeEventFromXml(this DouyinMicroAppClient client, string webhookXml) + { + return InnerDeserializeEventFromXml(client, webhookXml); + } + + /// + /// 验证回调通知事件签名。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// 头条回调通知中的 "timestamp" 查询参数。 + /// 头条回调通知中的 "nonce" 查询参数。 + /// 头条回调通知中的 "msg" 查询参数。 + /// 头条回调通知中的 "signature" 查询参数。 + /// + public static ErroredResult VerifyEventSignatureForEcho(this DouyinMicroAppClient client, string webhookTimestamp, string webhookNonce, string webhookMsg, string webhookSignature) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + + ErroredResult result; + + try + { + List tmp = new List(capacity: 4) { client.Credentials.PushToken!, webhookTimestamp, webhookNonce, webhookMsg }; + tmp.Sort(StringComparer.Ordinal); + string sign = Utilities.SHA1Utility.Hash(string.Concat(tmp)).Value!; + bool valid = string.Equals(sign, webhookSignature, StringComparison.OrdinalIgnoreCase); + + if (valid) + result = ErroredResult.Ok(); + else + result = ErroredResult.Fail(new Exception($"Signature does not match. Maybe \"{webhookSignature}\" is an illegal signature.")); + } + catch (Exception ex) + { + result = ErroredResult.Fail(ex); + } + + return result; + } + + /// + /// 验证回调通知事件签名。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + public static ErroredResult VerifyEventSignatureFromJson(this DouyinMicroAppClient client, string webhookJson) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + + ErroredResult result; + + try + { + InnerEncryptedEvent encryptedEvent = client.JsonSerializer.Deserialize(webhookJson); + bool valid = Utilities.DyMsgCryptor.VerifySignature( + sToken: client.Credentials.PushToken!, + sTimestamp: encryptedEvent.TimestampString, + sNonce: encryptedEvent.Nonce, + sMsgEncrypt: encryptedEvent.EncryptedData, + sMsgSign: encryptedEvent.Signature + ); + + if (valid) + result = ErroredResult.Ok(); + else + result = ErroredResult.Fail(new Exception($"Signature does not match.")); + } + catch (Exception ex) + { + result = ErroredResult.Fail(ex); + } + + return result; + } + + /// + /// 验证回调通知事件签名。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + public static ErroredResult VerifyEventSignatureFromXml(this DouyinMicroAppClient client, string webhookXml) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + + ErroredResult result; + + try + { + XDocument xdoc = XDocument.Parse(webhookXml); + bool valid = Utilities.DyMsgCryptor.VerifySignature( + sToken: client.Credentials.PushToken!, + sTimestamp: xdoc.Root!.Element("TimeStamp")!.Value, + sNonce: xdoc.Root!.Element("Nonce")!.Value, + sMsgEncrypt: xdoc.Root!.Element("Encrypt")!.Value, + sMsgSign: xdoc.Root!.Element("MsgSignature")!.Value + ); + + if (valid) + result = ErroredResult.Ok(); + else + result = ErroredResult.Fail(new Exception($"Signature does not match.")); + } + catch (Exception ex) + { + result = ErroredResult.Fail(ex); + } + + return result; + } + } + + partial class DouyinMicroAppClientEventExtensions + { + private class InnerEncryptedEvent + { + [Newtonsoft.Json.JsonProperty("Encrypt")] + [System.Text.Json.Serialization.JsonPropertyName("Encrypt")] + [System.Xml.Serialization.XmlElement("Encrypt")] + public string EncryptedData { get; set; } = default!; + + [Newtonsoft.Json.JsonProperty("TimeStamp")] + [System.Text.Json.Serialization.JsonPropertyName("TimeStamp")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringConverter))] + [System.Xml.Serialization.XmlElement("TimeStamp")] + public string TimestampString { get; set; } = default!; + + [Newtonsoft.Json.JsonProperty("Nonce")] + [System.Text.Json.Serialization.JsonPropertyName("Nonce")] + [System.Xml.Serialization.XmlElement("Nonce")] + public string Nonce { get; set; } = default!; + + [Newtonsoft.Json.JsonProperty("MsgSignature")] + [System.Text.Json.Serialization.JsonPropertyName("MsgSignature")] + [System.Xml.Serialization.XmlElement("MsgSignature")] + public string Signature { get; set; } = default!; + } + + private static TEvent InnerDeserializeEventFromJson(DouyinMicroAppClient client, string webhookJson) + where TEvent : DouyinMicroAppEvent + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (webhookJson is null) throw new ArgumentNullException(webhookJson); + + try + { + if (webhookJson.Contains("\"Encrypt\"")) + { + InnerEncryptedEvent encryptedEvent = client.JsonSerializer.Deserialize(webhookJson); + webhookJson = Utilities.DyMsgCryptor.AESDecrypt(cipherText: encryptedEvent.EncryptedData, encodingAESKey: client.Credentials.PushEncodingAESKey!, out _); + } + + return client.JsonSerializer.Deserialize(webhookJson); + } + catch (DouyinMicroAppException) + { + throw; + } + catch (Exception ex) + { + throw new DouyinMicroAppException("Failed to deserialize event data. Please see the inner exception for more details.", ex); + } + } + + private static TEvent InnerDeserializeEventFromXml(DouyinMicroAppClient client, string webhookXml) + where TEvent : DouyinMicroAppEvent + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (webhookXml is null) throw new ArgumentNullException(webhookXml); + + try + { + if (webhookXml.Contains("") && webhookXml.Contains("")) + { + if (!Utilities.DyMsgCryptor.TryParseXml(webhookXml, out string encryptedXml)) + throw new DouyinMicroAppException("Failed to decrypt event data, because the encrypted data is empty."); + + webhookXml = Utilities.DyMsgCryptor.AESDecrypt(cipherText: encryptedXml, encodingAESKey: client.Credentials.PushEncodingAESKey!, out _); + } + + return Utilities.XmlHelper.Deserialize(webhookXml); + } + catch (DouyinMicroAppException) + { + throw; + } + catch (Exception ex) + { + throw new DouyinMicroAppException("Failed to deserialize event data. Please see the inner exception for more details.", ex); + } + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Extensions/DouyinMicroAppClientExecuteAppsAdPlacementExtensions.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Extensions/DouyinMicroAppClientExecuteAppsAdPlacementExtensions.cs new file mode 100644 index 00000000..539d56bb --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Extensions/DouyinMicroAppClientExecuteAppsAdPlacementExtensions.cs @@ -0,0 +1,80 @@ +using System; +using System.Net.Http; +using System.Threading; +using System.Threading.Tasks; +using Flurl.Http; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp +{ + public static class DouyinMicroAppClientExecuteAppsAdPlacementExtensions + { + /// + /// 异步调用 [GET] /apps/v1/ad_placement/query/ 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsAdPlacementQueryV1Async(this DouyinMicroAppClient client, Models.AppsAdPlacementQueryV1Request 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.Get, "apps", "v1", "ad_placement", "query", "") + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /apps/v1/ad_placement/add/ 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsAdPlacementAddV1Async(this DouyinMicroAppClient client, Models.AppsAdPlacementAddV1Request 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, "apps", "v1", "ad_placement", "add", "") + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /apps/v1/ad_placement/update/ 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsAdPlacementUpdateV1Async(this DouyinMicroAppClient client, Models.AppsAdPlacementUpdateV1Request 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, "apps", "v1", "ad_placement", "update", "") + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Extensions/DouyinMicroAppClientExecuteAppsCapacityExtensions.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Extensions/DouyinMicroAppClientExecuteAppsCapacityExtensions.cs new file mode 100644 index 00000000..88e3b6e4 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Extensions/DouyinMicroAppClientExecuteAppsCapacityExtensions.cs @@ -0,0 +1,543 @@ +using System; +using System.Net.Http; +using System.Threading; +using System.Threading.Tasks; +using Flurl; +using Flurl.Http; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp +{ + public static class DouyinMicroAppClientExecuteAppsCapacityExtensions + { + #region AwemeBind + /// + /// 异步调用 [POST] /apps/v1/capacity/get_aweme_bind_template_list/ 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsCapacityGetAwemeBindTemplateListV1Async(this DouyinMicroAppClient client, Models.AppsCapacityGetAwemeBindTemplateListV1Request 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, "apps", "v1", "capacity", "get_aweme_bind_template_list", "") + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /apps/v1/capacity/get_aweme_bind_template_info/ 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsCapacityGetAwemeBindTemplateInfoV1Async(this DouyinMicroAppClient client, Models.AppsCapacityGetAwemeBindTemplateInfoV1Request 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, "apps", "v1", "capacity", "get_aweme_bind_template_info", "") + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /apps/v1/capacity/bind_aweme_relation/ 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsCapacityBindAwemeRelationV1Async(this DouyinMicroAppClient client, Models.AppsCapacityBindAwemeRelationV1Request 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, "apps", "v1", "capacity", "bind_aweme_relation", "") + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /apps/v1/capacity/unbind_aweme_relation/ 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsCapacityUnbindAwemeRelationV1Async(this DouyinMicroAppClient client, Models.AppsCapacityUnbindAwemeRelationV1Request 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, "apps", "v1", "capacity", "unbind_aweme_relation", "") + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [GET] /apps/v1/capacity/get_aweme_relation_bind_qrcode/ 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsCapacityGetAwemeRelationBindQrcodeV1Async(this DouyinMicroAppClient client, Models.AppsCapacityGetAwemeRelationBindQrcodeV1Request 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.Get, "apps", "v1", "capacity", "get_aweme_relation_bind_qrcode", "") + .SetQueryParam("type", request.Type) + .SetQueryParam("capacity_list", string.Join(",", request.CapacityKeyList)) + .WithHeader("access-token", request.AccessToken); + + if (request.IsCoSubject is not null) + flurlReq.SetQueryParam("is_co_subject", request.IsCoSubject.Value ? "true" : "false"); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [GET] /apps/v1/capacity/query_aweme_relation_list/ 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsCapacityQueryAwemeRelationListV1Async(this DouyinMicroAppClient client, Models.AppsCapacityQueryAwemeRelationListV1Request 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.Get, "apps", "v1", "capacity", "query_aweme_relation_list", "") + .SetQueryParam("type", request.Type) + .SetQueryParam("page_num", request.PageNumber) + .SetQueryParam("page_size", request.PageSize) + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + #endregion + + #region AwemeKeyword + /// + /// 异步调用 [GET] /apps/v1/capacity/query_aweme_video_keyword_list/ 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsCapacityQueryAwemeVideoKeywordListV1Async(this DouyinMicroAppClient client, Models.AppsCapacityQueryAwemeVideoKeywordListV1Request 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.Get, "apps", "v1", "capacity", "query_aweme_video_keyword_list", "") + .WithHeader("access-token", request.AccessToken) + .SetQueryParam("page_num", request.PageNumber) + .SetQueryParam("page_size", request.PageSize); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /apps/v1/capacity/add_aweme_video_keyword/ 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsCapacityAddAwemeVideoKeywordV1Async(this DouyinMicroAppClient client, Models.AppsCapacityAddAwemeVideoKeywordV1Request 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, "apps", "v1", "capacity", "add_aweme_video_keyword", "") + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /apps/v1/capacity/delete_aweme_video_keyword/ 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsCapacityDeleteAwemeVideoKeywordV1Async(this DouyinMicroAppClient client, Models.AppsCapacityDeleteAwemeVideoKeywordV1Request 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, "apps", "v1", "capacity", "delete_aweme_video_keyword", "") + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + #endregion + + #region Delivery + /// + /// 异步调用 [POST] /apps/v1/capacity/add_alias 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsCapacityAddAliasV1Async(this DouyinMicroAppClient client, Models.AppsCapacityAddAliasV1Request 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, "apps", "v1", "capacity", "add_alias") + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [GET] /apps/v1/capacity/query_alias_list 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsCapacityQueryAliasListV1Async(this DouyinMicroAppClient client, Models.AppsCapacityQueryAliasListV1Request 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.Get, "apps", "v1", "capacity", "query_alias_list") + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /apps/v1/capacity/modify_alias/ 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsCapacityModifyAliasV1Async(this DouyinMicroAppClient client, Models.AppsCapacityModifyAliasV1Request 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, "apps", "v1", "capacity", "modify_alias", "") + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /apps/v1/capacity/delete_alias/ 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsCapacityDeleteAliasV1Async(this DouyinMicroAppClient client, Models.AppsCapacityDeleteAliasV1Request 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, "apps", "v1", "capacity", "delete_alias", "") + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /apps/v1/capacity/set_search_tag/ 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsCapacitySetSearchTagV1Async(this DouyinMicroAppClient client, Models.AppsCapacitySetSearchTagV1Request 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, "apps", "v1", "capacity", "set_search_tag", "") + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [GET] /apps/v1/capacity/query_search_tag_list/ 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsCapacityQuerySearchTagListV1Async(this DouyinMicroAppClient client, Models.AppsCapacityQuerySearchTagListV1Request 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.Get, "apps", "v1", "capacity", "query_search_tag_list", "") + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + #endregion + + #region SimpleQrcode + /// + /// 异步调用 [GET] /apps/v2/capacity/query_simple_qr_bind_list/ 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsCapacityQuerySimpleQrcodeBindListV2Async(this DouyinMicroAppClient client, Models.AppsCapacityQuerySimpleQrcodeBindListV2Request 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.Get, "apps", "v2", "capacity", "query_simple_qr_bind_list", "") + .WithHeader("access-token", request.AccessToken) + .SetQueryParam("page_num", request.PageNumber) + .SetQueryParam("page_size", request.PageSize); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /apps/v2/capacity/add_simple_qr_bind/ 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsCapacityAddSimpleQrcodeBindV2Async(this DouyinMicroAppClient client, Models.AppsCapacityAddSimpleQrcodeBindV2Request 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, "apps", "v2", "capacity", "add_simple_qr_bind", "") + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /apps/v2/capacity/update_simple_qr_bind/ 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsCapacityUpdateSimpleQrcodeBindV2Async(this DouyinMicroAppClient client, Models.AppsCapacityUpdateSimpleQrcodeBindV2Request 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, "apps", "v2", "capacity", "update_simple_qr_bind", "") + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /apps/v2/capacity/update_simple_qr_bind_status/ 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsCapacityUpdateSimpleQrcodeBindStatusV2Async(this DouyinMicroAppClient client, Models.AppsCapacityUpdateSimpleQrcodeBindStatusV2Request 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, "apps", "v2", "capacity", "update_simple_qr_bind_status", "") + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /apps/v2/capacity/delete_simple_qr_bind/ 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsCapacityDeleteSimpleQrcodeBindV2Async(this DouyinMicroAppClient client, Models.AppsCapacityDeleteSimpleQrcodeBindV2Request 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, "apps", "v2", "capacity", "delete_simple_qr_bind", "") + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + #endregion + + #region SubService + /// + /// 异步调用 [POST] /apps/v1/capacity/create_ma_sub_service/ 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsCapacityCreateMicroAppSubServiceV1Async(this DouyinMicroAppClient client, Models.AppsCapacityCreateMicroAppSubServiceV1Request 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, "apps", "v1", "capacity", "create_ma_sub_service", "") + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [GET] /apps/v1/capacity/query_ma_sub_service/ 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsCapacityQueryMicroAppSubServiceV1Async(this DouyinMicroAppClient client, Models.AppsCapacityQueryMicroAppSubServiceV1Request 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.Get, "apps", "v1", "capacity", "query_ma_sub_service", "") + .SetQueryParam("page_no", request.PageNumber) + .SetQueryParam("page_size", request.PageSize) + .SetQueryParam("approval_state", request.ApprovalState) + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + #endregion + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Extensions/DouyinMicroAppClientExecuteAppsCategoryExtensions.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Extensions/DouyinMicroAppClientExecuteAppsCategoryExtensions.cs new file mode 100644 index 00000000..54247ac5 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Extensions/DouyinMicroAppClientExecuteAppsCategoryExtensions.cs @@ -0,0 +1,34 @@ +using System; +using System.Net.Http; +using System.Threading; +using System.Threading.Tasks; +using Flurl.Http; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp +{ + public static class DouyinMicroAppClientExecuteAppsCategoryExtensions + { + /// + /// 异步调用 [GET] /apps/v1/category/query_app_categories/ 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsCategoryQueryAppCategoriesV1Async(this DouyinMicroAppClient client, Models.AppsCategoryQueryAppCategoriesV1Request 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.Get, "apps", "v1", "category", "query_app_categories", "") + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Extensions/DouyinMicroAppClientExecuteAppsCensorExtensions.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Extensions/DouyinMicroAppClientExecuteAppsCensorExtensions.cs new file mode 100644 index 00000000..97909ed9 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Extensions/DouyinMicroAppClientExecuteAppsCensorExtensions.cs @@ -0,0 +1,37 @@ +using System; +using System.Net.Http; +using System.Threading; +using System.Threading.Tasks; +using Flurl.Http; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp +{ + public static class DouyinMicroAppClientExecuteAppsCensorExtensions + { + /// + /// 异步调用 [POST] /apps/v1/censor/image 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsCensorImageV1Async(this DouyinMicroAppClient client, Models.AppsCensorImageV1Request request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (request.AppId is null) + request.AppId = client.Credentials.AppId; + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "apps", "v1", "censor", "image") + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Extensions/DouyinMicroAppClientExecuteAppsDouyinExtensions.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Extensions/DouyinMicroAppClientExecuteAppsDouyinExtensions.cs new file mode 100644 index 00000000..0ae4d267 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Extensions/DouyinMicroAppClientExecuteAppsDouyinExtensions.cs @@ -0,0 +1,119 @@ +using System; +using System.Net.Http; +using System.Threading; +using System.Threading.Tasks; +using Flurl.Http; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp +{ + public static class DouyinMicroAppClientExecuteAppsDouyinExtensions + { + #region InteractTask + /// + /// 异步调用 [POST] /apps/v1/douyin/create_interact_task/ 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsDouyinCreateInteractTaskV1Async(this DouyinMicroAppClient client, Models.AppsDouyinCreateInteractTaskV1Request request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (request.AppId is null) + request.AppId = client.Credentials.AppId; + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "apps", "v1", "douyin", "create_interact_task", "") + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /apps/v1/douyin/query_user_interact_task/ 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsDouyinQueryUserInteractTaskV1Async(this DouyinMicroAppClient client, Models.AppsDouyinQueryUserInteractTaskV1Request request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (request.AppId is null) + request.AppId = client.Credentials.AppId; + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "apps", "v1", "douyin", "query_user_interact_task", "") + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + #endregion + + #region Task + /// + /// 异步调用 [POST] /apps/v1/douyin/create_task/ 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsDouyinCreateTaskV1Async(this DouyinMicroAppClient client, Models.AppsDouyinCreateTaskV1Request request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (request.AppId is null) + request.AppId = client.Credentials.AppId; + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "apps", "v1", "douyin", "create_task", "") + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /apps/v1/douyin/query_user_task/ 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsDouyinQueryUserTaskV1Async(this DouyinMicroAppClient client, Models.AppsDouyinQueryUserTaskV1Request request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (request.AppId is null) + request.AppId = client.Credentials.AppId; + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "apps", "v1", "douyin", "query_user_task", "") + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + #endregion + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Extensions/DouyinMicroAppClientExecuteAppsItemExtensions.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Extensions/DouyinMicroAppClientExecuteAppsItemExtensions.cs new file mode 100644 index 00000000..d4372723 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Extensions/DouyinMicroAppClientExecuteAppsItemExtensions.cs @@ -0,0 +1,482 @@ +using System; +using System.Net.Http; +using System.Threading; +using System.Threading.Tasks; +using Flurl; +using Flurl.Http; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp +{ + public static class DouyinMicroAppClientExecuteAppsItemExtensions + { + /// + /// 异步调用 [GET] /apps/v1/item/get_base/ 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsItemGetBaseV1Async(this DouyinMicroAppClient client, Models.AppsItemGetBaseV1Request 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.Get, "apps", "v1", "item", "get_base", "") + .SetQueryParam("open_id", request.OpenId) + .SetQueryParam("item_id", request.ItemId) + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [GET] /apps/v1/item_bc/get_base/ 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsItemBCGetBaseV1Async(this DouyinMicroAppClient client, Models.AppsItemBCGetBaseV1Request 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.Get, "apps", "v1", "item_bc", "get_base", "") + .SetQueryParam("open_id", request.OpenId) + .SetQueryParam("item_id", request.ItemId) + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [GET] /apps/v1/item/get_like/ 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsItemGetLikeV1Async(this DouyinMicroAppClient client, Models.AppsItemGetLikeV1Request 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.Get, "apps", "v1", "item", "get_like", "") + .SetQueryParam("open_id", request.OpenId) + .SetQueryParam("item_id", request.ItemId) + .SetQueryParam("date_type", request.DataType) + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [GET] /apps/v1/item_bc/get_like/ 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsItemBCGetLikeV1Async(this DouyinMicroAppClient client, Models.AppsItemBCGetLikeV1Request 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.Get, "apps", "v1", "item_bc", "get_like", "") + .SetQueryParam("open_id", request.OpenId) + .SetQueryParam("item_id", request.ItemId) + .SetQueryParam("date_type", request.DataType) + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [GET] /apps/v1/item/get_comment/ 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsItemGetCommentV1Async(this DouyinMicroAppClient client, Models.AppsItemGetCommentV1Request 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.Get, "apps", "v1", "item", "get_comment", "") + .SetQueryParam("open_id", request.OpenId) + .SetQueryParam("item_id", request.ItemId) + .SetQueryParam("date_type", request.DataType) + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [GET] /apps/v1/item_bc/get_comment/ 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsItemBCGetCommentV1Async(this DouyinMicroAppClient client, Models.AppsItemBCGetCommentV1Request 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.Get, "apps", "v1", "item_bc", "get_comment", "") + .SetQueryParam("open_id", request.OpenId) + .SetQueryParam("item_id", request.ItemId) + .SetQueryParam("date_type", request.DataType) + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [GET] /apps/v1/item/get_play/ 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsItemGetPlayV1Async(this DouyinMicroAppClient client, Models.AppsItemGetPlayV1Request 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.Get, "apps", "v1", "item", "get_play", "") + .SetQueryParam("open_id", request.OpenId) + .SetQueryParam("item_id", request.ItemId) + .SetQueryParam("date_type", request.DataType) + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [GET] /apps/v1/item_bc/get_play/ 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsItemBCGetPlayV1Async(this DouyinMicroAppClient client, Models.AppsItemBCGetPlayV1Request 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.Get, "apps", "v1", "item_bc", "get_play", "") + .SetQueryParam("open_id", request.OpenId) + .SetQueryParam("item_id", request.ItemId) + .SetQueryParam("date_type", request.DataType) + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [GET] /apps/v1/item/get_share/ 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsItemGetShareV1Async(this DouyinMicroAppClient client, Models.AppsItemGetShareV1Request 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.Get, "apps", "v1", "item", "get_share", "") + .SetQueryParam("open_id", request.OpenId) + .SetQueryParam("item_id", request.ItemId) + .SetQueryParam("date_type", request.DataType) + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [GET] /apps/v1/item_bc/get_share/ 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsItemBCGetShareV1Async(this DouyinMicroAppClient client, Models.AppsItemBCGetShareV1Request 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.Get, "apps", "v1", "item_bc", "get_share", "") + .SetQueryParam("open_id", request.OpenId) + .SetQueryParam("item_id", request.ItemId) + .SetQueryParam("date_type", request.DataType) + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + #region Comment + /// + /// 异步调用 [POST] /apps/v1/item/top_comment/ 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsItemTopCommentV1Async(this DouyinMicroAppClient client, Models.AppsItemTopCommentV1Request 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, "apps", "v1", "item", "top_comment", "") + .SetQueryParam("open_id", request.OpenId) + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /apps/v1/item_bc/top_comment/ 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsItemBCTopCommentV1Async(this DouyinMicroAppClient client, Models.AppsItemBCTopCommentV1Request 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, "apps", "v1", "item_bc", "top_comment", "") + .SetQueryParam("open_id", request.OpenId) + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /apps/v1/item/reply_comment/ 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsItemReplyCommentV1Async(this DouyinMicroAppClient client, Models.AppsItemReplyCommentV1Request 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, "apps", "v1", "item", "reply_comment", "") + .SetQueryParam("open_id", request.OpenId) + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /apps/v1/item_bc/reply_comment/ 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsItemBCReplyCommentV1Async(this DouyinMicroAppClient client, Models.AppsItemBCReplyCommentV1Request 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, "apps", "v1", "item_bc", "reply_comment", "") + .SetQueryParam("open_id", request.OpenId) + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [GET] /apps/v1/item/list_comment/ 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsItemListCommentV1Async(this DouyinMicroAppClient client, Models.AppsItemListCommentV1Request 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.Get, "apps", "v1", "item", "list_comment", "") + .SetQueryParam("open_id", request.OpenId) + .SetQueryParam("item_id", request.ItemId) + .SetQueryParam("cursor", request.PageCursor) + .SetQueryParam("count", request.PageSize) + .SetQueryParam("sort_type", request.SortType) + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [GET] /apps/v1/item_bc/list_comment/ 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsItemBCListCommentV1Async(this DouyinMicroAppClient client, Models.AppsItemBCListCommentV1Request 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.Get, "apps", "v1", "item_bc", "list_comment", "") + .SetQueryParam("open_id", request.OpenId) + .SetQueryParam("item_id", request.ItemId) + .SetQueryParam("cursor", request.PageCursor) + .SetQueryParam("count", request.PageSize) + .SetQueryParam("sort_type", request.SortType) + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [GET] /apps/v1/item/list_comment_reply/ 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsItemListCommentReplyV1Async(this DouyinMicroAppClient client, Models.AppsItemListCommentReplyV1Request 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.Get, "apps", "v1", "item", "list_comment_reply", "") + .SetQueryParam("open_id", request.OpenId) + .SetQueryParam("item_id", request.ItemId) + .SetQueryParam("comment_id", request.CommentId) + .SetQueryParam("cursor", request.PageCursor) + .SetQueryParam("count", request.PageSize) + .SetQueryParam("sort_type", request.SortType) + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [GET] /apps/v1/item_bc/list_comment_reply/ 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsItemBCListCommentReplyV1Async(this DouyinMicroAppClient client, Models.AppsItemBCListCommentReplyV1Request 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.Get, "apps", "v1", "item_bc", "list_comment_reply", "") + .SetQueryParam("open_id", request.OpenId) + .SetQueryParam("item_id", request.ItemId) + .SetQueryParam("comment_id", request.CommentId) + .SetQueryParam("cursor", request.PageCursor) + .SetQueryParam("count", request.PageSize) + .SetQueryParam("sort_type", request.SortType) + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + #endregion + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Extensions/DouyinMicroAppClientExecuteAppsQrcodeExtensions.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Extensions/DouyinMicroAppClientExecuteAppsQrcodeExtensions.cs new file mode 100644 index 00000000..0700ec6d --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Extensions/DouyinMicroAppClientExecuteAppsQrcodeExtensions.cs @@ -0,0 +1,37 @@ +using System; +using System.Net.Http; +using System.Threading; +using System.Threading.Tasks; +using Flurl.Http; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp +{ + public static class DouyinMicroAppClientExecuteAppsQrcodeExtensions + { + /// + /// 异步调用 [POST] /apps/v1/qrcode/create/ 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsQrcodeCreateV1Async(this DouyinMicroAppClient client, Models.AppsQrcodeCreateV1Request request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (request.AppId is null) + request.AppId = client.Credentials.AppId; + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "apps", "v1", "qrcode", "create", "") + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Extensions/DouyinMicroAppClientExecuteAppsShareExtensions.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Extensions/DouyinMicroAppClientExecuteAppsShareExtensions.cs new file mode 100644 index 00000000..96bbe98a --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Extensions/DouyinMicroAppClientExecuteAppsShareExtensions.cs @@ -0,0 +1,65 @@ +using System; +using System.Net.Http; +using System.Threading; +using System.Threading.Tasks; +using Flurl.Http; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp +{ + public static class DouyinMicroAppClientExecuteAppsShareExtensions + { + #region Task + /// + /// 异步调用 [POST] /apps/v1/share/create_task/ 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsShareCreateTaskV1Async(this DouyinMicroAppClient client, Models.AppsShareCreateTaskV1Request request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (request.AppId is null) + request.AppId = client.Credentials.AppId; + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "apps", "v1", "share", "create_task", "") + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /apps/v1/share/query_user_task/ 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsShareQueryUserTaskV1Async(this DouyinMicroAppClient client, Models.AppsShareQueryUserTaskV1Request request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (request.AppId is null) + request.AppId = client.Credentials.AppId; + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "apps", "v1", "share", "query_user_task", "") + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + #endregion + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Extensions/DouyinMicroAppClientExecuteAppsTaskExtensions.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Extensions/DouyinMicroAppClientExecuteAppsTaskExtensions.cs new file mode 100644 index 00000000..be756982 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Extensions/DouyinMicroAppClientExecuteAppsTaskExtensions.cs @@ -0,0 +1,103 @@ +using System; +using System.Net.Http; +using System.Threading; +using System.Threading.Tasks; +using Flurl.Http; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp +{ + public static class DouyinMicroAppClientExecuteAppsTaskExtensions + { + /// + /// 异步调用 [POST] /apps/v2/task/create_live/ 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsTaskCreateLiveV2Async(this DouyinMicroAppClient client, Models.AppsTaskCreateLiveV2Request 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, "apps", "v2", "task", "create_live", "") + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /apps/v2/task/create_video/ 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsTaskCreateVideoV2Async(this DouyinMicroAppClient client, Models.AppsTaskCreateVideoV2Request 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, "apps", "v2", "task", "create_video", "") + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /apps/v2/task/writeoff_live/ 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsTaskWriteoffLiveV2Async(this DouyinMicroAppClient client, Models.AppsTaskWriteoffLiveV2Request 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, "apps", "v2", "task", "writeoff_live", "") + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /apps/v2/task/writeoff_video/ 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsTaskWriteoffVideoV2Async(this DouyinMicroAppClient client, Models.AppsTaskWriteoffVideoV2Request 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, "apps", "v2", "task", "writeoff_video", "") + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Extensions/DouyinMicroAppClientExecuteAppsTrafficPermissionExtensions.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Extensions/DouyinMicroAppClientExecuteAppsTrafficPermissionExtensions.cs new file mode 100644 index 00000000..d1a27e22 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Extensions/DouyinMicroAppClientExecuteAppsTrafficPermissionExtensions.cs @@ -0,0 +1,57 @@ +using System; +using System.Net.Http; +using System.Threading; +using System.Threading.Tasks; +using Flurl.Http; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp +{ + public static class DouyinMicroAppClientExecuteAppsTrafficPermissionExtensions + { + /// + /// 异步调用 [GET] /apps/v1/traffic_permission/query/ 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsTrafficPermissionQueryV1Async(this DouyinMicroAppClient client, Models.AppsTrafficPermissionQueryV1Request 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.Get, "apps", "v1", "traffic_permission", "query", "") + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /apps/v1/traffic_permission/open/ 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsTrafficPermissionOpenV1Async(this DouyinMicroAppClient client, Models.AppsTrafficPermissionOpenV1Request 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, "apps", "v1", "traffic_permission", "open", "") + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Extensions/DouyinMicroAppClientExecuteAppsUrlLinkExtensions.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Extensions/DouyinMicroAppClientExecuteAppsUrlLinkExtensions.cs new file mode 100644 index 00000000..8733deef --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Extensions/DouyinMicroAppClientExecuteAppsUrlLinkExtensions.cs @@ -0,0 +1,89 @@ +using System; +using System.Net.Http; +using System.Threading; +using System.Threading.Tasks; +using Flurl.Http; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp +{ + public static class DouyinMicroAppClientExecuteAppsUrlLinkExtensions + { + /// + /// 异步调用 [POST] /apps/v1/url/generate_schema/ 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsUrlGenerateSchemaV1Async(this DouyinMicroAppClient client, Models.AppsUrlGenerateSchemaV1Request request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (request.AppId is null) + request.AppId = client.Credentials.AppId; + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "apps", "v1", "url", "generate_schema", "") + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /apps/v1/url/query_schema/ 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsUrlQuerySchemaV1Async(this DouyinMicroAppClient client, Models.AppsUrlQuerySchemaV1Request request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (request.AppId is null) + request.AppId = client.Credentials.AppId; + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "apps", "v1", "url", "query_schema", "") + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /apps/v1/url/query_schema_quota/ 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsUrlQuerySchemaQuotaV1Async(this DouyinMicroAppClient client, Models.AppsUrlQuerySchemaQuotaV1Request request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (request.AppId is null) + request.AppId = client.Credentials.AppId; + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "apps", "v1", "url", "query_schema_quota", "") + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Extensions/DouyinMicroAppClientExecuteAppsUrlSchemaExtensions.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Extensions/DouyinMicroAppClientExecuteAppsUrlSchemaExtensions.cs new file mode 100644 index 00000000..78c456f2 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Extensions/DouyinMicroAppClientExecuteAppsUrlSchemaExtensions.cs @@ -0,0 +1,89 @@ +using System; +using System.Net.Http; +using System.Threading; +using System.Threading.Tasks; +using Flurl.Http; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp +{ + public static class DouyinMicroAppClientExecuteAppsUrlSchemaExtensions + { + /// + /// 异步调用 [POST] /apps/v1/url_link/generate 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsUrlLinkGenerateV1Async(this DouyinMicroAppClient client, Models.AppsUrlLinkGenerateV1Request request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (request.AppId is null) + request.AppId = client.Credentials.AppId; + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "apps", "v1", "url_link", "generate") + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /apps/v1/url_link/query_info 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsUrlLinkQueryInfoV1Async(this DouyinMicroAppClient client, Models.AppsUrlLinkQueryInfoV1Request request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (request.AppId is null) + request.AppId = client.Credentials.AppId; + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "apps", "v1", "url_link", "query_info") + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /apps/v1/url_link/query_quota 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsUrlLinkQueryQuotaV1Async(this DouyinMicroAppClient client, Models.AppsUrlLinkQueryQuotaV1Request request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (request.AppId is null) + request.AppId = client.Credentials.AppId; + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "apps", "v1", "url_link", "query_quota") + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Extensions/DouyinMicroAppClientExecuteAppsUserExtensions.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Extensions/DouyinMicroAppClientExecuteAppsUserExtensions.cs new file mode 100644 index 00000000..ac9c5430 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Extensions/DouyinMicroAppClientExecuteAppsUserExtensions.cs @@ -0,0 +1,312 @@ +using System; +using System.Net.Http; +using System.Threading; +using System.Threading.Tasks; +using Flurl; +using Flurl.Http; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp +{ + public static class DouyinMicroAppClientExecuteAppsUserExtensions + { + /// + /// 异步调用 [GET] /apps/v1/user/get_item/ 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsUserGetItemV1Async(this DouyinMicroAppClient client, Models.AppsUserGetItemV1Request 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.Get, "apps", "v1", "user", "get_item", "") + .SetQueryParam("open_id", request.OpenId) + .SetQueryParam("date_type", request.DateType) + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [GET] /apps/v1/user_bc/get_item/ 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsUserBCGetItemV1Async(this DouyinMicroAppClient client, Models.AppsUserBCGetItemV1Request 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.Get, "apps", "v1", "user_bc", "get_item", "") + .SetQueryParam("open_id", request.OpenId) + .SetQueryParam("date_type", request.DateType) + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [GET] /apps/v1/user/get_fans/ 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsUserGetFansV1Async(this DouyinMicroAppClient client, Models.AppsUserGetFansV1Request 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.Get, "apps", "v1", "user", "get_fans", "") + .SetQueryParam("open_id", request.OpenId) + .SetQueryParam("date_type", request.DateType) + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [GET] /apps/v1/user_bc/get_fans/ 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsUserBCGetFansV1Async(this DouyinMicroAppClient client, Models.AppsUserBCGetFansV1Request 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.Get, "apps", "v1", "user_bc", "get_fans", "") + .SetQueryParam("open_id", request.OpenId) + .SetQueryParam("date_type", request.DateType) + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [GET] /apps/v1/user/get_like/ 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsUserGetLikeV1Async(this DouyinMicroAppClient client, Models.AppsUserGetLikeV1Request 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.Get, "apps", "v1", "user", "get_like", "") + .SetQueryParam("open_id", request.OpenId) + .SetQueryParam("date_type", request.DateType) + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [GET] /apps/v1/user_bc/get_like/ 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsUserBCGetLikeV1Async(this DouyinMicroAppClient client, Models.AppsUserBCGetLikeV1Request 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.Get, "apps", "v1", "user_bc", "get_like", "") + .SetQueryParam("open_id", request.OpenId) + .SetQueryParam("date_type", request.DateType) + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [GET] /apps/v1/user/get_comment/ 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsUserGetCommentV1Async(this DouyinMicroAppClient client, Models.AppsUserGetCommentV1Request 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.Get, "apps", "v1", "user", "get_comment", "") + .SetQueryParam("open_id", request.OpenId) + .SetQueryParam("date_type", request.DateType) + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [GET] /apps/v1/user_bc/get_comment/ 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsUserBCGetCommentV1Async(this DouyinMicroAppClient client, Models.AppsUserBCGetCommentV1Request 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.Get, "apps", "v1", "user_bc", "get_comment", "") + .SetQueryParam("open_id", request.OpenId) + .SetQueryParam("date_type", request.DateType) + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [GET] /apps/v1/user/get_share/ 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsUserGetShareV1Async(this DouyinMicroAppClient client, Models.AppsUserGetShareV1Request 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.Get, "apps", "v1", "user", "get_share", "") + .SetQueryParam("open_id", request.OpenId) + .SetQueryParam("date_type", request.DateType) + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [GET] /apps/v1/user_bc/get_share/ 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsUserBCGetShareV1Async(this DouyinMicroAppClient client, Models.AppsUserBCGetShareV1Request 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.Get, "apps", "v1", "user_bc", "get_share", "") + .SetQueryParam("open_id", request.OpenId) + .SetQueryParam("date_type", request.DateType) + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [GET] /apps/v1/user/get_profile/ 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsUserGetProfileV1Async(this DouyinMicroAppClient client, Models.AppsUserGetProfileV1Request 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.Get, "apps", "v1", "user", "get_profile", "") + .SetQueryParam("open_id", request.OpenId) + .SetQueryParam("date_type", request.DateType) + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [GET] /apps/v1/user_bc/get_profile/ 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsUserBCGetProfileV1Async(this DouyinMicroAppClient client, Models.AppsUserBCGetProfileV1Request 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.Get, "apps", "v1", "user_bc", "get_profile", "") + .SetQueryParam("open_id", request.OpenId) + .SetQueryParam("date_type", request.DateType) + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Extensions/DouyinMicroAppClientExecuteAppsVideoExtensions.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Extensions/DouyinMicroAppClientExecuteAppsVideoExtensions.cs new file mode 100644 index 00000000..e36125bd --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Extensions/DouyinMicroAppClientExecuteAppsVideoExtensions.cs @@ -0,0 +1,106 @@ +using System; +using System.Net.Http; +using System.Threading; +using System.Threading.Tasks; +using Flurl; +using Flurl.Http; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp +{ + public static class DouyinMicroAppClientExecuteAppsVideoExtensions + { + /// + /// 异步调用 [POST] /apps/v1/video/query/ 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsVideoQueryV1Async(this DouyinMicroAppClient client, Models.AppsVideoQueryV1Request 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, "apps", "v1", "video", "query", "") + .SetQueryParam("open_id", request.OpenId) + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /apps/v1/video_bc/query/ 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsVideoBCQueryV1Async(this DouyinMicroAppClient client, Models.AppsVideoBCQueryV1Request 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, "apps", "v1", "video_bc", "query", "") + .SetQueryParam("open_id", request.OpenId) + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /apps/v1/convert_video_id/video_id_to_open_item_id/ 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsConvertVideoIdToOpenItemIdV1Async(this DouyinMicroAppClient client, Models.AppsConvertVideoIdToOpenItemIdV1Request 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, "apps", "v1", "convert_video_id", "video_id_to_open_item_id", "") + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /apps/v1/convert_video_id/open_item_id_to_encrypt_id/ 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsConvertOpenItemIdToEncryptIdV1Async(this DouyinMicroAppClient client, Models.AppsConvertOpenItemIdToEncryptIdV1Request 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, "apps", "v1", "convert_video_id", "open_item_id_to_encrypt_id", "") + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Extensions/DouyinMicroAppClientExecuteLegacyAppsECPayExtensions.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Extensions/DouyinMicroAppClientExecuteLegacyAppsECPayExtensions.cs new file mode 100644 index 00000000..1be12990 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Extensions/DouyinMicroAppClientExecuteLegacyAppsECPayExtensions.cs @@ -0,0 +1,701 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net.Http; +using System.Threading; +using System.Threading.Tasks; +using Flurl; +using Flurl.Http; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp +{ + public static class DouyinMicroAppClientExecuteLegacyAppsECPayExtensions + { + private static string GenerateRequestSignature(DouyinMicroAppClient client, TRequest request, Dictionary? extraParams = null) + where TRequest : DouyinMicroAppRequest + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + /* + * REF: https://microapp.bytedance.com/docs/zh-CN/mini-app/develop/server/ecpay/TE/#%E4%B8%89%E3%80%81%E7%AD%BE%E5%90%8D-demo + */ + + string json = client.JsonSerializer.Serialize(request); + IList tempList = new List() { client.Credentials.ECPaySalt! }; + IDictionary paramMap = Newtonsoft.Json.JsonConvert.DeserializeObject>(json)!; + + if (extraParams is not null) + { + foreach (KeyValuePair item in extraParams) + { + paramMap[item.Key] = item.Value; + } + } + + foreach (KeyValuePair item in paramMap) + { + string key = item.Key; + string? value = item.Value?.Trim(); + + if ("app_id".Equals(key) || + "thirdparty_id".Equals(key) || + "sign".Equals(key) || + "other_settle_params".Equals(key)) + { + continue; + } + + if (value is not null && value.StartsWith("\"") && value.EndsWith("\"")) + { + value = value.Substring(1, value.Length - 1).Trim(); + } + + if (string.IsNullOrEmpty(value) || "null".Equals(value)) + { + continue; + } + + tempList.Add(value!); + } + + string[] tempArray = tempList.ToArray(); + Array.Sort(tempArray, StringComparer.Ordinal); + + string plainText = string.Join("&", tempArray); + return Utilities.MD5Utility.Hash(plainText).Value!.ToLower(); + } + + #region Bills + /// + /// 异步调用 [GET] /apps/bills 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsBillsAsync(this DouyinMicroAppClient client, Models.AppsBillsRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (request.AppId is null) + request.AppId = client.Credentials.AppId; + + if (request.Signature is null) + { + request.Signature = GenerateRequestSignature(client, request, new() + { + { "merchant_id" , request.MerchantId }, + { "bill_date" , request.DateString }, + { "bill_type" , request.BillType } + }); + } + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Get, "apps", "bills") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("apps", "bills")) + .SetQueryParam("app_id", request.AppId) + .SetQueryParam("merchant_id", request.MerchantId) + .SetQueryParam("bill_date", request.DateString) + .SetQueryParam("bill_type", request.BillType) + .SetQueryParam("sign", request.Signature); + + if (request.ComponentAppId is not null) + flurlReq.SetQueryParam("thirdparty_id", request.ComponentAppId); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [GET] /apps/fund/bills 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsFundBillsAsync(this DouyinMicroAppClient client, Models.AppsFundBillsRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (request.AppId is null) + request.AppId = client.Credentials.AppId; + + if (request.Signature is null) + { + request.Signature = GenerateRequestSignature(client, request, new() + { + { "merchant_id" , request.MerchantId }, + { "bill_date" , request.DateString }, + { "account_type" , request.AccountType }, + { "payment_type" , request.PaymentType }, + { "trade_type" , request.TradeType }, + }); + } + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Get, "apps", "fund", "bills") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("apps", "fund", "bills")) + .SetQueryParam("app_id", request.AppId) + .SetQueryParam("merchant_id", request.MerchantId) + .SetQueryParam("bill_date", request.DateString) + .SetQueryParam("account_type", request.AccountType) + .SetQueryParam("payment_type", request.PaymentType) + .SetQueryParam("trade_type", request.TradeType) + .SetQueryParam("sign", request.Signature); + + if (request.ComponentAppId is not null) + flurlReq.SetQueryParam("thirdparty_id", request.ComponentAppId); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + #endregion + + #region Order + /// + /// 异步调用 [POST] /apps/ecpay/v1/create_order 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsECPayCreateOrderV1Async(this DouyinMicroAppClient client, Models.AppsECPayCreateOrderV1Request request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (request.AppId is null) + request.AppId = client.Credentials.AppId; + + if (request.Signature is null) + request.Signature = GenerateRequestSignature(client, request); + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "apps", "ecpay", "v1", "create_order") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("apps", "ecpay", "v1", "create_order")); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /apps/ecpay/v1/query_order 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsECPayQueryOrderV1Async(this DouyinMicroAppClient client, Models.AppsECPayQueryOrderV1Request request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (request.AppId is null) + request.AppId = client.Credentials.AppId; + + if (request.Signature is null) + request.Signature = GenerateRequestSignature(client, request); + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "apps", "ecpay", "v1", "query_order") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("apps", "ecpay", "v1", "query_order")); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /apps/ecpay/v1/create_refund 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsECPayCreateRefundV1Async(this DouyinMicroAppClient client, Models.AppsECPayCreateRefundV1Request request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (request.AppId is null) + request.AppId = client.Credentials.AppId; + + if (request.Signature is null) + request.Signature = GenerateRequestSignature(client, request); + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "apps", "ecpay", "v1", "create_refund") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("apps", "ecpay", "v1", "create_refund")); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /apps/ecpay/v1/query_refund 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsECPayQueryRefundV1Async(this DouyinMicroAppClient client, Models.AppsECPayQueryRefundV1Request request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (request.AppId is null) + request.AppId = client.Credentials.AppId; + + if (request.Signature is null) + request.Signature = GenerateRequestSignature(client, request); + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "apps", "ecpay", "v1", "query_refund") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("apps", "ecpay", "v1", "query_refund")); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /apps/ecpay/v1/settle 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsECPaySettleV1Async(this DouyinMicroAppClient client, Models.AppsECPaySettleV1Request request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (request.AppId is null) + request.AppId = client.Credentials.AppId; + + if (request.Signature is null) + request.Signature = GenerateRequestSignature(client, request); + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "apps", "ecpay", "v1", "settle") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("apps", "ecpay", "v1", "settle")); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /apps/ecpay/v1/query_settle 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsECPayQuerySettleV1Async(this DouyinMicroAppClient client, Models.AppsECPayQuerySettleV1Request request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (request.AppId is null) + request.AppId = client.Credentials.AppId; + + if (request.Signature is null) + request.Signature = GenerateRequestSignature(client, request); + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "apps", "ecpay", "v1", "query_settle") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("apps", "ecpay", "v1", "query_settle")); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /apps/ecpay/v1/create_return 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsECPayCreateReturnV1Async(this DouyinMicroAppClient client, Models.AppsECPayCreateReturnV1Request request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (request.AppId is null) + request.AppId = client.Credentials.AppId; + + if (request.Signature is null) + request.Signature = GenerateRequestSignature(client, request); + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "apps", "ecpay", "v1", "create_return") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("apps", "ecpay", "v1", "create_return")); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /apps/ecpay/v1/query_return 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsECPayQueryReturnV1Async(this DouyinMicroAppClient client, Models.AppsECPayQueryReturnV1Request request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (request.AppId is null) + request.AppId = client.Credentials.AppId; + + if (request.Signature is null) + request.Signature = GenerateRequestSignature(client, request); + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "apps", "ecpay", "v1", "query_return") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("apps", "ecpay", "v1", "query_return")); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /apps/ecpay/v1/query_platform_order 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsECPayQueryPlatformOrderV1Async(this DouyinMicroAppClient client, Models.AppsECPayQueryPlatformOrderV1Request request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (request.AppId is null) + request.AppId = client.Credentials.AppId; + + if (request.Signature is null) + request.Signature = GenerateRequestSignature(client, request); + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "apps", "ecpay", "v1", "query_platform_order") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("apps", "ecpay", "v1", "query_platform_order")); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + #endregion + + #region SaaS + #region SaaS - Apply + /// + /// 异步调用 [POST] /apps/ecpay/saas/create_merchant 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsECPaySaaSCreateMerchantAsync(this DouyinMicroAppClient client, Models.AppsECPaySaaSCreateMerchantRequest 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, "apps", "ecpay", "saas", "create_merchant") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("apps", "ecpay", "saas", "create_merchant")); + + if (request.Signature is null) + request.Signature = GenerateRequestSignature(client, request); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /apps/ecpay/saas/image_upload 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsECPaySaaSImageUploadAsync(this DouyinMicroAppClient client, Models.AppsECPaySaaSImageUploadRequest 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, "apps", "ecpay", "saas", "image_upload") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("apps", "ecpay", "saas", "image_upload")); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /apps/ecpay/saas/query_merchant_status 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsECPaySaaSQueryMerchantStatusAsync(this DouyinMicroAppClient client, Models.AppsECPaySaaSQueryMerchantStatusRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (request.Signature is null) + request.Signature = GenerateRequestSignature(client, request); + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "apps", "ecpay", "saas", "query_merchant_status") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("apps", "ecpay", "saas", "query_merchant_status")); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + #endregion + + #region SaaS - PageLinks + /// + /// 异步调用 [POST] /apps/ecpay/saas/add_merchant 接口。 + /// + /// REF:
+ ///
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsECPaySaaSAddMerchantAsync(this DouyinMicroAppClient client, Models.AppsECPaySaaSAddMerchantRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (request.ComponentAppId is null) + request.ComponentAppId = client.Credentials.AppId; + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "apps", "ecpay", "saas", "add_merchant") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("apps", "ecpay", "saas", "add_merchant")); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /apps/ecpay/saas/get_app_merchant 接口。 + /// + /// REF:
+ ///
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsECPaySaaSGetAppMerchantAsync(this DouyinMicroAppClient client, Models.AppsECPaySaaSGetAppMerchantRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (request.ComponentAppId is null) + request.ComponentAppId = client.Credentials.AppId; + + if (request.Signature is null) + request.Signature = GenerateRequestSignature(client, request); + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "apps", "ecpay", "saas", "get_app_merchant") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("apps", "ecpay", "saas", "get_app_merchant")); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /apps/ecpay/saas/app_add_sub_merchant 接口。 + /// + /// REF:
+ ///
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsECPaySaaSAppAddSubMerchantAsync(this DouyinMicroAppClient client, Models.AppsECPaySaaSAppAddSubMerchantRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (request.Signature is null) + request.Signature = GenerateRequestSignature(client, request); + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "apps", "ecpay", "saas", "app_add_sub_merchant") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("apps", "ecpay", "saas", "app_add_sub_merchant")); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /apps/ecpay/saas/add_sub_merchant 接口。 + /// + /// REF:
+ ///
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsECPaySaaSAddSubMerchantAsync(this DouyinMicroAppClient client, Models.AppsECPaySaaSAddSubMerchantRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (request.ComponentAppId is null) + request.ComponentAppId = client.Credentials.AppId; + + if (request.Signature is null) + request.Signature = GenerateRequestSignature(client, request); + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "apps", "ecpay", "saas", "add_sub_merchant") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("apps", "ecpay", "saas", "add_sub_merchant")); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + #endregion + + #region SaaS - Withdraw + /// + /// 异步调用 [POST] /apps/ecpay/saas/query_merchant_balance 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsECPaySaaSQueryMerchantBalanceAsync(this DouyinMicroAppClient client, Models.AppsECPaySaaSQueryMerchantBalanceRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (request.Signature is null) + request.Signature = GenerateRequestSignature(client, request); + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "apps", "ecpay", "saas", "query_merchant_balance") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("apps", "ecpay", "saas", "query_merchant_balance")); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /apps/ecpay/saas/merchant_withdraw 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsECPaySaaSMerchantWithdrawAsync(this DouyinMicroAppClient client, Models.AppsECPaySaaSMerchantWithdrawRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (request.Signature is null) + request.Signature = GenerateRequestSignature(client, request); + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "apps", "ecpay", "saas", "merchant_withdraw") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("apps", "ecpay", "saas", "merchant_withdraw")); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /apps/ecpay/saas/query_withdraw_order 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsECPaySaaSQueryWithdrawOrderAsync(this DouyinMicroAppClient client, Models.AppsECPaySaaSQueryWithdrawOrderRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (request.Signature is null) + request.Signature = GenerateRequestSignature(client, request); + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "apps", "ecpay", "saas", "query_withdraw_order") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("apps", "ecpay", "saas", "query_withdraw_order")); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + #endregion + #endregion + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Extensions/DouyinMicroAppClientExecuteLegacyAppsExtensions.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Extensions/DouyinMicroAppClientExecuteLegacyAppsExtensions.cs new file mode 100644 index 00000000..b1b5e2ca --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Extensions/DouyinMicroAppClientExecuteLegacyAppsExtensions.cs @@ -0,0 +1,2157 @@ +using System; +using System.Net.Http; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using Flurl; +using Flurl.Http; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp +{ + public static class DouyinMicroAppClientExecuteLegacyAppsExtensions + { + /// + /// 异步调用 [POST] /apps/v2/token 接口。 + /// + /// REF:
+ ///
+ ///
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsTokenV2Async(this DouyinMicroAppClient client, Models.AppsTokenV2Request request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (request.AppId is null) + request.AppId = client.Credentials.AppId; + + if (request.AppSecret is null) + request.AppSecret = client.Credentials.AppSecret; + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "apps", "v2", "token") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("apps", "v2", "token")); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /apps/v2/jscode2session 接口。 + /// + /// REF:
+ ///
+ ///
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsJsCode2SessionV2Async(this DouyinMicroAppClient client, Models.AppsJsCode2SessionV2Request request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (request.AppId is null) + request.AppId = client.Credentials.AppId; + + if (request.AppSecret is null) + request.AppSecret = client.Credentials.AppSecret; + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "apps", "v2", "jscode2session") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("apps", "v2", "jscode2session")); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + #region Capacity + /// + /// 异步调用 [POST] /apps/v1/capacity/upload_material 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsCapacityUploadMaterialV1Async(this DouyinMicroAppClient client, Models.AppsCapacityUploadMaterialV1Request request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (request.MaterialFileName is null) + request.MaterialFileName = Guid.NewGuid().ToString("N").ToLower() + ".jpg"; + + if (request.MaterialFileContentType is null) + request.MaterialFileContentType = Utilities.FileNameToContentTypeMapper.GetContentTypeForMaterial(request.MaterialFileName) ?? "image/jpeg"; + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "apps", "v1", "capacity", "upload_material") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("apps", "v1", "capacity", "upload_material")) + .WithHeader("access-token", request.AccessToken); + + using var httpContent = Utilities.FileHttpContentBuilder.Build(fileName: request.MaterialFileName, fileBytes: request.MaterialFileBytes, fileContentType: request.MaterialFileContentType, formDataName: "material_file"); + httpContent.Add(new ByteArrayContent(Encoding.UTF8.GetBytes(request.MaterialType.ToString())), "material_type"); + + return await client.SendFlurlRequestAsync(flurlReq, httpContent: httpContent, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + #region Capacity/Aweme + /// + /// 异步调用 [GET] /apps/v1/capacity/query_aweme_permission_list 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + [Obsolete("相关接口或字段于 2024-01-01 下线。")] + public static async Task ExecuteAppsCapacityQueryAwemePermissionListV1Async(this DouyinMicroAppClient client, Models.AppsCapacityQueryAwemePermissionListV1Request 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.Get, "apps", "v1", "capacity", "query_aweme_permission_list") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("apps", "v1", "capacity", "query_aweme_permission_list")) + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /apps/v1/capacity/apply_aweme_permission 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + [Obsolete("相关接口或字段于 2024-01-01 下线。")] + public static async Task ExecuteAppsCapacityApplyAwemePermissionV1Async(this DouyinMicroAppClient client, Models.AppsCapacityApplyAwemePermissionV1Request 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, "apps", "v1", "capacity", "apply_aweme_permission") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("apps", "v1", "capacity", "apply_aweme_permission")) + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [GET] /apps/v1/capacity/query_scope_quota_detail 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + [Obsolete("相关接口或字段于 2024-01-01 下线。")] + public static async Task ExecuteAppsCapacityQueryScopeQuotaDetailV1Async(this DouyinMicroAppClient client, Models.AppsCapacityQueryScopeQuotaDetailV1Request 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.Get, "apps", "v1", "capacity", "query_scope_quota_detail") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("apps", "v1", "capacity", "query_scope_quota_detail")) + .WithHeader("access-token", request.AccessToken) + .SetQueryParam("permission_key", request.PermissionKey); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /apps/v1/capacity/apply_scope_quota 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + [Obsolete("相关接口或字段于 2024-01-01 下线。")] + public static async Task ExecuteAppsCapacityApplyScopeQuotaV1Async(this DouyinMicroAppClient client, Models.AppsCapacityApplyScopeQuotaV1Request 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, "apps", "v1", "capacity", "apply_scope_quota") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("apps", "v1", "capacity", "apply_scope_quota")) + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + #endregion + + #region Capacity/ClueComponent + /// + /// 异步调用 [POST] /apps/v1/capacity/create_clue_component_info 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsCapacityCreateClueComponentInfoV1Async(this DouyinMicroAppClient client, Models.AppsCapacityCreateClueComponentInfoV1Request 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, "apps", "v1", "capacity", "create_clue_component_info") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("apps", "v1", "capacity", "create_clue_component_info")) + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [GET] /apps/v1/capacity/query_clue_component_info 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsCapacityQueryClueComponentInfoV1Async(this DouyinMicroAppClient client, Models.AppsCapacityQueryClueComponentInfoV1Request 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.Get, "apps", "v1", "capacity", "query_clue_component_info") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("apps", "v1", "capacity", "query_clue_component_info")) + .WithHeader("access-token", request.AccessToken); + + if (request.PageNumber is not null) + flurlReq.SetQueryParam("page_no", request.PageNumber.Value); + + if (request.PageSize is not null) + flurlReq.SetQueryParam("page_size", request.PageSize.Value); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /apps/v1/capacity/update_clue_component_info 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsCapacityUpdateClueComponentInfoV1Async(this DouyinMicroAppClient client, Models.AppsCapacityUpdateClueComponentInfoV1Request 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, "apps", "v1", "capacity", "update_clue_component_info") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("apps", "v1", "capacity", "update_clue_component_info")) + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [DELETE] /apps/v1/capacity/delete_clue_component_info 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsCapacityDeleteClueComponentInfoV1Async(this DouyinMicroAppClient client, Models.AppsCapacityDeleteClueComponentInfoV1Request 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.Delete, "apps", "v1", "capacity", "delete_clue_component_info") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("apps", "v1", "capacity", "delete_clue_component_info")) + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + #endregion + + #region Capacity/FollowAweme + /// + /// 异步调用 [POST] /apps/v1/capacity/bind_aweme_user 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + [Obsolete("相关接口或字段于 2024-01-01 下线。")] + public static async Task ExecuteAppsCapacityBindAwemeUserV1Async(this DouyinMicroAppClient client, Models.AppsCapacityBindAwemeUserV1Request 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, "apps", "v1", "capacity", "bind_aweme_user") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("apps", "v1", "capacity", "bind_aweme_user")) + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /apps/v1/capacity/unbind_aweme_user_bind 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + [Obsolete("相关接口或字段于 2024-01-01 下线。")] + public static async Task ExecuteAppsCapacityUnbindAwemeUserV1Async(this DouyinMicroAppClient client, Models.AppsCapacityUnbindAwemeUserV1Request 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, "apps", "v1", "capacity", "unbind_aweme_user_bind") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("apps", "v1", "capacity", "unbind_aweme_user_bind")) + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [GET] /apps/v1/capacity/get_aweme_user_bind_qrcode 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + [Obsolete("相关接口或字段于 2024-01-01 下线。")] + public static async Task ExecuteAppsCapacityGetAwemeUserBindQrcodeV1Async(this DouyinMicroAppClient client, Models.AppsCapacityGetAwemeUserBindQrcodeV1Request 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.Get, "apps", "v1", "capacity", "get_aweme_user_bind_qrcode") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("apps", "v1", "capacity", "get_aweme_user_bind_qrcode")) + .WithHeader("access-token", request.AccessToken) + .SetQueryParam("type", request.BindType); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [GET] /apps/v1/capacity/query_aweme_user_bind_list 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + [Obsolete("相关接口或字段于 2024-01-01 下线。")] + public static async Task ExecuteAppsCapacityQueryAwemeUserBindListV1Async(this DouyinMicroAppClient client, Models.AppsCapacityQueryAwemeUserBindListV1Request 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.Get, "apps", "v1", "capacity", "query_aweme_user_bind_list") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("apps", "v1", "capacity", "query_aweme_user_bind_list")) + .WithHeader("access-token", request.AccessToken) + .SetQueryParam("type", request.BindType) + .SetQueryParam("page_num", request.PageNumber) + .SetQueryParam("page_size", request.PageSize); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + #endregion + + #region Capacity/Mount + /// + /// 异步调用 [POST] /apps/v1/capacity/apply_capacity 接口。 + /// + /// REF:
+ ///
+ ///
+ ///
+ ///
+ /// + ///
+ ///
+ /// + /// + /// + /// + [Obsolete("相关接口或字段于 2024-01-01 下线。")] + public static async Task ExecuteAppsCapacityApplyCapacityV1Async(this DouyinMicroAppClient client, Models.AppsCapacityApplyCapacityV1Request 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, "apps", "v1", "capacity", "apply_capacity") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("apps", "v1", "capacity", "apply_capacity")) + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [GET] /apps/v1/capacity/query_apply_status 接口。 + /// + /// REF:
+ ///
+ ///
+ ///
+ ///
+ /// + ///
+ ///
+ /// + /// + /// + /// + [Obsolete("相关接口或字段于 2024-01-01 下线。")] + public static async Task ExecuteAppsCapacityQueryApplyStatusV1Async(this DouyinMicroAppClient client, Models.AppsCapacityQueryApplyStatusV1Request 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.Get, "apps", "v1", "capacity", "query_apply_status") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("apps", "v1", "capacity", "query_apply_status")) + .WithHeader("access-token", request.AccessToken) + .SetQueryParam("capacity_key", request.CapacityKey); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /apps/v1/capacity/bind_self_mount_user 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + [Obsolete("相关接口或字段于 2024-01-01 下线。")] + public static async Task ExecuteAppsCapacityBindSelfMountUserV1Async(this DouyinMicroAppClient client, Models.AppsCapacityBindSelfMountUserV1Request 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, "apps", "v1", "capacity", "bind_self_mount_user") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("apps", "v1", "capacity", "bind_self_mount_user")) + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /apps/v1/capacity/unbind_self_mount_user 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + [Obsolete("相关接口或字段于 2024-01-01 下线。")] + public static async Task ExecuteAppsCapacityUnbindSelfMountUserV1Async(this DouyinMicroAppClient client, Models.AppsCapacityUnbindSelfMountUserV1Request 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, "apps", "v1", "capacity", "unbind_self_mount_user") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("apps", "v1", "capacity", "unbind_self_mount_user")) + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [GET] /apps/v1/capacity/get_self_mount_bind_qrcode 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + [Obsolete("相关接口或字段于 2024-01-01 下线。")] + public static async Task ExecuteAppsCapacityGetSelfMountBindQrcodeV1Async(this DouyinMicroAppClient client, Models.AppsCapacityGetSelfMountBindQrcodeV1Request 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.Get, "apps", "v1", "capacity", "get_self_mount_bind_qrcode") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("apps", "v1", "capacity", "get_self_mount_bind_qrcode")) + .WithHeader("access-token", request.AccessToken) + .SetQueryParam("capacity_key", request.CapacityKey); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [GET] /apps/v1/capacity/query_self_mount_user_list 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + [Obsolete("相关接口或字段于 2024-01-01 下线。")] + public static async Task ExecuteAppsCapacityQuerySelfMountUserListV1Async(this DouyinMicroAppClient client, Models.AppsCapacityQuerySelfMountUserListV1Request 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.Get, "apps", "v1", "capacity", "query_self_mount_user_list") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("apps", "v1", "capacity", "query_self_mount_user_list")) + .WithHeader("access-token", request.AccessToken) + .SetQueryParam("capacity_key", request.CapacityKey) + .SetQueryParam("page_num", request.PageNumber) + .SetQueryParam("page_size", request.PageSize); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + #region Capacity/Mount/Capcut + /// + /// 异步调用 [GET] /apps/v1/capacity/query_capcut_info 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + [Obsolete("相关接口或字段于 2024-01-01 下线。")] + public static async Task ExecuteAppsCapacityQueryCapcutInfoV1Async(this DouyinMicroAppClient client, Models.AppsCapacityQueryCapcutInfoV1Request 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.Get, "apps", "v1", "capacity", "query_capcut_info") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("apps", "v1", "capacity", "query_capcut_info")) + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [GET] /apps/v1/capacity/query_capcut_template_list 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + [Obsolete("相关接口或字段于 2024-01-01 下线。")] + public static async Task ExecuteAppsCapacityQueryCapcutTemplateListV1Async(this DouyinMicroAppClient client, Models.AppsCapacityQueryCapcutTemplateListV1Request 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.Get, "apps", "v1", "capacity", "query_capcut_template_list") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("apps", "v1", "capacity", "query_capcut_template_list")) + .WithHeader("access-token", request.AccessToken) + .SetQueryParam("page_num", request.PageNumber) + .SetQueryParam("page_size", request.PageSize); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /apps/v1/capacity/update_capcut_template_status 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + [Obsolete("相关接口或字段于 2024-01-01 下线。")] + public static async Task ExecuteAppsCapacityUpdateCapcutTemplateStatusV1Async(this DouyinMicroAppClient client, Models.AppsCapacityUpdateCapcutTemplateStatusV1Request 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, "apps", "v1", "capacity", "update_capcut_template_status") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("apps", "v1", "capacity", "update_capcut_template_status")) + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + #endregion + #endregion + + #region Capacity/SimpleQrcode + /// + /// 异步调用 [GET] /apps/v1/capacity/query_simple_qr_bind_list 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + [Obsolete("相关接口或字段于 2024-02-02 下线。")] + public static async Task ExecuteAppsCapacityQuerySimpleQrcodeBindListV1Async(this DouyinMicroAppClient client, Models.AppsCapacityQuerySimpleQrcodeBindListV1Request 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.Get, "apps", "v1", "capacity", "query_simple_qr_bind_list") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("apps", "v1", "capacity", "query_simple_qr_bind_list")) + .WithHeader("access-token", request.AccessToken) + .SetQueryParam("page_num", request.PageNumber) + .SetQueryParam("page_size", request.PageSize); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /apps/v1/capacity/add_simple_qr_bind 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + [Obsolete("相关接口或字段于 2024-02-02 下线。")] + public static async Task ExecuteAppsCapacityAddSimpleQrcodeBindV1Async(this DouyinMicroAppClient client, Models.AppsCapacityAddSimpleQrcodeBindV1Request 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, "apps", "v1", "capacity", "add_simple_qr_bind") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("apps", "v1", "capacity", "add_simple_qr_bind")) + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /apps/v1/capacity/update_simple_qr_bind 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + [Obsolete("相关接口或字段于 2024-02-02 下线。")] + public static async Task ExecuteAppsCapacityUpdateSimpleQrcodeBindV1Async(this DouyinMicroAppClient client, Models.AppsCapacityUpdateSimpleQrcodeBindV1Request 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, "apps", "v1", "capacity", "update_simple_qr_bind") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("apps", "v1", "capacity", "update_simple_qr_bind")) + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /apps/v1/capacity/update_simple_qr_bind_status 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + [Obsolete("相关接口或字段于 2024-02-02 下线。")] + public static async Task ExecuteAppsCapacityUpdateSimpleQrcodeBindStatusV1Async(this DouyinMicroAppClient client, Models.AppsCapacityUpdateSimpleQrcodeBindStatusV1Request 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, "apps", "v1", "capacity", "update_simple_qr_bind_status") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("apps", "v1", "capacity", "update_simple_qr_bind_status")) + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /apps/v1/capacity/delete_simple_qr_bind 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + [Obsolete("相关接口或字段于 2024-02-02 下线。")] + public static async Task ExecuteAppsCapacityDeleteSimpleQrcodeBindV1Async(this DouyinMicroAppClient client, Models.AppsCapacityDeleteSimpleQrcodeBindV1Request 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, "apps", "v1", "capacity", "delete_simple_qr_bind") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("apps", "v1", "capacity", "delete_simple_qr_bind")) + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + #endregion + + #region Capacity/SubscribeNotification + /// + /// 异步调用 [GET] /apps/v1/capacity/query_subscribe_notification_tpl_list 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + [Obsolete("相关接口或字段于 2024-01-30 下线。")] + public static async Task ExecuteAppsCapacityQuerySubscribeNotificationTemplateListV1Async(this DouyinMicroAppClient client, Models.AppsCapacityQuerySubscribeNotificationTemplateListV1Request 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.Get, "apps", "v1", "capacity", "query_subscribe_notification_tpl_list") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("apps", "v1", "capacity", "query_subscribe_notification_tpl_list")) + .WithHeader("access-token", request.AccessToken) + .SetQueryParam("page_num", request.PageNumber) + .SetQueryParam("page_size", request.PageSize) + .SetQueryParam("classification", request.Classification) + .SetQueryParam("template_type", request.TemplateType); + + if (request.CategoryIdList is not null) + flurlReq.SetQueryParam("category_ids", string.Join(",", request.CategoryIdList)); + + if (request.Keyword is not null) + flurlReq.SetQueryParam("keyword", request.Keyword); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [GET] /apps/v1/capacity/query_app_subscribe_notification_tpl 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + [Obsolete("相关接口或字段于 2024-01-30 下线。")] + public static async Task ExecuteAppsCapacityQueryAppSubscribeNotificationTemplateV1Async(this DouyinMicroAppClient client, Models.AppsCapacityQueryAppSubscribeNotificationTemplateV1Request 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.Get, "apps", "v1", "capacity", "query_app_subscribe_notification_tpl") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("apps", "v1", "capacity", "query_app_subscribe_notification_tpl")) + .WithHeader("access-token", request.AccessToken) + .SetQueryParam("page_num", request.PageNumber) + .SetQueryParam("page_size", request.PageSize) + .SetQueryParam("classification", request.Classification); + + if (request.CategoryIdList is not null) + flurlReq.SetQueryParam("category_ids", string.Join(",", request.CategoryIdList)); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [GET] /apps/v1/capacity/query_created_subscribe_notification_tpl_list 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + [Obsolete("相关接口或字段于 2024-01-30 下线。")] + public static async Task ExecuteAppsCapacityQueryCreatedSubscribeNotificationTemplateListV1Async(this DouyinMicroAppClient client, Models.AppsCapacityQueryCreatedSubscribeNotificationTemplateListV1Request 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.Get, "apps", "v1", "capacity", "query_created_subscribe_notification_tpl_list") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("apps", "v1", "capacity", "query_created_subscribe_notification_tpl_list")) + .WithHeader("access-token", request.AccessToken) + .SetQueryParam("page_num", request.PageNumber) + .SetQueryParam("page_size", request.PageSize); + + if (request.Status is not null) + flurlReq.SetQueryParam("status", request.Status); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /apps/v1/capacity/add_app_subscribe_notification_tpl 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + [Obsolete("相关接口或字段于 2024-01-30 下线。")] + public static async Task ExecuteAppsCapacityAddAppSubscribeNotificationTemplateV1Async(this DouyinMicroAppClient client, Models.AppsCapacityAddAppSubscribeNotificationTemplateV1Request 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, "apps", "v1", "capacity", "add_app_subscribe_notification_tpl") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("apps", "v1", "capacity", "add_app_subscribe_notification_tpl")) + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /apps/v1/capacity/modify_app_subscribe_notification_tpl 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + [Obsolete("相关接口或字段于 2024-01-30 下线。")] + public static async Task ExecuteAppsCapacityModifyAppSubscribeNotificationTemplateV1Async(this DouyinMicroAppClient client, Models.AppsCapacityModifyAppSubscribeNotificationTemplateV1Request 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, "apps", "v1", "capacity", "modify_app_subscribe_notification_tpl") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("apps", "v1", "capacity", "modify_app_subscribe_notification_tpl")) + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /apps/v1/capacity/delete_app_subscribe_notification_tpl 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + [Obsolete("相关接口或字段于 2024-01-30 下线。")] + public static async Task ExecuteAppsCapacityDeleteAppSubscribeNotificationTemplateV1Async(this DouyinMicroAppClient client, Models.AppsCapacityDeleteAppSubscribeNotificationTemplateV1Request 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, "apps", "v1", "capacity", "delete_app_subscribe_notification_tpl") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("apps", "v1", "capacity", "delete_app_subscribe_notification_tpl")) + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /apps/v1/capacity/create_subscribe_notification_tpl 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + [Obsolete("相关接口或字段于 2024-01-30 下线。")] + public static async Task ExecuteAppsCapacityCreateAppSubscribeNotificationTemplateV1Async(this DouyinMicroAppClient client, Models.AppsCapacityCreateAppSubscribeNotificationTemplateV1Request 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, "apps", "v1", "capacity", "create_subscribe_notification_tpl") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("apps", "v1", "capacity", "create_subscribe_notification_tpl")) + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + #endregion + + #region Capacity/TrafficPermission + /// + /// 异步调用 [GET] /apps/v1/capacity/query_traffic_permission_status 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + [Obsolete("相关接口或字段于 2024-02-29 下线。")] + public static async Task ExecuteAppsCapacityQueryTrafficPermissionStatusV1Async(this DouyinMicroAppClient client, Models.AppsCapacityQueryTrafficPermissionStatusV1Request 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.Get, "apps", "v1", "capacity", "query_traffic_permission_status") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("apps", "v1", "capacity", "query_traffic_permission_status")) + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /apps/v1/capacity/open_traffic_permission 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + [Obsolete("相关接口或字段于 2024-02-29 下线。")] + public static async Task ExecuteAppsCapacityOpenTrafficPermissionV1Async(this DouyinMicroAppClient client, Models.AppsCapacityOpenTrafficPermissionV1Request 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, "apps", "v1", "capacity", "open_traffic_permission") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("apps", "v1", "capacity", "open_traffic_permission")) + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [GET] /apps/v1/capacity/query_ad_placement_list 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + [Obsolete("相关接口或字段于 2024-02-29 下线。")] + public static async Task ExecuteAppsCapacityQueryAdPlacementListV1Async(this DouyinMicroAppClient client, Models.AppsCapacityQueryAdPlacementListV1Request 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.Get, "apps", "v1", "capacity", "query_ad_placement_list") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("apps", "v1", "capacity", "query_ad_placement_list")) + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /apps/v1/capacity/add_ad_placement 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + [Obsolete("相关接口或字段于 2024-02-29 下线。")] + public static async Task ExecuteAppsCapacityAddAdPlacementV1Async(this DouyinMicroAppClient client, Models.AppsCapacityAddAdPlacementV1Request 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, "apps", "v1", "capacity", "add_ad_placement") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("apps", "v1", "capacity", "add_ad_placement")) + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /apps/v1/capacity/update_ad_placement_status 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + [Obsolete("相关接口或字段于 2024-02-29 下线。")] + public static async Task ExecuteAppsCapacityUpdateAdPlacementStatusV1Async(this DouyinMicroAppClient client, Models.AppsCapacityUpdateAdPlacementStatusV1Request 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, "apps", "v1", "capacity", "update_ad_placement_status") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("apps", "v1", "capacity", "update_ad_placement_status")) + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [GET] /apps/v1/capacity/query_ad_income 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsCapacityQueryAdIncomeV1Async(this DouyinMicroAppClient client, Models.AppsCapacityQueryAdIncomeV1Request 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.Get, "apps", "v1", "capacity", "query_ad_income") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("apps", "v1", "capacity", "query_ad_income")) + .WithHeader("access-token", request.AccessToken) + .SetQueryParam("start_date", request.StartDateString) + .SetQueryParam("end_date", request.EndDateString); + + if (request.HostName is not null) + flurlReq.SetQueryParam("host_name", request.HostName); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [GET] /apps/v1/capacity/query_ad_settlement_list 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsCapacityQueryAdSettlementListV1Async(this DouyinMicroAppClient client, Models.AppsCapacityQueryAdSettlementListV1Request 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.Get, "apps", "v1", "capacity", "query_ad_settlement_list") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("apps", "v1", "capacity", "query_ad_settlement_list")) + .WithHeader("access-token", request.AccessToken); + + if (request.PeriodString is not null) + flurlReq.SetQueryParam("month", request.PeriodString); + + if (request.Status is not null) + flurlReq.SetQueryParam("status", request.Status); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + #endregion + #endregion + + #region Censor + /// + /// 异步调用 [POST] /apps/censor/image 接口。 + /// + /// REF:
+ ///
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsCensorImageAsync(this DouyinMicroAppClient client, Models.AppsCensorImageRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (request.AppId is null) + request.AppId = client.Credentials.AppId; + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "apps", "censor", "image") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("apps", "censor", "image")); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + #endregion + + #region CustomerService + /// + /// 异步调用 [GET] /apps/customer_service/url 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsCustomerServiceUrlAsync(this DouyinMicroAppClient client, Models.AppsCustomerServiceUrlRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (request.AppId is null) + request.AppId = client.Credentials.AppId; + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Get, "apps", "customer_service", "url") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("apps", "customer_service", "url")) + .SetQueryParam("access_token", request.AccessToken) + .SetQueryParam("appid", request.AppId) + .SetQueryParam("openid", request.OpenId) + .SetQueryParam("type", request.Type) + .SetQueryParam("scene", request.Scene); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + #endregion + + #region Chat + /// + /// 异步调用 [GET] /apps/chat/customer_service_url 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + [Obsolete("相关接口或字段于 2023-08-29 下线。")] + public static async Task ExecuteAppsChatCustomerServiceUrlAsync(this DouyinMicroAppClient client, Models.AppsChatCustomerServiceUrlRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (request.AppId is null) + request.AppId = client.Credentials.AppId; + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Get, "apps", "chat", "customer_service_url") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("apps", "chat", "customer_service_url")) + .WithHeader("access-token", request.AccessToken) + .SetQueryParam("appid", request.AppId) + .SetQueryParam("openid", request.OpenId) + .SetQueryParam("type", request.Type) + .SetQueryParam("scene", request.Scene); + + if (request.OrderId is not null) + flurlReq.SetQueryParam("order_id", request.OrderId); + + if (request.IMType is not null) + flurlReq.SetQueryParam("im_type", request.IMType); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + #endregion + + #region DataAnalysis + #region DataAnalysis/TransactionAnalysis + /// + /// 异步调用 [GET] /apps/v1/data_analysis/query_deal_overview_data 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + [Obsolete("相关接口或字段于 2024-02-02 下线。")] + public static async Task ExecuteAppsDataAnalysisQueryDealOverviewDataV1Async(this DouyinMicroAppClient client, Models.AppsDataAnalysisQueryDealOverviewDataV1Request 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.Get, "apps", "v1", "data_analysis", "query_deal_overview_data") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("apps", "v1", "data_analysis", "query_deal_overview_data")) + .WithHeader("access-token", request.AccessToken) + .SetQueryParam("start_time", request.StartTimestamp) + .SetQueryParam("end_time", request.EndTimestamp); + + if (request.HostName is not null) + flurlReq.SetQueryParam("host_name", request.HostName); + + if (request.VersionType is not null) + flurlReq.SetQueryParam("version_type", request.VersionType); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [GET] /apps/v1/data_analysis/query_video_deal_data 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + [Obsolete("相关接口或字段于 2024-02-02 下线。")] + public static async Task ExecuteAppsDataAnalysisQueryVideoDealDataV1Async(this DouyinMicroAppClient client, Models.AppsDataAnalysisQueryVideoDealDataV1Request 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.Get, "apps", "v1", "data_analysis", "query_video_deal_data") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("apps", "v1", "data_analysis", "query_video_deal_data")) + .WithHeader("access-token", request.AccessToken) + .SetQueryParam("start_time", request.StartTimestamp) + .SetQueryParam("end_time", request.EndTimestamp); + + if (request.HostName is not null) + flurlReq.SetQueryParam("host_name", request.HostName); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [GET] /apps/v1/data_analysis/query_live_room 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + [Obsolete("相关接口或字段于 2024-02-02 下线。")] + public static async Task ExecuteAppsDataAnalysisQueryLiveRoomV1Async(this DouyinMicroAppClient client, Models.AppsDataAnalysisQueryLiveRoomV1Request 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.Get, "apps", "v1", "data_analysis", "query_live_room") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("apps", "v1", "data_analysis", "query_live_room")) + .WithHeader("access-token", request.AccessToken); + + if (request.AnchorName is not null) + flurlReq.SetQueryParam("anchor_name", request.AnchorName); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [GET] /apps/v1/data_analysis/query_live_room_data 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + [Obsolete("相关接口或字段于 2024-02-02 下线。")] + public static async Task ExecuteAppsDataAnalysisQueryLiveRoomDataV1Async(this DouyinMicroAppClient client, Models.AppsDataAnalysisQueryLiveRoomDataV1Request 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.Get, "apps", "v1", "data_analysis", "query_live_room_data") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("apps", "v1", "data_analysis", "query_live_room_data")) + .WithHeader("access-token", request.AccessToken) + .SetQueryParam("live_room_id", request.LiveRoomId); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [GET] /apps/v1/data_analysis/query_live_deal_data 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + [Obsolete("相关接口或字段于 2024-02-02 下线。")] + public static async Task ExecuteAppsDataAnalysisQueryLiveDealDataV1Async(this DouyinMicroAppClient client, Models.AppsDataAnalysisQueryLiveDealDataV1Request 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.Get, "apps", "v1", "data_analysis", "query_live_deal_data") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("apps", "v1", "data_analysis", "query_live_deal_data")) + .WithHeader("access-token", request.AccessToken) + .SetQueryParam("live_room_id", request.LiveRoomId); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [GET] /apps/v1/data_analysis/query_product_deal_data 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + [Obsolete("相关接口或字段于 2024-02-02 下线。")] + public static async Task ExecuteAppsDataAnalysisQueryProductDealDataV1Async(this DouyinMicroAppClient client, Models.AppsDataAnalysisQueryProductDealDataV1Request 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.Get, "apps", "v1", "data_analysis", "query_product_deal_data") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("apps", "v1", "data_analysis", "query_product_deal_data")) + .WithHeader("access-token", request.AccessToken) + .SetQueryParam("start_time", request.StartTimestamp) + .SetQueryParam("end_time", request.EndTimestamp) + .SetQueryParam("page_num", request.PageNumber) + .SetQueryParam("page_size", request.PageSize); + + if (request.HostName is not null) + flurlReq.SetQueryParam("host_name", request.HostName); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + #endregion + + #region DataAnalysis/UserAnalysis + /// + /// 异步调用 [GET] /apps/v1/data_analysis/query_behavior_data 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + [Obsolete("相关接口或字段于 2024-02-02 下线。")] + public static async Task ExecuteAppsDataAnalysisQueryBehaviorDataV1Async(this DouyinMicroAppClient client, Models.AppsDataAnalysisQueryBehaviorDataV1Request 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.Get, "apps", "v1", "data_analysis", "query_behavior_data") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("apps", "v1", "data_analysis", "query_behavior_data")) + .WithHeader("access-token", request.AccessToken) + .SetQueryParam("start_time", request.StartTimestamp) + .SetQueryParam("end_time", request.EndTimestamp); + + if (request.HostName is not null) + flurlReq.SetQueryParam("host_name", request.HostName); + + if (request.OS is not null) + flurlReq.SetQueryParam("os", request.OS); + + if (request.VersionType is not null) + flurlReq.SetQueryParam("version_type", request.VersionType); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [GET] /apps/v1/data_analysis/query_real_time_user_data 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + [Obsolete("相关接口或字段于 2024-02-02 下线。")] + public static async Task ExecuteAppsDataAnalysisQueryRealTimeUserDataV1Async(this DouyinMicroAppClient client, Models.AppsDataAnalysisQueryRealTimeUserDataV1Request 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.Get, "apps", "v1", "data_analysis", "query_real_time_user_data") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("apps", "v1", "data_analysis", "query_real_time_user_data")) + .WithHeader("access-token", request.AccessToken); + + if (request.HostName is not null) + flurlReq.SetQueryParam("host_name", request.HostName); + + if (request.VersionType is not null) + flurlReq.SetQueryParam("version_type", request.VersionType); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [GET] /apps/v1/data_analysis/query_retention_data 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + [Obsolete("相关接口或字段于 2024-02-02 下线。")] + public static async Task ExecuteAppsDataAnalysisQueryRetentionDataV1Async(this DouyinMicroAppClient client, Models.AppsDataAnalysisQueryRetentionDataV1Request 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.Get, "apps", "v1", "data_analysis", "query_retention_data") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("apps", "v1", "data_analysis", "query_retention_data")) + .WithHeader("access-token", request.AccessToken) + .SetQueryParam("start_time", request.StartTimestamp) + .SetQueryParam("end_time", request.EndTimestamp); + + if (request.UserType is not null) + flurlReq.SetQueryParam("user_type", request.UserType); + + if (request.HostName is not null) + flurlReq.SetQueryParam("host_name", request.HostName); + + if (request.OS is not null) + flurlReq.SetQueryParam("os", request.OS); + + if (request.VersionType is not null) + flurlReq.SetQueryParam("version_type", request.VersionType); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [GET] /apps/v1/data_analysis/query_scene_data 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + [Obsolete("相关接口或字段于 2024-02-02 下线。")] + public static async Task ExecuteAppsDataAnalysisQuerySceneDataV1Async(this DouyinMicroAppClient client, Models.AppsDataAnalysisQuerySceneDataV1Request 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.Get, "apps", "v1", "data_analysis", "query_scene_data") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("apps", "v1", "data_analysis", "query_scene_data")) + .WithHeader("access-token", request.AccessToken) + .SetQueryParam("start_time", request.StartTimestamp) + .SetQueryParam("end_time", request.EndTimestamp); + + if (request.HostName is not null) + flurlReq.SetQueryParam("host_name", request.HostName); + + if (request.VersionType is not null) + flurlReq.SetQueryParam("version_type", request.VersionType); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [GET] /apps/v1/data_analysis/query_user_portrait_data 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + [Obsolete("相关接口或字段于 2024-02-02 下线。")] + public static async Task ExecuteAppsDataAnalysisQueryUserPortraitDataV1Async(this DouyinMicroAppClient client, Models.AppsDataAnalysisQueryUserPortraitDataV1Request 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.Get, "apps", "v1", "data_analysis", "query_user_portrait_data") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("apps", "v1", "data_analysis", "query_user_portrait_data")) + .WithHeader("access-token", request.AccessToken) + .SetQueryParam("start_time", request.StartTimestamp) + .SetQueryParam("end_time", request.EndTimestamp); + + if (request.UserType is not null) + flurlReq.SetQueryParam("user_type", request.UserType); + + if (request.HostName is not null) + flurlReq.SetQueryParam("host_name", request.HostName); + + if (request.VersionType is not null) + flurlReq.SetQueryParam("version_type", request.VersionType); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [GET] /apps/v1/data_analysis/query_client_data 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + [Obsolete("相关接口或字段于 2024-02-02 下线。")] + public static async Task ExecuteAppsDataAnalysisQueryClientDataV1Async(this DouyinMicroAppClient client, Models.AppsDataAnalysisQueryClientDataV1Request 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.Get, "apps", "v1", "data_analysis", "query_client_data") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("apps", "v1", "data_analysis", "query_client_data")) + .WithHeader("access-token", request.AccessToken) + .SetQueryParam("start_time", request.StartTimestamp) + .SetQueryParam("end_time", request.EndTimestamp); + + if (request.UserType is not null) + flurlReq.SetQueryParam("user_type", request.UserType); + + if (request.HostName is not null) + flurlReq.SetQueryParam("host_name", request.HostName); + + if (request.VersionType is not null) + flurlReq.SetQueryParam("version_type", request.VersionType); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [GET] /apps/v1/data_analysis/query_page_data 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + [Obsolete("相关接口或字段于 2024-02-02 下线。")] + public static async Task ExecuteAppsDataAnalysisQueryPageDataV1Async(this DouyinMicroAppClient client, Models.AppsDataAnalysisQueryPageDataV1Request 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.Get, "apps", "v1", "data_analysis", "query_page_data") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("apps", "v1", "data_analysis", "query_page_data")) + .WithHeader("access-token", request.AccessToken) + .SetQueryParam("start_time", request.StartTimestamp) + .SetQueryParam("end_time", request.EndTimestamp); + + if (request.HostName is not null) + flurlReq.SetQueryParam("host_name", request.HostName); + + if (request.OS is not null) + flurlReq.SetQueryParam("os", request.OS); + + if (request.VersionType is not null) + flurlReq.SetQueryParam("version_type", request.VersionType); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + #endregion + #endregion + + #region Live + /// + /// 异步调用 [POST] /apps/upload_live_image 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsUploadLiveImageAsync(this DouyinMicroAppClient client, Models.AppsUploadLiveImageRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (request.AppId is null) + request.AppId = client.Credentials.AppId; + + if (request.ImageFileName is null) + request.ImageFileName = Guid.NewGuid().ToString("N").ToLower() + ".jpg"; + + if (request.ImageFileContentType is null) + request.ImageFileContentType = Utilities.FileNameToContentTypeMapper.GetContentTypeForMaterial(request.ImageFileName) ?? "image/jpeg"; + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "apps", "upload_live_image") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("apps", "upload_live_image")) + .WithHeader("access-token", request.AccessToken); + + using var httpContent = Utilities.FileHttpContentBuilder.Build(fileName: request.ImageFileName, fileBytes: request.ImageFileBytes, fileContentType: request.ImageFileContentType, formDataName: "image"); + httpContent.Add(new ByteArrayContent(Encoding.UTF8.GetBytes(request.Title)), "title"); + httpContent.Add(new ByteArrayContent(Encoding.UTF8.GetBytes(request.PagePath)), "start_page"); + if (request.RoomId is not null) + httpContent.Add(new ByteArrayContent(Encoding.UTF8.GetBytes(request.RoomId.Value.ToString())), "room_id"); + + return await client.SendFlurlRequestAsync(flurlReq, httpContent: httpContent, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /apps/v1/live/set_black_white_list 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsLiveSetBlackWhiteListV1Async(this DouyinMicroAppClient client, Models.AppsLiveSetBlackWhiteListV1Request request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (request.AppId is null) + request.AppId = client.Credentials.AppId; + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "apps", "v1", "live", "set_black_white_list") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("apps", "v1", "live", "set_black_white_list")) + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + #endregion + + #region Message + /// + /// 异步调用 [POST] /apps/message/custom/send 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsMessageCustomSendAsync(this DouyinMicroAppClient client, Models.AppsMessageCustomSendRequest 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, "apps", "message", "custom", "send") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("apps", "message", "custom", "send")) + .SetQueryParam("access_token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + #endregion + + #region Order + /// + /// 异步调用 [POST] /apps/order/v2/push 接口。 + /// + /// REF:
+ ///
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsOrderPushV2Async(this DouyinMicroAppClient client, Models.AppsOrderPushV2Request 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, "apps", "order", "v2", "push") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("apps", "order", "v2", "push")); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /apps/order/delete 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsOrderDeleteAsync(this DouyinMicroAppClient client, Models.AppsOrderDeleteRequest 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, "apps", "order", "delete") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("apps", "order", "delete")); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + #endregion + + #region Qrcode + /// + /// 异步调用 [POST] /apps/qrcode 接口。 + /// + /// REF:
+ ///
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsQrcodeAsync(this DouyinMicroAppClient client, Models.AppsQrcodeRequest 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, "apps", "qrcode") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("apps", "qrcode")); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + #endregion + + #region SubscribeNotification + /// + /// 异步调用 [POST] /apps/subscribe_notification/developer/v1/notify 接口。 + /// + /// REF:
+ ///
+ /// + ///
+ ///
+ /// + /// + /// + /// + [Obsolete("相关接口或字段于 2023-12-27 下线。")] + public static async Task ExecuteAppsSubscribeNotificationDeveloperNotifyV1Async(this DouyinMicroAppClient client, Models.AppsSubscribeNotificationDeveloperNotifyV1Request request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (request.AppId is null) + request.AppId = client.Credentials.AppId; + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "apps", "subscribe_notification", "developer", "v1", "notify") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("apps", "subscribe_notification", "developer", "v1", "notify")); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + #endregion + + #region ShareConfig + /// + /// 异步调用 [POST] /apps/share_config 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsShareConfigAsync(this DouyinMicroAppClient client, Models.AppsShareConfigRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (request.AppId is null) + request.AppId = client.Credentials.AppId; + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "apps", "share_config") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("apps", "share_config")); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + #endregion + + #region TaskBox + /// + /// 异步调用 [POST] /apps/taskbox/add_task 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + [Obsolete("相关接口或字段于 2024-01-08 下线。")] + public static async Task ExecuteAppsTaskBoxAddTaskAsync(this DouyinMicroAppClient client, Models.AppsTaskBoxAddTaskRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (request.AppId is null) + request.AppId = client.Credentials.AppId; + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "apps", "taskbox", "add_task") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("apps", "taskbox", "add_task")); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /apps/taskbox/update_task 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + [Obsolete("相关接口或字段于 2024-01-08 下线。")] + public static async Task ExecuteAppsTaskBoxUpdateTaskAsync(this DouyinMicroAppClient client, Models.AppsTaskBoxUpdateTaskRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (request.AppId is null) + request.AppId = client.Credentials.AppId; + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "apps", "taskbox", "update_task") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("apps", "taskbox", "update_task")); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /apps/taskbox/update/status 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + [Obsolete("相关接口或字段于 2024-01-08 下线。")] + public static async Task ExecuteAppsTaskBoxUpdateStatusAsync(this DouyinMicroAppClient client, Models.AppsTaskBoxUpdateStatusRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (request.AppId is null) + request.AppId = client.Credentials.AppId; + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "apps", "taskbox", "update", "status") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("apps", "taskbox", "update", "status")); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /apps/taskbox/query_app_task_id 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + [Obsolete("相关接口或字段于 2024-01-08 下线。")] + public static async Task ExecuteAppsTaskBoxQueryAppTaskIdAsync(this DouyinMicroAppClient client, Models.AppsTaskBoxQueryAppTaskIdRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (request.AppId is null) + request.AppId = client.Credentials.AppId; + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "apps", "taskbox", "query_app_task_id") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("apps", "taskbox", "query_app_task_id")); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /apps/taskbox/query_task_video_data 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + [Obsolete("相关接口或字段于 2024-01-08 下线。")] + public static async Task ExecuteAppsTaskBoxQueryTaskVideoDataAsync(this DouyinMicroAppClient client, Models.AppsTaskBoxQueryTaskVideoDataRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (request.AppId is null) + request.AppId = client.Credentials.AppId; + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "apps", "taskbox", "query_task_video_data") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("apps", "taskbox", "query_task_video_data")); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /apps/taskbox/update_orient_talents/ 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsTaskBoxUpdateOrientTalentsAsync(this DouyinMicroAppClient client, Models.AppsTaskBoxUpdateOrientTalentsRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (request.AppId is null) + request.AppId = client.Credentials.AppId; + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "apps", "taskbox", "update_orient_talents", "") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("apps", "taskbox", "update_orient_talents", "")); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + #endregion + + #region Video + /// + /// 异步调用 [POST] /apps/convert_video_id/video_id_to_open_item_id 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsConvertVideoIdToOpenItemIdAsync(this DouyinMicroAppClient client, Models.AppsConvertVideoIdToOpenItemIdRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (request.AppId is null) + request.AppId = client.Credentials.AppId; + + if (request.AccessKey is null) + request.AccessKey = client.Credentials.AppId; + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "apps", "convert_video_id", "video_id_to_open_item_id") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("apps", "convert_video_id", "video_id_to_open_item_id")); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /apps/convert_video_id/open_item_id_to_encrypt_id 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsConvertOpenItemIdToEncryptIdAsync(this DouyinMicroAppClient client, Models.AppsConvertOpenItemIdToEncryptIdRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (request.AccessKey is null) + request.AccessKey = client.Credentials.AppId; + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "apps", "convert_video_id", "open_item_id_to_encrypt_id") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("apps", "convert_video_id", "open_item_id_to_encrypt_id")); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + #endregion + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Extensions/DouyinMicroAppClientExecuteLegacyAppsGameExtensions.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Extensions/DouyinMicroAppClientExecuteLegacyAppsGameExtensions.cs new file mode 100644 index 00000000..ae69a911 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Extensions/DouyinMicroAppClientExecuteLegacyAppsGameExtensions.cs @@ -0,0 +1,139 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net.Http; +using System.Threading; +using System.Threading.Tasks; +using System.Web; +using Flurl; +using Flurl.Http; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp +{ + public static class DouyinMicroAppClientExecuteLegacyAppsGameExtensions + { + private static string GenerateRequestSignature(DouyinMicroAppClient client, TRequest request, string httpMethod, string httpLocation) + where TRequest : Models.AppsGameWalletRequestBase + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + /* + * REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-game/develop/api/payment/payment-signature-generation-algorithm + */ + + IDictionary paramMap = new SortedDictionary( + new Dictionary() + { + { "access_token", HttpUtility.UrlEncode(request.AccessToken ?? string.Empty) }, + { "appid", HttpUtility.UrlEncode(request.AppId ?? string.Empty) }, + { "openid", HttpUtility.UrlEncode(request.OpenId ?? string.Empty) }, + { "zone_id", HttpUtility.UrlEncode(request.ZoneId ?? string.Empty) }, + { "pf", HttpUtility.UrlEncode(request.Platform ?? string.Empty) }, + { "ts", request.Timestamp.ToString()! } + }, + StringComparer.Ordinal + ); + string plainText = string.Join("&", paramMap.Select(e => $"{e.Key}={e.Value}")) + + $"&org_loc={httpLocation}" + + $"&method={httpMethod.ToUpper()}"; + return Utilities.HMACUtility.HashWithSHA256(client.Credentials.ECPaySalt ?? string.Empty, plainText).Value!.ToLower(); + } + + /// + /// 异步调用 [POST] /apps/game/wallet/get_balance 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsGameWalletGetBalanceAsync(this DouyinMicroAppClient client, Models.AppsGameWalletGetBalanceRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (request.AppId is null) + request.AppId = client.Credentials.AppId; + + if (request.Timestamp is null) + request.Timestamp = DateTimeOffset.Now.ToLocalTime().ToUnixTimeSeconds(); + + if (request.Signature is null) + request.Signature = GenerateRequestSignature(client, request, HttpMethod.Post.Method, "/api/apps/game/wallet/get_balance"); + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "apps", "game", "wallet", "get_balance") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("apps", "game", "wallet", "get_balance")); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /apps/game/wallet/game_pay 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsGameWalletGamePayAsync(this DouyinMicroAppClient client, Models.AppsGameWalletGamePayRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (request.AppId is null) + request.AppId = client.Credentials.AppId; + + if (request.Timestamp is null) + request.Timestamp = DateTimeOffset.Now.ToLocalTime().ToUnixTimeSeconds(); + + if (request.Signature is null) + request.Signature = GenerateRequestSignature(client, request, HttpMethod.Post.Method, "/api/apps/game/wallet/game_pay"); + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "apps", "game", "wallet", "game_pay") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("apps", "game", "wallet", "game_pay")); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /apps/game/wallet/add_coin 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsGameWalletAddCoinAsync(this DouyinMicroAppClient client, Models.AppsGameWalletAddCoinRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (request.AppId is null) + request.AppId = client.Credentials.AppId; + + if (request.Timestamp is null) + request.Timestamp = DateTimeOffset.Now.ToLocalTime().ToUnixTimeSeconds(); + + if (request.Signature is null) + request.Signature = GenerateRequestSignature(client, request, HttpMethod.Post.Method, "/api/apps/game/wallet/add_coin"); + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "apps", "game", "wallet", "add_coin") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("apps", "game", "wallet", "add_coin")); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Extensions/DouyinMicroAppClientExecuteLegacyAppsStorageExtensions.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Extensions/DouyinMicroAppClientExecuteLegacyAppsStorageExtensions.cs new file mode 100644 index 00000000..df9f6319 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Extensions/DouyinMicroAppClientExecuteLegacyAppsStorageExtensions.cs @@ -0,0 +1,98 @@ +using System; +using System.Net.Http; +using System.Threading; +using System.Threading.Tasks; +using Flurl; +using Flurl.Http; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp +{ + public static class DouyinMicroAppClientExecuteLegacyAppsStorageExtensions + { + private static string GenerateRequestSignature(DouyinMicroAppClient client, TRequest request, string signMethod, string sessionKey) + where TRequest : DouyinMicroAppRequest + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + if (sessionKey is null) throw new ArgumentNullException(nameof(sessionKey)); + + /* + * REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/other/user-login-sign/ + * REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-game/develop/server/other/user-login-sign/ + */ + + string json = client.JsonSerializer.Serialize(request); + + switch (signMethod) + { + case "hmac_sha256": + return Utilities.HMACUtility.HashWithSHA256(sessionKey, json).Value!.ToLower(); + + default: + return string.Empty; + } + } + + /// + /// 异步调用 [POST] /apps/set_user_storage 接口。 + /// + /// REF:
+ ///
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsSetUserStorageAsync(this DouyinMicroAppClient client, Models.AppsSetUserStorageRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (request.Signature is null) + request.Signature = GenerateRequestSignature(client, request, request.SignMethod, request.SessionKey!); + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "apps", "set_user_storage") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("apps", "set_user_storage")) + .SetQueryParam("access_token", request.AccessToken) + .SetQueryParam("openid", request.OpenId) + .SetQueryParam("signature", request.Signature) + .SetQueryParam("sig_method", request.SignMethod); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /apps/remove_user_storage 接口。 + /// + /// REF:
+ ///
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteAppsRemoveUserStorageAsync(this DouyinMicroAppClient client, Models.AppsRemoveUserStorageRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (request.Signature is null) + request.Signature = GenerateRequestSignature(client, request, request.SignMethod, request.SessionKey!); + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "apps", "remove_user_storage") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("apps", "remove_user_storage")) + .SetQueryParam("access_token", request.AccessToken) + .SetQueryParam("openid", request.OpenId) + .SetQueryParam("signature", request.Signature) + .SetQueryParam("sig_method", request.SignMethod); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Extensions/DouyinMicroAppClientExecuteLegacyCommentExtensions.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Extensions/DouyinMicroAppClientExecuteLegacyCommentExtensions.cs new file mode 100644 index 00000000..7fa0aa56 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Extensions/DouyinMicroAppClientExecuteLegacyCommentExtensions.cs @@ -0,0 +1,38 @@ +using System; +using System.Net.Http; +using System.Threading; +using System.Threading.Tasks; +using Flurl; +using Flurl.Http; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp +{ + public static class DouyinMicroAppClientExecuteLegacyCommentExtensions + { + /// + /// 异步调用 [POST] /comment/open/get 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteCommentOpenGetAsync(this DouyinMicroAppClient client, Models.CommentOpenGetRequest request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (request.AppId is null) + request.AppId = client.Credentials.AppId; + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "comment", "open", "get") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("comment", "open", "get")); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Extensions/DouyinMicroAppClientExecuteLegacyTagsExtensions.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Extensions/DouyinMicroAppClientExecuteLegacyTagsExtensions.cs new file mode 100644 index 00000000..add9c7b6 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Extensions/DouyinMicroAppClientExecuteLegacyTagsExtensions.cs @@ -0,0 +1,61 @@ +using System; +using System.Net.Http; +using System.Threading; +using System.Threading.Tasks; +using Flurl; +using Flurl.Http; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp +{ + public static class DouyinMicroAppClientExecuteLegacyTagsExtensions + { + /// + /// 异步调用 [POST] /v2/tags/text/antidirt 接口。 + /// + /// REF:
+ ///
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteTagsTextAntiDirtV2Async(this DouyinMicroAppClient client, Models.TagsTextAntiDirtV2Request 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, "v2", "tags", "text", "antidirt") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("v2", "tags", "text", "antidirt")) + .WithHeader("X-Token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /v2/tags/image 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteTagsImageV2Async(this DouyinMicroAppClient client, Models.TagsImageV2Request 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, "v2", "tags", "image") + .WithUrl(url => new Url(client._BASEURL_LEGACY).AppendPathSegments("v2", "tags", "image")) + .WithHeader("X-Token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Extensions/DouyinMicroAppClientExecuteMatchTaskBoxExtensions.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Extensions/DouyinMicroAppClientExecuteMatchTaskBoxExtensions.cs new file mode 100644 index 00000000..a4b52fe5 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Extensions/DouyinMicroAppClientExecuteMatchTaskBoxExtensions.cs @@ -0,0 +1,201 @@ +using System; +using System.Net.Http; +using System.Threading; +using System.Threading.Tasks; +using Flurl.Http; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp +{ + public static class DouyinMicroAppClientExecuteMatchTaskBoxExtensions + { + /// + /// 异步调用 [POST] /match/v2/taskbox/add_task/ 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteMatchTaskBoxAddTaskV2Async(this DouyinMicroAppClient client, Models.MatchTaskBoxAddTaskV2Request request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (request.AppId is null) + request.AppId = client.Credentials.AppId; + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "match", "v2", "taskbox", "add_task", "") + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /match/v2/taskbox/add_room_task/ 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteMatchTaskBoxAddRoomTaskV2Async(this DouyinMicroAppClient client, Models.MatchTaskBoxAddRoomTaskV2Request 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, "match", "v2", "taskbox", "add_room_task", "") + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /match/v2/taskbox/update_task/ 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteMatchTaskBoxUpdateTaskV2Async(this DouyinMicroAppClient client, Models.MatchTaskBoxUpdateTaskV2Request request, CancellationToken cancellationToken = default) + { + if (client is null) throw new ArgumentNullException(nameof(client)); + if (request is null) throw new ArgumentNullException(nameof(request)); + + if (request.AppId is null) + request.AppId = client.Credentials.AppId; + + IFlurlRequest flurlReq = client + .CreateFlurlRequest(request, HttpMethod.Post, "match", "v2", "taskbox", "update_task", "") + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /match/v2/taskbox/update_status/ 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteMatchTaskBoxUpdateStatusV2Async(this DouyinMicroAppClient client, Models.MatchTaskBoxUpdateStatusV2Request 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, "match", "v2", "taskbox", "update_status", "") + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /match/v2/taskbox/query_app_task_id/ 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteMatchTaskBoxQueryAppTaskIdV2Async(this DouyinMicroAppClient client, Models.MatchTaskBoxQueryAppTaskIdV2Request 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, "match", "v2", "taskbox", "query_app_task_id", "") + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /match/v2/taskbox/query_task_info/ 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteMatchTaskBoxQueryTaskInfoV2Async(this DouyinMicroAppClient client, Models.MatchTaskBoxQueryTaskInfoV2Request 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, "match", "v2", "taskbox", "query_task_info", "") + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /match/v2/taskbox/query_bill_link/ 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteMatchTaskBoxQueryBillLinkV2Async(this DouyinMicroAppClient client, Models.MatchTaskBoxQueryBillLinkV2Request 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, "match", "v2", "taskbox", "query_bill_link", "") + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /match/v2/taskbox/query_video_sum_data/ 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteMatchTaskBoxQueryVideoSummaryDataV2Async(this DouyinMicroAppClient client, Models.MatchTaskBoxQueryVideoSummaryDataV2Request 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, "match", "v2", "taskbox", "query_video_sum_data", "") + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Extensions/DouyinMicroAppClientExecuteNotificationSubscriptionExtensions.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Extensions/DouyinMicroAppClientExecuteNotificationSubscriptionExtensions.cs new file mode 100644 index 00000000..b82191a8 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Extensions/DouyinMicroAppClientExecuteNotificationSubscriptionExtensions.cs @@ -0,0 +1,195 @@ +using System; +using System.Net.Http; +using System.Threading; +using System.Threading.Tasks; +using Flurl.Http; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp +{ + public static class DouyinMicroAppClientExecuteNotificationSubscriptionExtensions + { + /// + /// 异步调用 [GET] /notification/v2/subscription/query_tpl_list/ 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteNotificationSubscriptionQueryTemplateListV2Async(this DouyinMicroAppClient client, Models.NotificationSubscriptionQueryTemplateListV2Request 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.Get, "notification", "v2", "subscription", "query_tpl_list", "") + .SetQueryParam("classification", request.Classification) + .SetQueryParam("page_num", request.PageNumber) + .SetQueryParam("page_size", request.PageSize) + .WithHeader("access-token", request.AccessToken); + + if (request.TemplateType is not null) + flurlReq.SetQueryParam("template_type", request.TemplateType); + + if (request.CategoryIdString is not null) + flurlReq.SetQueryParam("category_ids", request.CategoryIdString); + + if (request.Keyword is not null) + flurlReq.SetQueryParam("keyword", request.Keyword); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /notification/v2/subscription/create_tpl/ 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteNotificationSubscriptionCreateTemplateV2Async(this DouyinMicroAppClient client, Models.NotificationSubscriptionCreateTemplateV2Request 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, "notification", "v2", "subscription", "create_tpl", "") + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [GET] /notification/v2/subscription/query_created_tpl_list/ 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteNotificationSubscriptionQueryCreatedTemplateListV2Async(this DouyinMicroAppClient client, Models.NotificationSubscriptionQueryCreatedTemplateListV2Request 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.Get, "notification", "v2", "subscription", "query_created_tpl_list", "") + .SetQueryParam("page_num", request.PageNumber) + .SetQueryParam("page_size", request.PageSize) + .WithHeader("access-token", request.AccessToken); + + if (request.Status is not null) + flurlReq.SetQueryParam("status", request.Status.Value); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /notification/v2/subscription/add_app_tpl/ 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteNotificationSubscriptionAddAppTemplateV2Async(this DouyinMicroAppClient client, Models.NotificationSubscriptionAddAppTemplateV2Request 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, "notification", "v2", "subscription", "add_app_tpl", "") + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [GET] /notification/v2/subscription/query_app_tpl/ 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteNotificationSubscriptionQueryAppTemplateV2Async(this DouyinMicroAppClient client, Models.NotificationSubscriptionQueryAppTemplateV2Request 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.Get, "notification", "v2", "subscription", "query_app_tpl", "") + .SetQueryParam("classification", request.Classification) + .SetQueryParam("page_num", request.PageNumber) + .SetQueryParam("page_size", request.PageSize) + .WithHeader("access-token", request.AccessToken); + + if (request.CategoryIdString is not null) + flurlReq.SetQueryParam("category_ids", request.CategoryIdString); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /notification/v2/subscription/delete_app_tpl/ 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteNotificationSubscriptionDeleteAppTemplateV2Async(this DouyinMicroAppClient client, Models.NotificationSubscriptionDeleteAppTemplateV2Request 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, "notification", "v2", "subscription", "delete_app_tpl", "") + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// + /// 异步调用 [POST] /notification/v2/subscription/notify_user/ 接口。 + /// + /// REF:
+ /// + ///
+ ///
+ /// + /// + /// + /// + public static async Task ExecuteNotificationSubscriptionNotifyUserV2Async(this DouyinMicroAppClient client, Models.NotificationSubscriptionNotifyUserV2Request 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, "notification", "v2", "subscription", "notify_user", "") + .WithHeader("access-token", request.AccessToken); + + return await client.SendFlurlRequestAsJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/AppsJsCode2SessionV2Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/AppsJsCode2SessionV2Response.cs deleted file mode 100644 index d1536aa3..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/AppsJsCode2SessionV2Response.cs +++ /dev/null @@ -1,63 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models -{ - /// - /// 表示 [POST] /apps/v2/jscode2session 接口的响应。 - /// - public class AppsJsCode2SessionV2Response : ByteDanceMicroAppResponse - { - public static class Types - { - public class Data - { - /// - /// 获取或设置会话密钥。 - /// - [Newtonsoft.Json.JsonProperty("session_key")] - [System.Text.Json.Serialization.JsonPropertyName("session_key")] - public string? SessionKey { get; set; } - - /// - /// 获取或设置用户的 OpenId。 - /// - [Newtonsoft.Json.JsonProperty("openid")] - [System.Text.Json.Serialization.JsonPropertyName("openid")] - public string? OpenId { get; set; } - - /// - /// 获取或设置匿名用户的 OpenId。 - /// - [Newtonsoft.Json.JsonProperty("anonymous_openid")] - [System.Text.Json.Serialization.JsonPropertyName("anonymous_openid")] - public string? AnonymousOpenId { get; set; } - - /// - /// 获取或设置用户的 UnionId。 - /// - [Newtonsoft.Json.JsonProperty("unionid")] - [System.Text.Json.Serialization.JsonPropertyName("unionid")] - public string? UnionId { get; set; } - } - } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_no")] - [System.Text.Json.Serialization.JsonPropertyName("err_no")] - public override long ErrorCode { get; set; } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_tips")] - [System.Text.Json.Serialization.JsonPropertyName("err_tips")] - public override string? ErrorMessage { get; set; } - - /// - /// 获取或设置返回数据。 - /// - [Newtonsoft.Json.JsonProperty("data")] - [System.Text.Json.Serialization.JsonPropertyName("data")] - public Types.Data Data { get; set; } = default!; - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/AppsTokenV2Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/AppsTokenV2Request.cs deleted file mode 100644 index 5dbd6383..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/AppsTokenV2Request.cs +++ /dev/null @@ -1,29 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models -{ - /// - /// 表示 [POST] /apps/v2/token 接口的请求。 - /// - public class AppsTokenV2Request : ByteDanceMicroAppRequest - { - /// - /// 获取或设置小程序的 AppId。如果不指定将使用构造 时的 参数。 - /// - [Newtonsoft.Json.JsonProperty("appid")] - [System.Text.Json.Serialization.JsonPropertyName("appid")] - public string? AppId { get; set; } - - /// - /// 获取或设置小程序的 AppSecret。如果不指定将使用构造 时的 参数。 - /// - [Newtonsoft.Json.JsonProperty("secret")] - [System.Text.Json.Serialization.JsonPropertyName("secret")] - public string? AppSecret { get; set; } - - /// - /// (使用默认值即可,无需修改) - /// - [Newtonsoft.Json.JsonProperty("grant_type")] - [System.Text.Json.Serialization.JsonPropertyName("grant_type")] - public string GrantType { get; set; } = "client_credential"; - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/AppsTokenV2Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/AppsTokenV2Response.cs deleted file mode 100644 index fc8a8f50..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/AppsTokenV2Response.cs +++ /dev/null @@ -1,49 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models -{ - /// - /// 表示 [POST] /apps/v2/token 接口的响应。 - /// - public class AppsTokenV2Response : ByteDanceMicroAppResponse - { - public static class Types - { - public class Data - { - /// - /// 获取或设置调用接口的凭证。 - /// - [Newtonsoft.Json.JsonProperty("access_token")] - [System.Text.Json.Serialization.JsonPropertyName("access_token")] - public string AccessToken { get; set; } = default!; - - /// - /// 获取或设置凭证有效期(单位:秒)。 - /// - [Newtonsoft.Json.JsonProperty("expires_in")] - [System.Text.Json.Serialization.JsonPropertyName("expires_in")] - public int ExpiresIn { get; set; } - } - } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_no")] - [System.Text.Json.Serialization.JsonPropertyName("err_no")] - public override long ErrorCode { get; set; } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_tips")] - [System.Text.Json.Serialization.JsonPropertyName("err_tips")] - public override string? ErrorMessage { get; set; } - - /// - /// 获取或设置返回数据。 - /// - [Newtonsoft.Json.JsonProperty("data")] - [System.Text.Json.Serialization.JsonPropertyName("data")] - public Types.Data Data { get; set; } = default!; - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/AppsCapacityUploadMaterialV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/AppsCapacityUploadMaterialV1Request.cs deleted file mode 100644 index 8636279b..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/AppsCapacityUploadMaterialV1Request.cs +++ /dev/null @@ -1,31 +0,0 @@ -using System; - -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models -{ - /// - /// 表示 [POST] /apps/v1/capacity/upload_material 接口的请求。 - /// - public class AppsCapacityUploadMaterialV1Request : ByteDanceMicroAppRequest - { - /// - /// 获取或设置上传的文件类型。 - /// - [Newtonsoft.Json.JsonIgnore] - [System.Text.Json.Serialization.JsonIgnore] - public int MaterialType { get; set; } - - /// - /// 获取或设置资源文件字节数组。 - /// - [Newtonsoft.Json.JsonIgnore] - [System.Text.Json.Serialization.JsonIgnore] - public byte[] MaterialFileBytes { get; set; } = Array.Empty(); - - /// - /// 获取或设置封面图片文件名。如果不指定将由系统自动生成。 - /// - [Newtonsoft.Json.JsonIgnore] - [System.Text.Json.Serialization.JsonIgnore] - public string? MaterialFileName { get; set; } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/AppsCapacityUploadMaterialV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/AppsCapacityUploadMaterialV1Response.cs deleted file mode 100644 index 9a024c02..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/AppsCapacityUploadMaterialV1Response.cs +++ /dev/null @@ -1,42 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models -{ - /// - /// 表示 [POST] /apps/v1/capacity/upload_material 接口的响应。 - /// - public class AppsCapacityUploadMaterialV1Response : ByteDanceMicroAppResponse - { - public static class Types - { - public class Data - { - /// - /// 获取或设置文件路径。 - /// - [Newtonsoft.Json.JsonProperty("path")] - [System.Text.Json.Serialization.JsonPropertyName("path")] - public string FilePath { get; set; } = default!; - } - } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_no")] - [System.Text.Json.Serialization.JsonPropertyName("err_no")] - public override long ErrorCode { get; set; } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_msg")] - [System.Text.Json.Serialization.JsonPropertyName("err_msg")] - public override string? ErrorMessage { get; set; } - - /// - /// 获取或设置返回数据。 - /// - [Newtonsoft.Json.JsonProperty("data")] - [System.Text.Json.Serialization.JsonPropertyName("data")] - public Types.Data Data { get; set; } = default!; - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/AwemeCapacity/AppsCapacityAddAwemeVideoKeywordV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/AwemeCapacity/AppsCapacityAddAwemeVideoKeywordV1Response.cs deleted file mode 100644 index 9eab3ac3..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/AwemeCapacity/AppsCapacityAddAwemeVideoKeywordV1Response.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models -{ - /// - /// 表示 [POST] /apps/v1/capacity/add_aweme_video_keyword 接口的响应。 - /// - public class AppsCapacityAddAwemeVideoKeywordV1Response : ByteDanceMicroAppResponse - { - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_no")] - [System.Text.Json.Serialization.JsonPropertyName("err_no")] - public override long ErrorCode { get; set; } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_msg")] - [System.Text.Json.Serialization.JsonPropertyName("err_msg")] - public override string? ErrorMessage { get; set; } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/AwemeCapacity/AppsCapacityApplyAwemePermissionV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/AwemeCapacity/AppsCapacityApplyAwemePermissionV1Response.cs deleted file mode 100644 index 76743565..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/AwemeCapacity/AppsCapacityApplyAwemePermissionV1Response.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models -{ - /// - /// 表示 [POST] /apps/v1/capacity/apply_aweme_permission 接口的响应。 - /// - public class AppsCapacityApplyAwemePermissionV1Response : ByteDanceMicroAppResponse - { - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_no")] - [System.Text.Json.Serialization.JsonPropertyName("err_no")] - public override long ErrorCode { get; set; } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_msg")] - [System.Text.Json.Serialization.JsonPropertyName("err_msg")] - public override string? ErrorMessage { get; set; } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/AwemeCapacity/AppsCapacityApplyScopeQuotaV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/AwemeCapacity/AppsCapacityApplyScopeQuotaV1Response.cs deleted file mode 100644 index 18dda660..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/AwemeCapacity/AppsCapacityApplyScopeQuotaV1Response.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models -{ - /// - /// 表示 [POST] /apps/v1/capacity/apply_scope_quota 接口的响应。 - /// - public class AppsCapacityApplyScopeQuotaV1Response : ByteDanceMicroAppResponse - { - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_no")] - [System.Text.Json.Serialization.JsonPropertyName("err_no")] - public override long ErrorCode { get; set; } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_msg")] - [System.Text.Json.Serialization.JsonPropertyName("err_msg")] - public override string? ErrorMessage { get; set; } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/AwemeCapacity/AppsCapacityDeleteAwemeVideoKeywordV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/AwemeCapacity/AppsCapacityDeleteAwemeVideoKeywordV1Response.cs deleted file mode 100644 index 61affc77..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/AwemeCapacity/AppsCapacityDeleteAwemeVideoKeywordV1Response.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models -{ - /// - /// 表示 [POST] /apps/v1/capacity/delete_aweme_video_keyword 接口的响应。 - /// - public class AppsCapacityDeleteAwemeVideoKeywordV1Response : ByteDanceMicroAppResponse - { - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_no")] - [System.Text.Json.Serialization.JsonPropertyName("err_no")] - public override long ErrorCode { get; set; } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_msg")] - [System.Text.Json.Serialization.JsonPropertyName("err_msg")] - public override string? ErrorMessage { get; set; } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/AwemeCapacity/AppsCapacityQueryAwemePermissionListV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/AwemeCapacity/AppsCapacityQueryAwemePermissionListV1Request.cs deleted file mode 100644 index 12037e1d..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/AwemeCapacity/AppsCapacityQueryAwemePermissionListV1Request.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models -{ - /// - /// 表示 [GET] /apps/v1/capacity/query_aweme_permission_list 接口的请求。 - /// - public class AppsCapacityQueryAwemePermissionListV1Request : ByteDanceMicroAppRequest - { - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/AwemeCapacity/AppsCapacityQueryScopeQuotaDetailV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/AwemeCapacity/AppsCapacityQueryScopeQuotaDetailV1Request.cs deleted file mode 100644 index 9fe6b865..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/AwemeCapacity/AppsCapacityQueryScopeQuotaDetailV1Request.cs +++ /dev/null @@ -1,15 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models -{ - /// - /// 表示 [GET] /apps/v1/capacity/query_scope_quota_detail 接口的请求。 - /// - public class AppsCapacityQueryScopeQuotaDetailV1Request : ByteDanceMicroAppRequest - { - /// - /// 获取或设置权限 Key。 - /// - [Newtonsoft.Json.JsonIgnore] - [System.Text.Json.Serialization.JsonIgnore] - public string PermissionKey { get; set; } = string.Empty; - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/Delivery/AppsCapacityAddAliasV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/Delivery/AppsCapacityAddAliasV1Response.cs deleted file mode 100644 index fbb0bf6d..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/Delivery/AppsCapacityAddAliasV1Response.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models -{ - /// - /// 表示 [POST] /apps/v1/capacity/add_alias 接口的响应。 - /// - public class AppsCapacityAddAliasV1Response : ByteDanceMicroAppResponse - { - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_no")] - [System.Text.Json.Serialization.JsonPropertyName("err_no")] - public override long ErrorCode { get; set; } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_msg")] - [System.Text.Json.Serialization.JsonPropertyName("err_msg")] - public override string? ErrorMessage { get; set; } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/Delivery/AppsCapacityDeleteAliasV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/Delivery/AppsCapacityDeleteAliasV1Request.cs deleted file mode 100644 index ea313392..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/Delivery/AppsCapacityDeleteAliasV1Request.cs +++ /dev/null @@ -1,15 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models -{ - /// - /// 表示 [POST] /apps/v1/capacity/delete_alias 接口的请求。 - /// - public class AppsCapacityDeleteAliasV1Request : ByteDanceMicroAppRequest - { - /// - /// 获取或设置小程序别名。 - /// - [Newtonsoft.Json.JsonProperty("alias")] - [System.Text.Json.Serialization.JsonPropertyName("alias")] - public string Alias { get; set; } = string.Empty; - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/Delivery/AppsCapacityDeleteAliasV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/Delivery/AppsCapacityDeleteAliasV1Response.cs deleted file mode 100644 index e23e456c..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/Delivery/AppsCapacityDeleteAliasV1Response.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models -{ - /// - /// 表示 [POST] /apps/v1/capacity/delete_alias 接口的响应。 - /// - public class AppsCapacityDeleteAliasV1Response : ByteDanceMicroAppResponse - { - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_no")] - [System.Text.Json.Serialization.JsonPropertyName("err_no")] - public override long ErrorCode { get; set; } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_msg")] - [System.Text.Json.Serialization.JsonPropertyName("err_msg")] - public override string? ErrorMessage { get; set; } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/Delivery/AppsCapacityModifyAliasV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/Delivery/AppsCapacityModifyAliasV1Response.cs deleted file mode 100644 index 8400bbf8..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/Delivery/AppsCapacityModifyAliasV1Response.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models -{ - /// - /// 表示 [POST] /apps/v1/capacity/modify_alias 接口的响应。 - /// - public class AppsCapacityModifyAliasV1Response : ByteDanceMicroAppResponse - { - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_no")] - [System.Text.Json.Serialization.JsonPropertyName("err_no")] - public override long ErrorCode { get; set; } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_msg")] - [System.Text.Json.Serialization.JsonPropertyName("err_msg")] - public override string? ErrorMessage { get; set; } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/Delivery/AppsCapacityQueryAliasListV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/Delivery/AppsCapacityQueryAliasListV1Request.cs deleted file mode 100644 index f402fef3..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/Delivery/AppsCapacityQueryAliasListV1Request.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models -{ - /// - /// 表示 [GET] /apps/v1/capacity/query_alias_list 接口的请求。 - /// - public class AppsCapacityQueryAliasListV1Request : ByteDanceMicroAppRequest - { - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/Delivery/AppsCapacityQuerySearchTagListV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/Delivery/AppsCapacityQuerySearchTagListV1Request.cs deleted file mode 100644 index 354f7e2a..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/Delivery/AppsCapacityQuerySearchTagListV1Request.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models -{ - /// - /// 表示 [GET] /apps/v1/capacity/query_search_tag_list 接口的请求。 - /// - public class AppsCapacityQuerySearchTagListV1Request : ByteDanceMicroAppRequest - { - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/Delivery/AppsCapacitySetSearchTagV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/Delivery/AppsCapacitySetSearchTagV1Response.cs deleted file mode 100644 index 3497d70d..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/Delivery/AppsCapacitySetSearchTagV1Response.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models -{ - /// - /// 表示 [POST] /apps/v1/capacity/set_search_tag 接口的响应。 - /// - public class AppsCapacitySetSearchTagV1Response : ByteDanceMicroAppResponse - { - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_no")] - [System.Text.Json.Serialization.JsonPropertyName("err_no")] - public override long ErrorCode { get; set; } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_msg")] - [System.Text.Json.Serialization.JsonPropertyName("err_msg")] - public override string? ErrorMessage { get; set; } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/FollowAweme/AppsCapacityBindAwemeUserV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/FollowAweme/AppsCapacityBindAwemeUserV1Response.cs deleted file mode 100644 index 00314686..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/FollowAweme/AppsCapacityBindAwemeUserV1Response.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models -{ - /// - /// 表示 [POST] /apps/v1/capacity/bind_aweme_user 接口的响应。 - /// - public class AppsCapacityBindAwemeUserV1Response : ByteDanceMicroAppResponse - { - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_no")] - [System.Text.Json.Serialization.JsonPropertyName("err_no")] - public override long ErrorCode { get; set; } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_msg")] - [System.Text.Json.Serialization.JsonPropertyName("err_msg")] - public override string? ErrorMessage { get; set; } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/FollowAweme/AppsCapacityGetAwemeUserBindQrcodeV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/FollowAweme/AppsCapacityGetAwemeUserBindQrcodeV1Request.cs deleted file mode 100644 index cd38b9b7..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/FollowAweme/AppsCapacityGetAwemeUserBindQrcodeV1Request.cs +++ /dev/null @@ -1,15 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models -{ - /// - /// 表示 [GET] /apps/v1/capacity/get_aweme_user_bind_qrcode 接口的请求。 - /// - public class AppsCapacityGetAwemeUserBindQrcodeV1Request : ByteDanceMicroAppRequest - { - /// - /// 获取或设置绑定类型。 - /// - [Newtonsoft.Json.JsonIgnore] - [System.Text.Json.Serialization.JsonIgnore] - public string BindType { get; set; } = string.Empty; - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/FollowAweme/AppsCapacityGetAwemeUserBindQrcodeV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/FollowAweme/AppsCapacityGetAwemeUserBindQrcodeV1Response.cs deleted file mode 100644 index 050f49e5..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/FollowAweme/AppsCapacityGetAwemeUserBindQrcodeV1Response.cs +++ /dev/null @@ -1,49 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models -{ - /// - /// 表示 [GET] /apps/v1/capacity/get_aweme_user_bind_qrcode 接口的响应。 - /// - public class AppsCapacityGetAwemeUserBindQrcodeV1Response : ByteDanceMicroAppResponse - { - public static class Types - { - public class Data - { - /// - /// 获取或设置二维码图片 URL。 - /// - [Newtonsoft.Json.JsonProperty("qrcode_url")] - [System.Text.Json.Serialization.JsonPropertyName("qrcode_url")] - public string QrcodeUrl { get; set; } = default!; - - /// - /// 获取或设置二维码数据字符串。 - /// - [Newtonsoft.Json.JsonProperty("qrcode_parse_content")] - [System.Text.Json.Serialization.JsonPropertyName("qrcode_parse_content")] - public string QrcodeDataString { get; set; } = default!; - } - } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_no")] - [System.Text.Json.Serialization.JsonPropertyName("err_no")] - public override long ErrorCode { get; set; } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_msg")] - [System.Text.Json.Serialization.JsonPropertyName("err_msg")] - public override string? ErrorMessage { get; set; } - - /// - /// 获取或设置返回数据。 - /// - [Newtonsoft.Json.JsonProperty("data")] - [System.Text.Json.Serialization.JsonPropertyName("data")] - public Types.Data Data { get; set; } = default!; - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/Mount/AppsCapacityApplyCapacityV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/Mount/AppsCapacityApplyCapacityV1Response.cs deleted file mode 100644 index 889174d3..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/Mount/AppsCapacityApplyCapacityV1Response.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models -{ - /// - /// 表示 [POST] /apps/v1/capacity/apply_capacity 接口的响应。 - /// - public class AppsCapacityApplyCapacityV1Response : ByteDanceMicroAppResponse - { - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_no")] - [System.Text.Json.Serialization.JsonPropertyName("err_no")] - public override long ErrorCode { get; set; } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_msg")] - [System.Text.Json.Serialization.JsonPropertyName("err_msg")] - public override string? ErrorMessage { get; set; } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/Mount/AppsCapacityBindSelfMountUserV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/Mount/AppsCapacityBindSelfMountUserV1Response.cs deleted file mode 100644 index 6eb73cd1..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/Mount/AppsCapacityBindSelfMountUserV1Response.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models -{ - /// - /// 表示 [POST] /apps/v1/capacity/bind_self_mount_user 接口的响应。 - /// - public class AppsCapacityBindSelfMountUserV1Response : ByteDanceMicroAppResponse - { - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_no")] - [System.Text.Json.Serialization.JsonPropertyName("err_no")] - public override long ErrorCode { get; set; } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_msg")] - [System.Text.Json.Serialization.JsonPropertyName("err_msg")] - public override string? ErrorMessage { get; set; } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/Mount/AppsCapacityGetSelfMountBindQrcodeV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/Mount/AppsCapacityGetSelfMountBindQrcodeV1Request.cs deleted file mode 100644 index 897b7690..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/Mount/AppsCapacityGetSelfMountBindQrcodeV1Request.cs +++ /dev/null @@ -1,15 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models -{ - /// - /// 表示 [GET] /apps/v1/capacity/get_self_mount_bind_qrcode 接口的请求。 - /// - public class AppsCapacityGetSelfMountBindQrcodeV1Request : ByteDanceMicroAppRequest - { - /// - /// 获取或设置挂载能力标识。 - /// - [Newtonsoft.Json.JsonIgnore] - [System.Text.Json.Serialization.JsonIgnore] - public string CapacityKey { get; set; } = string.Empty; - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/Mount/AppsCapacityGetSelfMountBindQrcodeV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/Mount/AppsCapacityGetSelfMountBindQrcodeV1Response.cs deleted file mode 100644 index eb9b6036..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/Mount/AppsCapacityGetSelfMountBindQrcodeV1Response.cs +++ /dev/null @@ -1,49 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models -{ - /// - /// 表示 [GET] /apps/v1/capacity/get_self_mount_bind_qrcode 接口的响应。 - /// - public class AppsCapacityGetSelfMountBindQrcodeV1Response : ByteDanceMicroAppResponse - { - public static class Types - { - public class Data - { - /// - /// 获取或设置二维码图片 URL。 - /// - [Newtonsoft.Json.JsonProperty("qrcode_url")] - [System.Text.Json.Serialization.JsonPropertyName("qrcode_url")] - public string QrcodeUrl { get; set; } = default!; - - /// - /// 获取或设置二维码数据字符串。 - /// - [Newtonsoft.Json.JsonProperty("qrcode_parse_content")] - [System.Text.Json.Serialization.JsonPropertyName("qrcode_parse_content")] - public string QrcodeDataString { get; set; } = default!; - } - } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_no")] - [System.Text.Json.Serialization.JsonPropertyName("err_no")] - public override long ErrorCode { get; set; } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_msg")] - [System.Text.Json.Serialization.JsonPropertyName("err_msg")] - public override string? ErrorMessage { get; set; } - - /// - /// 获取或设置返回数据。 - /// - [Newtonsoft.Json.JsonProperty("data")] - [System.Text.Json.Serialization.JsonPropertyName("data")] - public Types.Data Data { get; set; } = default!; - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/Mount/AppsCapacityQueryApplyStatusV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/Mount/AppsCapacityQueryApplyStatusV1Request.cs deleted file mode 100644 index 07bfd9bf..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/Mount/AppsCapacityQueryApplyStatusV1Request.cs +++ /dev/null @@ -1,15 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models -{ - /// - /// 表示 [GET] /apps/v1/capacity/query_apply_status 接口的请求。 - /// - public class AppsCapacityQueryApplyStatusV1Request : ByteDanceMicroAppRequest - { - /// - /// 获取或设置挂载能力标识。 - /// - [Newtonsoft.Json.JsonIgnore] - [System.Text.Json.Serialization.JsonIgnore] - public string CapacityKey { get; set; } = string.Empty; - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/Mount/AppsCapacityQueryApplyStatusV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/Mount/AppsCapacityQueryApplyStatusV1Response.cs deleted file mode 100644 index 63267d72..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/Mount/AppsCapacityQueryApplyStatusV1Response.cs +++ /dev/null @@ -1,49 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models -{ - /// - /// 表示 [GET] /apps/v1/capacity/query_apply_status 接口的响应。 - /// - public class AppsCapacityQueryApplyStatusV1Response : ByteDanceMicroAppResponse - { - public static class Types - { - public class Data - { - /// - /// 获取或设置能力状态。 - /// - [Newtonsoft.Json.JsonProperty("status")] - [System.Text.Json.Serialization.JsonPropertyName("status")] - public int Status { get; set; } - - /// - /// 获取或设置审核拒绝原因。 - /// - [Newtonsoft.Json.JsonProperty("reason")] - [System.Text.Json.Serialization.JsonPropertyName("reason")] - public string? RejectReason { get; set; } - } - } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_no")] - [System.Text.Json.Serialization.JsonPropertyName("err_no")] - public override long ErrorCode { get; set; } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_msg")] - [System.Text.Json.Serialization.JsonPropertyName("err_msg")] - public override string? ErrorMessage { get; set; } - - /// - /// 获取或设置返回数据。 - /// - [Newtonsoft.Json.JsonProperty("data")] - [System.Text.Json.Serialization.JsonPropertyName("data")] - public Types.Data Data { get; set; } = default!; - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/Mount/Capcut/AppsCapacityQueryCapcutInfoV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/Mount/Capcut/AppsCapacityQueryCapcutInfoV1Request.cs deleted file mode 100644 index ce89ed43..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/Mount/Capcut/AppsCapacityQueryCapcutInfoV1Request.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models -{ - /// - /// 表示 [GET] /apps/v1/capacity/query_capcut_info 接口的请求。 - /// - public class AppsCapacityQueryCapcutInfoV1Request : ByteDanceMicroAppRequest - { - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/Mount/Capcut/AppsCapacityQueryCapcutInfoV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/Mount/Capcut/AppsCapacityQueryCapcutInfoV1Response.cs deleted file mode 100644 index 58429b6d..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/Mount/Capcut/AppsCapacityQueryCapcutInfoV1Response.cs +++ /dev/null @@ -1,56 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models -{ - /// - /// 表示 [GET] /apps/v1/capacity/query_capcut_info 接口的响应。 - /// - public class AppsCapacityQueryCapcutInfoV1Response : ByteDanceMicroAppResponse - { - public static class Types - { - public class Data - { - /// - /// 获取或设置剪映号。 - /// - [Newtonsoft.Json.JsonProperty("capcut_id")] - [System.Text.Json.Serialization.JsonPropertyName("capcut_id")] - public string CapcutId { get; set; } = default!; - - /// - /// 获取或设置剪映名称。 - /// - [Newtonsoft.Json.JsonProperty("capcut_name")] - [System.Text.Json.Serialization.JsonPropertyName("capcut_name")] - public string CapcutName { get; set; } = default!; - - /// - /// 获取或设置剪映头像 URL。 - /// - [Newtonsoft.Json.JsonProperty("capcut_avatar")] - [System.Text.Json.Serialization.JsonPropertyName("capcut_avatar")] - public string CapcutAvatarUrl { get; set; } = default!; - } - } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_no")] - [System.Text.Json.Serialization.JsonPropertyName("err_no")] - public override long ErrorCode { get; set; } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_msg")] - [System.Text.Json.Serialization.JsonPropertyName("err_msg")] - public override string? ErrorMessage { get; set; } - - /// - /// 获取或设置返回数据。 - /// - [Newtonsoft.Json.JsonProperty("data")] - [System.Text.Json.Serialization.JsonPropertyName("data")] - public Types.Data Data { get; set; } = default!; - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/Mount/Capcut/AppsCapacityUpdateCapcutTemplateStatusV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/Mount/Capcut/AppsCapacityUpdateCapcutTemplateStatusV1Response.cs deleted file mode 100644 index 032439b5..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/Mount/Capcut/AppsCapacityUpdateCapcutTemplateStatusV1Response.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models -{ - /// - /// 表示 [POST] /apps/v1/capacity/update_capcut_template_status 接口的响应。 - /// - public class AppsCapacityUpdateCapcutTemplateStatusV1Response : ByteDanceMicroAppResponse - { - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_no")] - [System.Text.Json.Serialization.JsonPropertyName("err_no")] - public override long ErrorCode { get; set; } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_msg")] - [System.Text.Json.Serialization.JsonPropertyName("err_msg")] - public override string? ErrorMessage { get; set; } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/SimpleQrcode/AppsCapacityAddSimpleQrcodeBindV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/SimpleQrcode/AppsCapacityAddSimpleQrcodeBindV1Response.cs deleted file mode 100644 index 47600481..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/SimpleQrcode/AppsCapacityAddSimpleQrcodeBindV1Response.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models -{ - /// - /// 表示 [POST] /apps/v1/capacity/add_simple_qr_bind 接口的响应。 - /// - public class AppsCapacityAddSimpleQrcodeBindV1Response : ByteDanceMicroAppResponse - { - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_no")] - [System.Text.Json.Serialization.JsonPropertyName("err_no")] - public override long ErrorCode { get; set; } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_msg")] - [System.Text.Json.Serialization.JsonPropertyName("err_msg")] - public override string? ErrorMessage { get; set; } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/SimpleQrcode/AppsCapacityDeleteSimpleQrcodeBindV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/SimpleQrcode/AppsCapacityDeleteSimpleQrcodeBindV1Request.cs deleted file mode 100644 index 456684bc..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/SimpleQrcode/AppsCapacityDeleteSimpleQrcodeBindV1Request.cs +++ /dev/null @@ -1,15 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models -{ - /// - /// 表示 [POST] /apps/v1/capacity/delete_simple_qr_bind 接口的请求。 - /// - public class AppsCapacityDeleteSimpleQrcodeBindV1Request : ByteDanceMicroAppRequest - { - /// - /// 获取或设置链接地址。 - /// - [Newtonsoft.Json.JsonProperty("qr_url")] - [System.Text.Json.Serialization.JsonPropertyName("qr_url")] - public string Url { get; set; } = string.Empty; - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/SimpleQrcode/AppsCapacityDeleteSimpleQrcodeBindV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/SimpleQrcode/AppsCapacityDeleteSimpleQrcodeBindV1Response.cs deleted file mode 100644 index 3f61d2b9..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/SimpleQrcode/AppsCapacityDeleteSimpleQrcodeBindV1Response.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models -{ - /// - /// 表示 [POST] /apps/v1/capacity/delete_simple_qr_bind 接口的响应。 - /// - public class AppsCapacityDeleteSimpleQrcodeBindV1Response : ByteDanceMicroAppResponse - { - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_no")] - [System.Text.Json.Serialization.JsonPropertyName("err_no")] - public override long ErrorCode { get; set; } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_msg")] - [System.Text.Json.Serialization.JsonPropertyName("err_msg")] - public override string? ErrorMessage { get; set; } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/SimpleQrcode/AppsCapacityUpdateSimpleQrcodeBindStatusV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/SimpleQrcode/AppsCapacityUpdateSimpleQrcodeBindStatusV1Response.cs deleted file mode 100644 index cfcc81dd..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/SimpleQrcode/AppsCapacityUpdateSimpleQrcodeBindStatusV1Response.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models -{ - /// - /// 表示 [POST] /apps/v1/capacity/update_simple_qr_bind_status 接口的响应。 - /// - public class AppsCapacityUpdateSimpleQrcodeBindStatusV1Response : ByteDanceMicroAppResponse - { - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_no")] - [System.Text.Json.Serialization.JsonPropertyName("err_no")] - public override long ErrorCode { get; set; } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_msg")] - [System.Text.Json.Serialization.JsonPropertyName("err_msg")] - public override string? ErrorMessage { get; set; } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/SimpleQrcode/AppsCapacityUpdateSimpleQrcodeBindV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/SimpleQrcode/AppsCapacityUpdateSimpleQrcodeBindV1Response.cs deleted file mode 100644 index 91ec99cf..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/SimpleQrcode/AppsCapacityUpdateSimpleQrcodeBindV1Response.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models -{ - /// - /// 表示 [POST] /apps/v1/capacity/update_simple_qr_bind 接口的响应。 - /// - public class AppsCapacityUpdateSimpleQrcodeBindV1Response : ByteDanceMicroAppResponse - { - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_no")] - [System.Text.Json.Serialization.JsonPropertyName("err_no")] - public override long ErrorCode { get; set; } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_msg")] - [System.Text.Json.Serialization.JsonPropertyName("err_msg")] - public override string? ErrorMessage { get; set; } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/SubscribeNotification/AppsCapacityAddAppSubscribeNotificationTemplateV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/SubscribeNotification/AppsCapacityAddAppSubscribeNotificationTemplateV1Response.cs deleted file mode 100644 index 4d17a77d..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/SubscribeNotification/AppsCapacityAddAppSubscribeNotificationTemplateV1Response.cs +++ /dev/null @@ -1,42 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models -{ - /// - /// 表示 [POST] /apps/v1/capacity/add_app_subscribe_notification_tpl 接口的响应。 - /// - public class AppsCapacityAddAppSubscribeNotificationTemplateV1Response : ByteDanceMicroAppResponse - { - public static class Types - { - public class Data - { - /// - /// 获取或设置小程序消息模版 ID。 - /// - [Newtonsoft.Json.JsonProperty("msg_id")] - [System.Text.Json.Serialization.JsonPropertyName("msg_id")] - public string MessageId { get; set; } = default!; - } - } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_no")] - [System.Text.Json.Serialization.JsonPropertyName("err_no")] - public override long ErrorCode { get; set; } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_msg")] - [System.Text.Json.Serialization.JsonPropertyName("err_msg")] - public override string? ErrorMessage { get; set; } - - /// - /// 获取或设置返回数据。 - /// - [Newtonsoft.Json.JsonProperty("data")] - [System.Text.Json.Serialization.JsonPropertyName("data")] - public Types.Data Data { get; set; } = default!; - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/SubscribeNotification/AppsCapacityCreateAppSubscribeNotificationTemplateV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/SubscribeNotification/AppsCapacityCreateAppSubscribeNotificationTemplateV1Response.cs deleted file mode 100644 index a9f58875..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/SubscribeNotification/AppsCapacityCreateAppSubscribeNotificationTemplateV1Response.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models -{ - /// - /// 表示 [POST] /apps/v1/capacity/create_subscribe_notification_tpl 接口的响应。 - /// - public class AppsCapacityCreateAppSubscribeNotificationTemplateV1Response : ByteDanceMicroAppResponse - { - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_no")] - [System.Text.Json.Serialization.JsonPropertyName("err_no")] - public override long ErrorCode { get; set; } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_msg")] - [System.Text.Json.Serialization.JsonPropertyName("err_msg")] - public override string? ErrorMessage { get; set; } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/SubscribeNotification/AppsCapacityDeleteAppSubscribeNotificationTemplateV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/SubscribeNotification/AppsCapacityDeleteAppSubscribeNotificationTemplateV1Response.cs deleted file mode 100644 index bdab91ec..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/SubscribeNotification/AppsCapacityDeleteAppSubscribeNotificationTemplateV1Response.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models -{ - /// - /// 表示 [POST] /apps/v1/capacity/delete_app_subscribe_notification_tpl 接口的响应。 - /// - public class AppsCapacityDeleteAppSubscribeNotificationTemplateV1Response : ByteDanceMicroAppResponse - { - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_no")] - [System.Text.Json.Serialization.JsonPropertyName("err_no")] - public override long ErrorCode { get; set; } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_msg")] - [System.Text.Json.Serialization.JsonPropertyName("err_msg")] - public override string? ErrorMessage { get; set; } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/SubscribeNotification/AppsCapacityModifyAppSubscribeNotificationTemplateV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/SubscribeNotification/AppsCapacityModifyAppSubscribeNotificationTemplateV1Response.cs deleted file mode 100644 index 6c0d23ea..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/SubscribeNotification/AppsCapacityModifyAppSubscribeNotificationTemplateV1Response.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models -{ - /// - /// 表示 [POST] /apps/v1/capacity/modify_app_subscribe_notification_tpl 接口的响应。 - /// - public class AppsCapacityModifyAppSubscribeNotificationTemplateV1Response : ByteDanceMicroAppResponse - { - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_no")] - [System.Text.Json.Serialization.JsonPropertyName("err_no")] - public override long ErrorCode { get; set; } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_msg")] - [System.Text.Json.Serialization.JsonPropertyName("err_msg")] - public override string? ErrorMessage { get; set; } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/TrafficPermission/AppsCapacityAddAdPlacementV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/TrafficPermission/AppsCapacityAddAdPlacementV1Response.cs deleted file mode 100644 index 506890b6..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/TrafficPermission/AppsCapacityAddAdPlacementV1Response.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models -{ - /// - /// 表示 [POST] /apps/v1/capacity/add_ad_placement 接口的响应。 - /// - public class AppsCapacityAddAdPlacementV1Response : ByteDanceMicroAppResponse - { - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_no")] - [System.Text.Json.Serialization.JsonPropertyName("err_no")] - public override long ErrorCode { get; set; } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_msg")] - [System.Text.Json.Serialization.JsonPropertyName("err_msg")] - public override string? ErrorMessage { get; set; } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/TrafficPermission/AppsCapacityOpenTrafficPermissionV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/TrafficPermission/AppsCapacityOpenTrafficPermissionV1Response.cs deleted file mode 100644 index 65113681..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/TrafficPermission/AppsCapacityOpenTrafficPermissionV1Response.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models -{ - /// - /// 表示 [POST] /apps/v1/capacity/open_traffic_permission 接口的响应。 - /// - public class AppsCapacityOpenTrafficPermissionV1Response : ByteDanceMicroAppResponse - { - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_no")] - [System.Text.Json.Serialization.JsonPropertyName("err_no")] - public override long ErrorCode { get; set; } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_msg")] - [System.Text.Json.Serialization.JsonPropertyName("err_msg")] - public override string? ErrorMessage { get; set; } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/TrafficPermission/AppsCapacityQueryAdPlacementListV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/TrafficPermission/AppsCapacityQueryAdPlacementListV1Request.cs deleted file mode 100644 index 792347a2..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/TrafficPermission/AppsCapacityQueryAdPlacementListV1Request.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models -{ - /// - /// 表示 [GET] /apps/v1/capacity/query_ad_placement_list 接口的请求。 - /// - public class AppsCapacityQueryAdPlacementListV1Request : ByteDanceMicroAppRequest - { - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/TrafficPermission/AppsCapacityQueryTrafficPermissionStatusV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/TrafficPermission/AppsCapacityQueryTrafficPermissionStatusV1Request.cs deleted file mode 100644 index eb30de23..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/TrafficPermission/AppsCapacityQueryTrafficPermissionStatusV1Request.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models -{ - /// - /// 表示 [GET] /apps/v1/capacity/query_traffic_permission_status 接口的请求。 - /// - public class AppsCapacityQueryTrafficPermissionStatusV1Request : ByteDanceMicroAppRequest - { - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/TrafficPermission/AppsCapacityQueryTrafficPermissionStatusV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/TrafficPermission/AppsCapacityQueryTrafficPermissionStatusV1Response.cs deleted file mode 100644 index a3888179..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/TrafficPermission/AppsCapacityQueryTrafficPermissionStatusV1Response.cs +++ /dev/null @@ -1,51 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models -{ - /// - /// 表示 [GET] /apps/v1/capacity/query_traffic_permission_status 接口的响应。 - /// - public class AppsCapacityQueryTrafficPermissionStatusV1Response : ByteDanceMicroAppResponse - { - public static class Types - { - public class Data - { - /// - /// 获取或设置开通状态。 - /// - [Newtonsoft.Json.JsonProperty("status")] - [System.Text.Json.Serialization.JsonPropertyName("status")] - public int Status { get; set; } - - /// - /// 获取或设置是否可以开通。 - /// - [Newtonsoft.Json.JsonProperty("can_open")] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.NumericalBooleanConverter))] - [System.Text.Json.Serialization.JsonPropertyName("can_open")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumericalBooleanConverter))] - public bool CanOpen { get; set; } - } - } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_no")] - [System.Text.Json.Serialization.JsonPropertyName("err_no")] - public override long ErrorCode { get; set; } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_msg")] - [System.Text.Json.Serialization.JsonPropertyName("err_msg")] - public override string? ErrorMessage { get; set; } - - /// - /// 获取或设置返回数据。 - /// - [Newtonsoft.Json.JsonProperty("data")] - [System.Text.Json.Serialization.JsonPropertyName("data")] - public Types.Data Data { get; set; } = default!; - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/TrafficPermission/AppsCapacityUpdateAdPlacementStatusV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/TrafficPermission/AppsCapacityUpdateAdPlacementStatusV1Response.cs deleted file mode 100644 index b3bbb536..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/TrafficPermission/AppsCapacityUpdateAdPlacementStatusV1Response.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models -{ - /// - /// 表示 [POST] /apps/v1/capacity/update_ad_placement_status 接口的响应。 - /// - public class AppsCapacityUpdateAdPlacementStatusV1Response : ByteDanceMicroAppResponse - { - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_no")] - [System.Text.Json.Serialization.JsonPropertyName("err_no")] - public override long ErrorCode { get; set; } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_msg")] - [System.Text.Json.Serialization.JsonPropertyName("err_msg")] - public override string? ErrorMessage { get; set; } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Category/AppsCategoryQueryAppCategoriesV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Category/AppsCategoryQueryAppCategoriesV1Request.cs deleted file mode 100644 index 0cd3995a..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Category/AppsCategoryQueryAppCategoriesV1Request.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models -{ - /// - /// 表示 [GET] /apps/v1/category/query_app_categories 接口的请求。 - /// - public class AppsCategoryQueryAppCategoriesV1Request : ByteDanceMicroAppRequest - { - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Chat/AppsChatCustomerServiceUrlResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Chat/AppsChatCustomerServiceUrlResponse.cs deleted file mode 100644 index e0fc3a48..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Chat/AppsChatCustomerServiceUrlResponse.cs +++ /dev/null @@ -1,42 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models -{ - /// - /// 表示 [GET] /apps/chat/customer_service_url 接口的响应。 - /// - public class AppsChatCustomerServiceUrlResponse : ByteDanceMicroAppResponse - { - public static class Types - { - public class Data - { - /// - /// 获取或设置客服链接。 - /// - [Newtonsoft.Json.JsonProperty("url")] - [System.Text.Json.Serialization.JsonPropertyName("url")] - public string Url { get; set; } = default!; - } - } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_no")] - [System.Text.Json.Serialization.JsonPropertyName("err_no")] - public override long ErrorCode { get; set; } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_msg")] - [System.Text.Json.Serialization.JsonPropertyName("err_msg")] - public override string? ErrorMessage { get; set; } - - /// - /// 获取或设置返回数据。 - /// - [Newtonsoft.Json.JsonProperty("data")] - [System.Text.Json.Serialization.JsonPropertyName("data")] - public Types.Data Data { get; set; } = default!; - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/CustomerService/AppsCustomerServiceUrlResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/CustomerService/AppsCustomerServiceUrlResponse.cs deleted file mode 100644 index 574cb565..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/CustomerService/AppsCustomerServiceUrlResponse.cs +++ /dev/null @@ -1,42 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models -{ - /// - /// 表示 [GET] /apps/customer_service/url 接口的响应。 - /// - public class AppsCustomerServiceUrlResponse : ByteDanceMicroAppResponse - { - public static class Types - { - public class Data - { - /// - /// 获取或设置客服链接。 - /// - [Newtonsoft.Json.JsonProperty("url")] - [System.Text.Json.Serialization.JsonPropertyName("url")] - public string Url { get; set; } = default!; - } - } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_no")] - [System.Text.Json.Serialization.JsonPropertyName("err_no")] - public override long ErrorCode { get; set; } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_tips")] - [System.Text.Json.Serialization.JsonPropertyName("err_tips")] - public override string? ErrorMessage { get; set; } - - /// - /// 获取或设置返回数据。 - /// - [Newtonsoft.Json.JsonProperty("data")] - [System.Text.Json.Serialization.JsonPropertyName("data")] - public Types.Data Data { get; set; } = default!; - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/DataAnalysis/TransactionAnalysis/AppsDataAnalysisQueryLiveDealDataV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/DataAnalysis/TransactionAnalysis/AppsDataAnalysisQueryLiveDealDataV1Request.cs deleted file mode 100644 index fc200a77..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/DataAnalysis/TransactionAnalysis/AppsDataAnalysisQueryLiveDealDataV1Request.cs +++ /dev/null @@ -1,15 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models -{ - /// - /// 表示 [GET] /apps/v1/data_analysis/query_live_deal_data 接口的请求。 - /// - public class AppsDataAnalysisQueryLiveDealDataV1Request : ByteDanceMicroAppRequest - { - /// - /// 获取或设置直播间 ID。 - /// - [Newtonsoft.Json.JsonIgnore] - [System.Text.Json.Serialization.JsonIgnore] - public long LiveRoomId { get; set; } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/DataAnalysis/TransactionAnalysis/AppsDataAnalysisQueryLiveRoomDataV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/DataAnalysis/TransactionAnalysis/AppsDataAnalysisQueryLiveRoomDataV1Request.cs deleted file mode 100644 index bafb6304..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/DataAnalysis/TransactionAnalysis/AppsDataAnalysisQueryLiveRoomDataV1Request.cs +++ /dev/null @@ -1,15 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models -{ - /// - /// 表示 [GET] /apps/v1/data_analysis/query_live_room_data 接口的请求。 - /// - public class AppsDataAnalysisQueryLiveRoomDataV1Request : ByteDanceMicroAppRequest - { - /// - /// 获取或设置直播间 ID。 - /// - [Newtonsoft.Json.JsonIgnore] - [System.Text.Json.Serialization.JsonIgnore] - public long LiveRoomId { get; set; } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/DataAnalysis/TransactionAnalysis/AppsDataAnalysisQueryLiveRoomV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/DataAnalysis/TransactionAnalysis/AppsDataAnalysisQueryLiveRoomV1Request.cs deleted file mode 100644 index b945af28..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/DataAnalysis/TransactionAnalysis/AppsDataAnalysisQueryLiveRoomV1Request.cs +++ /dev/null @@ -1,15 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models -{ - /// - /// 表示 [GET] /apps/v1/data_analysis/query_live_room 接口的请求。 - /// - public class AppsDataAnalysisQueryLiveRoomV1Request : ByteDanceMicroAppRequest - { - /// - /// 获取或设置主播昵称。 - /// - [Newtonsoft.Json.JsonIgnore] - [System.Text.Json.Serialization.JsonIgnore] - public string? AnchorName { get; set; } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Live/AppsLiveSetBlackWhiteListV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Live/AppsLiveSetBlackWhiteListV1Response.cs deleted file mode 100644 index 0e0792c6..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Live/AppsLiveSetBlackWhiteListV1Response.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models -{ - /// - /// 表示 [POST] /apps/v1/live/set_black_white_list 接口的响应。 - /// - public class AppsLiveSetBlackWhiteListV1Response : ByteDanceMicroAppResponse - { - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_no")] - [System.Text.Json.Serialization.JsonPropertyName("err_no")] - public override long ErrorCode { get; set; } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_msg")] - [System.Text.Json.Serialization.JsonPropertyName("err_msg")] - public override string? ErrorMessage { get; set; } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Live/AppsUploadLiveImageRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Live/AppsUploadLiveImageRequest.cs deleted file mode 100644 index 5b2635f0..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Live/AppsUploadLiveImageRequest.cs +++ /dev/null @@ -1,52 +0,0 @@ -using System; - -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models -{ - /// - /// 表示 [POST] /apps/upload_live_image 接口的请求。 - /// - public class AppsUploadLiveImageRequest : ByteDanceMicroAppRequest - { - /// - /// 获取或设置小程序的 AppId。如果不指定将使用构造 时的 参数。 - /// - [Newtonsoft.Json.JsonIgnore] - [System.Text.Json.Serialization.JsonIgnore] - public string? AppId { get; set; } - - /// - /// 获取或设置跳转的页面。 - /// - [Newtonsoft.Json.JsonIgnore] - [System.Text.Json.Serialization.JsonIgnore] - public string PagePath { get; set; } = string.Empty; - - /// - /// 获取或设置标题。 - /// - [Newtonsoft.Json.JsonIgnore] - [System.Text.Json.Serialization.JsonIgnore] - public string Title { get; set; } = string.Empty; - - /// - /// 获取或设置直播间 ID。 - /// - [Newtonsoft.Json.JsonIgnore] - [System.Text.Json.Serialization.JsonIgnore] - public int? RoomId { get; set; } - - /// - /// 获取或设置封面图片文件字节数组。 - /// - [Newtonsoft.Json.JsonIgnore] - [System.Text.Json.Serialization.JsonIgnore] - public byte[] ImageFileBytes { get; set; } = Array.Empty(); - - /// - /// 获取或设置封面图片文件名。如果不指定将由系统自动生成。 - /// - [Newtonsoft.Json.JsonIgnore] - [System.Text.Json.Serialization.JsonIgnore] - public string? ImageFileName { get; set; } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Live/AppsUploadLiveImageResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Live/AppsUploadLiveImageResponse.cs deleted file mode 100644 index 1bc9bf25..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Live/AppsUploadLiveImageResponse.cs +++ /dev/null @@ -1,50 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models -{ - /// - /// 表示 [POST] /apps/upload_live_image 接口的响应。 - /// - public class AppsUploadLiveImageResponse : ByteDanceMicroAppResponse - { - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_no")] - [System.Text.Json.Serialization.JsonPropertyName("err_no")] - public override long ErrorCode { get; set; } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_tips")] - [System.Text.Json.Serialization.JsonPropertyName("err_tips")] - public override string? ErrorMessage { get; set; } - - /// - /// 获取或设置会话密钥。 - /// - [Newtonsoft.Json.JsonProperty("session_key")] - [System.Text.Json.Serialization.JsonPropertyName("session_key")] - public string? SessionKey { get; set; } - - /// - /// 获取或设置用户的 OpenId。 - /// - [Newtonsoft.Json.JsonProperty("openid")] - [System.Text.Json.Serialization.JsonPropertyName("openid")] - public string? OpenId { get; set; } - - /// - /// 获取或设置匿名用户的 OpenId。 - /// - [Newtonsoft.Json.JsonProperty("anonymous_openid")] - [System.Text.Json.Serialization.JsonPropertyName("anonymous_openid")] - public string? AnonymousOpenId { get; set; } - - /// - /// 获取或设置用户的 UnionId。 - /// - [Newtonsoft.Json.JsonProperty("unionid")] - [System.Text.Json.Serialization.JsonPropertyName("unionid")] - public string? UnionId { get; set; } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Message/AppsMessageCustomSendResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Message/AppsMessageCustomSendResponse.cs deleted file mode 100644 index 0de3c774..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Message/AppsMessageCustomSendResponse.cs +++ /dev/null @@ -1,15 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models -{ - /// - /// 表示 [POST] /apps/message/custom/send 接口的响应。 - /// - public class AppsMessageCustomSendResponse : ByteDanceMicroAppResponse - { - /// - /// - /// - [Newtonsoft.Json.JsonProperty("errno")] - [System.Text.Json.Serialization.JsonPropertyName("errno")] - public override long ErrorCode { get; set; } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Order/AppsOrderDeleteResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Order/AppsOrderDeleteResponse.cs deleted file mode 100644 index 34ca6e4a..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Order/AppsOrderDeleteResponse.cs +++ /dev/null @@ -1,29 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models -{ - /// - /// 表示 [POST] /apps/order/delete 接口的响应。 - /// - public class AppsOrderDeleteResponse : ByteDanceMicroAppResponse - { - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_code")] - [System.Text.Json.Serialization.JsonPropertyName("err_code")] - public override long ErrorCode { get; set; } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_msg")] - [System.Text.Json.Serialization.JsonPropertyName("err_msg")] - public override string? ErrorMessage { get; set; } - - /// - /// 获取或设置 JSON 格式的生活服务关联业务推送结果与业务信息。 - /// - [Newtonsoft.Json.JsonProperty("body")] - [System.Text.Json.Serialization.JsonPropertyName("body")] - public string? DataJson { get; set; } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Order/AppsOrderPushV2Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Order/AppsOrderPushV2Response.cs deleted file mode 100644 index 2b14019f..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Order/AppsOrderPushV2Response.cs +++ /dev/null @@ -1,29 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models -{ - /// - /// 表示 [POST] /apps/order/v2/push 接口的响应。 - /// - public class AppsOrderPushV2Response : ByteDanceMicroAppResponse - { - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_code")] - [System.Text.Json.Serialization.JsonPropertyName("err_code")] - public override long ErrorCode { get; set; } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_msg")] - [System.Text.Json.Serialization.JsonPropertyName("err_msg")] - public override string? ErrorMessage { get; set; } - - /// - /// 获取或设置 JSON 格式的生活服务关联业务推送结果与业务信息。 - /// - [Newtonsoft.Json.JsonProperty("body")] - [System.Text.Json.Serialization.JsonPropertyName("body")] - public string? DataJson { get; set; } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Qrcode/AppsQrcodeResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Qrcode/AppsQrcodeResponse.cs deleted file mode 100644 index 5610e836..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Qrcode/AppsQrcodeResponse.cs +++ /dev/null @@ -1,13 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models -{ - /// - /// 表示 [POST] /apps/qrcode 接口的响应。 - /// - public class AppsQrcodeResponse : ByteDanceMicroAppResponse - { - public override bool IsSuccessful() - { - return base.IsSuccessful() && RawBytes?.Length > 0; - } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/ShareConfig/AppsShareConfigResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/ShareConfig/AppsShareConfigResponse.cs deleted file mode 100644 index e2328228..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/ShareConfig/AppsShareConfigResponse.cs +++ /dev/null @@ -1,29 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models -{ - /// - /// 表示 [POST] /apps/share_config 接口的响应。 - /// - public class AppsShareConfigResponse : ByteDanceMicroAppResponse - { - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_no")] - [System.Text.Json.Serialization.JsonPropertyName("err_no")] - public override long ErrorCode { get; set; } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_tips")] - [System.Text.Json.Serialization.JsonPropertyName("err_tips")] - public override string? ErrorMessage { get; set; } - - /// - /// 获取或设置返回的数据。 - /// - [Newtonsoft.Json.JsonProperty("data")] - [System.Text.Json.Serialization.JsonPropertyName("data")] - public string? Data { get; set; } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/SubscribeNotification/AppsSubscribeNotificationDeveloperNotifyV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/SubscribeNotification/AppsSubscribeNotificationDeveloperNotifyV1Response.cs deleted file mode 100644 index 5c1f61db..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/SubscribeNotification/AppsSubscribeNotificationDeveloperNotifyV1Response.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models -{ - /// - /// 表示 [POST] /apps/subscribe_notification/developer/v1/notify 接口的响应。 - /// - public class AppsSubscribeNotificationDeveloperNotifyV1Response : ByteDanceMicroAppResponse - { - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_no")] - [System.Text.Json.Serialization.JsonPropertyName("err_no")] - public override long ErrorCode { get; set; } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_tips")] - [System.Text.Json.Serialization.JsonPropertyName("err_tips")] - public override string? ErrorMessage { get; set; } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/TaskBox/AppsTaskBoxAddTaskResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/TaskBox/AppsTaskBoxAddTaskResponse.cs deleted file mode 100644 index 3cc65cd3..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/TaskBox/AppsTaskBoxAddTaskResponse.cs +++ /dev/null @@ -1,43 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models -{ - /// - /// 表示 [POST] /apps/taskbox/add_task 接口的响应。 - /// - public class AppsTaskBoxAddTaskResponse : ByteDanceMicroAppResponse - { - public static class Types - { - public class Data - { - /// - /// 获取或设置任务 ID。 - /// - [Newtonsoft.Json.JsonProperty("task_id")] - [System.Text.Json.Serialization.JsonPropertyName("task_id")] - [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)] - public long TaskId { get; set; } - } - } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("error")] - [System.Text.Json.Serialization.JsonPropertyName("error")] - public override long ErrorCode { get; set; } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("message")] - [System.Text.Json.Serialization.JsonPropertyName("message")] - public override string? ErrorMessage { get; set; } - - /// - /// 获取或设置返回数据。 - /// - [Newtonsoft.Json.JsonProperty("data")] - [System.Text.Json.Serialization.JsonPropertyName("data")] - public Types.Data Data { get; set; } = default!; - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/TaskBox/AppsTaskBoxQueryAppTaskIdRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/TaskBox/AppsTaskBoxQueryAppTaskIdRequest.cs deleted file mode 100644 index a19d6a74..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/TaskBox/AppsTaskBoxQueryAppTaskIdRequest.cs +++ /dev/null @@ -1,36 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models -{ - /// - /// 表示 [POST] /apps/taskbox/query_app_task_id 接口的请求。 - /// - public class AppsTaskBoxQueryAppTaskIdRequest : ByteDanceMicroAppRequest - { - /// - /// - /// - [Newtonsoft.Json.JsonProperty("access_token")] - [System.Text.Json.Serialization.JsonPropertyName("access_token")] - public override string? AccessToken { get; set; } - - /// - /// 获取或设置小程序的 AppId。如果不指定将使用构造 时的 参数。 - /// - [Newtonsoft.Json.JsonProperty("appid")] - [System.Text.Json.Serialization.JsonPropertyName("appid")] - public string? AppId { get; set; } - - /// - /// 获取或设置创建时间起始时间戳。 - /// - [Newtonsoft.Json.JsonProperty("create_start_time")] - [System.Text.Json.Serialization.JsonPropertyName("create_start_time")] - public long StartCreateTimestamp { get; set; } - - /// - /// 获取或设置创建时间终止时间戳。 - /// - [Newtonsoft.Json.JsonProperty("create_end_time")] - [System.Text.Json.Serialization.JsonPropertyName("create_end_time")] - public long EndCreateTimestamp { get; set; } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/TaskBox/AppsTaskBoxQueryAppTaskIdResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/TaskBox/AppsTaskBoxQueryAppTaskIdResponse.cs deleted file mode 100644 index 52a95987..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/TaskBox/AppsTaskBoxQueryAppTaskIdResponse.cs +++ /dev/null @@ -1,29 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models -{ - /// - /// 表示 [POST] /apps/taskbox/query_app_task_id 接口的响应。 - /// - public class AppsTaskBoxQueryAppTaskIdResponse : ByteDanceMicroAppResponse - { - /// - /// - /// - [Newtonsoft.Json.JsonProperty("error")] - [System.Text.Json.Serialization.JsonPropertyName("error")] - public override long ErrorCode { get; set; } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("message")] - [System.Text.Json.Serialization.JsonPropertyName("message")] - public override string? ErrorMessage { get; set; } - - /// - /// 获取或设置任务 ID 列表。 - /// - [Newtonsoft.Json.JsonProperty("data")] - [System.Text.Json.Serialization.JsonPropertyName("data")] - public long[] TaskIdList { get; set; } = default!; - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/TaskBox/AppsTaskBoxQueryTaskVideoDataRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/TaskBox/AppsTaskBoxQueryTaskVideoDataRequest.cs deleted file mode 100644 index 601c8e6b..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/TaskBox/AppsTaskBoxQueryTaskVideoDataRequest.cs +++ /dev/null @@ -1,45 +0,0 @@ -using System.Collections.Generic; - -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models -{ - /// - /// 表示 [POST] /apps/taskbox/query_task_video_data 接口的请求。 - /// - public class AppsTaskBoxQueryTaskVideoDataRequest : ByteDanceMicroAppRequest - { - /// - /// - /// - [Newtonsoft.Json.JsonProperty("access_token")] - [System.Text.Json.Serialization.JsonPropertyName("access_token")] - public override string? AccessToken { get; set; } - - /// - /// 获取或设置小程序的 AppId。如果不指定将使用构造 时的 参数。 - /// - [Newtonsoft.Json.JsonProperty("appid")] - [System.Text.Json.Serialization.JsonPropertyName("appid")] - public string? AppId { get; set; } - - /// - /// 获取或设置任务 ID 列表。 - /// - [Newtonsoft.Json.JsonProperty("task_ids")] - [System.Text.Json.Serialization.JsonPropertyName("task_ids")] - public IList TaskIdList { get; set; } = new List(); - - /// - /// 获取或设置视频发布时间起始时间戳。 - /// - [Newtonsoft.Json.JsonProperty("video_publish_start_time")] - [System.Text.Json.Serialization.JsonPropertyName("video_publish_start_time")] - public long StartPublishTimestamp { get; set; } - - /// - /// 获取或设置视频发布时间终止时间戳。 - /// - [Newtonsoft.Json.JsonProperty("video_publish_end_time")] - [System.Text.Json.Serialization.JsonPropertyName("video_publish_end_time")] - public long EndPublishTimestamp { get; set; } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/TaskBox/AppsTaskBoxUpdateStatusRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/TaskBox/AppsTaskBoxUpdateStatusRequest.cs deleted file mode 100644 index d567e4d9..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/TaskBox/AppsTaskBoxUpdateStatusRequest.cs +++ /dev/null @@ -1,36 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models -{ - /// - /// 表示 [POST] /apps/taskbox/update/status 接口的请求。 - /// - public class AppsTaskBoxUpdateStatusRequest : ByteDanceMicroAppRequest - { - /// - /// - /// - [Newtonsoft.Json.JsonProperty("access_token")] - [System.Text.Json.Serialization.JsonPropertyName("access_token")] - public override string? AccessToken { get; set; } - - /// - /// 获取或设置任务 ID。 - /// - [Newtonsoft.Json.JsonProperty("task_id")] - [System.Text.Json.Serialization.JsonPropertyName("task_id")] - public long TaskId { get; set; } - - /// - /// 获取或设置任务状态。 - /// - [Newtonsoft.Json.JsonProperty("task_status")] - [System.Text.Json.Serialization.JsonPropertyName("task_status")] - public int TaskStatus { get; set; } - - /// - /// 获取或设置小程序的 AppId。如果不指定将使用构造 时的 参数。 - /// - [Newtonsoft.Json.JsonProperty("appid")] - [System.Text.Json.Serialization.JsonPropertyName("appid")] - public string? AppId { get; set; } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/TaskBox/AppsTaskBoxUpdateStatusResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/TaskBox/AppsTaskBoxUpdateStatusResponse.cs deleted file mode 100644 index 560fe1f8..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/TaskBox/AppsTaskBoxUpdateStatusResponse.cs +++ /dev/null @@ -1,36 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models -{ - /// - /// 表示 [POST] /apps/taskbox/update/status 接口的响应。 - /// - public class AppsTaskBoxUpdateStatusResponse : ByteDanceMicroAppResponse - { - public static class Types - { - public class Data : AppsTaskBoxAddTaskResponse.Types.Data - { - } - } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("error")] - [System.Text.Json.Serialization.JsonPropertyName("error")] - public override long ErrorCode { get; set; } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("message")] - [System.Text.Json.Serialization.JsonPropertyName("message")] - public override string? ErrorMessage { get; set; } - - /// - /// 获取或设置返回数据。 - /// - [Newtonsoft.Json.JsonProperty("data")] - [System.Text.Json.Serialization.JsonPropertyName("data")] - public Types.Data Data { get; set; } = default!; - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/TaskBox/AppsTaskBoxUpdateTaskResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/TaskBox/AppsTaskBoxUpdateTaskResponse.cs deleted file mode 100644 index 5d4e57cf..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/TaskBox/AppsTaskBoxUpdateTaskResponse.cs +++ /dev/null @@ -1,36 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models -{ - /// - /// 表示 [POST] /apps/taskbox/update_task 接口的响应。 - /// - public class AppsTaskBoxUpdateTaskResponse : ByteDanceMicroAppResponse - { - public static class Types - { - public class Data : AppsTaskBoxAddTaskResponse.Types.Data - { - } - } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("error")] - [System.Text.Json.Serialization.JsonPropertyName("error")] - public override long ErrorCode { get; set; } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("message")] - [System.Text.Json.Serialization.JsonPropertyName("message")] - public override string? ErrorMessage { get; set; } - - /// - /// 获取或设置返回数据。 - /// - [Newtonsoft.Json.JsonProperty("data")] - [System.Text.Json.Serialization.JsonPropertyName("data")] - public Types.Data Data { get; set; } = default!; - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/UrlLink/AppsUrlLinkGenerateRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/UrlLink/AppsUrlLinkGenerateRequest.cs deleted file mode 100644 index e3b09320..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/UrlLink/AppsUrlLinkGenerateRequest.cs +++ /dev/null @@ -1,50 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models -{ - /// - /// 表示 [POST] /apps/url_link/generate 接口的请求。 - /// - public class AppsUrlLinkGenerateRequest : ByteDanceMicroAppRequest - { - /// - /// - /// - [Newtonsoft.Json.JsonProperty("access_token")] - [System.Text.Json.Serialization.JsonPropertyName("access_token")] - public override string? AccessToken { get; set; } - - /// - /// 获取或设置小程序的 AppId。如果不指定将使用构造 时的 参数。 - /// - [Newtonsoft.Json.JsonProperty("ma_app_id")] - [System.Text.Json.Serialization.JsonPropertyName("ma_app_id")] - public string? AppId { get; set; } - - /// - /// 获取或设置宿主名称。 - /// - [Newtonsoft.Json.JsonProperty("app_name")] - [System.Text.Json.Serialization.JsonPropertyName("app_name")] - public string AppName { get; set; } = string.Empty; - - /// - /// 获取或设置页面路径。 - /// - [Newtonsoft.Json.JsonProperty("path")] - [System.Text.Json.Serialization.JsonPropertyName("path")] - public string? PagePath { get; set; } - - /// - /// 获取或设置页面查询参数。 - /// - [Newtonsoft.Json.JsonProperty("query")] - [System.Text.Json.Serialization.JsonPropertyName("query")] - public string? QueryString { get; set; } - - /// - /// 获取或设置失效时间戳。 - /// - [Newtonsoft.Json.JsonProperty("expire_time")] - [System.Text.Json.Serialization.JsonPropertyName("expire_time")] - public long ExpireTimestamp { get; set; } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/UrlLink/AppsUrlLinkGenerateResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/UrlLink/AppsUrlLinkGenerateResponse.cs deleted file mode 100644 index cb8a2cab..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/UrlLink/AppsUrlLinkGenerateResponse.cs +++ /dev/null @@ -1,29 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models -{ - /// - /// 表示 [POST] /apps/url_link/generate 接口的响应。 - /// - public class AppsUrlLinkGenerateResponse : ByteDanceMicroAppResponse - { - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_no")] - [System.Text.Json.Serialization.JsonPropertyName("err_no")] - public override long ErrorCode { get; set; } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_tips")] - [System.Text.Json.Serialization.JsonPropertyName("err_tips")] - public override string? ErrorMessage { get; set; } - - /// - /// 获取或设置分享链接。 - /// - [Newtonsoft.Json.JsonProperty("url_link")] - [System.Text.Json.Serialization.JsonPropertyName("url_link")] - public string UrlLink { get; set; } = default!; - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/UrlLink/AppsUrlLinkQueryInfoRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/UrlLink/AppsUrlLinkQueryInfoRequest.cs deleted file mode 100644 index 851841de..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/UrlLink/AppsUrlLinkQueryInfoRequest.cs +++ /dev/null @@ -1,29 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models -{ - /// - /// 表示 [POST] /apps/url_link/query_info 接口的请求。 - /// - public class AppsUrlLinkQueryInfoRequest : ByteDanceMicroAppRequest - { - /// - /// - /// - [Newtonsoft.Json.JsonProperty("access_token")] - [System.Text.Json.Serialization.JsonPropertyName("access_token")] - public override string? AccessToken { get; set; } - - /// - /// 获取或设置小程序的 AppId。如果不指定将使用构造 时的 参数。 - /// - [Newtonsoft.Json.JsonProperty("ma_app_id")] - [System.Text.Json.Serialization.JsonPropertyName("ma_app_id")] - public string? AppId { get; set; } - - /// - /// 获取或设置分享链接。 - /// - [Newtonsoft.Json.JsonProperty("url_link")] - [System.Text.Json.Serialization.JsonPropertyName("url_link")] - public string? UrlLink { get; set; } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/UrlLink/AppsUrlLinkQueryInfoResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/UrlLink/AppsUrlLinkQueryInfoResponse.cs deleted file mode 100644 index db2e204c..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/UrlLink/AppsUrlLinkQueryInfoResponse.cs +++ /dev/null @@ -1,84 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models -{ - /// - /// 表示 [POST] /apps/url_link/query_info 接口的响应。 - /// - public class AppsUrlLinkQueryInfoResponse : ByteDanceMicroAppResponse - { - public static class Types - { - public class UrlLinkInfo - { - /// - /// 获取或设置小程序的 AppId。 - /// - [Newtonsoft.Json.JsonProperty("ma_app_id")] - [System.Text.Json.Serialization.JsonPropertyName("ma_app_id")] - public string AppId { get; set; } = default!; - - /// - /// 获取或设置分享链接。 - /// - [Newtonsoft.Json.JsonProperty("url_link")] - [System.Text.Json.Serialization.JsonPropertyName("url_link")] - public string UrlLink { get; set; } = default!; - - /// - /// 获取或设置宿主名称。 - /// - [Newtonsoft.Json.JsonProperty("app_name")] - [System.Text.Json.Serialization.JsonPropertyName("app_name")] - public string AppName { get; set; } = default!; - - /// - /// 获取或设置页面路径。 - /// - [Newtonsoft.Json.JsonProperty("path")] - [System.Text.Json.Serialization.JsonPropertyName("path")] - public string? PagePath { get; set; } - - /// - /// 获取或设置页面查询参数。 - /// - [Newtonsoft.Json.JsonProperty("query")] - [System.Text.Json.Serialization.JsonPropertyName("query")] - public string? QueryString { get; set; } - - /// - /// 获取或设置生成时间戳。 - /// - [Newtonsoft.Json.JsonProperty("create_time")] - [System.Text.Json.Serialization.JsonPropertyName("create_time")] - public long CreateTimestamp { get; set; } - - /// - /// 获取或设置失效时间戳。 - /// - [Newtonsoft.Json.JsonProperty("expire_time")] - [System.Text.Json.Serialization.JsonPropertyName("expire_time")] - public long ExpireTimestamp { get; set; } - } - } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_no")] - [System.Text.Json.Serialization.JsonPropertyName("err_no")] - public override long ErrorCode { get; set; } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_tips")] - [System.Text.Json.Serialization.JsonPropertyName("err_tips")] - public override string? ErrorMessage { get; set; } - - /// - /// 获取或设置分享链接信息。 - /// - [Newtonsoft.Json.JsonProperty("url_link_info")] - [System.Text.Json.Serialization.JsonPropertyName("url_link_info")] - public Types.UrlLinkInfo UrlLinkInfo { get; set; } = default!; - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/UrlLink/AppsUrlLinkQueryQuotaRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/UrlLink/AppsUrlLinkQueryQuotaRequest.cs deleted file mode 100644 index 7462c44b..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/UrlLink/AppsUrlLinkQueryQuotaRequest.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models -{ - /// - /// 表示 [POST] /apps/url_link/query_quota 接口的请求。 - /// - public class AppsUrlLinkQueryQuotaRequest : ByteDanceMicroAppRequest - { - /// - /// - /// - [Newtonsoft.Json.JsonProperty("access_token")] - [System.Text.Json.Serialization.JsonPropertyName("access_token")] - public override string? AccessToken { get; set; } - - /// - /// 获取或设置小程序的 AppId。如果不指定将使用构造 时的 参数。 - /// - [Newtonsoft.Json.JsonProperty("ma_app_id")] - [System.Text.Json.Serialization.JsonPropertyName("ma_app_id")] - public string? AppId { get; set; } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/UrlLink/AppsUrlLinkQueryQuotaResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/UrlLink/AppsUrlLinkQueryQuotaResponse.cs deleted file mode 100644 index 5d933b66..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/UrlLink/AppsUrlLinkQueryQuotaResponse.cs +++ /dev/null @@ -1,49 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models -{ - /// - /// 表示 [POST] /apps/url_link/query_quota 接口的响应。 - /// - public class AppsUrlLinkQueryQuotaResponse : ByteDanceMicroAppResponse - { - public static class Types - { - public class UrlLinkQuota - { - /// - /// 获取或设置已生成次数。 - /// - [Newtonsoft.Json.JsonProperty("url_link_used")] - [System.Text.Json.Serialization.JsonPropertyName("url_link_used")] - public int UsedCount { get; set; } - - /// - /// 获取或设置次数上限。 - /// - [Newtonsoft.Json.JsonProperty("url_link_limit")] - [System.Text.Json.Serialization.JsonPropertyName("url_link_limit")] - public int LimitCount { get; set; } - } - } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_no")] - [System.Text.Json.Serialization.JsonPropertyName("err_no")] - public override long ErrorCode { get; set; } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_tips")] - [System.Text.Json.Serialization.JsonPropertyName("err_tips")] - public override string? ErrorMessage { get; set; } - - /// - /// 获取或设置分享配额息。 - /// - [Newtonsoft.Json.JsonProperty("url_link_quota")] - [System.Text.Json.Serialization.JsonPropertyName("url_link_quota")] - public Types.UrlLinkQuota UrlLinkQuota { get; set; } = default!; - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Video/AppsConvertOpenItemIdToEncryptIdRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Video/AppsConvertOpenItemIdToEncryptIdRequest.cs deleted file mode 100644 index 979e9343..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Video/AppsConvertOpenItemIdToEncryptIdRequest.cs +++ /dev/null @@ -1,24 +0,0 @@ -using System.Collections.Generic; - -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models -{ - /// - /// 表示 [POST] /apps/convert_video_id/open_item_id_to_encrypt_id 接口的请求。 - /// - public class AppsConvertOpenItemIdToEncryptIdRequest : ByteDanceMicroAppRequest - { - /// - /// 获取或设置访问密钥。 - /// - [Newtonsoft.Json.JsonProperty("access_key")] - [System.Text.Json.Serialization.JsonPropertyName("access_key")] - public string AccessKey { get; set; } = string.Empty; - - /// - /// 获取或设置视频 ItemId 列表。 - /// - [Newtonsoft.Json.JsonProperty("video_ids")] - [System.Text.Json.Serialization.JsonPropertyName("video_ids")] - public IList OpenItemIdList { get; set; } = new List(); - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Video/AppsConvertOpenItemIdToEncryptIdResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Video/AppsConvertOpenItemIdToEncryptIdResponse.cs deleted file mode 100644 index d41b31ef..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Video/AppsConvertOpenItemIdToEncryptIdResponse.cs +++ /dev/null @@ -1,44 +0,0 @@ -using System.Collections.Generic; - -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models -{ - /// - /// 表示 [POST] /apps/convert_video_id/open_item_id_to_encrypt_id 接口的响应。 - /// - public class AppsConvertOpenItemIdToEncryptIdResponse : ByteDanceMicroAppResponse - { - public static class Types - { - public class Data - { - /// - /// 获取或设置转换结果字典。 - /// - [Newtonsoft.Json.JsonProperty("convert_result")] - [System.Text.Json.Serialization.JsonPropertyName("convert_result")] - public Dictionary Result { get; set; } = default!; - } - } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_no")] - [System.Text.Json.Serialization.JsonPropertyName("err_no")] - public override long ErrorCode { get; set; } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_tips")] - [System.Text.Json.Serialization.JsonPropertyName("err_tips")] - public override string? ErrorMessage { get; set; } - - /// - /// 获取或设置返回的数据。 - /// - [Newtonsoft.Json.JsonProperty("data")] - [System.Text.Json.Serialization.JsonPropertyName("data")] - public Types.Data Data { get; set; } = default!; - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Video/AppsConvertVideoIdToOpenItemIdRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Video/AppsConvertVideoIdToOpenItemIdRequest.cs deleted file mode 100644 index 661aaf58..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Video/AppsConvertVideoIdToOpenItemIdRequest.cs +++ /dev/null @@ -1,38 +0,0 @@ -using System.Collections.Generic; - -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models -{ - /// - /// 表示 [POST] /apps/convert_video_id/video_id_to_open_item_id 接口的请求。 - /// - public class AppsConvertVideoIdToOpenItemIdRequest : ByteDanceMicroAppRequest - { - /// - /// - /// - [Newtonsoft.Json.JsonProperty("access_token")] - [System.Text.Json.Serialization.JsonPropertyName("access_token")] - public override string? AccessToken { get; set; } - - /// - /// 获取或设置小程序的 AppId。如果不指定将使用构造 时的 参数。 - /// - [Newtonsoft.Json.JsonProperty("app_id")] - [System.Text.Json.Serialization.JsonPropertyName("app_id")] - public string? AppId { get; set; } - - /// - /// 获取或设置访问密钥。 - /// - [Newtonsoft.Json.JsonProperty("access_key")] - [System.Text.Json.Serialization.JsonPropertyName("access_key")] - public string AccessKey { get; set; } = string.Empty; - - /// - /// 获取或设置视频 ID 列表。 - /// - [Newtonsoft.Json.JsonProperty("video_ids")] - [System.Text.Json.Serialization.JsonPropertyName("video_ids")] - public IList VideoIdList { get; set; } = new List(); - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Video/AppsConvertVideoIdToOpenItemIdResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Video/AppsConvertVideoIdToOpenItemIdResponse.cs deleted file mode 100644 index 5293a911..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Video/AppsConvertVideoIdToOpenItemIdResponse.cs +++ /dev/null @@ -1,44 +0,0 @@ -using System.Collections.Generic; - -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models -{ - /// - /// 表示 [POST] /apps/convert_video_id/video_id_to_open_item_id 接口的响应。 - /// - public class AppsConvertVideoIdToOpenItemIdResponse : ByteDanceMicroAppResponse - { - public static class Types - { - public class Data - { - /// - /// 获取或设置转换结果字典。 - /// - [Newtonsoft.Json.JsonProperty("convert_result")] - [System.Text.Json.Serialization.JsonPropertyName("convert_result")] - public Dictionary Result { get; set; } = default!; - } - } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_no")] - [System.Text.Json.Serialization.JsonPropertyName("err_no")] - public override long ErrorCode { get; set; } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_tips")] - [System.Text.Json.Serialization.JsonPropertyName("err_tips")] - public override string? ErrorMessage { get; set; } - - /// - /// 获取或设置返回的数据。 - /// - [Newtonsoft.Json.JsonProperty("data")] - [System.Text.Json.Serialization.JsonPropertyName("data")] - public Types.Data Data { get; set; } = default!; - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsAdPlacement/AppsAdPlacementAddV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsAdPlacement/AppsAdPlacementAddV1Request.cs new file mode 100644 index 00000000..05dcce33 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsAdPlacement/AppsAdPlacementAddV1Request.cs @@ -0,0 +1,22 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/v1/ad_placement/add/ 接口的请求。 + /// + public class AppsAdPlacementAddV1Request : DouyinMicroAppRequest + { + /// + /// 获取或设置广告位名称。 + /// + [Newtonsoft.Json.JsonProperty("ad_placement_name")] + [System.Text.Json.Serialization.JsonPropertyName("ad_placement_name")] + public string AdPlacementName { get; set; } = string.Empty; + + /// + /// 获取或设置广告位类型。 + /// + [Newtonsoft.Json.JsonProperty("ad_placement_type")] + [System.Text.Json.Serialization.JsonPropertyName("ad_placement_type")] + public int AdPlacementType { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsAdPlacement/AppsAdPlacementAddV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsAdPlacement/AppsAdPlacementAddV1Response.cs new file mode 100644 index 00000000..71f53e53 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsAdPlacement/AppsAdPlacementAddV1Response.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/v1/ad_placement/add/ 接口的响应。 + /// + public class AppsAdPlacementAddV1Response : DouyinMicroAppResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsAdPlacement/AppsAdPlacementQueryV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsAdPlacement/AppsAdPlacementQueryV1Request.cs new file mode 100644 index 00000000..d0f0eefb --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsAdPlacement/AppsAdPlacementQueryV1Request.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [GET] /apps/v1/ad_placement/query/ 接口的请求。 + /// + public class AppsAdPlacementQueryV1Request : DouyinMicroAppRequest + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsAdPlacement/AppsAdPlacementQueryV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsAdPlacement/AppsAdPlacementQueryV1Response.cs new file mode 100644 index 00000000..0c0b5262 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsAdPlacement/AppsAdPlacementQueryV1Response.cs @@ -0,0 +1,62 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [GET] /apps/v1/ad_placement/query/ 接口的响应。 + /// + public class AppsAdPlacementQueryV1Response : DouyinMicroAppResponse + { + public static class Types + { + public class Data + { + public static class Types + { + public class AdPlacement + { + /// + /// 获取或设置广告位 ID。 + /// + [Newtonsoft.Json.JsonProperty("ad_placement_id")] + [System.Text.Json.Serialization.JsonPropertyName("ad_placement_id")] + public string AdPlacementId { get; set; } = default!; + + /// + /// 获取或设置广告位名称。 + /// + [Newtonsoft.Json.JsonProperty("ad_placement_name")] + [System.Text.Json.Serialization.JsonPropertyName("ad_placement_name")] + public string AdPlacementName { get; set; } = default!; + + /// + /// 获取或设置广告位类型。 + /// + [Newtonsoft.Json.JsonProperty("ad_placement_type")] + [System.Text.Json.Serialization.JsonPropertyName("ad_placement_type")] + public int AdPlacementType { get; set; } + + /// + /// 获取或设置状态。 + /// + [Newtonsoft.Json.JsonProperty("status")] + [System.Text.Json.Serialization.JsonPropertyName("status")] + public int Status { get; set; } + } + } + + /// + /// 获取或设置广告位列表。 + /// + [Newtonsoft.Json.JsonProperty("ad_placement_list")] + [System.Text.Json.Serialization.JsonPropertyName("ad_placement_list")] + public Types.AdPlacement[] AdPlacementList { get; set; } = default!; + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsAdPlacement/AppsAdPlacementUpdateV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsAdPlacement/AppsAdPlacementUpdateV1Request.cs new file mode 100644 index 00000000..313c8fa4 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsAdPlacement/AppsAdPlacementUpdateV1Request.cs @@ -0,0 +1,22 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/v1/ad_placement/update/ 接口的请求。 + /// + public class AppsAdPlacementUpdateV1Request : DouyinMicroAppRequest + { + /// + /// 获取或设置广告位 ID。 + /// + [Newtonsoft.Json.JsonProperty("ad_placement_id")] + [System.Text.Json.Serialization.JsonPropertyName("ad_placement_id")] + public string AdPlacementId { get; set; } = string.Empty; + + /// + /// 获取或设置状态。 + /// + [Newtonsoft.Json.JsonProperty("status")] + [System.Text.Json.Serialization.JsonPropertyName("status")] + public int Status { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsAdPlacement/AppsAdPlacementUpdateV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsAdPlacement/AppsAdPlacementUpdateV1Response.cs new file mode 100644 index 00000000..9ca7ea3e --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsAdPlacement/AppsAdPlacementUpdateV1Response.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/v1/ad_placement/update/ 接口的响应。 + /// + public class AppsAdPlacementUpdateV1Response : DouyinMicroAppResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/AwemeBind/AppsCapacityBindAwemeRelationV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/AwemeBind/AppsCapacityBindAwemeRelationV1Request.cs new file mode 100644 index 00000000..41be4639 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/AwemeBind/AppsCapacityBindAwemeRelationV1Request.cs @@ -0,0 +1,239 @@ +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/v1/capacity/bind_aweme_relation/ 接口的请求。 + /// + public class AppsCapacityBindAwemeRelationV1Request : DouyinMicroAppRequest + { + public static class Types + { + public class TemplateInfo + { + public static class Types + { + public class TemplateContent + { + /// + /// 获取或设置资质名称。 + /// + [Newtonsoft.Json.JsonProperty("name")] + [System.Text.Json.Serialization.JsonPropertyName("name")] + public string Name { get; set; } = string.Empty; + + /// + /// 获取或设置上传材料 MaterielId。 + /// + [Newtonsoft.Json.JsonProperty("materiel_id")] + [System.Text.Json.Serialization.JsonPropertyName("materiel_id")] + public string? MaterielId { get; set; } + + /// + /// 获取或设置类型。 + /// + [Newtonsoft.Json.JsonProperty("val_type")] + [System.Text.Json.Serialization.JsonPropertyName("val_type")] + public int? ValueType { get; set; } + + /// + /// 获取或设置内容列表。 + /// + [Newtonsoft.Json.JsonProperty("val_list")] + [System.Text.Json.Serialization.JsonPropertyName("val_list")] + public IList? ValueList { get; set; } + + /// + /// 获取或设置拒绝原因。 + /// + [Newtonsoft.Json.JsonProperty("reject_reason")] + [System.Text.Json.Serialization.JsonPropertyName("reject_reason")] + public string? RejectReason { get; set; } + } + } + + /// + /// 获取或设置模版 ID。 + /// + [Newtonsoft.Json.JsonProperty("id")] + [System.Text.Json.Serialization.JsonPropertyName("id")] + [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)] + public long TemplateId { get; set; } + + /// + /// 获取或设置模版标题。 + /// + [Newtonsoft.Json.JsonProperty("title")] + [System.Text.Json.Serialization.JsonPropertyName("title")] + public string? Title { get; set; } + + /// + /// 获取或设置内容列表。 + /// + [Newtonsoft.Json.JsonProperty("template_content")] + [System.Text.Json.Serialization.JsonPropertyName("template_content")] + public IList TemplateContentList { get; set; } = new List(); + } + + public class CooperationInfo + { + /// + /// 获取或设置合作类型。 + /// + [Newtonsoft.Json.JsonProperty("cooperation_type")] + [System.Text.Json.Serialization.JsonPropertyName("cooperation_type")] + public string CooperationType { get; set; } = string.Empty; + + /// + /// 获取或设置关系过期时间戳。 + /// + [Newtonsoft.Json.JsonProperty("relation_expire_date")] + [System.Text.Json.Serialization.JsonPropertyName("relation_expire_date")] + public long RelationExpireTimestamp { get; set; } + + /// + /// 获取或设置公司名称。 + /// + [Newtonsoft.Json.JsonProperty("company_name")] + [System.Text.Json.Serialization.JsonPropertyName("company_name")] + public string? CompanyName { get; set; } + + /// + /// 获取或设置营业执照编号。 + /// + [Newtonsoft.Json.JsonProperty("business_license_code")] + [System.Text.Json.Serialization.JsonPropertyName("business_license_code")] + public string? BusinessLicenseNumber { get; set; } + + /// + /// 获取或设置真实姓名。 + /// + [Newtonsoft.Json.JsonProperty("real_name")] + [System.Text.Json.Serialization.JsonPropertyName("real_name")] + public string? RealName { get; set; } + + /// + /// 获取或设置身份证号。 + /// + [Newtonsoft.Json.JsonProperty("identity_number")] + [System.Text.Json.Serialization.JsonPropertyName("identity_number")] + public string? IdCardNumber { get; set; } + + /// + /// 获取或设置合作合同照片 MaterielId。 + /// + [Newtonsoft.Json.JsonProperty("contract_image")] + [System.Text.Json.Serialization.JsonPropertyName("contract_image")] + public string? ContractImageMaterielId { get; set; } + + /// + /// 获取或设置合作合同照片 MaterielId 列表。 + /// + [Newtonsoft.Json.JsonProperty("contract_image_list")] + [System.Text.Json.Serialization.JsonPropertyName("contract_image_list")] + public IList? ContractImageMaterielIdList { get; set; } + } + + public class EmployeeInfo + { + /// + /// 获取或设置关系过期时间戳。 + /// + [Newtonsoft.Json.JsonProperty("relation_expire_date")] + [System.Text.Json.Serialization.JsonPropertyName("relation_expire_date")] + public long RelationExpireTimestamp { get; set; } + + /// + /// 获取或设置真实姓名。 + /// + [Newtonsoft.Json.JsonProperty("real_name")] + [System.Text.Json.Serialization.JsonPropertyName("real_name")] + public string RealName { get; set; } = string.Empty; + + /// + /// 获取或设置身份证号。 + /// + [Newtonsoft.Json.JsonProperty("identity_number")] + [System.Text.Json.Serialization.JsonPropertyName("identity_number")] + public string IdCardNumber { get; set; } = string.Empty; + + /// + /// 获取或设置劳动合同照片 MaterielId。 + /// + [Newtonsoft.Json.JsonProperty("contract_image")] + [System.Text.Json.Serialization.JsonPropertyName("contract_image")] + public string? ContractImageMaterielId { get; set; } + + /// + /// 获取或设置劳动合同照片 MaterielId 列表。 + /// + [Newtonsoft.Json.JsonProperty("contract_image_list")] + [System.Text.Json.Serialization.JsonPropertyName("contract_image_list")] + public IList? ContractImageMaterielIdList { get; set; } + + /// + /// 获取或设置资质类型。 + /// + [Newtonsoft.Json.JsonProperty("qualification_type")] + [System.Text.Json.Serialization.JsonPropertyName("qualification_type")] + public string? QualificationType { get; set; } + + /// + /// 获取或设置资质材料 MaterielId 列表。 + /// + [Newtonsoft.Json.JsonProperty("qualification_image_list")] + [System.Text.Json.Serialization.JsonPropertyName("qualification_image_list")] + public IList? QualificationImageMaterielIdList { get; set; } + } + } + + /// + /// 获取或设置抖音号。 + /// + [Newtonsoft.Json.JsonProperty("aweme_id")] + [System.Text.Json.Serialization.JsonPropertyName("aweme_id")] + public string AwemeId { get; set; } = string.Empty; + + /// + /// 获取或设置绑定类型。 + /// + [Newtonsoft.Json.JsonProperty("type")] + [System.Text.Json.Serialization.JsonPropertyName("type")] + public string Type { get; set; } = string.Empty; + + /// + /// 获取或设置绑定能力标识列表。 + /// + [Newtonsoft.Json.JsonProperty("capacity_list")] + [System.Text.Json.Serialization.JsonPropertyName("capacity_list")] + public IList CapacityKeyList { get; set; } = new List(); + + /// + /// 获取或设置是否相同主体。 + /// + [Newtonsoft.Json.JsonProperty("co_subject")] + [System.Text.Json.Serialization.JsonPropertyName("co_subject")] + public bool? IsCoSubject { get; set; } + + /// + /// 获取或设置是否相同主体。 + /// + [Newtonsoft.Json.JsonProperty("audit_template_info")] + [System.Text.Json.Serialization.JsonPropertyName("audit_template_info")] + public IDictionary AuditTemplateInfoMap { get; set; } = new Dictionary(); + + /// + /// 获取或设置合作号信息。 + /// + [Newtonsoft.Json.JsonProperty("cooperation_info")] + [System.Text.Json.Serialization.JsonPropertyName("cooperation_info")] + public Types.CooperationInfo? CooperationInfo { get; set; } + + /// + /// 获取或设置员工号信息。 + /// + [Newtonsoft.Json.JsonProperty("employee_info")] + [System.Text.Json.Serialization.JsonPropertyName("employee_info")] + public Types.EmployeeInfo? EmployeeInfo { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/AwemeBind/AppsCapacityBindAwemeRelationV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/AwemeBind/AppsCapacityBindAwemeRelationV1Response.cs new file mode 100644 index 00000000..ebe6805e --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/AwemeBind/AppsCapacityBindAwemeRelationV1Response.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/v1/capacity/bind_aweme_relation/ 接口的响应。 + /// + public class AppsCapacityBindAwemeRelationV1Response : DouyinMicroAppResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/AwemeBind/AppsCapacityGetAwemeBindTemplateInfoV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/AwemeBind/AppsCapacityGetAwemeBindTemplateInfoV1Request.cs new file mode 100644 index 00000000..896e2ca6 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/AwemeBind/AppsCapacityGetAwemeBindTemplateInfoV1Request.cs @@ -0,0 +1,31 @@ +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/v1/capacity/get_aweme_bind_template_info/ 接口的请求。 + /// + public class AppsCapacityGetAwemeBindTemplateInfoV1Request : DouyinMicroAppRequest + { + /// + /// 获取或设置抖音号。 + /// + [Newtonsoft.Json.JsonProperty("aweme_id")] + [System.Text.Json.Serialization.JsonPropertyName("aweme_id")] + public string AwemeId { get; set; } = string.Empty; + + /// + /// 获取或设置绑定类型。 + /// + [Newtonsoft.Json.JsonProperty("type")] + [System.Text.Json.Serialization.JsonPropertyName("type")] + public string Type { get; set; } = string.Empty; + + /// + /// 获取或设置资质模版 ID 列表。 + /// + [Newtonsoft.Json.JsonProperty("template_id")] + [System.Text.Json.Serialization.JsonPropertyName("template_id")] + public IList TemplateIdList { get; set; } = new List(); + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/AwemeBind/AppsCapacityGetAwemeBindTemplateInfoV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/AwemeBind/AppsCapacityGetAwemeBindTemplateInfoV1Response.cs new file mode 100644 index 00000000..2da30f94 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/AwemeBind/AppsCapacityGetAwemeBindTemplateInfoV1Response.cs @@ -0,0 +1,127 @@ +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/v1/capacity/get_aweme_bind_template_info/ 接口的响应。 + /// + public class AppsCapacityGetAwemeBindTemplateInfoV1Response : DouyinMicroAppResponse + { + public static class Types + { + public class Data + { + public static class Types + { + public class TemplateInfo + { + public static class Types + { + public class TemplateContent + { + /// + /// 获取或设置资质名称。 + /// + [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("mainTitle")] + [System.Text.Json.Serialization.JsonPropertyName("mainTitle")] + public string? MainTitle { get; set; } + + /// + /// 获取或设置上传材料 MaterielId。 + /// + [Newtonsoft.Json.JsonProperty("materiel_id")] + [System.Text.Json.Serialization.JsonPropertyName("materiel_id")] + public string? MaterielId { get; set; } + + /// + /// 获取或设置类型。 + /// + [Newtonsoft.Json.JsonProperty("val_type")] + [System.Text.Json.Serialization.JsonPropertyName("val_type")] + public int? ValueType { get; set; } + + /// + /// 获取或设置内容列表。 + /// + [Newtonsoft.Json.JsonProperty("val_list")] + [System.Text.Json.Serialization.JsonPropertyName("val_list")] + public string[]? ValueList { get; set; } + + /// + /// 获取或设置选择项列表。 + /// + [Newtonsoft.Json.JsonProperty("val_example")] + [System.Text.Json.Serialization.JsonPropertyName("val_example")] + public string[]? ValueExampleList { get; set; } + + /// + /// 获取或设置拒绝原因。 + /// + [Newtonsoft.Json.JsonProperty("reject_reason")] + [System.Text.Json.Serialization.JsonPropertyName("reject_reason")] + public string? RejectReason { get; set; } + } + } + + /// + /// 获取或设置模版 ID。 + /// + [Newtonsoft.Json.JsonProperty("id")] + [System.Text.Json.Serialization.JsonPropertyName("id")] + [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)] + public long TemplateId { get; set; } + + /// + /// 获取或设置模版标题。 + /// + [Newtonsoft.Json.JsonProperty("title")] + [System.Text.Json.Serialization.JsonPropertyName("title")] + public string Title { get; set; } = default!; + + /// + /// 获取或设置模版描述。 + /// + [Newtonsoft.Json.JsonProperty("desc")] + [System.Text.Json.Serialization.JsonPropertyName("desc")] + public string Description { get; set; } = default!; + + /// + /// 获取或设置内容列表。 + /// + [Newtonsoft.Json.JsonProperty("template_content")] + [System.Text.Json.Serialization.JsonPropertyName("template_content")] + public Types.TemplateContent[] TemplateContentList { get; set; } = default!; + } + } + + /// + /// 获取或设置资质模版字典。 + /// + [Newtonsoft.Json.JsonProperty("template_info")] + [System.Text.Json.Serialization.JsonPropertyName("template_info")] + public IDictionary TemplateInfoMap { get; set; } = default!; + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/AwemeBind/AppsCapacityGetAwemeBindTemplateListV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/AwemeBind/AppsCapacityGetAwemeBindTemplateListV1Request.cs new file mode 100644 index 00000000..e2000705 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/AwemeBind/AppsCapacityGetAwemeBindTemplateListV1Request.cs @@ -0,0 +1,31 @@ +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/v1/capacity/get_aweme_bind_template_list/ 接口的请求。 + /// + public class AppsCapacityGetAwemeBindTemplateListV1Request : DouyinMicroAppRequest + { + /// + /// 获取或设置抖音号。 + /// + [Newtonsoft.Json.JsonProperty("aweme_id")] + [System.Text.Json.Serialization.JsonPropertyName("aweme_id")] + public string AwemeId { get; set; } = string.Empty; + + /// + /// 获取或设置绑定类型。 + /// + [Newtonsoft.Json.JsonProperty("type")] + [System.Text.Json.Serialization.JsonPropertyName("type")] + public string Type { get; set; } = string.Empty; + + /// + /// 获取或设置绑定能力标识列表。 + /// + [Newtonsoft.Json.JsonProperty("capacity_list")] + [System.Text.Json.Serialization.JsonPropertyName("capacity_list")] + public IList CapacityKeyList { get; set; } = new List(); + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/AwemeBind/AppsCapacityGetAwemeBindTemplateListV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/AwemeBind/AppsCapacityGetAwemeBindTemplateListV1Response.cs new file mode 100644 index 00000000..9f0a66e1 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/AwemeBind/AppsCapacityGetAwemeBindTemplateListV1Response.cs @@ -0,0 +1,79 @@ +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/v1/capacity/get_aweme_bind_template_list/ 接口的响应。 + /// + public class AppsCapacityGetAwemeBindTemplateListV1Response : DouyinMicroAppResponse + { + public static class Types + { + public class Data + { + public static class Types + { + public class TemplateInfo + { + /// + /// 获取或设置模版 ID。 + /// + [Newtonsoft.Json.JsonProperty("template_id")] + [System.Text.Json.Serialization.JsonPropertyName("template_id")] + [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)] + public long TemplateId { get; set; } + + /// + /// 获取或设置模版标题。 + /// + [Newtonsoft.Json.JsonProperty("title")] + [System.Text.Json.Serialization.JsonPropertyName("title")] + public string Title { get; set; } = default!; + + /// + /// 获取或设置所属的类目 ID。 + /// + [Newtonsoft.Json.JsonProperty("category_id")] + [System.Text.Json.Serialization.JsonPropertyName("category_id")] + public string CategoryId { get; set; } = default!; + + /// + /// 获取或设置所属的类目名称。 + /// + [Newtonsoft.Json.JsonProperty("category_name")] + [System.Text.Json.Serialization.JsonPropertyName("category_name")] + public string CategoryName { get; set; } = default!; + + /// + /// 获取或设置是否可以使用。 + /// + [Newtonsoft.Json.JsonProperty("can_apply")] + [System.Text.Json.Serialization.JsonPropertyName("can_apply")] + public bool CanApply { get; set; } + + /// + /// 获取或设置不可使用的原因。 + /// + [Newtonsoft.Json.JsonProperty("reason")] + [System.Text.Json.Serialization.JsonPropertyName("reason")] + public string? Reason { get; set; } + } + } + + /// + /// 获取或设置资质模版字典。 + /// + [Newtonsoft.Json.JsonProperty("template_map")] + [System.Text.Json.Serialization.JsonPropertyName("template_map")] + public IDictionary TemplateInfoMap { get; set; } = default!; + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/AwemeBind/AppsCapacityGetAwemeRelationBindQrcodeV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/AwemeBind/AppsCapacityGetAwemeRelationBindQrcodeV1Request.cs new file mode 100644 index 00000000..01af1244 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/AwemeBind/AppsCapacityGetAwemeRelationBindQrcodeV1Request.cs @@ -0,0 +1,31 @@ +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [GET] /apps/v1/capacity/get_aweme_relation_bind_qrcode/ 接口的请求。 + /// + public class AppsCapacityGetAwemeRelationBindQrcodeV1Request : DouyinMicroAppRequest + { + /// + /// 获取或设置绑定类型。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string Type { get; set; } = string.Empty; + + /// + /// 获取或设置绑定能力标识列表。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public IList CapacityKeyList { get; set; } = new List(); + + /// + /// 获取或设置是否相同主体。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public bool? IsCoSubject { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/AwemeBind/AppsCapacityGetAwemeRelationBindQrcodeV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/AwemeBind/AppsCapacityGetAwemeRelationBindQrcodeV1Response.cs new file mode 100644 index 00000000..e9d6c849 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/AwemeBind/AppsCapacityGetAwemeRelationBindQrcodeV1Response.cs @@ -0,0 +1,35 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [GET] /apps/v1/capacity/get_aweme_relation_bind_qrcode/ 接口的响应。 + /// + public class AppsCapacityGetAwemeRelationBindQrcodeV1Response : DouyinMicroAppResponse + { + public static class Types + { + public class Data + { + /// + /// 获取或设置二维码图片 URL。 + /// + [Newtonsoft.Json.JsonProperty("qrcode_url")] + [System.Text.Json.Serialization.JsonPropertyName("qrcode_url")] + public string QrcodeUrl { get; set; } = default!; + + /// + /// 获取或设置二维码数据。 + /// + [Newtonsoft.Json.JsonProperty("qrcode_parse_content")] + [System.Text.Json.Serialization.JsonPropertyName("qrcode_parse_content")] + public string QrcodeData { get; set; } = default!; + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/AwemeBind/AppsCapacityQueryAwemeRelationListV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/AwemeBind/AppsCapacityQueryAwemeRelationListV1Request.cs new file mode 100644 index 00000000..d41b0a23 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/AwemeBind/AppsCapacityQueryAwemeRelationListV1Request.cs @@ -0,0 +1,31 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [GET] /apps/v1/capacity/query_aweme_relation_list/ 接口的请求。 + /// + public class AppsCapacityQueryAwemeRelationListV1Request : DouyinMicroAppRequest + { + /// + /// 获取或设置绑定类型。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string Type { get; set; } = string.Empty; + + /// + /// 获取或设置分页页数。 + /// 默认值:1 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public int PageNumber { get; set; } = 1; + + /// + /// 获取或设置分页每页数量。 + /// 默认值:10 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public int PageSize { get; set; } = 10; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/AwemeBind/AppsCapacityQueryAwemeRelationListV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/AwemeBind/AppsCapacityQueryAwemeRelationListV1Response.cs new file mode 100644 index 00000000..980f7c91 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/AwemeBind/AppsCapacityQueryAwemeRelationListV1Response.cs @@ -0,0 +1,111 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [GET] /apps/v1/capacity/query_aweme_relation_list/ 接口的响应。 + /// + public class AppsCapacityQueryAwemeRelationListV1Response : DouyinMicroAppResponse + { + public static class Types + { + public class Data + { + public static class Types + { + public class AwemeRelation + { + public static class Types + { + public class Capacity + { + /// + /// 获取或设置能力标识。 + /// + [Newtonsoft.Json.JsonProperty("capacity_key")] + [System.Text.Json.Serialization.JsonPropertyName("capacity_key")] + public string CapacityKey { get; set; } = default!; + + /// + /// 获取或设置绑定状态。 + /// + [Newtonsoft.Json.JsonProperty("status")] + [System.Text.Json.Serialization.JsonPropertyName("status")] + public int Status { get; set; } + + /// + /// 获取或设置绑定失败原因。 + /// + [Newtonsoft.Json.JsonProperty("fail_reason")] + [System.Text.Json.Serialization.JsonPropertyName("fail_reason")] + public string? FailReason { get; set; } + } + } + + /// + /// 获取或设置抖音号。 + /// + [Newtonsoft.Json.JsonProperty("aweme_id")] + [System.Text.Json.Serialization.JsonPropertyName("aweme_id")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] + public string AwemeId { get; set; } = default!; + + /// + /// 获取或设置昵称。 + /// + [Newtonsoft.Json.JsonProperty("user_name")] + [System.Text.Json.Serialization.JsonPropertyName("user_name")] + public string Nickname { get; set; } = default!; + + /// + /// 获取或设置账号类型。 + /// + [Newtonsoft.Json.JsonProperty("account_type")] + [System.Text.Json.Serialization.JsonPropertyName("account_type")] + public int AccountType { get; set; } + + /// + /// 获取或设置绑定能力列表。 + /// + [Newtonsoft.Json.JsonProperty("capacity_list")] + [System.Text.Json.Serialization.JsonPropertyName("capacity_list")] + public Types.Capacity[] CapacityList { get; set; } = default!; + + /// + /// 获取或设置绑定状态。 + /// + [Newtonsoft.Json.JsonProperty("bind_status")] + [System.Text.Json.Serialization.JsonPropertyName("bind_status")] + public int BindStatus { get; set; } + + /// + /// 获取或设置绑定失败原因。 + /// + [Newtonsoft.Json.JsonProperty("reason")] + [System.Text.Json.Serialization.JsonPropertyName("reason")] + public string? FailReason { get; set; } + } + } + + /// + /// 获取或设置绑定抖音号列表。 + /// + [Newtonsoft.Json.JsonProperty("list")] + [System.Text.Json.Serialization.JsonPropertyName("list")] + public Types.AwemeRelation[] AwemeRelationList { get; set; } = default!; + + /// + /// 获取或设置总数量。 + /// + [Newtonsoft.Json.JsonProperty("total_count")] + [System.Text.Json.Serialization.JsonPropertyName("total_count")] + public int TotalCount { get; set; } + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/AwemeBind/AppsCapacityUnbindAwemeRelationV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/AwemeBind/AppsCapacityUnbindAwemeRelationV1Request.cs new file mode 100644 index 00000000..45b4a9e6 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/AwemeBind/AppsCapacityUnbindAwemeRelationV1Request.cs @@ -0,0 +1,22 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/v1/capacity/unbind_aweme_relation/ 接口的请求。 + /// + public class AppsCapacityUnbindAwemeRelationV1Request : DouyinMicroAppRequest + { + /// + /// 获取或设置抖音号。 + /// + [Newtonsoft.Json.JsonProperty("aweme_id")] + [System.Text.Json.Serialization.JsonPropertyName("aweme_id")] + public string AwemeId { get; set; } = string.Empty; + + /// + /// 获取或设置绑定类型。 + /// + [Newtonsoft.Json.JsonProperty("type")] + [System.Text.Json.Serialization.JsonPropertyName("type")] + public string Type { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/AwemeBind/AppsCapacityUnbindAwemeRelationV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/AwemeBind/AppsCapacityUnbindAwemeRelationV1Response.cs new file mode 100644 index 00000000..8aba32cc --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/AwemeBind/AppsCapacityUnbindAwemeRelationV1Response.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/v1/capacity/unbind_aweme_relation/ 接口的响应。 + /// + public class AppsCapacityUnbindAwemeRelationV1Response : DouyinMicroAppResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/AwemeCapacity/AppsCapacityAddAwemeVideoKeywordV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/AwemeKeyword/AppsCapacityAddAwemeVideoKeywordV1Request.cs similarity index 85% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/AwemeCapacity/AppsCapacityAddAwemeVideoKeywordV1Request.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/AwemeKeyword/AppsCapacityAddAwemeVideoKeywordV1Request.cs index 743adfec..4d4489b3 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/AwemeCapacity/AppsCapacityAddAwemeVideoKeywordV1Request.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/AwemeKeyword/AppsCapacityAddAwemeVideoKeywordV1Request.cs @@ -1,9 +1,9 @@ namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models { /// - /// 表示 [POST] /apps/v1/capacity/add_aweme_video_keyword 接口的请求。 + /// 表示 [POST] /apps/v1/capacity/add_aweme_video_keyword/ 接口的请求。 /// - public class AppsCapacityAddAwemeVideoKeywordV1Request : ByteDanceMicroAppRequest + public class AppsCapacityAddAwemeVideoKeywordV1Request : DouyinMicroAppRequest { /// /// 获取或设置关键词。 diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/AwemeKeyword/AppsCapacityAddAwemeVideoKeywordV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/AwemeKeyword/AppsCapacityAddAwemeVideoKeywordV1Response.cs new file mode 100644 index 00000000..e6e9e27f --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/AwemeKeyword/AppsCapacityAddAwemeVideoKeywordV1Response.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/v1/capacity/add_aweme_video_keyword/ 接口的响应。 + /// + public class AppsCapacityAddAwemeVideoKeywordV1Response : DouyinMicroAppResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/AwemeCapacity/AppsCapacityDeleteAwemeVideoKeywordV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/AwemeKeyword/AppsCapacityDeleteAwemeVideoKeywordV1Request.cs similarity index 89% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/AwemeCapacity/AppsCapacityDeleteAwemeVideoKeywordV1Request.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/AwemeKeyword/AppsCapacityDeleteAwemeVideoKeywordV1Request.cs index 7235a7e9..7217b063 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/AwemeCapacity/AppsCapacityDeleteAwemeVideoKeywordV1Request.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/AwemeKeyword/AppsCapacityDeleteAwemeVideoKeywordV1Request.cs @@ -1,9 +1,9 @@ namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models { /// - /// 表示 [POST] /apps/v1/capacity/delete_aweme_video_keyword 接口的请求。 + /// 表示 [POST] /apps/v1/capacity/delete_aweme_video_keyword/ 接口的请求。 /// - public class AppsCapacityDeleteAwemeVideoKeywordV1Request : ByteDanceMicroAppRequest + public class AppsCapacityDeleteAwemeVideoKeywordV1Request : DouyinMicroAppRequest { /// /// 获取或设置关键词 ID。 diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/AwemeKeyword/AppsCapacityDeleteAwemeVideoKeywordV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/AwemeKeyword/AppsCapacityDeleteAwemeVideoKeywordV1Response.cs new file mode 100644 index 00000000..cdf45097 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/AwemeKeyword/AppsCapacityDeleteAwemeVideoKeywordV1Response.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/v1/capacity/delete_aweme_video_keyword/ 接口的响应。 + /// + public class AppsCapacityDeleteAwemeVideoKeywordV1Response : DouyinMicroAppResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/AwemeCapacity/AppsCapacityQueryAwemeVideoKeywordListV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/AwemeKeyword/AppsCapacityQueryAwemeVideoKeywordListV1Request.cs similarity index 80% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/AwemeCapacity/AppsCapacityQueryAwemeVideoKeywordListV1Request.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/AwemeKeyword/AppsCapacityQueryAwemeVideoKeywordListV1Request.cs index 5462b986..d1f36903 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/AwemeCapacity/AppsCapacityQueryAwemeVideoKeywordListV1Request.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/AwemeKeyword/AppsCapacityQueryAwemeVideoKeywordListV1Request.cs @@ -1,9 +1,9 @@ namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models { /// - /// 表示 [GET] /apps/v1/capacity/query_aweme_video_keyword_list 接口的请求。 + /// 表示 [GET] /apps/v1/capacity/query_aweme_video_keyword_list/ 接口的请求。 /// - public class AppsCapacityQueryAwemeVideoKeywordListV1Request : ByteDanceMicroAppRequest + public class AppsCapacityQueryAwemeVideoKeywordListV1Request : DouyinMicroAppRequest { /// /// 获取或设置分页页数。 @@ -11,7 +11,7 @@ public class AppsCapacityQueryAwemeVideoKeywordListV1Request : ByteDanceMicroApp /// [Newtonsoft.Json.JsonIgnore] [System.Text.Json.Serialization.JsonIgnore] - public int Page { get; set; } = 1; + public int PageNumber { get; set; } = 1; /// /// 获取或设置分页每页数量。 @@ -19,6 +19,6 @@ public class AppsCapacityQueryAwemeVideoKeywordListV1Request : ByteDanceMicroApp /// [Newtonsoft.Json.JsonIgnore] [System.Text.Json.Serialization.JsonIgnore] - public int Limit { get; set; } = 10; + public int PageSize { get; set; } = 10; } } diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/AwemeCapacity/AppsCapacityQueryAwemeVideoKeywordListV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/AwemeKeyword/AppsCapacityQueryAwemeVideoKeywordListV1Response.cs similarity index 83% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/AwemeCapacity/AppsCapacityQueryAwemeVideoKeywordListV1Response.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/AwemeKeyword/AppsCapacityQueryAwemeVideoKeywordListV1Response.cs index bd2e8517..91b22d7f 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/AwemeCapacity/AppsCapacityQueryAwemeVideoKeywordListV1Response.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/AwemeKeyword/AppsCapacityQueryAwemeVideoKeywordListV1Response.cs @@ -1,9 +1,9 @@ namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models { /// - /// 表示 [GET] /apps/v1/capacity/query_aweme_video_keyword_list 接口的响应。 + /// 表示 [GET] /apps/v1/capacity/query_aweme_video_keyword_list/ 接口的响应。 /// - public class AppsCapacityQueryAwemeVideoKeywordListV1Response : ByteDanceMicroAppResponse + public class AppsCapacityQueryAwemeVideoKeywordListV1Response : DouyinMicroAppResponse { public static class Types { @@ -59,20 +59,6 @@ public class Keyword } } - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_no")] - [System.Text.Json.Serialization.JsonPropertyName("err_no")] - public override long ErrorCode { get; set; } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_msg")] - [System.Text.Json.Serialization.JsonPropertyName("err_msg")] - public override string? ErrorMessage { get; set; } - /// /// 获取或设置返回数据。 /// diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/Delivery/AppsCapacityAddAliasV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/Delivery/AppsCapacityAddAliasV1Request.cs similarity index 86% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/Delivery/AppsCapacityAddAliasV1Request.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/Delivery/AppsCapacityAddAliasV1Request.cs index 874678d0..cafd5685 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/Delivery/AppsCapacityAddAliasV1Request.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/Delivery/AppsCapacityAddAliasV1Request.cs @@ -3,7 +3,7 @@ namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models /// /// 表示 [POST] /apps/v1/capacity/add_alias 接口的请求。 /// - public class AppsCapacityAddAliasV1Request : ByteDanceMicroAppRequest + public class AppsCapacityAddAliasV1Request : DouyinMicroAppRequest { /// /// 获取或设置小程序别名。 diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/Delivery/AppsCapacityAddAliasV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/Delivery/AppsCapacityAddAliasV1Response.cs new file mode 100644 index 00000000..10c0da39 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/Delivery/AppsCapacityAddAliasV1Response.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/v1/capacity/add_alias 接口的响应。 + /// + public class AppsCapacityAddAliasV1Response : DouyinMicroAppResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/Delivery/AppsCapacityDeleteAliasV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/Delivery/AppsCapacityDeleteAliasV1Request.cs new file mode 100644 index 00000000..570ebc01 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/Delivery/AppsCapacityDeleteAliasV1Request.cs @@ -0,0 +1,15 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/v1/capacity/delete_alias/ 接口的请求。 + /// + public class AppsCapacityDeleteAliasV1Request : DouyinMicroAppRequest + { + /// + /// 获取或设置小程序别名。 + /// + [Newtonsoft.Json.JsonProperty("alias")] + [System.Text.Json.Serialization.JsonPropertyName("alias")] + public string Alias { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/Delivery/AppsCapacityDeleteAliasV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/Delivery/AppsCapacityDeleteAliasV1Response.cs new file mode 100644 index 00000000..8f1b2f10 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/Delivery/AppsCapacityDeleteAliasV1Response.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/v1/capacity/delete_alias/ 接口的响应。 + /// + public class AppsCapacityDeleteAliasV1Response : DouyinMicroAppResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/Delivery/AppsCapacityModifyAliasV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/Delivery/AppsCapacityModifyAliasV1Request.cs similarity index 80% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/Delivery/AppsCapacityModifyAliasV1Request.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/Delivery/AppsCapacityModifyAliasV1Request.cs index 8534db58..72d96257 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/Delivery/AppsCapacityModifyAliasV1Request.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/Delivery/AppsCapacityModifyAliasV1Request.cs @@ -1,9 +1,9 @@ namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models { /// - /// 表示 [POST] /apps/v1/capacity/modify_alias 接口的请求。 + /// 表示 [POST] /apps/v1/capacity/modify_alias/ 接口的请求。 /// - public class AppsCapacityModifyAliasV1Request : ByteDanceMicroAppRequest + public class AppsCapacityModifyAliasV1Request : DouyinMicroAppRequest { /// /// 获取或设置修改前小程序别名。 diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/Delivery/AppsCapacityModifyAliasV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/Delivery/AppsCapacityModifyAliasV1Response.cs new file mode 100644 index 00000000..81d3aedc --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/Delivery/AppsCapacityModifyAliasV1Response.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/v1/capacity/modify_alias/ 接口的响应。 + /// + public class AppsCapacityModifyAliasV1Response : DouyinMicroAppResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/Delivery/AppsCapacityQueryAliasListV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/Delivery/AppsCapacityQueryAliasListV1Request.cs new file mode 100644 index 00000000..3a51467f --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/Delivery/AppsCapacityQueryAliasListV1Request.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [GET] /apps/v1/capacity/query_alias_list 接口的请求。 + /// + public class AppsCapacityQueryAliasListV1Request : DouyinMicroAppRequest + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/Delivery/AppsCapacityQueryAliasListV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/Delivery/AppsCapacityQueryAliasListV1Response.cs similarity index 86% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/Delivery/AppsCapacityQueryAliasListV1Response.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/Delivery/AppsCapacityQueryAliasListV1Response.cs index 4649982a..8660b5f3 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/Delivery/AppsCapacityQueryAliasListV1Response.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/Delivery/AppsCapacityQueryAliasListV1Response.cs @@ -3,7 +3,7 @@ namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models /// /// 表示 [GET] /apps/v1/capacity/query_alias_list 接口的响应。 /// - public class AppsCapacityQueryAliasListV1Response : ByteDanceMicroAppResponse + public class AppsCapacityQueryAliasListV1Response : DouyinMicroAppResponse { public static class Types { @@ -73,20 +73,6 @@ public class AliasItem } } - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_no")] - [System.Text.Json.Serialization.JsonPropertyName("err_no")] - public override long ErrorCode { get; set; } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_msg")] - [System.Text.Json.Serialization.JsonPropertyName("err_msg")] - public override string? ErrorMessage { get; set; } - /// /// 获取或设置返回数据。 /// diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/Delivery/AppsCapacityQuerySearchTagListV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/Delivery/AppsCapacityQuerySearchTagListV1Request.cs new file mode 100644 index 00000000..b38f680b --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/Delivery/AppsCapacityQuerySearchTagListV1Request.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [GET] /apps/v1/capacity/query_search_tag_list/ 接口的请求。 + /// + public class AppsCapacityQuerySearchTagListV1Request : DouyinMicroAppRequest + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/Delivery/AppsCapacityQuerySearchTagListV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/Delivery/AppsCapacityQuerySearchTagListV1Response.cs similarity index 82% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/Delivery/AppsCapacityQuerySearchTagListV1Response.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/Delivery/AppsCapacityQuerySearchTagListV1Response.cs index 516b1cb2..910b84d0 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/Delivery/AppsCapacityQuerySearchTagListV1Response.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/Delivery/AppsCapacityQuerySearchTagListV1Response.cs @@ -1,9 +1,9 @@ namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models { /// - /// 表示 [GET] /apps/v1/capacity/query_search_tag_list 接口的响应。 + /// 表示 [GET] /apps/v1/capacity/query_search_tag_list/ 接口的响应。 /// - public class AppsCapacityQuerySearchTagListV1Response : ByteDanceMicroAppResponse + public class AppsCapacityQuerySearchTagListV1Response : DouyinMicroAppResponse { public static class Types { @@ -59,20 +59,6 @@ public class TagItem } } - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_no")] - [System.Text.Json.Serialization.JsonPropertyName("err_no")] - public override long ErrorCode { get; set; } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_msg")] - [System.Text.Json.Serialization.JsonPropertyName("err_msg")] - public override string? ErrorMessage { get; set; } - /// /// 获取或设置返回数据。 /// diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/Delivery/AppsCapacitySetSearchTagV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/Delivery/AppsCapacitySetSearchTagV1Request.cs similarity index 91% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/Delivery/AppsCapacitySetSearchTagV1Request.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/Delivery/AppsCapacitySetSearchTagV1Request.cs index 63b274db..f1c20a39 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/Delivery/AppsCapacitySetSearchTagV1Request.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/Delivery/AppsCapacitySetSearchTagV1Request.cs @@ -3,9 +3,9 @@ namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models { /// - /// 表示 [POST] /apps/v1/capacity/set_search_tag 接口的请求。 + /// 表示 [POST] /apps/v1/capacity/set_search_tag/ 接口的请求。 /// - public class AppsCapacitySetSearchTagV1Request : ByteDanceMicroAppRequest + public class AppsCapacitySetSearchTagV1Request : DouyinMicroAppRequest { public static class Types { diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/Delivery/AppsCapacitySetSearchTagV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/Delivery/AppsCapacitySetSearchTagV1Response.cs new file mode 100644 index 00000000..8cd2f5ee --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/Delivery/AppsCapacitySetSearchTagV1Response.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/v1/capacity/set_search_tag/ 接口的响应。 + /// + public class AppsCapacitySetSearchTagV1Response : DouyinMicroAppResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/SimpleQrcode/AppsCapacityAddSimpleQrcodeBindV2Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/SimpleQrcode/AppsCapacityAddSimpleQrcodeBindV2Request.cs new file mode 100644 index 00000000..e01d1482 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/SimpleQrcode/AppsCapacityAddSimpleQrcodeBindV2Request.cs @@ -0,0 +1,38 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/v2/capacity/add_simple_qr_bind/ 接口的请求。 + /// + public class AppsCapacityAddSimpleQrcodeBindV2Request : DouyinMicroAppRequest + { + /// + /// 获取或设置链接地址。 + /// + [Newtonsoft.Json.JsonProperty("qr_url")] + [System.Text.Json.Serialization.JsonPropertyName("qr_url")] + public string Url { get; set; } = string.Empty; + + /// + /// 获取或设置小程序页面路径。 + /// + [Newtonsoft.Json.JsonProperty("load_path")] + [System.Text.Json.Serialization.JsonPropertyName("load_path")] + public string PagePath { get; set; } = string.Empty; + + /// + /// 获取或设置测试范围。 + /// + [Newtonsoft.Json.JsonProperty("stage")] + [System.Text.Json.Serialization.JsonPropertyName("stage")] + public string Stage { get; set; } = string.Empty; + + /// + /// 获取或设置是否独占该链接作为前缀。 + /// + [Newtonsoft.Json.JsonProperty("exclusive_qr_url_prefix")] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.NumericalBooleanConverter))] + [System.Text.Json.Serialization.JsonPropertyName("exclusive_qr_url_prefix")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalBooleanConverter))] + public bool IsPrefixExclusive { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/SimpleQrcode/AppsCapacityAddSimpleQrcodeBindV2Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/SimpleQrcode/AppsCapacityAddSimpleQrcodeBindV2Response.cs new file mode 100644 index 00000000..05cf067d --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/SimpleQrcode/AppsCapacityAddSimpleQrcodeBindV2Response.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/v2/capacity/add_simple_qr_bind/ 接口的响应。 + /// + public class AppsCapacityAddSimpleQrcodeBindV2Response : DouyinMicroAppResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/SimpleQrcode/AppsCapacityDeleteSimpleQrcodeBindV2Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/SimpleQrcode/AppsCapacityDeleteSimpleQrcodeBindV2Request.cs new file mode 100644 index 00000000..0cb00297 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/SimpleQrcode/AppsCapacityDeleteSimpleQrcodeBindV2Request.cs @@ -0,0 +1,15 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/v2/capacity/delete_simple_qr_bind/ 接口的请求。 + /// + public class AppsCapacityDeleteSimpleQrcodeBindV2Request : DouyinMicroAppRequest + { + /// + /// 获取或设置链接地址。 + /// + [Newtonsoft.Json.JsonProperty("qr_url")] + [System.Text.Json.Serialization.JsonPropertyName("qr_url")] + public string Url { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/SimpleQrcode/AppsCapacityDeleteSimpleQrcodeBindV2Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/SimpleQrcode/AppsCapacityDeleteSimpleQrcodeBindV2Response.cs new file mode 100644 index 00000000..87355ea3 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/SimpleQrcode/AppsCapacityDeleteSimpleQrcodeBindV2Response.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/v2/capacity/delete_simple_qr_bind/ 接口的响应。 + /// + public class AppsCapacityDeleteSimpleQrcodeBindV2Response : DouyinMicroAppResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/SimpleQrcode/AppsCapacityQuerySimpleQrcodeBindListV2Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/SimpleQrcode/AppsCapacityQuerySimpleQrcodeBindListV2Request.cs new file mode 100644 index 00000000..cf774e8f --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/SimpleQrcode/AppsCapacityQuerySimpleQrcodeBindListV2Request.cs @@ -0,0 +1,24 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [GET] /apps/v2/capacity/query_simple_qr_bind_list/ 接口的请求。 + /// + public class AppsCapacityQuerySimpleQrcodeBindListV2Request : DouyinMicroAppRequest + { + /// + /// 获取或设置分页页数。 + /// 默认值:1 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public int PageNumber { get; set; } = 1; + + /// + /// 获取或设置分页每页数量。 + /// 默认值:10 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public int PageSize { get; set; } = 10; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/SimpleQrcode/AppsCapacityQuerySimpleQrcodeBindListV2Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/SimpleQrcode/AppsCapacityQuerySimpleQrcodeBindListV2Response.cs new file mode 100644 index 00000000..6d3395fe --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/SimpleQrcode/AppsCapacityQuerySimpleQrcodeBindListV2Response.cs @@ -0,0 +1,106 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [GET] /apps/v2/capacity/query_simple_qr_bind_list/ 接口的响应。 + /// + public class AppsCapacityQuerySimpleQrcodeBindListV2Response : DouyinMicroAppResponse + { + public static class Types + { + public class Data + { + public static class Types + { + public class Qrcode + { + /// + /// 获取或设置绑定的链接地址。 + /// + [Newtonsoft.Json.JsonProperty("qr_url")] + [System.Text.Json.Serialization.JsonPropertyName("qr_url")] + public string Url { get; set; } = default!; + + /// + /// 获取或设置绑定的小程序页面路径。 + /// + [Newtonsoft.Json.JsonProperty("load_path")] + [System.Text.Json.Serialization.JsonPropertyName("load_path")] + public string PagePath { get; set; } = default!; + + /// + /// 获取或设置测试范围。 + /// + [Newtonsoft.Json.JsonProperty("stage")] + [System.Text.Json.Serialization.JsonPropertyName("stage")] + public string Stage { get; set; } = default!; + + /// + /// 获取或设置状态。 + /// + [Newtonsoft.Json.JsonProperty("status")] + [System.Text.Json.Serialization.JsonPropertyName("status")] + public int Status { get; set; } + + /// + /// 获取或设置是否独占该链接作为前缀。 + /// + [Newtonsoft.Json.JsonProperty("exclusive_qr_url_prefix")] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.NumericalBooleanConverter))] + [System.Text.Json.Serialization.JsonPropertyName("exclusive_qr_url_prefix")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalBooleanConverter))] + public bool IsPrefixExclusive { get; set; } + } + } + + /// + /// 获取或设置绑定的二维码列表。 + /// + [Newtonsoft.Json.JsonProperty("qr_list")] + [System.Text.Json.Serialization.JsonPropertyName("qr_list")] + public Types.Qrcode[] QrcodeList { get; set; } = default!; + + /// + /// 获取或设置目前绑定的链接数量。 + /// + [Newtonsoft.Json.JsonProperty("total_count")] + [System.Text.Json.Serialization.JsonPropertyName("total_count")] + public int TotalCount { get; set; } = default!; + + /// + /// 获取或设置总共可以绑定的链接数量。 + /// + [Newtonsoft.Json.JsonProperty("bind_upper_limit")] + [System.Text.Json.Serialization.JsonPropertyName("bind_upper_limit")] + public int BindLimit { get; set; } + + /// + /// 获取或设置剩余可以绑定的链接数量。 + /// + [Newtonsoft.Json.JsonProperty("bind_rest_count")] + [System.Text.Json.Serialization.JsonPropertyName("bind_rest_count")] + public int BindRestCount { get; set; } + + /// + /// 获取或设置当月总共可以发布的次数。 + /// + [Newtonsoft.Json.JsonProperty("release_upper_limit")] + [System.Text.Json.Serialization.JsonPropertyName("release_upper_limit")] + public int ReleaseLimit { get; set; } + + /// + /// 获取或设置当月剩余可以的发布次数。 + /// + [Newtonsoft.Json.JsonProperty("release_rest_count")] + [System.Text.Json.Serialization.JsonPropertyName("release_rest_count")] + public int ReleaseRestCount { get; set; } + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/SimpleQrcode/AppsCapacityUpdateSimpleQrcodeBindStatusV2Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/SimpleQrcode/AppsCapacityUpdateSimpleQrcodeBindStatusV2Request.cs new file mode 100644 index 00000000..6e50999f --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/SimpleQrcode/AppsCapacityUpdateSimpleQrcodeBindStatusV2Request.cs @@ -0,0 +1,22 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/v2/capacity/update_simple_qr_bind_status/ 接口的请求。 + /// + public class AppsCapacityUpdateSimpleQrcodeBindStatusV2Request : DouyinMicroAppRequest + { + /// + /// 获取或设置链接地址。 + /// + [Newtonsoft.Json.JsonProperty("qr_url")] + [System.Text.Json.Serialization.JsonPropertyName("qr_url")] + public string Url { get; set; } = string.Empty; + + /// + /// 获取或设置状态。 + /// + [Newtonsoft.Json.JsonProperty("status")] + [System.Text.Json.Serialization.JsonPropertyName("status")] + public int Status { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/SimpleQrcode/AppsCapacityUpdateSimpleQrcodeBindStatusV2Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/SimpleQrcode/AppsCapacityUpdateSimpleQrcodeBindStatusV2Response.cs new file mode 100644 index 00000000..155baa3c --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/SimpleQrcode/AppsCapacityUpdateSimpleQrcodeBindStatusV2Response.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/v2/capacity/update_simple_qr_bind_status/ 接口的响应。 + /// + public class AppsCapacityUpdateSimpleQrcodeBindStatusV2Response : DouyinMicroAppResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/SimpleQrcode/AppsCapacityUpdateSimpleQrcodeBindV2Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/SimpleQrcode/AppsCapacityUpdateSimpleQrcodeBindV2Request.cs new file mode 100644 index 00000000..c7f9a29d --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/SimpleQrcode/AppsCapacityUpdateSimpleQrcodeBindV2Request.cs @@ -0,0 +1,45 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/v2/capacity/update_simple_qr_bind/ 接口的请求。 + /// + public class AppsCapacityUpdateSimpleQrcodeBindV2Request : DouyinMicroAppRequest + { + /// + /// 获取或设置更新前的链接地址。 + /// + [Newtonsoft.Json.JsonProperty("before_qr_url")] + [System.Text.Json.Serialization.JsonPropertyName("before_qr_url")] + public string OldUrl { get; set; } = string.Empty; + + /// + /// 获取或设置链接地址。 + /// + [Newtonsoft.Json.JsonProperty("qr_url")] + [System.Text.Json.Serialization.JsonPropertyName("qr_url")] + public string NewUrl { get; set; } = string.Empty; + + /// + /// 获取或设置小程序页面路径。 + /// + [Newtonsoft.Json.JsonProperty("load_path")] + [System.Text.Json.Serialization.JsonPropertyName("load_path")] + public string PagePath { get; set; } = string.Empty; + + /// + /// 获取或设置测试范围。 + /// + [Newtonsoft.Json.JsonProperty("stage")] + [System.Text.Json.Serialization.JsonPropertyName("stage")] + public string Stage { get; set; } = string.Empty; + + /// + /// 获取或设置是否独占该链接作为前缀。 + /// + [Newtonsoft.Json.JsonProperty("exclusive_qr_url_prefix")] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.NumericalBooleanConverter))] + [System.Text.Json.Serialization.JsonPropertyName("exclusive_qr_url_prefix")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalBooleanConverter))] + public bool IsPrefixExclusive { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/SimpleQrcode/AppsCapacityUpdateSimpleQrcodeBindV2Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/SimpleQrcode/AppsCapacityUpdateSimpleQrcodeBindV2Response.cs new file mode 100644 index 00000000..69a95786 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/SimpleQrcode/AppsCapacityUpdateSimpleQrcodeBindV2Response.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/v2/capacity/update_simple_qr_bind/ 接口的响应。 + /// + public class AppsCapacityUpdateSimpleQrcodeBindV2Response : DouyinMicroAppResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/SubService/AppsCapacityCreateMicroAppSubServiceV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/SubService/AppsCapacityCreateMicroAppSubServiceV1Request.cs new file mode 100644 index 00000000..bfa29449 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/SubService/AppsCapacityCreateMicroAppSubServiceV1Request.cs @@ -0,0 +1,31 @@ +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/v1/capacity/create_ma_sub_service/ 接口的请求。 + /// + public class AppsCapacityCreateMicroAppSubServiceV1Request : DouyinMicroAppRequest + { + /// + /// 获取或设置检索关键词列表。 + /// + [Newtonsoft.Json.JsonProperty("search_key_word")] + [System.Text.Json.Serialization.JsonPropertyName("search_key_word")] + public IList SearchKeywordList { get; set; } = new List(); + + /// + /// 获取或设置对应功能服务页面的路径链接。 + /// + [Newtonsoft.Json.JsonProperty("start_page_url")] + [System.Text.Json.Serialization.JsonPropertyName("start_page_url")] + public string StartPageUrl { get; set; } = string.Empty; + + /// + /// 获取或设置搜索直达子服务的名称。 + /// + [Newtonsoft.Json.JsonProperty("sub_service_name")] + [System.Text.Json.Serialization.JsonPropertyName("sub_service_name")] + public string SubServiceName { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/SubService/AppsCapacityCreateMicroAppSubServiceV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/SubService/AppsCapacityCreateMicroAppSubServiceV1Response.cs new file mode 100644 index 00000000..4c592697 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/SubService/AppsCapacityCreateMicroAppSubServiceV1Response.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/v1/capacity/create_ma_sub_service/ 接口的响应。 + /// + public class AppsCapacityCreateMicroAppSubServiceV1Response : DouyinMicroAppResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/SubService/AppsCapacityQueryMicroAppSubServiceV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/SubService/AppsCapacityQueryMicroAppSubServiceV1Request.cs new file mode 100644 index 00000000..bdac751a --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/SubService/AppsCapacityQueryMicroAppSubServiceV1Request.cs @@ -0,0 +1,31 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [GET] /apps/v1/capacity/query_ma_sub_service/ 接口的请求。 + /// + public class AppsCapacityQueryMicroAppSubServiceV1Request : DouyinMicroAppRequest + { + /// + /// 获取或设置分页页数。 + /// 默认值:1 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public int PageNumber { get; set; } = 1; + + /// + /// 获取或设置分页每页数量。 + /// 默认值:10 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public int PageSize { get; set; } = 10; + + /// + /// 获取或设置审核状态。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public int? ApprovalState { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/SubService/AppsCapacityQueryMicroAppSubServiceV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/SubService/AppsCapacityQueryMicroAppSubServiceV1Response.cs new file mode 100644 index 00000000..9fdb0e65 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCapacity/SubService/AppsCapacityQueryMicroAppSubServiceV1Response.cs @@ -0,0 +1,124 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [GET] /apps/v1/capacity/query_ma_sub_service/ 接口的响应。 + /// + public class AppsCapacityQueryMicroAppSubServiceV1Response : DouyinMicroAppResponse + { + public static class Types + { + public class Data + { + public static class Types + { + public class SubService + { + public static class Types + { + public class RejectReason + { + /// + /// 获取或设置审核拒绝标签。 + /// + [Newtonsoft.Json.JsonProperty("audit_field")] + [System.Text.Json.Serialization.JsonPropertyName("audit_field")] + public string AuditField { get; set; } = default!; + + /// + /// 获取或设置审核拒绝原因。 + /// + [Newtonsoft.Json.JsonProperty("reason")] + [System.Text.Json.Serialization.JsonPropertyName("reason")] + public string Reason { get; set; } = default!; + } + } + + /// + /// 获取或设置子服务 ID。 + /// + [Newtonsoft.Json.JsonProperty("sub_service_id")] + [System.Text.Json.Serialization.JsonPropertyName("sub_service_id")] + public string SubServiceId { get; set; } = default!; + + /// + /// 获取或设置子服务名称。 + /// + [Newtonsoft.Json.JsonProperty("sub_service_name")] + [System.Text.Json.Serialization.JsonPropertyName("sub_service_name")] + public string SubServiceName { get; set; } = default!; + + /// + /// 获取或设置小程序 AppId。 + /// + [Newtonsoft.Json.JsonProperty("micro_app_id")] + [System.Text.Json.Serialization.JsonPropertyName("micro_app_id")] + public string MicroAppId { get; set; } = default!; + + /// + /// 获取或设置小程序图标 URL。 + /// + [Newtonsoft.Json.JsonProperty("micro_app_icon")] + [System.Text.Json.Serialization.JsonPropertyName("micro_app_icon")] + public string MicroAppIconUrl { get; set; } = default!; + + /// + /// 获取或设置检索关键词列表。 + /// + [Newtonsoft.Json.JsonProperty("search_key_word")] + [System.Text.Json.Serialization.JsonPropertyName("search_key_word")] + public string[] SearchKeywordList { get; set; } = default!; + + /// + /// 获取或设置对应功能服务页面的路径链接。 + /// + [Newtonsoft.Json.JsonProperty("start_page_url")] + [System.Text.Json.Serialization.JsonPropertyName("start_page_url")] + public string StartPageUrl { get; set; } = default!; + + /// + /// 获取或设置审核状态。 + /// + [Newtonsoft.Json.JsonProperty("approval_state")] + [System.Text.Json.Serialization.JsonPropertyName("approval_state")] + public int ApprovalState { get; set; } + + /// + /// 获取或设置审核拒绝原因列表。 + /// + [Newtonsoft.Json.JsonProperty("reasons")] + [System.Text.Json.Serialization.JsonPropertyName("reasons")] + public Types.RejectReason[]? RejectReasonList { get; set; } + } + } + + /// + /// 获取或设置搜索直达子服务列表。 + /// + [Newtonsoft.Json.JsonProperty("ma_sub_service_info_list")] + [System.Text.Json.Serialization.JsonPropertyName("ma_sub_service_info_list")] + public Types.SubService[] SubServiceList { get; set; } = default!; + + /// + /// 获取或设置是否还有更多数据。 + /// + [Newtonsoft.Json.JsonProperty("has_more")] + [System.Text.Json.Serialization.JsonPropertyName("has_more")] + public bool HasMore { get; set; } + + /// + /// 获取或设置总数量。 + /// + [Newtonsoft.Json.JsonProperty("total")] + [System.Text.Json.Serialization.JsonPropertyName("total")] + public int TotalCount { get; set; } + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCategory/AppsCategoryQueryAppCategoriesV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCategory/AppsCategoryQueryAppCategoriesV1Request.cs new file mode 100644 index 00000000..f5bc54c3 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCategory/AppsCategoryQueryAppCategoriesV1Request.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [GET] /apps/v1/category/query_app_categories/ 接口的请求。 + /// + public class AppsCategoryQueryAppCategoriesV1Request : DouyinMicroAppRequest + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Category/AppsCategoryQueryAppCategoriesV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCategory/AppsCategoryQueryAppCategoriesV1Response.cs similarity index 89% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Category/AppsCategoryQueryAppCategoriesV1Response.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCategory/AppsCategoryQueryAppCategoriesV1Response.cs index 8f4c7d73..088f10a7 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Category/AppsCategoryQueryAppCategoriesV1Response.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCategory/AppsCategoryQueryAppCategoriesV1Response.cs @@ -1,9 +1,9 @@ namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models { /// - /// 表示 [GET] /apps/v1/category/query_app_categories 接口的响应。 + /// 表示 [GET] /apps/v1/category/query_app_categories/ 接口的响应。 /// - public class AppsCategoryQueryAppCategoriesV1Response : ByteDanceMicroAppResponse + public class AppsCategoryQueryAppCategoriesV1Response : DouyinMicroAppResponse { public static class Types { @@ -59,9 +59,9 @@ public class Certificate /// 获取或设置服务类目资质 ID 列表。 /// [Newtonsoft.Json.JsonProperty("categoryCertIds")] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.TextualIntegerArrayWithCommaSplitConverter))] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.StringifiedNumberArrayWithCommaSplitConverter))] [System.Text.Json.Serialization.JsonPropertyName("categoryCertIds")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.TextualIntegerArrayWithCommaSplitConverter))] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.StringifiedNumberArrayWithCommaSplitConverter))] public int[] CertificationIdList { get; set; } = default!; /// @@ -117,20 +117,6 @@ public class Certificate } } - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_no")] - [System.Text.Json.Serialization.JsonPropertyName("err_no")] - public override long ErrorCode { get; set; } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_msg")] - [System.Text.Json.Serialization.JsonPropertyName("err_msg")] - public override string? ErrorMessage { get; set; } - /// /// 获取或设置返回数据。 /// diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCensor/AppsCensorImageV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCensor/AppsCensorImageV1Request.cs new file mode 100644 index 00000000..022bd45d --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCensor/AppsCensorImageV1Request.cs @@ -0,0 +1,29 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/v1/censor/image 接口的请求。 + /// + public class AppsCensorImageV1Request : DouyinMicroAppRequest + { + /// + /// 获取或设置小程序 AppId。如果不指定将使用构造 时的 参数。 + /// + [Newtonsoft.Json.JsonProperty("app_id")] + [System.Text.Json.Serialization.JsonPropertyName("app_id")] + public string? AppId { get; set; } + + /// + /// 获取或设置图片 URL。与字段 二选一。 + /// + [Newtonsoft.Json.JsonProperty("image")] + [System.Text.Json.Serialization.JsonPropertyName("image")] + public string? ImageUrl { get; set; } + + /// + /// 获取或设置经过 Base64 编码的图片数据。与字段 二选一。 + /// + [Newtonsoft.Json.JsonProperty("image_data")] + [System.Text.Json.Serialization.JsonPropertyName("image_data")] + public string? EncodingImageData { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCensor/AppsCensorImageV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCensor/AppsCensorImageV1Response.cs new file mode 100644 index 00000000..172441ac --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsCensor/AppsCensorImageV1Response.cs @@ -0,0 +1,35 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/v1/censor/image 接口的响应。 + /// + public class AppsCensorImageV1Response : DouyinMicroAppResponse + { + public static class Types + { + public class Predict + { + /// + /// 获取或设置置信度模型或标签。 + /// + [Newtonsoft.Json.JsonProperty("model_name")] + [System.Text.Json.Serialization.JsonPropertyName("model_name")] + public string ModelName { get; set; } = default!; + + /// + /// 获取或设置置信度结果。 + /// + [Newtonsoft.Json.JsonProperty("hit")] + [System.Text.Json.Serialization.JsonPropertyName("hit")] + public bool IsHit { get; set; } + } + } + + /// + /// 获取或设置置信度列表。 + /// + [Newtonsoft.Json.JsonProperty("predicts")] + [System.Text.Json.Serialization.JsonPropertyName("predicts")] + public Types.Predict[] PredictList { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsDouyin/InteractTask/AppsDouyinCreateInteractTaskV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsDouyin/InteractTask/AppsDouyinCreateInteractTaskV1Request.cs new file mode 100644 index 00000000..860fb931 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsDouyin/InteractTask/AppsDouyinCreateInteractTaskV1Request.cs @@ -0,0 +1,94 @@ +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/v1/douyin/create_interact_task/ 接口的请求。 + /// + public class AppsDouyinCreateInteractTaskV1Request : DouyinMicroAppRequest + { + public static class Types + { + public class InteractRule + { + /// + /// 获取或设置目标值。 + /// + [Newtonsoft.Json.JsonProperty("target_count")] + [System.Text.Json.Serialization.JsonPropertyName("target_count")] + public int TargetCount { get; set; } + + /// + /// 获取或设置阶段值。 + /// + [Newtonsoft.Json.JsonProperty("stage_count")] + [System.Text.Json.Serialization.JsonPropertyName("stage_count")] + public int? StageCount { get; set; } + } + } + + /// + /// 获取或设置小程序 AppId。如果不指定将使用构造 时的 参数。 + /// + [Newtonsoft.Json.JsonProperty("app_id")] + [System.Text.Json.Serialization.JsonPropertyName("app_id")] + public string? AppId { get; set; } + + /// + /// 获取或设置任务类型。 + /// 默认值:3 + /// + [Newtonsoft.Json.JsonProperty("task_type")] + [System.Text.Json.Serialization.JsonPropertyName("task_type")] + public int TaskType { get; set; } = 3; + + /// + /// 获取或设置可重复参加次数。 + /// + [Newtonsoft.Json.JsonProperty("max_count")] + [System.Text.Json.Serialization.JsonPropertyName("max_count")] + public int MaxCount { get; set; } + + /// + /// 获取或设置开始时间戳。 + /// + [Newtonsoft.Json.JsonProperty("start_time")] + [System.Text.Json.Serialization.JsonPropertyName("start_time")] + public long StartTimestamp { get; set; } + + /// + /// 获取或设置结束时间戳。 + /// + [Newtonsoft.Json.JsonProperty("end_time")] + [System.Text.Json.Serialization.JsonPropertyName("end_time")] + public long EndTimestamp { get; set; } + + /// + /// 获取或设置挂载链接。 + /// + [Newtonsoft.Json.JsonProperty("mount_link")] + [System.Text.Json.Serialization.JsonPropertyName("mount_link")] + public string? MountLink { get; set; } + + /// + /// 获取或设置发布类型列表。 + /// + [Newtonsoft.Json.JsonProperty("publish_type")] + [System.Text.Json.Serialization.JsonPropertyName("publish_type")] + public IList? PublishTypeList { get; set; } + + /// + /// 获取或设置话题标签列表。 + /// + [Newtonsoft.Json.JsonProperty("tags")] + [System.Text.Json.Serialization.JsonPropertyName("tags")] + public IList? TagList { get; set; } + + /// + /// 获取或设置互动任务目标配置字典。 + /// + [Newtonsoft.Json.JsonProperty("interact_rules")] + [System.Text.Json.Serialization.JsonPropertyName("interact_rules")] + public IDictionary? InteractRuleMap { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsDouyin/InteractTask/AppsDouyinCreateInteractTaskV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsDouyin/InteractTask/AppsDouyinCreateInteractTaskV1Response.cs new file mode 100644 index 00000000..08e7838d --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsDouyin/InteractTask/AppsDouyinCreateInteractTaskV1Response.cs @@ -0,0 +1,28 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/v1/douyin/create_interact_task/ 接口的响应。 + /// + public class AppsDouyinCreateInteractTaskV1Response : DouyinMicroAppResponse + { + public static class Types + { + public class Data + { + /// + /// 获取或设置任务 ID。 + /// + [Newtonsoft.Json.JsonProperty("task_id")] + [System.Text.Json.Serialization.JsonPropertyName("task_id")] + public string TaskId { get; set; } = default!; + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsDouyin/InteractTask/AppsDouyinQueryUserInteractTaskV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsDouyin/InteractTask/AppsDouyinQueryUserInteractTaskV1Request.cs new file mode 100644 index 00000000..accccb6b --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsDouyin/InteractTask/AppsDouyinQueryUserInteractTaskV1Request.cs @@ -0,0 +1,31 @@ +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/v1/douyin/query_user_interact_task/ 接口的请求。 + /// + public class AppsDouyinQueryUserInteractTaskV1Request : DouyinMicroAppRequest + { + /// + /// 获取或设置小程序 AppId。如果不指定将使用构造 时的 参数。 + /// + [Newtonsoft.Json.JsonProperty("app_id")] + [System.Text.Json.Serialization.JsonPropertyName("app_id")] + public string? AppId { get; set; } + + /// + /// 获取或设置开启任务的用户 OpenId。 + /// + [Newtonsoft.Json.JsonProperty("open_id")] + [System.Text.Json.Serialization.JsonPropertyName("open_id")] + public string OpenId { get; set; } = string.Empty; + + /// + /// 获取或设置任务 ID 列表。 + /// + [Newtonsoft.Json.JsonProperty("task_id")] + [System.Text.Json.Serialization.JsonPropertyName("task_id")] + public IList TaskIdList { get; set; } = new List(); + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsDouyin/InteractTask/AppsDouyinQueryUserInteractTaskV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsDouyin/InteractTask/AppsDouyinQueryUserInteractTaskV1Response.cs new file mode 100644 index 00000000..de8c8a4c --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsDouyin/InteractTask/AppsDouyinQueryUserInteractTaskV1Response.cs @@ -0,0 +1,139 @@ +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/v1/douyin/query_user_interact_task/ 接口的响应。 + /// + public class AppsDouyinQueryUserInteractTaskV1Response : DouyinMicroAppResponse + { + public static class Types + { + public class Data + { + public static class Types + { + public class TaskInfo + { + public static class Types + { + public class Video + { + public static class Types + { + public class InteractInfo + { + /// + /// 获取或设置是否已完成。 + /// + [Newtonsoft.Json.JsonProperty("completed")] + [System.Text.Json.Serialization.JsonPropertyName("completed")] + public bool IsCompleted { get; set; } + + /// + /// 获取或设置阶段值。 + /// + [Newtonsoft.Json.JsonProperty("stage")] + [System.Text.Json.Serialization.JsonPropertyName("stage")] + public int? Stage { get; set; } + } + } + + /// + /// 获取或设置视频 ID。 + /// + [Newtonsoft.Json.JsonProperty("video_id")] + [System.Text.Json.Serialization.JsonPropertyName("video_id")] + public string VideoId { get; set; } = default!; + + /// + /// 获取或设置视频状态。 + /// + [Newtonsoft.Json.JsonProperty("video_status")] + [System.Text.Json.Serialization.JsonPropertyName("video_status")] + public int VideoStatus { get; set; } + + /// + /// 获取或设置是否已完成。 + /// + [Newtonsoft.Json.JsonProperty("completed")] + [System.Text.Json.Serialization.JsonPropertyName("completed")] + public bool IsCompleted { get; set; } + + /// + /// 获取或设置互动数据字典。 + /// + [Newtonsoft.Json.JsonProperty("interact_info")] + [System.Text.Json.Serialization.JsonPropertyName("interact_info")] + public IDictionary InteractInfoMap { get; set; } = default!; + } + } + + /// + /// 获取或设置任务 ID。 + /// + [Newtonsoft.Json.JsonProperty("task_id")] + [System.Text.Json.Serialization.JsonPropertyName("task_id")] + public string TaskId { get; set; } = default!; + + /// + /// 获取或设置是否有效。 + /// + [Newtonsoft.Json.JsonProperty("is_valid")] + [System.Text.Json.Serialization.JsonPropertyName("is_valid")] + public bool IsValid { get; set; } + + /// + /// 获取或设置最多参与次数。 + /// + [Newtonsoft.Json.JsonProperty("max_count")] + [System.Text.Json.Serialization.JsonPropertyName("max_count")] + public int MaxCount { get; set; } + + /// + /// 获取或设置成功次数。 + /// + [Newtonsoft.Json.JsonProperty("success_count")] + [System.Text.Json.Serialization.JsonPropertyName("success_count")] + public int SuccessCount { get; set; } + + /// + /// 获取或设置视频列表。 + /// + [Newtonsoft.Json.JsonProperty("video_info")] + [System.Text.Json.Serialization.JsonPropertyName("video_info")] + public Types.Video[] VideoList { get; set; } = default!; + + /// + /// 获取或设置错误码。 + /// + [Newtonsoft.Json.JsonProperty("err_no")] + [System.Text.Json.Serialization.JsonPropertyName("err_no")] + public int ErrorNumber { get; set; } + + /// + /// 获取或设置错误信息。 + /// + [Newtonsoft.Json.JsonProperty("err_msg")] + [System.Text.Json.Serialization.JsonPropertyName("err_msg")] + public string? ErrorMessage { get; set; } + } + } + + /// + /// 获取或设置任务信息字典。 + /// + [Newtonsoft.Json.JsonProperty("task_info_list")] + [System.Text.Json.Serialization.JsonPropertyName("task_info_list")] + public IDictionary TaskInfoMap { get; set; } = default!; + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsDouyin/Task/AppsDouyinCreateTaskV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsDouyin/Task/AppsDouyinCreateTaskV1Request.cs new file mode 100644 index 00000000..d324f265 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsDouyin/Task/AppsDouyinCreateTaskV1Request.cs @@ -0,0 +1,74 @@ +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/v1/douyin/create_task/ 接口的请求。 + /// + public class AppsDouyinCreateTaskV1Request : DouyinMicroAppRequest + { + /// + /// 获取或设置小程序 AppId。如果不指定将使用构造 时的 参数。 + /// + [Newtonsoft.Json.JsonProperty("app_id")] + [System.Text.Json.Serialization.JsonPropertyName("app_id")] + public string? AppId { get; set; } + + /// + /// 获取或设置任务类型。 + /// 默认值:2 + /// + [Newtonsoft.Json.JsonProperty("task_type")] + [System.Text.Json.Serialization.JsonPropertyName("task_type")] + public int TaskType { get; set; } = 2; + + /// + /// 获取或设置规则类型。 + /// + [Newtonsoft.Json.JsonProperty("rule_type")] + [System.Text.Json.Serialization.JsonPropertyName("rule_type")] + public int RuleType { get; set; } + + /// + /// 获取或设置目标次数。 + /// + [Newtonsoft.Json.JsonProperty("target_count")] + [System.Text.Json.Serialization.JsonPropertyName("target_count")] + public int TargetCount { get; set; } + + /// + /// 获取或设置开始时间戳。 + /// + [Newtonsoft.Json.JsonProperty("start_time")] + [System.Text.Json.Serialization.JsonPropertyName("start_time")] + public long StartTimestamp { get; set; } + + /// + /// 获取或设置结束时间戳。 + /// + [Newtonsoft.Json.JsonProperty("end_time")] + [System.Text.Json.Serialization.JsonPropertyName("end_time")] + public long EndTimestamp { get; set; } + + /// + /// 获取或设置挂载链接。 + /// + [Newtonsoft.Json.JsonProperty("mount_link")] + [System.Text.Json.Serialization.JsonPropertyName("mount_link")] + public string? MountLink { get; set; } + + /// + /// 获取或设置发布类型列表。 + /// + [Newtonsoft.Json.JsonProperty("publish_type")] + [System.Text.Json.Serialization.JsonPropertyName("publish_type")] + public IList? PublishTypeList { get; set; } + + /// + /// 获取或设置话题标签列表。 + /// + [Newtonsoft.Json.JsonProperty("tags")] + [System.Text.Json.Serialization.JsonPropertyName("tags")] + public IList? TagList { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsDouyin/Task/AppsDouyinCreateTaskV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsDouyin/Task/AppsDouyinCreateTaskV1Response.cs new file mode 100644 index 00000000..53f722c9 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsDouyin/Task/AppsDouyinCreateTaskV1Response.cs @@ -0,0 +1,28 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/v1/douyin/create_task/ 接口的响应。 + /// + public class AppsDouyinCreateTaskV1Response : DouyinMicroAppResponse + { + public static class Types + { + public class Data + { + /// + /// 获取或设置任务 ID。 + /// + [Newtonsoft.Json.JsonProperty("task_id")] + [System.Text.Json.Serialization.JsonPropertyName("task_id")] + public string TaskId { get; set; } = default!; + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsDouyin/Task/AppsDouyinQueryUserTaskV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsDouyin/Task/AppsDouyinQueryUserTaskV1Request.cs new file mode 100644 index 00000000..d4f551f9 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsDouyin/Task/AppsDouyinQueryUserTaskV1Request.cs @@ -0,0 +1,31 @@ +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/v1/douyin/query_user_task/ 接口的请求。 + /// + public class AppsDouyinQueryUserTaskV1Request : DouyinMicroAppRequest + { + /// + /// 获取或设置小程序 AppId。如果不指定将使用构造 时的 参数。 + /// + [Newtonsoft.Json.JsonProperty("app_id")] + [System.Text.Json.Serialization.JsonPropertyName("app_id")] + public string? AppId { get; set; } + + /// + /// 获取或设置开启任务的用户 OpenId。 + /// + [Newtonsoft.Json.JsonProperty("open_id")] + [System.Text.Json.Serialization.JsonPropertyName("open_id")] + public string OpenId { get; set; } = string.Empty; + + /// + /// 获取或设置任务 ID 列表。 + /// + [Newtonsoft.Json.JsonProperty("task_id")] + [System.Text.Json.Serialization.JsonPropertyName("task_id")] + public IList TaskIdList { get; set; } = new List(); + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsDouyin/Task/AppsDouyinQueryUserTaskV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsDouyin/Task/AppsDouyinQueryUserTaskV1Response.cs new file mode 100644 index 00000000..02c609d5 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsDouyin/Task/AppsDouyinQueryUserTaskV1Response.cs @@ -0,0 +1,112 @@ +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/v1/douyin/query_user_task/ 接口的响应。 + /// + public class AppsDouyinQueryUserTaskV1Response : DouyinMicroAppResponse + { + public static class Types + { + public class Data + { + public static class Types + { + public class TaskInfo + { + public static class Types + { + public class Video + { + /// + /// 获取或设置视频 ID。 + /// + [Newtonsoft.Json.JsonProperty("video_id")] + [System.Text.Json.Serialization.JsonPropertyName("video_id")] + public string VideoId { get; set; } = default!; + + /// + /// 获取或设置视频状态。 + /// + [Newtonsoft.Json.JsonProperty("video_status")] + [System.Text.Json.Serialization.JsonPropertyName("video_status")] + public int VideoStatus { get; set; } + } + } + + /// + /// 获取或设置任务 ID。 + /// + [Newtonsoft.Json.JsonProperty("task_id")] + [System.Text.Json.Serialization.JsonPropertyName("task_id")] + public string TaskId { get; set; } = default!; + + /// + /// 获取或设置是否有效。 + /// + [Newtonsoft.Json.JsonProperty("is_valid")] + [System.Text.Json.Serialization.JsonPropertyName("is_valid")] + public bool IsValid { get; set; } + + /// + /// 获取或设置目标次数。 + /// + [Newtonsoft.Json.JsonProperty("target_count")] + [System.Text.Json.Serialization.JsonPropertyName("target_count")] + public int TargetCount { get; set; } + + /// + /// 获取或设置成功次数。 + /// + [Newtonsoft.Json.JsonProperty("success_count")] + [System.Text.Json.Serialization.JsonPropertyName("success_count")] + public int SuccessCount { get; set; } + + /// + /// 获取或设置是否已完成。 + /// + [Newtonsoft.Json.JsonProperty("completed")] + [System.Text.Json.Serialization.JsonPropertyName("completed")] + public bool IsCompleted { get; set; } + + /// + /// 获取或设置视频列表。 + /// + [Newtonsoft.Json.JsonProperty("video_info")] + [System.Text.Json.Serialization.JsonPropertyName("video_info")] + public Types.Video[] VideoList { get; set; } = default!; + + /// + /// 获取或设置错误码。 + /// + [Newtonsoft.Json.JsonProperty("err_no")] + [System.Text.Json.Serialization.JsonPropertyName("err_no")] + public int ErrorNumber { get; set; } + + /// + /// 获取或设置错误信息。 + /// + [Newtonsoft.Json.JsonProperty("err_msg")] + [System.Text.Json.Serialization.JsonPropertyName("err_msg")] + public string? ErrorMessage { get; set; } + } + } + + /// + /// 获取或设置任务信息字典。 + /// + [Newtonsoft.Json.JsonProperty("task_info_list")] + [System.Text.Json.Serialization.JsonPropertyName("task_info_list")] + public IDictionary TaskInfoMap { get; set; } = default!; + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/AppsBillsResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/AppsBillsResponse.cs deleted file mode 100644 index d6a7aea7..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/AppsBillsResponse.cs +++ /dev/null @@ -1,27 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models -{ - /// - /// 表示 [GET] /apps/bills 接口的响应。 - /// - public class AppsBillsResponse : ByteDanceMicroAppResponse - { - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_no")] - [System.Text.Json.Serialization.JsonPropertyName("err_no")] - public override long ErrorCode { get; set; } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_tips")] - [System.Text.Json.Serialization.JsonPropertyName("err_tips")] - public override string? ErrorMessage { get; set; } - - public override bool IsSuccessful() - { - return base.IsSuccessful() && RawBytes?.Length > 0; - } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/AppsFundBillsResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/AppsFundBillsResponse.cs deleted file mode 100644 index 0ea17d70..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/AppsFundBillsResponse.cs +++ /dev/null @@ -1,27 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models -{ - /// - /// 表示 [GET] /apps/fund/bills 接口的响应。 - /// - public class AppsFundBillsResponse : ByteDanceMicroAppResponse - { - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_no")] - [System.Text.Json.Serialization.JsonPropertyName("err_no")] - public override long ErrorCode { get; set; } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_tips")] - [System.Text.Json.Serialization.JsonPropertyName("err_tips")] - public override string? ErrorMessage { get; set; } - - public override bool IsSuccessful() - { - return base.IsSuccessful() && RawBytes?.Length > 0; - } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/Order/AppsECPayCreateOrderV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/Order/AppsECPayCreateOrderV1Response.cs deleted file mode 100644 index 3db78c33..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/Order/AppsECPayCreateOrderV1Response.cs +++ /dev/null @@ -1,49 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models -{ - /// - /// 表示 [POST] /apps/ecpay/v1/create_order 接口的响应。 - /// - public class AppsECPayCreateOrderV1Response : ByteDanceMicroAppResponse - { - public static class Types - { - public class Data - { - /// - /// 获取或设置订单 ID。 - /// - [Newtonsoft.Json.JsonProperty("order_id")] - [System.Text.Json.Serialization.JsonPropertyName("order_id")] - public string OrderId { get; set; } = default!; - - /// - /// 获取或设置用于调起支付的 Token。 - /// - [Newtonsoft.Json.JsonProperty("order_token")] - [System.Text.Json.Serialization.JsonPropertyName("order_token")] - public string OrderToken { get; set; } = default!; - } - } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_no")] - [System.Text.Json.Serialization.JsonPropertyName("err_no")] - public override long ErrorCode { get; set; } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_tips")] - [System.Text.Json.Serialization.JsonPropertyName("err_tips")] - public override string? ErrorMessage { get; set; } - - /// - /// 获取或设置返回数据。 - /// - [Newtonsoft.Json.JsonProperty("data")] - [System.Text.Json.Serialization.JsonPropertyName("data")] - public Types.Data Data { get; set; } = default!; - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/Order/AppsECPayCreateRefundV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/Order/AppsECPayCreateRefundV1Response.cs deleted file mode 100644 index 0d972fae..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/Order/AppsECPayCreateRefundV1Response.cs +++ /dev/null @@ -1,29 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models -{ - /// - /// 表示 [POST] /apps/ecpay/v1/create_refund 接口的响应。 - /// - public class AppsECPayCreateRefundV1Response : ByteDanceMicroAppResponse - { - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_no")] - [System.Text.Json.Serialization.JsonPropertyName("err_no")] - public override long ErrorCode { get; set; } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_tips")] - [System.Text.Json.Serialization.JsonPropertyName("err_tips")] - public override string? ErrorMessage { get; set; } - - /// - /// 获取或设置担保交易退款单号。 - /// - [Newtonsoft.Json.JsonProperty("refund_no")] - [System.Text.Json.Serialization.JsonPropertyName("refund_no")] - public string RefundNumber { get; set; } = default!; - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/Order/AppsECPayCreateReturnV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/Order/AppsECPayCreateReturnV1Response.cs deleted file mode 100644 index 82554bef..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/Order/AppsECPayCreateReturnV1Response.cs +++ /dev/null @@ -1,36 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models -{ - /// - /// 表示 [POST] /apps/ecpay/v1/create_return 接口的响应。 - /// - public class AppsECPayCreateReturnV1Response : ByteDanceMicroAppResponse - { - public static class Types - { - public class Return : AppsECPayQueryReturnV1Response.Types.Return - { - } - } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_no")] - [System.Text.Json.Serialization.JsonPropertyName("err_no")] - public override long ErrorCode { get; set; } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_tips")] - [System.Text.Json.Serialization.JsonPropertyName("err_tips")] - public override string? ErrorMessage { get; set; } - - /// - /// 获取或设置分账回退信息。 - /// - [Newtonsoft.Json.JsonProperty("return_info")] - [System.Text.Json.Serialization.JsonPropertyName("return_info")] - public Types.Return Return { get; set; } = default!; - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/Order/AppsECPayQueryRefundV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/Order/AppsECPayQueryRefundV1Response.cs deleted file mode 100644 index cebe47b3..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/Order/AppsECPayQueryRefundV1Response.cs +++ /dev/null @@ -1,56 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models -{ - /// - /// 表示 [POST] /apps/ecpay/v1/query_refund 接口的响应。 - /// - public class AppsECPayQueryRefundV1Response : ByteDanceMicroAppResponse - { - public static class Types - { - public class Refund - { - /// - /// 获取或设置担保交易退款单号。 - /// - [Newtonsoft.Json.JsonProperty("refund_no")] - [System.Text.Json.Serialization.JsonPropertyName("refund_no")] - public string RefundNumber { get; set; } = default!; - - /// - /// 获取或设置退款金额(单位:分)。 - /// - [Newtonsoft.Json.JsonProperty("refund_amount")] - [System.Text.Json.Serialization.JsonPropertyName("refund_amount")] - public int RefundAmount { get; set; } - - /// - /// 获取或设置退款状态。 - /// - [Newtonsoft.Json.JsonProperty("refund_status")] - [System.Text.Json.Serialization.JsonPropertyName("refund_status")] - public string RefundStatus { get; set; } = default!; - } - } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_no")] - [System.Text.Json.Serialization.JsonPropertyName("err_no")] - public override long ErrorCode { get; set; } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_tips")] - [System.Text.Json.Serialization.JsonPropertyName("err_tips")] - public override string? ErrorMessage { get; set; } - - /// - /// 获取或设置退款信息。 - /// - [Newtonsoft.Json.JsonProperty("refundInfo")] - [System.Text.Json.Serialization.JsonPropertyName("refundInfo")] - public Types.Refund Refund { get; set; } = default!; - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/Order/AppsECPayQuerySettleV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/Order/AppsECPayQuerySettleV1Response.cs deleted file mode 100644 index e7903ef3..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/Order/AppsECPayQuerySettleV1Response.cs +++ /dev/null @@ -1,56 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models -{ - /// - /// 表示 [POST] /apps/ecpay/v1/query_settle 接口的响应。 - /// - public class AppsECPayQuerySettleV1Response : ByteDanceMicroAppResponse - { - public static class Types - { - public class Settlement - { - /// - /// 获取或设置担保交易分账单号。 - /// - [Newtonsoft.Json.JsonProperty("settle_no")] - [System.Text.Json.Serialization.JsonPropertyName("settle_no")] - public string SettleNumber { get; set; } = default!; - - /// - /// 获取或设置分账金额(单位:分)。 - /// - [Newtonsoft.Json.JsonProperty("settle_amount")] - [System.Text.Json.Serialization.JsonPropertyName("settle_amount")] - public int SettleAmount { get; set; } - - /// - /// 获取或设置分账状态。 - /// - [Newtonsoft.Json.JsonProperty("settle_status")] - [System.Text.Json.Serialization.JsonPropertyName("settle_status")] - public string SettleStatus { get; set; } = default!; - } - } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_no")] - [System.Text.Json.Serialization.JsonPropertyName("err_no")] - public override long ErrorCode { get; set; } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_tips")] - [System.Text.Json.Serialization.JsonPropertyName("err_tips")] - public override string? ErrorMessage { get; set; } - - /// - /// 获取或设置结算信息。 - /// - [Newtonsoft.Json.JsonProperty("settle_info")] - [System.Text.Json.Serialization.JsonPropertyName("settle_info")] - public Types.Settlement Settlement { get; set; } = default!; - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/Order/AppsECPaySettleV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/Order/AppsECPaySettleV1Response.cs deleted file mode 100644 index 7bc34bd4..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/Order/AppsECPaySettleV1Response.cs +++ /dev/null @@ -1,29 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models -{ - /// - /// 表示 [POST] /apps/ecpay/v1/settle 接口的响应。 - /// - public class AppsECPaySettleV1Response : ByteDanceMicroAppResponse - { - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_no")] - [System.Text.Json.Serialization.JsonPropertyName("err_no")] - public override long ErrorCode { get; set; } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_tips")] - [System.Text.Json.Serialization.JsonPropertyName("err_tips")] - public override string? ErrorMessage { get; set; } - - /// - /// 获取或设置担保交易分帐单号。 - /// - [Newtonsoft.Json.JsonProperty("settle_no")] - [System.Text.Json.Serialization.JsonPropertyName("settle_no")] - public string SettleNumber { get; set; } = default!; - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/SaaS/Apply/AppsECPaySaaSCreateMerchantResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/SaaS/Apply/AppsECPaySaaSCreateMerchantResponse.cs deleted file mode 100644 index 30f733c8..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/SaaS/Apply/AppsECPaySaaSCreateMerchantResponse.cs +++ /dev/null @@ -1,36 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models -{ - /// - /// 表示 [POST] /apps/ecpay/saas/create_merchant 接口的响应。 - /// - public class AppsECPaySaaSCreateMerchantResponse : ByteDanceMicroAppResponse - { - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_no")] - [System.Text.Json.Serialization.JsonPropertyName("err_no")] - public override long ErrorCode { get; set; } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_tips")] - [System.Text.Json.Serialization.JsonPropertyName("err_tips")] - public override string? ErrorMessage { get; set; } - - /// - /// 获取或设置申请单 ID。 - /// - [Newtonsoft.Json.JsonProperty("apply_id")] - [System.Text.Json.Serialization.JsonPropertyName("apply_id")] - public string ApplyId { get; set; } = default!; - - /// - /// 获取或设置商户号。 - /// - [Newtonsoft.Json.JsonProperty("merchant_id")] - [System.Text.Json.Serialization.JsonPropertyName("merchant_id")] - public string MerchantId { get; set; } = default!; - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/SaaS/Apply/AppsECPaySaaSImageUploadResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/SaaS/Apply/AppsECPaySaaSImageUploadResponse.cs deleted file mode 100644 index a8ff18e0..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/SaaS/Apply/AppsECPaySaaSImageUploadResponse.cs +++ /dev/null @@ -1,29 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models -{ - /// - /// 表示 [POST] /apps/ecpay/saas/image_upload 接口的响应。 - /// - public class AppsECPaySaaSImageUploadResponse : ByteDanceMicroAppResponse - { - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_no")] - [System.Text.Json.Serialization.JsonPropertyName("err_no")] - public override long ErrorCode { get; set; } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_tips")] - [System.Text.Json.Serialization.JsonPropertyName("err_tips")] - public override string? ErrorMessage { get; set; } - - /// - /// 获取或设置图片 ID。 - /// - [Newtonsoft.Json.JsonProperty("image_id")] - [System.Text.Json.Serialization.JsonPropertyName("image_id")] - public string ImageId { get; set; } = default!; - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/SaaS/PageLinks/AppsECPaySaaSAddMerchantResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/SaaS/PageLinks/AppsECPaySaaSAddMerchantResponse.cs deleted file mode 100644 index e9c2e5d2..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/SaaS/PageLinks/AppsECPaySaaSAddMerchantResponse.cs +++ /dev/null @@ -1,36 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models -{ - /// - /// 表示 [POST] /apps/ecpay/saas/add_merchant 接口的响应。 - /// - public class AppsECPaySaaSAddMerchantResponse : ByteDanceMicroAppResponse - { - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_no")] - [System.Text.Json.Serialization.JsonPropertyName("err_no")] - public override long ErrorCode { get; set; } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_tips")] - [System.Text.Json.Serialization.JsonPropertyName("err_tips")] - public override string? ErrorMessage { get; set; } - - /// - /// 获取或设置请求页面链接。 - /// - [Newtonsoft.Json.JsonProperty("url")] - [System.Text.Json.Serialization.JsonPropertyName("url")] - public string Url { get; set; } = default!; - - /// - /// 获取或设置商户号。 - /// - [Newtonsoft.Json.JsonProperty("merchant_id")] - [System.Text.Json.Serialization.JsonPropertyName("merchant_id")] - public string MerchantId { get; set; } = default!; - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/SaaS/PageLinks/AppsECPaySaaSAddSubMerchantResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/SaaS/PageLinks/AppsECPaySaaSAddSubMerchantResponse.cs deleted file mode 100644 index 7bc6d1a6..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/SaaS/PageLinks/AppsECPaySaaSAddSubMerchantResponse.cs +++ /dev/null @@ -1,36 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models -{ - /// - /// 表示 [POST] /apps/ecpay/saas/add_sub_merchant 接口的响应。 - /// - public class AppsECPaySaaSAddSubMerchantResponse : ByteDanceMicroAppResponse - { - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_no")] - [System.Text.Json.Serialization.JsonPropertyName("err_no")] - public override long ErrorCode { get; set; } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_tips")] - [System.Text.Json.Serialization.JsonPropertyName("err_tips")] - public override string? ErrorMessage { get; set; } - - /// - /// 获取或设置请求页面链接。 - /// - [Newtonsoft.Json.JsonProperty("url")] - [System.Text.Json.Serialization.JsonPropertyName("url")] - public string Url { get; set; } = default!; - - /// - /// 获取或设置商户号。 - /// - [Newtonsoft.Json.JsonProperty("merchant_id")] - [System.Text.Json.Serialization.JsonPropertyName("merchant_id")] - public string MerchantId { get; set; } = default!; - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/SaaS/PageLinks/AppsECPaySaaSAppAddSubMerchantResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/SaaS/PageLinks/AppsECPaySaaSAppAddSubMerchantResponse.cs deleted file mode 100644 index 6cdf8746..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/SaaS/PageLinks/AppsECPaySaaSAppAddSubMerchantResponse.cs +++ /dev/null @@ -1,36 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models -{ - /// - /// 表示 [POST] /apps/ecpay/saas/app_add_sub_merchant 接口的响应。 - /// - public class AppsECPaySaaSAppAddSubMerchantResponse : ByteDanceMicroAppResponse - { - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_no")] - [System.Text.Json.Serialization.JsonPropertyName("err_no")] - public override long ErrorCode { get; set; } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_tips")] - [System.Text.Json.Serialization.JsonPropertyName("err_tips")] - public override string? ErrorMessage { get; set; } - - /// - /// 获取或设置请求页面链接。 - /// - [Newtonsoft.Json.JsonProperty("url")] - [System.Text.Json.Serialization.JsonPropertyName("url")] - public string Url { get; set; } = default!; - - /// - /// 获取或设置商户号。 - /// - [Newtonsoft.Json.JsonProperty("merchant_id")] - [System.Text.Json.Serialization.JsonPropertyName("merchant_id")] - public string MerchantId { get; set; } = default!; - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/SaaS/PageLinks/AppsECPaySaaSGetAppMerchantResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/SaaS/PageLinks/AppsECPaySaaSGetAppMerchantResponse.cs deleted file mode 100644 index ca278d2b..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/SaaS/PageLinks/AppsECPaySaaSGetAppMerchantResponse.cs +++ /dev/null @@ -1,36 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models -{ - /// - /// 表示 [POST] /apps/ecpay/saas/get_app_merchant 接口的响应。 - /// - public class AppsECPaySaaSGetAppMerchantResponse : ByteDanceMicroAppResponse - { - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_no")] - [System.Text.Json.Serialization.JsonPropertyName("err_no")] - public override long ErrorCode { get; set; } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_tips")] - [System.Text.Json.Serialization.JsonPropertyName("err_tips")] - public override string? ErrorMessage { get; set; } - - /// - /// 获取或设置请求页面链接。 - /// - [Newtonsoft.Json.JsonProperty("url")] - [System.Text.Json.Serialization.JsonPropertyName("url")] - public string Url { get; set; } = default!; - - /// - /// 获取或设置商户号。 - /// - [Newtonsoft.Json.JsonProperty("merchant_id")] - [System.Text.Json.Serialization.JsonPropertyName("merchant_id")] - public string MerchantId { get; set; } = default!; - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/SaaS/Withdraw/AppsECPaySaaSMerchantWithdrawResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/SaaS/Withdraw/AppsECPaySaaSMerchantWithdrawResponse.cs deleted file mode 100644 index 5a5a4f84..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/SaaS/Withdraw/AppsECPaySaaSMerchantWithdrawResponse.cs +++ /dev/null @@ -1,29 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models -{ - /// - /// 表示 [POST] /apps/ecpay/saas/merchant_withdraw 接口的响应。 - /// - public class AppsECPaySaaSMerchantWithdrawResponse : ByteDanceMicroAppResponse - { - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_no")] - [System.Text.Json.Serialization.JsonPropertyName("err_no")] - public override long ErrorCode { get; set; } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_tips")] - [System.Text.Json.Serialization.JsonPropertyName("err_tips")] - public override string? ErrorMessage { get; set; } - - /// - /// 获取或设置平台提现单号。 - /// - [Newtonsoft.Json.JsonProperty("order_id")] - [System.Text.Json.Serialization.JsonPropertyName("order_id")] - public string OrderId { get; set; } = default!; - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsItem/AppsItemBCGetBaseV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsItem/AppsItemBCGetBaseV1Request.cs new file mode 100644 index 00000000..94ae1414 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsItem/AppsItemBCGetBaseV1Request.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [GET] /apps/v1/item_bc/get_base/ 接口的请求。 + /// + public class AppsItemBCGetBaseV1Request : AppsItemGetBaseV1Request + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsItem/AppsItemBCGetBaseV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsItem/AppsItemBCGetBaseV1Response.cs new file mode 100644 index 00000000..38565820 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsItem/AppsItemBCGetBaseV1Response.cs @@ -0,0 +1,35 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [GET] /apps/v1/item_bc/get_base/ 接口的响应。 + /// + public class AppsItemBCGetBaseV1Response : DouyinMicroAppResponse + { + public static class Types + { + public class Data + { + public static class Types + { + public class Result : AppsItemGetBaseV1Response.Types.Data.Types.Result + { + } + } + + /// + /// 获取或设置返回结果。 + /// + [Newtonsoft.Json.JsonProperty("result")] + [System.Text.Json.Serialization.JsonPropertyName("result")] + public Types.Result Result { get; set; } = default!; + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsItem/AppsItemBCGetCommentV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsItem/AppsItemBCGetCommentV1Request.cs new file mode 100644 index 00000000..f3e75698 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsItem/AppsItemBCGetCommentV1Request.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [GET] /apps/v1/item_bc/get_comment/ 接口的请求。 + /// + public class AppsItemBCGetCommentV1Request : AppsItemGetCommentV1Request + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsItem/AppsItemBCGetCommentV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsItem/AppsItemBCGetCommentV1Response.cs new file mode 100644 index 00000000..1a4fa988 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsItem/AppsItemBCGetCommentV1Response.cs @@ -0,0 +1,35 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [GET] /apps/v1/item_bc/get_comment/ 接口的响应。 + /// + public class AppsItemBCGetCommentV1Response : DouyinMicroAppResponse + { + public static class Types + { + public class Data + { + public static class Types + { + public class Result : AppsItemGetCommentV1Response.Types.Data.Types.Result + { + } + } + + /// + /// 获取或设置返回结果列表。 + /// + [Newtonsoft.Json.JsonProperty("result_list")] + [System.Text.Json.Serialization.JsonPropertyName("result_list")] + public Types.Result[] ResultList { get; set; } = default!; + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsItem/AppsItemBCGetLikeV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsItem/AppsItemBCGetLikeV1Request.cs new file mode 100644 index 00000000..c273e4b6 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsItem/AppsItemBCGetLikeV1Request.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [GET] /apps/v1/item_bc/get_like/ 接口的请求。 + /// + public class AppsItemBCGetLikeV1Request : AppsItemGetLikeV1Request + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsItem/AppsItemBCGetLikeV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsItem/AppsItemBCGetLikeV1Response.cs new file mode 100644 index 00000000..f0683916 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsItem/AppsItemBCGetLikeV1Response.cs @@ -0,0 +1,35 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [GET] /apps/v1/item_bc/get_like/ 接口的响应。 + /// + public class AppsItemBCGetLikeV1Response : DouyinMicroAppResponse + { + public static class Types + { + public class Data + { + public static class Types + { + public class Result : AppsItemGetLikeV1Response.Types.Data.Types.Result + { + } + } + + /// + /// 获取或设置返回结果列表。 + /// + [Newtonsoft.Json.JsonProperty("result_list")] + [System.Text.Json.Serialization.JsonPropertyName("result_list")] + public Types.Result[] ResultList { get; set; } = default!; + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsItem/AppsItemBCGetPlayV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsItem/AppsItemBCGetPlayV1Request.cs new file mode 100644 index 00000000..a765ffc7 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsItem/AppsItemBCGetPlayV1Request.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [GET] /apps/v1/item_bc/get_play/ 接口的请求。 + /// + public class AppsItemBCGetPlayV1Request : AppsItemGetPlayV1Request + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsItem/AppsItemBCGetPlayV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsItem/AppsItemBCGetPlayV1Response.cs new file mode 100644 index 00000000..74dab021 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsItem/AppsItemBCGetPlayV1Response.cs @@ -0,0 +1,35 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [GET] /apps/v1/item_bc/get_play/ 接口的响应。 + /// + public class AppsItemBCGetPlayV1Response : DouyinMicroAppResponse + { + public static class Types + { + public class Data + { + public static class Types + { + public class Result : AppsItemGetPlayV1Response.Types.Data.Types.Result + { + } + } + + /// + /// 获取或设置返回结果列表。 + /// + [Newtonsoft.Json.JsonProperty("result_list")] + [System.Text.Json.Serialization.JsonPropertyName("result_list")] + public Types.Result[] ResultList { get; set; } = default!; + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsItem/AppsItemBCGetShareV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsItem/AppsItemBCGetShareV1Request.cs new file mode 100644 index 00000000..2e13dd74 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsItem/AppsItemBCGetShareV1Request.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [GET] /apps/v1/item_bc/get_share/ 接口的请求。 + /// + public class AppsItemBCGetShareV1Request : AppsItemGetShareV1Request + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsItem/AppsItemBCGetShareV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsItem/AppsItemBCGetShareV1Response.cs new file mode 100644 index 00000000..6293a6d3 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsItem/AppsItemBCGetShareV1Response.cs @@ -0,0 +1,35 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [GET] /apps/v1/item_bc/get_share/ 接口的响应。 + /// + public class AppsItemBCGetShareV1Response : DouyinMicroAppResponse + { + public static class Types + { + public class Data + { + public static class Types + { + public class Result : AppsItemGetShareV1Response.Types.Data.Types.Result + { + } + } + + /// + /// 获取或设置返回结果列表。 + /// + [Newtonsoft.Json.JsonProperty("result_list")] + [System.Text.Json.Serialization.JsonPropertyName("result_list")] + public Types.Result[] ResultList { get; set; } = default!; + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsItem/AppsItemGetBaseV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsItem/AppsItemGetBaseV1Request.cs new file mode 100644 index 00000000..7d7e741b --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsItem/AppsItemGetBaseV1Request.cs @@ -0,0 +1,22 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [GET] /apps/v1/item/get_base/ 接口的请求。 + /// + public class AppsItemGetBaseV1Request : DouyinMicroAppRequest + { + /// + /// 获取或设置用户的 OpenId。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string OpenId { get; set; } = string.Empty; + + /// + /// 获取或设置视频 ID。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string ItemId { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsItem/AppsItemGetBaseV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsItem/AppsItemGetBaseV1Response.cs new file mode 100644 index 00000000..276ed837 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsItem/AppsItemGetBaseV1Response.cs @@ -0,0 +1,69 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [GET] /apps/v1/item/get_base/ 接口的响应。 + /// + public class AppsItemGetBaseV1Response : DouyinMicroAppResponse + { + public static class Types + { + public class Data + { + public static class Types + { + public class Result + { + /// + /// 获取或设置平均播放时长(单位:秒)。 + /// + [Newtonsoft.Json.JsonProperty("avg_play_duration")] + [System.Text.Json.Serialization.JsonPropertyName("avg_play_duration")] + public decimal AveragePlayDuration { get; set; } + + /// + /// 获取或设置播放数。 + /// + [Newtonsoft.Json.JsonProperty("total_play")] + [System.Text.Json.Serialization.JsonPropertyName("total_play")] + public long TotalPlayCount { get; set; } + + /// + /// 获取或设置评论数。 + /// + [Newtonsoft.Json.JsonProperty("total_comment")] + [System.Text.Json.Serialization.JsonPropertyName("total_comment")] + public long TotalCommentCount { get; set; } + + /// + /// 获取或设置点赞数。 + /// + [Newtonsoft.Json.JsonProperty("total_like")] + [System.Text.Json.Serialization.JsonPropertyName("total_like")] + public long TotalLikeCount { get; set; } + + /// + /// 获取或设置分享数。 + /// + [Newtonsoft.Json.JsonProperty("total_share")] + [System.Text.Json.Serialization.JsonPropertyName("total_share")] + public long TotalShareCount { get; set; } + } + } + + /// + /// 获取或设置返回结果。 + /// + [Newtonsoft.Json.JsonProperty("result")] + [System.Text.Json.Serialization.JsonPropertyName("result")] + public Types.Result Result { get; set; } = default!; + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsItem/AppsItemGetCommentV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsItem/AppsItemGetCommentV1Request.cs new file mode 100644 index 00000000..8bcd6c5b --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsItem/AppsItemGetCommentV1Request.cs @@ -0,0 +1,29 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [GET] /apps/v1/item/get_comment/ 接口的请求。 + /// + public class AppsItemGetCommentV1Request : DouyinMicroAppRequest + { + /// + /// 获取或设置用户的 OpenId。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string OpenId { get; set; } = string.Empty; + + /// + /// 获取或设置视频 ID。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string ItemId { get; set; } = string.Empty; + + /// + /// 获取或设置数据范围类型。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public int DataType { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsItem/AppsItemGetCommentV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsItem/AppsItemGetCommentV1Response.cs new file mode 100644 index 00000000..7f4f0356 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsItem/AppsItemGetCommentV1Response.cs @@ -0,0 +1,48 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [GET] /apps/v1/item/get_comment/ 接口的响应。 + /// + public class AppsItemGetCommentV1Response : DouyinMicroAppResponse + { + public static class Types + { + public class Data + { + public static class Types + { + public class Result + { + /// + /// 获取或设置日期字符串(格式:yyyy-MM-dd)。 + /// + [Newtonsoft.Json.JsonProperty("date")] + [System.Text.Json.Serialization.JsonPropertyName("date")] + public string DateString { get; set; } = default!; + + /// + /// 获取或设置评论数。 + /// + [Newtonsoft.Json.JsonProperty("comment")] + [System.Text.Json.Serialization.JsonPropertyName("comment")] + public long CommentCount { get; set; } + } + } + + /// + /// 获取或设置返回结果。 + /// + [Newtonsoft.Json.JsonProperty("result_list")] + [System.Text.Json.Serialization.JsonPropertyName("result_list")] + public Types.Result[] ResultList { get; set; } = default!; + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsItem/AppsItemGetLikeV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsItem/AppsItemGetLikeV1Request.cs new file mode 100644 index 00000000..4434fe3d --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsItem/AppsItemGetLikeV1Request.cs @@ -0,0 +1,29 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [GET] /apps/v1/item/get_like/ 接口的请求。 + /// + public class AppsItemGetLikeV1Request : DouyinMicroAppRequest + { + /// + /// 获取或设置用户的 OpenId。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string OpenId { get; set; } = string.Empty; + + /// + /// 获取或设置视频 ID。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string ItemId { get; set; } = string.Empty; + + /// + /// 获取或设置数据范围类型。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public int DataType { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsItem/AppsItemGetLikeV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsItem/AppsItemGetLikeV1Response.cs new file mode 100644 index 00000000..8d3adc6d --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsItem/AppsItemGetLikeV1Response.cs @@ -0,0 +1,48 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [GET] /apps/v1/item/get_like/ 接口的响应。 + /// + public class AppsItemGetLikeV1Response : DouyinMicroAppResponse + { + public static class Types + { + public class Data + { + public static class Types + { + public class Result + { + /// + /// 获取或设置日期字符串(格式:yyyy-MM-dd)。 + /// + [Newtonsoft.Json.JsonProperty("date")] + [System.Text.Json.Serialization.JsonPropertyName("date")] + public string DateString { get; set; } = default!; + + /// + /// 获取或设置点赞数。 + /// + [Newtonsoft.Json.JsonProperty("like")] + [System.Text.Json.Serialization.JsonPropertyName("like")] + public long LikeCount { get; set; } + } + } + + /// + /// 获取或设置返回结果。 + /// + [Newtonsoft.Json.JsonProperty("result_list")] + [System.Text.Json.Serialization.JsonPropertyName("result_list")] + public Types.Result[] ResultList { get; set; } = default!; + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsItem/AppsItemGetPlayV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsItem/AppsItemGetPlayV1Request.cs new file mode 100644 index 00000000..846b282c --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsItem/AppsItemGetPlayV1Request.cs @@ -0,0 +1,29 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [GET] /apps/v1/item/get_play/ 接口的请求。 + /// + public class AppsItemGetPlayV1Request : DouyinMicroAppRequest + { + /// + /// 获取或设置用户的 OpenId。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string OpenId { get; set; } = string.Empty; + + /// + /// 获取或设置视频 ID。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string ItemId { get; set; } = string.Empty; + + /// + /// 获取或设置数据范围类型。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public int DataType { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsItem/AppsItemGetPlayV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsItem/AppsItemGetPlayV1Response.cs new file mode 100644 index 00000000..06e8ca76 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsItem/AppsItemGetPlayV1Response.cs @@ -0,0 +1,48 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [GET] /apps/v1/item/get_play/ 接口的响应。 + /// + public class AppsItemGetPlayV1Response : DouyinMicroAppResponse + { + public static class Types + { + public class Data + { + public static class Types + { + public class Result + { + /// + /// 获取或设置日期字符串(格式:yyyy-MM-dd)。 + /// + [Newtonsoft.Json.JsonProperty("date")] + [System.Text.Json.Serialization.JsonPropertyName("date")] + public string DateString { get; set; } = default!; + + /// + /// 获取或设置播放数。 + /// + [Newtonsoft.Json.JsonProperty("play")] + [System.Text.Json.Serialization.JsonPropertyName("play")] + public long PlayCount { get; set; } + } + } + + /// + /// 获取或设置返回结果。 + /// + [Newtonsoft.Json.JsonProperty("result_list")] + [System.Text.Json.Serialization.JsonPropertyName("result_list")] + public Types.Result[] ResultList { get; set; } = default!; + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsItem/AppsItemGetShareV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsItem/AppsItemGetShareV1Request.cs new file mode 100644 index 00000000..f6aabea6 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsItem/AppsItemGetShareV1Request.cs @@ -0,0 +1,29 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [GET] /apps/v1/item/get_share/ 接口的请求。 + /// + public class AppsItemGetShareV1Request : DouyinMicroAppRequest + { + /// + /// 获取或设置用户的 OpenId。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string OpenId { get; set; } = string.Empty; + + /// + /// 获取或设置视频 ID。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string ItemId { get; set; } = string.Empty; + + /// + /// 获取或设置数据范围类型。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public int DataType { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsItem/AppsItemGetShareV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsItem/AppsItemGetShareV1Response.cs new file mode 100644 index 00000000..6b079138 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsItem/AppsItemGetShareV1Response.cs @@ -0,0 +1,48 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [GET] /apps/v1/item/get_share/ 接口的响应。 + /// + public class AppsItemGetShareV1Response : DouyinMicroAppResponse + { + public static class Types + { + public class Data + { + public static class Types + { + public class Result + { + /// + /// 获取或设置日期字符串(格式:yyyy-MM-dd)。 + /// + [Newtonsoft.Json.JsonProperty("date")] + [System.Text.Json.Serialization.JsonPropertyName("date")] + public string DateString { get; set; } = default!; + + /// + /// 获取或设置分享数。 + /// + [Newtonsoft.Json.JsonProperty("share")] + [System.Text.Json.Serialization.JsonPropertyName("share")] + public long ShareCount { get; set; } + } + } + + /// + /// 获取或设置返回结果。 + /// + [Newtonsoft.Json.JsonProperty("result_list")] + [System.Text.Json.Serialization.JsonPropertyName("result_list")] + public Types.Result[] ResultList { get; set; } = default!; + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsItem/Comment/AppsItemBCListCommentReplyV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsItem/Comment/AppsItemBCListCommentReplyV1Request.cs new file mode 100644 index 00000000..af43060e --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsItem/Comment/AppsItemBCListCommentReplyV1Request.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [GET] /apps/v1/item_bc/list_comment_reply/ 接口的请求。 + /// + public class AppsItemBCListCommentReplyV1Request : AppsItemListCommentReplyV1Request + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsItem/Comment/AppsItemBCListCommentReplyV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsItem/Comment/AppsItemBCListCommentReplyV1Response.cs new file mode 100644 index 00000000..bc531271 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsItem/Comment/AppsItemBCListCommentReplyV1Response.cs @@ -0,0 +1,49 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [GET] /apps/v1/item_bc/list_comment_reply/ 接口的响应。 + /// + public class AppsItemBCListCommentReplyV1Response : DouyinMicroAppResponse + { + public static class Types + { + public class Data + { + public static class Types + { + public class Reply : AppsItemListCommentReplyV1Response.Types.Data.Types.Reply + { + } + } + + /// + /// 获取或设置回复列表。 + /// + [Newtonsoft.Json.JsonProperty("list")] + [System.Text.Json.Serialization.JsonPropertyName("list")] + public Types.Reply[] ReplyList { get; set; } = default!; + + /// + /// 获取或设置下一页分页游标。 + /// + [Newtonsoft.Json.JsonProperty("cursor")] + [System.Text.Json.Serialization.JsonPropertyName("cursor")] + public long? NextCursor { get; set; } + + /// + /// 获取或设置是否还有更多数据。 + /// + [Newtonsoft.Json.JsonProperty("has_more")] + [System.Text.Json.Serialization.JsonPropertyName("has_more")] + public bool HasMore { get; set; } + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsItem/Comment/AppsItemBCListCommentV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsItem/Comment/AppsItemBCListCommentV1Request.cs new file mode 100644 index 00000000..122c1f97 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsItem/Comment/AppsItemBCListCommentV1Request.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [GET] /apps/v1/item_bc/list_comment/ 接口的请求。 + /// + public class AppsItemBCListCommentV1Request : AppsItemListCommentV1Request + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsItem/Comment/AppsItemBCListCommentV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsItem/Comment/AppsItemBCListCommentV1Response.cs new file mode 100644 index 00000000..6ddbda3d --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsItem/Comment/AppsItemBCListCommentV1Response.cs @@ -0,0 +1,49 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [GET] /apps/v1/item_bc/list_comment/ 接口的响应。 + /// + public class AppsItemBCListCommentV1Response : DouyinMicroAppResponse + { + public static class Types + { + public class Data + { + public static class Types + { + public class Comment : AppsItemListCommentV1Response.Types.Data.Types.Comment + { + } + } + + /// + /// 获取或设置评论列表。 + /// + [Newtonsoft.Json.JsonProperty("list")] + [System.Text.Json.Serialization.JsonPropertyName("list")] + public Types.Comment[] CommentList { get; set; } = default!; + + /// + /// 获取或设置下一页分页游标。 + /// + [Newtonsoft.Json.JsonProperty("cursor")] + [System.Text.Json.Serialization.JsonPropertyName("cursor")] + public long? NextCursor { get; set; } + + /// + /// 获取或设置是否还有更多数据。 + /// + [Newtonsoft.Json.JsonProperty("has_more")] + [System.Text.Json.Serialization.JsonPropertyName("has_more")] + public bool HasMore { get; set; } + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsItem/Comment/AppsItemBCReplyCommentV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsItem/Comment/AppsItemBCReplyCommentV1Request.cs new file mode 100644 index 00000000..7b47192c --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsItem/Comment/AppsItemBCReplyCommentV1Request.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/v1/item_bc/reply_comment/ 接口的请求。 + /// + public class AppsItemBCReplyCommentV1Request : AppsItemReplyCommentV1Request + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsItem/Comment/AppsItemBCReplyCommentV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsItem/Comment/AppsItemBCReplyCommentV1Response.cs new file mode 100644 index 00000000..34bf3378 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsItem/Comment/AppsItemBCReplyCommentV1Response.cs @@ -0,0 +1,22 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/v1/item_bc/reply_comment/ 接口的响应。 + /// + public class AppsItemBCReplyCommentV1Response : DouyinMicroAppResponse + { + public static class Types + { + public class Data : AppsItemReplyCommentV1Response.Types.Data + { + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsItem/Comment/AppsItemBCTopCommentV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsItem/Comment/AppsItemBCTopCommentV1Request.cs new file mode 100644 index 00000000..3d0c811c --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsItem/Comment/AppsItemBCTopCommentV1Request.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/v1/item_bc/top_comment/ 接口的请求。 + /// + public class AppsItemBCTopCommentV1Request : AppsItemTopCommentV1Request + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsItem/Comment/AppsItemBCTopCommentV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsItem/Comment/AppsItemBCTopCommentV1Response.cs new file mode 100644 index 00000000..d549055f --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsItem/Comment/AppsItemBCTopCommentV1Response.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/v1/item_bc/top_comment/ 接口的响应。 + /// + public class AppsItemBCTopCommentV1Response : DouyinMicroAppResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsItem/Comment/AppsItemListCommentReplyV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsItem/Comment/AppsItemListCommentReplyV1Request.cs new file mode 100644 index 00000000..55f01b03 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsItem/Comment/AppsItemListCommentReplyV1Request.cs @@ -0,0 +1,52 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [GET] /apps/v1/item/list_comment_reply/ 接口的请求。 + /// + public class AppsItemListCommentReplyV1Request : DouyinMicroAppRequest + { + /// + /// 获取或设置用户的 OpenId。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string OpenId { get; set; } = string.Empty; + + /// + /// 获取或设置视频 ID。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string ItemId { get; set; } = string.Empty; + + /// + /// 获取或设置评论 ID。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string CommentId { get; set; } = string.Empty; + + /// + /// 获取或设置分页游标。 + /// 默认值:0 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public long PageCursor { get; set; } = 0; + + /// + /// 获取或设置分页每页数量。 + /// 默认值:10 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public int PageSize { get; set; } = 10; + + /// + /// 获取或设置排序方式。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string? SortType { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsItem/Comment/AppsItemListCommentReplyV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsItem/Comment/AppsItemListCommentReplyV1Response.cs new file mode 100644 index 00000000..0a3cb771 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsItem/Comment/AppsItemListCommentReplyV1Response.cs @@ -0,0 +1,118 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [GET] /apps/v1/item/list_comment_reply/ 接口的响应。 + /// + public class AppsItemListCommentReplyV1Response : DouyinMicroAppResponse + { + public static class Types + { + public class Data + { + public static class Types + { + public class Reply + { + /// + /// 获取或设置评论 ID。 + /// + [Newtonsoft.Json.JsonProperty("comment_id")] + [System.Text.Json.Serialization.JsonPropertyName("comment_id")] + public string CommentId { get; set; } = default!; + + /// + /// 获取或设置回复评论 ID。 + /// + [Newtonsoft.Json.JsonProperty("reply_comment_id")] + [System.Text.Json.Serialization.JsonPropertyName("reply_comment_id")] + public string? ReplyCommentId { get; set; } + + /// + /// 获取或设置用户 ID。 + /// + [Newtonsoft.Json.JsonProperty("comment_user_id")] + [System.Text.Json.Serialization.JsonPropertyName("comment_user_id")] + public string UserId { get; set; } = default!; + + /// + /// 获取或设置评论内容。 + /// + [Newtonsoft.Json.JsonProperty("content")] + [System.Text.Json.Serialization.JsonPropertyName("content")] + public string Content { get; set; } = default!; + + /// + /// 获取或设置用户头像 URL。 + /// + [Newtonsoft.Json.JsonProperty("avatar")] + [System.Text.Json.Serialization.JsonPropertyName("avatar")] + public string AvatarUrl { get; set; } = default!; + + /// + /// 获取或设置用户昵称。 + /// + [Newtonsoft.Json.JsonProperty("nick_name")] + [System.Text.Json.Serialization.JsonPropertyName("nick_name")] + public string Nickname { get; set; } = default!; + + /// + /// 获取或设置创建时间戳。 + /// + [Newtonsoft.Json.JsonProperty("create_time")] + [System.Text.Json.Serialization.JsonPropertyName("create_time")] + public long CreateTimestamp { get; set; } + + /// + /// 获取或设置点赞数。 + /// + [Newtonsoft.Json.JsonProperty("digg_count")] + [System.Text.Json.Serialization.JsonPropertyName("digg_count")] + public int DiggCount { get; set; } + + /// + /// 获取或设置回复数。 + /// + [Newtonsoft.Json.JsonProperty("reply_comment_total")] + [System.Text.Json.Serialization.JsonPropertyName("reply_comment_total")] + public int ReplyCount { get; set; } + + /// + /// 获取或设置是否置顶。 + /// + [Newtonsoft.Json.JsonProperty("top")] + [System.Text.Json.Serialization.JsonPropertyName("top")] + public bool IsTop { get; set; } + } + } + + /// + /// 获取或设置回复列表。 + /// + [Newtonsoft.Json.JsonProperty("list")] + [System.Text.Json.Serialization.JsonPropertyName("list")] + public Types.Reply[] ReplyList { get; set; } = default!; + + /// + /// 获取或设置下一页分页游标。 + /// + [Newtonsoft.Json.JsonProperty("cursor")] + [System.Text.Json.Serialization.JsonPropertyName("cursor")] + public long? NextCursor { get; set; } + + /// + /// 获取或设置是否还有更多数据。 + /// + [Newtonsoft.Json.JsonProperty("has_more")] + [System.Text.Json.Serialization.JsonPropertyName("has_more")] + public bool HasMore { get; set; } + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsItem/Comment/AppsItemListCommentV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsItem/Comment/AppsItemListCommentV1Request.cs new file mode 100644 index 00000000..d5b54467 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsItem/Comment/AppsItemListCommentV1Request.cs @@ -0,0 +1,45 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [GET] /apps/v1/item/list_comment/ 接口的请求。 + /// + public class AppsItemListCommentV1Request : DouyinMicroAppRequest + { + /// + /// 获取或设置用户的 OpenId。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string OpenId { get; set; } = string.Empty; + + /// + /// 获取或设置视频 ID。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string ItemId { get; set; } = string.Empty; + + /// + /// 获取或设置分页游标。 + /// 默认值:0 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public long PageCursor { get; set; } = 0; + + /// + /// 获取或设置分页每页数量。 + /// 默认值:10 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public int PageSize { get; set; } = 10; + + /// + /// 获取或设置排序方式。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string? SortType { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsItem/Comment/AppsItemListCommentV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsItem/Comment/AppsItemListCommentV1Response.cs new file mode 100644 index 00000000..6bdd31d9 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsItem/Comment/AppsItemListCommentV1Response.cs @@ -0,0 +1,111 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [GET] /apps/v1/item/list_comment/ 接口的响应。 + /// + public class AppsItemListCommentV1Response : DouyinMicroAppResponse + { + public static class Types + { + public class Data + { + public static class Types + { + public class Comment + { + /// + /// 获取或设置评论 ID。 + /// + [Newtonsoft.Json.JsonProperty("comment_id")] + [System.Text.Json.Serialization.JsonPropertyName("comment_id")] + public string CommentId { get; set; } = default!; + + /// + /// 获取或设置用户 ID。 + /// + [Newtonsoft.Json.JsonProperty("comment_user_id")] + [System.Text.Json.Serialization.JsonPropertyName("comment_user_id")] + public string UserId { get; set; } = default!; + + /// + /// 获取或设置评论内容。 + /// + [Newtonsoft.Json.JsonProperty("content")] + [System.Text.Json.Serialization.JsonPropertyName("content")] + public string Content { get; set; } = default!; + + /// + /// 获取或设置用户头像 URL。 + /// + [Newtonsoft.Json.JsonProperty("avatar")] + [System.Text.Json.Serialization.JsonPropertyName("avatar")] + public string AvatarUrl { get; set; } = default!; + + /// + /// 获取或设置用户昵称。 + /// + [Newtonsoft.Json.JsonProperty("nick_name")] + [System.Text.Json.Serialization.JsonPropertyName("nick_name")] + public string Nickname { get; set; } = default!; + + /// + /// 获取或设置创建时间戳。 + /// + [Newtonsoft.Json.JsonProperty("create_time")] + [System.Text.Json.Serialization.JsonPropertyName("create_time")] + public long CreateTimestamp { get; set; } + + /// + /// 获取或设置点赞数。 + /// + [Newtonsoft.Json.JsonProperty("digg_count")] + [System.Text.Json.Serialization.JsonPropertyName("digg_count")] + public int DiggCount { get; set; } + + /// + /// 获取或设置回复数。 + /// + [Newtonsoft.Json.JsonProperty("reply_comment_total")] + [System.Text.Json.Serialization.JsonPropertyName("reply_comment_total")] + public int ReplyCount { get; set; } + + /// + /// 获取或设置是否置顶。 + /// + [Newtonsoft.Json.JsonProperty("top")] + [System.Text.Json.Serialization.JsonPropertyName("top")] + public bool IsTop { get; set; } + } + } + + /// + /// 获取或设置评论列表。 + /// + [Newtonsoft.Json.JsonProperty("list")] + [System.Text.Json.Serialization.JsonPropertyName("list")] + public Types.Comment[] CommentList { get; set; } = default!; + + /// + /// 获取或设置下一页分页游标。 + /// + [Newtonsoft.Json.JsonProperty("cursor")] + [System.Text.Json.Serialization.JsonPropertyName("cursor")] + public long? NextCursor { get; set; } + + /// + /// 获取或设置是否还有更多数据。 + /// + [Newtonsoft.Json.JsonProperty("has_more")] + [System.Text.Json.Serialization.JsonPropertyName("has_more")] + public bool HasMore { get; set; } + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsItem/Comment/AppsItemReplyCommentV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsItem/Comment/AppsItemReplyCommentV1Request.cs new file mode 100644 index 00000000..534d5f9c --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsItem/Comment/AppsItemReplyCommentV1Request.cs @@ -0,0 +1,36 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/v1/item/reply_comment/ 接口的请求。 + /// + public class AppsItemReplyCommentV1Request : DouyinMicroAppRequest + { + /// + /// 获取或设置用户的 OpenId。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string OpenId { get; set; } = string.Empty; + + /// + /// 获取或设置视频 ID。 + /// + [Newtonsoft.Json.JsonProperty("item_id")] + [System.Text.Json.Serialization.JsonPropertyName("item_id")] + public string ItemId { get; set; } = string.Empty; + + /// + /// 获取或设置评论 ID。 + /// + [Newtonsoft.Json.JsonProperty("comment_id")] + [System.Text.Json.Serialization.JsonPropertyName("comment_id")] + public string CommentId { get; set; } = string.Empty; + + /// + /// 获取或设置回复内容。 + /// + [Newtonsoft.Json.JsonProperty("content")] + [System.Text.Json.Serialization.JsonPropertyName("content")] + public string Content { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsItem/Comment/AppsItemReplyCommentV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsItem/Comment/AppsItemReplyCommentV1Response.cs new file mode 100644 index 00000000..1531164b --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsItem/Comment/AppsItemReplyCommentV1Response.cs @@ -0,0 +1,28 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/v1/item/reply_comment/ 接口的响应。 + /// + public class AppsItemReplyCommentV1Response : DouyinMicroAppResponse + { + public static class Types + { + public class Data + { + /// + /// 获取或设置评论 ID。 + /// + [Newtonsoft.Json.JsonProperty("comment_id")] + [System.Text.Json.Serialization.JsonPropertyName("comment_id")] + public string CommentId { get; set; } = default!; + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsItem/Comment/AppsItemTopCommentV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsItem/Comment/AppsItemTopCommentV1Request.cs new file mode 100644 index 00000000..8a9510fe --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsItem/Comment/AppsItemTopCommentV1Request.cs @@ -0,0 +1,36 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/v1/item/top_comment/ 接口的请求。 + /// + public class AppsItemTopCommentV1Request : DouyinMicroAppRequest + { + /// + /// 获取或设置用户的 OpenId。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string OpenId { get; set; } = string.Empty; + + /// + /// 获取或设置视频 ID。 + /// + [Newtonsoft.Json.JsonProperty("item_id")] + [System.Text.Json.Serialization.JsonPropertyName("item_id")] + public string ItemId { get; set; } = string.Empty; + + /// + /// 获取或设置评论 ID。 + /// + [Newtonsoft.Json.JsonProperty("comment_id")] + [System.Text.Json.Serialization.JsonPropertyName("comment_id")] + public string CommentId { get; set; } = string.Empty; + + /// + /// 获取或设置是否置顶。 + /// + [Newtonsoft.Json.JsonProperty("top")] + [System.Text.Json.Serialization.JsonPropertyName("top")] + public bool IsTop { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsItem/Comment/AppsItemTopCommentV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsItem/Comment/AppsItemTopCommentV1Response.cs new file mode 100644 index 00000000..f9ee28ff --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsItem/Comment/AppsItemTopCommentV1Response.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/v1/item/top_comment/ 接口的响应。 + /// + public class AppsItemTopCommentV1Response : DouyinMicroAppResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsQrcode/AppsQrcodeCreateV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsQrcode/AppsQrcodeCreateV1Request.cs new file mode 100644 index 00000000..7119d090 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsQrcode/AppsQrcodeCreateV1Request.cs @@ -0,0 +1,91 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/v1/qrcode/create/ 接口的请求。 + /// + public class AppsQrcodeCreateV1Request : DouyinMicroAppRequest + { + public static class Types + { + public class Color + { + /// + /// 获取或设置 RGB 红色色值。 + /// + [Newtonsoft.Json.JsonProperty("r")] + [System.Text.Json.Serialization.JsonPropertyName("r")] + public byte Red { get; set; } + + /// + /// 获取或设置 RGB 绿色色值。 + /// + [Newtonsoft.Json.JsonProperty("g")] + [System.Text.Json.Serialization.JsonPropertyName("g")] + public byte Green { get; set; } + + /// + /// 获取或设置 RGB 蓝色色值。 + /// + [Newtonsoft.Json.JsonProperty("b")] + [System.Text.Json.Serialization.JsonPropertyName("b")] + public byte Blue { get; set; } + } + } + + /// + /// 获取或设置小程序 AppId。如果不指定将使用构造 时的 参数。 + /// + [Newtonsoft.Json.JsonProperty("appid")] + [System.Text.Json.Serialization.JsonPropertyName("appid")] + public string? AppId { get; set; } + + /// + /// 获取或设置宿主名称。 + /// + [Newtonsoft.Json.JsonProperty("app_name")] + [System.Text.Json.Serialization.JsonPropertyName("app_name")] + public string? AppName { get; set; } + + /// + /// 获取或设置 URL 编码后的小程序启动路径。 + /// + [Newtonsoft.Json.JsonProperty("path")] + [System.Text.Json.Serialization.JsonPropertyName("path")] + public string? EncodedPath { get; set; } + + /// + /// 获取或设置二维码宽度(单位:像素)。 + /// + [Newtonsoft.Json.JsonProperty("width")] + [System.Text.Json.Serialization.JsonPropertyName("width")] + public int? Width { get; set; } + + /// + /// 获取或设置二维码线条颜色信息。 + /// + [Newtonsoft.Json.JsonProperty("line_color")] + [System.Text.Json.Serialization.JsonPropertyName("line_color")] + public Types.Color? LineColor { get; set; } + + /// + /// 获取或设置二维码背景颜色信息。 + /// + [Newtonsoft.Json.JsonProperty("background")] + [System.Text.Json.Serialization.JsonPropertyName("background")] + public Types.Color? BackgroundColor { get; set; } + + /// + /// 获取或设置是否展示小程序 Icon。 + /// + [Newtonsoft.Json.JsonProperty("set_icon")] + [System.Text.Json.Serialization.JsonPropertyName("set_icon")] + public bool? RequireSetIcon { get; set; } + + /// + /// 获取或设置是否生成抖音码。 + /// + [Newtonsoft.Json.JsonProperty("is_circle_code")] + [System.Text.Json.Serialization.JsonPropertyName("is_circle_code")] + public bool? IsCircleCode { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsQrcode/AppsQrcodeCreateV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsQrcode/AppsQrcodeCreateV1Response.cs new file mode 100644 index 00000000..bc2d7229 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsQrcode/AppsQrcodeCreateV1Response.cs @@ -0,0 +1,28 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/v1/qrcode/create/ 接口的响应。 + /// + public class AppsQrcodeCreateV1Response : DouyinMicroAppResponse + { + public static class Types + { + public class Data + { + /// + /// 获取或设置经过 Base64 编码的二维码图片数据。 + /// + [Newtonsoft.Json.JsonProperty("img")] + [System.Text.Json.Serialization.JsonPropertyName("img")] + public string EncodingImageData { get; set; } = default!; + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsShare/Task/AppsShareCreateTaskV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsShare/Task/AppsShareCreateTaskV1Request.cs new file mode 100644 index 00000000..0bdf6f72 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsShare/Task/AppsShareCreateTaskV1Request.cs @@ -0,0 +1,44 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/v1/share/create_task/ 接口的请求。 + /// + public class AppsShareCreateTaskV1Request : DouyinMicroAppRequest + { + /// + /// 获取或设置小程序 AppId。如果不指定将使用构造 时的 参数。 + /// + [Newtonsoft.Json.JsonProperty("app_id")] + [System.Text.Json.Serialization.JsonPropertyName("app_id")] + public string? AppId { get; set; } + + /// + /// 获取或设置任务类型。 + /// 默认值:1 + /// + [Newtonsoft.Json.JsonProperty("task_type")] + [System.Text.Json.Serialization.JsonPropertyName("task_type")] + public int TaskType { get; set; } = 1; + + /// + /// 获取或设置目标次数。 + /// + [Newtonsoft.Json.JsonProperty("target_count")] + [System.Text.Json.Serialization.JsonPropertyName("target_count")] + public int TargetCount { get; set; } + + /// + /// 获取或设置开始时间戳。 + /// + [Newtonsoft.Json.JsonProperty("start_time")] + [System.Text.Json.Serialization.JsonPropertyName("start_time")] + public long StartTimestamp { get; set; } + + /// + /// 获取或设置结束时间戳。 + /// + [Newtonsoft.Json.JsonProperty("end_time")] + [System.Text.Json.Serialization.JsonPropertyName("end_time")] + public long EndTimestamp { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsShare/Task/AppsShareCreateTaskV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsShare/Task/AppsShareCreateTaskV1Response.cs new file mode 100644 index 00000000..57193462 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsShare/Task/AppsShareCreateTaskV1Response.cs @@ -0,0 +1,28 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/v1/share/create_task/ 接口的响应。 + /// + public class AppsShareCreateTaskV1Response : DouyinMicroAppResponse + { + public static class Types + { + public class Data + { + /// + /// 获取或设置任务 ID。 + /// + [Newtonsoft.Json.JsonProperty("task_id")] + [System.Text.Json.Serialization.JsonPropertyName("task_id")] + public string TaskId { get; set; } = default!; + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsShare/Task/AppsShareQueryUserTaskV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsShare/Task/AppsShareQueryUserTaskV1Request.cs new file mode 100644 index 00000000..119a18a0 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsShare/Task/AppsShareQueryUserTaskV1Request.cs @@ -0,0 +1,29 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/v1/share/query_user_task/ 接口的请求。 + /// + public class AppsShareQueryUserTaskV1Request : DouyinMicroAppRequest + { + /// + /// 获取或设置小程序 AppId。如果不指定将使用构造 时的 参数。 + /// + [Newtonsoft.Json.JsonProperty("app_id")] + [System.Text.Json.Serialization.JsonPropertyName("app_id")] + public string? AppId { get; set; } + + /// + /// 获取或设置开启任务的用户 OpenId。 + /// + [Newtonsoft.Json.JsonProperty("open_id")] + [System.Text.Json.Serialization.JsonPropertyName("open_id")] + public string OpenId { get; set; } = string.Empty; + + /// + /// 获取或设置任务 ID。 + /// + [Newtonsoft.Json.JsonProperty("task_id")] + [System.Text.Json.Serialization.JsonPropertyName("task_id")] + public string TaskId { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsShare/Task/AppsShareQueryUserTaskV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsShare/Task/AppsShareQueryUserTaskV1Response.cs new file mode 100644 index 00000000..578f06a3 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsShare/Task/AppsShareQueryUserTaskV1Response.cs @@ -0,0 +1,56 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/v1/share/query_user_task/ 接口的响应。 + /// + public class AppsShareQueryUserTaskV1Response : DouyinMicroAppResponse + { + public static class Types + { + public class Data + { + /// + /// 获取或设置任务 ID。 + /// + [Newtonsoft.Json.JsonProperty("task_id")] + [System.Text.Json.Serialization.JsonPropertyName("task_id")] + public string TaskId { get; set; } = default!; + + /// + /// 获取或设置是否有效。 + /// + [Newtonsoft.Json.JsonProperty("is_valid")] + [System.Text.Json.Serialization.JsonPropertyName("is_valid")] + public bool IsValid { get; set; } + + /// + /// 获取或设置目标次数。 + /// + [Newtonsoft.Json.JsonProperty("target_count")] + [System.Text.Json.Serialization.JsonPropertyName("target_count")] + public int TargetCount { get; set; } + + /// + /// 获取或设置成功次数。 + /// + [Newtonsoft.Json.JsonProperty("success_count")] + [System.Text.Json.Serialization.JsonPropertyName("success_count")] + public int SuccessCount { get; set; } + + /// + /// 获取或设置是否已完成。 + /// + [Newtonsoft.Json.JsonProperty("completed")] + [System.Text.Json.Serialization.JsonPropertyName("completed")] + public bool IsCompleted { get; set; } + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsStorage/AppsRemoveUserStorageResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsStorage/AppsRemoveUserStorageResponse.cs deleted file mode 100644 index 01e51d0a..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsStorage/AppsRemoveUserStorageResponse.cs +++ /dev/null @@ -1,20 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models -{ - /// - /// 表示 [POST] /apps/remove_user_storage 接口的响应。 - /// - public class AppsRemoveUserStorageResponse : ByteDanceMicroAppResponse - { - /// - /// 获取或设置错误代号。 - /// - [Newtonsoft.Json.JsonProperty("error")] - [System.Text.Json.Serialization.JsonPropertyName("error")] - public int ErrorNumber { get; set; } - - public override bool IsSuccessful() - { - return base.IsSuccessful() && ErrorNumber == 0; - } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsStorage/AppsSetUserStorageResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsStorage/AppsSetUserStorageResponse.cs deleted file mode 100644 index 58e134b0..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsStorage/AppsSetUserStorageResponse.cs +++ /dev/null @@ -1,20 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models -{ - /// - /// 表示 [POST] /apps/set_user_storage 接口的响应。 - /// - public class AppsSetUserStorageResponse : ByteDanceMicroAppResponse - { - /// - /// 获取或设置错误代号。 - /// - [Newtonsoft.Json.JsonProperty("error")] - [System.Text.Json.Serialization.JsonPropertyName("error")] - public int ErrorNumber { get; set; } - - public override bool IsSuccessful() - { - return base.IsSuccessful() && ErrorNumber == 0; - } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsTask/AppsTaskCreateLiveV2Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsTask/AppsTaskCreateLiveV2Request.cs new file mode 100644 index 00000000..4e53303c --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsTask/AppsTaskCreateLiveV2Request.cs @@ -0,0 +1,52 @@ +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/v2/task/create_live/ 接口的请求。 + /// + public class AppsTaskCreateLiveV2Request : DouyinMicroAppRequest + { + /// + /// 获取或设置任务名称。 + /// + [Newtonsoft.Json.JsonProperty("task_name")] + [System.Text.Json.Serialization.JsonPropertyName("task_name")] + public string TaskName { get; set; } = string.Empty; + + /// + /// 获取或设置任务开始时间戳。 + /// + [Newtonsoft.Json.JsonProperty("start_time")] + [System.Text.Json.Serialization.JsonPropertyName("start_time")] + public long StartTimestamp { get; set; } + + /// + /// 获取或设置任务结束时间戳。 + /// + [Newtonsoft.Json.JsonProperty("end_time")] + [System.Text.Json.Serialization.JsonPropertyName("end_time")] + public long EndTimestamp { get; set; } + + /// + /// 获取或设置条件列表。 + /// + [Newtonsoft.Json.JsonProperty("conditions")] + [System.Text.Json.Serialization.JsonPropertyName("conditions")] + public IList? ConditionList { get; set; } + + /// + /// 获取或设置条件阈值列表。 + /// + [Newtonsoft.Json.JsonProperty("condition_value")] + [System.Text.Json.Serialization.JsonPropertyName("condition_value")] + public IList? ConditionValueList { get; set; } + + /// + /// 获取或设置主播抖音号。 + /// + [Newtonsoft.Json.JsonProperty("aweme_id")] + [System.Text.Json.Serialization.JsonPropertyName("aweme_id")] + public string? AwemeId { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsTask/AppsTaskCreateLiveV2Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsTask/AppsTaskCreateLiveV2Response.cs new file mode 100644 index 00000000..505097f1 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsTask/AppsTaskCreateLiveV2Response.cs @@ -0,0 +1,35 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/v2/task/create_live/ 接口的响应。 + /// + public class AppsTaskCreateLiveV2Response : DouyinMicroAppResponse + { + public static class Types + { + public class Data + { + /// + /// 获取或设置任务 ID。 + /// + [Newtonsoft.Json.JsonProperty("task_id")] + [System.Text.Json.Serialization.JsonPropertyName("task_id")] + public string TaskId { get; set; } = default!; + + /// + /// 获取或设置任务状态。 + /// + [Newtonsoft.Json.JsonProperty("task_status")] + [System.Text.Json.Serialization.JsonPropertyName("task_status")] + public int TaskStatus { get; set; } + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsTask/AppsTaskCreateVideoV2Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsTask/AppsTaskCreateVideoV2Request.cs new file mode 100644 index 00000000..4ed979ca --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsTask/AppsTaskCreateVideoV2Request.cs @@ -0,0 +1,59 @@ +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/v2/task/create_video/ 接口的请求。 + /// + public class AppsTaskCreateVideoV2Request : DouyinMicroAppRequest + { + /// + /// 获取或设置任务名称。 + /// + [Newtonsoft.Json.JsonProperty("task_name")] + [System.Text.Json.Serialization.JsonPropertyName("task_name")] + public string TaskName { get; set; } = string.Empty; + + /// + /// 获取或设置任务开始时间戳。 + /// + [Newtonsoft.Json.JsonProperty("start_time")] + [System.Text.Json.Serialization.JsonPropertyName("start_time")] + public long StartTimestamp { get; set; } + + /// + /// 获取或设置任务结束时间戳。 + /// + [Newtonsoft.Json.JsonProperty("end_time")] + [System.Text.Json.Serialization.JsonPropertyName("end_time")] + public long EndTimestamp { get; set; } + + /// + /// 获取或设置条件列表。 + /// + [Newtonsoft.Json.JsonProperty("conditions")] + [System.Text.Json.Serialization.JsonPropertyName("conditions")] + public IList? ConditionList { get; set; } + + /// + /// 获取或设置条件阈值列表。 + /// + [Newtonsoft.Json.JsonProperty("condition_value")] + [System.Text.Json.Serialization.JsonPropertyName("condition_value")] + public IList? ConditionValueList { get; set; } + + /// + /// 获取或设置视频 ID。与字段 二选一。 + /// + [Newtonsoft.Json.JsonProperty("item_id")] + [System.Text.Json.Serialization.JsonPropertyName("item_id")] + public string? ItemId { get; set; } + + /// + /// 获取或设置视频 URL。与字段 二选一。 + /// + [Newtonsoft.Json.JsonProperty("video_url")] + [System.Text.Json.Serialization.JsonPropertyName("video_url")] + public string? VideoUrl { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsTask/AppsTaskCreateVideoV2Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsTask/AppsTaskCreateVideoV2Response.cs new file mode 100644 index 00000000..b8ff81c1 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsTask/AppsTaskCreateVideoV2Response.cs @@ -0,0 +1,35 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/v2/task/create_video/ 接口的响应。 + /// + public class AppsTaskCreateVideoV2Response : DouyinMicroAppResponse + { + public static class Types + { + public class Data + { + /// + /// 获取或设置任务 ID。 + /// + [Newtonsoft.Json.JsonProperty("task_id")] + [System.Text.Json.Serialization.JsonPropertyName("task_id")] + public string TaskId { get; set; } = default!; + + /// + /// 获取或设置任务状态。 + /// + [Newtonsoft.Json.JsonProperty("task_status")] + [System.Text.Json.Serialization.JsonPropertyName("task_status")] + public int TaskStatus { get; set; } + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsTask/AppsTaskWriteoffLiveV2Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsTask/AppsTaskWriteoffLiveV2Request.cs new file mode 100644 index 00000000..1cd059ac --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsTask/AppsTaskWriteoffLiveV2Request.cs @@ -0,0 +1,22 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/v2/task/writeoff_live/ 接口的请求。 + /// + public class AppsTaskWriteoffLiveV2Request : DouyinMicroAppRequest + { + /// + /// 获取或设置用户的 OpenId。 + /// + [Newtonsoft.Json.JsonProperty("open_id")] + [System.Text.Json.Serialization.JsonPropertyName("open_id")] + public string OpenId { get; set; } = string.Empty; + + /// + /// 获取或设置任务 ID。 + /// + [Newtonsoft.Json.JsonProperty("task_id")] + [System.Text.Json.Serialization.JsonPropertyName("task_id")] + public string TaskId { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsTask/AppsTaskWriteoffLiveV2Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsTask/AppsTaskWriteoffLiveV2Response.cs new file mode 100644 index 00000000..75ff3dee --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsTask/AppsTaskWriteoffLiveV2Response.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/v2/task/writeoff_live/ 接口的响应。 + /// + public class AppsTaskWriteoffLiveV2Response : DouyinMicroAppResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsTask/AppsTaskWriteoffVideoV2Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsTask/AppsTaskWriteoffVideoV2Request.cs new file mode 100644 index 00000000..c34c9694 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsTask/AppsTaskWriteoffVideoV2Request.cs @@ -0,0 +1,22 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/v2/task/writeoff_video/ 接口的请求。 + /// + public class AppsTaskWriteoffVideoV2Request : DouyinMicroAppRequest + { + /// + /// 获取或设置用户的 OpenId。 + /// + [Newtonsoft.Json.JsonProperty("open_id")] + [System.Text.Json.Serialization.JsonPropertyName("open_id")] + public string OpenId { get; set; } = string.Empty; + + /// + /// 获取或设置任务 ID。 + /// + [Newtonsoft.Json.JsonProperty("task_id")] + [System.Text.Json.Serialization.JsonPropertyName("task_id")] + public string TaskId { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsTask/AppsTaskWriteoffVideoV2Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsTask/AppsTaskWriteoffVideoV2Response.cs new file mode 100644 index 00000000..5be0fdb2 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsTask/AppsTaskWriteoffVideoV2Response.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/v2/task/writeoff_video/ 接口的响应。 + /// + public class AppsTaskWriteoffVideoV2Response : DouyinMicroAppResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsTrafficPermission/AppsTrafficPermissionOpenV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsTrafficPermission/AppsTrafficPermissionOpenV1Request.cs new file mode 100644 index 00000000..4f062832 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsTrafficPermission/AppsTrafficPermissionOpenV1Request.cs @@ -0,0 +1,57 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/v1/traffic_permission/open/ 接口的请求。 + /// + public class AppsTrafficPermissionOpenV1Request : DouyinMicroAppRequest + { + /// + /// 获取或设置省份。 + /// + [Newtonsoft.Json.JsonProperty("province")] + [System.Text.Json.Serialization.JsonPropertyName("province")] + public string Province { get; set; } = string.Empty; + + /// + /// 获取或设置城市。 + /// + [Newtonsoft.Json.JsonProperty("city")] + [System.Text.Json.Serialization.JsonPropertyName("city")] + public string City { get; set; } = string.Empty; + + /// + /// 获取或设置手机号码。 + /// + [Newtonsoft.Json.JsonProperty("phone_number")] + [System.Text.Json.Serialization.JsonPropertyName("phone_number")] + public string PhoneNumber { get; set; } = string.Empty; + + /// + /// 获取或设置纳税人性质。 + /// + [Newtonsoft.Json.JsonProperty("tax_nature")] + [System.Text.Json.Serialization.JsonPropertyName("tax_nature")] + public int TaxNatureType { get; set; } + + /// + /// 获取或设置银行账号。 + /// + [Newtonsoft.Json.JsonProperty("bank_account_number")] + [System.Text.Json.Serialization.JsonPropertyName("bank_account_number")] + public string BankAccountNumber { get; set; } = string.Empty; + + /// + /// 获取或设置开户银行名称。 + /// + [Newtonsoft.Json.JsonProperty("bank_name")] + [System.Text.Json.Serialization.JsonPropertyName("bank_name")] + public string BankName { get; set; } = string.Empty; + + /// + /// 获取或设置开户支行名称。 + /// + [Newtonsoft.Json.JsonProperty("bank_branch")] + [System.Text.Json.Serialization.JsonPropertyName("bank_branch")] + public string BankBranch { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsTrafficPermission/AppsTrafficPermissionOpenV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsTrafficPermission/AppsTrafficPermissionOpenV1Response.cs new file mode 100644 index 00000000..a2a06ef6 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsTrafficPermission/AppsTrafficPermissionOpenV1Response.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/v1/traffic_permission/open/ 接口的响应。 + /// + public class AppsTrafficPermissionOpenV1Response : DouyinMicroAppResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsTrafficPermission/AppsTrafficPermissionQueryV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsTrafficPermission/AppsTrafficPermissionQueryV1Request.cs new file mode 100644 index 00000000..08cf5ee4 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsTrafficPermission/AppsTrafficPermissionQueryV1Request.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [GET] /apps/v1/traffic_permission/query/ 接口的请求。 + /// + public class AppsTrafficPermissionQueryV1Request : DouyinMicroAppRequest + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsTrafficPermission/AppsTrafficPermissionQueryV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsTrafficPermission/AppsTrafficPermissionQueryV1Response.cs new file mode 100644 index 00000000..7c968784 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsTrafficPermission/AppsTrafficPermissionQueryV1Response.cs @@ -0,0 +1,37 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [GET] /apps/v1/traffic_permission/query/ 接口的响应。 + /// + public class AppsTrafficPermissionQueryV1Response : DouyinMicroAppResponse + { + public static class Types + { + public class Data + { + /// + /// 获取或设置是否可开通。 + /// + [Newtonsoft.Json.JsonProperty("can_open")] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.NumericalBooleanConverter))] + [System.Text.Json.Serialization.JsonPropertyName("can_open")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalBooleanConverter))] + public bool CanOpen { get; set; } + + /// + /// 获取或设置开通状态。 + /// + [Newtonsoft.Json.JsonProperty("status")] + [System.Text.Json.Serialization.JsonPropertyName("status")] + public int Status { get; set; } + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsUrlLink/AppsUrlLinkGenerateV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsUrlLink/AppsUrlLinkGenerateV1Request.cs new file mode 100644 index 00000000..0bf625d2 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsUrlLink/AppsUrlLinkGenerateV1Request.cs @@ -0,0 +1,43 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/v1/url_link/generate 接口的请求。 + /// + public class AppsUrlLinkGenerateV1Request : DouyinMicroAppRequest + { + /// + /// 获取或设置小程序 AppId。如果不指定将使用构造 时的 参数。 + /// + [Newtonsoft.Json.JsonProperty("app_id")] + [System.Text.Json.Serialization.JsonPropertyName("app_id")] + public string? AppId { get; set; } + + /// + /// 获取或设置宿主名称。 + /// + [Newtonsoft.Json.JsonProperty("app_name")] + [System.Text.Json.Serialization.JsonPropertyName("app_name")] + public string AppName { get; set; } = string.Empty; + + /// + /// 获取或设置页面路径。 + /// + [Newtonsoft.Json.JsonProperty("path")] + [System.Text.Json.Serialization.JsonPropertyName("path")] + public string? PagePath { get; set; } + + /// + /// 获取或设置页面查询参数。 + /// + [Newtonsoft.Json.JsonProperty("query")] + [System.Text.Json.Serialization.JsonPropertyName("query")] + public string? QueryString { get; set; } + + /// + /// 获取或设置失效时间戳。 + /// + [Newtonsoft.Json.JsonProperty("expire_time")] + [System.Text.Json.Serialization.JsonPropertyName("expire_time")] + public long ExpireTimestamp { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsUrlLink/AppsUrlLinkGenerateV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsUrlLink/AppsUrlLinkGenerateV1Response.cs new file mode 100644 index 00000000..c2c49477 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsUrlLink/AppsUrlLinkGenerateV1Response.cs @@ -0,0 +1,28 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/v1/url_link/generate 接口的响应。 + /// + public class AppsUrlLinkGenerateV1Response : DouyinMicroAppResponse + { + public static class Types + { + public class Data + { + /// + /// 获取或设置链接。 + /// + [Newtonsoft.Json.JsonProperty("url_link")] + [System.Text.Json.Serialization.JsonPropertyName("url_link")] + public string UrlLink { get; set; } = default!; + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsUrlLink/AppsUrlLinkQueryInfoV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsUrlLink/AppsUrlLinkQueryInfoV1Request.cs new file mode 100644 index 00000000..30fde7a3 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsUrlLink/AppsUrlLinkQueryInfoV1Request.cs @@ -0,0 +1,22 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/v1/url_link/query_info 接口的请求。 + /// + public class AppsUrlLinkQueryInfoV1Request : DouyinMicroAppRequest + { + /// + /// 获取或设置小程序 AppId。如果不指定将使用构造 时的 参数。 + /// + [Newtonsoft.Json.JsonProperty("app_id")] + [System.Text.Json.Serialization.JsonPropertyName("app_id")] + public string? AppId { get; set; } + + /// + /// 获取或设置链接。 + /// + [Newtonsoft.Json.JsonProperty("url_link")] + [System.Text.Json.Serialization.JsonPropertyName("url_link")] + public string UrlLink { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsUrlLink/AppsUrlLinkQueryInfoV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsUrlLink/AppsUrlLinkQueryInfoV1Response.cs new file mode 100644 index 00000000..1bd080d8 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsUrlLink/AppsUrlLinkQueryInfoV1Response.cs @@ -0,0 +1,63 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/v1/url_link/query_info 接口的响应。 + /// + public class AppsUrlLinkQueryInfoV1Response : DouyinMicroAppResponse + { + public static class Types + { + public class Data + { + /// + /// 获取或设置小程序的 AppId。 + /// + [Newtonsoft.Json.JsonProperty("app_id")] + [System.Text.Json.Serialization.JsonPropertyName("app_id")] + public string AppId { get; set; } = default!; + + /// + /// 获取或设置宿主名称。 + /// + [Newtonsoft.Json.JsonProperty("app_name")] + [System.Text.Json.Serialization.JsonPropertyName("app_name")] + public string AppName { get; set; } = default!; + + /// + /// 获取或设置页面路径。 + /// + [Newtonsoft.Json.JsonProperty("path")] + [System.Text.Json.Serialization.JsonPropertyName("path")] + public string? PagePath { get; set; } + + /// + /// 获取或设置页面查询参数。 + /// + [Newtonsoft.Json.JsonProperty("query")] + [System.Text.Json.Serialization.JsonPropertyName("query")] + public string? QueryString { get; set; } + + /// + /// 获取或设置生成时间戳。 + /// + [Newtonsoft.Json.JsonProperty("create_time")] + [System.Text.Json.Serialization.JsonPropertyName("create_time")] + public long CreateTimestamp { get; set; } + + /// + /// 获取或设置失效时间戳。 + /// + [Newtonsoft.Json.JsonProperty("expire_time")] + [System.Text.Json.Serialization.JsonPropertyName("expire_time")] + public long ExpireTimestamp { get; set; } + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsUrlLink/AppsUrlLinkQueryQuotaV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsUrlLink/AppsUrlLinkQueryQuotaV1Request.cs new file mode 100644 index 00000000..aa3ff52f --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsUrlLink/AppsUrlLinkQueryQuotaV1Request.cs @@ -0,0 +1,15 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/v1/url_link/query_quota 接口的请求。 + /// + public class AppsUrlLinkQueryQuotaV1Request : DouyinMicroAppRequest + { + /// + /// 获取或设置小程序 AppId。如果不指定将使用构造 时的 参数。 + /// + [Newtonsoft.Json.JsonProperty("app_id")] + [System.Text.Json.Serialization.JsonPropertyName("app_id")] + public string? AppId { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsUrlLink/AppsUrlLinkQueryQuotaV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsUrlLink/AppsUrlLinkQueryQuotaV1Response.cs new file mode 100644 index 00000000..e3132849 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsUrlLink/AppsUrlLinkQueryQuotaV1Response.cs @@ -0,0 +1,35 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/v1/url_link/query_quota 接口的响应。 + /// + public class AppsUrlLinkQueryQuotaV1Response : DouyinMicroAppResponse + { + public static class Types + { + public class Data + { + /// + /// 获取或设置已生成次数。 + /// + [Newtonsoft.Json.JsonProperty("url_link_used")] + [System.Text.Json.Serialization.JsonPropertyName("url_link_used")] + public int UsedCount { get; set; } + + /// + /// 获取或设置次数上限。 + /// + [Newtonsoft.Json.JsonProperty("url_link_limit")] + [System.Text.Json.Serialization.JsonPropertyName("url_link_limit")] + public int LimitCount { get; set; } + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsUrlSchema/AppsUrlGenerateSchemaV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsUrlSchema/AppsUrlGenerateSchemaV1Request.cs new file mode 100644 index 00000000..d39f38b5 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsUrlSchema/AppsUrlGenerateSchemaV1Request.cs @@ -0,0 +1,43 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/v1/url/generate_schema/ 接口的请求。 + /// + public class AppsUrlGenerateSchemaV1Request : DouyinMicroAppRequest + { + /// + /// 获取或设置小程序的 AppId。如果不指定将使用构造 时的 参数。 + /// + [Newtonsoft.Json.JsonProperty("app_id")] + [System.Text.Json.Serialization.JsonPropertyName("app_id")] + public string? AppId { get; set; } + + /// + /// 获取或设置页面路径。 + /// + [Newtonsoft.Json.JsonProperty("path")] + [System.Text.Json.Serialization.JsonPropertyName("path")] + public string? PagePath { get; set; } + + /// + /// 获取或设置页面查询参数。 + /// + [Newtonsoft.Json.JsonProperty("query")] + [System.Text.Json.Serialization.JsonPropertyName("query")] + public string? QueryString { get; set; } + + /// + /// 获取或设置是否永不失效。 + /// + [Newtonsoft.Json.JsonProperty("no_expire")] + [System.Text.Json.Serialization.JsonPropertyName("no_expire")] + public bool IsNoExpire { get; set; } + + /// + /// 获取或设置失效时间戳。 + /// + [Newtonsoft.Json.JsonProperty("expire_time")] + [System.Text.Json.Serialization.JsonPropertyName("expire_time")] + public long? ExpireTimestamp { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsUrlSchema/AppsUrlGenerateSchemaV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsUrlSchema/AppsUrlGenerateSchemaV1Response.cs new file mode 100644 index 00000000..df06a015 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsUrlSchema/AppsUrlGenerateSchemaV1Response.cs @@ -0,0 +1,28 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/v1/url/generate_schema/ 接口的响应。 + /// + public class AppsUrlGenerateSchemaV1Response : DouyinMicroAppResponse + { + public static class Types + { + public class Data + { + /// + /// 获取或设置链接。 + /// + [Newtonsoft.Json.JsonProperty("schema")] + [System.Text.Json.Serialization.JsonPropertyName("schema")] + public string UrlSchema { get; set; } = default!; + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsUrlSchema/AppsUrlQuerySchemaQuotaV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsUrlSchema/AppsUrlQuerySchemaQuotaV1Request.cs new file mode 100644 index 00000000..6dbbd526 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsUrlSchema/AppsUrlQuerySchemaQuotaV1Request.cs @@ -0,0 +1,15 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/v1/url/query_schema_quota/ 接口的请求。 + /// + public class AppsUrlQuerySchemaQuotaV1Request : DouyinMicroAppRequest + { + /// + /// 获取或设置小程序 AppId。如果不指定将使用构造 时的 参数。 + /// + [Newtonsoft.Json.JsonProperty("app_id")] + [System.Text.Json.Serialization.JsonPropertyName("app_id")] + public string? AppId { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsUrlSchema/AppsUrlQuerySchemaQuotaV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsUrlSchema/AppsUrlQuerySchemaQuotaV1Response.cs new file mode 100644 index 00000000..7277397a --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsUrlSchema/AppsUrlQuerySchemaQuotaV1Response.cs @@ -0,0 +1,55 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/v1/url/query_schema_quota/ 接口的响应。 + /// + public class AppsUrlQuerySchemaQuotaV1Response : DouyinMicroAppResponse + { + public static class Types + { + public class Data + { + public static class Types + { + public class Quota + { + /// + /// 获取或设置已生成次数。 + /// + [Newtonsoft.Json.JsonProperty("schema_used")] + [System.Text.Json.Serialization.JsonPropertyName("schema_used")] + public int UsedCount { get; set; } + + /// + /// 获取或设置次数上限。 + /// + [Newtonsoft.Json.JsonProperty("schema_limit")] + [System.Text.Json.Serialization.JsonPropertyName("schema_limit")] + public int LimitCount { get; set; } + } + } + + /// + /// 获取或设置长期有效的配额信息。 + /// + [Newtonsoft.Json.JsonProperty("long_term_schema_quota")] + [System.Text.Json.Serialization.JsonPropertyName("long_term_schema_quota")] + public Types.Quota LongTermQuota { get; set; } = default!; + + /// + /// 获取或设置短期有效的配额信息。 + /// + [Newtonsoft.Json.JsonProperty("short_term_schema_quota")] + [System.Text.Json.Serialization.JsonPropertyName("short_term_schema_quota")] + public Types.Quota ShortTermQuota { get; set; } = default!; + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsUrlSchema/AppsUrlQuerySchemaV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsUrlSchema/AppsUrlQuerySchemaV1Request.cs new file mode 100644 index 00000000..92d62e00 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsUrlSchema/AppsUrlQuerySchemaV1Request.cs @@ -0,0 +1,22 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/v1/url/query_schema/ 接口的请求。 + /// + public class AppsUrlQuerySchemaV1Request : DouyinMicroAppRequest + { + /// + /// 获取或设置小程序 AppId。如果不指定将使用构造 时的 参数。 + /// + [Newtonsoft.Json.JsonProperty("app_id")] + [System.Text.Json.Serialization.JsonPropertyName("app_id")] + public string? AppId { get; set; } + + /// + /// 获取或设置链接。 + /// + [Newtonsoft.Json.JsonProperty("schema")] + [System.Text.Json.Serialization.JsonPropertyName("schema")] + public string UrlSchema { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsUrlSchema/AppsUrlQuerySchemaV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsUrlSchema/AppsUrlQuerySchemaV1Response.cs new file mode 100644 index 00000000..a00d432b --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsUrlSchema/AppsUrlQuerySchemaV1Response.cs @@ -0,0 +1,56 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/v1/url/query_schema/ 接口的响应。 + /// + public class AppsUrlQuerySchemaV1Response : DouyinMicroAppResponse + { + public static class Types + { + public class Data + { + /// + /// 获取或设置小程序的 AppId。 + /// + [Newtonsoft.Json.JsonProperty("app_id")] + [System.Text.Json.Serialization.JsonPropertyName("app_id")] + public string AppId { get; set; } = default!; + + /// + /// 获取或设置页面路径。 + /// + [Newtonsoft.Json.JsonProperty("path")] + [System.Text.Json.Serialization.JsonPropertyName("path")] + public string? PagePath { get; set; } + + /// + /// 获取或设置页面查询参数。 + /// + [Newtonsoft.Json.JsonProperty("query")] + [System.Text.Json.Serialization.JsonPropertyName("query")] + public string? QueryString { get; set; } + + /// + /// 获取或设置生成时间戳。 + /// + [Newtonsoft.Json.JsonProperty("create_time")] + [System.Text.Json.Serialization.JsonPropertyName("create_time")] + public long CreateTimestamp { get; set; } + + /// + /// 获取或设置失效时间戳。 + /// + [Newtonsoft.Json.JsonProperty("expire_time")] + [System.Text.Json.Serialization.JsonPropertyName("expire_time")] + public long ExpireTimestamp { get; set; } + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsUser/AppsUserBCGetCommentV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsUser/AppsUserBCGetCommentV1Request.cs new file mode 100644 index 00000000..b224a94b --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsUser/AppsUserBCGetCommentV1Request.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [GET] /apps/v1/user_bc/get_comment/ 接口的请求。 + /// + public class AppsUserBCGetCommentV1Request : AppsUserGetCommentV1Request + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsUser/AppsUserBCGetCommentV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsUser/AppsUserBCGetCommentV1Response.cs new file mode 100644 index 00000000..c1a24d5a --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsUser/AppsUserBCGetCommentV1Response.cs @@ -0,0 +1,35 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [GET] /apps/v1/user_bc/get_comment/ 接口的响应。 + /// + public class AppsUserBCGetCommentV1Response : DouyinMicroAppResponse + { + public static class Types + { + public class Data + { + public static class Types + { + public class Result : AppsUserGetCommentV1Response.Types.Data.Types.Result + { + } + } + + /// + /// 获取或设置返回结果。 + /// + [Newtonsoft.Json.JsonProperty("result_list")] + [System.Text.Json.Serialization.JsonPropertyName("result_list")] + public Types.Result[] ResultList { get; set; } = default!; + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsUser/AppsUserBCGetFansV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsUser/AppsUserBCGetFansV1Request.cs new file mode 100644 index 00000000..97cc4bee --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsUser/AppsUserBCGetFansV1Request.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [GET] /apps/v1/user_bc/get_fans/ 接口的请求。 + /// + public class AppsUserBCGetFansV1Request : AppsUserGetFansV1Request + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsUser/AppsUserBCGetFansV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsUser/AppsUserBCGetFansV1Response.cs new file mode 100644 index 00000000..54322ed7 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsUser/AppsUserBCGetFansV1Response.cs @@ -0,0 +1,35 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [GET] /apps/v1/user_bc/get_fans/ 接口的响应。 + /// + public class AppsUserBCGetFansV1Response : DouyinMicroAppResponse + { + public static class Types + { + public class Data + { + public static class Types + { + public class Result : AppsUserGetFansV1Response.Types.Data.Types.Result + { + } + } + + /// + /// 获取或设置返回结果。 + /// + [Newtonsoft.Json.JsonProperty("result_list")] + [System.Text.Json.Serialization.JsonPropertyName("result_list")] + public Types.Result[] ResultList { get; set; } = default!; + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsUser/AppsUserBCGetItemV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsUser/AppsUserBCGetItemV1Request.cs new file mode 100644 index 00000000..218f2582 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsUser/AppsUserBCGetItemV1Request.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [GET] /apps/v1/user_bc/get_item/ 接口的请求。 + /// + public class AppsUserBCGetItemV1Request : AppsUserGetItemV1Request + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsUser/AppsUserBCGetItemV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsUser/AppsUserBCGetItemV1Response.cs new file mode 100644 index 00000000..1c09ec52 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsUser/AppsUserBCGetItemV1Response.cs @@ -0,0 +1,35 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [GET] /apps/v1/user_bc/get_item/ 接口的响应。 + /// + public class AppsUserBCGetItemV1Response : DouyinMicroAppResponse + { + public static class Types + { + public class Data + { + public static class Types + { + public class Result : AppsUserGetItemV1Response.Types.Data.Types.Result + { + } + } + + /// + /// 获取或设置返回结果。 + /// + [Newtonsoft.Json.JsonProperty("result_list")] + [System.Text.Json.Serialization.JsonPropertyName("result_list")] + public Types.Result[] ResultList { get; set; } = default!; + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsUser/AppsUserBCGetLikeV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsUser/AppsUserBCGetLikeV1Request.cs new file mode 100644 index 00000000..1eb5f26c --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsUser/AppsUserBCGetLikeV1Request.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [GET] /apps/v1/user_bc/get_like/ 接口的请求。 + /// + public class AppsUserBCGetLikeV1Request : AppsUserGetLikeV1Request + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsUser/AppsUserBCGetLikeV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsUser/AppsUserBCGetLikeV1Response.cs new file mode 100644 index 00000000..dd015d03 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsUser/AppsUserBCGetLikeV1Response.cs @@ -0,0 +1,35 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [GET] /apps/v1/user_bc/get_like/ 接口的响应。 + /// + public class AppsUserBCGetLikeV1Response : DouyinMicroAppResponse + { + public static class Types + { + public class Data + { + public static class Types + { + public class Result : AppsUserGetLikeV1Response.Types.Data.Types.Result + { + } + } + + /// + /// 获取或设置返回结果。 + /// + [Newtonsoft.Json.JsonProperty("result_list")] + [System.Text.Json.Serialization.JsonPropertyName("result_list")] + public Types.Result[] ResultList { get; set; } = default!; + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsUser/AppsUserBCGetProfileV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsUser/AppsUserBCGetProfileV1Request.cs new file mode 100644 index 00000000..0803d5d4 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsUser/AppsUserBCGetProfileV1Request.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [GET] /apps/v1/user_bc/get_profile/ 接口的请求。 + /// + public class AppsUserBCGetProfileV1Request : AppsUserGetProfileV1Request + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsUser/AppsUserBCGetProfileV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsUser/AppsUserBCGetProfileV1Response.cs new file mode 100644 index 00000000..c8269d6e --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsUser/AppsUserBCGetProfileV1Response.cs @@ -0,0 +1,35 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [GET] /apps/v1/user_bc/get_profile/ 接口的响应。 + /// + public class AppsUserBCGetProfileV1Response : DouyinMicroAppResponse + { + public static class Types + { + public class Data + { + public static class Types + { + public class Result : AppsUserGetProfileV1Response.Types.Data.Types.Result + { + } + } + + /// + /// 获取或设置返回结果。 + /// + [Newtonsoft.Json.JsonProperty("result_list")] + [System.Text.Json.Serialization.JsonPropertyName("result_list")] + public Types.Result[] ResultList { get; set; } = default!; + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsUser/AppsUserBCGetShareV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsUser/AppsUserBCGetShareV1Request.cs new file mode 100644 index 00000000..4a48723a --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsUser/AppsUserBCGetShareV1Request.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [GET] /apps/v1/user_bc/get_share/ 接口的请求。 + /// + public class AppsUserBCGetShareV1Request : AppsUserGetShareV1Request + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsUser/AppsUserBCGetShareV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsUser/AppsUserBCGetShareV1Response.cs new file mode 100644 index 00000000..dd9876d2 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsUser/AppsUserBCGetShareV1Response.cs @@ -0,0 +1,35 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [GET] /apps/v1/user_bc/get_share/ 接口的响应。 + /// + public class AppsUserBCGetShareV1Response : DouyinMicroAppResponse + { + public static class Types + { + public class Data + { + public static class Types + { + public class Result : AppsUserGetShareV1Response.Types.Data.Types.Result + { + } + } + + /// + /// 获取或设置返回结果。 + /// + [Newtonsoft.Json.JsonProperty("result_list")] + [System.Text.Json.Serialization.JsonPropertyName("result_list")] + public Types.Result[] ResultList { get; set; } = default!; + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsUser/AppsUserGetCommentV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsUser/AppsUserGetCommentV1Request.cs new file mode 100644 index 00000000..217a462c --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsUser/AppsUserGetCommentV1Request.cs @@ -0,0 +1,22 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [GET] /apps/v1/user/get_comment/ 接口的请求。 + /// + public class AppsUserGetCommentV1Request : DouyinMicroAppRequest + { + /// + /// 获取或设置用户的 OpenId。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string OpenId { get; set; } = string.Empty; + + /// + /// 获取或设置数据范围类型。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public int DateType { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsUser/AppsUserGetCommentV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsUser/AppsUserGetCommentV1Response.cs new file mode 100644 index 00000000..a9bcc88a --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsUser/AppsUserGetCommentV1Response.cs @@ -0,0 +1,48 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [GET] /apps/v1/user/get_comment/ 接口的响应。 + /// + public class AppsUserGetCommentV1Response : DouyinMicroAppResponse + { + public static class Types + { + public class Data + { + public static class Types + { + public class Result + { + /// + /// 获取或设置日期字符串(格式:yyyy-MM-dd)。 + /// + [Newtonsoft.Json.JsonProperty("date")] + [System.Text.Json.Serialization.JsonPropertyName("date")] + public string DateString { get; set; } = default!; + + /// + /// 获取或设置新增评论数。 + /// + [Newtonsoft.Json.JsonProperty("new_comment")] + [System.Text.Json.Serialization.JsonPropertyName("new_comment")] + public long NewCommentCount { get; set; } + } + } + + /// + /// 获取或设置返回结果。 + /// + [Newtonsoft.Json.JsonProperty("result_list")] + [System.Text.Json.Serialization.JsonPropertyName("result_list")] + public Types.Result[] ResultList { get; set; } = default!; + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsUser/AppsUserGetFansV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsUser/AppsUserGetFansV1Request.cs new file mode 100644 index 00000000..03b1a4e4 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsUser/AppsUserGetFansV1Request.cs @@ -0,0 +1,22 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [GET] /apps/v1/user/get_fans/ 接口的请求。 + /// + public class AppsUserGetFansV1Request : DouyinMicroAppRequest + { + /// + /// 获取或设置用户的 OpenId。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string OpenId { get; set; } = string.Empty; + + /// + /// 获取或设置数据范围类型。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public int DateType { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsUser/AppsUserGetFansV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsUser/AppsUserGetFansV1Response.cs new file mode 100644 index 00000000..925851f9 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsUser/AppsUserGetFansV1Response.cs @@ -0,0 +1,55 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [GET] /apps/v1/user/get_fans/ 接口的响应。 + /// + public class AppsUserGetFansV1Response : DouyinMicroAppResponse + { + public static class Types + { + public class Data + { + public static class Types + { + public class Result + { + /// + /// 获取或设置日期字符串(格式:yyyy-MM-dd)。 + /// + [Newtonsoft.Json.JsonProperty("date")] + [System.Text.Json.Serialization.JsonPropertyName("date")] + public string DateString { get; set; } = default!; + + /// + /// 获取或设置新增粉丝数。 + /// + [Newtonsoft.Json.JsonProperty("new_fans")] + [System.Text.Json.Serialization.JsonPropertyName("new_fans")] + public long NewFansCount { get; set; } + + /// + /// 获取或设置总粉丝数。 + /// + [Newtonsoft.Json.JsonProperty("total_fans")] + [System.Text.Json.Serialization.JsonPropertyName("total_fans")] + public long TotalFansCount { get; set; } + } + } + + /// + /// 获取或设置返回结果。 + /// + [Newtonsoft.Json.JsonProperty("result_list")] + [System.Text.Json.Serialization.JsonPropertyName("result_list")] + public Types.Result[] ResultList { get; set; } = default!; + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsUser/AppsUserGetItemV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsUser/AppsUserGetItemV1Request.cs new file mode 100644 index 00000000..c3c78995 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsUser/AppsUserGetItemV1Request.cs @@ -0,0 +1,22 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [GET] /apps/v1/user/get_item/ 接口的请求。 + /// + public class AppsUserGetItemV1Request : DouyinMicroAppRequest + { + /// + /// 获取或设置用户的 OpenId。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string OpenId { get; set; } = string.Empty; + + /// + /// 获取或设置数据范围类型。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public int DateType { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsUser/AppsUserGetItemV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsUser/AppsUserGetItemV1Response.cs new file mode 100644 index 00000000..632222d8 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsUser/AppsUserGetItemV1Response.cs @@ -0,0 +1,62 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [GET] /apps/v1/user/get_item/ 接口的响应。 + /// + public class AppsUserGetItemV1Response : DouyinMicroAppResponse + { + public static class Types + { + public class Data + { + public static class Types + { + public class Result + { + /// + /// 获取或设置日期字符串(格式:yyyy-MM-dd)。 + /// + [Newtonsoft.Json.JsonProperty("date")] + [System.Text.Json.Serialization.JsonPropertyName("date")] + public string DateString { get; set; } = default!; + + /// + /// 获取或设置新增播放数。 + /// + [Newtonsoft.Json.JsonProperty("new_play")] + [System.Text.Json.Serialization.JsonPropertyName("new_play")] + public long NewPlayCount { get; set; } + + /// + /// 获取或设置发布内容数。 + /// + [Newtonsoft.Json.JsonProperty("new_issue")] + [System.Text.Json.Serialization.JsonPropertyName("new_issue")] + public long NewIssueCount { get; set; } + + /// + /// 获取或设置内容总数。 + /// + [Newtonsoft.Json.JsonProperty("total_issue")] + [System.Text.Json.Serialization.JsonPropertyName("total_issue")] + public long TotalIssueCount { get; set; } + } + } + + /// + /// 获取或设置返回结果。 + /// + [Newtonsoft.Json.JsonProperty("result_list")] + [System.Text.Json.Serialization.JsonPropertyName("result_list")] + public Types.Result[] ResultList { get; set; } = default!; + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsUser/AppsUserGetLikeV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsUser/AppsUserGetLikeV1Request.cs new file mode 100644 index 00000000..6de9c622 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsUser/AppsUserGetLikeV1Request.cs @@ -0,0 +1,22 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [GET] /apps/v1/user/get_like/ 接口的请求。 + /// + public class AppsUserGetLikeV1Request : DouyinMicroAppRequest + { + /// + /// 获取或设置用户的 OpenId。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string OpenId { get; set; } = string.Empty; + + /// + /// 获取或设置数据范围类型。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public int DateType { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsUser/AppsUserGetLikeV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsUser/AppsUserGetLikeV1Response.cs new file mode 100644 index 00000000..0fba324e --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsUser/AppsUserGetLikeV1Response.cs @@ -0,0 +1,48 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [GET] /apps/v1/user/get_like/ 接口的响应。 + /// + public class AppsUserGetLikeV1Response : DouyinMicroAppResponse + { + public static class Types + { + public class Data + { + public static class Types + { + public class Result + { + /// + /// 获取或设置日期字符串(格式:yyyy-MM-dd)。 + /// + [Newtonsoft.Json.JsonProperty("date")] + [System.Text.Json.Serialization.JsonPropertyName("date")] + public string DateString { get; set; } = default!; + + /// + /// 获取或设置新增点赞数。 + /// + [Newtonsoft.Json.JsonProperty("new_like")] + [System.Text.Json.Serialization.JsonPropertyName("new_like")] + public long NewLikeCount { get; set; } + } + } + + /// + /// 获取或设置返回结果。 + /// + [Newtonsoft.Json.JsonProperty("result_list")] + [System.Text.Json.Serialization.JsonPropertyName("result_list")] + public Types.Result[] ResultList { get; set; } = default!; + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsUser/AppsUserGetProfileV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsUser/AppsUserGetProfileV1Request.cs new file mode 100644 index 00000000..60f35b25 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsUser/AppsUserGetProfileV1Request.cs @@ -0,0 +1,22 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [GET] /apps/v1/user/get_profile/ 接口的请求。 + /// + public class AppsUserGetProfileV1Request : DouyinMicroAppRequest + { + /// + /// 获取或设置用户的 OpenId。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string OpenId { get; set; } = string.Empty; + + /// + /// 获取或设置数据范围类型。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public int DateType { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsUser/AppsUserGetProfileV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsUser/AppsUserGetProfileV1Response.cs new file mode 100644 index 00000000..c665a201 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsUser/AppsUserGetProfileV1Response.cs @@ -0,0 +1,48 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [GET] /apps/v1/user/get_profile/ 接口的响应。 + /// + public class AppsUserGetProfileV1Response : DouyinMicroAppResponse + { + public static class Types + { + public class Data + { + public static class Types + { + public class Result + { + /// + /// 获取或设置日期字符串(格式:yyyy-MM-dd)。 + /// + [Newtonsoft.Json.JsonProperty("date")] + [System.Text.Json.Serialization.JsonPropertyName("date")] + public string DateString { get; set; } = default!; + + /// + /// 获取或设置个人主页访问人数。 + /// + [Newtonsoft.Json.JsonProperty("profile_uv")] + [System.Text.Json.Serialization.JsonPropertyName("profile_uv")] + public long ProfileUV { get; set; } + } + } + + /// + /// 获取或设置返回结果。 + /// + [Newtonsoft.Json.JsonProperty("result_list")] + [System.Text.Json.Serialization.JsonPropertyName("result_list")] + public Types.Result[] ResultList { get; set; } = default!; + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsUser/AppsUserGetShareV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsUser/AppsUserGetShareV1Request.cs new file mode 100644 index 00000000..d2239416 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsUser/AppsUserGetShareV1Request.cs @@ -0,0 +1,22 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [GET] /apps/v1/user/get_share/ 接口的请求。 + /// + public class AppsUserGetShareV1Request : DouyinMicroAppRequest + { + /// + /// 获取或设置用户的 OpenId。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string OpenId { get; set; } = string.Empty; + + /// + /// 获取或设置数据范围类型。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public int DateType { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsUser/AppsUserGetShareV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsUser/AppsUserGetShareV1Response.cs new file mode 100644 index 00000000..ffb57111 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsUser/AppsUserGetShareV1Response.cs @@ -0,0 +1,48 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [GET] /apps/v1/user/get_share/ 接口的响应。 + /// + public class AppsUserGetShareV1Response : DouyinMicroAppResponse + { + public static class Types + { + public class Data + { + public static class Types + { + public class Result + { + /// + /// 获取或设置日期字符串(格式:yyyy-MM-dd)。 + /// + [Newtonsoft.Json.JsonProperty("date")] + [System.Text.Json.Serialization.JsonPropertyName("date")] + public string DateString { get; set; } = default!; + + /// + /// 获取或设置新增分享数。 + /// + [Newtonsoft.Json.JsonProperty("new_share")] + [System.Text.Json.Serialization.JsonPropertyName("new_share")] + public long NewShareCount { get; set; } + } + } + + /// + /// 获取或设置返回结果。 + /// + [Newtonsoft.Json.JsonProperty("result_list")] + [System.Text.Json.Serialization.JsonPropertyName("result_list")] + public Types.Result[] ResultList { get; set; } = default!; + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsVideo/AppsConvertOpenItemIdToEncryptIdV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsVideo/AppsConvertOpenItemIdToEncryptIdV1Request.cs new file mode 100644 index 00000000..050a9852 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsVideo/AppsConvertOpenItemIdToEncryptIdV1Request.cs @@ -0,0 +1,24 @@ +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/v1/convert_video_id/open_item_id_to_encrypt_id/ 接口的请求。 + /// + public class AppsConvertOpenItemIdToEncryptIdV1Request : DouyinMicroAppRequest + { + /// + /// 获取或设置访问密钥。如果不指定将使用构造 时的 参数。 + /// + [Newtonsoft.Json.JsonProperty("access_key")] + [System.Text.Json.Serialization.JsonPropertyName("access_key")] + public string? AccessKey { get; set; } + + /// + /// 获取或设置视频 ItemId 列表。 + /// + [Newtonsoft.Json.JsonProperty("video_ids")] + [System.Text.Json.Serialization.JsonPropertyName("video_ids")] + public IList OpenItemIdList { get; set; } = new List(); + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsVideo/AppsConvertOpenItemIdToEncryptIdV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsVideo/AppsConvertOpenItemIdToEncryptIdV1Response.cs new file mode 100644 index 00000000..59def1cd --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsVideo/AppsConvertOpenItemIdToEncryptIdV1Response.cs @@ -0,0 +1,30 @@ +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/v1/convert_video_id/open_item_id_to_encrypt_id/ 接口的响应。 + /// + public class AppsConvertOpenItemIdToEncryptIdV1Response : DouyinMicroAppResponse + { + public static class Types + { + public class Data + { + /// + /// 获取或设置转换结果字典。 + /// + [Newtonsoft.Json.JsonProperty("convert_result")] + [System.Text.Json.Serialization.JsonPropertyName("convert_result")] + public IDictionary Result { get; set; } = default!; + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsVideo/AppsConvertVideoIdToOpenItemIdV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsVideo/AppsConvertVideoIdToOpenItemIdV1Request.cs new file mode 100644 index 00000000..580e5046 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsVideo/AppsConvertVideoIdToOpenItemIdV1Request.cs @@ -0,0 +1,31 @@ +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/v1/convert_video_id/video_id_to_open_item_id/ 接口的请求。 + /// + public class AppsConvertVideoIdToOpenItemIdV1Request : DouyinMicroAppRequest + { + /// + /// 获取或设置小程序 AppId。如果不指定将使用构造 时的 参数。 + /// + [Newtonsoft.Json.JsonProperty("app_id")] + [System.Text.Json.Serialization.JsonPropertyName("app_id")] + public string? AppId { get; set; } + + /// + /// 获取或设置访问密钥。如果不指定将使用构造 时的 参数。 + /// + [Newtonsoft.Json.JsonProperty("access_key")] + [System.Text.Json.Serialization.JsonPropertyName("access_key")] + public string? AccessKey { get; set; } + + /// + /// 获取或设置视频 ID 列表。 + /// + [Newtonsoft.Json.JsonProperty("video_ids")] + [System.Text.Json.Serialization.JsonPropertyName("video_ids")] + public IList VideoIdList { get; set; } = new List(); + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsVideo/AppsConvertVideoIdToOpenItemIdV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsVideo/AppsConvertVideoIdToOpenItemIdV1Response.cs new file mode 100644 index 00000000..f98632d8 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsVideo/AppsConvertVideoIdToOpenItemIdV1Response.cs @@ -0,0 +1,30 @@ +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/v1/convert_video_id/video_id_to_open_item_id/ 接口的响应。 + /// + public class AppsConvertVideoIdToOpenItemIdV1Response : DouyinMicroAppResponse + { + public static class Types + { + public class Data + { + /// + /// 获取或设置转换结果字典。 + /// + [Newtonsoft.Json.JsonProperty("convert_result")] + [System.Text.Json.Serialization.JsonPropertyName("convert_result")] + public IDictionary Result { get; set; } = default!; + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsVideo/AppsVideoBCQueryV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsVideo/AppsVideoBCQueryV1Request.cs new file mode 100644 index 00000000..3488df54 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsVideo/AppsVideoBCQueryV1Request.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/v1/video_bc/query/ 接口的请求。 + /// + public class AppsVideoBCQueryV1Request : AppsVideoQueryV1Request + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsVideo/AppsVideoBCQueryV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsVideo/AppsVideoBCQueryV1Response.cs new file mode 100644 index 00000000..bbba47a0 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsVideo/AppsVideoBCQueryV1Response.cs @@ -0,0 +1,35 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/v1/video_bc/query/ 接口的响应。 + /// + public class AppsVideoBCQueryV1Response : DouyinMicroAppResponse + { + public static class Types + { + public class Data + { + public static class Types + { + public class Video : AppsVideoQueryV1Response.Types.Data.Types.Video + { + } + } + + /// + /// 获取或设置视频列表。 + /// + [Newtonsoft.Json.JsonProperty("list")] + [System.Text.Json.Serialization.JsonPropertyName("list")] + public Types.Video[] VideoList { get; set; } = default!; + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsVideo/AppsVideoQueryV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsVideo/AppsVideoQueryV1Request.cs new file mode 100644 index 00000000..89f16369 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsVideo/AppsVideoQueryV1Request.cs @@ -0,0 +1,31 @@ +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/v1/video/query/ 接口的请求。 + /// + public class AppsVideoQueryV1Request : DouyinMicroAppRequest + { + /// + /// 获取或设置用户的 OpenId。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string OpenId { get; set; } = string.Empty; + + /// + /// 获取或设置视频 ID 列表。与字段 二选一。 + /// + [Newtonsoft.Json.JsonProperty("item_ids")] + [System.Text.Json.Serialization.JsonPropertyName("item_ids")] + public IList? ItemIdList { get; set; } + + /// + /// 获取或设置视频 ID 列表。与字段 二选一。 + /// + [Newtonsoft.Json.JsonProperty("video_ids")] + [System.Text.Json.Serialization.JsonPropertyName("video_ids")] + public IList? VideoIdList { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsVideo/AppsVideoQueryV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsVideo/AppsVideoQueryV1Response.cs new file mode 100644 index 00000000..0077ef27 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsVideo/AppsVideoQueryV1Response.cs @@ -0,0 +1,159 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/v1/video/query/ 接口的响应。 + /// + public class AppsVideoQueryV1Response : DouyinMicroAppResponse + { + public static class Types + { + public class Data + { + public static class Types + { + public class Video + { + public static class Types + { + public class Statistics + { + /// + /// 获取或设置点赞数。 + /// + [Newtonsoft.Json.JsonProperty("digg_count")] + [System.Text.Json.Serialization.JsonPropertyName("digg_count")] + public int DiggCount { get; set; } + + /// + /// 获取或设置下载数。 + /// + [Newtonsoft.Json.JsonProperty("download_count")] + [System.Text.Json.Serialization.JsonPropertyName("download_count")] + public int DownloadCount { get; set; } + + /// + /// 获取或设置转发数。 + /// + [Newtonsoft.Json.JsonProperty("forward_count")] + [System.Text.Json.Serialization.JsonPropertyName("forward_count")] + public int ForwardCount { get; set; } + + /// + /// 获取或设置播放数。 + /// + [Newtonsoft.Json.JsonProperty("play_count")] + [System.Text.Json.Serialization.JsonPropertyName("play_count")] + public int PlayCount { get; set; } + + /// + /// 获取或设置分享数。 + /// + [Newtonsoft.Json.JsonProperty("share_count")] + [System.Text.Json.Serialization.JsonPropertyName("share_count")] + public int ShareCount { get; set; } + + /// + /// 获取或设置评论数。 + /// + [Newtonsoft.Json.JsonProperty("comment_count")] + [System.Text.Json.Serialization.JsonPropertyName("comment_count")] + public int CommentCount { get; set; } + } + } + + /// + /// 获取或设置视频 ID。 + /// + [Newtonsoft.Json.JsonProperty("item_id")] + [System.Text.Json.Serialization.JsonPropertyName("item_id")] + public string? ItemId { get; set; } + + /// + /// 获取或设置视频 ID。 + /// + [Newtonsoft.Json.JsonProperty("video_id")] + [System.Text.Json.Serialization.JsonPropertyName("video_id")] + public string? VideoId { get; set; } + + /// + /// 获取或设置视频标题。 + /// + [Newtonsoft.Json.JsonProperty("title")] + [System.Text.Json.Serialization.JsonPropertyName("title")] + public string Title { get; set; } = default!; + + /// + /// 获取或设置视频状态。 + /// + [Newtonsoft.Json.JsonProperty("video_status")] + [System.Text.Json.Serialization.JsonPropertyName("video_status")] + public int VideoStatus { get; set; } + + /// + /// 获取或设置视频封面 URL。 + /// + [Newtonsoft.Json.JsonProperty("cover")] + [System.Text.Json.Serialization.JsonPropertyName("cover")] + public string CoverUrl { get; set; } = default!; + + /// + /// 获取或设置分享链接 URL。 + /// + [Newtonsoft.Json.JsonProperty("share_url")] + [System.Text.Json.Serialization.JsonPropertyName("share_url")] + public string ShareUrl { get; set; } = default!; + + /// + /// 获取或设置是否审核结束。 + /// + [Newtonsoft.Json.JsonProperty("is_reviewed")] + [System.Text.Json.Serialization.JsonPropertyName("is_reviewed")] + public bool IsReviewed { get; set; } + + /// + /// 获取或设置是否置顶。 + /// + [Newtonsoft.Json.JsonProperty("is_top")] + [System.Text.Json.Serialization.JsonPropertyName("is_top")] + public bool IsTop { get; set; } + + /// + /// 获取或设置创建时间戳。 + /// + [Newtonsoft.Json.JsonProperty("create_time")] + [System.Text.Json.Serialization.JsonPropertyName("create_time")] + public long CreateTimestamp { get; set; } + + /// + /// 获取或设置媒体类型。 + /// + [Newtonsoft.Json.JsonProperty("media_type")] + [System.Text.Json.Serialization.JsonPropertyName("media_type")] + public int MediaType { get; set; } + + /// + /// 获取或设置统计数据。 + /// + [Newtonsoft.Json.JsonProperty("statistics")] + [System.Text.Json.Serialization.JsonPropertyName("statistics")] + public Types.Statistics Statistics { get; set; } = default!; + } + } + + /// + /// 获取或设置视频列表。 + /// + [Newtonsoft.Json.JsonProperty("list")] + [System.Text.Json.Serialization.JsonPropertyName("list")] + public Types.Video[] VideoList { get; set; } = default!; + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/MatchTaskBox/MatchTaskBoxAddRoomTaskV2Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/MatchTaskBox/MatchTaskBoxAddRoomTaskV2Request.cs new file mode 100644 index 00000000..337b801b --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/MatchTaskBox/MatchTaskBoxAddRoomTaskV2Request.cs @@ -0,0 +1,94 @@ +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /match/v2/taskbox/add_room_task/ 接口的请求。 + /// + public class MatchTaskBoxAddRoomTaskV2Request : DouyinMicroAppRequest + { + /// + /// 获取或设置任务名称。 + /// + [Newtonsoft.Json.JsonProperty("task_name")] + [System.Text.Json.Serialization.JsonPropertyName("task_name")] + public string TaskName { get; set; } = string.Empty; + + /// + /// 获取或设置结算方式。 + /// + [Newtonsoft.Json.JsonProperty("task_settle_type")] + [System.Text.Json.Serialization.JsonPropertyName("task_settle_type")] + public int TaskSettleType { get; set; } + + /// + /// 获取或设置小程序页面地址。 + /// + [Newtonsoft.Json.JsonProperty("start_page")] + [System.Text.Json.Serialization.JsonPropertyName("start_page")] + public string? PagePath { get; set; } + + /// + /// 获取或设置直播间页面标题。 + /// + [Newtonsoft.Json.JsonProperty("room_title")] + [System.Text.Json.Serialization.JsonPropertyName("room_title")] + public string? RoomTitle { get; set; } + + /// + /// 获取或设置内容标签。 + /// + [Newtonsoft.Json.JsonProperty("content_tag")] + [System.Text.Json.Serialization.JsonPropertyName("content_tag")] + public string? ContentTag { get; set; } + + /// + /// 获取或设置形态标签。 + /// + [Newtonsoft.Json.JsonProperty("form_tag")] + [System.Text.Json.Serialization.JsonPropertyName("form_tag")] + public string? FormTag { get; set; } + + /// + /// 获取或设置任务图标 URL。 + /// + [Newtonsoft.Json.JsonProperty("task_icon")] + [System.Text.Json.Serialization.JsonPropertyName("task_icon")] + public string TaskIconUrl { get; set; } = string.Empty; + + /// + /// 获取或设置任务开始时间戳。 + /// + [Newtonsoft.Json.JsonProperty("task_start_time")] + [System.Text.Json.Serialization.JsonPropertyName("task_start_time")] + public long TaskStartTimestamp { get; set; } + + /// + /// 获取或设置任务结束时间戳。 + /// + [Newtonsoft.Json.JsonProperty("task_end_time")] + [System.Text.Json.Serialization.JsonPropertyName("task_end_time")] + public long TaskEndTimestamp { get; set; } + + /// + /// 获取或设置任务简介。 + /// + [Newtonsoft.Json.JsonProperty("task_desc")] + [System.Text.Json.Serialization.JsonPropertyName("task_desc")] + public string TaskDescription { get; set; } = string.Empty; + + /// + /// 获取或设置示例视频 URL 列表。 + /// + [Newtonsoft.Json.JsonProperty("refer_videos")] + [System.Text.Json.Serialization.JsonPropertyName("refer_videos")] + public IList? ReferVideoUrlList { get; set; } + + /// + /// 获取或设置小程序截图 URL 列表。 + /// + [Newtonsoft.Json.JsonProperty("refer_ma_captures")] + [System.Text.Json.Serialization.JsonPropertyName("refer_ma_captures")] + public IList? ReferMicroAppCaptureUrlList { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/MatchTaskBox/MatchTaskBoxAddRoomTaskV2Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/MatchTaskBox/MatchTaskBoxAddRoomTaskV2Response.cs new file mode 100644 index 00000000..db0550fc --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/MatchTaskBox/MatchTaskBoxAddRoomTaskV2Response.cs @@ -0,0 +1,36 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /match/v2/taskbox/add_room_task/ 接口的响应。 + /// + public class MatchTaskBoxAddRoomTaskV2Response : DouyinMicroAppResponse + { + public static class Types + { + public class Data + { + /// + /// 获取或设置任务 ID。 + /// + [Newtonsoft.Json.JsonProperty("task_id")] + [System.Text.Json.Serialization.JsonPropertyName("task_id")] + [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)] + public long TaskId { get; set; } + + /// + /// 获取或设置任务链接。 + /// + [Newtonsoft.Json.JsonProperty("task_url")] + [System.Text.Json.Serialization.JsonPropertyName("task_url")] + public string TaskUrl { get; set; } = default!; + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/MatchTaskBox/MatchTaskBoxAddTaskV2Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/MatchTaskBox/MatchTaskBoxAddTaskV2Request.cs new file mode 100644 index 00000000..9e647850 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/MatchTaskBox/MatchTaskBoxAddTaskV2Request.cs @@ -0,0 +1,155 @@ +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /match/v2/taskbox/add_task/ 接口的请求。 + /// + public class MatchTaskBoxAddTaskV2Request : DouyinMicroAppRequest + { + /// + [Newtonsoft.Json.JsonProperty("access_token")] + [System.Text.Json.Serialization.JsonPropertyName("access_token")] + public override string? AccessToken { get; set; } + + /// + /// 获取或设置小程序 AppId。如果不指定将使用构造 时的 参数。 + /// + [Newtonsoft.Json.JsonProperty("appid")] + [System.Text.Json.Serialization.JsonPropertyName("appid")] + public string? AppId { get; set; } + + /// + /// 获取或设置任务名称。 + /// + [Newtonsoft.Json.JsonProperty("task_name")] + [System.Text.Json.Serialization.JsonPropertyName("task_name")] + public string TaskName { get; set; } = string.Empty; + + /// + /// 获取或设置结算方式。 + /// + [Newtonsoft.Json.JsonProperty("task_settle_type")] + [System.Text.Json.Serialization.JsonPropertyName("task_settle_type")] + public int TaskSettleType { get; set; } + + /// + /// 获取或设置页面类型。 + /// + [Newtonsoft.Json.JsonProperty("page_type")] + [System.Text.Json.Serialization.JsonPropertyName("page_type")] + public int? PageType { get; set; } + + /// + /// 获取或设置小程序页面地址。 + /// + [Newtonsoft.Json.JsonProperty("start_page")] + [System.Text.Json.Serialization.JsonPropertyName("start_page")] + public string? PagePath { get; set; } + + /// + /// 获取或设置锚点标题。 + /// + [Newtonsoft.Json.JsonProperty("anchor_title")] + [System.Text.Json.Serialization.JsonPropertyName("anchor_title")] + public string? AnchorTitle { get; set; } + + /// + /// 获取或设置任务图标 URL。 + /// + [Newtonsoft.Json.JsonProperty("task_icon")] + [System.Text.Json.Serialization.JsonPropertyName("task_icon")] + public string TaskIconUrl { get; set; } = string.Empty; + + /// + /// 获取或设置任务开始时间戳。 + /// + [Newtonsoft.Json.JsonProperty("task_start_time")] + [System.Text.Json.Serialization.JsonPropertyName("task_start_time")] + public long TaskStartTimestamp { get; set; } + + /// + /// 获取或设置任务结束时间戳。 + /// + [Newtonsoft.Json.JsonProperty("task_end_time")] + [System.Text.Json.Serialization.JsonPropertyName("task_end_time")] + public long TaskEndTimestamp { get; set; } + + /// + /// 获取或设置任务简介。 + /// + [Newtonsoft.Json.JsonProperty("task_desc")] + [System.Text.Json.Serialization.JsonPropertyName("task_desc")] + public string TaskDescription { get; set; } = string.Empty; + + /// + /// 获取或设置示例视频 URL 列表。 + /// + [Newtonsoft.Json.JsonProperty("refer_videos")] + [System.Text.Json.Serialization.JsonPropertyName("refer_videos")] + public IList? ReferVideoUrlList { get; set; } + + /// + /// 获取或设置任务标签列表。 + /// + [Newtonsoft.Json.JsonProperty("task_tags")] + [System.Text.Json.Serialization.JsonPropertyName("task_tags")] + public IList TaskTagList { get; set; } = new List(); + + /// + /// 获取或设置小程序截图 URL 列表。 + /// + [Newtonsoft.Json.JsonProperty("refer_ma_captures")] + [System.Text.Json.Serialization.JsonPropertyName("refer_ma_captures")] + public IList? ReferMicroAppCaptureUrlList { get; set; } + + /// + /// 获取或设置视频的 GID 列表。 + /// + [Newtonsoft.Json.JsonProperty("refer_gids")] + [System.Text.Json.Serialization.JsonPropertyName("refer_gids")] + public IList? ReferGIdList { get; set; } + + /// + /// 获取或设置任务最大退款周期(单位:天)。 + /// + [Newtonsoft.Json.JsonProperty("task_refund_period")] + [System.Text.Json.Serialization.JsonPropertyName("task_refund_period")] + public int? TaskRefundPeriod { get; set; } + + /// + /// 获取或设置指定推广达人列表。 + /// + [Newtonsoft.Json.JsonProperty("douyin_ids")] + [System.Text.Json.Serialization.JsonPropertyName("douyin_ids")] + public IList? DouyinIdList { get; set; } + + /// + /// 获取或设置混合分成比例字典(单位:万分数)。 + /// + [Newtonsoft.Json.JsonProperty("mix_payment_allocate_ratio")] + [System.Text.Json.Serialization.JsonPropertyName("mix_payment_allocate_ratio")] + public IDictionary? MixPaymentAllocateRatioMap { get; set; } + + /// + /// 获取或设置分成比例(单位:万分数)。 + /// + [Newtonsoft.Json.JsonProperty("payment_allocate_ratio")] + [System.Text.Json.Serialization.JsonPropertyName("payment_allocate_ratio")] + public int? PaymentAllocateRatio { get; set; } + + /// + /// 获取或设置达人混合分成比例字典(单位:万分数)。 + /// + [Newtonsoft.Json.JsonProperty("talent_mix_payment_allocate_ratio")] + [System.Text.Json.Serialization.JsonPropertyName("talent_mix_payment_allocate_ratio")] + public IDictionary? TalentMixPaymentAllocateRatioMap { get; set; } + + /// + /// 获取或设置达人分成比例(单位:万分数)。 + /// + [Newtonsoft.Json.JsonProperty("talent_payment_allocate_ratio")] + [System.Text.Json.Serialization.JsonPropertyName("talent_payment_allocate_ratio")] + public int? TalentPaymentAllocateRatio { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/MatchTaskBox/MatchTaskBoxAddTaskV2Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/MatchTaskBox/MatchTaskBoxAddTaskV2Response.cs new file mode 100644 index 00000000..c85dd97c --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/MatchTaskBox/MatchTaskBoxAddTaskV2Response.cs @@ -0,0 +1,29 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /match/v2/taskbox/add_task/ 接口的响应。 + /// + public class MatchTaskBoxAddTaskV2Response : DouyinMicroAppResponse + { + public static class Types + { + public class Data + { + /// + /// 获取或设置任务 ID。 + /// + [Newtonsoft.Json.JsonProperty("task_id")] + [System.Text.Json.Serialization.JsonPropertyName("task_id")] + [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)] + public long TaskId { get; set; } + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/MatchTaskBox/MatchTaskBoxQueryAppTaskIdV2Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/MatchTaskBox/MatchTaskBoxQueryAppTaskIdV2Request.cs new file mode 100644 index 00000000..21d91b7b --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/MatchTaskBox/MatchTaskBoxQueryAppTaskIdV2Request.cs @@ -0,0 +1,22 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /match/v2/taskbox/query_app_task_id/ 接口的请求。 + /// + public class MatchTaskBoxQueryAppTaskIdV2Request : DouyinMicroAppRequest + { + /// + /// 获取或设置创建时间起始时间戳。 + /// + [Newtonsoft.Json.JsonProperty("create_start_time")] + [System.Text.Json.Serialization.JsonPropertyName("create_start_time")] + public long StartCreateTimestamp { get; set; } + + /// + /// 获取或设置创建时间终止时间戳。 + /// + [Newtonsoft.Json.JsonProperty("create_end_time")] + [System.Text.Json.Serialization.JsonPropertyName("create_end_time")] + public long EndCreateTimestamp { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/MatchTaskBox/MatchTaskBoxQueryAppTaskIdV2Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/MatchTaskBox/MatchTaskBoxQueryAppTaskIdV2Response.cs new file mode 100644 index 00000000..b672ab4c --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/MatchTaskBox/MatchTaskBoxQueryAppTaskIdV2Response.cs @@ -0,0 +1,28 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /match/v2/taskbox/query_app_task_id/ 接口的响应。 + /// + public class MatchTaskBoxQueryAppTaskIdV2Response : DouyinMicroAppResponse + { + public static class Types + { + public class Data + { + /// + /// 获取或设置任务 ID 列表。 + /// + [Newtonsoft.Json.JsonProperty("task_ids")] + [System.Text.Json.Serialization.JsonPropertyName("task_ids")] + public long[] TaskIdList { get; set; } = default!; + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/MatchTaskBox/MatchTaskBoxQueryBillLinkV2Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/MatchTaskBox/MatchTaskBoxQueryBillLinkV2Request.cs new file mode 100644 index 00000000..a46f4a5c --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/MatchTaskBox/MatchTaskBoxQueryBillLinkV2Request.cs @@ -0,0 +1,15 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /match/v2/taskbox/query_bill_link/ 接口的请求。 + /// + public class MatchTaskBoxQueryBillLinkV2Request : DouyinMicroAppRequest + { + /// + /// 获取或设置计费日期字符串(格式:yyyy-MM-dd)。 + /// + [Newtonsoft.Json.JsonProperty("bill_date")] + [System.Text.Json.Serialization.JsonPropertyName("bill_date")] + public string BillDateString { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/MatchTaskBox/MatchTaskBoxQueryBillLinkV2Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/MatchTaskBox/MatchTaskBoxQueryBillLinkV2Response.cs new file mode 100644 index 00000000..fa5eead8 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/MatchTaskBox/MatchTaskBoxQueryBillLinkV2Response.cs @@ -0,0 +1,28 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /match/v2/taskbox/query_bill_link/ 接口的响应。 + /// + public class MatchTaskBoxQueryBillLinkV2Response : DouyinMicroAppResponse + { + public static class Types + { + public class Data + { + /// + /// 获取或设置账单文件下载链接。 + /// + [Newtonsoft.Json.JsonProperty("bill_link")] + [System.Text.Json.Serialization.JsonPropertyName("bill_link")] + public string BillLink { get; set; } = default!; + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/MatchTaskBox/MatchTaskBoxQueryTaskInfoV2Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/MatchTaskBox/MatchTaskBoxQueryTaskInfoV2Request.cs new file mode 100644 index 00000000..bd51dbbf --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/MatchTaskBox/MatchTaskBoxQueryTaskInfoV2Request.cs @@ -0,0 +1,38 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /match/v2/taskbox/query_task_info/ 接口的请求。 + /// + public class MatchTaskBoxQueryTaskInfoV2Request : DouyinMicroAppRequest + { + /// + /// 获取或设置分页页数。 + /// 默认值:1 + /// + [Newtonsoft.Json.JsonProperty("page_num")] + [System.Text.Json.Serialization.JsonPropertyName("page_num")] + public int PageNumber { get; set; } + + /// + /// 获取或设置分页每页数量。 + /// 默认值:10 + /// + [Newtonsoft.Json.JsonProperty("page_size")] + [System.Text.Json.Serialization.JsonPropertyName("page_size")] + public int PageSize { get; set; } = 10; + + /// + /// 获取或设置查询参数类型。 + /// + [Newtonsoft.Json.JsonProperty("query_params_type")] + [System.Text.Json.Serialization.JsonPropertyName("query_params_type")] + public int QueryParameterType { get; set; } + + /// + /// 获取或设置查询参数内容。 + /// + [Newtonsoft.Json.JsonProperty("query_params_content")] + [System.Text.Json.Serialization.JsonPropertyName("query_params_content")] + public string QueryParameterContent { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/MatchTaskBox/MatchTaskBoxQueryTaskInfoV2Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/MatchTaskBox/MatchTaskBoxQueryTaskInfoV2Response.cs new file mode 100644 index 00000000..48192b5b --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/MatchTaskBox/MatchTaskBoxQueryTaskInfoV2Response.cs @@ -0,0 +1,274 @@ +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /match/v2/taskbox/query_task_info/ 接口的响应。 + /// + public class MatchTaskBoxQueryTaskInfoV2Response : DouyinMicroAppResponse + { + public static class Types + { + public class Data + { + public static class Types + { + public class Task + { + public static class Types + { + public class OrientedTalent + { + /// + /// 获取或设置达人抖音号。 + /// + [Newtonsoft.Json.JsonProperty("douyin_id")] + [System.Text.Json.Serialization.JsonPropertyName("douyin_id")] + public string DouyinId { get; set; } = default!; + + /// + /// 获取或设置合作状态。 + /// + [Newtonsoft.Json.JsonProperty("cooperation_state")] + [System.Text.Json.Serialization.JsonPropertyName("cooperation_state")] + public int CooperationState { get; set; } + + /// + /// 获取或设置取消方类型。 + /// + [Newtonsoft.Json.JsonProperty("cancel_operator")] + [System.Text.Json.Serialization.JsonPropertyName("cancel_operator")] + public int? CancelOperatorType { get; set; } + } + } + + /// + /// 获取或设置任务 ID。 + /// + [Newtonsoft.Json.JsonProperty("task_id")] + [System.Text.Json.Serialization.JsonPropertyName("task_id")] + [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)] + public long TaskId { get; set; } + + /// + /// 获取或设置任务所属小程序。 + /// + [Newtonsoft.Json.JsonProperty("appid")] + [System.Text.Json.Serialization.JsonPropertyName("appid")] + public string AppId { get; set; } = default!; + + /// + /// 获取或设置任务名称。 + /// + [Newtonsoft.Json.JsonProperty("task_name")] + [System.Text.Json.Serialization.JsonPropertyName("task_name")] + public string TaskName { get; set; } = default!; + + /// + /// 获取或设置结算方式。 + /// + [Newtonsoft.Json.JsonProperty("task_settle_type")] + [System.Text.Json.Serialization.JsonPropertyName("task_settle_type")] + public int TaskSettleType { get; set; } + + /// + /// 获取或设置页面类型。 + /// + [Newtonsoft.Json.JsonProperty("page_type")] + [System.Text.Json.Serialization.JsonPropertyName("page_type")] + public int? PageType { get; set; } + + /// + /// 获取或设置小程序页面地址。 + /// + [Newtonsoft.Json.JsonProperty("start_page")] + [System.Text.Json.Serialization.JsonPropertyName("start_page")] + public string? PagePath { get; set; } + + /// + /// 获取或设置锚点标题。 + /// + [Newtonsoft.Json.JsonProperty("anchor_title")] + [System.Text.Json.Serialization.JsonPropertyName("anchor_title")] + public string? AnchorTitle { get; set; } + + /// + /// 获取或设置任务图标 URL。 + /// + [Newtonsoft.Json.JsonProperty("task_icon")] + [System.Text.Json.Serialization.JsonPropertyName("task_icon")] + public string TaskIconUrl { get; set; } = default!; + + /// + /// 获取或设置任务开始时间戳。 + /// + [Newtonsoft.Json.JsonProperty("task_start_time")] + [System.Text.Json.Serialization.JsonPropertyName("task_start_time")] + public long TaskStartTimestamp { get; set; } + + /// + /// 获取或设置任务结束时间戳。 + /// + [Newtonsoft.Json.JsonProperty("task_end_time")] + [System.Text.Json.Serialization.JsonPropertyName("task_end_time")] + public long TaskEndTimestamp { get; set; } + + /// + /// 获取或设置任务简介。 + /// + [Newtonsoft.Json.JsonProperty("task_desc")] + [System.Text.Json.Serialization.JsonPropertyName("task_desc")] + public string TaskDescription { get; set; } = default!; + + /// + /// 获取或设置任务类型。 + /// + [Newtonsoft.Json.JsonProperty("task_type")] + [System.Text.Json.Serialization.JsonPropertyName("task_type")] + public int TaskType { get; set; } + + /// + /// 获取或设置任务状态。 + /// + [Newtonsoft.Json.JsonProperty("status")] + [System.Text.Json.Serialization.JsonPropertyName("status")] + public int TaskStatus { get; set; } + + /// + /// 获取或设置驳回原因。 + /// + [Newtonsoft.Json.JsonProperty("reject_reason")] + [System.Text.Json.Serialization.JsonPropertyName("reject_reason")] + public string? RejectReason { get; set; } + + /// + /// 获取或设置示例视频 URL 列表。 + /// + [Newtonsoft.Json.JsonProperty("refer_videos")] + [System.Text.Json.Serialization.JsonPropertyName("refer_videos")] + public string[]? ReferVideoUrlList { get; set; } + + /// + /// 获取或设置任务标签列表。 + /// + [Newtonsoft.Json.JsonProperty("task_tags")] + [System.Text.Json.Serialization.JsonPropertyName("task_tags")] + public string[] TaskTagList { get; set; } = default!; + + /// + /// 获取或设置小程序截图 URL 列表。 + /// + [Newtonsoft.Json.JsonProperty("refer_ma_captures")] + [System.Text.Json.Serialization.JsonPropertyName("refer_ma_captures")] + public string[]? ReferMicroAppCaptureUrlList { get; set; } + + /// + /// 获取或设置示例视频截图 URL 列表。 + /// + [Newtonsoft.Json.JsonProperty("refer_video_captures")] + [System.Text.Json.Serialization.JsonPropertyName("refer_video_captures")] + public string[]? ReferVideoCaptureUrlList { get; set; } + + /// + /// 获取或设置视频的 GID 列表。 + /// + [Newtonsoft.Json.JsonProperty("refer_gids")] + [System.Text.Json.Serialization.JsonPropertyName("refer_gids")] + public long[]? ReferGIdList { get; set; } + + /// + /// 获取或设置专属达人列表。 + /// + [Newtonsoft.Json.JsonProperty("oriented_talent_rel_list")] + [System.Text.Json.Serialization.JsonPropertyName("oriented_talent_rel_list")] + public Types.OrientedTalent[]? OrientedTalentList { get; set; } + + /// + /// 获取或设置任务最大退款周期(单位:天)。 + /// + [Newtonsoft.Json.JsonProperty("task_refund_period")] + [System.Text.Json.Serialization.JsonPropertyName("task_refund_period")] + public int? TaskRefundPeriod { get; set; } + + /// + /// 获取或设置混合分成比例字典(单位:万分数)。 + /// + [Newtonsoft.Json.JsonProperty("mix_payment_allocate_ratio")] + [System.Text.Json.Serialization.JsonPropertyName("mix_payment_allocate_ratio")] + public IDictionary? MixPaymentAllocateRatioMap { get; set; } + + /// + /// 获取或设置分成比例(单位:万分数)。 + /// + [Newtonsoft.Json.JsonProperty("payment_allocate_ratio")] + [System.Text.Json.Serialization.JsonPropertyName("payment_allocate_ratio")] + public int? PaymentAllocateRatio { get; set; } + + /// + /// 获取或设置达人混合分成比例字典(单位:万分数)。 + /// + [Newtonsoft.Json.JsonProperty("talent_mix_payment_allocate_ratio")] + [System.Text.Json.Serialization.JsonPropertyName("talent_mix_payment_allocate_ratio")] + public IDictionary? TalentMixPaymentAllocateRatioMap { get; set; } + + /// + /// 获取或设置达人分成比例(单位:万分数)。 + /// + [Newtonsoft.Json.JsonProperty("talent_payment_allocate_ratio")] + [System.Text.Json.Serialization.JsonPropertyName("talent_payment_allocate_ratio")] + public int? TalentPaymentAllocateRatio { get; set; } + + /// + /// 获取或设置平台小程序版地址。 + /// + [Newtonsoft.Json.JsonProperty("platform_address_app")] + [System.Text.Json.Serialization.JsonPropertyName("platform_address_app")] + public string? PlatformMicroAppPagePath { get; set; } + + /// + /// 获取或设置平台 Web 版地址。 + /// + [Newtonsoft.Json.JsonProperty("platform_address_web")] + [System.Text.Json.Serialization.JsonPropertyName("platform_address_web")] + public string? PlatformWebUrl { get; set; } + } + } + + /// + /// 获取或设置任务列表。 + /// + [Newtonsoft.Json.JsonProperty("tasks")] + [System.Text.Json.Serialization.JsonPropertyName("tasks")] + public Types.Task[] TaskList { get; set; } = default!; + + /// + /// 获取或设置总数量。 + /// + [Newtonsoft.Json.JsonProperty("total")] + [System.Text.Json.Serialization.JsonPropertyName("total")] + public int TotalCount { get; set; } + + /// + /// 获取或设置总页数。 + /// + [Newtonsoft.Json.JsonProperty("page_count")] + [System.Text.Json.Serialization.JsonPropertyName("page_count")] + public int PageCount { get; set; } + + /// + /// 获取或设置推广计划小程序 AppId。 + /// + [Newtonsoft.Json.JsonProperty("app_id")] + [System.Text.Json.Serialization.JsonPropertyName("app_id")] + public string AppId { get; set; } = default!; + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/MatchTaskBox/MatchTaskBoxQueryVideoSummaryDataV2Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/MatchTaskBox/MatchTaskBoxQueryVideoSummaryDataV2Request.cs new file mode 100644 index 00000000..2588162b --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/MatchTaskBox/MatchTaskBoxQueryVideoSummaryDataV2Request.cs @@ -0,0 +1,17 @@ +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /match/v2/taskbox/query_video_sum_data/ 接口的请求。 + /// + public class MatchTaskBoxQueryVideoSummaryDataV2Request : DouyinMicroAppRequest + { + /// + /// 获取或设置视频 ID 列表。 + /// + [Newtonsoft.Json.JsonProperty("video_ids")] + [System.Text.Json.Serialization.JsonPropertyName("video_ids")] + public IList VideoIdList { get; set; } = new List(); + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/MatchTaskBox/MatchTaskBoxQueryVideoSummaryDataV2Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/MatchTaskBox/MatchTaskBoxQueryVideoSummaryDataV2Response.cs new file mode 100644 index 00000000..948daa9e --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/MatchTaskBox/MatchTaskBoxQueryVideoSummaryDataV2Response.cs @@ -0,0 +1,65 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /match/v2/taskbox/query_video_sum_data/ 接口的响应。 + /// + public class MatchTaskBoxQueryVideoSummaryDataV2Response : DouyinMicroAppResponse + { + public static class Types + { + public class Data + { + /// + /// 获取或设置任务 ID。 + /// + [Newtonsoft.Json.JsonProperty("task_id")] + [System.Text.Json.Serialization.JsonPropertyName("task_id")] + [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)] + public long TaskId { get; set; } + + /// + /// 获取或设置视频 ID。 + /// + [Newtonsoft.Json.JsonProperty("video_id")] + [System.Text.Json.Serialization.JsonPropertyName("video_id")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))] + public string VideoId { get; set; } = default!; + + /// + /// 获取或设置团长 ID。 + /// + [Newtonsoft.Json.JsonProperty("agent_id")] + [System.Text.Json.Serialization.JsonPropertyName("agent_id")] + public string? AgentId { get; set; } + + /// + /// 获取或设置发布时间戳。 + /// + [Newtonsoft.Json.JsonProperty("publish_time")] + [System.Text.Json.Serialization.JsonPropertyName("publish_time")] + public long PublishTimestamp { get; set; } + + /// + /// 获取或设置任务关联的交易金额(单位:分)。 + /// + [Newtonsoft.Json.JsonProperty("billing_gmv_td")] + [System.Text.Json.Serialization.JsonPropertyName("billing_gmv_td")] + public long BillingGMV { get; set; } + + /// + /// 获取或设置任务关联的交易金额累计退款金额(单位:分)。 + /// + [Newtonsoft.Json.JsonProperty("biling_refund_gmv_td")] + [System.Text.Json.Serialization.JsonPropertyName("biling_refund_gmv_td")] + public long BillingRefundGMV { get; set; } + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data[] Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/MatchTaskBox/MatchTaskBoxUpdateStatusV2Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/MatchTaskBox/MatchTaskBoxUpdateStatusV2Request.cs new file mode 100644 index 00000000..b2cf996b --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/MatchTaskBox/MatchTaskBoxUpdateStatusV2Request.cs @@ -0,0 +1,24 @@ +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /match/v2/taskbox/update_status/ 接口的请求。 + /// + public class MatchTaskBoxUpdateStatusV2Request : DouyinMicroAppRequest + { + /// + /// 获取或设置任务 ID。 + /// + [Newtonsoft.Json.JsonProperty("task_id")] + [System.Text.Json.Serialization.JsonPropertyName("task_id")] + public long TaskId { get; set; } + + /// + /// 获取或设置任务状态。 + /// + [Newtonsoft.Json.JsonProperty("task_status")] + [System.Text.Json.Serialization.JsonPropertyName("task_status")] + public int TaskStatus { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/MatchTaskBox/MatchTaskBoxUpdateStatusV2Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/MatchTaskBox/MatchTaskBoxUpdateStatusV2Response.cs new file mode 100644 index 00000000..8fbab614 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/MatchTaskBox/MatchTaskBoxUpdateStatusV2Response.cs @@ -0,0 +1,22 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /match/v2/taskbox/update_status/ 接口的响应。 + /// + public class MatchTaskBoxUpdateStatusV2Response : DouyinMicroAppResponse + { + public static class Types + { + public class Data : MatchTaskBoxAddTaskV2Response.Types.Data + { + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/MatchTaskBox/MatchTaskBoxUpdateTaskV2Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/MatchTaskBox/MatchTaskBoxUpdateTaskV2Request.cs new file mode 100644 index 00000000..f2efb83c --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/MatchTaskBox/MatchTaskBoxUpdateTaskV2Request.cs @@ -0,0 +1,120 @@ +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /match/v2/taskbox/update_task/ 接口的请求。 + /// + public class MatchTaskBoxUpdateTaskV2Request : DouyinMicroAppRequest + { + /// + [Newtonsoft.Json.JsonProperty("access_token")] + [System.Text.Json.Serialization.JsonPropertyName("access_token")] + public override string? AccessToken { get; set; } + + /// + /// 获取或设置小程序 AppId。如果不指定将使用构造 时的 参数。 + /// + [Newtonsoft.Json.JsonProperty("appid")] + [System.Text.Json.Serialization.JsonPropertyName("appid")] + public string? AppId { get; set; } + + /// + /// 获取或设置任务 ID。 + /// + [Newtonsoft.Json.JsonProperty("task_id")] + [System.Text.Json.Serialization.JsonPropertyName("task_id")] + public long TaskId { get; set; } + + /// + /// 获取或设置任务名称。 + /// + [Newtonsoft.Json.JsonProperty("task_name")] + [System.Text.Json.Serialization.JsonPropertyName("task_name")] + public string TaskName { get; set; } = string.Empty; + + /// + /// 获取或设置结算方式。 + /// + [Newtonsoft.Json.JsonProperty("task_settle_type")] + [System.Text.Json.Serialization.JsonPropertyName("task_settle_type")] + public int TaskSettleType { get; set; } + + /// + /// 获取或设置页面类型。 + /// + [Newtonsoft.Json.JsonProperty("page_type")] + [System.Text.Json.Serialization.JsonPropertyName("page_type")] + public int? PageType { get; set; } + + /// + /// 获取或设置小程序页面地址。 + /// + [Newtonsoft.Json.JsonProperty("start_page")] + [System.Text.Json.Serialization.JsonPropertyName("start_page")] + public string? PagePath { get; set; } + + /// + /// 获取或设置锚点标题。 + /// + [Newtonsoft.Json.JsonProperty("anchor_title")] + [System.Text.Json.Serialization.JsonPropertyName("anchor_title")] + public string? AnchorTitle { get; set; } + + /// + /// 获取或设置任务图标 URL。 + /// + [Newtonsoft.Json.JsonProperty("task_icon")] + [System.Text.Json.Serialization.JsonPropertyName("task_icon")] + public string TaskIconUrl { get; set; } = string.Empty; + + /// + /// 获取或设置任务开始时间戳。 + /// + [Newtonsoft.Json.JsonProperty("task_start_time")] + [System.Text.Json.Serialization.JsonPropertyName("task_start_time")] + public long TaskStartTimestamp { get; set; } + + /// + /// 获取或设置任务结束时间戳。 + /// + [Newtonsoft.Json.JsonProperty("task_end_time")] + [System.Text.Json.Serialization.JsonPropertyName("task_end_time")] + public long TaskEndTimestamp { get; set; } + + /// + /// 获取或设置任务简介。 + /// + [Newtonsoft.Json.JsonProperty("task_desc")] + [System.Text.Json.Serialization.JsonPropertyName("task_desc")] + public string TaskDescription { get; set; } = string.Empty; + + /// + /// 获取或设置示例视频 URL 列表。 + /// + [Newtonsoft.Json.JsonProperty("refer_videos")] + [System.Text.Json.Serialization.JsonPropertyName("refer_videos")] + public IList? ReferVideoUrlList { get; set; } + + /// + /// 获取或设置任务标签列表。 + /// + [Newtonsoft.Json.JsonProperty("task_tags")] + [System.Text.Json.Serialization.JsonPropertyName("task_tags")] + public IList TaskTagList { get; set; } = new List(); + + /// + /// 获取或设置小程序截图 URL 列表。 + /// + [Newtonsoft.Json.JsonProperty("refer_ma_captures")] + [System.Text.Json.Serialization.JsonPropertyName("refer_ma_captures")] + public IList? ReferMicroAppCaptureUrlList { get; set; } + + /// + /// 获取或设置视频的 GID 列表。 + /// + [Newtonsoft.Json.JsonProperty("refer_gids")] + [System.Text.Json.Serialization.JsonPropertyName("refer_gids")] + public IList? ReferGIdList { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/MatchTaskBox/MatchTaskBoxUpdateTaskV2Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/MatchTaskBox/MatchTaskBoxUpdateTaskV2Response.cs new file mode 100644 index 00000000..a39dc791 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/MatchTaskBox/MatchTaskBoxUpdateTaskV2Response.cs @@ -0,0 +1,22 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /match/v2/taskbox/update_task/ 接口的响应。 + /// + public class MatchTaskBoxUpdateTaskV2Response : DouyinMicroAppResponse + { + public static class Types + { + public class Data : MatchTaskBoxAddTaskV2Response.Types.Data + { + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/NotificationSubscription/NotificationSubscriptionAddAppTemplateV2Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/NotificationSubscription/NotificationSubscriptionAddAppTemplateV2Request.cs new file mode 100644 index 00000000..0d0a13ca --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/NotificationSubscription/NotificationSubscriptionAddAppTemplateV2Request.cs @@ -0,0 +1,24 @@ +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /notification/v2/subscription/add_app_tpl/ 接口的请求。 + /// + public class NotificationSubscriptionAddAppTemplateV2Request : DouyinMicroAppRequest + { + /// + /// 获取或设置模板 ID。 + /// + [Newtonsoft.Json.JsonProperty("template_id")] + [System.Text.Json.Serialization.JsonPropertyName("template_id")] + public long TemplateId { get; set; } + + /// + /// 获取或设置关键词列表。 + /// + [Newtonsoft.Json.JsonProperty("keyword_list")] + [System.Text.Json.Serialization.JsonPropertyName("keyword_list")] + public IList KeywordList { get; set; } = new List(); + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/NotificationSubscription/NotificationSubscriptionAddAppTemplateV2Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/NotificationSubscription/NotificationSubscriptionAddAppTemplateV2Response.cs new file mode 100644 index 00000000..5de2a33d --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/NotificationSubscription/NotificationSubscriptionAddAppTemplateV2Response.cs @@ -0,0 +1,28 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /notification/v2/subscription/add_app_tpl/ 接口的响应。 + /// + public class NotificationSubscriptionAddAppTemplateV2Response : DouyinMicroAppResponse + { + public static class Types + { + public class Data + { + /// + /// 获取或设置消息模板 ID。 + /// + [Newtonsoft.Json.JsonProperty("msg_id")] + [System.Text.Json.Serialization.JsonPropertyName("msg_id")] + public string MessageId { get; set; } = default!; + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/NotificationSubscription/NotificationSubscriptionCreateTemplateV2Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/NotificationSubscription/NotificationSubscriptionCreateTemplateV2Request.cs new file mode 100644 index 00000000..6e17e883 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/NotificationSubscription/NotificationSubscriptionCreateTemplateV2Request.cs @@ -0,0 +1,45 @@ +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /notification/v2/subscription/create_tpl/ 接口的请求。 + /// + public class NotificationSubscriptionCreateTemplateV2Request : DouyinMicroAppRequest + { + /// + /// 获取或设置服务类目 ID 字符串(以逗号分隔)。 + /// + [Newtonsoft.Json.JsonProperty("category_ids")] + [System.Text.Json.Serialization.JsonPropertyName("category_ids")] + public string CategoryIdString { get; set; } = string.Empty; + + /// + /// 获取或设置订阅消息类型。 + /// + [Newtonsoft.Json.JsonProperty("classification")] + [System.Text.Json.Serialization.JsonPropertyName("classification")] + public int Classification { get; set; } + + /// + /// 获取或设置模板标题。 + /// + [Newtonsoft.Json.JsonProperty("title")] + [System.Text.Json.Serialization.JsonPropertyName("title")] + public string Title { get; set; } = string.Empty; + + /// + /// 获取或设置宿主 App 列表。 + /// + [Newtonsoft.Json.JsonProperty("host_list")] + [System.Text.Json.Serialization.JsonPropertyName("host_list")] + public IList HostNameList { get; set; } = new List(); + + /// + /// 获取或设置关键词列表。 + /// + [Newtonsoft.Json.JsonProperty("keyword_list")] + [System.Text.Json.Serialization.JsonPropertyName("keyword_list")] + public IList KeywordList { get; set; } = new List(); + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/NotificationSubscription/NotificationSubscriptionCreateTemplateV2Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/NotificationSubscription/NotificationSubscriptionCreateTemplateV2Response.cs new file mode 100644 index 00000000..561c4465 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/NotificationSubscription/NotificationSubscriptionCreateTemplateV2Response.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /notification/v2/subscription/create_tpl/ 接口的响应。 + /// + public class NotificationSubscriptionCreateTemplateV2Response : DouyinMicroAppResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/NotificationSubscription/NotificationSubscriptionDeleteAppTemplateV2Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/NotificationSubscription/NotificationSubscriptionDeleteAppTemplateV2Request.cs new file mode 100644 index 00000000..018c8646 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/NotificationSubscription/NotificationSubscriptionDeleteAppTemplateV2Request.cs @@ -0,0 +1,15 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /notification/v2/subscription/delete_app_tpl/ 接口的请求。 + /// + public class NotificationSubscriptionDeleteAppTemplateV2Request : DouyinMicroAppRequest + { + /// + /// 获取或设置消息模板 ID。 + /// + [Newtonsoft.Json.JsonProperty("msg_id")] + [System.Text.Json.Serialization.JsonPropertyName("msg_id")] + public string MessageId { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/NotificationSubscription/NotificationSubscriptionDeleteAppTemplateV2Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/NotificationSubscription/NotificationSubscriptionDeleteAppTemplateV2Response.cs new file mode 100644 index 00000000..cfb32c56 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/NotificationSubscription/NotificationSubscriptionDeleteAppTemplateV2Response.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /notification/v2/subscription/delete_app_tpl/ 接口的响应。 + /// + public class NotificationSubscriptionDeleteAppTemplateV2Response : DouyinMicroAppResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/NotificationSubscription/NotificationSubscriptionNotifyUserV2Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/NotificationSubscription/NotificationSubscriptionNotifyUserV2Request.cs new file mode 100644 index 00000000..07b8986a --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/NotificationSubscription/NotificationSubscriptionNotifyUserV2Request.cs @@ -0,0 +1,38 @@ +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /notification/v2/subscription/notify_user/ 接口的请求。 + /// + public class NotificationSubscriptionNotifyUserV2Request : DouyinMicroAppRequest + { + /// + /// 获取或设置消息模板 ID。 + /// + [Newtonsoft.Json.JsonProperty("msg_id")] + [System.Text.Json.Serialization.JsonPropertyName("msg_id")] + public string MessageId { get; set; } = string.Empty; + + /// + /// 获取或设置用户的 OpenId。 + /// + [Newtonsoft.Json.JsonProperty("open_id")] + [System.Text.Json.Serialization.JsonPropertyName("open_id")] + public string OpenId { get; set; } = string.Empty; + + /// + /// 获取或设置模板内容信息。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public IDictionary Data { get; set; } = new Dictionary(); + + /// + /// 获取或设置跳转的页面。 + /// + [Newtonsoft.Json.JsonProperty("page")] + [System.Text.Json.Serialization.JsonPropertyName("page")] + public string? PagePath { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/NotificationSubscription/NotificationSubscriptionNotifyUserV2Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/NotificationSubscription/NotificationSubscriptionNotifyUserV2Response.cs new file mode 100644 index 00000000..676ca30b --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/NotificationSubscription/NotificationSubscriptionNotifyUserV2Response.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /notification/v2/subscription/notify_user/ 接口的响应。 + /// + public class NotificationSubscriptionNotifyUserV2Response : DouyinMicroAppResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/NotificationSubscription/NotificationSubscriptionQueryAppTemplateV2Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/NotificationSubscription/NotificationSubscriptionQueryAppTemplateV2Request.cs new file mode 100644 index 00000000..e5d2c524 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/NotificationSubscription/NotificationSubscriptionQueryAppTemplateV2Request.cs @@ -0,0 +1,38 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [GET] /notification/v2/subscription/query_app_tpl/ 接口的请求。 + /// + public class NotificationSubscriptionQueryAppTemplateV2Request : DouyinMicroAppRequest + { + /// + /// 获取或设置订阅消息类型。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public int Classification { get; set; } + + /// + /// 获取或设置服务类目 ID 字符串(以逗号分隔)。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string? CategoryIdString { get; set; } + + /// + /// 获取或设置分页页数。 + /// 默认值:1 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public int PageNumber { get; set; } = 1; + + /// + /// 获取或设置分页每页数量。 + /// 默认值:10 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public int PageSize { get; set; } = 10; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/NotificationSubscription/NotificationSubscriptionQueryAppTemplateV2Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/NotificationSubscription/NotificationSubscriptionQueryAppTemplateV2Response.cs new file mode 100644 index 00000000..95ed8472 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/NotificationSubscription/NotificationSubscriptionQueryAppTemplateV2Response.cs @@ -0,0 +1,48 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [GET] /notification/v2/subscription/query_app_tpl/ 接口的响应。 + /// + public class NotificationSubscriptionQueryAppTemplateV2Response : DouyinMicroAppResponse + { + public static class Types + { + public class Data + { + public static class Types + { + public class Template : NotificationSubscriptionQueryTemplateListV2Response.Types.Data.Types.Template + { + /// + /// 获取或设置消息模板 ID。 + /// + [Newtonsoft.Json.JsonProperty("msg_id")] + [System.Text.Json.Serialization.JsonPropertyName("msg_id")] + public string MessageId { get; set; } = default!; + } + } + + /// + /// 获取或设置消息模板列表。 + /// + [Newtonsoft.Json.JsonProperty("template_list")] + [System.Text.Json.Serialization.JsonPropertyName("template_list")] + public Types.Template[] TemplateList { get; set; } = default!; + + /// + /// 获取或设置总数量。 + /// + [Newtonsoft.Json.JsonProperty("total_count")] + [System.Text.Json.Serialization.JsonPropertyName("total_count")] + public int TotalCount { get; set; } + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/NotificationSubscription/NotificationSubscriptionQueryCreatedTemplateListV2Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/NotificationSubscription/NotificationSubscriptionQueryCreatedTemplateListV2Request.cs new file mode 100644 index 00000000..42f777eb --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/NotificationSubscription/NotificationSubscriptionQueryCreatedTemplateListV2Request.cs @@ -0,0 +1,31 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [GET] /notification/v2/subscription/query_created_tpl_list/ 接口的请求。 + /// + public class NotificationSubscriptionQueryCreatedTemplateListV2Request : DouyinMicroAppRequest + { + /// + /// 获取或设置审核状态。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public int? Status { get; set; } + + /// + /// 获取或设置分页页数。 + /// 默认值:1 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public int PageNumber { get; set; } = 1; + + /// + /// 获取或设置分页每页数量。 + /// 默认值:10 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public int PageSize { get; set; } = 10; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/NotificationSubscription/NotificationSubscriptionQueryCreatedTemplateListV2Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/NotificationSubscription/NotificationSubscriptionQueryCreatedTemplateListV2Response.cs new file mode 100644 index 00000000..313c57a5 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/NotificationSubscription/NotificationSubscriptionQueryCreatedTemplateListV2Response.cs @@ -0,0 +1,90 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [GET] /notification/v2/subscription/query_created_tpl_list/ 接口的响应。 + /// + public class NotificationSubscriptionQueryCreatedTemplateListV2Response : DouyinMicroAppResponse + { + public static class Types + { + public class Data + { + public static class Types + { + public class Template + { + /// + /// 获取或设置订阅消息类型。 + /// + [Newtonsoft.Json.JsonProperty("classification")] + [System.Text.Json.Serialization.JsonPropertyName("classification")] + public int Classification { get; set; } + + /// + /// 获取或设置模板标题。 + /// + [Newtonsoft.Json.JsonProperty("title")] + [System.Text.Json.Serialization.JsonPropertyName("title")] + public string Title { get; set; } = default!; + + /// + /// 获取或设置宿主 App 列表。 + /// + [Newtonsoft.Json.JsonProperty("host_list")] + [System.Text.Json.Serialization.JsonPropertyName("host_list")] + public string[] HostNameList { get; set; } = default!; + + /// + /// 获取或设置关键词列表。 + /// + [Newtonsoft.Json.JsonProperty("keyword_list")] + [System.Text.Json.Serialization.JsonPropertyName("keyword_list")] + public string[] KeywordList { get; set; } = default!; + + /// + /// 获取或设置操作时间戳。 + /// + [Newtonsoft.Json.JsonProperty("operating_time")] + [System.Text.Json.Serialization.JsonPropertyName("operating_time")] + public long OperatingTimestamp { get; set; } + + /// + /// 获取或设置审核状态。 + /// + [Newtonsoft.Json.JsonProperty("status")] + [System.Text.Json.Serialization.JsonPropertyName("status")] + public int Status { get; set; } + + /// + /// 获取或设置审核拒绝原因。 + /// + [Newtonsoft.Json.JsonProperty("fail_reason")] + [System.Text.Json.Serialization.JsonPropertyName("fail_reason")] + public string? FailReason { get; set; } + } + } + + /// + /// 获取或设置模板列表。 + /// + [Newtonsoft.Json.JsonProperty("template_list")] + [System.Text.Json.Serialization.JsonPropertyName("template_list")] + public Types.Template[] TemplateList { get; set; } = default!; + + /// + /// 获取或设置总数量。 + /// + [Newtonsoft.Json.JsonProperty("total_count")] + [System.Text.Json.Serialization.JsonPropertyName("total_count")] + public int TotalCount { get; set; } + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/NotificationSubscription/NotificationSubscriptionQueryTemplateListV2Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/NotificationSubscription/NotificationSubscriptionQueryTemplateListV2Request.cs new file mode 100644 index 00000000..8d288b7d --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/NotificationSubscription/NotificationSubscriptionQueryTemplateListV2Request.cs @@ -0,0 +1,52 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [GET] /notification/v2/subscription/query_tpl_list/ 接口的请求。 + /// + public class NotificationSubscriptionQueryTemplateListV2Request : DouyinMicroAppRequest + { + /// + /// 获取或设置订阅消息类型。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public int Classification { get; set; } + + /// + /// 获取或设置模板类型。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public int? TemplateType { get; set; } + + /// + /// 获取或设置服务类目 ID 字符串(以逗号分隔)。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string? CategoryIdString { get; set; } + + /// + /// 获取或设置关键词。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string? Keyword { get; set; } + + /// + /// 获取或设置分页页数。 + /// 默认值:1 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public int PageNumber { get; set; } = 1; + + /// + /// 获取或设置分页每页数量。 + /// 默认值:10 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public int PageSize { get; set; } = 10; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/NotificationSubscription/NotificationSubscriptionQueryTemplateListV2Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/NotificationSubscription/NotificationSubscriptionQueryTemplateListV2Response.cs new file mode 100644 index 00000000..8d39ade4 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/NotificationSubscription/NotificationSubscriptionQueryTemplateListV2Response.cs @@ -0,0 +1,83 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [GET] /notification/v2/subscription/query_tpl_list/ 接口的响应。 + /// + public class NotificationSubscriptionQueryTemplateListV2Response : DouyinMicroAppResponse + { + public static class Types + { + public class Data + { + public static class Types + { + public class Template + { + /// + /// 获取或设置模板 ID。 + /// + [Newtonsoft.Json.JsonProperty("template_id")] + [System.Text.Json.Serialization.JsonPropertyName("template_id")] + public long TemplateId { get; set; } + + /// + /// 获取或设置订阅消息类型。 + /// + [Newtonsoft.Json.JsonProperty("classification")] + [System.Text.Json.Serialization.JsonPropertyName("classification")] + public int Classification { get; set; } + + /// + /// 获取或设置服务类目名称。 + /// + [Newtonsoft.Json.JsonProperty("category_name")] + [System.Text.Json.Serialization.JsonPropertyName("category_name")] + public string CategoryName { get; set; } = default!; + + /// + /// 获取或设置模板标题。 + /// + [Newtonsoft.Json.JsonProperty("title")] + [System.Text.Json.Serialization.JsonPropertyName("title")] + public string Title { get; set; } = default!; + + /// + /// 获取或设置宿主 App 列表。 + /// + [Newtonsoft.Json.JsonProperty("host_list")] + [System.Text.Json.Serialization.JsonPropertyName("host_list")] + public string[] HostNameList { get; set; } = default!; + + /// + /// 获取或设置关键词列表。 + /// + [Newtonsoft.Json.JsonProperty("keyword_list")] + [System.Text.Json.Serialization.JsonPropertyName("keyword_list")] + public string[] KeywordList { get; set; } = default!; + } + } + + /// + /// 获取或设置消息模板列表。 + /// + [Newtonsoft.Json.JsonProperty("template_list")] + [System.Text.Json.Serialization.JsonPropertyName("template_list")] + public Types.Template[] TemplateList { get; set; } = default!; + + /// + /// 获取或设置总数量。 + /// + [Newtonsoft.Json.JsonProperty("total_count")] + [System.Text.Json.Serialization.JsonPropertyName("total_count")] + public int TotalCount { get; set; } + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Webcast/Gift/WebcastGiftTopGiftRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Webcast/Gift/WebcastGiftTopGiftRequest.cs deleted file mode 100644 index 2ffcee72..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Webcast/Gift/WebcastGiftTopGiftRequest.cs +++ /dev/null @@ -1,31 +0,0 @@ -using System.Collections.Generic; - -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models -{ - /// - /// 表示 [POST] /gift/top_gift 接口的请求。 - /// - public class WebcastGiftTopGiftRequest : ByteDanceMicroAppRequest - { - /// - /// 获取或设置小玩法的 AppId。如果不指定将使用构造 时的 参数。 - /// - [Newtonsoft.Json.JsonProperty("app_id")] - [System.Text.Json.Serialization.JsonPropertyName("app_id")] - public string? AppId { get; set; } - - /// - /// 获取或设置直播间 ID。 - /// - [Newtonsoft.Json.JsonProperty("room_id")] - [System.Text.Json.Serialization.JsonPropertyName("room_id")] - public string RoomId { get; set; } = string.Empty; - - /// - /// 获取或设置置顶礼物的礼物 ID。 - /// - [Newtonsoft.Json.JsonProperty("sec_gift_id_list")] - [System.Text.Json.Serialization.JsonPropertyName("sec_gift_id_list")] - public IList GiftIdList { get; set; } = new List(); - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Webcast/Gift/WebcastGiftTopGiftResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Webcast/Gift/WebcastGiftTopGiftResponse.cs deleted file mode 100644 index 9bc573ea..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Webcast/Gift/WebcastGiftTopGiftResponse.cs +++ /dev/null @@ -1,42 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models -{ - /// - /// 表示 [POST] /gift/top_gift 接口的响应。 - /// - public class WebcastGiftTopGiftResponse : ByteDanceMicroAppResponse - { - public static class Types - { - public class Data - { - /// - /// 获取或设置成功置顶的礼物 ID 列表。 - /// - [Newtonsoft.Json.JsonProperty("success_top_gift_id_list")] - [System.Text.Json.Serialization.JsonPropertyName("success_top_gift_id_list")] - public string[] SuccessfulGiftIdList { get; set; } = default!; - } - } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("errcode")] - [System.Text.Json.Serialization.JsonPropertyName("errcode")] - public override long ErrorCode { get; set; } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("errmsg")] - [System.Text.Json.Serialization.JsonPropertyName("errmsg")] - public override string? ErrorMessage { get; set; } - - /// - /// 获取或设置返回数据。 - /// - [Newtonsoft.Json.JsonProperty("data")] - [System.Text.Json.Serialization.JsonPropertyName("data")] - public Types.Data Data { get; set; } = default!; - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Webcast/LinkMic/WebcastLinkMicQueryRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Webcast/LinkMic/WebcastLinkMicQueryRequest.cs deleted file mode 100644 index 74ab1195..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Webcast/LinkMic/WebcastLinkMicQueryRequest.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models -{ - /// - /// 表示 [POST] /linkmic/query 接口的请求。 - /// - public class WebcastLinkMicQueryRequest : ByteDanceMicroAppRequest - { - /// - /// 获取或设置小玩法的 AppId。如果不指定将使用构造 时的 参数。 - /// - [Newtonsoft.Json.JsonProperty("app_id")] - [System.Text.Json.Serialization.JsonPropertyName("app_id")] - public string? AppId { get; set; } - - /// - /// 获取或设置直播间 ID。 - /// - [Newtonsoft.Json.JsonProperty("room_id")] - [System.Text.Json.Serialization.JsonPropertyName("room_id")] - public string RoomId { get; set; } = string.Empty; - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Webcast/LiveData/WebcastLiveDataTaskGetRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Webcast/LiveData/WebcastLiveDataTaskGetRequest.cs deleted file mode 100644 index 206170de..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Webcast/LiveData/WebcastLiveDataTaskGetRequest.cs +++ /dev/null @@ -1,29 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models -{ - /// - /// 表示 [GET] /live_data/task/get 接口的请求。 - /// - public class WebcastLiveDataTaskGetRequest : ByteDanceMicroAppRequest - { - /// - /// 获取或设置小玩法的 AppId。如果不指定将使用构造 时的 参数。 - /// - [Newtonsoft.Json.JsonIgnore] - [System.Text.Json.Serialization.JsonIgnore] - public string? AppId { get; set; } - - /// - /// 获取或设置直播间 ID。 - /// - [Newtonsoft.Json.JsonIgnore] - [System.Text.Json.Serialization.JsonIgnore] - public string RoomId { get; set; } = string.Empty; - - /// - /// 获取或设置直播间消息类型。 - /// - [Newtonsoft.Json.JsonIgnore] - [System.Text.Json.Serialization.JsonIgnore] - public string? MessageType { get; set; } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Webcast/LiveData/WebcastLiveDataTaskStartRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Webcast/LiveData/WebcastLiveDataTaskStartRequest.cs deleted file mode 100644 index 017f180f..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Webcast/LiveData/WebcastLiveDataTaskStartRequest.cs +++ /dev/null @@ -1,29 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models -{ - /// - /// 表示 [POST] /live_data/task/start 接口的请求。 - /// - public class WebcastLiveDataTaskStartRequest : ByteDanceMicroAppRequest - { - /// - /// 获取或设置小玩法的 AppId。如果不指定将使用构造 时的 参数。 - /// - [Newtonsoft.Json.JsonProperty("appid")] - [System.Text.Json.Serialization.JsonPropertyName("appid")] - public string? AppId { get; set; } - - /// - /// 获取或设置直播间 ID。 - /// - [Newtonsoft.Json.JsonProperty("roomid")] - [System.Text.Json.Serialization.JsonPropertyName("roomid")] - public string RoomId { get; set; } = string.Empty; - - /// - /// 获取或设置直播间消息类型。 - /// - [Newtonsoft.Json.JsonProperty("msg_type")] - [System.Text.Json.Serialization.JsonPropertyName("msg_type")] - public string? MessageType { get; set; } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Webcast/LiveData/WebcastLiveDataTaskStopRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Webcast/LiveData/WebcastLiveDataTaskStopRequest.cs deleted file mode 100644 index 59640314..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Webcast/LiveData/WebcastLiveDataTaskStopRequest.cs +++ /dev/null @@ -1,29 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models -{ - /// - /// 表示 [POST] /live_data/task/stop 接口的请求。 - /// - public class WebcastLiveDataTaskStopRequest : ByteDanceMicroAppRequest - { - /// - /// 获取或设置小玩法的 AppId。如果不指定将使用构造 时的 参数。 - /// - [Newtonsoft.Json.JsonProperty("appid")] - [System.Text.Json.Serialization.JsonPropertyName("appid")] - public string? AppId { get; set; } - - /// - /// 获取或设置直播间 ID。 - /// - [Newtonsoft.Json.JsonProperty("roomid")] - [System.Text.Json.Serialization.JsonPropertyName("roomid")] - public string RoomId { get; set; } = string.Empty; - - /// - /// 获取或设置直播间消息类型。 - /// - [Newtonsoft.Json.JsonProperty("msg_type")] - [System.Text.Json.Serialization.JsonPropertyName("msg_type")] - public string? MessageType { get; set; } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Webcast/LiveData/WebcastLiveDataTaskStopResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Webcast/LiveData/WebcastLiveDataTaskStopResponse.cs deleted file mode 100644 index 82c2aa11..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Webcast/LiveData/WebcastLiveDataTaskStopResponse.cs +++ /dev/null @@ -1,29 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models -{ - /// - /// 表示 [POST] /live_data/task/stop 接口的响应。 - /// - public class WebcastLiveDataTaskStopResponse : ByteDanceMicroAppResponse - { - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_no")] - [System.Text.Json.Serialization.JsonPropertyName("err_no")] - public override long ErrorCode { get; set; } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_msg")] - [System.Text.Json.Serialization.JsonPropertyName("err_msg")] - public override string? ErrorMessage { get; set; } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("logid")] - [System.Text.Json.Serialization.JsonPropertyName("logid")] - public override string? LogId { get; set; } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/AppsJsCode2SessionV2Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/AppsJsCode2SessionV2Request.cs similarity index 75% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/AppsJsCode2SessionV2Request.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/AppsJsCode2SessionV2Request.cs index 6d5146eb..ac9683cf 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/AppsJsCode2SessionV2Request.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/AppsJsCode2SessionV2Request.cs @@ -3,17 +3,17 @@ namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models /// /// 表示 [POST] /apps/v2/jscode2session 接口的请求。 /// - public class AppsJsCode2SessionV2Request : ByteDanceMicroAppRequest + public class AppsJsCode2SessionV2Request : DouyinMicroAppRequest { /// - /// 获取或设置小程序的 AppId。如果不指定将使用构造 时的 参数。 + /// 获取或设置小程序 AppId。如果不指定将使用构造 时的 参数。 /// [Newtonsoft.Json.JsonProperty("appid")] [System.Text.Json.Serialization.JsonPropertyName("appid")] public string? AppId { get; set; } /// - /// 获取或设置小程序的 AppSecret。如果不指定将使用构造 时的 参数。 + /// 获取或设置小程序的 AppSecret。如果不指定将使用构造 时的 参数。 /// [Newtonsoft.Json.JsonProperty("secret")] [System.Text.Json.Serialization.JsonPropertyName("secret")] diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/AppsJsCode2SessionV2Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/AppsJsCode2SessionV2Response.cs new file mode 100644 index 00000000..4f249d04 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/AppsJsCode2SessionV2Response.cs @@ -0,0 +1,49 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/v2/jscode2session 接口的响应。 + /// + public class AppsJsCode2SessionV2Response : DouyinMicroAppResponse + { + public static class Types + { + public class Data + { + /// + /// 获取或设置会话密钥。 + /// + [Newtonsoft.Json.JsonProperty("session_key")] + [System.Text.Json.Serialization.JsonPropertyName("session_key")] + public string? SessionKey { get; set; } + + /// + /// 获取或设置用户的 OpenId。 + /// + [Newtonsoft.Json.JsonProperty("openid")] + [System.Text.Json.Serialization.JsonPropertyName("openid")] + public string? OpenId { get; set; } + + /// + /// 获取或设置匿名用户的 OpenId。 + /// + [Newtonsoft.Json.JsonProperty("anonymous_openid")] + [System.Text.Json.Serialization.JsonPropertyName("anonymous_openid")] + public string? AnonymousOpenId { get; set; } + + /// + /// 获取或设置用户的 UnionId。 + /// + [Newtonsoft.Json.JsonProperty("unionid")] + [System.Text.Json.Serialization.JsonPropertyName("unionid")] + public string? UnionId { get; set; } + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/AppsTokenV2Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/AppsTokenV2Request.cs new file mode 100644 index 00000000..0ebc9ee4 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/AppsTokenV2Request.cs @@ -0,0 +1,29 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/v2/token 接口的请求。 + /// + public class AppsTokenV2Request : DouyinMicroAppRequest + { + /// + /// 获取或设置小程序 AppId。如果不指定将使用构造 时的 参数。 + /// + [Newtonsoft.Json.JsonProperty("appid")] + [System.Text.Json.Serialization.JsonPropertyName("appid")] + public string? AppId { get; set; } + + /// + /// 获取或设置小程序的 AppSecret。如果不指定将使用构造 时的 参数。 + /// + [Newtonsoft.Json.JsonProperty("secret")] + [System.Text.Json.Serialization.JsonPropertyName("secret")] + public string? AppSecret { get; set; } + + /// + /// (使用默认值即可,无需修改) + /// + [Newtonsoft.Json.JsonProperty("grant_type")] + [System.Text.Json.Serialization.JsonPropertyName("grant_type")] + public string GrantType { get; set; } = "client_credential"; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/AppsTokenV2Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/AppsTokenV2Response.cs new file mode 100644 index 00000000..67a00829 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/AppsTokenV2Response.cs @@ -0,0 +1,35 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/v2/token 接口的响应。 + /// + public class AppsTokenV2Response : DouyinMicroAppResponse + { + public static class Types + { + public class Data + { + /// + /// 获取或设置调用接口的凭证。 + /// + [Newtonsoft.Json.JsonProperty("access_token")] + [System.Text.Json.Serialization.JsonPropertyName("access_token")] + public string AccessToken { get; set; } = default!; + + /// + /// 获取或设置凭证有效期(单位:秒)。 + /// + [Newtonsoft.Json.JsonProperty("expires_in")] + [System.Text.Json.Serialization.JsonPropertyName("expires_in")] + public int ExpiresIn { get; set; } + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/AppsCapacityUploadMaterialV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/AppsCapacityUploadMaterialV1Request.cs new file mode 100644 index 00000000..864cf20e --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/AppsCapacityUploadMaterialV1Request.cs @@ -0,0 +1,38 @@ +using System; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/v1/capacity/upload_material 接口的请求。 + /// + public class AppsCapacityUploadMaterialV1Request : DouyinMicroAppRequest + { + /// + /// 获取或设置上传的文件类型。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public int MaterialType { get; set; } + + /// + /// 获取或设置资源文件字节数组。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public byte[] MaterialFileBytes { get; set; } = Array.Empty(); + + /// + /// 获取或设置资源文件名。如果不指定将由系统自动生成。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string? MaterialFileName { get; set; } + + /// + /// 获取或设置资源文件 MIME 类型。如果不指定将由系统自动生成。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string? MaterialFileContentType { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/AppsCapacityUploadMaterialV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/AppsCapacityUploadMaterialV1Response.cs new file mode 100644 index 00000000..3c8ba166 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/AppsCapacityUploadMaterialV1Response.cs @@ -0,0 +1,28 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/v1/capacity/upload_material 接口的响应。 + /// + public class AppsCapacityUploadMaterialV1Response : DouyinMicroAppResponse + { + public static class Types + { + public class Data + { + /// + /// 获取或设置文件路径。 + /// + [Newtonsoft.Json.JsonProperty("path")] + [System.Text.Json.Serialization.JsonPropertyName("path")] + public string FilePath { get; set; } = default!; + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/AwemeCapacity/AppsCapacityApplyAwemePermissionV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/Aweme/AppsCapacityApplyAwemePermissionV1Request.cs similarity index 82% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/AwemeCapacity/AppsCapacityApplyAwemePermissionV1Request.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/Aweme/AppsCapacityApplyAwemePermissionV1Request.cs index 39073310..00d6720c 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/AwemeCapacity/AppsCapacityApplyAwemePermissionV1Request.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/Aweme/AppsCapacityApplyAwemePermissionV1Request.cs @@ -1,9 +1,12 @@ +using System; + namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models { /// /// 表示 [POST] /apps/v1/capacity/apply_aweme_permission 接口的请求。 /// - public class AppsCapacityApplyAwemePermissionV1Request : ByteDanceMicroAppRequest + [Obsolete("相关接口或字段于 2024-01-01 下线。")] + public class AppsCapacityApplyAwemePermissionV1Request : DouyinMicroAppRequest { /// /// 获取或设置权限 Key。 diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/Aweme/AppsCapacityApplyAwemePermissionV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/Aweme/AppsCapacityApplyAwemePermissionV1Response.cs new file mode 100644 index 00000000..eb44ccce --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/Aweme/AppsCapacityApplyAwemePermissionV1Response.cs @@ -0,0 +1,12 @@ +using System; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/v1/capacity/apply_aweme_permission 接口的响应。 + /// + [Obsolete("相关接口或字段于 2024-01-01 下线。")] + public class AppsCapacityApplyAwemePermissionV1Response : DouyinMicroAppResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/AwemeCapacity/AppsCapacityApplyScopeQuotaV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/Aweme/AppsCapacityApplyScopeQuotaV1Request.cs similarity index 94% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/AwemeCapacity/AppsCapacityApplyScopeQuotaV1Request.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/Aweme/AppsCapacityApplyScopeQuotaV1Request.cs index 6600d21e..e65b388d 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/AwemeCapacity/AppsCapacityApplyScopeQuotaV1Request.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/Aweme/AppsCapacityApplyScopeQuotaV1Request.cs @@ -1,9 +1,12 @@ +using System; + namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models { /// /// 表示 [POST] /apps/v1/capacity/apply_scope_quota 接口的请求。 /// - public class AppsCapacityApplyScopeQuotaV1Request : ByteDanceMicroAppRequest + [Obsolete("相关接口或字段于 2024-01-01 下线。")] + public class AppsCapacityApplyScopeQuotaV1Request : DouyinMicroAppRequest { /// /// 获取或设置权限 Key。 diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/Aweme/AppsCapacityApplyScopeQuotaV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/Aweme/AppsCapacityApplyScopeQuotaV1Response.cs new file mode 100644 index 00000000..eab91fc0 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/Aweme/AppsCapacityApplyScopeQuotaV1Response.cs @@ -0,0 +1,12 @@ +using System; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/v1/capacity/apply_scope_quota 接口的响应。 + /// + [Obsolete("相关接口或字段于 2024-01-01 下线。")] + public class AppsCapacityApplyScopeQuotaV1Response : DouyinMicroAppResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/Aweme/AppsCapacityQueryAwemePermissionListV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/Aweme/AppsCapacityQueryAwemePermissionListV1Request.cs new file mode 100644 index 00000000..e025d4a2 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/Aweme/AppsCapacityQueryAwemePermissionListV1Request.cs @@ -0,0 +1,12 @@ +using System; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [GET] /apps/v1/capacity/query_aweme_permission_list 接口的请求。 + /// + [Obsolete("相关接口或字段于 2024-01-01 下线。")] + public class AppsCapacityQueryAwemePermissionListV1Request : DouyinMicroAppRequest + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/AwemeCapacity/AppsCapacityQueryAwemePermissionListV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/Aweme/AppsCapacityQueryAwemePermissionListV1Response.cs similarity index 89% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/AwemeCapacity/AppsCapacityQueryAwemePermissionListV1Response.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/Aweme/AppsCapacityQueryAwemePermissionListV1Response.cs index b5124eb9..67d70f6a 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/AwemeCapacity/AppsCapacityQueryAwemePermissionListV1Response.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/Aweme/AppsCapacityQueryAwemePermissionListV1Response.cs @@ -1,9 +1,12 @@ +using System; + namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models { /// /// 表示 [GET] /apps/v1/capacity/query_aweme_permission_list 接口的响应。 /// - public class AppsCapacityQueryAwemePermissionListV1Response : ByteDanceMicroAppResponse + [Obsolete("相关接口或字段于 2024-01-01 下线。")] + public class AppsCapacityQueryAwemePermissionListV1Response : DouyinMicroAppResponse { public static class Types { @@ -55,9 +58,9 @@ public class Scope /// 获取或设置是否可以申请。 /// [Newtonsoft.Json.JsonProperty("can_apply")] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.NumericalBooleanConverter))] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.NumericalBooleanConverter))] [System.Text.Json.Serialization.JsonPropertyName("can_apply")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumericalBooleanConverter))] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalBooleanConverter))] public bool CanApply { get; set; } /// @@ -108,20 +111,6 @@ public class Scope } } - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_no")] - [System.Text.Json.Serialization.JsonPropertyName("err_no")] - public override long ErrorCode { get; set; } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_msg")] - [System.Text.Json.Serialization.JsonPropertyName("err_msg")] - public override string? ErrorMessage { get; set; } - /// /// 获取或设置返回数据。 /// diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/Aweme/AppsCapacityQueryScopeQuotaDetailV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/Aweme/AppsCapacityQueryScopeQuotaDetailV1Request.cs new file mode 100644 index 00000000..2b308a8f --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/Aweme/AppsCapacityQueryScopeQuotaDetailV1Request.cs @@ -0,0 +1,18 @@ +using System; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [GET] /apps/v1/capacity/query_scope_quota_detail 接口的请求。 + /// + [Obsolete("相关接口或字段于 2024-01-01 下线。")] + public class AppsCapacityQueryScopeQuotaDetailV1Request : DouyinMicroAppRequest + { + /// + /// 获取或设置权限 Key。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string PermissionKey { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/AwemeCapacity/AppsCapacityQueryScopeQuotaDetailV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/Aweme/AppsCapacityQueryScopeQuotaDetailV1Response.cs similarity index 84% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/AwemeCapacity/AppsCapacityQueryScopeQuotaDetailV1Response.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/Aweme/AppsCapacityQueryScopeQuotaDetailV1Response.cs index 6762d822..8124b512 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/AwemeCapacity/AppsCapacityQueryScopeQuotaDetailV1Response.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/Aweme/AppsCapacityQueryScopeQuotaDetailV1Response.cs @@ -1,9 +1,12 @@ +using System; + namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models { /// /// 表示 [GET] /apps/v1/capacity/query_scope_quota_detail 接口的响应。 /// - public class AppsCapacityQueryScopeQuotaDetailV1Response : ByteDanceMicroAppResponse + [Obsolete("相关接口或字段于 2024-01-01 下线。")] + public class AppsCapacityQueryScopeQuotaDetailV1Response : DouyinMicroAppResponse { public static class Types { @@ -59,9 +62,9 @@ public class Scope /// 获取或设置是否可以申请提升额度。 /// [Newtonsoft.Json.JsonProperty("can_apply_quota")] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.NumericalBooleanConverter))] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.NumericalBooleanConverter))] [System.Text.Json.Serialization.JsonPropertyName("can_apply_quota")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumericalBooleanConverter))] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalBooleanConverter))] public bool CanApplyQuota { get; set; } } } @@ -75,20 +78,6 @@ public class Scope } } - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_no")] - [System.Text.Json.Serialization.JsonPropertyName("err_no")] - public override long ErrorCode { get; set; } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_msg")] - [System.Text.Json.Serialization.JsonPropertyName("err_msg")] - public override string? ErrorMessage { get; set; } - /// /// 获取或设置返回数据。 /// diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/ClueComponent/AppsCapacityCreateClueComponentInfoV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/ClueComponent/AppsCapacityCreateClueComponentInfoV1Request.cs new file mode 100644 index 00000000..16d017e6 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/ClueComponent/AppsCapacityCreateClueComponentInfoV1Request.cs @@ -0,0 +1,38 @@ +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/v1/capacity/create_clue_component_info 接口的请求。 + /// + public class AppsCapacityCreateClueComponentInfoV1Request : DouyinMicroAppRequest + { + /// + /// 获取或设置线索组件名称。 + /// + [Newtonsoft.Json.JsonProperty("config_name")] + [System.Text.Json.Serialization.JsonPropertyName("config_name")] + public string ConfigName { get; set; } = string.Empty; + + /// + /// 获取或设置地区编号。 + /// + [Newtonsoft.Json.JsonProperty("region")] + [System.Text.Json.Serialization.JsonPropertyName("region")] + public string? Region { get; set; } + + /// + /// 获取或设置地区编号列表。 + /// + [Newtonsoft.Json.JsonProperty("region_list")] + [System.Text.Json.Serialization.JsonPropertyName("region_list")] + public IList? RegionList { get; set; } + + /// + /// 获取或设置服务类目 ID 字符串(以逗号分隔)。 + /// + [Newtonsoft.Json.JsonProperty("category_id")] + [System.Text.Json.Serialization.JsonPropertyName("category_id")] + public string? CategoryIdString { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/ClueComponent/AppsCapacityCreateClueComponentInfoV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/ClueComponent/AppsCapacityCreateClueComponentInfoV1Response.cs new file mode 100644 index 00000000..de6942bc --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/ClueComponent/AppsCapacityCreateClueComponentInfoV1Response.cs @@ -0,0 +1,28 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/v1/capacity/create_clue_component_info 接口的响应。 + /// + public class AppsCapacityCreateClueComponentInfoV1Response : DouyinMicroAppResponse + { + public static class Types + { + public class Data + { + /// + /// 获取或设置线索组件 ID。 + /// + [Newtonsoft.Json.JsonProperty("config_id")] + [System.Text.Json.Serialization.JsonPropertyName("config_id")] + public string ConfigId { get; set; } = default!; + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/ClueComponent/AppsCapacityDeleteClueComponentInfoV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/ClueComponent/AppsCapacityDeleteClueComponentInfoV1Request.cs new file mode 100644 index 00000000..e4de8895 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/ClueComponent/AppsCapacityDeleteClueComponentInfoV1Request.cs @@ -0,0 +1,15 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [DELETE] /apps/v1/capacity/delete_clue_component_info 接口的请求。 + /// + public class AppsCapacityDeleteClueComponentInfoV1Request : DouyinMicroAppRequest + { + /// + /// 获取或设置线索组件 ID。 + /// + [Newtonsoft.Json.JsonProperty("config_id")] + [System.Text.Json.Serialization.JsonPropertyName("config_id")] + public string ConfigId { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/ClueComponent/AppsCapacityDeleteClueComponentInfoV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/ClueComponent/AppsCapacityDeleteClueComponentInfoV1Response.cs new file mode 100644 index 00000000..05fc24e8 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/ClueComponent/AppsCapacityDeleteClueComponentInfoV1Response.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [DELETE] /apps/v1/capacity/delete_clue_component_info 接口的响应。 + /// + public class AppsCapacityDeleteClueComponentInfoV1Response : DouyinMicroAppResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/ClueComponent/AppsCapacityQueryClueComponentInfoV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/ClueComponent/AppsCapacityQueryClueComponentInfoV1Request.cs new file mode 100644 index 00000000..581e4a93 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/ClueComponent/AppsCapacityQueryClueComponentInfoV1Request.cs @@ -0,0 +1,22 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [GET] /apps/v1/capacity/query_clue_component_info 接口的请求。 + /// + public class AppsCapacityQueryClueComponentInfoV1Request : DouyinMicroAppRequest + { + /// + /// 获取或设置分页页数。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public int? PageNumber { get; set; } + + /// + /// 获取或设置分页每页数量。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public int? PageSize { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/ClueComponent/AppsCapacityQueryClueComponentInfoV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/ClueComponent/AppsCapacityQueryClueComponentInfoV1Response.cs new file mode 100644 index 00000000..fda0fb45 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/ClueComponent/AppsCapacityQueryClueComponentInfoV1Response.cs @@ -0,0 +1,159 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [GET] /apps/v1/capacity/query_clue_component_info 接口的响应。 + /// + public class AppsCapacityQueryClueComponentInfoV1Response : DouyinMicroAppResponse + { + public static class Types + { + public class Data + { + public static class Types + { + public class ClueComponent + { + public static class Types + { + public class Region + { + /// + /// 获取或设置地区编号。 + /// + [Newtonsoft.Json.JsonProperty("region")] + [System.Text.Json.Serialization.JsonPropertyName("region")] + public string RegionCode { get; set; } = default!; + + /// + /// 获取或设置省份编号。 + /// + [Newtonsoft.Json.JsonProperty("province_code")] + [System.Text.Json.Serialization.JsonPropertyName("province_code")] + public string ProvinceCode { get; set; } = default!; + + /// + /// 获取或设置省份名称。 + /// + [Newtonsoft.Json.JsonProperty("province_name")] + [System.Text.Json.Serialization.JsonPropertyName("province_name")] + public string ProvinceName { get; set; } = default!; + + /// + /// 获取或设置城市编号。 + /// + [Newtonsoft.Json.JsonProperty("city_code")] + [System.Text.Json.Serialization.JsonPropertyName("city_code")] + public string CityCode { get; set; } = default!; + + /// + /// 获取或设置城市名称。 + /// + [Newtonsoft.Json.JsonProperty("city_name")] + [System.Text.Json.Serialization.JsonPropertyName("city_name")] + public string CityName { get; set; } = default!; + + /// + /// 获取或设置区县编号。 + /// + [Newtonsoft.Json.JsonProperty("district_code")] + [System.Text.Json.Serialization.JsonPropertyName("district_code")] + public string DistrictCode { get; set; } = default!; + + /// + /// 获取或设置区县名称。 + /// + [Newtonsoft.Json.JsonProperty("district_name")] + [System.Text.Json.Serialization.JsonPropertyName("district_name")] + public string DistrictName { get; set; } = default!; + } + } + + /// + /// 获取或设置线索组件 ID。 + /// + [Newtonsoft.Json.JsonProperty("config_id")] + [System.Text.Json.Serialization.JsonPropertyName("config_id")] + public string ConfigId { get; set; } = default!; + + /// + /// 获取或设置线索组件名称。 + /// + [Newtonsoft.Json.JsonProperty("config_name")] + [System.Text.Json.Serialization.JsonPropertyName("config_name")] + public string ConfigName { get; set; } = default!; + + /// + /// 获取或设置地区编号。 + /// + [Newtonsoft.Json.JsonProperty("region")] + [System.Text.Json.Serialization.JsonPropertyName("region")] + public string Region { get; set; } = default!; + + /// + /// 获取或设置地区名称。 + /// + [Newtonsoft.Json.JsonProperty("region_name")] + [System.Text.Json.Serialization.JsonPropertyName("region_name")] + public string RegionName { get; set; } = default!; + + /// + /// 获取或设置服务类目 ID 字符串(以逗号分隔)。 + /// + [Newtonsoft.Json.JsonProperty("category_id")] + [System.Text.Json.Serialization.JsonPropertyName("category_id")] + public string CategoryIdString { get; set; } = default!; + + /// + /// 获取或设置服务类目名称字符串(以逗号分隔)。 + /// + [Newtonsoft.Json.JsonProperty("category_name")] + [System.Text.Json.Serialization.JsonPropertyName("category_name")] + public string CategoryNameString { get; set; } = default!; + + /// + /// 获取或设置状态。 + /// + [Newtonsoft.Json.JsonProperty("state")] + [System.Text.Json.Serialization.JsonPropertyName("state")] + public string State { get; set; } = default!; + + /// + /// 获取或设置地区列表。 + /// + [Newtonsoft.Json.JsonProperty("region_list")] + [System.Text.Json.Serialization.JsonPropertyName("region_list")] + public Types.Region[]? RegionList { get; set; } + } + } + + /// + /// 获取或设置线索组件列表。 + /// + [Newtonsoft.Json.JsonProperty("clue_component_list")] + [System.Text.Json.Serialization.JsonPropertyName("clue_component_list")] + public Types.ClueComponent[] ClueComponentList { get; set; } = default!; + + /// + /// 获取或设置总数量。 + /// + [Newtonsoft.Json.JsonProperty("total")] + [System.Text.Json.Serialization.JsonPropertyName("total")] + public int TotalCount { get; set; } + + /// + /// 获取或设置非定向邀约小程序或小程序类目是否符合要求。 + /// + [Newtonsoft.Json.JsonProperty("cert_status")] + [System.Text.Json.Serialization.JsonPropertyName("cert_status")] + public bool? CertStatus { get; set; } + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/ClueComponent/AppsCapacityUpdateClueComponentInfoV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/ClueComponent/AppsCapacityUpdateClueComponentInfoV1Request.cs new file mode 100644 index 00000000..28cfb323 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/ClueComponent/AppsCapacityUpdateClueComponentInfoV1Request.cs @@ -0,0 +1,45 @@ +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/v1/capacity/update_clue_component_info 接口的请求。 + /// + public class AppsCapacityUpdateClueComponentInfoV1Request : DouyinMicroAppRequest + { + /// + /// 获取或设置线索组件 ID。 + /// + [Newtonsoft.Json.JsonProperty("config_id")] + [System.Text.Json.Serialization.JsonPropertyName("config_id")] + public string ConfigId { get; set; } = string.Empty; + + /// + /// 获取或设置线索组件名称。 + /// + [Newtonsoft.Json.JsonProperty("config_name")] + [System.Text.Json.Serialization.JsonPropertyName("config_name")] + public string ConfigName { get; set; } = string.Empty; + + /// + /// 获取或设置地区编号。 + /// + [Newtonsoft.Json.JsonProperty("region")] + [System.Text.Json.Serialization.JsonPropertyName("region")] + public string? Region { get; set; } + + /// + /// 获取或设置地区编号列表。 + /// + [Newtonsoft.Json.JsonProperty("region_list")] + [System.Text.Json.Serialization.JsonPropertyName("region_list")] + public IList? RegionList { get; set; } + + /// + /// 获取或设置服务类目 ID 字符串(以逗号分隔)。 + /// + [Newtonsoft.Json.JsonProperty("category_id")] + [System.Text.Json.Serialization.JsonPropertyName("category_id")] + public string? CategoryIdString { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/ClueComponent/AppsCapacityUpdateClueComponentInfoV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/ClueComponent/AppsCapacityUpdateClueComponentInfoV1Response.cs new file mode 100644 index 00000000..3c680c7b --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/ClueComponent/AppsCapacityUpdateClueComponentInfoV1Response.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/v1/capacity/update_clue_component_info 接口的响应。 + /// + public class AppsCapacityUpdateClueComponentInfoV1Response : DouyinMicroAppResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/FollowAweme/AppsCapacityBindAwemeUserV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/FollowAweme/AppsCapacityBindAwemeUserV1Request.cs similarity index 82% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/FollowAweme/AppsCapacityBindAwemeUserV1Request.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/FollowAweme/AppsCapacityBindAwemeUserV1Request.cs index 3111118f..f8b168a7 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/FollowAweme/AppsCapacityBindAwemeUserV1Request.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/FollowAweme/AppsCapacityBindAwemeUserV1Request.cs @@ -1,9 +1,12 @@ +using System; + namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models { /// /// 表示 [POST] /apps/v1/capacity/bind_aweme_user 接口的请求。 /// - public class AppsCapacityBindAwemeUserV1Request : ByteDanceMicroAppRequest + [Obsolete("相关接口或字段于 2024-01-01 下线。")] + public class AppsCapacityBindAwemeUserV1Request : DouyinMicroAppRequest { /// /// 获取或设置绑定类型。 diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/FollowAweme/AppsCapacityBindAwemeUserV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/FollowAweme/AppsCapacityBindAwemeUserV1Response.cs new file mode 100644 index 00000000..635376c3 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/FollowAweme/AppsCapacityBindAwemeUserV1Response.cs @@ -0,0 +1,12 @@ +using System; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/v1/capacity/bind_aweme_user 接口的响应。 + /// + [Obsolete("相关接口或字段于 2024-01-01 下线。")] + public class AppsCapacityBindAwemeUserV1Response : DouyinMicroAppResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/FollowAweme/AppsCapacityGetAwemeUserBindQrcodeV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/FollowAweme/AppsCapacityGetAwemeUserBindQrcodeV1Request.cs new file mode 100644 index 00000000..44c45a94 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/FollowAweme/AppsCapacityGetAwemeUserBindQrcodeV1Request.cs @@ -0,0 +1,18 @@ +using System; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [GET] /apps/v1/capacity/get_aweme_user_bind_qrcode 接口的请求。 + /// + [Obsolete("相关接口或字段于 2024-01-01 下线。")] + public class AppsCapacityGetAwemeUserBindQrcodeV1Request : DouyinMicroAppRequest + { + /// + /// 获取或设置绑定类型。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string BindType { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/FollowAweme/AppsCapacityGetAwemeUserBindQrcodeV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/FollowAweme/AppsCapacityGetAwemeUserBindQrcodeV1Response.cs new file mode 100644 index 00000000..aa485643 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/FollowAweme/AppsCapacityGetAwemeUserBindQrcodeV1Response.cs @@ -0,0 +1,38 @@ +using System; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [GET] /apps/v1/capacity/get_aweme_user_bind_qrcode 接口的响应。 + /// + [Obsolete("相关接口或字段于 2024-01-01 下线。")] + public class AppsCapacityGetAwemeUserBindQrcodeV1Response : DouyinMicroAppResponse + { + public static class Types + { + public class Data + { + /// + /// 获取或设置二维码图片 URL。 + /// + [Newtonsoft.Json.JsonProperty("qrcode_url")] + [System.Text.Json.Serialization.JsonPropertyName("qrcode_url")] + public string QrcodeUrl { get; set; } = default!; + + /// + /// 获取或设置二维码数据字符串。 + /// + [Newtonsoft.Json.JsonProperty("qrcode_parse_content")] + [System.Text.Json.Serialization.JsonPropertyName("qrcode_parse_content")] + public string QrcodeDataString { get; set; } = default!; + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/FollowAweme/AppsCapacityQueryAwemeUserBindListV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/FollowAweme/AppsCapacityQueryAwemeUserBindListV1Request.cs similarity index 77% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/FollowAweme/AppsCapacityQueryAwemeUserBindListV1Request.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/FollowAweme/AppsCapacityQueryAwemeUserBindListV1Request.cs index eb3c5fc3..6934d0c3 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/FollowAweme/AppsCapacityQueryAwemeUserBindListV1Request.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/FollowAweme/AppsCapacityQueryAwemeUserBindListV1Request.cs @@ -1,9 +1,12 @@ +using System; + namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models { /// /// 表示 [GET] /apps/v1/capacity/query_aweme_user_bind_list 接口的请求。 /// - public class AppsCapacityQueryAwemeUserBindListV1Request : ByteDanceMicroAppRequest + [Obsolete("相关接口或字段于 2024-01-01 下线。")] + public class AppsCapacityQueryAwemeUserBindListV1Request : DouyinMicroAppRequest { /// /// 获取或设置绑定类型。 @@ -18,7 +21,7 @@ public class AppsCapacityQueryAwemeUserBindListV1Request : ByteDanceMicroAppRequ /// [Newtonsoft.Json.JsonIgnore] [System.Text.Json.Serialization.JsonIgnore] - public int Page { get; set; } = 1; + public int PageNumber { get; set; } = 1; /// /// 获取或设置分页每页数量。 @@ -26,6 +29,6 @@ public class AppsCapacityQueryAwemeUserBindListV1Request : ByteDanceMicroAppRequ /// [Newtonsoft.Json.JsonIgnore] [System.Text.Json.Serialization.JsonIgnore] - public int Limit { get; set; } = 10; + public int PageSize { get; set; } = 10; } } diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/FollowAweme/AppsCapacityQueryAwemeUserBindListV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/FollowAweme/AppsCapacityQueryAwemeUserBindListV1Response.cs similarity index 86% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/FollowAweme/AppsCapacityQueryAwemeUserBindListV1Response.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/FollowAweme/AppsCapacityQueryAwemeUserBindListV1Response.cs index 0ec48a3c..b0d2a397 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/FollowAweme/AppsCapacityQueryAwemeUserBindListV1Response.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/FollowAweme/AppsCapacityQueryAwemeUserBindListV1Response.cs @@ -1,9 +1,12 @@ +using System; + namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models { /// /// 表示 [GET] /apps/v1/capacity/query_aweme_user_bind_list 接口的响应。 /// - public class AppsCapacityQueryAwemeUserBindListV1Response : ByteDanceMicroAppResponse + [Obsolete("相关接口或字段于 2024-01-01 下线。")] + public class AppsCapacityQueryAwemeUserBindListV1Response : DouyinMicroAppResponse { public static class Types { @@ -66,20 +69,6 @@ public class User } } - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_no")] - [System.Text.Json.Serialization.JsonPropertyName("err_no")] - public override long ErrorCode { get; set; } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_msg")] - [System.Text.Json.Serialization.JsonPropertyName("err_msg")] - public override string? ErrorMessage { get; set; } - /// /// 获取或设置返回数据。 /// diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/FollowAweme/AppsCapacityUnbindAwemeUserV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/FollowAweme/AppsCapacityUnbindAwemeUserV1Request.cs similarity index 78% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/FollowAweme/AppsCapacityUnbindAwemeUserV1Request.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/FollowAweme/AppsCapacityUnbindAwemeUserV1Request.cs index fd446015..3dbc7026 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/FollowAweme/AppsCapacityUnbindAwemeUserV1Request.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/FollowAweme/AppsCapacityUnbindAwemeUserV1Request.cs @@ -1,8 +1,11 @@ +using System; + namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models { /// /// 表示 [POST] /apps/v1/capacity/unbind_aweme_user_bind 接口的请求。 /// + [Obsolete("相关接口或字段于 2024-01-01 下线。")] public class AppsCapacityUnbindAwemeUserV1Request : AppsCapacityBindAwemeUserV1Request { } diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/FollowAweme/AppsCapacityUnbindAwemeUserV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/FollowAweme/AppsCapacityUnbindAwemeUserV1Response.cs similarity index 79% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/FollowAweme/AppsCapacityUnbindAwemeUserV1Response.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/FollowAweme/AppsCapacityUnbindAwemeUserV1Response.cs index f949322f..6f964aa5 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/FollowAweme/AppsCapacityUnbindAwemeUserV1Response.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/FollowAweme/AppsCapacityUnbindAwemeUserV1Response.cs @@ -1,8 +1,11 @@ +using System; + namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models { /// /// 表示 [POST] /apps/v1/capacity/unbind_aweme_user_bind 接口的响应。 /// + [Obsolete("相关接口或字段于 2024-01-01 下线。")] public class AppsCapacityUnbindAwemeUserV1Response : AppsCapacityBindAwemeUserV1Response { } diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/Mount/AppsCapacityApplyCapacityV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/Mount/AppsCapacityApplyCapacityV1Request.cs similarity index 83% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/Mount/AppsCapacityApplyCapacityV1Request.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/Mount/AppsCapacityApplyCapacityV1Request.cs index e8fb9aa1..dccd77d0 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/Mount/AppsCapacityApplyCapacityV1Request.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/Mount/AppsCapacityApplyCapacityV1Request.cs @@ -1,9 +1,12 @@ +using System; + namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models { /// /// 表示 [POST] /apps/v1/capacity/apply_capacity 接口的请求。 /// - public class AppsCapacityApplyCapacityV1Request : ByteDanceMicroAppRequest + [Obsolete("相关接口或字段于 2024-01-01 下线。")] + public class AppsCapacityApplyCapacityV1Request : DouyinMicroAppRequest { /// /// 获取或设置挂载能力标识。 diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/Mount/AppsCapacityApplyCapacityV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/Mount/AppsCapacityApplyCapacityV1Response.cs new file mode 100644 index 00000000..13c96174 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/Mount/AppsCapacityApplyCapacityV1Response.cs @@ -0,0 +1,12 @@ +using System; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/v1/capacity/apply_capacity 接口的响应。 + /// + [Obsolete("相关接口或字段于 2024-01-01 下线。")] + public class AppsCapacityApplyCapacityV1Response : DouyinMicroAppResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/Mount/AppsCapacityBindSelfMountUserV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/Mount/AppsCapacityBindSelfMountUserV1Request.cs similarity index 82% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/Mount/AppsCapacityBindSelfMountUserV1Request.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/Mount/AppsCapacityBindSelfMountUserV1Request.cs index 7abfcaf2..5560c527 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/Mount/AppsCapacityBindSelfMountUserV1Request.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/Mount/AppsCapacityBindSelfMountUserV1Request.cs @@ -1,9 +1,12 @@ +using System; + namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models { /// /// 表示 [POST] /apps/v1/capacity/bind_self_mount_user 接口的请求。 /// - public class AppsCapacityBindSelfMountUserV1Request : ByteDanceMicroAppRequest + [Obsolete("相关接口或字段于 2024-01-01 下线。")] + public class AppsCapacityBindSelfMountUserV1Request : DouyinMicroAppRequest { /// /// 获取或设置挂载能力标识。 diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/Mount/AppsCapacityBindSelfMountUserV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/Mount/AppsCapacityBindSelfMountUserV1Response.cs new file mode 100644 index 00000000..4f697698 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/Mount/AppsCapacityBindSelfMountUserV1Response.cs @@ -0,0 +1,12 @@ +using System; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/v1/capacity/bind_self_mount_user 接口的响应。 + /// + [Obsolete("相关接口或字段于 2024-01-01 下线。")] + public class AppsCapacityBindSelfMountUserV1Response : DouyinMicroAppResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/Mount/AppsCapacityGetSelfMountBindQrcodeV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/Mount/AppsCapacityGetSelfMountBindQrcodeV1Request.cs new file mode 100644 index 00000000..d790d464 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/Mount/AppsCapacityGetSelfMountBindQrcodeV1Request.cs @@ -0,0 +1,18 @@ +using System; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [GET] /apps/v1/capacity/get_self_mount_bind_qrcode 接口的请求。 + /// + [Obsolete("相关接口或字段于 2024-01-01 下线。")] + public class AppsCapacityGetSelfMountBindQrcodeV1Request : DouyinMicroAppRequest + { + /// + /// 获取或设置挂载能力标识。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string CapacityKey { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/Mount/AppsCapacityGetSelfMountBindQrcodeV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/Mount/AppsCapacityGetSelfMountBindQrcodeV1Response.cs new file mode 100644 index 00000000..58a16e50 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/Mount/AppsCapacityGetSelfMountBindQrcodeV1Response.cs @@ -0,0 +1,38 @@ +using System; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [GET] /apps/v1/capacity/get_self_mount_bind_qrcode 接口的响应。 + /// + [Obsolete("相关接口或字段于 2024-01-01 下线。")] + public class AppsCapacityGetSelfMountBindQrcodeV1Response : DouyinMicroAppResponse + { + public static class Types + { + public class Data + { + /// + /// 获取或设置二维码图片 URL。 + /// + [Newtonsoft.Json.JsonProperty("qrcode_url")] + [System.Text.Json.Serialization.JsonPropertyName("qrcode_url")] + public string QrcodeUrl { get; set; } = default!; + + /// + /// 获取或设置二维码数据字符串。 + /// + [Newtonsoft.Json.JsonProperty("qrcode_parse_content")] + [System.Text.Json.Serialization.JsonPropertyName("qrcode_parse_content")] + public string QrcodeDataString { get; set; } = default!; + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/Mount/AppsCapacityQueryApplyStatusV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/Mount/AppsCapacityQueryApplyStatusV1Request.cs new file mode 100644 index 00000000..6892be12 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/Mount/AppsCapacityQueryApplyStatusV1Request.cs @@ -0,0 +1,18 @@ +using System; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [GET] /apps/v1/capacity/query_apply_status 接口的请求。 + /// + [Obsolete("相关接口或字段于 2024-01-01 下线。")] + public class AppsCapacityQueryApplyStatusV1Request : DouyinMicroAppRequest + { + /// + /// 获取或设置挂载能力标识。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string CapacityKey { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/Mount/AppsCapacityQueryApplyStatusV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/Mount/AppsCapacityQueryApplyStatusV1Response.cs new file mode 100644 index 00000000..6b2d74ed --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/Mount/AppsCapacityQueryApplyStatusV1Response.cs @@ -0,0 +1,38 @@ +using System; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [GET] /apps/v1/capacity/query_apply_status 接口的响应。 + /// + [Obsolete("相关接口或字段于 2024-01-01 下线。")] + public class AppsCapacityQueryApplyStatusV1Response : DouyinMicroAppResponse + { + public static class Types + { + public class Data + { + /// + /// 获取或设置能力状态。 + /// + [Newtonsoft.Json.JsonProperty("status")] + [System.Text.Json.Serialization.JsonPropertyName("status")] + public int Status { get; set; } + + /// + /// 获取或设置审核拒绝原因。 + /// + [Newtonsoft.Json.JsonProperty("reason")] + [System.Text.Json.Serialization.JsonPropertyName("reason")] + public string? RejectReason { get; set; } + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/Mount/AppsCapacityQuerySelfMountUserListV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/Mount/AppsCapacityQuerySelfMountUserListV1Request.cs similarity index 77% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/Mount/AppsCapacityQuerySelfMountUserListV1Request.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/Mount/AppsCapacityQuerySelfMountUserListV1Request.cs index 343f318b..3eaae40b 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/Mount/AppsCapacityQuerySelfMountUserListV1Request.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/Mount/AppsCapacityQuerySelfMountUserListV1Request.cs @@ -1,9 +1,12 @@ +using System; + namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models { /// /// 表示 [GET] /apps/v1/capacity/query_self_mount_user_list 接口的请求。 /// - public class AppsCapacityQuerySelfMountUserListV1Request : ByteDanceMicroAppRequest + [Obsolete("相关接口或字段于 2024-01-01 下线。")] + public class AppsCapacityQuerySelfMountUserListV1Request : DouyinMicroAppRequest { /// /// 获取或设置挂载能力标识。 @@ -18,7 +21,7 @@ public class AppsCapacityQuerySelfMountUserListV1Request : ByteDanceMicroAppRequ /// [Newtonsoft.Json.JsonIgnore] [System.Text.Json.Serialization.JsonIgnore] - public int Page { get; set; } = 1; + public int PageNumber { get; set; } = 1; /// /// 获取或设置分页每页数量。 @@ -26,6 +29,6 @@ public class AppsCapacityQuerySelfMountUserListV1Request : ByteDanceMicroAppRequ /// [Newtonsoft.Json.JsonIgnore] [System.Text.Json.Serialization.JsonIgnore] - public int Limit { get; set; } = 10; + public int PageSize { get; set; } = 10; } } diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/Mount/AppsCapacityQuerySelfMountUserListV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/Mount/AppsCapacityQuerySelfMountUserListV1Response.cs similarity index 86% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/Mount/AppsCapacityQuerySelfMountUserListV1Response.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/Mount/AppsCapacityQuerySelfMountUserListV1Response.cs index 5807ae3f..4da60fca 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/Mount/AppsCapacityQuerySelfMountUserListV1Response.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/Mount/AppsCapacityQuerySelfMountUserListV1Response.cs @@ -1,9 +1,12 @@ +using System; + namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models { /// /// 表示 [GET] /apps/v1/capacity/query_self_mount_user_list 接口的响应。 /// - public class AppsCapacityQuerySelfMountUserListV1Response : ByteDanceMicroAppResponse + [Obsolete("相关接口或字段于 2024-01-01 下线。")] + public class AppsCapacityQuerySelfMountUserListV1Response : DouyinMicroAppResponse { public static class Types { @@ -66,20 +69,6 @@ public class User } } - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_no")] - [System.Text.Json.Serialization.JsonPropertyName("err_no")] - public override long ErrorCode { get; set; } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_msg")] - [System.Text.Json.Serialization.JsonPropertyName("err_msg")] - public override string? ErrorMessage { get; set; } - /// /// 获取或设置返回数据。 /// diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/Mount/AppsCapacityUnbindSelfMountUserV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/Mount/AppsCapacityUnbindSelfMountUserV1Request.cs similarity index 79% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/Mount/AppsCapacityUnbindSelfMountUserV1Request.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/Mount/AppsCapacityUnbindSelfMountUserV1Request.cs index 40a9dd3a..d64d306f 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/Mount/AppsCapacityUnbindSelfMountUserV1Request.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/Mount/AppsCapacityUnbindSelfMountUserV1Request.cs @@ -1,8 +1,11 @@ +using System; + namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models { /// /// 表示 [POST] /apps/v1/capacity/unbind_self_mount_user 接口的请求。 /// + [Obsolete("相关接口或字段于 2024-01-01 下线。")] public class AppsCapacityUnbindSelfMountUserV1Request : AppsCapacityBindSelfMountUserV1Request { } diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/Mount/AppsCapacityUnbindSelfMountUserV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/Mount/AppsCapacityUnbindSelfMountUserV1Response.cs similarity index 79% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/Mount/AppsCapacityUnbindSelfMountUserV1Response.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/Mount/AppsCapacityUnbindSelfMountUserV1Response.cs index a192b669..989077bb 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/Mount/AppsCapacityUnbindSelfMountUserV1Response.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/Mount/AppsCapacityUnbindSelfMountUserV1Response.cs @@ -1,8 +1,11 @@ +using System; + namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models { /// /// 表示 [POST] /apps/v1/capacity/unbind_self_mount_user 接口的响应。 /// + [Obsolete("相关接口或字段于 2024-01-01 下线。")] public class AppsCapacityUnbindSelfMountUserV1Response : AppsCapacityBindSelfMountUserV1Response { } diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/Mount/Capcut/AppsCapacityQueryCapcutInfoV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/Mount/Capcut/AppsCapacityQueryCapcutInfoV1Request.cs new file mode 100644 index 00000000..4a73cae8 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/Mount/Capcut/AppsCapacityQueryCapcutInfoV1Request.cs @@ -0,0 +1,12 @@ +using System; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [GET] /apps/v1/capacity/query_capcut_info 接口的请求。 + /// + [Obsolete("相关接口或字段于 2024-01-01 下线。")] + public class AppsCapacityQueryCapcutInfoV1Request : DouyinMicroAppRequest + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/Mount/Capcut/AppsCapacityQueryCapcutInfoV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/Mount/Capcut/AppsCapacityQueryCapcutInfoV1Response.cs new file mode 100644 index 00000000..d6c6d52e --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/Mount/Capcut/AppsCapacityQueryCapcutInfoV1Response.cs @@ -0,0 +1,45 @@ +using System; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [GET] /apps/v1/capacity/query_capcut_info 接口的响应。 + /// + [Obsolete("相关接口或字段于 2024-01-01 下线。")] + public class AppsCapacityQueryCapcutInfoV1Response : DouyinMicroAppResponse + { + public static class Types + { + public class Data + { + /// + /// 获取或设置剪映号。 + /// + [Newtonsoft.Json.JsonProperty("capcut_id")] + [System.Text.Json.Serialization.JsonPropertyName("capcut_id")] + public string CapcutId { get; set; } = default!; + + /// + /// 获取或设置剪映名称。 + /// + [Newtonsoft.Json.JsonProperty("capcut_name")] + [System.Text.Json.Serialization.JsonPropertyName("capcut_name")] + public string CapcutName { get; set; } = default!; + + /// + /// 获取或设置剪映头像 URL。 + /// + [Newtonsoft.Json.JsonProperty("capcut_avatar")] + [System.Text.Json.Serialization.JsonPropertyName("capcut_avatar")] + public string CapcutAvatarUrl { get; set; } = default!; + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/Mount/Capcut/AppsCapacityQueryCapcutTemplateListV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/Mount/Capcut/AppsCapacityQueryCapcutTemplateListV1Request.cs similarity index 78% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/Mount/Capcut/AppsCapacityQueryCapcutTemplateListV1Request.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/Mount/Capcut/AppsCapacityQueryCapcutTemplateListV1Request.cs index 4caabe62..5c9ad34f 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/Mount/Capcut/AppsCapacityQueryCapcutTemplateListV1Request.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/Mount/Capcut/AppsCapacityQueryCapcutTemplateListV1Request.cs @@ -1,9 +1,12 @@ +using System; + namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models { /// /// 表示 [GET] /apps/v1/capacity/query_capcut_template_list 接口的请求。 /// - public class AppsCapacityQueryCapcutTemplateListV1Request : ByteDanceMicroAppRequest + [Obsolete("相关接口或字段于 2024-01-01 下线。")] + public class AppsCapacityQueryCapcutTemplateListV1Request : DouyinMicroAppRequest { /// /// 获取或设置分页页数。 @@ -11,7 +14,7 @@ public class AppsCapacityQueryCapcutTemplateListV1Request : ByteDanceMicroAppReq /// [Newtonsoft.Json.JsonIgnore] [System.Text.Json.Serialization.JsonIgnore] - public int Page { get; set; } = 1; + public int PageNumber { get; set; } = 1; /// /// 获取或设置分页每页数量。 @@ -19,6 +22,6 @@ public class AppsCapacityQueryCapcutTemplateListV1Request : ByteDanceMicroAppReq /// [Newtonsoft.Json.JsonIgnore] [System.Text.Json.Serialization.JsonIgnore] - public int Limit { get; set; } = 10; + public int PageSize { get; set; } = 10; } } diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/Mount/Capcut/AppsCapacityQueryCapcutTemplateListV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/Mount/Capcut/AppsCapacityQueryCapcutTemplateListV1Response.cs similarity index 91% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/Mount/Capcut/AppsCapacityQueryCapcutTemplateListV1Response.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/Mount/Capcut/AppsCapacityQueryCapcutTemplateListV1Response.cs index 0a870b77..6f08a9bf 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/Mount/Capcut/AppsCapacityQueryCapcutTemplateListV1Response.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/Mount/Capcut/AppsCapacityQueryCapcutTemplateListV1Response.cs @@ -1,9 +1,12 @@ +using System; + namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models { /// /// 表示 [GET] /apps/v1/capacity/query_capcut_template_list 接口的响应。 /// - public class AppsCapacityQueryCapcutTemplateListV1Response : ByteDanceMicroAppResponse + [Obsolete("相关接口或字段于 2024-01-01 下线。")] + public class AppsCapacityQueryCapcutTemplateListV1Response : DouyinMicroAppResponse { public static class Types { @@ -107,20 +110,6 @@ public class AuditReason } } - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_no")] - [System.Text.Json.Serialization.JsonPropertyName("err_no")] - public override long ErrorCode { get; set; } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_msg")] - [System.Text.Json.Serialization.JsonPropertyName("err_msg")] - public override string? ErrorMessage { get; set; } - /// /// 获取或设置返回数据。 /// diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/Mount/Capcut/AppsCapacityUpdateCapcutTemplateStatusV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/Mount/Capcut/AppsCapacityUpdateCapcutTemplateStatusV1Request.cs similarity index 88% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/Mount/Capcut/AppsCapacityUpdateCapcutTemplateStatusV1Request.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/Mount/Capcut/AppsCapacityUpdateCapcutTemplateStatusV1Request.cs index 309e7552..85233fb3 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/Mount/Capcut/AppsCapacityUpdateCapcutTemplateStatusV1Request.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/Mount/Capcut/AppsCapacityUpdateCapcutTemplateStatusV1Request.cs @@ -1,9 +1,12 @@ +using System; + namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models { /// /// 表示 [POST] /apps/v1/capacity/update_capcut_template_status 接口的请求。 /// - public class AppsCapacityUpdateCapcutTemplateStatusV1Request : ByteDanceMicroAppRequest + [Obsolete("相关接口或字段于 2024-01-01 下线。")] + public class AppsCapacityUpdateCapcutTemplateStatusV1Request : DouyinMicroAppRequest { /// /// 获取或设置模版 ID。 diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/Mount/Capcut/AppsCapacityUpdateCapcutTemplateStatusV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/Mount/Capcut/AppsCapacityUpdateCapcutTemplateStatusV1Response.cs new file mode 100644 index 00000000..d1127321 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/Mount/Capcut/AppsCapacityUpdateCapcutTemplateStatusV1Response.cs @@ -0,0 +1,12 @@ +using System; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/v1/capacity/update_capcut_template_status 接口的响应。 + /// + [Obsolete("相关接口或字段于 2024-01-01 下线。")] + public class AppsCapacityUpdateCapcutTemplateStatusV1Response : DouyinMicroAppResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/SimpleQrcode/AppsCapacityAddSimpleQrcodeBindV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/SimpleQrcode/AppsCapacityAddSimpleQrcodeBindV1Request.cs similarity index 84% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/SimpleQrcode/AppsCapacityAddSimpleQrcodeBindV1Request.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/SimpleQrcode/AppsCapacityAddSimpleQrcodeBindV1Request.cs index 9789541c..ae9a737c 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/SimpleQrcode/AppsCapacityAddSimpleQrcodeBindV1Request.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/SimpleQrcode/AppsCapacityAddSimpleQrcodeBindV1Request.cs @@ -1,9 +1,12 @@ +using System; + namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models { /// /// 表示 [POST] /apps/v1/capacity/add_simple_qr_bind 接口的请求。 /// - public class AppsCapacityAddSimpleQrcodeBindV1Request : ByteDanceMicroAppRequest + [Obsolete("相关接口或字段于 2024-02-02 下线。")] + public class AppsCapacityAddSimpleQrcodeBindV1Request : DouyinMicroAppRequest { /// /// 获取或设置链接地址。 @@ -30,9 +33,9 @@ public class AppsCapacityAddSimpleQrcodeBindV1Request : ByteDanceMicroAppRequest /// 获取或设置是否独占该链接作为前缀。 /// [Newtonsoft.Json.JsonProperty("exclusive_qr_url_prefix")] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.NumericalBooleanConverter))] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.NumericalBooleanConverter))] [System.Text.Json.Serialization.JsonPropertyName("exclusive_qr_url_prefix")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumericalBooleanConverter))] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalBooleanConverter))] public bool IsPrefixExclusive { get; set; } } } diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/SimpleQrcode/AppsCapacityAddSimpleQrcodeBindV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/SimpleQrcode/AppsCapacityAddSimpleQrcodeBindV1Response.cs new file mode 100644 index 00000000..0738ce2e --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/SimpleQrcode/AppsCapacityAddSimpleQrcodeBindV1Response.cs @@ -0,0 +1,12 @@ +using System; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/v1/capacity/add_simple_qr_bind 接口的响应。 + /// + [Obsolete("相关接口或字段于 2024-02-02 下线。")] + public class AppsCapacityAddSimpleQrcodeBindV1Response : DouyinMicroAppResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/SimpleQrcode/AppsCapacityDeleteSimpleQrcodeBindV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/SimpleQrcode/AppsCapacityDeleteSimpleQrcodeBindV1Request.cs new file mode 100644 index 00000000..bf33b927 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/SimpleQrcode/AppsCapacityDeleteSimpleQrcodeBindV1Request.cs @@ -0,0 +1,18 @@ +using System; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/v1/capacity/delete_simple_qr_bind 接口的请求。 + /// + [Obsolete("相关接口或字段于 2024-02-02 下线。")] + public class AppsCapacityDeleteSimpleQrcodeBindV1Request : DouyinMicroAppRequest + { + /// + /// 获取或设置链接地址。 + /// + [Newtonsoft.Json.JsonProperty("qr_url")] + [System.Text.Json.Serialization.JsonPropertyName("qr_url")] + public string Url { get; set; } = string.Empty; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/SimpleQrcode/AppsCapacityDeleteSimpleQrcodeBindV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/SimpleQrcode/AppsCapacityDeleteSimpleQrcodeBindV1Response.cs new file mode 100644 index 00000000..fc2067bc --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/SimpleQrcode/AppsCapacityDeleteSimpleQrcodeBindV1Response.cs @@ -0,0 +1,12 @@ +using System; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/v1/capacity/delete_simple_qr_bind 接口的响应。 + /// + [Obsolete("相关接口或字段于 2024-02-02 下线。")] + public class AppsCapacityDeleteSimpleQrcodeBindV1Response : DouyinMicroAppResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/SimpleQrcode/AppsCapacityQuerySimpleQrcodeBindListV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/SimpleQrcode/AppsCapacityQuerySimpleQrcodeBindListV1Request.cs similarity index 78% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/SimpleQrcode/AppsCapacityQuerySimpleQrcodeBindListV1Request.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/SimpleQrcode/AppsCapacityQuerySimpleQrcodeBindListV1Request.cs index 021ce4bb..5f350458 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/SimpleQrcode/AppsCapacityQuerySimpleQrcodeBindListV1Request.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/SimpleQrcode/AppsCapacityQuerySimpleQrcodeBindListV1Request.cs @@ -1,9 +1,12 @@ +using System; + namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models { /// /// 表示 [GET] /apps/v1/capacity/query_simple_qr_bind_list 接口的请求。 /// - public class AppsCapacityQuerySimpleQrcodeBindListV1Request : ByteDanceMicroAppRequest + [Obsolete("相关接口或字段于 2024-02-02 下线。")] + public class AppsCapacityQuerySimpleQrcodeBindListV1Request : DouyinMicroAppRequest { /// /// 获取或设置分页页数。 @@ -11,7 +14,7 @@ public class AppsCapacityQuerySimpleQrcodeBindListV1Request : ByteDanceMicroAppR /// [Newtonsoft.Json.JsonIgnore] [System.Text.Json.Serialization.JsonIgnore] - public int Page { get; set; } = 1; + public int PageNumber { get; set; } = 1; /// /// 获取或设置分页每页数量。 @@ -19,6 +22,6 @@ public class AppsCapacityQuerySimpleQrcodeBindListV1Request : ByteDanceMicroAppR /// [Newtonsoft.Json.JsonIgnore] [System.Text.Json.Serialization.JsonIgnore] - public int Limit { get; set; } = 10; + public int PageSize { get; set; } = 10; } } diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/SimpleQrcode/AppsCapacityQuerySimpleQrcodeBindListV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/SimpleQrcode/AppsCapacityQuerySimpleQrcodeBindListV1Response.cs similarity index 85% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/SimpleQrcode/AppsCapacityQuerySimpleQrcodeBindListV1Response.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/SimpleQrcode/AppsCapacityQuerySimpleQrcodeBindListV1Response.cs index 1296833c..c0de4e93 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/SimpleQrcode/AppsCapacityQuerySimpleQrcodeBindListV1Response.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/SimpleQrcode/AppsCapacityQuerySimpleQrcodeBindListV1Response.cs @@ -1,9 +1,12 @@ +using System; + namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models { /// /// 表示 [GET] /apps/v1/capacity/query_simple_qr_bind_list 接口的响应。 /// - public class AppsCapacityQuerySimpleQrcodeBindListV1Response : ByteDanceMicroAppResponse + [Obsolete("相关接口或字段于 2024-02-02 下线。")] + public class AppsCapacityQuerySimpleQrcodeBindListV1Response : DouyinMicroAppResponse { public static class Types { @@ -45,9 +48,9 @@ public class Qrcode /// 获取或设置是否独占该链接作为前缀。 /// [Newtonsoft.Json.JsonProperty("exclusive_qr_url_prefix")] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.NumericalBooleanConverter))] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.NumericalBooleanConverter))] [System.Text.Json.Serialization.JsonPropertyName("exclusive_qr_url_prefix")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumericalBooleanConverter))] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalBooleanConverter))] public bool IsPrefixExclusive { get; set; } } } @@ -78,7 +81,7 @@ public class Qrcode /// [Newtonsoft.Json.JsonProperty("bind_rest_count")] [System.Text.Json.Serialization.JsonPropertyName("bind_rest_count")] - public int BindRemainingCount { get; set; } + public int BindRestCount { get; set; } /// /// 获取或设置当月总共可以发布的次数。 @@ -92,24 +95,10 @@ public class Qrcode /// [Newtonsoft.Json.JsonProperty("release_rest_count")] [System.Text.Json.Serialization.JsonPropertyName("release_rest_count")] - public int ReleaseRemainingCount { get; set; } + public int ReleaseRestCount { get; set; } } } - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_no")] - [System.Text.Json.Serialization.JsonPropertyName("err_no")] - public override long ErrorCode { get; set; } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_msg")] - [System.Text.Json.Serialization.JsonPropertyName("err_msg")] - public override string? ErrorMessage { get; set; } - /// /// 获取或设置返回数据。 /// diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/SimpleQrcode/AppsCapacityUpdateSimpleQrcodeBindStatusV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/SimpleQrcode/AppsCapacityUpdateSimpleQrcodeBindStatusV1Request.cs similarity index 87% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/SimpleQrcode/AppsCapacityUpdateSimpleQrcodeBindStatusV1Request.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/SimpleQrcode/AppsCapacityUpdateSimpleQrcodeBindStatusV1Request.cs index 45dfdd95..396db15d 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/SimpleQrcode/AppsCapacityUpdateSimpleQrcodeBindStatusV1Request.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/SimpleQrcode/AppsCapacityUpdateSimpleQrcodeBindStatusV1Request.cs @@ -1,9 +1,12 @@ +using System; + namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models { /// /// 表示 [POST] /apps/v1/capacity/update_simple_qr_bind_status 接口的请求。 /// - public class AppsCapacityUpdateSimpleQrcodeBindStatusV1Request : ByteDanceMicroAppRequest + [Obsolete("相关接口或字段于 2024-02-02 下线。")] + public class AppsCapacityUpdateSimpleQrcodeBindStatusV1Request : DouyinMicroAppRequest { /// /// 获取或设置链接地址。 diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/SimpleQrcode/AppsCapacityUpdateSimpleQrcodeBindStatusV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/SimpleQrcode/AppsCapacityUpdateSimpleQrcodeBindStatusV1Response.cs new file mode 100644 index 00000000..00ccea3c --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/SimpleQrcode/AppsCapacityUpdateSimpleQrcodeBindStatusV1Response.cs @@ -0,0 +1,12 @@ +using System; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/v1/capacity/update_simple_qr_bind_status 接口的响应。 + /// + [Obsolete("相关接口或字段于 2024-02-02 下线。")] + public class AppsCapacityUpdateSimpleQrcodeBindStatusV1Response : DouyinMicroAppResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/SimpleQrcode/AppsCapacityUpdateSimpleQrcodeBindV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/SimpleQrcode/AppsCapacityUpdateSimpleQrcodeBindV1Request.cs similarity index 86% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/SimpleQrcode/AppsCapacityUpdateSimpleQrcodeBindV1Request.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/SimpleQrcode/AppsCapacityUpdateSimpleQrcodeBindV1Request.cs index 95d5780b..5bd1cf77 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/SimpleQrcode/AppsCapacityUpdateSimpleQrcodeBindV1Request.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/SimpleQrcode/AppsCapacityUpdateSimpleQrcodeBindV1Request.cs @@ -1,9 +1,12 @@ +using System; + namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models { /// /// 表示 [POST] /apps/v1/capacity/update_simple_qr_bind 接口的请求。 /// - public class AppsCapacityUpdateSimpleQrcodeBindV1Request : ByteDanceMicroAppRequest + [Obsolete("相关接口或字段于 2024-02-02 下线。")] + public class AppsCapacityUpdateSimpleQrcodeBindV1Request : DouyinMicroAppRequest { /// /// 获取或设置更新前的链接地址。 @@ -37,9 +40,9 @@ public class AppsCapacityUpdateSimpleQrcodeBindV1Request : ByteDanceMicroAppRequ /// 获取或设置是否独占该链接作为前缀。 /// [Newtonsoft.Json.JsonProperty("exclusive_qr_url_prefix")] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.NumericalBooleanConverter))] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.NumericalBooleanConverter))] [System.Text.Json.Serialization.JsonPropertyName("exclusive_qr_url_prefix")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumericalBooleanConverter))] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalBooleanConverter))] public bool IsPrefixExclusive { get; set; } } } diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/SimpleQrcode/AppsCapacityUpdateSimpleQrcodeBindV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/SimpleQrcode/AppsCapacityUpdateSimpleQrcodeBindV1Response.cs new file mode 100644 index 00000000..5f314712 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/SimpleQrcode/AppsCapacityUpdateSimpleQrcodeBindV1Response.cs @@ -0,0 +1,12 @@ +using System; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/v1/capacity/update_simple_qr_bind 接口的响应。 + /// + [Obsolete("相关接口或字段于 2024-02-02 下线。")] + public class AppsCapacityUpdateSimpleQrcodeBindV1Response : DouyinMicroAppResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/SubscribeNotification/AppsCapacityAddAppSubscribeNotificationTemplateV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/SubscribeNotification/AppsCapacityAddAppSubscribeNotificationTemplateV1Request.cs similarity index 88% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/SubscribeNotification/AppsCapacityAddAppSubscribeNotificationTemplateV1Request.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/SubscribeNotification/AppsCapacityAddAppSubscribeNotificationTemplateV1Request.cs index e953d552..deadfe3e 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/SubscribeNotification/AppsCapacityAddAppSubscribeNotificationTemplateV1Request.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/SubscribeNotification/AppsCapacityAddAppSubscribeNotificationTemplateV1Request.cs @@ -1,3 +1,4 @@ +using System; using System.Collections.Generic; namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models @@ -5,7 +6,8 @@ namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models /// /// 表示 [POST] /apps/v1/capacity/add_app_subscribe_notification_tpl 接口的请求。 /// - public class AppsCapacityAddAppSubscribeNotificationTemplateV1Request : ByteDanceMicroAppRequest + [Obsolete("相关接口或字段于 2024-01-30 下线。")] + public class AppsCapacityAddAppSubscribeNotificationTemplateV1Request : DouyinMicroAppRequest { /// /// 获取或设置模板 ID。 diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/SubscribeNotification/AppsCapacityAddAppSubscribeNotificationTemplateV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/SubscribeNotification/AppsCapacityAddAppSubscribeNotificationTemplateV1Response.cs new file mode 100644 index 00000000..2286a711 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/SubscribeNotification/AppsCapacityAddAppSubscribeNotificationTemplateV1Response.cs @@ -0,0 +1,31 @@ +using System; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/v1/capacity/add_app_subscribe_notification_tpl 接口的响应。 + /// + [Obsolete("相关接口或字段于 2024-01-30 下线。")] + public class AppsCapacityAddAppSubscribeNotificationTemplateV1Response : DouyinMicroAppResponse + { + public static class Types + { + public class Data + { + /// + /// 获取或设置小程序消息模版 ID。 + /// + [Newtonsoft.Json.JsonProperty("msg_id")] + [System.Text.Json.Serialization.JsonPropertyName("msg_id")] + public string MessageId { get; set; } = default!; + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/SubscribeNotification/AppsCapacityCreateAppSubscribeNotificationTemplateV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/SubscribeNotification/AppsCapacityCreateAppSubscribeNotificationTemplateV1Request.cs similarity index 93% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/SubscribeNotification/AppsCapacityCreateAppSubscribeNotificationTemplateV1Request.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/SubscribeNotification/AppsCapacityCreateAppSubscribeNotificationTemplateV1Request.cs index 21794239..aa1a9585 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/SubscribeNotification/AppsCapacityCreateAppSubscribeNotificationTemplateV1Request.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/SubscribeNotification/AppsCapacityCreateAppSubscribeNotificationTemplateV1Request.cs @@ -1,3 +1,4 @@ +using System; using System.Collections.Generic; namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models @@ -5,7 +6,8 @@ namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models /// /// 表示 [POST] /apps/v1/capacity/create_subscribe_notification_tpl 接口的请求。 /// - public class AppsCapacityCreateAppSubscribeNotificationTemplateV1Request : ByteDanceMicroAppRequest + [Obsolete("相关接口或字段于 2024-01-30 下线。")] + public class AppsCapacityCreateAppSubscribeNotificationTemplateV1Request : DouyinMicroAppRequest { /// /// 获取或设置订阅消息类型。 diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/SubscribeNotification/AppsCapacityCreateAppSubscribeNotificationTemplateV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/SubscribeNotification/AppsCapacityCreateAppSubscribeNotificationTemplateV1Response.cs new file mode 100644 index 00000000..6aa9decd --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/SubscribeNotification/AppsCapacityCreateAppSubscribeNotificationTemplateV1Response.cs @@ -0,0 +1,12 @@ +using System; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/v1/capacity/create_subscribe_notification_tpl 接口的响应。 + /// + [Obsolete("相关接口或字段于 2024-01-30 下线。")] + public class AppsCapacityCreateAppSubscribeNotificationTemplateV1Response : DouyinMicroAppResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/SubscribeNotification/AppsCapacityDeleteAppSubscribeNotificationTemplateV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/SubscribeNotification/AppsCapacityDeleteAppSubscribeNotificationTemplateV1Request.cs similarity index 82% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/SubscribeNotification/AppsCapacityDeleteAppSubscribeNotificationTemplateV1Request.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/SubscribeNotification/AppsCapacityDeleteAppSubscribeNotificationTemplateV1Request.cs index 04ce9c4b..0b319d9f 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/SubscribeNotification/AppsCapacityDeleteAppSubscribeNotificationTemplateV1Request.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/SubscribeNotification/AppsCapacityDeleteAppSubscribeNotificationTemplateV1Request.cs @@ -1,9 +1,12 @@ +using System; + namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models { /// /// 表示 [POST] /apps/v1/capacity/delete_app_subscribe_notification_tpl 接口的请求。 /// - public class AppsCapacityDeleteAppSubscribeNotificationTemplateV1Request : ByteDanceMicroAppRequest + [Obsolete("相关接口或字段于 2024-01-30 下线。")] + public class AppsCapacityDeleteAppSubscribeNotificationTemplateV1Request : DouyinMicroAppRequest { /// /// 获取或设置小程序消息模版 ID。 diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/SubscribeNotification/AppsCapacityDeleteAppSubscribeNotificationTemplateV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/SubscribeNotification/AppsCapacityDeleteAppSubscribeNotificationTemplateV1Response.cs new file mode 100644 index 00000000..b3dbecc2 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/SubscribeNotification/AppsCapacityDeleteAppSubscribeNotificationTemplateV1Response.cs @@ -0,0 +1,12 @@ +using System; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/v1/capacity/delete_app_subscribe_notification_tpl 接口的响应。 + /// + [Obsolete("相关接口或字段于 2024-01-30 下线。")] + public class AppsCapacityDeleteAppSubscribeNotificationTemplateV1Response : DouyinMicroAppResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/SubscribeNotification/AppsCapacityModifyAppSubscribeNotificationTemplateV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/SubscribeNotification/AppsCapacityModifyAppSubscribeNotificationTemplateV1Request.cs similarity index 88% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/SubscribeNotification/AppsCapacityModifyAppSubscribeNotificationTemplateV1Request.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/SubscribeNotification/AppsCapacityModifyAppSubscribeNotificationTemplateV1Request.cs index 77cf1ea2..c465ab52 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/SubscribeNotification/AppsCapacityModifyAppSubscribeNotificationTemplateV1Request.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/SubscribeNotification/AppsCapacityModifyAppSubscribeNotificationTemplateV1Request.cs @@ -1,3 +1,4 @@ +using System; using System.Collections.Generic; namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models @@ -5,7 +6,8 @@ namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models /// /// 表示 [POST] /apps/v1/capacity/modify_app_subscribe_notification_tpl 接口的请求。 /// - public class AppsCapacityModifyAppSubscribeNotificationTemplateV1Request : ByteDanceMicroAppRequest + [Obsolete("相关接口或字段于 2024-01-30 下线。")] + public class AppsCapacityModifyAppSubscribeNotificationTemplateV1Request : DouyinMicroAppRequest { /// /// 获取或设置小程序消息模版 ID。 diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/SubscribeNotification/AppsCapacityModifyAppSubscribeNotificationTemplateV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/SubscribeNotification/AppsCapacityModifyAppSubscribeNotificationTemplateV1Response.cs new file mode 100644 index 00000000..dc644403 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/SubscribeNotification/AppsCapacityModifyAppSubscribeNotificationTemplateV1Response.cs @@ -0,0 +1,12 @@ +using System; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/v1/capacity/modify_app_subscribe_notification_tpl 接口的响应。 + /// + [Obsolete("相关接口或字段于 2024-01-30 下线。")] + public class AppsCapacityModifyAppSubscribeNotificationTemplateV1Response : DouyinMicroAppResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/SubscribeNotification/AppsCapacityQueryAppSubscribeNotificationTemplateV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/SubscribeNotification/AppsCapacityQueryAppSubscribeNotificationTemplateV1Request.cs similarity index 85% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/SubscribeNotification/AppsCapacityQueryAppSubscribeNotificationTemplateV1Request.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/SubscribeNotification/AppsCapacityQueryAppSubscribeNotificationTemplateV1Request.cs index b0f939b8..16f08789 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/SubscribeNotification/AppsCapacityQueryAppSubscribeNotificationTemplateV1Request.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/SubscribeNotification/AppsCapacityQueryAppSubscribeNotificationTemplateV1Request.cs @@ -1,3 +1,4 @@ +using System; using System.Collections.Generic; namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models @@ -5,7 +6,8 @@ namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models /// /// 表示 [GET] /apps/v1/capacity/query_app_subscribe_notification_tpl 接口的请求。 /// - public class AppsCapacityQueryAppSubscribeNotificationTemplateV1Request : ByteDanceMicroAppRequest + [Obsolete("相关接口或字段于 2024-01-30 下线。")] + public class AppsCapacityQueryAppSubscribeNotificationTemplateV1Request : DouyinMicroAppRequest { /// /// 获取或设置订阅消息类型。 @@ -27,7 +29,7 @@ public class AppsCapacityQueryAppSubscribeNotificationTemplateV1Request : ByteDa /// [Newtonsoft.Json.JsonIgnore] [System.Text.Json.Serialization.JsonIgnore] - public int Page { get; set; } = 1; + public int PageNumber { get; set; } = 1; /// /// 获取或设置分页每页数量。 @@ -35,6 +37,6 @@ public class AppsCapacityQueryAppSubscribeNotificationTemplateV1Request : ByteDa /// [Newtonsoft.Json.JsonIgnore] [System.Text.Json.Serialization.JsonIgnore] - public int Limit { get; set; } = 50; + public int PageSize { get; set; } = 50; } } diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/SubscribeNotification/AppsCapacityQueryAppSubscribeNotificationTemplateV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/SubscribeNotification/AppsCapacityQueryAppSubscribeNotificationTemplateV1Response.cs similarity index 88% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/SubscribeNotification/AppsCapacityQueryAppSubscribeNotificationTemplateV1Response.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/SubscribeNotification/AppsCapacityQueryAppSubscribeNotificationTemplateV1Response.cs index 62027855..dee3ce4a 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/SubscribeNotification/AppsCapacityQueryAppSubscribeNotificationTemplateV1Response.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/SubscribeNotification/AppsCapacityQueryAppSubscribeNotificationTemplateV1Response.cs @@ -1,9 +1,12 @@ +using System; + namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models { /// /// 表示 [GET] /apps/v1/capacity/query_app_subscribe_notification_tpl 接口的响应。 /// - public class AppsCapacityQueryAppSubscribeNotificationTemplateV1Response : ByteDanceMicroAppResponse + [Obsolete("相关接口或字段于 2024-01-30 下线。")] + public class AppsCapacityQueryAppSubscribeNotificationTemplateV1Response : DouyinMicroAppResponse { public static class Types { @@ -80,20 +83,6 @@ public class Template } } - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_no")] - [System.Text.Json.Serialization.JsonPropertyName("err_no")] - public override long ErrorCode { get; set; } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_msg")] - [System.Text.Json.Serialization.JsonPropertyName("err_msg")] - public override string? ErrorMessage { get; set; } - /// /// 获取或设置返回数据。 /// diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/SubscribeNotification/AppsCapacityQueryCreatedSubscribeNotificationTemplateListV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/SubscribeNotification/AppsCapacityQueryCreatedSubscribeNotificationTemplateListV1Request.cs similarity index 81% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/SubscribeNotification/AppsCapacityQueryCreatedSubscribeNotificationTemplateListV1Request.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/SubscribeNotification/AppsCapacityQueryCreatedSubscribeNotificationTemplateListV1Request.cs index b54c971c..643cc89f 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/SubscribeNotification/AppsCapacityQueryCreatedSubscribeNotificationTemplateListV1Request.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/SubscribeNotification/AppsCapacityQueryCreatedSubscribeNotificationTemplateListV1Request.cs @@ -1,11 +1,12 @@ -using System.Collections.Generic; +using System; namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models { /// /// 表示 [GET] /apps/v1/capacity/query_created_subscribe_notification_tpl_list 接口的请求。 /// - public class AppsCapacityQueryCreatedSubscribeNotificationTemplateListV1Request : ByteDanceMicroAppRequest + [Obsolete("相关接口或字段于 2024-01-30 下线。")] + public class AppsCapacityQueryCreatedSubscribeNotificationTemplateListV1Request : DouyinMicroAppRequest { /// /// 获取或设置审核状态。 @@ -20,7 +21,7 @@ public class AppsCapacityQueryCreatedSubscribeNotificationTemplateListV1Request /// [Newtonsoft.Json.JsonIgnore] [System.Text.Json.Serialization.JsonIgnore] - public int Page { get; set; } = 1; + public int PageNumber { get; set; } = 1; /// /// 获取或设置分页每页数量。 @@ -28,6 +29,6 @@ public class AppsCapacityQueryCreatedSubscribeNotificationTemplateListV1Request /// [Newtonsoft.Json.JsonIgnore] [System.Text.Json.Serialization.JsonIgnore] - public int Limit { get; set; } = 50; + public int PageSize { get; set; } = 50; } } diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/SubscribeNotification/AppsCapacityQueryCreatedSubscribeNotificationTemplateListV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/SubscribeNotification/AppsCapacityQueryCreatedSubscribeNotificationTemplateListV1Response.cs similarity index 88% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/SubscribeNotification/AppsCapacityQueryCreatedSubscribeNotificationTemplateListV1Response.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/SubscribeNotification/AppsCapacityQueryCreatedSubscribeNotificationTemplateListV1Response.cs index 81da778c..50080b2a 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/SubscribeNotification/AppsCapacityQueryCreatedSubscribeNotificationTemplateListV1Response.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/SubscribeNotification/AppsCapacityQueryCreatedSubscribeNotificationTemplateListV1Response.cs @@ -1,9 +1,12 @@ +using System; + namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models { /// /// 表示 [GET] /apps/v1/capacity/query_created_subscribe_notification_tpl_list 接口的响应。 /// - public class AppsCapacityQueryCreatedSubscribeNotificationTemplateListV1Response : ByteDanceMicroAppResponse + [Obsolete("相关接口或字段于 2024-01-30 下线。")] + public class AppsCapacityQueryCreatedSubscribeNotificationTemplateListV1Response : DouyinMicroAppResponse { public static class Types { @@ -80,20 +83,6 @@ public class Template } } - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_no")] - [System.Text.Json.Serialization.JsonPropertyName("err_no")] - public override long ErrorCode { get; set; } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_msg")] - [System.Text.Json.Serialization.JsonPropertyName("err_msg")] - public override string? ErrorMessage { get; set; } - /// /// 获取或设置返回数据。 /// diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/SubscribeNotification/AppsCapacityQuerySubscribeNotificationTemplateListV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/SubscribeNotification/AppsCapacityQuerySubscribeNotificationTemplateListV1Request.cs similarity index 88% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/SubscribeNotification/AppsCapacityQuerySubscribeNotificationTemplateListV1Request.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/SubscribeNotification/AppsCapacityQuerySubscribeNotificationTemplateListV1Request.cs index f14418a8..192af10a 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/SubscribeNotification/AppsCapacityQuerySubscribeNotificationTemplateListV1Request.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/SubscribeNotification/AppsCapacityQuerySubscribeNotificationTemplateListV1Request.cs @@ -1,3 +1,4 @@ +using System; using System.Collections.Generic; namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models @@ -5,7 +6,8 @@ namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models /// /// 表示 [GET] /apps/v1/capacity/query_subscribe_notification_tpl_list 接口的请求。 /// - public class AppsCapacityQuerySubscribeNotificationTemplateListV1Request : ByteDanceMicroAppRequest + [Obsolete("相关接口或字段于 2024-01-30 下线。")] + public class AppsCapacityQuerySubscribeNotificationTemplateListV1Request : DouyinMicroAppRequest { /// /// 获取或设置订阅消息类型。 @@ -41,7 +43,7 @@ public class AppsCapacityQuerySubscribeNotificationTemplateListV1Request : ByteD /// [Newtonsoft.Json.JsonIgnore] [System.Text.Json.Serialization.JsonIgnore] - public int Page { get; set; } = 1; + public int PageNumber { get; set; } = 1; /// /// 获取或设置分页每页数量。 @@ -49,6 +51,6 @@ public class AppsCapacityQuerySubscribeNotificationTemplateListV1Request : ByteD /// [Newtonsoft.Json.JsonIgnore] [System.Text.Json.Serialization.JsonIgnore] - public int Limit { get; set; } = 50; + public int PageSize { get; set; } = 50; } } diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/SubscribeNotification/AppsCapacityQuerySubscribeNotificationTemplateListV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/SubscribeNotification/AppsCapacityQuerySubscribeNotificationTemplateListV1Response.cs similarity index 87% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/SubscribeNotification/AppsCapacityQuerySubscribeNotificationTemplateListV1Response.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/SubscribeNotification/AppsCapacityQuerySubscribeNotificationTemplateListV1Response.cs index 0546f896..4f670e8f 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/SubscribeNotification/AppsCapacityQuerySubscribeNotificationTemplateListV1Response.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/SubscribeNotification/AppsCapacityQuerySubscribeNotificationTemplateListV1Response.cs @@ -1,9 +1,12 @@ +using System; + namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models { /// /// 表示 [GET] /apps/v1/capacity/query_subscribe_notification_tpl_list 接口的响应。 /// - public class AppsCapacityQuerySubscribeNotificationTemplateListV1Response : ByteDanceMicroAppResponse + [Obsolete("相关接口或字段于 2024-01-30 下线。")] + public class AppsCapacityQuerySubscribeNotificationTemplateListV1Response : DouyinMicroAppResponse { public static class Types { @@ -73,20 +76,6 @@ public class Template } } - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_no")] - [System.Text.Json.Serialization.JsonPropertyName("err_no")] - public override long ErrorCode { get; set; } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_msg")] - [System.Text.Json.Serialization.JsonPropertyName("err_msg")] - public override string? ErrorMessage { get; set; } - /// /// 获取或设置返回数据。 /// diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/TrafficPermission/AppsCapacityAddAdPlacementV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/TrafficPermission/AppsCapacityAddAdPlacementV1Request.cs similarity index 82% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/TrafficPermission/AppsCapacityAddAdPlacementV1Request.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/TrafficPermission/AppsCapacityAddAdPlacementV1Request.cs index 0c8dcf65..bb3867d5 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/TrafficPermission/AppsCapacityAddAdPlacementV1Request.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/TrafficPermission/AppsCapacityAddAdPlacementV1Request.cs @@ -1,9 +1,12 @@ +using System; + namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models { /// /// 表示 [POST] /apps/v1/capacity/add_ad_placement 接口的请求。 /// - public class AppsCapacityAddAdPlacementV1Request : ByteDanceMicroAppRequest + [Obsolete("相关接口或字段于 2024-02-29 下线。")] + public class AppsCapacityAddAdPlacementV1Request : DouyinMicroAppRequest { /// /// 获取或设置广告位名称。 diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/TrafficPermission/AppsCapacityAddAdPlacementV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/TrafficPermission/AppsCapacityAddAdPlacementV1Response.cs new file mode 100644 index 00000000..4f8bff35 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/TrafficPermission/AppsCapacityAddAdPlacementV1Response.cs @@ -0,0 +1,12 @@ +using System; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/v1/capacity/add_ad_placement 接口的响应。 + /// + [Obsolete("相关接口或字段于 2024-02-29 下线。")] + public class AppsCapacityAddAdPlacementV1Response : DouyinMicroAppResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/TrafficPermission/AppsCapacityOpenTrafficPermissionV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/TrafficPermission/AppsCapacityOpenTrafficPermissionV1Request.cs similarity index 92% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/TrafficPermission/AppsCapacityOpenTrafficPermissionV1Request.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/TrafficPermission/AppsCapacityOpenTrafficPermissionV1Request.cs index dd73276f..4fd4fb27 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/TrafficPermission/AppsCapacityOpenTrafficPermissionV1Request.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/TrafficPermission/AppsCapacityOpenTrafficPermissionV1Request.cs @@ -1,9 +1,12 @@ +using System; + namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models { /// /// 表示 [POST] /apps/v1/capacity/open_traffic_permission 接口的请求。 /// - public class AppsCapacityOpenTrafficPermissionV1Request : ByteDanceMicroAppRequest + [Obsolete("相关接口或字段于 2024-02-29 下线。")] + public class AppsCapacityOpenTrafficPermissionV1Request : DouyinMicroAppRequest { /// /// 获取或设置纳税人性质类型。 diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/TrafficPermission/AppsCapacityOpenTrafficPermissionV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/TrafficPermission/AppsCapacityOpenTrafficPermissionV1Response.cs new file mode 100644 index 00000000..9e7c96ae --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/TrafficPermission/AppsCapacityOpenTrafficPermissionV1Response.cs @@ -0,0 +1,12 @@ +using System; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/v1/capacity/open_traffic_permission 接口的响应。 + /// + [Obsolete("相关接口或字段于 2024-02-29 下线。")] + public class AppsCapacityOpenTrafficPermissionV1Response : DouyinMicroAppResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/TrafficPermission/AppsCapacityQueryAdIncomeV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/TrafficPermission/AppsCapacityQueryAdIncomeV1Request.cs similarity index 92% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/TrafficPermission/AppsCapacityQueryAdIncomeV1Request.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/TrafficPermission/AppsCapacityQueryAdIncomeV1Request.cs index 873e9ed0..71074d2f 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/TrafficPermission/AppsCapacityQueryAdIncomeV1Request.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/TrafficPermission/AppsCapacityQueryAdIncomeV1Request.cs @@ -3,7 +3,7 @@ namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models /// /// 表示 [GET] /apps/v1/capacity/query_ad_income 接口的请求。 /// - public class AppsCapacityQueryAdIncomeV1Request : ByteDanceMicroAppRequest + public class AppsCapacityQueryAdIncomeV1Request : DouyinMicroAppRequest { /// /// 获取或设置开始日期字符串(格式:yyyy-MM-dd)。 diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/TrafficPermission/AppsCapacityQueryAdIncomeV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/TrafficPermission/AppsCapacityQueryAdIncomeV1Response.cs similarity index 76% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/TrafficPermission/AppsCapacityQueryAdIncomeV1Response.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/TrafficPermission/AppsCapacityQueryAdIncomeV1Response.cs index 6d3d985c..2870ea20 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/TrafficPermission/AppsCapacityQueryAdIncomeV1Response.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/TrafficPermission/AppsCapacityQueryAdIncomeV1Response.cs @@ -3,7 +3,7 @@ namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models /// /// 表示 [GET] /apps/v1/capacity/query_ad_income 接口的响应。 /// - public class AppsCapacityQueryAdIncomeV1Response : ByteDanceMicroAppResponse + public class AppsCapacityQueryAdIncomeV1Response : DouyinMicroAppResponse { public static class Types { @@ -38,20 +38,6 @@ public class IncomeData } } - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_no")] - [System.Text.Json.Serialization.JsonPropertyName("err_no")] - public override long ErrorCode { get; set; } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_msg")] - [System.Text.Json.Serialization.JsonPropertyName("err_msg")] - public override string? ErrorMessage { get; set; } - /// /// 获取或设置返回数据。 /// diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/TrafficPermission/AppsCapacityQueryAdPlacementListV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/TrafficPermission/AppsCapacityQueryAdPlacementListV1Request.cs new file mode 100644 index 00000000..9d3304d1 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/TrafficPermission/AppsCapacityQueryAdPlacementListV1Request.cs @@ -0,0 +1,12 @@ +using System; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [GET] /apps/v1/capacity/query_ad_placement_list 接口的请求。 + /// + [Obsolete("相关接口或字段于 2024-02-29 下线。")] + public class AppsCapacityQueryAdPlacementListV1Request : DouyinMicroAppRequest + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/TrafficPermission/AppsCapacityQueryAdPlacementListV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/TrafficPermission/AppsCapacityQueryAdPlacementListV1Response.cs similarity index 81% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/TrafficPermission/AppsCapacityQueryAdPlacementListV1Response.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/TrafficPermission/AppsCapacityQueryAdPlacementListV1Response.cs index 6eef0ad4..248f758d 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/TrafficPermission/AppsCapacityQueryAdPlacementListV1Response.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/TrafficPermission/AppsCapacityQueryAdPlacementListV1Response.cs @@ -1,9 +1,12 @@ +using System; + namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models { /// /// 表示 [GET] /apps/v1/capacity/query_ad_placement_list 接口的响应。 /// - public class AppsCapacityQueryAdPlacementListV1Response : ByteDanceMicroAppResponse + [Obsolete("相关接口或字段于 2024-02-29 下线。")] + public class AppsCapacityQueryAdPlacementListV1Response : DouyinMicroAppResponse { public static class Types { @@ -52,20 +55,6 @@ public class AdPlacement } } - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_no")] - [System.Text.Json.Serialization.JsonPropertyName("err_no")] - public override long ErrorCode { get; set; } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_msg")] - [System.Text.Json.Serialization.JsonPropertyName("err_msg")] - public override string? ErrorMessage { get; set; } - /// /// 获取或设置返回数据。 /// diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/TrafficPermission/AppsCapacityQueryAdSettlementListV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/TrafficPermission/AppsCapacityQueryAdSettlementListV1Request.cs similarity index 88% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/TrafficPermission/AppsCapacityQueryAdSettlementListV1Request.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/TrafficPermission/AppsCapacityQueryAdSettlementListV1Request.cs index ee38f961..e87f5051 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/TrafficPermission/AppsCapacityQueryAdSettlementListV1Request.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/TrafficPermission/AppsCapacityQueryAdSettlementListV1Request.cs @@ -3,7 +3,7 @@ namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models /// /// 表示 [GET] /apps/v1/capacity/query_ad_settlement_list 接口的请求。 /// - public class AppsCapacityQueryAdSettlementListV1Request : ByteDanceMicroAppRequest + public class AppsCapacityQueryAdSettlementListV1Request : DouyinMicroAppRequest { /// /// 获取或设置结算周期字符串(格式:yyyy-MM)。 diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/TrafficPermission/AppsCapacityQueryAdSettlementListV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/TrafficPermission/AppsCapacityQueryAdSettlementListV1Response.cs similarity index 83% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/TrafficPermission/AppsCapacityQueryAdSettlementListV1Response.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/TrafficPermission/AppsCapacityQueryAdSettlementListV1Response.cs index 91329ed5..3353a171 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/TrafficPermission/AppsCapacityQueryAdSettlementListV1Response.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/TrafficPermission/AppsCapacityQueryAdSettlementListV1Response.cs @@ -3,7 +3,7 @@ namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models /// /// 表示 [GET] /apps/v1/capacity/query_ad_settlement_list 接口的响应。 /// - public class AppsCapacityQueryAdSettlementListV1Response : ByteDanceMicroAppResponse + public class AppsCapacityQueryAdSettlementListV1Response : DouyinMicroAppResponse { public static class Types { @@ -39,7 +39,7 @@ public class Settlement /// [Newtonsoft.Json.JsonProperty("tax_rate")] [System.Text.Json.Serialization.JsonPropertyName("tax_rate")] - public double TaxRate { get; set; } + public decimal TaxRate { get; set; } /// /// 获取或设置结算金额(单位:分)。 @@ -66,20 +66,6 @@ public class Settlement } } - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_no")] - [System.Text.Json.Serialization.JsonPropertyName("err_no")] - public override long ErrorCode { get; set; } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_msg")] - [System.Text.Json.Serialization.JsonPropertyName("err_msg")] - public override string? ErrorMessage { get; set; } - /// /// 获取或设置返回数据。 /// diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/TrafficPermission/AppsCapacityQueryTrafficPermissionStatusV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/TrafficPermission/AppsCapacityQueryTrafficPermissionStatusV1Request.cs new file mode 100644 index 00000000..86ef712c --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/TrafficPermission/AppsCapacityQueryTrafficPermissionStatusV1Request.cs @@ -0,0 +1,12 @@ +using System; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [GET] /apps/v1/capacity/query_traffic_permission_status 接口的请求。 + /// + [Obsolete("相关接口或字段于 2024-02-29 下线。")] + public class AppsCapacityQueryTrafficPermissionStatusV1Request : DouyinMicroAppRequest + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/TrafficPermission/AppsCapacityQueryTrafficPermissionStatusV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/TrafficPermission/AppsCapacityQueryTrafficPermissionStatusV1Response.cs new file mode 100644 index 00000000..bddb08e4 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/TrafficPermission/AppsCapacityQueryTrafficPermissionStatusV1Response.cs @@ -0,0 +1,40 @@ +using System; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [GET] /apps/v1/capacity/query_traffic_permission_status 接口的响应。 + /// + [Obsolete("相关接口或字段于 2024-02-29 下线。")] + public class AppsCapacityQueryTrafficPermissionStatusV1Response : DouyinMicroAppResponse + { + public static class Types + { + public class Data + { + /// + /// 获取或设置开通状态。 + /// + [Newtonsoft.Json.JsonProperty("status")] + [System.Text.Json.Serialization.JsonPropertyName("status")] + public int Status { get; set; } + + /// + /// 获取或设置是否可以开通。 + /// + [Newtonsoft.Json.JsonProperty("can_open")] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.NumericalBooleanConverter))] + [System.Text.Json.Serialization.JsonPropertyName("can_open")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalBooleanConverter))] + public bool CanOpen { get; set; } + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/TrafficPermission/AppsCapacityUpdateAdPlacementStatusV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/TrafficPermission/AppsCapacityUpdateAdPlacementStatusV1Request.cs similarity index 88% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/TrafficPermission/AppsCapacityUpdateAdPlacementStatusV1Request.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/TrafficPermission/AppsCapacityUpdateAdPlacementStatusV1Request.cs index c4e50e9c..6955b538 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Capacity/TrafficPermission/AppsCapacityUpdateAdPlacementStatusV1Request.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/TrafficPermission/AppsCapacityUpdateAdPlacementStatusV1Request.cs @@ -1,9 +1,12 @@ +using System; + namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models { /// /// 表示 [POST] /apps/v1/capacity/update_ad_placement_status 接口的请求。 /// - public class AppsCapacityUpdateAdPlacementStatusV1Request : ByteDanceMicroAppRequest + [Obsolete("相关接口或字段于 2024-02-29 下线。")] + public class AppsCapacityUpdateAdPlacementStatusV1Request : DouyinMicroAppRequest { /// /// 获取或设置广告位 ID。 diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/TrafficPermission/AppsCapacityUpdateAdPlacementStatusV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/TrafficPermission/AppsCapacityUpdateAdPlacementStatusV1Response.cs new file mode 100644 index 00000000..63e207b1 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Capacity/TrafficPermission/AppsCapacityUpdateAdPlacementStatusV1Response.cs @@ -0,0 +1,12 @@ +using System; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/v1/capacity/update_ad_placement_status 接口的响应。 + /// + [Obsolete("相关接口或字段于 2024-02-29 下线。")] + public class AppsCapacityUpdateAdPlacementStatusV1Response : DouyinMicroAppResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Censor/AppsCensorImageRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Censor/AppsCensorImageRequest.cs similarity index 83% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Censor/AppsCensorImageRequest.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Censor/AppsCensorImageRequest.cs index 50331589..799075c6 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Censor/AppsCensorImageRequest.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Censor/AppsCensorImageRequest.cs @@ -3,7 +3,7 @@ namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models /// /// 表示 [POST] /apps/censor/image 接口的请求。 /// - public class AppsCensorImageRequest : ByteDanceMicroAppRequest + public class AppsCensorImageRequest : DouyinMicroAppRequest { /// /// @@ -13,7 +13,7 @@ public class AppsCensorImageRequest : ByteDanceMicroAppRequest public override string? AccessToken { get; set; } /// - /// 获取或设置小程序的 AppId。如果不指定将使用构造 时的 参数。 + /// 获取或设置小程序 AppId。如果不指定将使用构造 时的 参数。 /// [Newtonsoft.Json.JsonProperty("app_id")] [System.Text.Json.Serialization.JsonPropertyName("app_id")] diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Censor/AppsCensorImageResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Censor/AppsCensorImageResponse.cs similarity index 87% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Censor/AppsCensorImageResponse.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Censor/AppsCensorImageResponse.cs index 1c760cd1..a3620811 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Censor/AppsCensorImageResponse.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Censor/AppsCensorImageResponse.cs @@ -3,7 +3,7 @@ namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models /// /// 表示 [POST] /apps/censor/image 接口的响应。 /// - public class AppsCensorImageResponse : ByteDanceMicroAppResponse + public class AppsCensorImageResponse : DouyinMicroAppResponse { public static class Types { @@ -25,16 +25,12 @@ public class Predict } } - /// /// - /// [Newtonsoft.Json.JsonProperty("error")] [System.Text.Json.Serialization.JsonPropertyName("error")] - public override long ErrorCode { get; set; } + public override int ErrorNumber { get; set; } - /// /// - /// [Newtonsoft.Json.JsonProperty("message")] [System.Text.Json.Serialization.JsonPropertyName("message")] public override string? ErrorMessage { get; set; } diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Chat/AppsChatCustomerServiceUrlRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Chat/AppsChatCustomerServiceUrlRequest.cs similarity index 82% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Chat/AppsChatCustomerServiceUrlRequest.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Chat/AppsChatCustomerServiceUrlRequest.cs index 57b745d5..479d9fa2 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Chat/AppsChatCustomerServiceUrlRequest.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Chat/AppsChatCustomerServiceUrlRequest.cs @@ -1,12 +1,15 @@ +using System; + namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models { /// /// 表示 [GET] /apps/chat/customer_service_url 接口的请求。 /// - public class AppsChatCustomerServiceUrlRequest : ByteDanceMicroAppRequest + [Obsolete("相关接口或字段于 2023-08-29 下线。")] + public class AppsChatCustomerServiceUrlRequest : DouyinMicroAppRequest { /// - /// 获取或设置小程序的 AppId。如果不指定将使用构造 时的 参数。 + /// 获取或设置小程序 AppId。如果不指定将使用构造 时的 参数。 /// [Newtonsoft.Json.JsonIgnore] [System.Text.Json.Serialization.JsonIgnore] diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Chat/AppsChatCustomerServiceUrlResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Chat/AppsChatCustomerServiceUrlResponse.cs new file mode 100644 index 00000000..15aba7a4 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Chat/AppsChatCustomerServiceUrlResponse.cs @@ -0,0 +1,31 @@ +using System; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [GET] /apps/chat/customer_service_url 接口的响应。 + /// + [Obsolete("相关接口或字段于 2023-08-29 下线。")] + public class AppsChatCustomerServiceUrlResponse : DouyinMicroAppResponse + { + public static class Types + { + public class Data + { + /// + /// 获取或设置客服链接。 + /// + [Newtonsoft.Json.JsonProperty("url")] + [System.Text.Json.Serialization.JsonPropertyName("url")] + public string Url { get; set; } = default!; + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/CustomerService/AppsCustomerServiceUrlRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/CustomerService/AppsCustomerServiceUrlRequest.cs similarity index 81% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/CustomerService/AppsCustomerServiceUrlRequest.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/CustomerService/AppsCustomerServiceUrlRequest.cs index b88572b4..37fd3393 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/CustomerService/AppsCustomerServiceUrlRequest.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/CustomerService/AppsCustomerServiceUrlRequest.cs @@ -3,10 +3,10 @@ namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models /// /// 表示 [GET] /apps/customer_service/url 接口的请求。 /// - public class AppsCustomerServiceUrlRequest : ByteDanceMicroAppRequest + public class AppsCustomerServiceUrlRequest : DouyinMicroAppRequest { /// - /// 获取或设置小程序的 AppId。如果不指定将使用构造 时的 参数。 + /// 获取或设置小程序 AppId。如果不指定将使用构造 时的 参数。 /// [Newtonsoft.Json.JsonIgnore] [System.Text.Json.Serialization.JsonIgnore] diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/CustomerService/AppsCustomerServiceUrlResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/CustomerService/AppsCustomerServiceUrlResponse.cs new file mode 100644 index 00000000..84e19c2c --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/CustomerService/AppsCustomerServiceUrlResponse.cs @@ -0,0 +1,28 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [GET] /apps/customer_service/url 接口的响应。 + /// + public class AppsCustomerServiceUrlResponse : DouyinMicroAppResponse + { + public static class Types + { + public class Data + { + /// + /// 获取或设置客服链接。 + /// + [Newtonsoft.Json.JsonProperty("url")] + [System.Text.Json.Serialization.JsonPropertyName("url")] + public string Url { get; set; } = default!; + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/DataAnalysis/TransactionAnalysis/AppsDataAnalysisQueryDealOverviewDataV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/DataAnalysis/TransactionAnalysis/AppsDataAnalysisQueryDealOverviewDataV1Request.cs similarity index 91% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/DataAnalysis/TransactionAnalysis/AppsDataAnalysisQueryDealOverviewDataV1Request.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/DataAnalysis/TransactionAnalysis/AppsDataAnalysisQueryDealOverviewDataV1Request.cs index a3adfb6e..c8f98884 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/DataAnalysis/TransactionAnalysis/AppsDataAnalysisQueryDealOverviewDataV1Request.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/DataAnalysis/TransactionAnalysis/AppsDataAnalysisQueryDealOverviewDataV1Request.cs @@ -1,9 +1,12 @@ +using System; + namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models { /// /// 表示 [GET] /apps/v1/data_analysis/query_deal_overview_data 接口的请求。 /// - public class AppsDataAnalysisQueryDealOverviewDataV1Request : ByteDanceMicroAppRequest + [Obsolete("相关接口或字段于 2024-02-02 下线。")] + public class AppsDataAnalysisQueryDealOverviewDataV1Request : DouyinMicroAppRequest { /// /// 获取或设置开始时间戳。 diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/DataAnalysis/TransactionAnalysis/AppsDataAnalysisQueryDealOverviewDataV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/DataAnalysis/TransactionAnalysis/AppsDataAnalysisQueryDealOverviewDataV1Response.cs similarity index 90% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/DataAnalysis/TransactionAnalysis/AppsDataAnalysisQueryDealOverviewDataV1Response.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/DataAnalysis/TransactionAnalysis/AppsDataAnalysisQueryDealOverviewDataV1Response.cs index 82df217a..99d045be 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/DataAnalysis/TransactionAnalysis/AppsDataAnalysisQueryDealOverviewDataV1Response.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/DataAnalysis/TransactionAnalysis/AppsDataAnalysisQueryDealOverviewDataV1Response.cs @@ -1,9 +1,12 @@ +using System; + namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models { /// /// 表示 [GET] /apps/v1/data_analysis/query_deal_overview_data 接口的响应。 /// - public class AppsDataAnalysisQueryDealOverviewDataV1Response : ByteDanceMicroAppResponse + [Obsolete("相关接口或字段于 2024-02-02 下线。")] + public class AppsDataAnalysisQueryDealOverviewDataV1Response : DouyinMicroAppResponse { public static class Types { @@ -90,20 +93,6 @@ public class DealData : DealOverviewData } } - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_no")] - [System.Text.Json.Serialization.JsonPropertyName("err_no")] - public override long ErrorCode { get; set; } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_msg")] - [System.Text.Json.Serialization.JsonPropertyName("err_msg")] - public override string? ErrorMessage { get; set; } - /// /// 获取或设置返回数据。 /// diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/DataAnalysis/TransactionAnalysis/AppsDataAnalysisQueryLiveDealDataV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/DataAnalysis/TransactionAnalysis/AppsDataAnalysisQueryLiveDealDataV1Request.cs new file mode 100644 index 00000000..d1f77d8b --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/DataAnalysis/TransactionAnalysis/AppsDataAnalysisQueryLiveDealDataV1Request.cs @@ -0,0 +1,18 @@ +using System; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [GET] /apps/v1/data_analysis/query_live_deal_data 接口的请求。 + /// + [Obsolete("相关接口或字段于 2024-02-02 下线。")] + public class AppsDataAnalysisQueryLiveDealDataV1Request : DouyinMicroAppRequest + { + /// + /// 获取或设置直播间 ID。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public long LiveRoomId { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/DataAnalysis/TransactionAnalysis/AppsDataAnalysisQueryLiveDealDataV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/DataAnalysis/TransactionAnalysis/AppsDataAnalysisQueryLiveDealDataV1Response.cs similarity index 90% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/DataAnalysis/TransactionAnalysis/AppsDataAnalysisQueryLiveDealDataV1Response.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/DataAnalysis/TransactionAnalysis/AppsDataAnalysisQueryLiveDealDataV1Response.cs index e6e346ec..f8e1ba21 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/DataAnalysis/TransactionAnalysis/AppsDataAnalysisQueryLiveDealDataV1Response.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/DataAnalysis/TransactionAnalysis/AppsDataAnalysisQueryLiveDealDataV1Response.cs @@ -1,9 +1,12 @@ +using System; + namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models { /// /// 表示 [GET] /apps/v1/data_analysis/query_live_deal_data 接口的响应。 /// - public class AppsDataAnalysisQueryLiveDealDataV1Response : ByteDanceMicroAppResponse + [Obsolete("相关接口或字段于 2024-02-02 下线。")] + public class AppsDataAnalysisQueryLiveDealDataV1Response : DouyinMicroAppResponse { public static class Types { @@ -104,20 +107,6 @@ public class LiveDealData : LiveDealOverviewData } } - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_no")] - [System.Text.Json.Serialization.JsonPropertyName("err_no")] - public override long ErrorCode { get; set; } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_msg")] - [System.Text.Json.Serialization.JsonPropertyName("err_msg")] - public override string? ErrorMessage { get; set; } - /// /// 获取或设置返回数据。 /// diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/DataAnalysis/TransactionAnalysis/AppsDataAnalysisQueryLiveRoomDataV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/DataAnalysis/TransactionAnalysis/AppsDataAnalysisQueryLiveRoomDataV1Request.cs new file mode 100644 index 00000000..a805d037 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/DataAnalysis/TransactionAnalysis/AppsDataAnalysisQueryLiveRoomDataV1Request.cs @@ -0,0 +1,18 @@ +using System; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [GET] /apps/v1/data_analysis/query_live_room_data 接口的请求。 + /// + [Obsolete("相关接口或字段于 2024-02-02 下线。")] + public class AppsDataAnalysisQueryLiveRoomDataV1Request : DouyinMicroAppRequest + { + /// + /// 获取或设置直播间 ID。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public long LiveRoomId { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/DataAnalysis/TransactionAnalysis/AppsDataAnalysisQueryLiveRoomDataV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/DataAnalysis/TransactionAnalysis/AppsDataAnalysisQueryLiveRoomDataV1Response.cs similarity index 90% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/DataAnalysis/TransactionAnalysis/AppsDataAnalysisQueryLiveRoomDataV1Response.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/DataAnalysis/TransactionAnalysis/AppsDataAnalysisQueryLiveRoomDataV1Response.cs index d3bf8a46..fde8b4b5 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/DataAnalysis/TransactionAnalysis/AppsDataAnalysisQueryLiveRoomDataV1Response.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/DataAnalysis/TransactionAnalysis/AppsDataAnalysisQueryLiveRoomDataV1Response.cs @@ -1,9 +1,12 @@ +using System; + namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models { /// /// 表示 [GET] /apps/v1/data_analysis/query_live_room_data 接口的响应。 /// - public class AppsDataAnalysisQueryLiveRoomDataV1Response : ByteDanceMicroAppResponse + [Obsolete("相关接口或字段于 2024-02-02 下线。")] + public class AppsDataAnalysisQueryLiveRoomDataV1Response : DouyinMicroAppResponse { public static class Types { @@ -32,7 +35,7 @@ public class LiveOverviewData /// [Newtonsoft.Json.JsonProperty("per_capita_time")] [System.Text.Json.Serialization.JsonPropertyName("per_capita_time")] - public double AudienceTimePerUser { get; set; } + public decimal AudienceTimePerUser { get; set; } /// /// 获取或设置新增粉丝数。 @@ -118,20 +121,6 @@ public class LiveData } } - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_no")] - [System.Text.Json.Serialization.JsonPropertyName("err_no")] - public override long ErrorCode { get; set; } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_msg")] - [System.Text.Json.Serialization.JsonPropertyName("err_msg")] - public override string? ErrorMessage { get; set; } - /// /// 获取或设置返回数据。 /// diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/DataAnalysis/TransactionAnalysis/AppsDataAnalysisQueryLiveRoomV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/DataAnalysis/TransactionAnalysis/AppsDataAnalysisQueryLiveRoomV1Request.cs new file mode 100644 index 00000000..c0d08d9a --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/DataAnalysis/TransactionAnalysis/AppsDataAnalysisQueryLiveRoomV1Request.cs @@ -0,0 +1,18 @@ +using System; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [GET] /apps/v1/data_analysis/query_live_room 接口的请求。 + /// + [Obsolete("相关接口或字段于 2024-02-02 下线。")] + public class AppsDataAnalysisQueryLiveRoomV1Request : DouyinMicroAppRequest + { + /// + /// 获取或设置主播昵称。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string? AnchorName { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/DataAnalysis/TransactionAnalysis/AppsDataAnalysisQueryLiveRoomV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/DataAnalysis/TransactionAnalysis/AppsDataAnalysisQueryLiveRoomV1Response.cs similarity index 83% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/DataAnalysis/TransactionAnalysis/AppsDataAnalysisQueryLiveRoomV1Response.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/DataAnalysis/TransactionAnalysis/AppsDataAnalysisQueryLiveRoomV1Response.cs index 8f1b1941..2548506a 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/DataAnalysis/TransactionAnalysis/AppsDataAnalysisQueryLiveRoomV1Response.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/DataAnalysis/TransactionAnalysis/AppsDataAnalysisQueryLiveRoomV1Response.cs @@ -1,9 +1,12 @@ +using System; + namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models { /// /// 表示 [GET] /apps/v1/data_analysis/query_live_room 接口的响应。 /// - public class AppsDataAnalysisQueryLiveRoomV1Response : ByteDanceMicroAppResponse + [Obsolete("相关接口或字段于 2024-02-02 下线。")] + public class AppsDataAnalysisQueryLiveRoomV1Response : DouyinMicroAppResponse { public static class Types { @@ -59,20 +62,6 @@ public class LiveRoom } } - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_no")] - [System.Text.Json.Serialization.JsonPropertyName("err_no")] - public override long ErrorCode { get; set; } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_msg")] - [System.Text.Json.Serialization.JsonPropertyName("err_msg")] - public override string? ErrorMessage { get; set; } - /// /// 获取或设置返回数据。 /// diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/DataAnalysis/TransactionAnalysis/AppsDataAnalysisQueryProductDealDataV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/DataAnalysis/TransactionAnalysis/AppsDataAnalysisQueryProductDealDataV1Request.cs similarity index 87% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/DataAnalysis/TransactionAnalysis/AppsDataAnalysisQueryProductDealDataV1Request.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/DataAnalysis/TransactionAnalysis/AppsDataAnalysisQueryProductDealDataV1Request.cs index fc05d1f2..618db882 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/DataAnalysis/TransactionAnalysis/AppsDataAnalysisQueryProductDealDataV1Request.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/DataAnalysis/TransactionAnalysis/AppsDataAnalysisQueryProductDealDataV1Request.cs @@ -1,9 +1,12 @@ +using System; + namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models { /// /// 表示 [GET] /apps/v1/data_analysis/query_product_deal_data 接口的请求。 /// - public class AppsDataAnalysisQueryProductDealDataV1Request : ByteDanceMicroAppRequest + [Obsolete("相关接口或字段于 2024-02-02 下线。")] + public class AppsDataAnalysisQueryProductDealDataV1Request : DouyinMicroAppRequest { /// /// 获取或设置开始时间戳。 @@ -32,7 +35,7 @@ public class AppsDataAnalysisQueryProductDealDataV1Request : ByteDanceMicroAppRe /// [Newtonsoft.Json.JsonIgnore] [System.Text.Json.Serialization.JsonIgnore] - public int Page { get; set; } = 1; + public int PageNumber { get; set; } = 1; /// /// 获取或设置分页每页页数。 @@ -40,6 +43,6 @@ public class AppsDataAnalysisQueryProductDealDataV1Request : ByteDanceMicroAppRe /// [Newtonsoft.Json.JsonIgnore] [System.Text.Json.Serialization.JsonIgnore] - public int Limit { get; set; } = 10; + public int PageSize { get; set; } = 10; } } diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/DataAnalysis/TransactionAnalysis/AppsDataAnalysisQueryProductDealDataV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/DataAnalysis/TransactionAnalysis/AppsDataAnalysisQueryProductDealDataV1Response.cs similarity index 86% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/DataAnalysis/TransactionAnalysis/AppsDataAnalysisQueryProductDealDataV1Response.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/DataAnalysis/TransactionAnalysis/AppsDataAnalysisQueryProductDealDataV1Response.cs index 6599e5a6..6b19f4c3 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/DataAnalysis/TransactionAnalysis/AppsDataAnalysisQueryProductDealDataV1Response.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/DataAnalysis/TransactionAnalysis/AppsDataAnalysisQueryProductDealDataV1Response.cs @@ -1,9 +1,12 @@ +using System; + namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models { /// /// 表示 [GET] /apps/v1/data_analysis/query_product_deal_data 接口的响应。 /// - public class AppsDataAnalysisQueryProductDealDataV1Response : ByteDanceMicroAppResponse + [Obsolete("相关接口或字段于 2024-02-02 下线。")] + public class AppsDataAnalysisQueryProductDealDataV1Response : DouyinMicroAppResponse { public static class Types { @@ -67,20 +70,6 @@ public class ProductDealData } } - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_no")] - [System.Text.Json.Serialization.JsonPropertyName("err_no")] - public override long ErrorCode { get; set; } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_msg")] - [System.Text.Json.Serialization.JsonPropertyName("err_msg")] - public override string? ErrorMessage { get; set; } - /// /// 获取或设置返回数据。 /// diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/DataAnalysis/TransactionAnalysis/AppsDataAnalysisQueryVideoDealDataV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/DataAnalysis/TransactionAnalysis/AppsDataAnalysisQueryVideoDealDataV1Request.cs similarity index 84% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/DataAnalysis/TransactionAnalysis/AppsDataAnalysisQueryVideoDealDataV1Request.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/DataAnalysis/TransactionAnalysis/AppsDataAnalysisQueryVideoDealDataV1Request.cs index a08a8d16..965d0d0e 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/DataAnalysis/TransactionAnalysis/AppsDataAnalysisQueryVideoDealDataV1Request.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/DataAnalysis/TransactionAnalysis/AppsDataAnalysisQueryVideoDealDataV1Request.cs @@ -1,9 +1,12 @@ +using System; + namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models { /// /// 表示 [GET] /apps/v1/data_analysis/query_video_deal_data 接口的请求。 /// - public class AppsDataAnalysisQueryVideoDealDataV1Request : ByteDanceMicroAppRequest + [Obsolete("相关接口或字段于 2024-02-02 下线。")] + public class AppsDataAnalysisQueryVideoDealDataV1Request : DouyinMicroAppRequest { /// /// 获取或设置开始时间戳。 diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/DataAnalysis/TransactionAnalysis/AppsDataAnalysisQueryVideoDealDataV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/DataAnalysis/TransactionAnalysis/AppsDataAnalysisQueryVideoDealDataV1Response.cs similarity index 88% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/DataAnalysis/TransactionAnalysis/AppsDataAnalysisQueryVideoDealDataV1Response.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/DataAnalysis/TransactionAnalysis/AppsDataAnalysisQueryVideoDealDataV1Response.cs index f4d42317..76137766 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/DataAnalysis/TransactionAnalysis/AppsDataAnalysisQueryVideoDealDataV1Response.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/DataAnalysis/TransactionAnalysis/AppsDataAnalysisQueryVideoDealDataV1Response.cs @@ -1,9 +1,12 @@ +using System; + namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models { /// /// 表示 [GET] /apps/v1/data_analysis/query_video_deal_data 接口的响应。 /// - public class AppsDataAnalysisQueryVideoDealDataV1Response : ByteDanceMicroAppResponse + [Obsolete("相关接口或字段于 2024-02-02 下线。")] + public class AppsDataAnalysisQueryVideoDealDataV1Response : DouyinMicroAppResponse { public static class Types { @@ -76,20 +79,6 @@ public class VideoDealData : VideoDealOverviewData } } - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_no")] - [System.Text.Json.Serialization.JsonPropertyName("err_no")] - public override long ErrorCode { get; set; } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_msg")] - [System.Text.Json.Serialization.JsonPropertyName("err_msg")] - public override string? ErrorMessage { get; set; } - /// /// 获取或设置返回数据。 /// diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/DataAnalysis/UserAnalysis/AppsDataAnalysisQueryBehaviorDataV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/DataAnalysis/UserAnalysis/AppsDataAnalysisQueryBehaviorDataV1Request.cs similarity index 89% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/DataAnalysis/UserAnalysis/AppsDataAnalysisQueryBehaviorDataV1Request.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/DataAnalysis/UserAnalysis/AppsDataAnalysisQueryBehaviorDataV1Request.cs index 7653cae7..34018fa7 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/DataAnalysis/UserAnalysis/AppsDataAnalysisQueryBehaviorDataV1Request.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/DataAnalysis/UserAnalysis/AppsDataAnalysisQueryBehaviorDataV1Request.cs @@ -1,9 +1,12 @@ +using System; + namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models { /// /// 表示 [GET] /apps/v1/data_analysis/query_behavior_data 接口的请求。 /// - public class AppsDataAnalysisQueryBehaviorDataV1Request : ByteDanceMicroAppRequest + [Obsolete("相关接口或字段于 2024-02-02 下线。")] + public class AppsDataAnalysisQueryBehaviorDataV1Request : DouyinMicroAppRequest { /// /// 获取或设置开始时间戳。 diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/DataAnalysis/UserAnalysis/AppsDataAnalysisQueryBehaviorDataV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/DataAnalysis/UserAnalysis/AppsDataAnalysisQueryBehaviorDataV1Response.cs similarity index 85% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/DataAnalysis/UserAnalysis/AppsDataAnalysisQueryBehaviorDataV1Response.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/DataAnalysis/UserAnalysis/AppsDataAnalysisQueryBehaviorDataV1Response.cs index 5db4106b..af54c71d 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/DataAnalysis/UserAnalysis/AppsDataAnalysisQueryBehaviorDataV1Response.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/DataAnalysis/UserAnalysis/AppsDataAnalysisQueryBehaviorDataV1Response.cs @@ -1,9 +1,12 @@ +using System; + namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models { /// /// 表示 [GET] /apps/v1/data_analysis/query_behavior_data 接口的响应。 /// - public class AppsDataAnalysisQueryBehaviorDataV1Response : ByteDanceMicroAppResponse + [Obsolete("相关接口或字段于 2024-02-02 下线。")] + public class AppsDataAnalysisQueryBehaviorDataV1Response : DouyinMicroAppResponse { public static class Types { @@ -67,21 +70,21 @@ public class BehaviorData /// [Newtonsoft.Json.JsonProperty("per_user_open_time")] [System.Text.Json.Serialization.JsonPropertyName("per_user_open_time")] - public double OpenTimesPerUser { get; set; } + public decimal OpenTimesPerUser { get; set; } /// /// 获取或设置人均停留时长(单位:毫秒)。 /// [Newtonsoft.Json.JsonProperty("per_user_stay_time")] [System.Text.Json.Serialization.JsonPropertyName("per_user_stay_time")] - public double StayTimePerUser { get; set; } + public decimal StayTimePerUser { get; set; } /// /// 获取或设置次均停留时长(单位:毫秒)。 /// [Newtonsoft.Json.JsonProperty("avg_stay_time")] [System.Text.Json.Serialization.JsonPropertyName("avg_stay_time")] - public double AverageStayTime { get; set; } + public decimal AverageStayTime { get; set; } } } @@ -94,20 +97,6 @@ public class BehaviorData } } - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_no")] - [System.Text.Json.Serialization.JsonPropertyName("err_no")] - public override long ErrorCode { get; set; } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_msg")] - [System.Text.Json.Serialization.JsonPropertyName("err_msg")] - public override string? ErrorMessage { get; set; } - /// /// 获取或设置返回数据。 /// diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/DataAnalysis/UserAnalysis/AppsDataAnalysisQueryClientDataV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/DataAnalysis/UserAnalysis/AppsDataAnalysisQueryClientDataV1Request.cs similarity index 89% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/DataAnalysis/UserAnalysis/AppsDataAnalysisQueryClientDataV1Request.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/DataAnalysis/UserAnalysis/AppsDataAnalysisQueryClientDataV1Request.cs index 764e83d7..f53735b8 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/DataAnalysis/UserAnalysis/AppsDataAnalysisQueryClientDataV1Request.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/DataAnalysis/UserAnalysis/AppsDataAnalysisQueryClientDataV1Request.cs @@ -1,9 +1,12 @@ +using System; + namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models { /// /// 表示 [GET] /apps/v1/data_analysis/query_client_data 接口的请求。 /// - public class AppsDataAnalysisQueryClientDataV1Request : ByteDanceMicroAppRequest + [Obsolete("相关接口或字段于 2024-02-02 下线。")] + public class AppsDataAnalysisQueryClientDataV1Request : DouyinMicroAppRequest { /// /// 获取或设置开始时间戳。 diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/DataAnalysis/UserAnalysis/AppsDataAnalysisQueryClientDataV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/DataAnalysis/UserAnalysis/AppsDataAnalysisQueryClientDataV1Response.cs similarity index 83% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/DataAnalysis/UserAnalysis/AppsDataAnalysisQueryClientDataV1Response.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/DataAnalysis/UserAnalysis/AppsDataAnalysisQueryClientDataV1Response.cs index 08a1fb3d..a4e115a6 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/DataAnalysis/UserAnalysis/AppsDataAnalysisQueryClientDataV1Response.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/DataAnalysis/UserAnalysis/AppsDataAnalysisQueryClientDataV1Response.cs @@ -1,9 +1,12 @@ +using System; + namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models { /// /// 表示 [GET] /apps/v1/data_analysis/query_client_data 接口的响应。 /// - public class AppsDataAnalysisQueryClientDataV1Response : ByteDanceMicroAppResponse + [Obsolete("相关接口或字段于 2024-02-02 下线。")] + public class AppsDataAnalysisQueryClientDataV1Response : DouyinMicroAppResponse { public static class Types { @@ -59,20 +62,6 @@ public class ClientData } } - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_no")] - [System.Text.Json.Serialization.JsonPropertyName("err_no")] - public override long ErrorCode { get; set; } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_msg")] - [System.Text.Json.Serialization.JsonPropertyName("err_msg")] - public override string? ErrorMessage { get; set; } - /// /// 获取或设置返回数据。 /// diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/DataAnalysis/UserAnalysis/AppsDataAnalysisQueryPageDataV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/DataAnalysis/UserAnalysis/AppsDataAnalysisQueryPageDataV1Request.cs similarity index 89% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/DataAnalysis/UserAnalysis/AppsDataAnalysisQueryPageDataV1Request.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/DataAnalysis/UserAnalysis/AppsDataAnalysisQueryPageDataV1Request.cs index 726145f8..6263ba95 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/DataAnalysis/UserAnalysis/AppsDataAnalysisQueryPageDataV1Request.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/DataAnalysis/UserAnalysis/AppsDataAnalysisQueryPageDataV1Request.cs @@ -1,9 +1,12 @@ +using System; + namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models { /// /// 表示 [GET] /apps/v1/data_analysis/query_page_data 接口的请求。 /// - public class AppsDataAnalysisQueryPageDataV1Request : ByteDanceMicroAppRequest + [Obsolete("相关接口或字段于 2024-02-02 下线。")] + public class AppsDataAnalysisQueryPageDataV1Request : DouyinMicroAppRequest { /// /// 获取或设置开始时间戳。 diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/DataAnalysis/UserAnalysis/AppsDataAnalysisQueryPageDataV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/DataAnalysis/UserAnalysis/AppsDataAnalysisQueryPageDataV1Response.cs similarity index 81% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/DataAnalysis/UserAnalysis/AppsDataAnalysisQueryPageDataV1Response.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/DataAnalysis/UserAnalysis/AppsDataAnalysisQueryPageDataV1Response.cs index f82e64af..6590bafa 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/DataAnalysis/UserAnalysis/AppsDataAnalysisQueryPageDataV1Response.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/DataAnalysis/UserAnalysis/AppsDataAnalysisQueryPageDataV1Response.cs @@ -1,9 +1,12 @@ +using System; + namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models { /// /// 表示 [GET] /apps/v1/data_analysis/query_page_data 接口的响应。 /// - public class AppsDataAnalysisQueryPageDataV1Response : ByteDanceMicroAppResponse + [Obsolete("相关接口或字段于 2024-02-02 下线。")] + public class AppsDataAnalysisQueryPageDataV1Response : DouyinMicroAppResponse { public static class Types { @@ -39,7 +42,7 @@ public class PageData /// [Newtonsoft.Json.JsonProperty("page_avg_stay_time")] [System.Text.Json.Serialization.JsonPropertyName("page_avg_stay_time")] - public double AverageStayTime { get; set; } + public decimal AverageStayTime { get; set; } /// /// 获取或设置分享次数。 @@ -59,20 +62,6 @@ public class PageData } } - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_no")] - [System.Text.Json.Serialization.JsonPropertyName("err_no")] - public override long ErrorCode { get; set; } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_msg")] - [System.Text.Json.Serialization.JsonPropertyName("err_msg")] - public override string? ErrorMessage { get; set; } - /// /// 获取或设置返回数据。 /// diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/DataAnalysis/UserAnalysis/AppsDataAnalysisQueryRealTimeUserDataV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/DataAnalysis/UserAnalysis/AppsDataAnalysisQueryRealTimeUserDataV1Request.cs similarity index 87% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/DataAnalysis/UserAnalysis/AppsDataAnalysisQueryRealTimeUserDataV1Request.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/DataAnalysis/UserAnalysis/AppsDataAnalysisQueryRealTimeUserDataV1Request.cs index eab6388c..a160889a 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/DataAnalysis/UserAnalysis/AppsDataAnalysisQueryRealTimeUserDataV1Request.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/DataAnalysis/UserAnalysis/AppsDataAnalysisQueryRealTimeUserDataV1Request.cs @@ -1,9 +1,12 @@ +using System; + namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models { /// /// 表示 [GET] /apps/v1/data_analysis/query_real_time_user_data 接口的请求。 /// - public class AppsDataAnalysisQueryRealTimeUserDataV1Request : ByteDanceMicroAppRequest + [Obsolete("相关接口或字段于 2024-02-02 下线。")] + public class AppsDataAnalysisQueryRealTimeUserDataV1Request : DouyinMicroAppRequest { /// /// 获取或设置宿主名称。 diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/DataAnalysis/UserAnalysis/AppsDataAnalysisQueryRealTimeUserDataV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/DataAnalysis/UserAnalysis/AppsDataAnalysisQueryRealTimeUserDataV1Response.cs similarity index 81% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/DataAnalysis/UserAnalysis/AppsDataAnalysisQueryRealTimeUserDataV1Response.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/DataAnalysis/UserAnalysis/AppsDataAnalysisQueryRealTimeUserDataV1Response.cs index 23377eec..6d66a54c 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/DataAnalysis/UserAnalysis/AppsDataAnalysisQueryRealTimeUserDataV1Response.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/DataAnalysis/UserAnalysis/AppsDataAnalysisQueryRealTimeUserDataV1Response.cs @@ -1,9 +1,12 @@ +using System; + namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models { /// /// 表示 [GET] /apps/v1/data_analysis/query_real_time_user_data 接口的响应。 /// - public class AppsDataAnalysisQueryRealTimeUserDataV1Response : ByteDanceMicroAppResponse + [Obsolete("相关接口或字段于 2024-02-02 下线。")] + public class AppsDataAnalysisQueryRealTimeUserDataV1Response : DouyinMicroAppResponse { public static class Types { @@ -45,20 +48,6 @@ public class BehaviorData } } - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_no")] - [System.Text.Json.Serialization.JsonPropertyName("err_no")] - public override long ErrorCode { get; set; } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_msg")] - [System.Text.Json.Serialization.JsonPropertyName("err_msg")] - public override string? ErrorMessage { get; set; } - /// /// 获取或设置返回数据。 /// diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/DataAnalysis/UserAnalysis/AppsDataAnalysisQueryRetentionDataV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/DataAnalysis/UserAnalysis/AppsDataAnalysisQueryRetentionDataV1Request.cs similarity index 90% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/DataAnalysis/UserAnalysis/AppsDataAnalysisQueryRetentionDataV1Request.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/DataAnalysis/UserAnalysis/AppsDataAnalysisQueryRetentionDataV1Request.cs index cfadbc0b..112227f3 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/DataAnalysis/UserAnalysis/AppsDataAnalysisQueryRetentionDataV1Request.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/DataAnalysis/UserAnalysis/AppsDataAnalysisQueryRetentionDataV1Request.cs @@ -1,9 +1,12 @@ +using System; + namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models { /// /// 表示 [GET] /apps/v1/data_analysis/query_retention_data 接口的请求。 /// - public class AppsDataAnalysisQueryRetentionDataV1Request : ByteDanceMicroAppRequest + [Obsolete("相关接口或字段于 2024-02-02 下线。")] + public class AppsDataAnalysisQueryRetentionDataV1Request : DouyinMicroAppRequest { /// /// 获取或设置开始时间戳。 diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/DataAnalysis/UserAnalysis/AppsDataAnalysisQueryRetentionDataV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/DataAnalysis/UserAnalysis/AppsDataAnalysisQueryRetentionDataV1Response.cs similarity index 84% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/DataAnalysis/UserAnalysis/AppsDataAnalysisQueryRetentionDataV1Response.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/DataAnalysis/UserAnalysis/AppsDataAnalysisQueryRetentionDataV1Response.cs index f05480b0..ad5da9b6 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/DataAnalysis/UserAnalysis/AppsDataAnalysisQueryRetentionDataV1Response.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/DataAnalysis/UserAnalysis/AppsDataAnalysisQueryRetentionDataV1Response.cs @@ -1,9 +1,12 @@ +using System; + namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models { /// /// 表示 [GET] /apps/v1/data_analysis/query_retention_data 接口的响应。 /// - public class AppsDataAnalysisQueryRetentionDataV1Response : ByteDanceMicroAppResponse + [Obsolete("相关接口或字段于 2024-02-02 下线。")] + public class AppsDataAnalysisQueryRetentionDataV1Response : DouyinMicroAppResponse { public static class Types { @@ -29,7 +32,7 @@ public class RetentionRate /// [Newtonsoft.Json.JsonProperty("rate")] [System.Text.Json.Serialization.JsonPropertyName("rate")] - public double Rate { get; set; } + public decimal Rate { get; set; } } } @@ -65,20 +68,6 @@ public class RetentionRate } } - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_no")] - [System.Text.Json.Serialization.JsonPropertyName("err_no")] - public override long ErrorCode { get; set; } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_msg")] - [System.Text.Json.Serialization.JsonPropertyName("err_msg")] - public override string? ErrorMessage { get; set; } - /// /// 获取或设置返回数据。 /// diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/DataAnalysis/UserAnalysis/AppsDataAnalysisQuerySceneDataV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/DataAnalysis/UserAnalysis/AppsDataAnalysisQuerySceneDataV1Request.cs similarity index 87% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/DataAnalysis/UserAnalysis/AppsDataAnalysisQuerySceneDataV1Request.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/DataAnalysis/UserAnalysis/AppsDataAnalysisQuerySceneDataV1Request.cs index 9d27966a..682c66c9 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/DataAnalysis/UserAnalysis/AppsDataAnalysisQuerySceneDataV1Request.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/DataAnalysis/UserAnalysis/AppsDataAnalysisQuerySceneDataV1Request.cs @@ -1,9 +1,12 @@ +using System; + namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models { /// /// 表示 [GET] /apps/v1/data_analysis/query_scene_data 接口的请求。 /// - public class AppsDataAnalysisQuerySceneDataV1Request : ByteDanceMicroAppRequest + [Obsolete("相关接口或字段于 2024-02-02 下线。")] + public class AppsDataAnalysisQuerySceneDataV1Request : DouyinMicroAppRequest { /// /// 获取或设置开始时间戳。 diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/DataAnalysis/UserAnalysis/AppsDataAnalysisQuerySceneDataV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/DataAnalysis/UserAnalysis/AppsDataAnalysisQuerySceneDataV1Response.cs similarity index 94% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/DataAnalysis/UserAnalysis/AppsDataAnalysisQuerySceneDataV1Response.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/DataAnalysis/UserAnalysis/AppsDataAnalysisQuerySceneDataV1Response.cs index a3c95460..1c06c18a 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/DataAnalysis/UserAnalysis/AppsDataAnalysisQuerySceneDataV1Response.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/DataAnalysis/UserAnalysis/AppsDataAnalysisQuerySceneDataV1Response.cs @@ -1,9 +1,12 @@ +using System; + namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models { /// /// 表示 [GET] /apps/v1/data_analysis/query_scene_data 接口的响应。 /// - public class AppsDataAnalysisQuerySceneDataV1Response : ByteDanceMicroAppResponse + [Obsolete("相关接口或字段于 2024-02-02 下线。")] + public class AppsDataAnalysisQuerySceneDataV1Response : DouyinMicroAppResponse { public static class Types { @@ -36,7 +39,7 @@ public class SceneAverageStayTimeData /// [Newtonsoft.Json.JsonProperty("scene_avg_stay_time")] [System.Text.Json.Serialization.JsonPropertyName("scene_avg_stay_time")] - public double AverageStayTime { get; set; } + public decimal AverageStayTime { get; set; } } public class SceneUVData @@ -155,7 +158,7 @@ public class ScenePVData /// [Newtonsoft.Json.JsonProperty("scene_avg_stay_time")] [System.Text.Json.Serialization.JsonPropertyName("scene_avg_stay_time")] - public double AverageStayTime { get; set; } + public decimal AverageStayTime { get; set; } /// /// 获取或设置次均停留时长数据列表。 @@ -232,20 +235,6 @@ public class ScenePVData } } - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_no")] - [System.Text.Json.Serialization.JsonPropertyName("err_no")] - public override long ErrorCode { get; set; } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_msg")] - [System.Text.Json.Serialization.JsonPropertyName("err_msg")] - public override string? ErrorMessage { get; set; } - /// /// 获取或设置返回数据。 /// diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/DataAnalysis/UserAnalysis/AppsDataAnalysisQueryUserPortraitDataV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/DataAnalysis/UserAnalysis/AppsDataAnalysisQueryUserPortraitDataV1Request.cs similarity index 93% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/DataAnalysis/UserAnalysis/AppsDataAnalysisQueryUserPortraitDataV1Request.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/DataAnalysis/UserAnalysis/AppsDataAnalysisQueryUserPortraitDataV1Request.cs index 73125f6b..987cabf0 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/DataAnalysis/UserAnalysis/AppsDataAnalysisQueryUserPortraitDataV1Request.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/DataAnalysis/UserAnalysis/AppsDataAnalysisQueryUserPortraitDataV1Request.cs @@ -1,9 +1,12 @@ +using System; + namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models { /// /// 表示 [GET] /apps/v1/data_analysis/query_user_portrait_data 接口的请求。 /// - public class AppsDataAnalysisQueryUserPortraitDataV1Request : ByteDanceMicroAppRequest + [Obsolete("相关接口或字段于 2024-02-02 下线。")] + public class AppsDataAnalysisQueryUserPortraitDataV1Request : DouyinMicroAppRequest { /// /// 获取或设置开始时间戳。 diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/DataAnalysis/UserAnalysis/AppsDataAnalysisQueryUserPortraitDataV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/DataAnalysis/UserAnalysis/AppsDataAnalysisQueryUserPortraitDataV1Response.cs similarity index 86% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/DataAnalysis/UserAnalysis/AppsDataAnalysisQueryUserPortraitDataV1Response.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/DataAnalysis/UserAnalysis/AppsDataAnalysisQueryUserPortraitDataV1Response.cs index 77ee598b..6c454aae 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/DataAnalysis/UserAnalysis/AppsDataAnalysisQueryUserPortraitDataV1Response.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/DataAnalysis/UserAnalysis/AppsDataAnalysisQueryUserPortraitDataV1Response.cs @@ -1,9 +1,12 @@ +using System; + namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models { /// /// 表示 [GET] /apps/v1/data_analysis/query_user_portrait_data 接口的响应。 /// - public class AppsDataAnalysisQueryUserPortraitDataV1Response : ByteDanceMicroAppResponse + [Obsolete("相关接口或字段于 2024-02-02 下线。")] + public class AppsDataAnalysisQueryUserPortraitDataV1Response : DouyinMicroAppResponse { public static class Types { @@ -66,20 +69,6 @@ public class UserPortraitData } } - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_no")] - [System.Text.Json.Serialization.JsonPropertyName("err_no")] - public override long ErrorCode { get; set; } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_msg")] - [System.Text.Json.Serialization.JsonPropertyName("err_msg")] - public override string? ErrorMessage { get; set; } - /// /// 获取或设置返回数据。 /// diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Live/AppsLiveSetBlackWhiteListV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Live/AppsLiveSetBlackWhiteListV1Request.cs similarity index 77% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Live/AppsLiveSetBlackWhiteListV1Request.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Live/AppsLiveSetBlackWhiteListV1Request.cs index 1207dd5f..816daf6e 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Live/AppsLiveSetBlackWhiteListV1Request.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Live/AppsLiveSetBlackWhiteListV1Request.cs @@ -3,10 +3,10 @@ namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models /// /// 表示 [POST] /apps/v1/live/set_black_white_list 接口的请求。 /// - public class AppsLiveSetBlackWhiteListV1Request : ByteDanceMicroAppRequest + public class AppsLiveSetBlackWhiteListV1Request : DouyinMicroAppRequest { /// - /// 获取或设置小程序的 AppId。如果不指定将使用构造 时的 参数。 + /// 获取或设置小程序 AppId。如果不指定将使用构造 时的 参数。 /// [Newtonsoft.Json.JsonProperty("app_id")] [System.Text.Json.Serialization.JsonPropertyName("app_id")] diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Live/AppsLiveSetBlackWhiteListV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Live/AppsLiveSetBlackWhiteListV1Response.cs new file mode 100644 index 00000000..5b41f65f --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Live/AppsLiveSetBlackWhiteListV1Response.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/v1/live/set_black_white_list 接口的响应。 + /// + public class AppsLiveSetBlackWhiteListV1Response : DouyinMicroAppResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Live/AppsUploadLiveImageRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Live/AppsUploadLiveImageRequest.cs new file mode 100644 index 00000000..150174e4 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Live/AppsUploadLiveImageRequest.cs @@ -0,0 +1,59 @@ +using System; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/upload_live_image 接口的请求。 + /// + public class AppsUploadLiveImageRequest : DouyinMicroAppRequest + { + /// + /// 获取或设置小程序 AppId。如果不指定将使用构造 时的 参数。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string? AppId { get; set; } + + /// + /// 获取或设置跳转的页面。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string PagePath { get; set; } = string.Empty; + + /// + /// 获取或设置标题。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string Title { get; set; } = string.Empty; + + /// + /// 获取或设置直播间 ID。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public int? RoomId { get; set; } + + /// + /// 获取或设置封面图片文件字节数组。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public byte[] ImageFileBytes { get; set; } = Array.Empty(); + + /// + /// 获取或设置封面图片文件名。如果不指定将由系统自动生成。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string? ImageFileName { get; set; } + + /// + /// 获取或设置封面图片文件 MIME 类型。如果不指定将由系统自动生成。 + /// + [Newtonsoft.Json.JsonIgnore] + [System.Text.Json.Serialization.JsonIgnore] + public string? ImageFileContentType { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Live/AppsUploadLiveImageResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Live/AppsUploadLiveImageResponse.cs new file mode 100644 index 00000000..d38cf4d7 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Live/AppsUploadLiveImageResponse.cs @@ -0,0 +1,36 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/upload_live_image 接口的响应。 + /// + public class AppsUploadLiveImageResponse : DouyinMicroAppResponse + { + /// + /// 获取或设置会话密钥。 + /// + [Newtonsoft.Json.JsonProperty("session_key")] + [System.Text.Json.Serialization.JsonPropertyName("session_key")] + public string? SessionKey { get; set; } + + /// + /// 获取或设置用户的 OpenId。 + /// + [Newtonsoft.Json.JsonProperty("openid")] + [System.Text.Json.Serialization.JsonPropertyName("openid")] + public string? OpenId { get; set; } + + /// + /// 获取或设置匿名用户的 OpenId。 + /// + [Newtonsoft.Json.JsonProperty("anonymous_openid")] + [System.Text.Json.Serialization.JsonPropertyName("anonymous_openid")] + public string? AnonymousOpenId { get; set; } + + /// + /// 获取或设置用户的 UnionId。 + /// + [Newtonsoft.Json.JsonProperty("unionid")] + [System.Text.Json.Serialization.JsonPropertyName("unionid")] + public string? UnionId { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Message/AppsMessageCustomSendRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Message/AppsMessageCustomSendRequest.cs similarity index 94% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Message/AppsMessageCustomSendRequest.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Message/AppsMessageCustomSendRequest.cs index 149addc5..c06b1df7 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Message/AppsMessageCustomSendRequest.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Message/AppsMessageCustomSendRequest.cs @@ -3,7 +3,7 @@ /// /// 表示 [POST] /apps/message/custom/send 接口的请求。 /// - public class AppsMessageCustomSendRequest : ByteDanceMicroAppRequest + public class AppsMessageCustomSendRequest : DouyinMicroAppRequest { /// /// 获取或设置用户的 OpenId。 diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Message/AppsMessageCustomSendResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Message/AppsMessageCustomSendResponse.cs new file mode 100644 index 00000000..b0e985d7 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Message/AppsMessageCustomSendResponse.cs @@ -0,0 +1,9 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/message/custom/send 接口的响应。 + /// + public class AppsMessageCustomSendResponse : DouyinMicroAppResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Order/AppsOrderDeleteRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Order/AppsOrderDeleteRequest.cs similarity index 91% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Order/AppsOrderDeleteRequest.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Order/AppsOrderDeleteRequest.cs index 60c6a11c..eb5607dd 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Order/AppsOrderDeleteRequest.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Order/AppsOrderDeleteRequest.cs @@ -3,11 +3,9 @@ namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models /// /// 表示 [POST] /apps/order/delete 接口的请求。 /// - public class AppsOrderDeleteRequest : ByteDanceMicroAppRequest + public class AppsOrderDeleteRequest : DouyinMicroAppRequest { - /// /// - /// [Newtonsoft.Json.JsonProperty("access_token")] [System.Text.Json.Serialization.JsonPropertyName("access_token")] public override string? AccessToken { get; set; } diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Order/AppsOrderDeleteResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Order/AppsOrderDeleteResponse.cs new file mode 100644 index 00000000..53155c42 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Order/AppsOrderDeleteResponse.cs @@ -0,0 +1,27 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/order/delete 接口的响应。 + /// + public class AppsOrderDeleteResponse : DouyinMicroAppResponse + { + /// + /// 获取或设置错误码。 + /// + [Newtonsoft.Json.JsonProperty("err_code")] + [System.Text.Json.Serialization.JsonPropertyName("err_code")] + public int ErrorCode { get; set; } + + /// + /// 获取或设置 JSON 格式的生活服务关联业务推送结果与业务信息。 + /// + [Newtonsoft.Json.JsonProperty("body")] + [System.Text.Json.Serialization.JsonPropertyName("body")] + public string? DataJson { get; set; } + + public override bool IsSuccessful() + { + return base.IsSuccessful() && ErrorCode == 0; + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Order/AppsOrderPushV2Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Order/AppsOrderPushV2Request.cs similarity index 97% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Order/AppsOrderPushV2Request.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Order/AppsOrderPushV2Request.cs index 3bcafff6..1fdf1c38 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Order/AppsOrderPushV2Request.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Order/AppsOrderPushV2Request.cs @@ -3,7 +3,7 @@ namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models /// /// 表示 [POST] /apps/order/v2/push 接口的请求。 /// - public class AppsOrderPushV2Request : ByteDanceMicroAppRequest + public class AppsOrderPushV2Request : DouyinMicroAppRequest { public static class Types { @@ -25,9 +25,7 @@ public class KeyValue } } - /// /// - /// [Newtonsoft.Json.JsonProperty("access_token")] [System.Text.Json.Serialization.JsonPropertyName("access_token")] public override string? AccessToken { get; set; } diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Order/AppsOrderPushV2Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Order/AppsOrderPushV2Response.cs new file mode 100644 index 00000000..1b9c8f08 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Order/AppsOrderPushV2Response.cs @@ -0,0 +1,27 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/order/v2/push 接口的响应。 + /// + public class AppsOrderPushV2Response : DouyinMicroAppResponse + { + /// + /// 获取或设置错误码。 + /// + [Newtonsoft.Json.JsonProperty("err_code")] + [System.Text.Json.Serialization.JsonPropertyName("err_code")] + public int ErrorCode { get; set; } + + /// + /// 获取或设置 JSON 格式的生活服务关联业务推送结果与业务信息。 + /// + [Newtonsoft.Json.JsonProperty("body")] + [System.Text.Json.Serialization.JsonPropertyName("body")] + public string? DataJson { get; set; } + + public override bool IsSuccessful() + { + return base.IsSuccessful() && ErrorCode == 0; + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Qrcode/AppsQrcodeRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Qrcode/AppsQrcodeRequest.cs similarity index 96% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Qrcode/AppsQrcodeRequest.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Qrcode/AppsQrcodeRequest.cs index 444ad79c..acb7ab1b 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/Qrcode/AppsQrcodeRequest.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Qrcode/AppsQrcodeRequest.cs @@ -3,7 +3,7 @@ namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models /// /// 表示 [POST] /apps/qrcode 接口的请求。 /// - public class AppsQrcodeRequest : ByteDanceMicroAppRequest + public class AppsQrcodeRequest : DouyinMicroAppRequest { public static class Types { @@ -32,9 +32,7 @@ public class Color } } - /// /// - /// [Newtonsoft.Json.JsonProperty("access_token")] [System.Text.Json.Serialization.JsonPropertyName("access_token")] public override string? AccessToken { get; set; } diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Qrcode/AppsQrcodeResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Qrcode/AppsQrcodeResponse.cs new file mode 100644 index 00000000..c7ecf17c --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Qrcode/AppsQrcodeResponse.cs @@ -0,0 +1,15 @@ +using System.Linq; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/qrcode 接口的响应。 + /// + public class AppsQrcodeResponse : DouyinMicroAppResponse + { + public override bool IsSuccessful() + { + return base.IsSuccessful() && GetRawBytes().Any(); + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/ShareConfig/AppsShareConfigRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/ShareConfig/AppsShareConfigRequest.cs similarity index 79% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/ShareConfig/AppsShareConfigRequest.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/ShareConfig/AppsShareConfigRequest.cs index 87c114ae..97fa6bc7 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/ShareConfig/AppsShareConfigRequest.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/ShareConfig/AppsShareConfigRequest.cs @@ -3,17 +3,15 @@ /// /// 表示 [POST] /apps/share_config 接口的请求。 /// - public class AppsShareConfigRequest : ByteDanceMicroAppRequest + public class AppsShareConfigRequest : DouyinMicroAppRequest { - /// /// - /// [Newtonsoft.Json.JsonProperty("access_token")] [System.Text.Json.Serialization.JsonPropertyName("access_token")] public override string? AccessToken { get; set; } /// - /// 获取或设置小程序的 AppId。如果不指定将使用构造 时的 参数。 + /// 获取或设置小程序 AppId。如果不指定将使用构造 时的 参数。 /// [Newtonsoft.Json.JsonProperty("appid")] [System.Text.Json.Serialization.JsonPropertyName("appid")] diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/ShareConfig/AppsShareConfigResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/ShareConfig/AppsShareConfigResponse.cs new file mode 100644 index 00000000..8eeebe89 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/ShareConfig/AppsShareConfigResponse.cs @@ -0,0 +1,15 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/share_config 接口的响应。 + /// + public class AppsShareConfigResponse : DouyinMicroAppResponse + { + /// + /// 获取或设置返回的数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public string? Data { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/SubscribeNotification/AppsSubscribeNotificationDeveloperNotifyV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/SubscribeNotification/AppsSubscribeNotificationDeveloperNotifyV1Request.cs similarity index 85% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/SubscribeNotification/AppsSubscribeNotificationDeveloperNotifyV1Request.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/SubscribeNotification/AppsSubscribeNotificationDeveloperNotifyV1Request.cs index 23bc5688..24c055ed 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/SubscribeNotification/AppsSubscribeNotificationDeveloperNotifyV1Request.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/SubscribeNotification/AppsSubscribeNotificationDeveloperNotifyV1Request.cs @@ -1,21 +1,21 @@ -using System.Collections.Generic; +using System; +using System.Collections.Generic; namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models { /// /// 表示 [POST] /apps/subscribe_notification/developer/v1/notify 接口的请求。 /// - public class AppsSubscribeNotificationDeveloperNotifyV1Request : ByteDanceMicroAppRequest + [Obsolete("相关接口或字段于 2023-12-27 下线。")] + public class AppsSubscribeNotificationDeveloperNotifyV1Request : DouyinMicroAppRequest { - /// /// - /// [Newtonsoft.Json.JsonProperty("access_token")] [System.Text.Json.Serialization.JsonPropertyName("access_token")] public override string? AccessToken { get; set; } /// - /// 获取或设置小程序的 AppId。如果不指定将使用构造 时的 参数。 + /// 获取或设置小程序 AppId。如果不指定将使用构造 时的 参数。 /// [Newtonsoft.Json.JsonProperty("app_id")] [System.Text.Json.Serialization.JsonPropertyName("app_id")] diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/SubscribeNotification/AppsSubscribeNotificationDeveloperNotifyV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/SubscribeNotification/AppsSubscribeNotificationDeveloperNotifyV1Response.cs new file mode 100644 index 00000000..a81eeaeb --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/SubscribeNotification/AppsSubscribeNotificationDeveloperNotifyV1Response.cs @@ -0,0 +1,12 @@ +using System; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/subscribe_notification/developer/v1/notify 接口的响应。 + /// + [Obsolete("相关接口或字段于 2023-12-27 下线。")] + public class AppsSubscribeNotificationDeveloperNotifyV1Response : DouyinMicroAppResponse + { + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/TaskBox/AppsTaskBoxAddTaskRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/TaskBox/AppsTaskBoxAddTaskRequest.cs similarity index 86% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/TaskBox/AppsTaskBoxAddTaskRequest.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/TaskBox/AppsTaskBoxAddTaskRequest.cs index 6b42e32c..a51e1c3d 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/TaskBox/AppsTaskBoxAddTaskRequest.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/TaskBox/AppsTaskBoxAddTaskRequest.cs @@ -1,3 +1,4 @@ +using System; using System.Collections.Generic; namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models @@ -5,15 +6,9 @@ namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models /// /// 表示 [POST] /apps/taskbox/add_task 接口的请求。 /// - public class AppsTaskBoxAddTaskRequest : ByteDanceMicroAppRequest + [Obsolete("相关接口或字段于 2024-01-08 下线。")] + public class AppsTaskBoxAddTaskRequest : AppsTaskBoxRequestBase { - /// - /// - /// - [Newtonsoft.Json.JsonProperty("access_token")] - [System.Text.Json.Serialization.JsonPropertyName("access_token")] - public override string? AccessToken { get; set; } - /// /// 获取或设置任务名称。 /// @@ -28,13 +23,6 @@ public class AppsTaskBoxAddTaskRequest : ByteDanceMicroAppRequest [System.Text.Json.Serialization.JsonPropertyName("task_settle_type")] public int TaskSettleType { get; set; } - /// - /// 获取或设置小程序的 AppId。如果不指定将使用构造 时的 参数。 - /// - [Newtonsoft.Json.JsonProperty("appid")] - [System.Text.Json.Serialization.JsonPropertyName("appid")] - public string? AppId { get; set; } - /// /// 获取或设置小程序页面地址。 /// diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/TaskBox/AppsTaskBoxAddTaskResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/TaskBox/AppsTaskBoxAddTaskResponse.cs new file mode 100644 index 00000000..c88aac1d --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/TaskBox/AppsTaskBoxAddTaskResponse.cs @@ -0,0 +1,32 @@ +using System; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/taskbox/add_task 接口的响应。 + /// + [Obsolete("相关接口或字段于 2024-01-08 下线。")] + public class AppsTaskBoxAddTaskResponse : AppsTaskBoxResponseBase + { + public static class Types + { + public class Data + { + /// + /// 获取或设置任务 ID。 + /// + [Newtonsoft.Json.JsonProperty("task_id")] + [System.Text.Json.Serialization.JsonPropertyName("task_id")] + [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)] + public long TaskId { get; set; } + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/TaskBox/AppsTaskBoxQueryAppTaskIdRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/TaskBox/AppsTaskBoxQueryAppTaskIdRequest.cs new file mode 100644 index 00000000..3b49570c --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/TaskBox/AppsTaskBoxQueryAppTaskIdRequest.cs @@ -0,0 +1,25 @@ +using System; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/taskbox/query_app_task_id 接口的请求。 + /// + [Obsolete("相关接口或字段于 2024-01-08 下线。")] + public class AppsTaskBoxQueryAppTaskIdRequest : AppsTaskBoxRequestBase + { + /// + /// 获取或设置创建时间起始时间戳。 + /// + [Newtonsoft.Json.JsonProperty("create_start_time")] + [System.Text.Json.Serialization.JsonPropertyName("create_start_time")] + public long StartCreateTimestamp { get; set; } + + /// + /// 获取或设置创建时间终止时间戳。 + /// + [Newtonsoft.Json.JsonProperty("create_end_time")] + [System.Text.Json.Serialization.JsonPropertyName("create_end_time")] + public long EndCreateTimestamp { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/TaskBox/AppsTaskBoxQueryAppTaskIdResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/TaskBox/AppsTaskBoxQueryAppTaskIdResponse.cs new file mode 100644 index 00000000..c19a6608 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/TaskBox/AppsTaskBoxQueryAppTaskIdResponse.cs @@ -0,0 +1,18 @@ +using System; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/taskbox/query_app_task_id 接口的响应。 + /// + [Obsolete("相关接口或字段于 2024-01-08 下线。")] + public class AppsTaskBoxQueryAppTaskIdResponse : AppsTaskBoxResponseBase + { + /// + /// 获取或设置任务 ID 列表。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public long[] TaskIdList { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/TaskBox/AppsTaskBoxQueryTaskVideoDataRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/TaskBox/AppsTaskBoxQueryTaskVideoDataRequest.cs new file mode 100644 index 00000000..ac806e0e --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/TaskBox/AppsTaskBoxQueryTaskVideoDataRequest.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/taskbox/query_task_video_data 接口的请求。 + /// + [Obsolete("相关接口或字段于 2024-01-08 下线。")] + public class AppsTaskBoxQueryTaskVideoDataRequest : AppsTaskBoxRequestBase + { + /// + /// 获取或设置任务 ID 列表。 + /// + [Newtonsoft.Json.JsonProperty("task_ids")] + [System.Text.Json.Serialization.JsonPropertyName("task_ids")] + public IList TaskIdList { get; set; } = new List(); + + /// + /// 获取或设置视频发布时间起始时间戳。 + /// + [Newtonsoft.Json.JsonProperty("video_publish_start_time")] + [System.Text.Json.Serialization.JsonPropertyName("video_publish_start_time")] + public long StartPublishTimestamp { get; set; } + + /// + /// 获取或设置视频发布时间终止时间戳。 + /// + [Newtonsoft.Json.JsonProperty("video_publish_end_time")] + [System.Text.Json.Serialization.JsonPropertyName("video_publish_end_time")] + public long EndPublishTimestamp { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/TaskBox/AppsTaskBoxQueryTaskVideoDataResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/TaskBox/AppsTaskBoxQueryTaskVideoDataResponse.cs similarity index 89% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/TaskBox/AppsTaskBoxQueryTaskVideoDataResponse.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/TaskBox/AppsTaskBoxQueryTaskVideoDataResponse.cs index a788d8a3..4b958cc5 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/TaskBox/AppsTaskBoxQueryTaskVideoDataResponse.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/TaskBox/AppsTaskBoxQueryTaskVideoDataResponse.cs @@ -1,9 +1,12 @@ +using System; + namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models { /// /// 表示 [POST] /apps/taskbox/query_task_video_data 接口的响应。 /// - public class AppsTaskBoxQueryTaskVideoDataResponse : ByteDanceMicroAppResponse + [Obsolete("相关接口或字段于 2024-01-08 下线。")] + public class AppsTaskBoxQueryTaskVideoDataResponse : AppsTaskBoxResponseBase { public static class Types { @@ -114,24 +117,10 @@ public class Video /// [Newtonsoft.Json.JsonProperty("expected_profit")] [System.Text.Json.Serialization.JsonPropertyName("expected_profit")] - public double ExpectedProfit { get; set; } + public decimal ExpectedProfit { get; set; } } } - /// - /// - /// - [Newtonsoft.Json.JsonProperty("error")] - [System.Text.Json.Serialization.JsonPropertyName("error")] - public override long ErrorCode { get; set; } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("message")] - [System.Text.Json.Serialization.JsonPropertyName("message")] - public override string? ErrorMessage { get; set; } - /// /// 获取或设置视频列表。 /// diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/TaskBox/AppsTaskBoxUpdateOrientTalentsRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/TaskBox/AppsTaskBoxUpdateOrientTalentsRequest.cs new file mode 100644 index 00000000..f7cfeaea --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/TaskBox/AppsTaskBoxUpdateOrientTalentsRequest.cs @@ -0,0 +1,38 @@ +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/taskbox/update_orient_talents/ 接口的请求。 + /// + public class AppsTaskBoxUpdateOrientTalentsRequest : AppsTaskBoxRequestBase + { + /// + /// 获取或设置小程序第三方平台应用 ID。 + /// + [Newtonsoft.Json.JsonProperty("third_appid")] + [System.Text.Json.Serialization.JsonPropertyName("third_appid")] + public string? ComponentAppId { get; set; } + + /// + /// 获取或设置任务 ID。 + /// + [Newtonsoft.Json.JsonProperty("task_id")] + [System.Text.Json.Serialization.JsonPropertyName("task_id")] + public long TaskId { get; set; } + + /// + /// 获取或设置达人抖音号列表。 + /// + [Newtonsoft.Json.JsonProperty("douyin_ids")] + [System.Text.Json.Serialization.JsonPropertyName("douyin_ids")] + public IList DouyinIdList { get; set; } = new List(); + + /// + /// 获取或设置操作类型。 + /// + [Newtonsoft.Json.JsonProperty("op_type")] + [System.Text.Json.Serialization.JsonPropertyName("op_type")] + public int OperateType { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/TaskBox/AppsTaskBoxUpdateOrientTalentsResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/TaskBox/AppsTaskBoxUpdateOrientTalentsResponse.cs new file mode 100644 index 00000000..750f3dff --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/TaskBox/AppsTaskBoxUpdateOrientTalentsResponse.cs @@ -0,0 +1,48 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/taskbox/update_orient_talents/ 接口的响应。 + /// + public class AppsTaskBoxUpdateOrientTalentsResponse : AppsTaskBoxResponseBase + { + public static class Types + { + public class Data + { + public static class Types + { + public class Result + { + /// + /// 获取或设置达人抖音号。 + /// + [Newtonsoft.Json.JsonProperty("douyin_id")] + [System.Text.Json.Serialization.JsonPropertyName("douyin_id")] + public string DouyinId { get; set; } = default!; + + /// + /// 获取或设置更新结果。 + /// + [Newtonsoft.Json.JsonProperty("update_result")] + [System.Text.Json.Serialization.JsonPropertyName("update_result")] + public string UpdateResult { get; set; } = default!; + } + } + + /// + /// 获取或设置更新结果列表。 + /// + [Newtonsoft.Json.JsonProperty("update_info_list")] + [System.Text.Json.Serialization.JsonPropertyName("update_info_list")] + public Types.Result[] ResultList { get; set; } = default!; + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/TaskBox/AppsTaskBoxUpdateStatusRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/TaskBox/AppsTaskBoxUpdateStatusRequest.cs new file mode 100644 index 00000000..0421a739 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/TaskBox/AppsTaskBoxUpdateStatusRequest.cs @@ -0,0 +1,25 @@ +using System; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/taskbox/update/status 接口的请求。 + /// + [Obsolete("相关接口或字段于 2024-01-08 下线。")] + public class AppsTaskBoxUpdateStatusRequest : AppsTaskBoxRequestBase + { + /// + /// 获取或设置任务 ID。 + /// + [Newtonsoft.Json.JsonProperty("task_id")] + [System.Text.Json.Serialization.JsonPropertyName("task_id")] + public long TaskId { get; set; } + + /// + /// 获取或设置任务状态。 + /// + [Newtonsoft.Json.JsonProperty("task_status")] + [System.Text.Json.Serialization.JsonPropertyName("task_status")] + public int TaskStatus { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/TaskBox/AppsTaskBoxUpdateStatusResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/TaskBox/AppsTaskBoxUpdateStatusResponse.cs new file mode 100644 index 00000000..42dcf052 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/TaskBox/AppsTaskBoxUpdateStatusResponse.cs @@ -0,0 +1,25 @@ +using System; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/taskbox/update/status 接口的响应。 + /// + [Obsolete("相关接口或字段于 2024-01-08 下线。")] + public class AppsTaskBoxUpdateStatusResponse : AppsTaskBoxResponseBase + { + public static class Types + { + public class Data : AppsTaskBoxAddTaskResponse.Types.Data + { + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/TaskBox/AppsTaskBoxUpdateTaskRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/TaskBox/AppsTaskBoxUpdateTaskRequest.cs similarity index 87% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/TaskBox/AppsTaskBoxUpdateTaskRequest.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/TaskBox/AppsTaskBoxUpdateTaskRequest.cs index fdb6832e..362373c6 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Apps/TaskBox/AppsTaskBoxUpdateTaskRequest.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/TaskBox/AppsTaskBoxUpdateTaskRequest.cs @@ -1,3 +1,4 @@ +using System; using System.Collections.Generic; namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models @@ -5,15 +6,9 @@ namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models /// /// 表示 [POST] /apps/taskbox/update_task 接口的请求。 /// - public class AppsTaskBoxUpdateTaskRequest : ByteDanceMicroAppRequest + [Obsolete("相关接口或字段于 2024-01-08 下线。")] + public class AppsTaskBoxUpdateTaskRequest : AppsTaskBoxRequestBase { - /// - /// - /// - [Newtonsoft.Json.JsonProperty("access_token")] - [System.Text.Json.Serialization.JsonPropertyName("access_token")] - public override string? AccessToken { get; set; } - /// /// 获取或设置任务 ID。 /// @@ -35,13 +30,6 @@ public class AppsTaskBoxUpdateTaskRequest : ByteDanceMicroAppRequest [System.Text.Json.Serialization.JsonPropertyName("task_settle_type")] public int TaskSettleType { get; set; } - /// - /// 获取或设置小程序的 AppId。如果不指定将使用构造 时的 参数。 - /// - [Newtonsoft.Json.JsonProperty("appid")] - [System.Text.Json.Serialization.JsonPropertyName("appid")] - public string? AppId { get; set; } - /// /// 获取或设置小程序页面地址。 /// diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/TaskBox/AppsTaskBoxUpdateTaskResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/TaskBox/AppsTaskBoxUpdateTaskResponse.cs new file mode 100644 index 00000000..c31993e6 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/TaskBox/AppsTaskBoxUpdateTaskResponse.cs @@ -0,0 +1,25 @@ +using System; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/taskbox/update_task 接口的响应。 + /// + [Obsolete("相关接口或字段于 2024-01-08 下线。")] + public class AppsTaskBoxUpdateTaskResponse : AppsTaskBoxResponseBase + { + public static class Types + { + public class Data : AppsTaskBoxAddTaskResponse.Types.Data + { + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/TaskBox/__Abstractions/AppsTaskBoxRequestBase.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/TaskBox/__Abstractions/AppsTaskBoxRequestBase.cs new file mode 100644 index 00000000..ba775994 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/TaskBox/__Abstractions/AppsTaskBoxRequestBase.cs @@ -0,0 +1,17 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + public abstract class AppsTaskBoxRequestBase : DouyinMicroAppRequest + { + /// + [Newtonsoft.Json.JsonProperty("access_token")] + [System.Text.Json.Serialization.JsonPropertyName("access_token")] + public override string? AccessToken { get; set; } + + /// + /// 获取或设置小程序 AppId。如果不指定将使用构造 时的 参数。 + /// + [Newtonsoft.Json.JsonProperty("appid")] + [System.Text.Json.Serialization.JsonPropertyName("appid")] + public string? AppId { get; set; } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/TaskBox/__Abstractions/AppsTaskBoxResponseBase.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/TaskBox/__Abstractions/AppsTaskBoxResponseBase.cs new file mode 100644 index 00000000..d0aea771 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/TaskBox/__Abstractions/AppsTaskBoxResponseBase.cs @@ -0,0 +1,22 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + public abstract class AppsTaskBoxResponseBase : DouyinMicroAppResponse + { + /// + /// 获取或设置错误码。 + /// + [Newtonsoft.Json.JsonProperty("error")] + [System.Text.Json.Serialization.JsonPropertyName("error")] + public int Error { get; set; } + + /// + [Newtonsoft.Json.JsonProperty("message")] + [System.Text.Json.Serialization.JsonPropertyName("message")] + public override string? ErrorMessage { get; set; } + + public override bool IsSuccessful() + { + return base.IsSuccessful() && Error == 0; + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Video/AppsConvertOpenItemIdToEncryptIdRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Video/AppsConvertOpenItemIdToEncryptIdRequest.cs new file mode 100644 index 00000000..660f92d2 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Video/AppsConvertOpenItemIdToEncryptIdRequest.cs @@ -0,0 +1,24 @@ +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/convert_video_id/open_item_id_to_encrypt_id 接口的请求。 + /// + public class AppsConvertOpenItemIdToEncryptIdRequest : DouyinMicroAppRequest + { + /// + /// 获取或设置访问密钥。如果不指定将使用构造 时的 参数。 + /// + [Newtonsoft.Json.JsonProperty("access_key")] + [System.Text.Json.Serialization.JsonPropertyName("access_key")] + public string? AccessKey { get; set; } + + /// + /// 获取或设置视频 ItemId 列表。 + /// + [Newtonsoft.Json.JsonProperty("video_ids")] + [System.Text.Json.Serialization.JsonPropertyName("video_ids")] + public IList OpenItemIdList { get; set; } = new List(); + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Video/AppsConvertOpenItemIdToEncryptIdResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Video/AppsConvertOpenItemIdToEncryptIdResponse.cs new file mode 100644 index 00000000..78c83044 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Video/AppsConvertOpenItemIdToEncryptIdResponse.cs @@ -0,0 +1,30 @@ +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/convert_video_id/open_item_id_to_encrypt_id 接口的响应。 + /// + public class AppsConvertOpenItemIdToEncryptIdResponse : DouyinMicroAppResponse + { + public static class Types + { + public class Data + { + /// + /// 获取或设置转换结果字典。 + /// + [Newtonsoft.Json.JsonProperty("convert_result")] + [System.Text.Json.Serialization.JsonPropertyName("convert_result")] + public IDictionary Result { get; set; } = default!; + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Video/AppsConvertVideoIdToOpenItemIdRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Video/AppsConvertVideoIdToOpenItemIdRequest.cs new file mode 100644 index 00000000..94d4f5b8 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Video/AppsConvertVideoIdToOpenItemIdRequest.cs @@ -0,0 +1,36 @@ +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/convert_video_id/video_id_to_open_item_id 接口的请求。 + /// + public class AppsConvertVideoIdToOpenItemIdRequest : DouyinMicroAppRequest + { + /// + [Newtonsoft.Json.JsonProperty("access_token")] + [System.Text.Json.Serialization.JsonPropertyName("access_token")] + public override string? AccessToken { get; set; } + + /// + /// 获取或设置小程序 AppId。如果不指定将使用构造 时的 参数。 + /// + [Newtonsoft.Json.JsonProperty("app_id")] + [System.Text.Json.Serialization.JsonPropertyName("app_id")] + public string? AppId { get; set; } + + /// + /// 获取或设置访问密钥。如果不指定将使用构造 时的 参数。 + /// + [Newtonsoft.Json.JsonProperty("access_key")] + [System.Text.Json.Serialization.JsonPropertyName("access_key")] + public string? AccessKey { get; set; } + + /// + /// 获取或设置视频 ID 列表。 + /// + [Newtonsoft.Json.JsonProperty("video_ids")] + [System.Text.Json.Serialization.JsonPropertyName("video_ids")] + public IList VideoIdList { get; set; } = new List(); + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Video/AppsConvertVideoIdToOpenItemIdResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Video/AppsConvertVideoIdToOpenItemIdResponse.cs new file mode 100644 index 00000000..ea3694a2 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Apps/Video/AppsConvertVideoIdToOpenItemIdResponse.cs @@ -0,0 +1,30 @@ +using System.Collections.Generic; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/convert_video_id/video_id_to_open_item_id 接口的响应。 + /// + public class AppsConvertVideoIdToOpenItemIdResponse : DouyinMicroAppResponse + { + public static class Types + { + public class Data + { + /// + /// 获取或设置转换结果字典。 + /// + [Newtonsoft.Json.JsonProperty("convert_result")] + [System.Text.Json.Serialization.JsonPropertyName("convert_result")] + public IDictionary Result { get; set; } = default!; + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/AppsBillsRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/Bills/AppsBillsRequest.cs similarity index 90% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/AppsBillsRequest.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/Bills/AppsBillsRequest.cs index 57b34add..f358f33b 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/AppsBillsRequest.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/Bills/AppsBillsRequest.cs @@ -3,7 +3,7 @@ namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models /// /// 表示 [GET] /apps/bills 接口的请求。 /// - public class AppsBillsRequest : ByteDanceMicroAppRequest + public class AppsBillsRequest : DouyinMicroAppRequest { /// /// 获取或设置小程序第三方平台应用 ID。 @@ -13,7 +13,7 @@ public class AppsBillsRequest : ByteDanceMicroAppRequest public string? ComponentAppId { get; set; } /// - /// 获取或设置小程序 AppId。如果不指定将使用构造 时的 参数。 + /// 获取或设置小程序 AppId。如果不指定将使用构造 时的 参数。 /// [Newtonsoft.Json.JsonIgnore] [System.Text.Json.Serialization.JsonIgnore] diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/Bills/AppsBillsResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/Bills/AppsBillsResponse.cs new file mode 100644 index 00000000..30a06a32 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/Bills/AppsBillsResponse.cs @@ -0,0 +1,15 @@ +using System.Linq; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [GET] /apps/bills 接口的响应。 + /// + public class AppsBillsResponse : DouyinMicroAppResponse + { + public override bool IsSuccessful() + { + return base.IsSuccessful() && GetRawBytes().Any(); + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/AppsFundBillsRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/Bills/AppsFundBillsRequest.cs similarity index 87% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/AppsFundBillsRequest.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/Bills/AppsFundBillsRequest.cs index 088d93bc..16ce8c1b 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/AppsFundBillsRequest.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/Bills/AppsFundBillsRequest.cs @@ -3,7 +3,7 @@ namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models /// /// 表示 [GET] /apps/fund/bills 接口的请求。 /// - public class AppsFundBillsRequest : ByteDanceMicroAppRequest + public class AppsFundBillsRequest : DouyinMicroAppRequest { /// /// 获取或设置小程序第三方平台应用 ID。 @@ -13,7 +13,7 @@ public class AppsFundBillsRequest : ByteDanceMicroAppRequest public string? ComponentAppId { get; set; } /// - /// 获取或设置小程序 AppId。如果不指定将使用构造 时的 参数。 + /// 获取或设置小程序 AppId。如果不指定将使用构造 时的 参数。 /// [Newtonsoft.Json.JsonIgnore] [System.Text.Json.Serialization.JsonIgnore] @@ -35,7 +35,7 @@ public class AppsFundBillsRequest : ByteDanceMicroAppRequest /// /// 获取或设置账户类型。 - /// 默认值:ALL + /// 默认值:"ALL" /// [Newtonsoft.Json.JsonIgnore] [System.Text.Json.Serialization.JsonIgnore] @@ -43,7 +43,7 @@ public class AppsFundBillsRequest : ByteDanceMicroAppRequest /// /// 获取或设置收支类型。 - /// 默认值:ALL + /// 默认值:"ALL" /// [Newtonsoft.Json.JsonIgnore] [System.Text.Json.Serialization.JsonIgnore] @@ -51,7 +51,7 @@ public class AppsFundBillsRequest : ByteDanceMicroAppRequest /// /// 获取或设置交易类型。 - /// 默认值:ALL + /// 默认值:"ALL" /// [Newtonsoft.Json.JsonIgnore] [System.Text.Json.Serialization.JsonIgnore] diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/Bills/AppsFundBillsResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/Bills/AppsFundBillsResponse.cs new file mode 100644 index 00000000..af60dc6c --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/Bills/AppsFundBillsResponse.cs @@ -0,0 +1,15 @@ +using System.Linq; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [GET] /apps/fund/bills 接口的响应。 + /// + public class AppsFundBillsResponse : DouyinMicroAppResponse + { + public override bool IsSuccessful() + { + return base.IsSuccessful() && GetRawBytes().Any(); + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/Order/AppsECPayCreateOrderV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/Order/AppsECPayCreateOrderV1Request.cs similarity index 91% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/Order/AppsECPayCreateOrderV1Request.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/Order/AppsECPayCreateOrderV1Request.cs index fa7d7975..339c7d7b 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/Order/AppsECPayCreateOrderV1Request.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/Order/AppsECPayCreateOrderV1Request.cs @@ -1,9 +1,9 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models { /// /// 表示 [POST] /apps/ecpay/v1/create_order 接口的请求。 /// - public class AppsECPayCreateOrderV1Request : ByteDanceMicroAppRequest + public class AppsECPayCreateOrderV1Request : DouyinMicroAppRequest { /// /// 获取或设置小程序第三方平台应用 ID。 @@ -13,7 +13,7 @@ public class AppsECPayCreateOrderV1Request : ByteDanceMicroAppRequest public string? ComponentAppId { get; set; } /// - /// 获取或设置小程序 AppId。如果不指定将使用构造 时的 参数。 + /// 获取或设置小程序 AppId。如果不指定将使用构造 时的 参数。 /// [Newtonsoft.Json.JsonProperty("app_id")] [System.Text.Json.Serialization.JsonPropertyName("app_id")] @@ -86,9 +86,9 @@ public class AppsECPayCreateOrderV1Request : ByteDanceMicroAppRequest /// 获取或设置是否屏蔽担保支付的推送消息。 /// [Newtonsoft.Json.JsonProperty("disable_msg")] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.NumericalNullableBooleanConverter))] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.NumericalBooleanConverter))] [System.Text.Json.Serialization.JsonPropertyName("disable_msg")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumericalNullableBooleanConverter))] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalBooleanConverter))] public bool? IsMessageDisabled { get; set; } /// diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/Order/AppsECPayCreateOrderV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/Order/AppsECPayCreateOrderV1Response.cs new file mode 100644 index 00000000..448a786e --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/Order/AppsECPayCreateOrderV1Response.cs @@ -0,0 +1,35 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/ecpay/v1/create_order 接口的响应。 + /// + public class AppsECPayCreateOrderV1Response : DouyinMicroAppResponse + { + public static class Types + { + public class Data + { + /// + /// 获取或设置订单 ID。 + /// + [Newtonsoft.Json.JsonProperty("order_id")] + [System.Text.Json.Serialization.JsonPropertyName("order_id")] + public string OrderId { get; set; } = default!; + + /// + /// 获取或设置用于调起支付的 Token。 + /// + [Newtonsoft.Json.JsonProperty("order_token")] + [System.Text.Json.Serialization.JsonPropertyName("order_token")] + public string OrderToken { get; set; } = default!; + } + } + + /// + /// 获取或设置返回数据。 + /// + [Newtonsoft.Json.JsonProperty("data")] + [System.Text.Json.Serialization.JsonPropertyName("data")] + public Types.Data Data { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/Order/AppsECPayCreateRefundV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/Order/AppsECPayCreateRefundV1Request.cs similarity index 89% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/Order/AppsECPayCreateRefundV1Request.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/Order/AppsECPayCreateRefundV1Request.cs index 7ce4194c..21b768e8 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/Order/AppsECPayCreateRefundV1Request.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/Order/AppsECPayCreateRefundV1Request.cs @@ -1,9 +1,9 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models { /// /// 表示 [POST] /apps/ecpay/v1/create_refund 接口的请求。 /// - public class AppsECPayCreateRefundV1Request : ByteDanceMicroAppRequest + public class AppsECPayCreateRefundV1Request : DouyinMicroAppRequest { /// /// 获取或设置小程序第三方平台应用 ID。 @@ -13,7 +13,7 @@ public class AppsECPayCreateRefundV1Request : ByteDanceMicroAppRequest public string? ComponentAppId { get; set; } /// - /// 获取或设置小程序 AppId。如果不指定将使用构造 时的 参数。 + /// 获取或设置小程序 AppId。如果不指定将使用构造 时的 参数。 /// [Newtonsoft.Json.JsonProperty("app_id")] [System.Text.Json.Serialization.JsonPropertyName("app_id")] @@ -79,9 +79,9 @@ public class AppsECPayCreateRefundV1Request : ByteDanceMicroAppRequest /// 获取或设置是否屏蔽担保支付的推送消息。 /// [Newtonsoft.Json.JsonProperty("disable_msg")] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.NumericalNullableBooleanConverter))] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.NumericalBooleanConverter))] [System.Text.Json.Serialization.JsonPropertyName("disable_msg")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumericalNullableBooleanConverter))] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalBooleanConverter))] public bool? IsMessageDisabled { get; set; } /// @@ -95,9 +95,9 @@ public class AppsECPayCreateRefundV1Request : ByteDanceMicroAppRequest /// 获取或设置是否为分账后退款。 /// [Newtonsoft.Json.JsonProperty("all_settle")] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.NumericalNullableBooleanConverter))] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.NumericalBooleanConverter))] [System.Text.Json.Serialization.JsonPropertyName("all_settle")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumericalNullableBooleanConverter))] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalBooleanConverter))] public bool? IsAllSettled { get; set; } } } diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/Order/AppsECPayCreateRefundV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/Order/AppsECPayCreateRefundV1Response.cs new file mode 100644 index 00000000..6bc94fc2 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/Order/AppsECPayCreateRefundV1Response.cs @@ -0,0 +1,15 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/ecpay/v1/create_refund 接口的响应。 + /// + public class AppsECPayCreateRefundV1Response : DouyinMicroAppResponse + { + /// + /// 获取或设置担保交易退款单号。 + /// + [Newtonsoft.Json.JsonProperty("refund_no")] + [System.Text.Json.Serialization.JsonPropertyName("refund_no")] + public string RefundNumber { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/Order/AppsECPayCreateReturnV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/Order/AppsECPayCreateReturnV1Request.cs similarity index 94% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/Order/AppsECPayCreateReturnV1Request.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/Order/AppsECPayCreateReturnV1Request.cs index 0b7e0dd7..88b99be9 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/Order/AppsECPayCreateReturnV1Request.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/Order/AppsECPayCreateReturnV1Request.cs @@ -3,7 +3,7 @@ /// /// 表示 [POST] /apps/ecpay/v1/create_return 接口的请求。 /// - public class AppsECPayCreateReturnV1Request : ByteDanceMicroAppRequest + public class AppsECPayCreateReturnV1Request : DouyinMicroAppRequest { /// /// 获取或设置小程序第三方平台应用 ID。 @@ -13,7 +13,7 @@ public class AppsECPayCreateReturnV1Request : ByteDanceMicroAppRequest public string? ComponentAppId { get; set; } /// - /// 获取或设置小程序 AppId。如果不指定将使用构造 时的 参数。 + /// 获取或设置小程序 AppId。如果不指定将使用构造 时的 参数。 /// [Newtonsoft.Json.JsonProperty("app_id")] [System.Text.Json.Serialization.JsonPropertyName("app_id")] diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/Order/AppsECPayCreateReturnV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/Order/AppsECPayCreateReturnV1Response.cs new file mode 100644 index 00000000..6efced59 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/Order/AppsECPayCreateReturnV1Response.cs @@ -0,0 +1,22 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/ecpay/v1/create_return 接口的响应。 + /// + public class AppsECPayCreateReturnV1Response : DouyinMicroAppResponse + { + public static class Types + { + public class Return : AppsECPayQueryReturnV1Response.Types.Return + { + } + } + + /// + /// 获取或设置分账回退信息。 + /// + [Newtonsoft.Json.JsonProperty("return_info")] + [System.Text.Json.Serialization.JsonPropertyName("return_info")] + public Types.Return Return { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/Order/AppsECPayQueryOrderV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/Order/AppsECPayQueryOrderV1Request.cs similarity index 87% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/Order/AppsECPayQueryOrderV1Request.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/Order/AppsECPayQueryOrderV1Request.cs index 356a2ab9..309d19bb 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/Order/AppsECPayQueryOrderV1Request.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/Order/AppsECPayQueryOrderV1Request.cs @@ -3,7 +3,7 @@ /// /// 表示 [POST] /apps/ecpay/v1/query_order 接口的请求。 /// - public class AppsECPayQueryOrderV1Request : ByteDanceMicroAppRequest + public class AppsECPayQueryOrderV1Request : DouyinMicroAppRequest { /// /// 获取或设置小程序第三方平台应用 ID。 @@ -13,7 +13,7 @@ public class AppsECPayQueryOrderV1Request : ByteDanceMicroAppRequest public string? ComponentAppId { get; set; } /// - /// 获取或设置小程序 AppId。如果不指定将使用构造 时的 参数。 + /// 获取或设置小程序 AppId。如果不指定将使用构造 时的 参数。 /// [Newtonsoft.Json.JsonProperty("app_id")] [System.Text.Json.Serialization.JsonPropertyName("app_id")] diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/Order/AppsECPayQueryOrderV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/Order/AppsECPayQueryOrderV1Response.cs similarity index 84% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/Order/AppsECPayQueryOrderV1Response.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/Order/AppsECPayQueryOrderV1Response.cs index 4afc553f..062bd878 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/Order/AppsECPayQueryOrderV1Response.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/Order/AppsECPayQueryOrderV1Response.cs @@ -1,11 +1,11 @@ -using System; +using System; namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models { /// /// 表示 [POST] /apps/ecpay/v1/query_order 接口的响应。 /// - public class AppsECPayQueryOrderV1Response : ByteDanceMicroAppResponse + public class AppsECPayQueryOrderV1Response : DouyinMicroAppResponse { public static class Types { @@ -64,27 +64,13 @@ public class Payment /// 获取或设置订单支付时间。 /// [Newtonsoft.Json.JsonProperty("pay_time")] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.RegularNullableDateTimeOffsetConverter))] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.BasicDateTimeOffsetConverter))] [System.Text.Json.Serialization.JsonPropertyName("pay_time")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.RegularNullableDateTimeOffsetConverter))] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.BasicDateTimeOffsetConverter))] public DateTimeOffset? PayTime { get; set; } } } - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_no")] - [System.Text.Json.Serialization.JsonPropertyName("err_no")] - public override long ErrorCode { get; set; } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_tips")] - [System.Text.Json.Serialization.JsonPropertyName("err_tips")] - public override string? ErrorMessage { get; set; } - /// /// 获取或设置商户订单号。 /// diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/Order/AppsECPayQueryPlatformOrderV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/Order/AppsECPayQueryPlatformOrderV1Request.cs similarity index 83% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/Order/AppsECPayQueryPlatformOrderV1Request.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/Order/AppsECPayQueryPlatformOrderV1Request.cs index 499ec0c3..c203aaed 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/Order/AppsECPayQueryPlatformOrderV1Request.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/Order/AppsECPayQueryPlatformOrderV1Request.cs @@ -1,16 +1,12 @@ -using System; -using System.Collections.Generic; -using System.Text; - namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models { /// /// 表示 [POST] /apps/ecpay/v1/query_platform_order 接口的请求。 /// - public class AppsECPayQueryPlatformOrderV1Request : ByteDanceMicroAppRequest + public class AppsECPayQueryPlatformOrderV1Request : DouyinMicroAppRequest { /// - /// 获取或设置小程序 AppId。如果不指定将使用构造 时的 参数。 + /// 获取或设置小程序 AppId。如果不指定将使用构造 时的 参数。 /// [Newtonsoft.Json.JsonProperty("app_id")] [System.Text.Json.Serialization.JsonPropertyName("app_id")] diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/Order/AppsECPayQueryPlatformOrderV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/Order/AppsECPayQueryPlatformOrderV1Response.cs similarity index 90% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/Order/AppsECPayQueryPlatformOrderV1Response.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/Order/AppsECPayQueryPlatformOrderV1Response.cs index b1c5e2d2..b5c23a60 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/Order/AppsECPayQueryPlatformOrderV1Response.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/Order/AppsECPayQueryPlatformOrderV1Response.cs @@ -1,11 +1,9 @@ -using System; - namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models { /// /// 表示 [POST] /apps/ecpay/v1/query_platform_order 接口的响应。 /// - public class AppsECPayQueryPlatformOrderV1Response : ByteDanceMicroAppResponse + public class AppsECPayQueryPlatformOrderV1Response : DouyinMicroAppResponse { public static class Types { @@ -25,7 +23,7 @@ public class SettleParameter [Newtonsoft.Json.JsonProperty("amount")] [System.Text.Json.Serialization.JsonPropertyName("amount")] public int Amount { get; set; } - + /// /// 获取或设置分账方商户号。 /// @@ -34,63 +32,63 @@ public class SettleParameter public string MerchantUid { get; set; } = default!; } } - + /// /// 获取或设置自动结算单号。 /// [Newtonsoft.Json.JsonProperty("out_settle_no")] [System.Text.Json.Serialization.JsonPropertyName("out_settle_no")] public string OutSettleNumber { get; set; } = default!; - + /// /// 获取或设置小程序分账单号。 /// [Newtonsoft.Json.JsonProperty("settle_no")] [System.Text.Json.Serialization.JsonPropertyName("settle_no")] public string SettleNumber { get; set; } = default!; - + /// /// 获取或设置分账参数列表。 /// [Newtonsoft.Json.JsonProperty("settle_param_list")] [System.Text.Json.Serialization.JsonPropertyName("settle_param_list")] public Types.SettleParameter[]? SettleParameterList { get; set; } - + /// /// 获取或设置结算渠道。 /// [Newtonsoft.Json.JsonProperty("settle_way")] [System.Text.Json.Serialization.JsonPropertyName("settle_way")] public string SettleWay { get; set; } = default!; - + /// /// 获取或设置分账状态。 /// [Newtonsoft.Json.JsonProperty("settle_status")] [System.Text.Json.Serialization.JsonPropertyName("settle_status")] public string SettleStatus { get; set; } = default!; - + /// /// 获取或设置 CPS 佣金(单位:分)。 /// [Newtonsoft.Json.JsonProperty("cps")] [System.Text.Json.Serialization.JsonPropertyName("cps")] public int CPS { get; set; } - + /// /// 获取或设置技术服务费(单位:分)。 /// [Newtonsoft.Json.JsonProperty("service_charge")] [System.Text.Json.Serialization.JsonPropertyName("service_charge")] public int ServiceCharge { get; set; } - + /// /// 获取或设置结算创建时间字符串(格式:yyyy-MM-dd HH:mm:ss)。 /// [Newtonsoft.Json.JsonProperty("created_at")] [System.Text.Json.Serialization.JsonPropertyName("created_at")] public string CreateTimeString { get; set; } = default!; - + /// /// 获取或设置结算完成时间字符串(格式:yyyy-MM-dd HH:mm:ss)。 /// @@ -99,7 +97,7 @@ public class SettleParameter public string? SettleTimeString { get; set; } } } - + /// /// 获取或设置小程序 AppId。 /// @@ -130,20 +128,6 @@ public class SettleParameter } } - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_no")] - [System.Text.Json.Serialization.JsonPropertyName("err_no")] - public override long ErrorCode { get; set; } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_tips")] - [System.Text.Json.Serialization.JsonPropertyName("err_tips")] - public override string? ErrorMessage { get; set; } - /// /// 获取或设置订单信息。 /// diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/Order/AppsECPayQueryRefundV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/Order/AppsECPayQueryRefundV1Request.cs similarity index 87% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/Order/AppsECPayQueryRefundV1Request.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/Order/AppsECPayQueryRefundV1Request.cs index 66442960..dd86eb63 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/Order/AppsECPayQueryRefundV1Request.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/Order/AppsECPayQueryRefundV1Request.cs @@ -3,7 +3,7 @@ /// /// 表示 [POST] /apps/ecpay/v1/query_refund 接口的请求。 /// - public class AppsECPayQueryRefundV1Request : ByteDanceMicroAppRequest + public class AppsECPayQueryRefundV1Request : DouyinMicroAppRequest { /// /// 获取或设置小程序第三方平台应用 ID。 @@ -13,7 +13,7 @@ public class AppsECPayQueryRefundV1Request : ByteDanceMicroAppRequest public string? ComponentAppId { get; set; } /// - /// 获取或设置小程序 AppId。如果不指定将使用构造 时的 参数。 + /// 获取或设置小程序 AppId。如果不指定将使用构造 时的 参数。 /// [Newtonsoft.Json.JsonProperty("app_id")] [System.Text.Json.Serialization.JsonPropertyName("app_id")] diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/Order/AppsECPayQueryRefundV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/Order/AppsECPayQueryRefundV1Response.cs new file mode 100644 index 00000000..07012a32 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/Order/AppsECPayQueryRefundV1Response.cs @@ -0,0 +1,42 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/ecpay/v1/query_refund 接口的响应。 + /// + public class AppsECPayQueryRefundV1Response : DouyinMicroAppResponse + { + public static class Types + { + public class Refund + { + /// + /// 获取或设置担保交易退款单号。 + /// + [Newtonsoft.Json.JsonProperty("refund_no")] + [System.Text.Json.Serialization.JsonPropertyName("refund_no")] + public string RefundNumber { get; set; } = default!; + + /// + /// 获取或设置退款金额(单位:分)。 + /// + [Newtonsoft.Json.JsonProperty("refund_amount")] + [System.Text.Json.Serialization.JsonPropertyName("refund_amount")] + public int RefundAmount { get; set; } + + /// + /// 获取或设置退款状态。 + /// + [Newtonsoft.Json.JsonProperty("refund_status")] + [System.Text.Json.Serialization.JsonPropertyName("refund_status")] + public string RefundStatus { get; set; } = default!; + } + } + + /// + /// 获取或设置退款信息。 + /// + [Newtonsoft.Json.JsonProperty("refundInfo")] + [System.Text.Json.Serialization.JsonPropertyName("refundInfo")] + public Types.Refund Refund { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/Order/AppsECPayQueryReturnV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/Order/AppsECPayQueryReturnV1Request.cs similarity index 89% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/Order/AppsECPayQueryReturnV1Request.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/Order/AppsECPayQueryReturnV1Request.cs index 6e7b47f6..7d4c9645 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/Order/AppsECPayQueryReturnV1Request.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/Order/AppsECPayQueryReturnV1Request.cs @@ -3,7 +3,7 @@ /// /// 表示 [POST] /apps/ecpay/v1/query_return 接口的请求。 /// - public class AppsECPayQueryReturnV1Request : ByteDanceMicroAppRequest + public class AppsECPayQueryReturnV1Request : DouyinMicroAppRequest { /// /// 获取或设置小程序第三方平台应用 ID。 @@ -13,7 +13,7 @@ public class AppsECPayQueryReturnV1Request : ByteDanceMicroAppRequest public string? ComponentAppId { get; set; } /// - /// 获取或设置小程序 AppId。如果不指定将使用构造 时的 参数。 + /// 获取或设置小程序 AppId。如果不指定将使用构造 时的 参数。 /// [Newtonsoft.Json.JsonProperty("app_id")] [System.Text.Json.Serialization.JsonPropertyName("app_id")] diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/Order/AppsECPayQueryReturnV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/Order/AppsECPayQueryReturnV1Response.cs similarity index 88% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/Order/AppsECPayQueryReturnV1Response.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/Order/AppsECPayQueryReturnV1Response.cs index d736e2f3..7b584b3c 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/Order/AppsECPayQueryReturnV1Response.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/Order/AppsECPayQueryReturnV1Response.cs @@ -1,9 +1,9 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models { /// /// 表示 [POST] /apps/ecpay/v1/query_return 接口的响应。 /// - public class AppsECPayQueryReturnV1Response : ByteDanceMicroAppResponse + public class AppsECPayQueryReturnV1Response : DouyinMicroAppResponse { public static class Types { @@ -102,20 +102,6 @@ public class Return } } - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_no")] - [System.Text.Json.Serialization.JsonPropertyName("err_no")] - public override long ErrorCode { get; set; } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_tips")] - [System.Text.Json.Serialization.JsonPropertyName("err_tips")] - public override string? ErrorMessage { get; set; } - /// /// 获取或设置分账回退信息。 /// diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/Order/AppsECPayQuerySettleV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/Order/AppsECPayQuerySettleV1Request.cs similarity index 87% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/Order/AppsECPayQuerySettleV1Request.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/Order/AppsECPayQuerySettleV1Request.cs index a49ad8d6..f725f58c 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/Order/AppsECPayQuerySettleV1Request.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/Order/AppsECPayQuerySettleV1Request.cs @@ -3,7 +3,7 @@ /// /// 表示 [POST] /apps/ecpay/v1/query_settle 接口的请求。 /// - public class AppsECPayQuerySettleV1Request : ByteDanceMicroAppRequest + public class AppsECPayQuerySettleV1Request : DouyinMicroAppRequest { /// /// 获取或设置小程序第三方平台应用 ID。 @@ -13,7 +13,7 @@ public class AppsECPayQuerySettleV1Request : ByteDanceMicroAppRequest public string? ComponentAppId { get; set; } /// - /// 获取或设置小程序 AppId。如果不指定将使用构造 时的 参数。 + /// 获取或设置小程序 AppId。如果不指定将使用构造 时的 参数。 /// [Newtonsoft.Json.JsonProperty("app_id")] [System.Text.Json.Serialization.JsonPropertyName("app_id")] diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/Order/AppsECPayQuerySettleV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/Order/AppsECPayQuerySettleV1Response.cs new file mode 100644 index 00000000..4de0a553 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/Order/AppsECPayQuerySettleV1Response.cs @@ -0,0 +1,42 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/ecpay/v1/query_settle 接口的响应。 + /// + public class AppsECPayQuerySettleV1Response : DouyinMicroAppResponse + { + public static class Types + { + public class Settlement + { + /// + /// 获取或设置担保交易分账单号。 + /// + [Newtonsoft.Json.JsonProperty("settle_no")] + [System.Text.Json.Serialization.JsonPropertyName("settle_no")] + public string SettleNumber { get; set; } = default!; + + /// + /// 获取或设置分账金额(单位:分)。 + /// + [Newtonsoft.Json.JsonProperty("settle_amount")] + [System.Text.Json.Serialization.JsonPropertyName("settle_amount")] + public int SettleAmount { get; set; } + + /// + /// 获取或设置分账状态。 + /// + [Newtonsoft.Json.JsonProperty("settle_status")] + [System.Text.Json.Serialization.JsonPropertyName("settle_status")] + public string SettleStatus { get; set; } = default!; + } + } + + /// + /// 获取或设置结算信息。 + /// + [Newtonsoft.Json.JsonProperty("settle_info")] + [System.Text.Json.Serialization.JsonPropertyName("settle_info")] + public Types.Settlement Settlement { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/Order/AppsECPaySettleV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/Order/AppsECPaySettleV1Request.cs similarity index 78% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/Order/AppsECPaySettleV1Request.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/Order/AppsECPaySettleV1Request.cs index 62dbabdb..f4e7245c 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/Order/AppsECPaySettleV1Request.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/Order/AppsECPaySettleV1Request.cs @@ -1,11 +1,11 @@ -using System.Collections.Generic; +using System.Collections.Generic; namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models { /// /// 表示 [POST] /apps/ecpay/v1/settle 接口的请求。 /// - public class AppsECPaySettleV1Request : ByteDanceMicroAppRequest + public class AppsECPaySettleV1Request : DouyinMicroAppRequest { public static class Types { @@ -27,17 +27,6 @@ public class SettleParameter } } - internal static class Converters - { - internal class ResponsePropertySettleParametersNewtonsoftJsonConverter : Newtonsoft.Json.Converters.TextualObjectInJsonFormatConverterBase?> - { - } - - internal class ResponsePropertySettleParametersSystemTextJsonConverter : System.Text.Json.Converters.TextualObjectInJsonFormatConverterBase?> - { - } - } - /// /// 获取或设置小程序第三方平台应用 ID。 /// @@ -46,7 +35,7 @@ internal class ResponsePropertySettleParametersSystemTextJsonConverter : System. public string? ComponentAppId { get; set; } /// - /// 获取或设置小程序 AppId。如果不指定将使用构造 时的 参数。 + /// 获取或设置小程序 AppId。如果不指定将使用构造 时的 参数。 /// [Newtonsoft.Json.JsonProperty("app_id")] [System.Text.Json.Serialization.JsonPropertyName("app_id")] @@ -77,9 +66,9 @@ internal class ResponsePropertySettleParametersSystemTextJsonConverter : System. /// 获取或设置分账方参数列表。 /// [Newtonsoft.Json.JsonProperty("settle_params")] - [Newtonsoft.Json.JsonConverter(typeof(Converters.ResponsePropertySettleParametersNewtonsoftJsonConverter))] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.StringifiedObjectInJsonFormatConverter))] [System.Text.Json.Serialization.JsonPropertyName("settle_params")] - [System.Text.Json.Serialization.JsonConverter(typeof(Converters.ResponsePropertySettleParametersSystemTextJsonConverter))] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.StringifiedObjectInJsonFormatConverter))] public IList SettleParameterList { get; set; } = new List(); /// diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/Order/AppsECPaySettleV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/Order/AppsECPaySettleV1Response.cs new file mode 100644 index 00000000..94311c4e --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/Order/AppsECPaySettleV1Response.cs @@ -0,0 +1,15 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/ecpay/v1/settle 接口的响应。 + /// + public class AppsECPaySettleV1Response : DouyinMicroAppResponse + { + /// + /// 获取或设置担保交易分帐单号。 + /// + [Newtonsoft.Json.JsonProperty("settle_no")] + [System.Text.Json.Serialization.JsonPropertyName("settle_no")] + public string SettleNumber { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/SaaS/Apply/AppsECPaySaaSCreateMerchantRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/SaaS/Apply/AppsECPaySaaSCreateMerchantRequest.cs similarity index 99% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/SaaS/Apply/AppsECPaySaaSCreateMerchantRequest.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/SaaS/Apply/AppsECPaySaaSCreateMerchantRequest.cs index a4ce6018..badd2347 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/SaaS/Apply/AppsECPaySaaSCreateMerchantRequest.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/SaaS/Apply/AppsECPaySaaSCreateMerchantRequest.cs @@ -5,7 +5,7 @@ namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models /// /// 表示 [POST] /apps/ecpay/saas/create_merchant 接口的请求。 /// - public class AppsECPaySaaSCreateMerchantRequest : ByteDanceMicroAppRequest + public class AppsECPaySaaSCreateMerchantRequest : DouyinMicroAppRequest { public static class Types { diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/SaaS/Apply/AppsECPaySaaSCreateMerchantResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/SaaS/Apply/AppsECPaySaaSCreateMerchantResponse.cs new file mode 100644 index 00000000..55ea90aa --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/SaaS/Apply/AppsECPaySaaSCreateMerchantResponse.cs @@ -0,0 +1,22 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/ecpay/saas/create_merchant 接口的响应。 + /// + public class AppsECPaySaaSCreateMerchantResponse : DouyinMicroAppResponse + { + /// + /// 获取或设置申请单 ID。 + /// + [Newtonsoft.Json.JsonProperty("apply_id")] + [System.Text.Json.Serialization.JsonPropertyName("apply_id")] + public string ApplyId { get; set; } = default!; + + /// + /// 获取或设置商户号。 + /// + [Newtonsoft.Json.JsonProperty("merchant_id")] + [System.Text.Json.Serialization.JsonPropertyName("merchant_id")] + public string MerchantId { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/SaaS/Apply/AppsECPaySaaSImageUploadRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/SaaS/Apply/AppsECPaySaaSImageUploadRequest.cs similarity index 96% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/SaaS/Apply/AppsECPaySaaSImageUploadRequest.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/SaaS/Apply/AppsECPaySaaSImageUploadRequest.cs index c606b51f..9a3720a7 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/SaaS/Apply/AppsECPaySaaSImageUploadRequest.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/SaaS/Apply/AppsECPaySaaSImageUploadRequest.cs @@ -5,7 +5,7 @@ namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models /// /// 表示 [POST] /apps/ecpay/saas/image_upload 接口的请求。 /// - public class AppsECPaySaaSImageUploadRequest : ByteDanceMicroAppRequest + public class AppsECPaySaaSImageUploadRequest : DouyinMicroAppRequest { /// /// 获取或设置小程序 AppId。与字段 二选一。 diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/SaaS/Apply/AppsECPaySaaSImageUploadResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/SaaS/Apply/AppsECPaySaaSImageUploadResponse.cs new file mode 100644 index 00000000..514f8ae2 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/SaaS/Apply/AppsECPaySaaSImageUploadResponse.cs @@ -0,0 +1,15 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/ecpay/saas/image_upload 接口的响应。 + /// + public class AppsECPaySaaSImageUploadResponse : DouyinMicroAppResponse + { + /// + /// 获取或设置图片 ID。 + /// + [Newtonsoft.Json.JsonProperty("image_id")] + [System.Text.Json.Serialization.JsonPropertyName("image_id")] + public string ImageId { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/SaaS/Apply/AppsECPaySaaSQueryMerchantStatusRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/SaaS/Apply/AppsECPaySaaSQueryMerchantStatusRequest.cs similarity index 88% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/SaaS/Apply/AppsECPaySaaSQueryMerchantStatusRequest.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/SaaS/Apply/AppsECPaySaaSQueryMerchantStatusRequest.cs index a2d087fc..fce3763f 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/SaaS/Apply/AppsECPaySaaSQueryMerchantStatusRequest.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/SaaS/Apply/AppsECPaySaaSQueryMerchantStatusRequest.cs @@ -3,10 +3,10 @@ /// /// 表示 [POST] /apps/ecpay/saas/query_merchant_status 接口的请求。 /// - public class AppsECPaySaaSQueryMerchantStatusRequest : ByteDanceMicroAppRequest + public class AppsECPaySaaSQueryMerchantStatusRequest : DouyinMicroAppRequest { /// - /// 获取或设置小程序第三方平台应用 ID。如果不指定将使用构造 时的 参数。 + /// 获取或设置小程序第三方平台应用 ID。如果不指定将使用构造 时的 参数。 /// [Newtonsoft.Json.JsonProperty("thirdparty_id")] [System.Text.Json.Serialization.JsonPropertyName("thirdparty_id")] diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/SaaS/Apply/AppsECPaySaaSQueryMerchantStatusResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/SaaS/Apply/AppsECPaySaaSQueryMerchantStatusResponse.cs similarity index 84% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/SaaS/Apply/AppsECPaySaaSQueryMerchantStatusResponse.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/SaaS/Apply/AppsECPaySaaSQueryMerchantStatusResponse.cs index abbd3e4b..8b6a4f2d 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/SaaS/Apply/AppsECPaySaaSQueryMerchantStatusResponse.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/SaaS/Apply/AppsECPaySaaSQueryMerchantStatusResponse.cs @@ -1,11 +1,11 @@ -using System.Collections.Generic; +using System.Collections.Generic; namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models { /// /// 表示 [POST] /apps/ecpay/saas/query_merchant_status 接口的响应。 /// - public class AppsECPaySaaSQueryMerchantStatusResponse : ByteDanceMicroAppResponse + public class AppsECPaySaaSQueryMerchantStatusResponse : DouyinMicroAppResponse { public static class Types { @@ -48,20 +48,6 @@ public class MerchantStatusInfo } } - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_no")] - [System.Text.Json.Serialization.JsonPropertyName("err_no")] - public override long ErrorCode { get; set; } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_tips")] - [System.Text.Json.Serialization.JsonPropertyName("err_tips")] - public override string? ErrorMessage { get; set; } - /// /// 获取或设置微信支付渠道进件状态。 /// diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/SaaS/PageLinks/AppsECPaySaaSAddMerchantRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/SaaS/PageLinks/AppsECPaySaaSAddMerchantRequest.cs similarity index 83% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/SaaS/PageLinks/AppsECPaySaaSAddMerchantRequest.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/SaaS/PageLinks/AppsECPaySaaSAddMerchantRequest.cs index 06c3f278..2005535a 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/SaaS/PageLinks/AppsECPaySaaSAddMerchantRequest.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/SaaS/PageLinks/AppsECPaySaaSAddMerchantRequest.cs @@ -3,10 +3,10 @@ /// /// 表示 [POST] /apps/ecpay/saas/add_merchant 接口的请求。 /// - public class AppsECPaySaaSAddMerchantRequest : ByteDanceMicroAppRequest + public class AppsECPaySaaSAddMerchantRequest : DouyinMicroAppRequest { /// - /// 获取或设置小程序第三方平台应用 ID。如果不指定将使用构造 时的 参数。 + /// 获取或设置小程序第三方平台应用 ID。如果不指定将使用构造 时的 参数。 /// [Newtonsoft.Json.JsonProperty("thirdparty_component_id")] [System.Text.Json.Serialization.JsonPropertyName("thirdparty_component_id")] diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/SaaS/PageLinks/AppsECPaySaaSAddMerchantResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/SaaS/PageLinks/AppsECPaySaaSAddMerchantResponse.cs new file mode 100644 index 00000000..72fcf883 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/SaaS/PageLinks/AppsECPaySaaSAddMerchantResponse.cs @@ -0,0 +1,22 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/ecpay/saas/add_merchant 接口的响应。 + /// + public class AppsECPaySaaSAddMerchantResponse : DouyinMicroAppResponse + { + /// + /// 获取或设置请求页面链接。 + /// + [Newtonsoft.Json.JsonProperty("url")] + [System.Text.Json.Serialization.JsonPropertyName("url")] + public string Url { get; set; } = default!; + + /// + /// 获取或设置商户号。 + /// + [Newtonsoft.Json.JsonProperty("merchant_id")] + [System.Text.Json.Serialization.JsonPropertyName("merchant_id")] + public string MerchantId { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/SaaS/PageLinks/AppsECPaySaaSAddSubMerchantRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/SaaS/PageLinks/AppsECPaySaaSAddSubMerchantRequest.cs similarity index 85% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/SaaS/PageLinks/AppsECPaySaaSAddSubMerchantRequest.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/SaaS/PageLinks/AppsECPaySaaSAddSubMerchantRequest.cs index 5571e954..7329def5 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/SaaS/PageLinks/AppsECPaySaaSAddSubMerchantRequest.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/SaaS/PageLinks/AppsECPaySaaSAddSubMerchantRequest.cs @@ -3,10 +3,10 @@ /// /// 表示 [POST] /apps/ecpay/saas/add_sub_merchant 接口的请求。 /// - public class AppsECPaySaaSAddSubMerchantRequest : ByteDanceMicroAppRequest + public class AppsECPaySaaSAddSubMerchantRequest : DouyinMicroAppRequest { /// - /// 获取或设置小程序第三方平台应用 ID。如果不指定将使用构造 时的 参数。 + /// 获取或设置小程序第三方平台应用 ID。如果不指定将使用构造 时的 参数。 /// [Newtonsoft.Json.JsonProperty("thirdparty_id")] [System.Text.Json.Serialization.JsonPropertyName("thirdparty_id")] diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/SaaS/PageLinks/AppsECPaySaaSAddSubMerchantResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/SaaS/PageLinks/AppsECPaySaaSAddSubMerchantResponse.cs new file mode 100644 index 00000000..4d566553 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/SaaS/PageLinks/AppsECPaySaaSAddSubMerchantResponse.cs @@ -0,0 +1,22 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/ecpay/saas/add_sub_merchant 接口的响应。 + /// + public class AppsECPaySaaSAddSubMerchantResponse : DouyinMicroAppResponse + { + /// + /// 获取或设置请求页面链接。 + /// + [Newtonsoft.Json.JsonProperty("url")] + [System.Text.Json.Serialization.JsonPropertyName("url")] + public string Url { get; set; } = default!; + + /// + /// 获取或设置商户号。 + /// + [Newtonsoft.Json.JsonProperty("merchant_id")] + [System.Text.Json.Serialization.JsonPropertyName("merchant_id")] + public string MerchantId { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/SaaS/PageLinks/AppsECPaySaaSAppAddSubMerchantRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/SaaS/PageLinks/AppsECPaySaaSAppAddSubMerchantRequest.cs similarity index 94% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/SaaS/PageLinks/AppsECPaySaaSAppAddSubMerchantRequest.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/SaaS/PageLinks/AppsECPaySaaSAppAddSubMerchantRequest.cs index 8112e4c7..86da6515 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/SaaS/PageLinks/AppsECPaySaaSAppAddSubMerchantRequest.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/SaaS/PageLinks/AppsECPaySaaSAppAddSubMerchantRequest.cs @@ -3,7 +3,7 @@ /// /// 表示 [POST] /apps/ecpay/saas/app_add_sub_merchant 接口的请求。 /// - public class AppsECPaySaaSAppAddSubMerchantRequest : ByteDanceMicroAppRequest + public class AppsECPaySaaSAppAddSubMerchantRequest : DouyinMicroAppRequest { /// /// 获取或设置小程序的 AppId。 diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/SaaS/PageLinks/AppsECPaySaaSAppAddSubMerchantResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/SaaS/PageLinks/AppsECPaySaaSAppAddSubMerchantResponse.cs new file mode 100644 index 00000000..be56f334 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/SaaS/PageLinks/AppsECPaySaaSAppAddSubMerchantResponse.cs @@ -0,0 +1,22 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/ecpay/saas/app_add_sub_merchant 接口的响应。 + /// + public class AppsECPaySaaSAppAddSubMerchantResponse : DouyinMicroAppResponse + { + /// + /// 获取或设置请求页面链接。 + /// + [Newtonsoft.Json.JsonProperty("url")] + [System.Text.Json.Serialization.JsonPropertyName("url")] + public string Url { get; set; } = default!; + + /// + /// 获取或设置商户号。 + /// + [Newtonsoft.Json.JsonProperty("merchant_id")] + [System.Text.Json.Serialization.JsonPropertyName("merchant_id")] + public string MerchantId { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/SaaS/PageLinks/AppsECPaySaaSGetAppMerchantRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/SaaS/PageLinks/AppsECPaySaaSGetAppMerchantRequest.cs similarity index 88% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/SaaS/PageLinks/AppsECPaySaaSGetAppMerchantRequest.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/SaaS/PageLinks/AppsECPaySaaSGetAppMerchantRequest.cs index 22ec3d95..5290c493 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/SaaS/PageLinks/AppsECPaySaaSGetAppMerchantRequest.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/SaaS/PageLinks/AppsECPaySaaSGetAppMerchantRequest.cs @@ -3,10 +3,10 @@ /// /// 表示 [POST] /apps/ecpay/saas/get_app_merchant 接口的请求。 /// - public class AppsECPaySaaSGetAppMerchantRequest : ByteDanceMicroAppRequest + public class AppsECPaySaaSGetAppMerchantRequest : DouyinMicroAppRequest { /// - /// 获取或设置小程序第三方平台应用 ID。如果不指定将使用构造 时的 参数。 + /// 获取或设置小程序第三方平台应用 ID。如果不指定将使用构造 时的 参数。 /// [Newtonsoft.Json.JsonProperty("thirdparty_id")] [System.Text.Json.Serialization.JsonPropertyName("thirdparty_id")] diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/SaaS/PageLinks/AppsECPaySaaSGetAppMerchantResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/SaaS/PageLinks/AppsECPaySaaSGetAppMerchantResponse.cs new file mode 100644 index 00000000..15e9442b --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/SaaS/PageLinks/AppsECPaySaaSGetAppMerchantResponse.cs @@ -0,0 +1,22 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/ecpay/saas/get_app_merchant 接口的响应。 + /// + public class AppsECPaySaaSGetAppMerchantResponse : DouyinMicroAppResponse + { + /// + /// 获取或设置请求页面链接。 + /// + [Newtonsoft.Json.JsonProperty("url")] + [System.Text.Json.Serialization.JsonPropertyName("url")] + public string Url { get; set; } = default!; + + /// + /// 获取或设置商户号。 + /// + [Newtonsoft.Json.JsonProperty("merchant_id")] + [System.Text.Json.Serialization.JsonPropertyName("merchant_id")] + public string MerchantId { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/SaaS/Withdraw/AppsECPaySaaSMerchantWithdrawRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/SaaS/Withdraw/AppsECPaySaaSMerchantWithdrawRequest.cs similarity index 97% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/SaaS/Withdraw/AppsECPaySaaSMerchantWithdrawRequest.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/SaaS/Withdraw/AppsECPaySaaSMerchantWithdrawRequest.cs index b7644fec..38b98b0d 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/SaaS/Withdraw/AppsECPaySaaSMerchantWithdrawRequest.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/SaaS/Withdraw/AppsECPaySaaSMerchantWithdrawRequest.cs @@ -3,7 +3,7 @@ /// /// 表示 [POST] /apps/ecpay/saas/merchant_withdraw 接口的请求。 /// - public class AppsECPaySaaSMerchantWithdrawRequest : ByteDanceMicroAppRequest + public class AppsECPaySaaSMerchantWithdrawRequest : DouyinMicroAppRequest { /// /// 获取或设置小程序第三方平台应用 ID。 diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/SaaS/Withdraw/AppsECPaySaaSMerchantWithdrawResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/SaaS/Withdraw/AppsECPaySaaSMerchantWithdrawResponse.cs new file mode 100644 index 00000000..deba19fd --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/SaaS/Withdraw/AppsECPaySaaSMerchantWithdrawResponse.cs @@ -0,0 +1,15 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/ecpay/saas/merchant_withdraw 接口的响应。 + /// + public class AppsECPaySaaSMerchantWithdrawResponse : DouyinMicroAppResponse + { + /// + /// 获取或设置平台提现单号。 + /// + [Newtonsoft.Json.JsonProperty("order_id")] + [System.Text.Json.Serialization.JsonPropertyName("order_id")] + public string OrderId { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/SaaS/Withdraw/AppsECPaySaaSQueryMerchantBalanceRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/SaaS/Withdraw/AppsECPaySaaSQueryMerchantBalanceRequest.cs similarity index 94% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/SaaS/Withdraw/AppsECPaySaaSQueryMerchantBalanceRequest.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/SaaS/Withdraw/AppsECPaySaaSQueryMerchantBalanceRequest.cs index cffabecf..969a5868 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/SaaS/Withdraw/AppsECPaySaaSQueryMerchantBalanceRequest.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/SaaS/Withdraw/AppsECPaySaaSQueryMerchantBalanceRequest.cs @@ -3,7 +3,7 @@ /// /// 表示 [POST] /apps/ecpay/saas/query_merchant_balance 接口的请求。 /// - public class AppsECPaySaaSQueryMerchantBalanceRequest : ByteDanceMicroAppRequest + public class AppsECPaySaaSQueryMerchantBalanceRequest : DouyinMicroAppRequest { /// /// 获取或设置小程序第三方平台应用 ID。 diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/SaaS/Withdraw/AppsECPaySaaSQueryMerchantBalanceResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/SaaS/Withdraw/AppsECPaySaaSQueryMerchantBalanceResponse.cs similarity index 83% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/SaaS/Withdraw/AppsECPaySaaSQueryMerchantBalanceResponse.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/SaaS/Withdraw/AppsECPaySaaSQueryMerchantBalanceResponse.cs index 17732c2f..b515b6b0 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/SaaS/Withdraw/AppsECPaySaaSQueryMerchantBalanceResponse.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/SaaS/Withdraw/AppsECPaySaaSQueryMerchantBalanceResponse.cs @@ -1,9 +1,9 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models { /// /// 表示 [POST] /apps/ecpay/saas/query_merchant_balance 接口的响应。 /// - public class AppsECPaySaaSQueryMerchantBalanceResponse : ByteDanceMicroAppResponse + public class AppsECPaySaaSQueryMerchantBalanceResponse : DouyinMicroAppResponse { public static class Types { @@ -63,20 +63,6 @@ public class Settlement } } - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_no")] - [System.Text.Json.Serialization.JsonPropertyName("err_no")] - public override long ErrorCode { get; set; } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_tips")] - [System.Text.Json.Serialization.JsonPropertyName("err_tips")] - public override string? ErrorMessage { get; set; } - /// /// 获取或设置余额信息。 /// diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/SaaS/Withdraw/AppsECPaySaaSQueryWithdrawOrderRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/SaaS/Withdraw/AppsECPaySaaSQueryWithdrawOrderRequest.cs similarity index 95% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/SaaS/Withdraw/AppsECPaySaaSQueryWithdrawOrderRequest.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/SaaS/Withdraw/AppsECPaySaaSQueryWithdrawOrderRequest.cs index ee8d7e8c..68ecdd95 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/SaaS/Withdraw/AppsECPaySaaSQueryWithdrawOrderRequest.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/SaaS/Withdraw/AppsECPaySaaSQueryWithdrawOrderRequest.cs @@ -3,7 +3,7 @@ /// /// 表示 [POST] /apps/ecpay/saas/query_withdraw_order 接口的请求。 /// - public class AppsECPaySaaSQueryWithdrawOrderRequest : ByteDanceMicroAppRequest + public class AppsECPaySaaSQueryWithdrawOrderRequest : DouyinMicroAppRequest { /// /// 获取或设置小程序第三方平台应用 ID。 diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/SaaS/Withdraw/AppsECPaySaaSQueryWithdrawOrderResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/SaaS/Withdraw/AppsECPaySaaSQueryWithdrawOrderResponse.cs similarity index 83% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/SaaS/Withdraw/AppsECPaySaaSQueryWithdrawOrderResponse.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/SaaS/Withdraw/AppsECPaySaaSQueryWithdrawOrderResponse.cs index ed691bff..14883d91 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsECPay/SaaS/Withdraw/AppsECPaySaaSQueryWithdrawOrderResponse.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsECPay/SaaS/Withdraw/AppsECPaySaaSQueryWithdrawOrderResponse.cs @@ -1,9 +1,9 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models { /// /// 表示 [POST] /apps/ecpay/saas/query_withdraw_order 接口的响应。 /// - public class AppsECPaySaaSQueryWithdrawOrderResponse : ByteDanceMicroAppResponse + public class AppsECPaySaaSQueryWithdrawOrderResponse : DouyinMicroAppResponse { public static class Types { @@ -63,20 +63,6 @@ public class Settlement } } - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_no")] - [System.Text.Json.Serialization.JsonPropertyName("err_no")] - public override long ErrorCode { get; set; } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_tips")] - [System.Text.Json.Serialization.JsonPropertyName("err_tips")] - public override string? ErrorMessage { get; set; } - /// /// 获取或设置提现状态。 /// diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsGame/AppsGameWalletAddCoinRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsGame/AppsGameWalletAddCoinRequest.cs similarity index 100% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsGame/AppsGameWalletAddCoinRequest.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsGame/AppsGameWalletAddCoinRequest.cs diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsGame/AppsGameWalletAddCoinResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsGame/AppsGameWalletAddCoinResponse.cs similarity index 83% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsGame/AppsGameWalletAddCoinResponse.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsGame/AppsGameWalletAddCoinResponse.cs index 32500ecc..16636b33 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsGame/AppsGameWalletAddCoinResponse.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsGame/AppsGameWalletAddCoinResponse.cs @@ -1,9 +1,9 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models { /// /// 表示 [POST] /apps/game/wallet/add_coin 接口的响应。 /// - public class AppsGameWalletAddCoinResponse : ByteDanceMicroAppResponse + public class AppsGameWalletAddCoinResponse : AppsGameWalletResponseBase { /// /// 获取或设置赠送游戏币的订单号。 diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsGame/AppsGameWalletGamePayRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsGame/AppsGameWalletGamePayRequest.cs similarity index 100% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsGame/AppsGameWalletGamePayRequest.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsGame/AppsGameWalletGamePayRequest.cs diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsGame/AppsGameWalletGamePayResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsGame/AppsGameWalletGamePayResponse.cs similarity index 87% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsGame/AppsGameWalletGamePayResponse.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsGame/AppsGameWalletGamePayResponse.cs index 702eb9ff..ca753b53 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsGame/AppsGameWalletGamePayResponse.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsGame/AppsGameWalletGamePayResponse.cs @@ -1,9 +1,9 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models { /// /// 表示 [POST] /apps/game/wallet/game_pay 接口的响应。 /// - public class AppsGameWalletGamePayResponse : ByteDanceMicroAppResponse + public class AppsGameWalletGamePayResponse : AppsGameWalletResponseBase { /// /// 获取或设置订单号。 diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsGame/AppsGameWalletGetBalanceRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsGame/AppsGameWalletGetBalanceRequest.cs similarity index 100% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsGame/AppsGameWalletGetBalanceRequest.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsGame/AppsGameWalletGetBalanceRequest.cs diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsGame/AppsGameWalletGetBalanceResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsGame/AppsGameWalletGetBalanceResponse.cs similarity index 92% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsGame/AppsGameWalletGetBalanceResponse.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsGame/AppsGameWalletGetBalanceResponse.cs index f118d1da..e52e6ed7 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsGame/AppsGameWalletGetBalanceResponse.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsGame/AppsGameWalletGetBalanceResponse.cs @@ -1,9 +1,9 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models { /// /// 表示 [POST] /apps/game/wallet/get_balance 接口的响应。 /// - public class AppsGameWalletGetBalanceResponse : ByteDanceMicroAppResponse + public class AppsGameWalletGetBalanceResponse : AppsGameWalletResponseBase { /// /// 获取或设置游戏币数量。 diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsGame/Abstractions/AppsGameWalletRequestBase.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsGame/__Abstractions/AppsGameWalletRequestBase.cs similarity index 86% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsGame/Abstractions/AppsGameWalletRequestBase.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsGame/__Abstractions/AppsGameWalletRequestBase.cs index 0eb9fe3a..576292e1 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsGame/Abstractions/AppsGameWalletRequestBase.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsGame/__Abstractions/AppsGameWalletRequestBase.cs @@ -1,16 +1,14 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models { - public abstract class AppsGameWalletRequestBase : ByteDanceMicroAppRequest + public abstract class AppsGameWalletRequestBase : DouyinMicroAppRequest { - /// /// - /// [Newtonsoft.Json.JsonProperty("access_token")] [System.Text.Json.Serialization.JsonPropertyName("access_token")] public override string? AccessToken { get; set; } /// - /// 获取或设置小程序 AppId。如果不指定将使用构造 时的 参数。 + /// 获取或设置小程序 AppId。如果不指定将使用构造 时的 参数。 /// [Newtonsoft.Json.JsonProperty("appid")] [System.Text.Json.Serialization.JsonPropertyName("appid")] @@ -32,7 +30,7 @@ public abstract class AppsGameWalletRequestBase : ByteDanceMicroAppRequest /// /// 获取或设置平台。 - /// 默认值:android + /// 默认值:"android" /// [Newtonsoft.Json.JsonProperty("pf")] [System.Text.Json.Serialization.JsonPropertyName("pf")] diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsGame/__Abstractions/AppsGameWalletResponseBase.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsGame/__Abstractions/AppsGameWalletResponseBase.cs new file mode 100644 index 00000000..0293839b --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsGame/__Abstractions/AppsGameWalletResponseBase.cs @@ -0,0 +1,22 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + public abstract class AppsGameWalletResponseBase : DouyinMicroAppResponse + { + /// + /// 获取或设置错误码。 + /// + [Newtonsoft.Json.JsonProperty("errcode")] + [System.Text.Json.Serialization.JsonPropertyName("errcode")] + public int ErrorCode { get; set; } + + /// + [Newtonsoft.Json.JsonProperty("errmsg")] + [System.Text.Json.Serialization.JsonPropertyName("errmsg")] + public override string? ErrorMessage { get; set; } + + public override bool IsSuccessful() + { + return base.IsSuccessful() && ErrorCode == 0; + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsStorage/AppsRemoveUserStorageRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsStorage/AppsRemoveUserStorageRequest.cs similarity index 95% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsStorage/AppsRemoveUserStorageRequest.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsStorage/AppsRemoveUserStorageRequest.cs index 0dc9eb74..203af033 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsStorage/AppsRemoveUserStorageRequest.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsStorage/AppsRemoveUserStorageRequest.cs @@ -5,7 +5,7 @@ namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models /// /// 表示 [POST] /apps/remove_user_storage 接口的请求。 /// - public class AppsRemoveUserStorageRequest : ByteDanceMicroAppRequest + public class AppsRemoveUserStorageRequest : DouyinMicroAppRequest { public static class Types { diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsStorage/AppsRemoveUserStorageResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsStorage/AppsRemoveUserStorageResponse.cs new file mode 100644 index 00000000..551b1404 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsStorage/AppsRemoveUserStorageResponse.cs @@ -0,0 +1,13 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/remove_user_storage 接口的响应。 + /// + public class AppsRemoveUserStorageResponse : DouyinMicroAppResponse + { + public override bool IsSuccessful() + { + return base.IsSuccessful() && ErrorNumber == 0; + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsStorage/AppsSetUserStorageRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsStorage/AppsSetUserStorageRequest.cs similarity index 96% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsStorage/AppsSetUserStorageRequest.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsStorage/AppsSetUserStorageRequest.cs index e17acee8..e1b8fc44 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/AppsStorage/AppsSetUserStorageRequest.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsStorage/AppsSetUserStorageRequest.cs @@ -5,7 +5,7 @@ namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models /// /// 表示 [POST] /apps/set_user_storage 接口的请求。 /// - public class AppsSetUserStorageRequest : ByteDanceMicroAppRequest + public class AppsSetUserStorageRequest : DouyinMicroAppRequest { public static class Types { diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsStorage/AppsSetUserStorageResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsStorage/AppsSetUserStorageResponse.cs new file mode 100644 index 00000000..857ec785 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/AppsStorage/AppsSetUserStorageResponse.cs @@ -0,0 +1,13 @@ +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +{ + /// + /// 表示 [POST] /apps/set_user_storage 接口的响应。 + /// + public class AppsSetUserStorageResponse : DouyinMicroAppResponse + { + public override bool IsSuccessful() + { + return base.IsSuccessful() && ErrorNumber == 0; + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Comment/CommentOpenGetRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Comment/CommentOpenGetRequest.cs similarity index 85% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Comment/CommentOpenGetRequest.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Comment/CommentOpenGetRequest.cs index 972e2a59..224aec5e 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Comment/CommentOpenGetRequest.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Comment/CommentOpenGetRequest.cs @@ -3,17 +3,15 @@ namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models /// /// 表示 [POST] /comment/open/get 接口的请求。 /// - public class CommentOpenGetRequest : ByteDanceMicroAppRequest + public class CommentOpenGetRequest : DouyinMicroAppRequest { - /// /// - /// [Newtonsoft.Json.JsonProperty("access_token")] [System.Text.Json.Serialization.JsonPropertyName("access_token")] public override string? AccessToken { get; set; } /// - /// 获取或设置小程序的 AppId。如果不指定将使用构造 时的 参数。 + /// 获取或设置小程序 AppId。如果不指定将使用构造 时的 参数。 /// [Newtonsoft.Json.JsonProperty("app_id")] [System.Text.Json.Serialization.JsonPropertyName("app_id")] diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Comment/CommentOpenGetResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Comment/CommentOpenGetResponse.cs similarity index 90% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Comment/CommentOpenGetResponse.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Comment/CommentOpenGetResponse.cs index 9d96fbbe..49afd041 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Comment/CommentOpenGetResponse.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Comment/CommentOpenGetResponse.cs @@ -5,7 +5,7 @@ namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models /// /// 表示 [POST] /comment/open/get 接口的响应。 /// - public class CommentOpenGetResponse : ByteDanceMicroAppResponse + public class CommentOpenGetResponse : DouyinMicroAppResponse { public static class Types { @@ -90,9 +90,9 @@ public class User /// 获取或设置创建时间。 /// [Newtonsoft.Json.JsonProperty("create_time")] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.CSTDateTimeOffsetConverter))] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Internal.CstDateTimeOffsetConverter))] [System.Text.Json.Serialization.JsonPropertyName("create_time")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.CSTDateTimeOffsetConverter))] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Internal.CstDateTimeOffsetConverter))] public DateTimeOffset CreateTime { get; set; } /// @@ -127,20 +127,6 @@ public class User } } - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_no")] - [System.Text.Json.Serialization.JsonPropertyName("err_no")] - public override long ErrorCode { get; set; } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("err_msg")] - [System.Text.Json.Serialization.JsonPropertyName("err_msg")] - public override string? ErrorMessage { get; set; } - /// /// 获取或设置返回数据。 /// diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Tags/TagsImageV2Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Tags/TagsImageV2Request.cs similarity index 95% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Tags/TagsImageV2Request.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Tags/TagsImageV2Request.cs index d6460025..21d28709 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Tags/TagsImageV2Request.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Tags/TagsImageV2Request.cs @@ -5,7 +5,7 @@ namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models /// /// 表示 [POST] /v2/tags/image 接口的请求。 /// - public class TagsImageV2Request : ByteDanceMicroAppRequest + public class TagsImageV2Request : DouyinMicroAppRequest { public static class Types { diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Tags/TagsImageV2Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Tags/TagsImageV2Response.cs similarity index 88% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Tags/TagsImageV2Response.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Tags/TagsImageV2Response.cs index 41b8e85d..3e91c187 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Tags/TagsImageV2Response.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Tags/TagsImageV2Response.cs @@ -1,9 +1,9 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models { /// /// 表示 [POST] /v2/tags/image 接口的响应。 /// - public class TagsImageV2Response : ByteDanceMicroAppResponse + public class TagsImageV2Response : DouyinMicroAppResponse { public static class Types { @@ -33,7 +33,7 @@ public class Predict [Newtonsoft.Json.JsonProperty("prob")] [System.Text.Json.Serialization.JsonPropertyName("prob")] [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)] - public double Probability { get; set; } + public decimal Probability { get; set; } } } @@ -75,17 +75,15 @@ public class Predict } /// - /// + /// 获取或设置错误代码。 /// [Newtonsoft.Json.JsonProperty("code")] [System.Text.Json.Serialization.JsonPropertyName("code")] - public override long ErrorCode { get; set; } + public int ErrorCode { get; set; } - /// /// - /// - [Newtonsoft.Json.JsonProperty("exception")] - [System.Text.Json.Serialization.JsonPropertyName("exception")] + [Newtonsoft.Json.JsonProperty("message")] + [System.Text.Json.Serialization.JsonPropertyName("message")] public override string? ErrorMessage { get; set; } /// @@ -104,7 +102,7 @@ public class Predict public override bool IsSuccessful() { - return base.IsSuccessful() && string.IsNullOrEmpty(ErrorId); + return base.IsSuccessful() && ErrorCode == 0 && string.IsNullOrEmpty(ErrorId); } } } diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Tags/TagsTextAntiDirtV2Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Tags/TagsTextAntiDirtV2Request.cs similarity index 93% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Tags/TagsTextAntiDirtV2Request.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Tags/TagsTextAntiDirtV2Request.cs index e2f65f89..40ab5760 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Tags/TagsTextAntiDirtV2Request.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Tags/TagsTextAntiDirtV2Request.cs @@ -5,7 +5,7 @@ namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models /// /// 表示 [POST] /v2/tags/text/antidirt 接口的请求。 /// - public class TagsTextAntiDirtV2Request : ByteDanceMicroAppRequest + public class TagsTextAntiDirtV2Request : DouyinMicroAppRequest { public static class Types { diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Tags/TagsTextAntiDirtV2Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Tags/TagsTextAntiDirtV2Response.cs similarity index 89% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Tags/TagsTextAntiDirtV2Response.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Tags/TagsTextAntiDirtV2Response.cs index ceffd126..84e43b71 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/Tags/TagsTextAntiDirtV2Response.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Models/_Legacy/Tags/TagsTextAntiDirtV2Response.cs @@ -1,9 +1,9 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Models { /// /// 表示 [POST] /v2/tags/text/antidirt 接口的响应。 /// - public class TagsTextAntiDirtV2Response : ByteDanceMicroAppResponse + public class TagsTextAntiDirtV2Response : DouyinMicroAppResponse { public static class Types { @@ -33,7 +33,7 @@ public class Predict [Newtonsoft.Json.JsonProperty("prob")] [System.Text.Json.Serialization.JsonPropertyName("prob")] [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)] - public double Probability { get; set; } + public decimal Probability { get; set; } /// /// 获取或设置置信度结果。 @@ -82,17 +82,15 @@ public class Predict } /// - /// + /// 获取或设置错误代码。 /// [Newtonsoft.Json.JsonProperty("code")] [System.Text.Json.Serialization.JsonPropertyName("code")] - public override long ErrorCode { get; set; } + public int ErrorCode { get; set; } - /// /// - /// - [Newtonsoft.Json.JsonProperty("exception")] - [System.Text.Json.Serialization.JsonPropertyName("exception")] + [Newtonsoft.Json.JsonProperty("message")] + [System.Text.Json.Serialization.JsonPropertyName("message")] public override string? ErrorMessage { get; set; } /// @@ -111,7 +109,7 @@ public class Predict public override bool IsSuccessful() { - return base.IsSuccessful() && string.IsNullOrEmpty(ErrorId); + return base.IsSuccessful() && ErrorCode == 0 && string.IsNullOrEmpty(ErrorId); } } } diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/README.md b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/README.md index 464cc6e7..39f4f660 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/README.md +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/README.md @@ -2,15 +2,16 @@ [![GitHub Stars](https://img.shields.io/github/stars/fudiwei/DotNetCore.SKIT.FlurlHttpClient.ByteDance?logo=github&label=Stars)](https://github.com/fudiwei/DotNetCore.SKIT.FlurlHttpClient.ByteDance) [![GitHub Forks](https://img.shields.io/github/forks/fudiwei/DotNetCore.SKIT.FlurlHttpClient.ByteDance?logo=github&label=Forks)](https://github.com/fudiwei/DotNetCore.SKIT.FlurlHttpClient.ByteDance) [![NuGet Download](https://img.shields.io/nuget/dt/SKIT.FlurlHttpClient.ByteDance.MicroApp.svg?sanitize=true&label=Downloads)](https://www.nuget.org/packages/SKIT.FlurlHttpClient.ByteDance.MicroApp) [![License](https://img.shields.io/github/license/fudiwei/DotNetCore.SKIT.FlurlHttpClient.ByteDance?label=License)](https://mit-license.org/) -基于 `Flurl.Http` 的字节小程序开放平台 HTTP API SDK。 +基于 `Flurl.Http` 的抖音小程序开放平台 HTTP API SDK。 --- ### 【功能特性】 -- 基于字节小程序开放平台 API 封装。 -- 提供了字节小程序所需的 AES、MD5、SHA-1、HMAC-SHA-256 等算法工具类。 +- 基于抖音小程序开放平台 API 封装。 +- 提供了抖音小程序所需的 RSA、AES、MD5、SHA-1、HMAC-SHA-256 等算法工具类。 - 提供了解析回调通知事件等扩展方法。 +- 配合 [SKIT.FlurlHttpClient.ByteDance.DouyinOpen](https://www.nuget.org/packages/SKIT.FlurlHttpClient.ByteDance.DouyinOpen) 模块,可无缝对接抖音开放平台。 --- diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/ByteDanceMicroAppOpenApiClient.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/ByteDanceMicroAppOpenApiClient.cs deleted file mode 100644 index 14e40852..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/ByteDanceMicroAppOpenApiClient.cs +++ /dev/null @@ -1,130 +0,0 @@ -using System; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Flurl.Http; - -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi -{ - /// - /// 一个字节小程序服务商平台 API HTTP 客户端。 - /// - public class ByteDanceMicroAppOpenApiClient : CommonClientBase, ICommonClient - { - /// - /// 获取当前客户端使用的字节小程序凭证。 - /// - public Settings.Credentials Credentials { get; } - - /// - /// 用指定的配置项初始化 类的新实例。 - /// - /// 配置项。 - public ByteDanceMicroAppOpenApiClient(ByteDanceMicroAppOpenApiClientOptions options) - : base() - { - if (options == null) throw new ArgumentNullException(nameof(options)); - - Credentials = new Settings.Credentials(options); - - FlurlClient.BaseUrl = options.Endpoints ?? ByteDanceMicroAppOpenApiEndpoints.DEFAULT; - FlurlClient.WithTimeout(TimeSpan.FromMilliseconds(options.Timeout)); - } - - /// - /// 用指定的字节小程序服务商 AppId、字节小程序服务商 AppSecret 初始化 类的新实例。 - /// - /// 字节小程序服务商 AppId。 - /// 字节小程序服务商 AppSecret。 - public ByteDanceMicroAppOpenApiClient(string componentAppId, string componentAppSecret) - : this(new ByteDanceMicroAppOpenApiClientOptions() { ComponentAppId = componentAppId, ComponentAppSecret = componentAppSecret }) - { - } - - /// - /// 使用当前客户端生成一个新的 对象。 - /// - /// - /// - /// - /// - public IFlurlRequest CreateRequest(ByteDanceMicroAppOpenApiRequest request, HttpMethod method, params object[] urlSegments) - { - IFlurlRequest flurlRequest = FlurlClient.Request(urlSegments).WithVerb(method); - - if (request.Timeout != null) - { - flurlRequest.WithTimeout(TimeSpan.FromMilliseconds(request.Timeout.Value)); - } - - if (request.ComponentAppId == null) - { - request.ComponentAppId = Credentials.ComponentAppId; - } - - return flurlRequest; - } - - /// - /// 异步发起请求。 - /// - /// - /// - /// - /// - /// - public async Task SendRequestAsync(IFlurlRequest flurlRequest, HttpContent? httpContent = null, CancellationToken cancellationToken = default) - where T : ByteDanceMicroAppOpenApiResponse, new() - { - if (flurlRequest == null) throw new ArgumentNullException(nameof(flurlRequest)); - - try - { - using IFlurlResponse flurlResponse = await base.SendRequestAsync(flurlRequest, httpContent, cancellationToken); - return await WrapResponseWithJsonAsync(flurlResponse, cancellationToken); - } - catch (FlurlHttpTimeoutException ex) - { - throw new Exceptions.ByteDanceMicroAppRequestTimeoutException(ex.Message, ex); - } - catch (FlurlHttpException ex) - { - throw new ByteDanceMicroAppException(ex.Message, ex); - } - } - - /// - /// 异步发起请求。 - /// - /// - /// - /// - /// - /// - public async Task SendRequestWithJsonAsync(IFlurlRequest flurlRequest, object? data = null, CancellationToken cancellationToken = default) - where T : ByteDanceMicroAppOpenApiResponse, new() - { - if (flurlRequest == null) throw new ArgumentNullException(nameof(flurlRequest)); - - try - { - bool isSimpleRequest = data == null || - flurlRequest.Verb == HttpMethod.Get || - flurlRequest.Verb == HttpMethod.Head || - flurlRequest.Verb == HttpMethod.Options; - using IFlurlResponse flurlResponse = isSimpleRequest ? - await base.SendRequestAsync(flurlRequest, null, cancellationToken) : - await base.SendRequestWithJsonAsync(flurlRequest, data, cancellationToken); - return await WrapResponseWithJsonAsync(flurlResponse, cancellationToken); - } - catch (FlurlHttpTimeoutException ex) - { - throw new Exceptions.ByteDanceMicroAppRequestTimeoutException(ex.Message, ex); - } - catch (FlurlHttpException ex) - { - throw new ByteDanceMicroAppException(ex.Message, ex); - } - } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/ByteDanceMicroAppOpenApiClientOptions.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/ByteDanceMicroAppOpenApiClientOptions.cs deleted file mode 100644 index e66a4773..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/ByteDanceMicroAppOpenApiClientOptions.cs +++ /dev/null @@ -1,40 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi -{ - /// - /// 一个用于构造 时使用的配置项。 - /// - public class ByteDanceMicroAppOpenApiClientOptions - { - /// - /// 获取或设置请求超时时间(单位:毫秒)。 - /// 默认值:30000 - /// - public int Timeout { get; set; } = 30 * 1000; - - /// - /// 获取或设置字节小程序服务商平台 API 域名。 - /// 默认值: - /// - public string Endpoints { get; set; } = ByteDanceMicroAppOpenApiEndpoints.DEFAULT; - - /// - /// 获取或设置字节小程序服务商 AppId。 - /// - public string ComponentAppId { get; set; } = default!; - - /// - /// 获取或设置字节小程序服务商 AppSecret。 - /// - public string ComponentAppSecret { get; set; } = default!; - - /// - /// 获取或设置头条服务器推送的 Token。 - /// - public string? PushToken { get; set; } - - /// - /// 获取或设置头条服务器推送的 EncodingAESKey。 - /// - public string? PushEncodingAESKey { get; set; } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/ByteDanceMicroAppOpenApiEndpoints.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/ByteDanceMicroAppOpenApiEndpoints.cs deleted file mode 100644 index 99589b01..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/ByteDanceMicroAppOpenApiEndpoints.cs +++ /dev/null @@ -1,13 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi -{ - /// - /// 字节小程序服务商平台 API 接口域名。 - /// - public static class ByteDanceMicroAppOpenApiEndpoints - { - /// - /// 服务商平台接口域名(默认)。 - /// - public const string DEFAULT = "https://open.microapp.bytedance.com/openapi"; - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/ByteDanceMicroAppOpenApiEvent.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/ByteDanceMicroAppOpenApiEvent.cs deleted file mode 100644 index 42592071..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/ByteDanceMicroAppOpenApiEvent.cs +++ /dev/null @@ -1,54 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi -{ - /// - /// 表示字节小程序服务商平台 API 消息推送事件的基类。 - /// - public class ByteDanceMicroAppOpenApiEvent - { - public static class Serialization - { - [Newtonsoft.Json.JsonObject] - public interface IJsonSerializable - { - } - - [System.Xml.Serialization.XmlRoot("xml")] - public interface IXmlSerializable - { - } - } - - /// - /// 获取或设置第三方平台 AppId。 - /// - [Newtonsoft.Json.JsonProperty("TpAppId")] - [System.Text.Json.Serialization.JsonPropertyName("TpAppId")] - [System.Xml.Serialization.XmlElement("TpAppId", IsNullable = true)] - public virtual string? ComponentAppId { get; set; } - - /// - /// 获取或设置授权方 AppId。 - /// - [Newtonsoft.Json.JsonProperty("AppId")] - [System.Text.Json.Serialization.JsonPropertyName("AppId")] - [System.Xml.Serialization.XmlElement("AppId", IsNullable = true)] - public virtual string? AuthorizerAppId { get; set; } - - /// - /// 获取或设置事件类型。 - /// - [Newtonsoft.Json.JsonProperty("Event")] - [System.Text.Json.Serialization.JsonPropertyName("Event")] - [System.Xml.Serialization.XmlElement("Event", IsNullable = true)] - public virtual string? Event { get; set; } - - /// - /// 获取或设置事件产生时间字符串(格式:yyyy-MM-dd HH:mm:ss)。 - /// - [Newtonsoft.Json.JsonProperty("EventTime")] - [System.Text.Json.Serialization.JsonPropertyName("EventTime")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumericalStringReadOnlyConverter))] - [System.Xml.Serialization.XmlElement("EventTime", IsNullable = true)] - public virtual string? EventTimeString { get; set; } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/ByteDanceMicroAppOpenApiRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/ByteDanceMicroAppOpenApiRequest.cs deleted file mode 100644 index 08c10579..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/ByteDanceMicroAppOpenApiRequest.cs +++ /dev/null @@ -1,43 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi -{ - /// - /// 字节小程序服务商平台 API 请求的基类。 - /// - public abstract class ByteDanceMicroAppOpenApiRequest : ICommonRequest - { - /// - /// 获取或设置请求超时时间(单位:毫秒)。如果不指定将使用构造 时的 参数,这在需要指定特定耗时请求(比如上传或下载文件)的超时时间时很有用。 - /// - [Newtonsoft.Json.JsonIgnore] - [System.Text.Json.Serialization.JsonIgnore] - public virtual int? Timeout { get; set; } - - /// - /// 获取或设置字节小程序第三方 AppId。如果不指定将使用构造 时的 参数。 - /// - [Newtonsoft.Json.JsonIgnore] - [System.Text.Json.Serialization.JsonIgnore] - public virtual string? ComponentAppId { get; set; } - - /// - /// 获取或设置字节小程序第三方的 AccessToken。 - /// - [Newtonsoft.Json.JsonIgnore] - [System.Text.Json.Serialization.JsonIgnore] - public virtual string? ComponentAccessToken { get; set; } - - /// - /// 获取或设置字节小程序授权方 AppId。 - /// - [Newtonsoft.Json.JsonIgnore] - [System.Text.Json.Serialization.JsonIgnore] - public virtual string? AuthorizerAppId { get; set; } - - /// - /// 获取或设置字节小程序授权方的 AccessToken。 - /// - [Newtonsoft.Json.JsonIgnore] - [System.Text.Json.Serialization.JsonIgnore] - public virtual string? AuthorizerAccessToken { get; set; } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/ByteDanceMicroAppOpenApiResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/ByteDanceMicroAppOpenApiResponse.cs deleted file mode 100644 index 557aab05..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/ByteDanceMicroAppOpenApiResponse.cs +++ /dev/null @@ -1,89 +0,0 @@ -using System.Collections.Generic; - -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi -{ - /// - /// 字节小程序服务商平台 API 响应的基类。 - /// - public abstract class ByteDanceMicroAppOpenApiResponse : ICommonResponse - { - /// - /// - /// - int ICommonResponse.RawStatus { get; set; } - - /// - /// - /// - IDictionary ICommonResponse.RawHeaders { get; set; } = default!; - - /// - /// - /// - byte[] ICommonResponse.RawBytes { get; set; } = default!; - - /// - /// 获取原始的 HTTP 响应状态码。 - /// - [Newtonsoft.Json.JsonIgnore] - [System.Text.Json.Serialization.JsonIgnore] - public int RawStatus - { - get { return ((ICommonResponse)this).RawStatus; } - internal set { ((ICommonResponse)this).RawStatus = value; } - } - - /// - /// 获取原始的 HTTP 响应表头集合。 - /// - [Newtonsoft.Json.JsonIgnore] - [System.Text.Json.Serialization.JsonIgnore] - public IDictionary RawHeaders - { - get { return ((ICommonResponse)this).RawHeaders; } - internal set { ((ICommonResponse)this).RawHeaders = value; } - } - - /// - /// 获取原始的 HTTP 响应正文。 - /// - [Newtonsoft.Json.JsonIgnore] - [System.Text.Json.Serialization.JsonIgnore] - public byte[] RawBytes - { - get { return ((ICommonResponse)this).RawBytes; } - internal set { ((ICommonResponse)this).RawBytes = value; } - } - - /// - /// 获取字节小程序 API 返回的错误码。 - /// - [Newtonsoft.Json.JsonProperty("errno")] - [System.Text.Json.Serialization.JsonPropertyName("errno")] - public virtual int ErrorNumber { get; set; } - - /// - /// 获取字节小程序 API 返回的错误描述。 - /// - [Newtonsoft.Json.JsonProperty("message")] - [System.Text.Json.Serialization.JsonPropertyName("message")] - public virtual string? ErrorMessage { get; set; } - - /// - /// 获取字节小程序 API 返回的日志 ID。 - /// - [Newtonsoft.Json.JsonProperty("log_id")] - [System.Text.Json.Serialization.JsonPropertyName("log_id")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumericalStringReadOnlyConverter))] - public virtual string? LogId { get; set; } - - /// - /// 获取一个值,该值指示调用字节小程序 API 是否成功(即 HTTP 状态码为 200、且 `errcode` 值为 0)。 - /// - /// - public virtual bool IsSuccessful() - { - return RawStatus == 200 && ErrorNumber == 0; - } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Events/Auth/ComponentUnauthorizedEvent.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Events/Auth/ComponentUnauthorizedEvent.cs deleted file mode 100644 index 32be81cd..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Events/Auth/ComponentUnauthorizedEvent.cs +++ /dev/null @@ -1,10 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Events -{ - /// - /// 表示 EVENT.UNAUTHORIZED 事件的数据。 - /// REF: https://partner.open-douyin.com/docs/resource/zh-CN/thirdparty/API/smallprogram/authorization/notify - /// - public class ComponentUnauthorizedEvent : ByteDanceMicroAppOpenApiEvent, ByteDanceMicroAppOpenApiEvent.Serialization.IJsonSerializable, ByteDanceMicroAppOpenApiEvent.Serialization.IXmlSerializable - { - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Events/Auth/ComponentUpdateAuthorizedEvent.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Events/Auth/ComponentUpdateAuthorizedEvent.cs deleted file mode 100644 index c9306012..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Events/Auth/ComponentUpdateAuthorizedEvent.cs +++ /dev/null @@ -1,25 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Events -{ - /// - /// 表示 EVENT.UPDATE_AUTHORIZED 事件的数据。 - /// REF: https://partner.open-douyin.com/docs/resource/zh-CN/thirdparty/API/smallprogram/authorization/notify - /// - public class ComponentUpdateAuthorizedEvent : ByteDanceMicroAppOpenApiEvent, ByteDanceMicroAppOpenApiEvent.Serialization.IJsonSerializable, ByteDanceMicroAppOpenApiEvent.Serialization.IXmlSerializable - { - /// - /// 获取或设置授权码。 - /// - [Newtonsoft.Json.JsonProperty("AuthorizationCode")] - [System.Text.Json.Serialization.JsonPropertyName("AuthorizationCode")] - [System.Xml.Serialization.XmlElement("AuthorizationCode")] - public string AuthCode { get; set; } = default!; - - /// - /// 获取或设置授权码有效期(单位:秒)。 - /// - [Newtonsoft.Json.JsonProperty("AuthorizationCodeExpiresIn")] - [System.Text.Json.Serialization.JsonPropertyName("AuthorizationCodeExpiresIn")] - [System.Xml.Serialization.XmlElement("AuthorizationCodeExpiresIn")] - public long AuthCodeExpiresIn { get; set; } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Events/MicroAppManagement/AppNameResetEvent.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Events/MicroAppManagement/AppNameResetEvent.cs deleted file mode 100644 index 43666dc1..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Events/MicroAppManagement/AppNameResetEvent.cs +++ /dev/null @@ -1,17 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Events -{ - /// - /// 表示 EVENT.APP_NAME_RESET_NOTIFICATION 事件的数据。 - /// REF: https://partner.open-douyin.com/docs/resource/zh-CN/thirdparty/API/smallprogram/auth-app-manage/base-info/modify-name - /// - public class AppNameResetEvent : ByteDanceMicroAppOpenApiEvent, ByteDanceMicroAppOpenApiEvent.Serialization.IJsonSerializable, ByteDanceMicroAppOpenApiEvent.Serialization.IXmlSerializable - { - /// - /// 获取或设置名称重置通知。 - /// - [Newtonsoft.Json.JsonProperty("AppNameResetNotification")] - [System.Text.Json.Serialization.JsonPropertyName("AppNameResetNotification")] - [System.Xml.Serialization.XmlElement("AppNameResetNotification")] - public string AppNameResetNotification { get; set; } = default!; - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Events/MicroAppOperation/ApplyCapabilityEvent.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Events/MicroAppOperation/ApplyCapabilityEvent.cs deleted file mode 100644 index b5206a77..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Events/MicroAppOperation/ApplyCapabilityEvent.cs +++ /dev/null @@ -1,52 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Events -{ - /// - /// 表示 EVENT.APPLY_CAPACITY 事件的数据。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/thirdparty/API/smallprogram/auth-app-manage/operation/microapp/video-talent-mount - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/thirdparty/API/smallprogram/auth-app-manage/operation/microapp/jump-live-room-capacity - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/thirdparty/API/smallprogram/auth-app-manage/operation/microapp/live-room-status-capacity - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/thirdparty/API/smallprogram/auth-app-manage/operation/microapp/rt-video-flow-capacity - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/thirdparty/API/smallprogram/auth-app-manage/operation/microapp/page-layout-custom-capacity - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/thirdparty/API/smallprogram/auth-app-manage/operation/microapp/capcut-video-template-capacity - /// - public class ApplyCapabilityEvent : ByteDanceMicroAppOpenApiEvent, ByteDanceMicroAppOpenApiEvent.Serialization.IJsonSerializable, ByteDanceMicroAppOpenApiEvent.Serialization.IXmlSerializable - { - public static class Types - { - public class EventContent - { - /// - /// 获取或设置挂载能力标识。 - /// - [Newtonsoft.Json.JsonProperty("capacity_key")] - [System.Text.Json.Serialization.JsonPropertyName("capacity_key")] - [System.Xml.Serialization.XmlElement("capacity_key")] - public string CapacityKey { get; set; } = default!; - - /// - /// 获取或设置审核结果。 - /// - [Newtonsoft.Json.JsonProperty("status")] - [System.Text.Json.Serialization.JsonPropertyName("status")] - [System.Xml.Serialization.XmlElement("status")] - public int Status { get; set; } - - /// - /// 获取或设置审核拒绝原因。 - /// - [Newtonsoft.Json.JsonProperty("reason")] - [System.Text.Json.Serialization.JsonPropertyName("reason")] - [System.Xml.Serialization.XmlElement("reason", IsNullable = true)] - public string? RejectReason { get; set; } - } - } - - /// - /// 获取或设置事件内容。 - /// - [Newtonsoft.Json.JsonProperty("EventContent")] - [System.Text.Json.Serialization.JsonPropertyName("EventContent")] - [System.Xml.Serialization.XmlElement("EventContent")] - public Types.EventContent EventContent { get; set; } = default!; - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Extensions/ByteDanceMicroAppOpenApiClientEventExtensions.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Extensions/ByteDanceMicroAppOpenApiClientEventExtensions.cs deleted file mode 100644 index cd017cf8..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Extensions/ByteDanceMicroAppOpenApiClientEventExtensions.cs +++ /dev/null @@ -1,193 +0,0 @@ -using System; -using System.Xml.Linq; - -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi -{ - /// - /// 为 提供回调通知事件的扩展方法。 - /// - public static class ByteDanceMicroAppOpenApiClientEventExtensions - { - private class InnerEncryptedEvent - { - [Newtonsoft.Json.JsonProperty("Encrypt")] - [System.Text.Json.Serialization.JsonPropertyName("Encrypt")] - [System.Xml.Serialization.XmlElement("Encrypt")] - public string EncryptedData { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("TimeStamp")] - [System.Text.Json.Serialization.JsonPropertyName("TimeStamp")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumericalStringConverter))] - [System.Xml.Serialization.XmlElement("TimeStamp")] - public string TimestampString { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("Nonce")] - [System.Text.Json.Serialization.JsonPropertyName("Nonce")] - [System.Xml.Serialization.XmlElement("Nonce")] - public string Nonce { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("MsgSignature")] - [System.Text.Json.Serialization.JsonPropertyName("MsgSignature")] - [System.Xml.Serialization.XmlElement("MsgSignature")] - public string Signature { get; set; } = default!; - } - - private static TEvent InnerDeserializeEventFromJson(ByteDanceMicroAppOpenApiClient client, string callbackJson) - where TEvent : ByteDanceMicroAppOpenApiEvent - { - if (client == null) throw new ArgumentNullException(nameof(client)); - if (callbackJson == null) throw new ArgumentNullException(callbackJson); - - try - { - if (callbackJson.Contains("\"Encrypt\"")) - { - InnerEncryptedEvent encryptedEvent = client.JsonSerializer.Deserialize(callbackJson); - callbackJson = Utilities.TtMsgCryptor.AESDecrypt(cipherText: encryptedEvent.EncryptedData, encodingAESKey: client.Credentials.PushEncodingAESKey!, out _); - } - - return client.JsonSerializer.Deserialize(callbackJson); - } - catch (ByteDanceMicroAppException) - { - throw; - } - catch (Exception ex) - { - throw new Exceptions.ByteDanceMicroAppEventSerializationException("Failed to deserialize event data. Please see the inner exception for more details.", ex); - } - } - - private static TEvent InnerDeserializeEventFromXml(ByteDanceMicroAppOpenApiClient client, string callbackXml) - where TEvent : ByteDanceMicroAppOpenApiEvent - { - if (client == null) throw new ArgumentNullException(nameof(client)); - if (callbackXml == null) throw new ArgumentNullException(callbackXml); - - try - { - if (callbackXml.Contains("") && callbackXml.Contains("")) - { - string encryptedData = XDocument.Parse(callbackXml).Root!.Element("Encrypt")!.Value; - callbackXml = Utilities.TtMsgCryptor.AESDecrypt(cipherText: encryptedData, encodingAESKey: client.Credentials.PushEncodingAESKey!, out _); - } - - return Utilities.XmlUtility.Deserialize(callbackXml); - } - catch (ByteDanceMicroAppException) - { - throw; - } - catch (Exception ex) - { - throw new Exceptions.ByteDanceMicroAppEventSerializationException("Failed to deserialize event data. Please see the inner exception for more details.", ex); - } - } - - /// - /// 从 JSON 反序列化得到 对象。 - /// - /// - /// - /// - /// - public static TEvent DeserializeEventFromJson(this ByteDanceMicroAppOpenApiClient client, string callbackJson) - where TEvent : ByteDanceMicroAppOpenApiEvent, ByteDanceMicroAppOpenApiEvent.Serialization.IJsonSerializable, new() - { - return InnerDeserializeEventFromJson(client, callbackJson); - } - - /// - /// 从 JSON 反序列化得到 对象。 - /// - /// - /// - /// - public static ByteDanceMicroAppOpenApiEvent DeserializeEventFromJson(this ByteDanceMicroAppOpenApiClient client, string callbackJson) - { - return InnerDeserializeEventFromJson(client, callbackJson); - } - - /// - /// 从 XML 反序列化得到 对象。 - /// - /// - /// - /// - /// - public static TEvent DeserializeEventFromXml(this ByteDanceMicroAppOpenApiClient client, string callbackXml) - where TEvent : ByteDanceMicroAppOpenApiEvent, ByteDanceMicroAppOpenApiEvent.Serialization.IXmlSerializable, new() - { - return InnerDeserializeEventFromXml(client, callbackXml); - } - - /// - /// 从 XML 反序列化得到 对象。 - /// - /// - /// - /// - public static ByteDanceMicroAppOpenApiEvent DeserializeEventFromXml(this ByteDanceMicroAppOpenApiClient client, string callbackXml) - { - return InnerDeserializeEventFromXml(client, callbackXml); - } - - /// - /// 验证回调通知事件签名。 - /// REF: https://partner.open-douyin.com/docs/resource/zh-CN/thirdparty/overview-guide/smallprogram/encryption - /// - /// - /// - /// - public static bool VerifyEventSignatureFromJson(this ByteDanceMicroAppOpenApiClient client, string callbackJson) - { - if (client == null) throw new ArgumentNullException(nameof(client)); - if (callbackJson == null) throw new ArgumentNullException(nameof(callbackJson)); - - try - { - InnerEncryptedEvent encryptedEvent = client.JsonSerializer.Deserialize(callbackJson); - return Utilities.TtMsgCryptor.VerifySignature( - sToken: client.Credentials.PushToken!, - sTimestamp: encryptedEvent.TimestampString, - sNonce: encryptedEvent.Nonce, - sMsgEncrypt: encryptedEvent.EncryptedData, - sMsgSign: encryptedEvent.Signature - ); - } - catch - { - return false; - } - } - - /// - /// 验证回调通知事件签名。 - /// REF: https://partner.open-douyin.com/docs/resource/zh-CN/thirdparty/overview-guide/smallprogram/encryption - /// - /// - /// - /// - public static bool VerifyEventSignatureFromXml(this ByteDanceMicroAppOpenApiClient client, string callbackXml) - { - if (client == null) throw new ArgumentNullException(nameof(client)); - if (callbackXml == null) throw new ArgumentNullException(nameof(callbackXml)); - - try - { - XDocument xdoc = XDocument.Parse(callbackXml); - return Utilities.TtMsgCryptor.VerifySignature( - sToken: client.Credentials.PushToken!, - sTimestamp: xdoc.Root!.Element("TimeStamp")!.Value, - sNonce: xdoc.Root!.Element("Nonce")!.Value, - sMsgEncrypt: xdoc.Root!.Element("Encrypt")!.Value, - sMsgSign: xdoc.Root!.Element("MsgSignature")!.Value - ); - } - catch - { - return false; - } - } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Extensions/ByteDanceMicroAppOpenApiClientExecuteOpenApiExtensions.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Extensions/ByteDanceMicroAppOpenApiClientExecuteOpenApiExtensions.cs deleted file mode 100644 index 6bd04394..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Extensions/ByteDanceMicroAppOpenApiClientExecuteOpenApiExtensions.cs +++ /dev/null @@ -1,1315 +0,0 @@ -using System; -using System.Net.Http; -using System.Text; -using System.Threading; -using System.Threading.Tasks; -using Flurl.Http; - -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi -{ - public static class ByteDanceMicroAppOpenApiClientExecuteOpenApiExtensions - { - #region Auth - /// - /// 异步调用 [GET] /v1/auth/tp/token 接口。 - /// REF: https://partner.open-douyin.com/docs/resource/zh-CN/thirdparty/API/smallprogram/authorization/componentaccesstoken - /// - /// - /// - /// - /// - public static async Task ExecuteOpenApiAuthThirdPartyTokenV1Async(this ByteDanceMicroAppOpenApiClient client, Models.OpenApiAuthThirdPartyTokenV1Request request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - if (request.ComponentAppSecret == null) - request.ComponentAppSecret = client.Credentials.ComponentAppSecret; - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Get, "v1", "auth", "tp", "token") - .SetQueryParam("component_appid", request.ComponentAppId) - .SetQueryParam("component_appsecret", request.ComponentAppSecret) - .SetQueryParam("component_ticket", request.ComponentTicket); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /v2/auth/pre_auth_code 接口。 - /// REF: https://partner.open-douyin.com/docs/resource/zh-CN/thirdparty/API/smallprogram/authorization/preauthcode - /// - /// - /// - /// - /// - public static async Task ExecuteOpenApiAuthPreAuthCodeV2Async(this ByteDanceMicroAppOpenApiClient client, Models.OpenApiAuthPreAuthCodeV2Request 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(request, HttpMethod.Post, "v2", "auth", "pre_auth_code") - .SetQueryParam("component_appid", request.ComponentAppId) - .SetQueryParam("component_access_token", request.ComponentAccessToken); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /v2/auth/gen_link 接口。 - /// REF: https://partner.open-douyin.com/docs/resource/zh-CN/thirdparty/API/smallprogram/authorization/genlink - /// - /// - /// - /// - /// - public static async Task ExecuteOpenApiAuthGenerateLinkV2Async(this ByteDanceMicroAppOpenApiClient client, Models.OpenApiAuthGenerateLinkV2Request 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(request, HttpMethod.Post, "v2", "auth", "gen_link") - .SetQueryParam("component_appid", request.ComponentAppId) - .SetQueryParam("component_access_token", request.ComponentAccessToken); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /v1/auth/retrieve 接口。 - /// REF: https://partner.open-douyin.com/docs/resource/zh-CN/thirdparty/API/smallprogram/authorization/findauthorizationcode - /// - /// - /// - /// - /// - public static async Task ExecuteOpenApiAuthRetrieveV1Async(this ByteDanceMicroAppOpenApiClient client, Models.OpenApiAuthRetrieveV1Request 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(request, HttpMethod.Post, "v1", "auth", "retrieve") - .SetQueryParam("component_appid", request.ComponentAppId) - .SetQueryParam("component_access_token", request.ComponentAccessToken) - .SetQueryParam("authorization_appid", request.AuthorizerAppId); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - #endregion - - #region OAuth - /// - /// 异步调用 [GET] /v1/oauth/token 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/thirdparty/API/smallprogram/authorization/authorizeraccesstoken - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/thirdparty/API/smallprogram/authorization/authorizerrefreshtoken - /// - /// - /// - /// - /// - public static async Task ExecuteOpenApiOAuthTokenV1Async(this ByteDanceMicroAppOpenApiClient client, Models.OpenApiOAuthTokenV1Request 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(request, HttpMethod.Get, "v1", "oauth", "token") - .SetQueryParam("component_appid", request.ComponentAppId) - .SetQueryParam("component_access_token", request.ComponentAccessToken) - .SetQueryParam("grant_type", request.GrantType); - - if (request.AuthCode != null) - flurlReq.SetQueryParam("authorization_code", request.AuthCode); - - if (request.AuthorizerRefreshToken != null) - flurlReq.SetQueryParam("authorizer_refresh_token", request.AuthorizerRefreshToken); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - #endregion - - #region ThirdParty - /// - /// 异步调用 [GET] /v1/tp/auth_app_list 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/thirdparty/API/smallprogram/authorization/authapplist - /// - /// - /// - /// - /// - public static async Task ExecuteOpenApiThirdPartyAuthAppListV1Async(this ByteDanceMicroAppOpenApiClient client, Models.OpenApiThirdPartyAuthAppListV1Request 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(request, HttpMethod.Get, "v1", "tp", "auth_app_list") - .SetQueryParam("component_appid", request.ComponentAppId) - .SetQueryParam("component_access_token", request.ComponentAccessToken) - .SetQueryParam("page", request.PageNumber) - .SetQueryParam("size", request.PageSize); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /v1/tp/upload_pic_material 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/thirdparty/API/smallprogram/upload-pic-material - /// - /// - /// - /// - /// - public static async Task ExecuteOpenApiThirdPartyUploadPictureMaterialV1Async(this ByteDanceMicroAppOpenApiClient client, Models.OpenApiThirdPartyUploadPictureMaterialV1Request request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - if (request.MaterialFileName == null) - request.MaterialFileName = Guid.NewGuid().ToString("N").ToLower() + ".jpg"; - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "v1", "tp", "upload_pic_material") - .SetQueryParam("component_appid", request.ComponentAppId) - .SetQueryParam("component_access_token", request.ComponentAccessToken); - - using var httpContent = Utilities.FileHttpContentBuilder.Build(fileName: request.MaterialFileName, fileBytes: request.MaterialFileBytes, fileContentType: "image/jpeg", formDataName: "material_file"); - httpContent.Add(new ByteArrayContent(Encoding.UTF8.GetBytes(request.MaterialType.ToString())), "material_type"); - - return await client.SendRequestAsync(flurlReq, httpContent: httpContent, cancellationToken: cancellationToken); - } - - #region ThirdParty/Domain - /// - /// 异步调用 [GET] /v1/tp/download/webview_file 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/thirdparty/API/smallprogram/domain/download - /// - /// - /// - /// - /// - public static async Task ExecuteOpenApiThirdPartyDownloadWebviewFileV1Async(this ByteDanceMicroAppOpenApiClient client, Models.OpenApiThirdPartyDownloadWebviewFileV1Request 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(request, HttpMethod.Get, "v1", "tp", "download", "webview_file") - .SetQueryParam("component_appid", request.ComponentAppId) - .SetQueryParam("component_access_token", request.ComponentAccessToken); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - #endregion - - #region ThirdParty/POI - /// - /// 异步调用 [POST] /v1/tp/poi/supplier/match 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/thirdparty/API/tp/supplier-match - /// - /// - /// - /// - /// - public static async Task ExecuteOpenApiThirdPartyPOISupplierMatchV1Async(this ByteDanceMicroAppOpenApiClient client, Models.OpenApiThirdPartyPOISupplierMatchV1Request 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(request, HttpMethod.Post, "v1", "tp", "poi", "supplier", "match") - .SetQueryParam("component_appid", request.ComponentAppId) - .SetQueryParam("component_access_token", request.ComponentAccessToken); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [GET] /v1/tp/poi/supplier/query/match_task 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/thirdparty/API/tp/query-match-task - /// - /// - /// - /// - /// - public static async Task ExecuteOpenApiThirdPartyPOISupplierQueryMatchTaskV1Async(this ByteDanceMicroAppOpenApiClient client, Models.OpenApiThirdPartyPOISupplierQueryMatchTaskV1Request 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(request, HttpMethod.Get, "v1", "tp", "poi", "supplier", "query", "match_task") - .SetQueryParam("component_appid", request.ComponentAppId) - .SetQueryParam("component_access_token", request.ComponentAccessToken) - .SetQueryParam("task_ids", string.Join(",", request.TaskIdList)); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [GET] /v1/tp/poi/supplier/query/match 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/thirdparty/API/tp/supplier-query-match - /// - /// - /// - /// - /// - public static async Task ExecuteOpenApiThirdPartyPOISupplierQueryMatchV1Async(this ByteDanceMicroAppOpenApiClient client, Models.OpenApiThirdPartyPOISupplierQueryMatchV1Request 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(request, HttpMethod.Get, "v1", "tp", "poi", "supplier", "query", "match") - .SetQueryParam("component_appid", request.ComponentAppId) - .SetQueryParam("component_access_token", request.ComponentAccessToken) - .SetQueryParam("supplier_ext_ids", string.Join(",", request.SupplierExternalIds)); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /v1/tp/poi/supplier/sync 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/thirdparty/API/tp/supplier-sync - /// - /// - /// - /// - /// - public static async Task ExecuteOpenApiThirdPartyPOISupplierSyncV1Async(this ByteDanceMicroAppOpenApiClient client, Models.OpenApiThirdPartyPOISupplierSyncV1Request 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(request, HttpMethod.Post, "v1", "tp", "poi", "supplier", "sync") - .SetQueryParam("component_appid", request.ComponentAppId) - .SetQueryParam("component_access_token", request.ComponentAccessToken); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [GET] /v1/tp/poi/supplier/query 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/thirdparty/API/tp/supplier-query - /// - /// - /// - /// - /// - public static async Task ExecuteOpenApiThirdPartyPOISupplierQueryV1Async(this ByteDanceMicroAppOpenApiClient client, Models.OpenApiThirdPartyPOISupplierQueryV1Request 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(request, HttpMethod.Get, "v1", "tp", "poi", "supplier", "query") - .SetQueryParam("component_appid", request.ComponentAppId) - .SetQueryParam("component_access_token", request.ComponentAccessToken) - .SetQueryParam("supplier_ext_id", request.SupplierExternalId); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [GET] /v1/tp/poi/base/query/amap 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/thirdparty/API/tp/supplier-query - /// - /// - /// - /// - /// - public static async Task ExecuteOpenApiThirdPartyPOIBaseQueryAMapV1Async(this ByteDanceMicroAppOpenApiClient client, Models.OpenApiThirdPartyPOIBaseQueryAMapV1Request 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(request, HttpMethod.Get, "v1", "tp", "poi", "base", "query", "amap") - .SetQueryParam("component_appid", request.ComponentAppId) - .SetQueryParam("component_access_token", request.ComponentAccessToken) - .SetQueryParam("amap_id", request.AMapId); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - #endregion - - #region ThirdParty/Template - /// - /// 异步调用 [GET] /v1/tp/template/get_tpl_list 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/thirdparty/API/smallprogram/tpl-manage/tpl-list - /// - /// - /// - /// - /// - public static async Task ExecuteOpenApiThirdPartyTemplateGetTemplateListV1Async(this ByteDanceMicroAppOpenApiClient client, Models.OpenApiThirdPartyTemplateGetTemplateListV1Request 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(request, HttpMethod.Get, "v1", "tp", "template", "get_tpl_list") - .SetQueryParam("component_appid", request.ComponentAppId) - .SetQueryParam("component_access_token", request.ComponentAccessToken); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [GET] /v1/tp/template/get_draft_list 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/thirdparty/API/smallprogram/tpl-manage/draft-list - /// - /// - /// - /// - /// - [Obsolete("相关接口或字段于 2022-12-28 下线。")] - public static async Task ExecuteOpenApiThirdPartyTemplateGetDraftListV1Async(this ByteDanceMicroAppOpenApiClient client, Models.OpenApiThirdPartyTemplateGetDraftListV1Request 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(request, HttpMethod.Get, "v1", "tp", "template", "get_draft_list") - .SetQueryParam("component_appid", request.ComponentAppId) - .SetQueryParam("component_access_token", request.ComponentAccessToken); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [GET] /v1/tp/template/get_tpl_app_list 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/thirdparty/API/smallprogram/tpl-manage/tpl-app-list - /// - /// - /// - /// - /// - public static async Task ExecuteOpenApiThirdPartyTemplateGetTemplateAppListV1Async(this ByteDanceMicroAppOpenApiClient client, Models.OpenApiThirdPartyTemplateGetTemplateAppListV1Request 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(request, HttpMethod.Get, "v1", "tp", "template", "get_tpl_app_list") - .SetQueryParam("component_appid", request.ComponentAppId) - .SetQueryParam("component_access_token", request.ComponentAccessToken); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /v1/tp/template/add_tpl 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/thirdparty/API/smallprogram/tpl-manage/add - /// - /// - /// - /// - /// - public static async Task ExecuteOpenApiThirdPartyTemplateAddTemplateV1Async(this ByteDanceMicroAppOpenApiClient client, Models.OpenApiThirdPartyTemplateAddTemplateV1Request 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(request, HttpMethod.Post, "v1", "tp", "template", "add_tpl") - .SetQueryParam("component_appid", request.ComponentAppId) - .SetQueryParam("component_access_token", request.ComponentAccessToken); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /v1/tp/template/del_tpl 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/thirdparty/API/smallprogram/tpl-manage/delete - /// - /// - /// - /// - /// - public static async Task ExecuteOpenApiThirdPartyTemplateDeleteTemplateV1Async(this ByteDanceMicroAppOpenApiClient client, Models.OpenApiThirdPartyTemplateDeleteTemplateV1Request 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(request, HttpMethod.Post, "v1", "tp", "template", "del_tpl") - .SetQueryParam("component_appid", request.ComponentAppId) - .SetQueryParam("component_access_token", request.ComponentAccessToken); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - #endregion - #endregion - - #region MicroApp - /// - /// 异步调用 [GET] /v1/microapp/code2session 接口。 - /// REF: https://partner.open-douyin.com/docs/resource/zh-CN/thirdparty/API/smallprogram/auth-app-manage/login/code2session - /// - /// - /// - /// - /// - public static async Task ExecuteOpenApiMicroAppCode2SessionV1Async(this ByteDanceMicroAppOpenApiClient client, Models.OpenApiMicroAppCode2SessionV1Request 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(request, HttpMethod.Get, "v1", "microapp", "code2session") - .SetQueryParam("component_appid", request.ComponentAppId) - .SetQueryParam("authorizer_access_token", request.AuthorizerAccessToken) - .SetQueryParam("code", request.Code) - .SetQueryParam("anonymous_code", request.AnoymousCode); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /v1/microapp/upload_material 接口。 - /// REF: https://partner.open-douyin.com/docs/resource/zh-CN/thirdparty/API/smallprogram/auth-app-manage/base-info/uploadMaterial - /// - /// - /// - /// - /// - public static async Task ExecuteOpenApiMicroAppUploadMaterialV1Async(this ByteDanceMicroAppOpenApiClient client, Models.OpenApiMicroAppUploadMaterialV1Request request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - if (request.MaterialFileName == null) - request.MaterialFileName = Guid.NewGuid().ToString("N").ToLower() + (request.MaterialType == 8 ? ".pdf" : ".jpg"); - - if (request.MaterialFileContentType == null) - request.MaterialFileContentType = Utilities.FileNameToContentTypeMapper.GetContentTypeForMaterial(request.MaterialFileName); - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "v1", "microapp", "upload_material") - .SetQueryParam("component_appid", request.ComponentAppId) - .SetQueryParam("authorizer_access_token", request.AuthorizerAccessToken); - - using var httpContent = Utilities.FileHttpContentBuilder.Build(fileName: request.MaterialFileName, fileBytes: request.MaterialFileBytes, fileContentType: request.MaterialFileContentType!, formDataName: "material_file"); - httpContent.Add(new ByteArrayContent(Encoding.UTF8.GetBytes(request.MaterialType.ToString())), "material_type"); - - return await client.SendRequestAsync(flurlReq, httpContent: httpContent, cancellationToken: cancellationToken); - } - - #region MicroApp/App - /// - /// 异步调用 [GET] /v1/microapp/app/info 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/thirdparty/API/smallprogram/auth-app-manage/base-info/info - /// - /// - /// - /// - /// - public static async Task ExecuteOpenApiMicroAppAppInfoV1Async(this ByteDanceMicroAppOpenApiClient client, Models.OpenApiMicroAppAppInfoV1Request 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(request, HttpMethod.Get, "v1", "microapp", "app", "info") - .SetQueryParam("component_appid", request.ComponentAppId) - .SetQueryParam("authorizer_access_token", request.AuthorizerAccessToken); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /v1/microapp/app/qrcode 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/thirdparty/API/smallprogram/auth-app-manage/base-info/qrcode - /// - /// - /// - /// - /// - public static async Task ExecuteOpenApiMicroAppAppQrcodeV1Async(this ByteDanceMicroAppOpenApiClient client, Models.OpenApiMicroAppAppQrcodeV1Request 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(request, HttpMethod.Post, "v1", "microapp", "app", "qrcode") - .SetQueryParam("component_appid", request.ComponentAppId) - .SetQueryParam("authorizer_access_token", request.AuthorizerAccessToken); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [GET] /v1/microapp/app/check_app_name 接口。 - /// REF: https://partner.open-douyin.com/docs/resource/zh-CN/thirdparty/API/smallprogram/auth-app-manage/base-info/check-name - /// - /// - /// - /// - /// - public static async Task ExecuteOpenApiMicroAppAppCheckAppNameV1Async(this ByteDanceMicroAppOpenApiClient client, Models.OpenApiMicroAppAppCheckAppNameV1Request 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(request, HttpMethod.Get, "v1", "microapp", "app", "check_app_name") - .SetQueryParam("component_appid", request.ComponentAppId) - .SetQueryParam("authorizer_access_token", request.AuthorizerAccessToken) - .SetQueryParam("app_name", request.AppName); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /v1/microapp/app/modify_app_name 接口。 - /// REF: https://partner.open-douyin.com/docs/resource/zh-CN/thirdparty/API/smallprogram/auth-app-manage/base-info/modify-name - /// - /// - /// - /// - /// - public static async Task ExecuteOpenApiMicroAppAppModifyAppNameV1Async(this ByteDanceMicroAppOpenApiClient client, Models.OpenApiMicroAppAppModifyAppNameV1Request 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(request, HttpMethod.Post, "v1", "microapp", "app", "modify_app_name") - .SetQueryParam("component_appid", request.ComponentAppId) - .SetQueryParam("authorizer_access_token", request.AuthorizerAccessToken); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /v1/microapp/app/modify_app_intro 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/thirdparty/API/smallprogram/auth-app-manage/base-info/modify-intro - /// - /// - /// - /// - /// - public static async Task ExecuteOpenApiMicroAppAppModifyAppIntroductionV1Async(this ByteDanceMicroAppOpenApiClient client, Models.OpenApiMicroAppAppModifyAppIntroductionV1Request 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(request, HttpMethod.Post, "v1", "microapp", "app", "modify_app_intro") - .SetQueryParam("component_appid", request.ComponentAppId) - .SetQueryParam("authorizer_access_token", request.AuthorizerAccessToken); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /v1/microapp/app/modify_app_icon 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/thirdparty/API/smallprogram/auth-app-manage/base-info/modify-icon - /// - /// - /// - /// - /// - public static async Task ExecuteOpenApiMicroAppAppModifyAppIconV1Async(this ByteDanceMicroAppOpenApiClient client, Models.OpenApiMicroAppAppModifyAppIconV1Request 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(request, HttpMethod.Post, "v1", "microapp", "app", "modify_app_icon") - .SetQueryParam("component_appid", request.ComponentAppId) - .SetQueryParam("authorizer_access_token", request.AuthorizerAccessToken); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [GET] /v1/microapp/app/all_categories 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/thirdparty/API/smallprogram/auth-app-manage/base-info/all-categories - /// - /// - /// - /// - /// - public static async Task ExecuteOpenApiMicroAppAppAllCategoriesV1Async(this ByteDanceMicroAppOpenApiClient client, Models.OpenApiMicroAppAppAllCategoriesV1Request 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(request, HttpMethod.Get, "v1", "microapp", "app", "all_categories") - .SetQueryParam("component_appid", request.ComponentAppId) - .SetQueryParam("authorizer_access_token", request.AuthorizerAccessToken); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [GET] /v1/microapp/app/categories 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/thirdparty/API/smallprogram/auth-app-manage/base-info/category-audit-info - /// - /// - /// - /// - /// - public static async Task ExecuteOpenApiMicroAppAppCategoriesV1Async(this ByteDanceMicroAppOpenApiClient client, Models.OpenApiMicroAppAppCategoriesV1Request 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(request, HttpMethod.Get, "v1", "microapp", "app", "categories") - .SetQueryParam("component_appid", request.ComponentAppId) - .SetQueryParam("authorizer_access_token", request.AuthorizerAccessToken); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /v1/microapp/app/add_categories 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/thirdparty/API/smallprogram/auth-app-manage/base-info/add-category - /// - /// - /// - /// - /// - public static async Task ExecuteOpenApiMicroAppAppAddCategoriesV1Async(this ByteDanceMicroAppOpenApiClient client, Models.OpenApiMicroAppAppAddCategoriesV1Request 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(request, HttpMethod.Post, "v1", "microapp", "app", "add_categories") - .SetQueryParam("component_appid", request.ComponentAppId) - .SetQueryParam("authorizer_access_token", request.AuthorizerAccessToken); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /v1/microapp/app/del_categories 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/thirdparty/API/smallprogram/auth-app-manage/base-info/delete-category - /// - /// - /// - /// - /// - public static async Task ExecuteOpenApiMicroAppAppDeleteCategoriesV1Async(this ByteDanceMicroAppOpenApiClient client, Models.OpenApiMicroAppAppDeleteCategoriesV1Request 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(request, HttpMethod.Post, "v1", "microapp", "app", "del_categories") - .SetQueryParam("component_appid", request.ComponentAppId) - .SetQueryParam("authorizer_access_token", request.AuthorizerAccessToken); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /v1/microapp/app/supply_categories 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/thirdparty/API/smallprogram/auth-app-manage/base-info/supply-category - /// - /// - /// - /// - /// - public static async Task ExecuteOpenApiMicroAppAppSupplyCategoriesV1Async(this ByteDanceMicroAppOpenApiClient client, Models.OpenApiMicroAppAppSupplyCategoriesV1Request 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(request, HttpMethod.Post, "v1", "microapp", "app", "supply_categories") - .SetQueryParam("component_appid", request.ComponentAppId) - .SetQueryParam("authorizer_access_token", request.AuthorizerAccessToken); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /v1/microapp/app/modify_server_domain 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/thirdparty/API/smallprogram/auth-app-manage/base-info/modify-domain - /// - /// - /// - /// - /// - public static async Task ExecuteOpenApiMicroAppAppModifyServerDomainV1Async(this ByteDanceMicroAppOpenApiClient client, Models.OpenApiMicroAppAppModifyServerDomainV1Request 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(request, HttpMethod.Post, "v1", "microapp", "app", "modify_server_domain") - .SetQueryParam("component_appid", request.ComponentAppId) - .SetQueryParam("authorizer_access_token", request.AuthorizerAccessToken); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /v1/microapp/app/modify_webview_domain 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/thirdparty/API/smallprogram/auth-app-manage/base-info/modify-webview - /// - /// - /// - /// - /// - public static async Task ExecuteOpenApiMicroAppAppModifyWebviewDomainV1Async(this ByteDanceMicroAppOpenApiClient client, Models.OpenApiMicroAppAppModifyWebviewDomainV1Request 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(request, HttpMethod.Post, "v1", "microapp", "app", "modify_webview_domain") - .SetQueryParam("component_appid", request.ComponentAppId) - .SetQueryParam("authorizer_access_token", request.AuthorizerAccessToken); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [GET] /v1/microapp/app/quality_rating 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/thirdparty/API/smallprogram/auth-app-manage/base-info/quality-rating - /// - /// - /// - /// - /// - public static async Task ExecuteOpenApiMicroAppAppQualityRatingV1Async(this ByteDanceMicroAppOpenApiClient client, Models.OpenApiMicroAppAppQualityRatingV1Request 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(request, HttpMethod.Get, "v1", "microapp", "app", "quality_rating") - .SetQueryParam("component_appid", request.ComponentAppId) - .SetQueryParam("authorizer_access_token", request.AuthorizerAccessToken); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [GET] /v1/microapp/app/credit_score 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/thirdparty/API/smallprogram/auth-app-manage/base-info/credit-score - /// - /// - /// - /// - /// - public static async Task ExecuteOpenApiMicroAppAppCreditScoreV1Async(this ByteDanceMicroAppOpenApiClient client, Models.OpenApiMicroAppAppCreditScoreV1Request 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(request, HttpMethod.Get, "v1", "microapp", "app", "credit_score") - .SetQueryParam("component_appid", request.ComponentAppId) - .SetQueryParam("authorizer_access_token", request.AuthorizerAccessToken); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - #endregion - - #region MicroApp/Operation - /// - /// 异步调用 [GET] /v1/microapp/operation/video_application_status 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/thirdparty/API/smallprogram/auth-app-manage/operation/microapp/video-application-status - /// - /// - /// - /// - /// - public static async Task ExecuteOpenApiMicroAppOperationVideoApplicationStatusV1Async(this ByteDanceMicroAppOpenApiClient client, Models.OpenApiMicroAppOperationVideoApplicationStatusV1Request 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(request, HttpMethod.Get, "v1", "microapp", "operation", "video_application_status") - .SetQueryParam("component_appid", request.ComponentAppId) - .SetQueryParam("authorizer_access_token", request.AuthorizerAccessToken); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /v1/microapp/operation/video_application 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/thirdparty/API/smallprogram/auth-app-manage/operation/microapp/video-application - /// - /// - /// - /// - /// - public static async Task ExecuteOpenApiMicroAppOperationVideoApplicationV1Async(this ByteDanceMicroAppOpenApiClient client, Models.OpenApiMicroAppOperationVideoApplicationV1Request 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(request, HttpMethod.Post, "v1", "microapp", "operation", "video_application") - .SetQueryParam("component_appid", request.ComponentAppId) - .SetQueryParam("authorizer_access_token", request.AuthorizerAccessToken); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [GET] /v1/microapp/operation/live_application_status 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/thirdparty/API/smallprogram/auth-app-manage/operation/microapp/live-application-status - /// - /// - /// - /// - /// - public static async Task ExecuteOpenApiMicroAppOperationLiveApplicationStatusV1Async(this ByteDanceMicroAppOpenApiClient client, Models.OpenApiMicroAppOperationLiveApplicationStatusV1Request 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(request, HttpMethod.Get, "v1", "microapp", "operation", "live_application_status") - .SetQueryParam("component_appid", request.ComponentAppId) - .SetQueryParam("authorizer_access_token", request.AuthorizerAccessToken); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /v1/microapp/operation/live_application 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/thirdparty/API/smallprogram/auth-app-manage/operation/microapp/live-application - /// - /// - /// - /// - /// - public static async Task ExecuteOpenApiMicroAppOperationLiveApplicationV1Async(this ByteDanceMicroAppOpenApiClient client, Models.OpenApiMicroAppOperationLiveApplicationV1Request 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(request, HttpMethod.Post, "v1", "microapp", "operation", "live_application") - .SetQueryParam("component_appid", request.ComponentAppId) - .SetQueryParam("authorizer_access_token", request.AuthorizerAccessToken); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [GET] /v1/microapp/operation/phone_number_application_status 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/thirdparty/API/smallprogram/auth-app-manage/operation/microapp/phone-number-application-status - /// - /// - /// - /// - /// - public static async Task ExecuteOpenApiMicroAppOperationPhoneNumberApplicationStatusV1Async(this ByteDanceMicroAppOpenApiClient client, Models.OpenApiMicroAppOperationPhoneNumberApplicationStatusV1Request 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(request, HttpMethod.Get, "v1", "microapp", "operation", "phone_number_application_status") - .SetQueryParam("component_appid", request.ComponentAppId) - .SetQueryParam("authorizer_access_token", request.AuthorizerAccessToken); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /v1/microapp/operation/phone_number_application 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/thirdparty/API/smallprogram/auth-app-manage/operation/microapp/phone-number-application - /// - /// - /// - /// - /// - public static async Task ExecuteOpenApiMicroAppOperationPhoneNumberApplicationV1Async(this ByteDanceMicroAppOpenApiClient client, Models.OpenApiMicroAppOperationPhoneNumberApplicationV1Request 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(request, HttpMethod.Post, "v1", "microapp", "operation", "phone_number_application") - .SetQueryParam("component_appid", request.ComponentAppId) - .SetQueryParam("authorizer_access_token", request.AuthorizerAccessToken); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [GET] /v1/microapp/operation/share_tpl_list 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/thirdparty/API/smallprogram/auth-app-manage/operation/microapp/shareTplList - /// - /// - /// - /// - /// - public static async Task ExecuteOpenApiMicroAppOperationShareTemplateListV1Async(this ByteDanceMicroAppOpenApiClient client, Models.OpenApiMicroAppOperationShareTemplateListV1Request 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(request, HttpMethod.Get, "v1", "microapp", "operation", "share_tpl_list") - .SetQueryParam("component_appid", request.ComponentAppId) - .SetQueryParam("authorizer_access_token", request.AuthorizerAccessToken) - .SetQueryParam("page", request.PageNumber) - .SetQueryParam("size", request.PageSize); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /v1/microapp/operation/add_share_tpl 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/thirdparty/API/smallprogram/auth-app-manage/operation/microapp/addShareTpl - /// - /// - /// - /// - /// - public static async Task ExecuteOpenApiMicroAppOperationAddShareTemplateV1Async(this ByteDanceMicroAppOpenApiClient client, Models.OpenApiMicroAppOperationAddShareTemplateV1Request 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(request, HttpMethod.Post, "v1", "microapp", "operation", "add_share_tpl") - .SetQueryParam("component_appid", request.ComponentAppId) - .SetQueryParam("authorizer_access_token", request.AuthorizerAccessToken); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /v1/microapp/operation/modify_share_tpl 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/thirdparty/API/smallprogram/auth-app-manage/operation/microapp/modifyShareTpl - /// - /// - /// - /// - /// - public static async Task ExecuteOpenApiMicroAppOperationModifyShareTemplateV1Async(this ByteDanceMicroAppOpenApiClient client, Models.OpenApiMicroAppOperationModifyShareTemplateV1Request 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(request, HttpMethod.Post, "v1", "microapp", "operation", "modify_share_tpl") - .SetQueryParam("component_appid", request.ComponentAppId) - .SetQueryParam("authorizer_access_token", request.AuthorizerAccessToken); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /v1/microapp/operation/del_share_tpl 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/thirdparty/API/smallprogram/auth-app-manage/operation/microapp/delShareTpl - /// - /// - /// - /// - /// - public static async Task ExecuteOpenApiMicroAppOperationDeleteShareTemplateV1Async(this ByteDanceMicroAppOpenApiClient client, Models.OpenApiMicroAppOperationDeleteShareTemplateV1Request 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(request, HttpMethod.Post, "v1", "microapp", "operation", "del_share_tpl") - .SetQueryParam("component_appid", request.ComponentAppId) - .SetQueryParam("authorizer_access_token", request.AuthorizerAccessToken); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /v1/microapp/operation/set_default_share_tpl 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/thirdparty/API/smallprogram/auth-app-manage/operation/microapp/setDefaultShareTpl - /// - /// - /// - /// - /// - public static async Task ExecuteOpenApiMicroAppOperationSetDefaultShareTemplateV1Async(this ByteDanceMicroAppOpenApiClient client, Models.OpenApiMicroAppOperationSetDefaultShareTemplateV1Request 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(request, HttpMethod.Post, "v1", "microapp", "operation", "set_default_share_tpl") - .SetQueryParam("component_appid", request.ComponentAppId) - .SetQueryParam("authorizer_access_token", request.AuthorizerAccessToken); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /v1/microapp/operation/add_shop_material 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/thirdparty/API/smallprogram/auth-app-manage/operation/microapp/add-shop-material - /// - /// - /// - /// - /// - public static async Task ExecuteOpenApiMicroAppOperationAddShopMaterialV1Async(this ByteDanceMicroAppOpenApiClient client, Models.OpenApiMicroAppOperationAddShopMaterialV1Request 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(request, HttpMethod.Post, "v1", "microapp", "operation", "add_shop_material") - .SetQueryParam("component_appid", request.ComponentAppId) - .SetQueryParam("authorizer_access_token", request.AuthorizerAccessToken); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [GET] /v1/microapp/operation/query_shop_material 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/thirdparty/API/smallprogram/auth-app-manage/operation/microapp/query-shop-material - /// - /// - /// - /// - /// - public static async Task ExecuteOpenApiMicroAppOperationQueryShopMaterialV1Async(this ByteDanceMicroAppOpenApiClient client, Models.OpenApiMicroAppOperationQueryShopMaterialV1Request 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(request, HttpMethod.Get, "v1", "microapp", "operation", "query_shop_material") - .SetQueryParam("component_appid", request.ComponentAppId) - .SetQueryParam("authorizer_access_token", request.AuthorizerAccessToken) - .SetQueryParam("supplier_ext_id", request.SupplierExternalId); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - #endregion - - #region MicroApp/Package - /// - /// 异步调用 [POST] /v1/microapp/package/upload 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/thirdparty/API/smallprogram/auth-app-manage/develop/upload-code - /// - /// - /// - /// - /// - public static async Task ExecuteOpenApiMicroAppPackageUploadV1Async(this ByteDanceMicroAppOpenApiClient client, Models.OpenApiMicroAppPackageUploadV1Request 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(request, HttpMethod.Post, "v1", "microapp", "package", "upload") - .SetQueryParam("component_appid", request.ComponentAppId) - .SetQueryParam("authorizer_access_token", request.AuthorizerAccessToken); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [GET] /v1/microapp/package/audit_hosts 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/thirdparty/API/smallprogram/auth-app-manage/develop/audit-hosts - /// - /// - /// - /// - /// - public static async Task ExecuteOpenApiMicroAppPackageAuditHostsV1Async(this ByteDanceMicroAppOpenApiClient client, Models.OpenApiMicroAppPackageAuditHostsV1Request 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(request, HttpMethod.Get, "v1", "microapp", "package", "audit_hosts") - .SetQueryParam("component_appid", request.ComponentAppId) - .SetQueryParam("authorizer_access_token", request.AuthorizerAccessToken); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /v2/microapp/package/audit 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/thirdparty/API/smallprogram/auth-app-manage/develop/audit-code - /// - /// - /// - /// - /// - public static async Task ExecuteOpenApiMicroAppPackageAuditV2Async(this ByteDanceMicroAppOpenApiClient client, Models.OpenApiMicroAppPackageAuditV2Request 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(request, HttpMethod.Post, "v2", "microapp", "package", "audit") - .SetQueryParam("component_appid", request.ComponentAppId) - .SetQueryParam("authorizer_access_token", request.AuthorizerAccessToken); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /v1/microapp/package/revoke_audit 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/thirdparty/API/smallprogram/auth-app-manage/develop/revoke-audit - /// - /// - /// - /// - /// - public static async Task ExecuteOpenApiMicroAppPackageRevokeAuditV1Async(this ByteDanceMicroAppOpenApiClient client, Models.OpenApiMicroAppPackageRevokeAuditV1Request 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(request, HttpMethod.Post, "v1", "microapp", "package", "revoke_audit") - .SetQueryParam("component_appid", request.ComponentAppId) - .SetQueryParam("authorizer_access_token", request.AuthorizerAccessToken); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /v1/microapp/package/release 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/thirdparty/API/smallprogram/auth-app-manage/develop/release - /// - /// - /// - /// - /// - public static async Task ExecuteOpenApiMicroAppPackageReleaseV1Async(this ByteDanceMicroAppOpenApiClient client, Models.OpenApiMicroAppPackageReleaseV1Request 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(request, HttpMethod.Post, "v1", "microapp", "package", "release") - .SetQueryParam("component_appid", request.ComponentAppId) - .SetQueryParam("authorizer_access_token", request.AuthorizerAccessToken); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /v1/microapp/package/rollback 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/thirdparty/API/smallprogram/auth-app-manage/develop/rollback - /// - /// - /// - /// - /// - public static async Task ExecuteOpenApiMicroAppPackageRollbackV1Async(this ByteDanceMicroAppOpenApiClient client, Models.OpenApiMicroAppPackageRollbackV1Request 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(request, HttpMethod.Post, "v1", "microapp", "package", "rollback") - .SetQueryParam("component_appid", request.ComponentAppId) - .SetQueryParam("authorizer_access_token", request.AuthorizerAccessToken); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [GET] /v1/microapp/package/versions 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/thirdparty/API/smallprogram/auth-app-manage/develop/versions - /// - /// - /// - /// - /// - public static async Task ExecuteOpenApiMicroAppPackageVersionsV1Async(this ByteDanceMicroAppOpenApiClient client, Models.OpenApiMicroAppPackageVersionsV1Request 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(request, HttpMethod.Get, "v1", "microapp", "package", "versions") - .SetQueryParam("component_appid", request.ComponentAppId) - .SetQueryParam("authorizer_access_token", request.AuthorizerAccessToken); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - #endregion - #endregion - - #region Settle - /// - /// 异步调用 [POST] /v1/settle/pre_check 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/thirdparty/API/smallprogram/developer-settle/predict-check - /// - /// - /// - /// - /// - public static async Task ExecuteOpenApiSettlePreCheckV1Async(this ByteDanceMicroAppOpenApiClient client, Models.OpenApiSettlePreCheckV1Request 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(request, HttpMethod.Post, "v1", "settle", "pre_check") - .SetQueryParam("component_appid", request.ComponentAppId) - .SetQueryParam("component_access_token", request.ComponentAccessToken); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /v1/settle/apply 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/thirdparty/API/smallprogram/developer-settle/settle-apply - /// - /// - /// - /// - /// - public static async Task ExecuteOpenApiSettleApplyV1Async(this ByteDanceMicroAppOpenApiClient client, Models.OpenApiSettleApplyV1Request 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(request, HttpMethod.Post, "v1", "settle", "apply") - .SetQueryParam("component_appid", request.ComponentAppId) - .SetQueryParam("component_access_token", request.ComponentAccessToken); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [GET] /v1/settle/get_apply_status 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/thirdparty/API/smallprogram/developer-settle/get-apply-status - /// - /// - /// - /// - /// - public static async Task ExecuteOpenApiSettleGetApplyStatusV1Async(this ByteDanceMicroAppOpenApiClient client, Models.OpenApiSettleGetApplyStatusV1Request 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(request, HttpMethod.Get, "v1", "settle", "get_apply_status") - .SetQueryParam("component_appid", request.ComponentAppId) - .SetQueryParam("component_access_token", request.ComponentAccessToken) - .SetQueryParam("apply_id", request.ApplyId); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - #endregion - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Extensions/ByteDanceMicroAppOpenApiClientParameterExtensions.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Extensions/ByteDanceMicroAppOpenApiClientParameterExtensions.cs deleted file mode 100644 index 8072f3b0..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Extensions/ByteDanceMicroAppOpenApiClientParameterExtensions.cs +++ /dev/null @@ -1,25 +0,0 @@ -using Flurl; - -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi -{ - public static class ByteDanceMicroAppOpenApiClientParameterExtensions - { - /// - /// 生成第三方应用服务商授权 URL。 - /// REF: https://partner.open-douyin.com/docs/resource/zh-CN/thirdparty/API/smallprogram/authorization/createlink - /// - /// - /// - /// - /// - public static string GenerateParameterizedUrlForOpenComponentThirdPartyAuthorization(this ByteDanceMicroAppOpenApiClient client, string preAuthCode, string redirectUrl) - { - return new Url(ByteDanceMicroAppOpenApiEndpoints.DEFAULT) - .AppendPathSegments("mappconsole", "tp", "authorization") - .SetQueryParam("component_appid", client.Credentials.ComponentAppId) - .SetQueryParam("pre_auth_code", preAuthCode) - .SetQueryParam("redirect_uri", redirectUrl) - .ToString(); - } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/Auth/OpenApiAuthGenerateLinkV2Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/Auth/OpenApiAuthGenerateLinkV2Request.cs deleted file mode 100644 index eedbd3cf..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/Auth/OpenApiAuthGenerateLinkV2Request.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Models -{ - /// - /// 表示 [POST] /v2/auth/gen_link 接口的请求。 - /// - public class OpenApiAuthGenerateLinkV2Request : ByteDanceMicroAppOpenApiRequest - { - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/Auth/OpenApiAuthGenerateLinkV2Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/Auth/OpenApiAuthGenerateLinkV2Response.cs deleted file mode 100644 index 57265817..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/Auth/OpenApiAuthGenerateLinkV2Response.cs +++ /dev/null @@ -1,15 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Models -{ - /// - /// 表示 [POST] /v2/auth/gen_link 接口的响应。 - /// - public class OpenApiAuthGenerateLinkV2Response : ByteDanceMicroAppOpenApiResponse - { - /// - /// 获取或设置授权链接。 - /// - [Newtonsoft.Json.JsonProperty("link")] - [System.Text.Json.Serialization.JsonPropertyName("link")] - public string AuthLink { get; set; } = default!; - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/Auth/OpenApiAuthRetrieveV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/Auth/OpenApiAuthRetrieveV1Request.cs deleted file mode 100644 index 21566b21..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/Auth/OpenApiAuthRetrieveV1Request.cs +++ /dev/null @@ -1,29 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Models -{ - /// - /// 表示 [POST] /v1/auth/retrieve 接口的请求。 - /// - public class OpenApiAuthRetrieveV1Request : ByteDanceMicroAppOpenApiRequest - { - /// - /// - /// - [Newtonsoft.Json.JsonProperty("component_appid")] - [System.Text.Json.Serialization.JsonPropertyName("component_appid")] - public override string? ComponentAppId { get; set; } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("component_access_token")] - [System.Text.Json.Serialization.JsonPropertyName("component_access_token")] - public override string? ComponentAccessToken { get; set; } - - /// - /// - /// - [Newtonsoft.Json.JsonProperty("authorization_appid")] - [System.Text.Json.Serialization.JsonPropertyName("authorization_appid")] - public override string? AuthorizerAppId { get; set; } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/Auth/OpenApiAuthThirdPartyTokenV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/Auth/OpenApiAuthThirdPartyTokenV1Request.cs deleted file mode 100644 index 40a6c441..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/Auth/OpenApiAuthThirdPartyTokenV1Request.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Models -{ - /// - /// 表示 [GET] /v1/auth/tp/token 接口的请求。 - /// - public class OpenApiAuthThirdPartyTokenV1Request : ByteDanceMicroAppOpenApiRequest - { - /// - /// 获取或设置第三方应用 AppSecret。如果不指定将使用构造 时的 参数。 - /// - [Newtonsoft.Json.JsonIgnore] - [System.Text.Json.Serialization.JsonIgnore] - public string? ComponentAppSecret { get; set; } - - /// - /// 获取或设置推送的 Ticket。 - /// - [Newtonsoft.Json.JsonIgnore] - [System.Text.Json.Serialization.JsonIgnore] - public string ComponentTicket { get; set; } = string.Empty; - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/App/Category/OpenApiMicroAppAppAddCategoriesV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/App/Category/OpenApiMicroAppAppAddCategoriesV1Response.cs deleted file mode 100644 index 7f1b2de9..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/App/Category/OpenApiMicroAppAppAddCategoriesV1Response.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Models -{ - /// - /// 表示 [POST] /v1/microapp/app/add_categories 接口的响应。 - /// - public class OpenApiMicroAppAppAddCategoriesV1Response : ByteDanceMicroAppOpenApiResponse - { - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/App/Category/OpenApiMicroAppAppAllCategoriesV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/App/Category/OpenApiMicroAppAppAllCategoriesV1Request.cs deleted file mode 100644 index db00d22f..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/App/Category/OpenApiMicroAppAppAllCategoriesV1Request.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Models -{ - /// - /// 表示 [GET] /v1/microapp/app/all_categories 接口的请求。 - /// - public class OpenApiMicroAppAppAllCategoriesV1Request : ByteDanceMicroAppOpenApiRequest - { - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/App/Category/OpenApiMicroAppAppCategoriesV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/App/Category/OpenApiMicroAppAppCategoriesV1Request.cs deleted file mode 100644 index f29e7ab3..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/App/Category/OpenApiMicroAppAppCategoriesV1Request.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Models -{ - /// - /// 表示 [GET] /v1/microapp/app/categories 接口的请求。 - /// - public class OpenApiMicroAppAppCategoriesV1Request : ByteDanceMicroAppOpenApiRequest - { - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/App/Category/OpenApiMicroAppAppDeleteCategoriesV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/App/Category/OpenApiMicroAppAppDeleteCategoriesV1Request.cs deleted file mode 100644 index a95ba6b1..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/App/Category/OpenApiMicroAppAppDeleteCategoriesV1Request.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System.Collections.Generic; - -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Models -{ - /// - /// 表示 [POST] /v1/microapp/app/del_categories 接口的请求。 - /// - public class OpenApiMicroAppAppDeleteCategoriesV1Request : ByteDanceMicroAppOpenApiRequest - { - /// - /// 获取或设置服务类目 ID 字符串(以逗号分隔)列表。 - /// - [Newtonsoft.Json.JsonProperty("categories")] - [System.Text.Json.Serialization.JsonPropertyName("categories")] - public IList CategoryIdStringList { get; set; } = new List(); - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/App/Category/OpenApiMicroAppAppDeleteCategoriesV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/App/Category/OpenApiMicroAppAppDeleteCategoriesV1Response.cs deleted file mode 100644 index 2daa8a18..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/App/Category/OpenApiMicroAppAppDeleteCategoriesV1Response.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Models -{ - /// - /// 表示 [POST] /v1/microapp/app/del_categories 接口的响应。 - /// - public class OpenApiMicroAppAppDeleteCategoriesV1Response : ByteDanceMicroAppOpenApiResponse - { - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/App/Category/OpenApiMicroAppAppSupplyCategoriesV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/App/Category/OpenApiMicroAppAppSupplyCategoriesV1Request.cs deleted file mode 100644 index ca25e7fc..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/App/Category/OpenApiMicroAppAppSupplyCategoriesV1Request.cs +++ /dev/null @@ -1,25 +0,0 @@ -using System.Collections.Generic; - -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Models -{ - /// - /// 表示 [POST] /v1/microapp/app/supply_categories 接口的请求。 - /// - public class OpenApiMicroAppAppSupplyCategoriesV1Request : ByteDanceMicroAppOpenApiRequest - { - public static class Types - { - public class CategoryInfo : OpenApiMicroAppAppAddCategoriesV1Request.Types.CategoryInfo - { - } - } - - - /// - /// 获取或设置服务类目信息列表。 - /// - [Newtonsoft.Json.JsonProperty("categoryInfo")] - [System.Text.Json.Serialization.JsonPropertyName("categoryInfo")] - public IList CategoryInfoList { get; set; } = new List(); - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/App/Category/OpenApiMicroAppAppSupplyCategoriesV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/App/Category/OpenApiMicroAppAppSupplyCategoriesV1Response.cs deleted file mode 100644 index d3b5c4cf..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/App/Category/OpenApiMicroAppAppSupplyCategoriesV1Response.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Models -{ - /// - /// 表示 [POST] /v1/microapp/app/supply_categories 接口的响应。 - /// - public class OpenApiMicroAppAppSupplyCategoriesV1Response : ByteDanceMicroAppOpenApiResponse - { - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/App/OpenApiMicroAppAppCheckAppNameV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/App/OpenApiMicroAppAppCheckAppNameV1Request.cs deleted file mode 100644 index 5622c10b..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/App/OpenApiMicroAppAppCheckAppNameV1Request.cs +++ /dev/null @@ -1,15 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Models -{ - /// - /// 表示 [GET] /v1/microapp/app/check_app_name 接口的请求。 - /// - public class OpenApiMicroAppAppCheckAppNameV1Request : ByteDanceMicroAppOpenApiRequest - { - /// - /// 获取或设置待检测的小程序名称。 - /// - [Newtonsoft.Json.JsonIgnore] - [System.Text.Json.Serialization.JsonIgnore] - public string AppName { get; set; } = string.Empty; - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/App/OpenApiMicroAppAppCheckAppNameV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/App/OpenApiMicroAppAppCheckAppNameV1Response.cs deleted file mode 100644 index 80d2e6b7..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/App/OpenApiMicroAppAppCheckAppNameV1Response.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Models -{ - /// - /// 表示 [GET] /v1/microapp/app/check_app_name 接口的响应。 - /// - public class OpenApiMicroAppAppCheckAppNameV1Response : ByteDanceMicroAppOpenApiResponse - { - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/App/OpenApiMicroAppAppCreditScoreV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/App/OpenApiMicroAppAppCreditScoreV1Request.cs deleted file mode 100644 index 51d1f1f5..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/App/OpenApiMicroAppAppCreditScoreV1Request.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Models -{ - /// - /// 表示 [GET] /v1/microapp/app/credit_score 接口的请求。 - /// - public class OpenApiMicroAppAppCreditScoreV1Request : ByteDanceMicroAppOpenApiRequest - { - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/App/OpenApiMicroAppAppCreditScoreV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/App/OpenApiMicroAppAppCreditScoreV1Response.cs deleted file mode 100644 index 76a6ed2c..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/App/OpenApiMicroAppAppCreditScoreV1Response.cs +++ /dev/null @@ -1,28 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Models -{ - /// - /// 表示 [GET] /v1/microapp/app/credit_score 接口的响应。 - /// - public class OpenApiMicroAppAppCreditScoreV1Response : ByteDanceMicroAppOpenApiResponse - { - public static class Types - { - public class Data - { - /// - /// 获取或设置信用分分值。 - /// - [Newtonsoft.Json.JsonProperty("creditScore")] - [System.Text.Json.Serialization.JsonPropertyName("creditScore")] - public int CreditScore { get; set; } - } - } - - /// - /// 获取或设置返回数据。 - /// - [Newtonsoft.Json.JsonProperty("data")] - [System.Text.Json.Serialization.JsonPropertyName("data")] - public Types.Data? Data { get; set; } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/App/OpenApiMicroAppAppInfoV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/App/OpenApiMicroAppAppInfoV1Request.cs deleted file mode 100644 index 8f68f63b..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/App/OpenApiMicroAppAppInfoV1Request.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Models -{ - /// - /// 表示 [GET] /v1/microapp/app/info 接口的请求。 - /// - public class OpenApiMicroAppAppInfoV1Request : ByteDanceMicroAppOpenApiRequest - { - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/App/OpenApiMicroAppAppModifyAppIconV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/App/OpenApiMicroAppAppModifyAppIconV1Request.cs deleted file mode 100644 index 765cfd9d..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/App/OpenApiMicroAppAppModifyAppIconV1Request.cs +++ /dev/null @@ -1,15 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Models -{ - /// - /// 表示 [POST] /v1/microapp/app/modify_app_icon 接口的请求。 - /// - public class OpenApiMicroAppAppModifyAppIconV1Request : ByteDanceMicroAppOpenApiRequest - { - /// - /// 获取或设置准备修改的小程序图标路径。 - /// - [Newtonsoft.Json.JsonProperty("new_icon_path")] - [System.Text.Json.Serialization.JsonPropertyName("new_icon_path")] - public string NewIconPath { get; set; } = string.Empty; - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/App/OpenApiMicroAppAppModifyAppIconV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/App/OpenApiMicroAppAppModifyAppIconV1Response.cs deleted file mode 100644 index b77924aa..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/App/OpenApiMicroAppAppModifyAppIconV1Response.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Models -{ - /// - /// 表示 [POST] /v1/microapp/app/modify_app_icon 接口的响应。 - /// - public class OpenApiMicroAppAppModifyAppIconV1Response : ByteDanceMicroAppOpenApiResponse - { } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/App/OpenApiMicroAppAppModifyAppIntroductionV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/App/OpenApiMicroAppAppModifyAppIntroductionV1Request.cs deleted file mode 100644 index 0d53ce3c..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/App/OpenApiMicroAppAppModifyAppIntroductionV1Request.cs +++ /dev/null @@ -1,15 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Models -{ - /// - /// 表示 [POST] /v1/microapp/app/modify_app_intro 接口的请求。 - /// - public class OpenApiMicroAppAppModifyAppIntroductionV1Request : ByteDanceMicroAppOpenApiRequest - { - /// - /// 获取或设置准备修改的小程序简介。 - /// - [Newtonsoft.Json.JsonProperty("new_intro")] - [System.Text.Json.Serialization.JsonPropertyName("new_intro")] - public string NewIntroduction { get; set; } = string.Empty; - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/App/OpenApiMicroAppAppModifyAppIntroductionV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/App/OpenApiMicroAppAppModifyAppIntroductionV1Response.cs deleted file mode 100644 index 7b6b147a..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/App/OpenApiMicroAppAppModifyAppIntroductionV1Response.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Models -{ - /// - /// 表示 [POST] /v1/microapp/app/modify_app_intro 接口的响应。 - /// - public class OpenApiMicroAppAppModifyAppIntroductionV1Response : ByteDanceMicroAppOpenApiResponse - { } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/App/OpenApiMicroAppAppModifyAppNameV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/App/OpenApiMicroAppAppModifyAppNameV1Request.cs deleted file mode 100644 index 5faf332c..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/App/OpenApiMicroAppAppModifyAppNameV1Request.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Models -{ - /// - /// 表示 [POST] /v1/microapp/app/modify_app_name 接口的请求。 - /// - public class OpenApiMicroAppAppModifyAppNameV1Request : ByteDanceMicroAppOpenApiRequest - { - /// - /// 获取或设置准备修改的小程序名称。 - /// - [Newtonsoft.Json.JsonProperty("new_name")] - [System.Text.Json.Serialization.JsonPropertyName("new_name")] - public string NewName { get; set; } = string.Empty; - - /// - /// 获取或设置审核材料路径。 - /// - [Newtonsoft.Json.JsonProperty("material_file_path")] - [System.Text.Json.Serialization.JsonPropertyName("material_file_path")] - public string? MaterialFilePath { get; set; } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/App/OpenApiMicroAppAppModifyAppNameV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/App/OpenApiMicroAppAppModifyAppNameV1Response.cs deleted file mode 100644 index 7e239147..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/App/OpenApiMicroAppAppModifyAppNameV1Response.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Models -{ - /// - /// 表示 [POST] /v1/microapp/app/modify_app_name 接口的响应。 - /// - public class OpenApiMicroAppAppModifyAppNameV1Response : ByteDanceMicroAppOpenApiResponse - { } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/App/OpenApiMicroAppAppModifyWebviewDomainV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/App/OpenApiMicroAppAppModifyWebviewDomainV1Response.cs deleted file mode 100644 index c3c97b0c..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/App/OpenApiMicroAppAppModifyWebviewDomainV1Response.cs +++ /dev/null @@ -1,15 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Models -{ - /// - /// 表示 [POST] /v1/microapp/app/modify_webview_domain 接口的响应。 - /// - public class OpenApiMicroAppAppModifyWebviewDomainV1Response : ByteDanceMicroAppOpenApiResponse - { - /// - /// 获取或设置 Webview 域名列表。 - /// - [Newtonsoft.Json.JsonProperty("data")] - [System.Text.Json.Serialization.JsonPropertyName("data")] - public string[]? WebviewDomainList { get; set; } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/App/OpenApiMicroAppAppQrcodeV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/App/OpenApiMicroAppAppQrcodeV1Request.cs deleted file mode 100644 index 0970962e..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/App/OpenApiMicroAppAppQrcodeV1Request.cs +++ /dev/null @@ -1,23 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Models -{ - /// - /// 表示 [POST] /v1/microapp/app/qrcode 接口的请求。 - /// - public class OpenApiMicroAppAppQrcodeV1Request : ByteDanceMicroAppOpenApiRequest - { - /// - /// 获取或设置新名称。 - /// 默认值:current - /// - [Newtonsoft.Json.JsonProperty("version")] - [System.Text.Json.Serialization.JsonPropertyName("version")] - public string Version { get; set; } = "current"; - - /// - /// 获取或设置小程序页面路径。 - /// - [Newtonsoft.Json.JsonProperty("path")] - [System.Text.Json.Serialization.JsonPropertyName("path")] - public string PagePath { get; set; } = string.Empty; - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/App/OpenApiMicroAppAppQrcodeV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/App/OpenApiMicroAppAppQrcodeV1Response.cs deleted file mode 100644 index 24226e94..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/App/OpenApiMicroAppAppQrcodeV1Response.cs +++ /dev/null @@ -1,13 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Models -{ - /// - /// 表示 [POST] /v1/microapp/app/qrcode 接口的响应。 - /// - public class OpenApiMicroAppAppQrcodeV1Response : ByteDanceMicroAppOpenApiResponse - { - public override bool IsSuccessful() - { - return base.IsSuccessful() && RawBytes?.Length > 0; - } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/App/OpenApiMicroAppAppQualityRatingV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/App/OpenApiMicroAppAppQualityRatingV1Request.cs deleted file mode 100644 index 51f5dc41..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/App/OpenApiMicroAppAppQualityRatingV1Request.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Models -{ - /// - /// 表示 [GET] /v1/microapp/app/quality_rating 接口的请求。 - /// - public class OpenApiMicroAppAppQualityRatingV1Request : ByteDanceMicroAppOpenApiRequest - { - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/OpenApiMicroAppUploadMaterialV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/OpenApiMicroAppUploadMaterialV1Response.cs deleted file mode 100644 index 248d3606..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/OpenApiMicroAppUploadMaterialV1Response.cs +++ /dev/null @@ -1,28 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Models -{ - /// - /// 表示 [POST] /v1/microapp/upload_material 接口的响应。 - /// - public class OpenApiMicroAppUploadMaterialV1Response : ByteDanceMicroAppOpenApiResponse - { - public static class Types - { - public class Data - { - /// - /// 获取或设置资源路径。 - /// - [Newtonsoft.Json.JsonProperty("path")] - [System.Text.Json.Serialization.JsonPropertyName("path")] - public string Path { get; set; } = default!; - } - } - - /// - /// 获取或设置返回数据。 - /// - [Newtonsoft.Json.JsonProperty("data")] - [System.Text.Json.Serialization.JsonPropertyName("data")] - public Types.Data Data { get; set; } = default!; - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/Operation/Application/OpenApiMicroAppOperationLiveApplicationStatusV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/Operation/Application/OpenApiMicroAppOperationLiveApplicationStatusV1Request.cs deleted file mode 100644 index f51daf10..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/Operation/Application/OpenApiMicroAppOperationLiveApplicationStatusV1Request.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Models -{ - /// - /// 表示 [GET] /v1/microapp/operation/live_application_status 接口的请求。 - /// - public class OpenApiMicroAppOperationLiveApplicationStatusV1Request : ByteDanceMicroAppOpenApiRequest - { - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/Operation/Application/OpenApiMicroAppOperationLiveApplicationV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/Operation/Application/OpenApiMicroAppOperationLiveApplicationV1Response.cs deleted file mode 100644 index 680e156a..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/Operation/Application/OpenApiMicroAppOperationLiveApplicationV1Response.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Models -{ - /// - /// 表示 [POST] /v1/microapp/operation/live_application 接口的响应。 - /// - public class OpenApiMicroAppOperationLiveApplicationV1Response : ByteDanceMicroAppOpenApiResponse - { } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/Operation/Application/OpenApiMicroAppOperationPhoneNumberApplicationStatusV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/Operation/Application/OpenApiMicroAppOperationPhoneNumberApplicationStatusV1Request.cs deleted file mode 100644 index e2f3fd00..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/Operation/Application/OpenApiMicroAppOperationPhoneNumberApplicationStatusV1Request.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Models -{ - /// - /// 表示 [GET] /v1/microapp/operation/phone_number_application_status 接口的请求。 - /// - public class OpenApiMicroAppOperationPhoneNumberApplicationStatusV1Request : ByteDanceMicroAppOpenApiRequest - { - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/Operation/Application/OpenApiMicroAppOperationPhoneNumberApplicationV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/Operation/Application/OpenApiMicroAppOperationPhoneNumberApplicationV1Response.cs deleted file mode 100644 index a4ab3b5c..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/Operation/Application/OpenApiMicroAppOperationPhoneNumberApplicationV1Response.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Models -{ - /// - /// 表示 [POST] /v1/microapp/operation/phone_number_application 接口的响应。 - /// - public class OpenApiMicroAppOperationPhoneNumberApplicationV1Response : ByteDanceMicroAppOpenApiResponse - { } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/Operation/Application/OpenApiMicroAppOperationVideoApplicationStatusV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/Operation/Application/OpenApiMicroAppOperationVideoApplicationStatusV1Request.cs deleted file mode 100644 index 793508ac..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/Operation/Application/OpenApiMicroAppOperationVideoApplicationStatusV1Request.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Models -{ - /// - /// 表示 [GET] /v1/microapp/operation/video_application_status 接口的请求。 - /// - public class OpenApiMicroAppOperationVideoApplicationStatusV1Request : ByteDanceMicroAppOpenApiRequest - { - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/Operation/Application/OpenApiMicroAppOperationVideoApplicationV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/Operation/Application/OpenApiMicroAppOperationVideoApplicationV1Response.cs deleted file mode 100644 index 10c0d786..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/Operation/Application/OpenApiMicroAppOperationVideoApplicationV1Response.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Models -{ - /// - /// 表示 [POST] /v1/microapp/operation/video_application 接口的响应。 - /// - public class OpenApiMicroAppOperationVideoApplicationV1Response : ByteDanceMicroAppOpenApiResponse - { } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/Operation/ShareTemplate/OpenApiMicroAppOperationAddShareTemplateV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/Operation/ShareTemplate/OpenApiMicroAppOperationAddShareTemplateV1Response.cs deleted file mode 100644 index 86e74a4a..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/Operation/ShareTemplate/OpenApiMicroAppOperationAddShareTemplateV1Response.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Models -{ - /// - /// 表示 [POST] /v1/microapp/operation/add_share_tpl 接口的响应。 - /// - public class OpenApiMicroAppOperationAddShareTemplateV1Response : ByteDanceMicroAppOpenApiResponse - { } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/Operation/ShareTemplate/OpenApiMicroAppOperationDeleteShareTemplateV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/Operation/ShareTemplate/OpenApiMicroAppOperationDeleteShareTemplateV1Response.cs deleted file mode 100644 index 4792550b..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/Operation/ShareTemplate/OpenApiMicroAppOperationDeleteShareTemplateV1Response.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Models -{ - /// - /// 表示 [POST] /v1/microapp/operation/del_share_tpl 接口的响应。 - /// - public class OpenApiMicroAppOperationDeleteShareTemplateV1Response : ByteDanceMicroAppOpenApiResponse - { } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/Operation/ShareTemplate/OpenApiMicroAppOperationModifyShareTemplateV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/Operation/ShareTemplate/OpenApiMicroAppOperationModifyShareTemplateV1Response.cs deleted file mode 100644 index 12c05176..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/Operation/ShareTemplate/OpenApiMicroAppOperationModifyShareTemplateV1Response.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Models -{ - /// - /// 表示 [POST] /v1/microapp/operation/modify_share_tpl 接口的响应。 - /// - public class OpenApiMicroAppOperationModifyShareTemplateV1Response : ByteDanceMicroAppOpenApiResponse - { } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/Operation/ShareTemplate/OpenApiMicroAppOperationSetDefaultShareTemplateV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/Operation/ShareTemplate/OpenApiMicroAppOperationSetDefaultShareTemplateV1Response.cs deleted file mode 100644 index a008ccca..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/Operation/ShareTemplate/OpenApiMicroAppOperationSetDefaultShareTemplateV1Response.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Models -{ - /// - /// 表示 [POST] /v1/microapp/operation/set_default_share_tpl 接口的响应。 - /// - public class OpenApiMicroAppOperationSetDefaultShareTemplateV1Response : ByteDanceMicroAppOpenApiResponse - { } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/Operation/ShopMaterial/OpenApiMicroAppOperationAddShopMaterialV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/Operation/ShopMaterial/OpenApiMicroAppOperationAddShopMaterialV1Response.cs deleted file mode 100644 index 87e97f35..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/Operation/ShopMaterial/OpenApiMicroAppOperationAddShopMaterialV1Response.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Models -{ - /// - /// 表示 [POST] /v1/microapp/operation/add_shop_material 接口的响应。 - /// - public class OpenApiMicroAppOperationAddShopMaterialV1Response : ByteDanceMicroAppOpenApiResponse - { } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/Package/OpenApiMicroAppPackageAuditHostsV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/Package/OpenApiMicroAppPackageAuditHostsV1Request.cs deleted file mode 100644 index 7fb21cd6..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/Package/OpenApiMicroAppPackageAuditHostsV1Request.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Models -{ - /// - /// 表示 [GET] /v1/microapp/package/audit_hosts 接口的请求。 - /// - public class OpenApiMicroAppPackageAuditHostsV1Request : ByteDanceMicroAppOpenApiRequest - { - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/Package/OpenApiMicroAppPackageAuditV2Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/Package/OpenApiMicroAppPackageAuditV2Response.cs deleted file mode 100644 index 8d8a36d1..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/Package/OpenApiMicroAppPackageAuditV2Response.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Models -{ - /// - /// 表示 [POST] /v2/microapp/package/audit 接口的响应。 - /// - public class OpenApiMicroAppPackageAuditV2Response : ByteDanceMicroAppOpenApiResponse - { } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/Package/OpenApiMicroAppPackageReleaseV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/Package/OpenApiMicroAppPackageReleaseV1Request.cs deleted file mode 100644 index 23e102ba..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/Package/OpenApiMicroAppPackageReleaseV1Request.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Models -{ - /// - /// 表示 [POST] /v1/microapp/package/release 接口的请求。 - /// - public class OpenApiMicroAppPackageReleaseV1Request : ByteDanceMicroAppOpenApiRequest - { - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/Package/OpenApiMicroAppPackageReleaseV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/Package/OpenApiMicroAppPackageReleaseV1Response.cs deleted file mode 100644 index bccd7de6..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/Package/OpenApiMicroAppPackageReleaseV1Response.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Models -{ - /// - /// 表示 [POST] /v1/microapp/package/release 接口的响应。 - /// - public class OpenApiMicroAppPackageReleaseV1Response : ByteDanceMicroAppOpenApiResponse - { } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/Package/OpenApiMicroAppPackageRevokeAuditV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/Package/OpenApiMicroAppPackageRevokeAuditV1Request.cs deleted file mode 100644 index cb5e120b..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/Package/OpenApiMicroAppPackageRevokeAuditV1Request.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Models -{ - /// - /// 表示 [POST] /v1/microapp/package/revoke_audit 接口的请求。 - /// - public class OpenApiMicroAppPackageRevokeAuditV1Request : ByteDanceMicroAppOpenApiRequest - { - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/Package/OpenApiMicroAppPackageRevokeAuditV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/Package/OpenApiMicroAppPackageRevokeAuditV1Response.cs deleted file mode 100644 index 23af6083..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/Package/OpenApiMicroAppPackageRevokeAuditV1Response.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Models -{ - /// - /// 表示 [POST] /v1/microapp/package/revoke_audit 接口的响应。 - /// - public class OpenApiMicroAppPackageRevokeAuditV1Response : ByteDanceMicroAppOpenApiResponse - { } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/Package/OpenApiMicroAppPackageRollbackV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/Package/OpenApiMicroAppPackageRollbackV1Request.cs deleted file mode 100644 index 6652ae06..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/Package/OpenApiMicroAppPackageRollbackV1Request.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Models -{ - /// - /// 表示 [POST] /v1/microapp/package/rollback 接口的请求。 - /// - public class OpenApiMicroAppPackageRollbackV1Request : ByteDanceMicroAppOpenApiRequest - { - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/Package/OpenApiMicroAppPackageRollbackV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/Package/OpenApiMicroAppPackageRollbackV1Response.cs deleted file mode 100644 index c313799c..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/Package/OpenApiMicroAppPackageRollbackV1Response.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Models -{ - /// - /// 表示 [POST] /v1/microapp/package/rollback 接口的响应。 - /// - public class OpenApiMicroAppPackageRollbackV1Response : ByteDanceMicroAppOpenApiResponse - { } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/Package/OpenApiMicroAppPackageUploadV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/Package/OpenApiMicroAppPackageUploadV1Response.cs deleted file mode 100644 index 1cfcb40a..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/Package/OpenApiMicroAppPackageUploadV1Response.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Models -{ - /// - /// 表示 [POST] /v1/microapp/package/upload 接口的响应。 - /// - public class OpenApiMicroAppPackageUploadV1Response : ByteDanceMicroAppOpenApiResponse - { } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/Package/OpenApiMicroAppPackageVersionsV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/Package/OpenApiMicroAppPackageVersionsV1Request.cs deleted file mode 100644 index 53749ca4..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/MicroApp/Package/OpenApiMicroAppPackageVersionsV1Request.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Models -{ - /// - /// 表示 [GET] /v1/microapp/package/versions 接口的请求。 - /// - public class OpenApiMicroAppPackageVersionsV1Request : ByteDanceMicroAppOpenApiRequest - { - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/OAuth/OpenApiOAuthTokenV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/OAuth/OpenApiOAuthTokenV1Request.cs deleted file mode 100644 index e3c7ee73..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/OAuth/OpenApiOAuthTokenV1Request.cs +++ /dev/null @@ -1,30 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Models -{ - /// - /// 表示 [GET] /v1/oauth/token 接口的请求。 - /// - public class OpenApiOAuthTokenV1Request : ByteDanceMicroAppOpenApiRequest - { - /// - /// 获取或设置授权码。与字段 二选一。 - /// - [Newtonsoft.Json.JsonIgnore] - [System.Text.Json.Serialization.JsonIgnore] - public string? AuthCode { get; set; } - - /// - /// 获取或设置授权方刷新令牌。与字段 二选一。 - /// - [Newtonsoft.Json.JsonIgnore] - [System.Text.Json.Serialization.JsonIgnore] - public string? AuthorizerRefreshToken { get; set; } - - /// - /// 获取或设置授权方式。 - /// 默认值:app_to_tp_authorization_code - /// - [Newtonsoft.Json.JsonIgnore] - [System.Text.Json.Serialization.JsonIgnore] - public string GrantType { get; set; } = "app_to_tp_authorization_code"; - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/Settle/OpenApiSettleGetApplyStatusV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/Settle/OpenApiSettleGetApplyStatusV1Request.cs deleted file mode 100644 index aa54702d..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/Settle/OpenApiSettleGetApplyStatusV1Request.cs +++ /dev/null @@ -1,15 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Models -{ - /// - /// 表示 [GET] /v1/settle/get_apply_status 接口的请求。 - /// - public class OpenApiSettleGetApplyStatusV1Request : ByteDanceMicroAppOpenApiRequest - { - /// - /// 获取或设置申请请求 ID。 - /// - [Newtonsoft.Json.JsonIgnore] - [System.Text.Json.Serialization.JsonIgnore] - public string ApplyId { get; set; } = string.Empty; - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/Settle/OpenApiSettlePreCheckV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/Settle/OpenApiSettlePreCheckV1Response.cs deleted file mode 100644 index 556b86ce..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/Settle/OpenApiSettlePreCheckV1Response.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Models -{ - /// - /// 表示 [POST] /v1/settle/pre_check 接口的响应。 - /// - public class OpenApiSettlePreCheckV1Response : ByteDanceMicroAppOpenApiResponse - { - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/ThirdParty/Domain/OpenApiThirdPartyDownloadWebviewFileV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/ThirdParty/Domain/OpenApiThirdPartyDownloadWebviewFileV1Request.cs deleted file mode 100644 index 1ae6dd71..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/ThirdParty/Domain/OpenApiThirdPartyDownloadWebviewFileV1Request.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Models -{ - /// - /// 表示 [GET] /v1/tp/download/webview_file 接口的请求。 - /// - public class OpenApiThirdPartyDownloadWebviewFileV1Request : ByteDanceMicroAppOpenApiRequest - { - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/ThirdParty/Domain/OpenApiThirdPartyDownloadWebviewFileV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/ThirdParty/Domain/OpenApiThirdPartyDownloadWebviewFileV1Response.cs deleted file mode 100644 index 132c6ab2..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/ThirdParty/Domain/OpenApiThirdPartyDownloadWebviewFileV1Response.cs +++ /dev/null @@ -1,13 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Models -{ - /// - /// 表示 [GET] /v1/tp/download/webview_file 接口的响应。 - /// - public class OpenApiThirdPartyDownloadWebviewFileV1Response : ByteDanceMicroAppOpenApiResponse - { - public override bool IsSuccessful() - { - return base.IsSuccessful() && RawBytes?.Length > 0; - } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/ThirdParty/OpenApiThirdPartyUploadPictureMaterialV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/ThirdParty/OpenApiThirdPartyUploadPictureMaterialV1Request.cs deleted file mode 100644 index 23fb7c3a..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/ThirdParty/OpenApiThirdPartyUploadPictureMaterialV1Request.cs +++ /dev/null @@ -1,31 +0,0 @@ -using System; - -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Models -{ - /// - /// 表示 [POST] /v1/tp/upload_pic_material 接口的请求。 - /// - public class OpenApiThirdPartyUploadPictureMaterialV1Request : ByteDanceMicroAppOpenApiRequest - { - /// - /// 获取或设置上传的文件类型。 - /// - [Newtonsoft.Json.JsonIgnore] - [System.Text.Json.Serialization.JsonIgnore] - public int MaterialType { get; set; } - - /// - /// 获取或设置资源文件字节数组。 - /// - [Newtonsoft.Json.JsonIgnore] - [System.Text.Json.Serialization.JsonIgnore] - public byte[] MaterialFileBytes { get; set; } = Array.Empty(); - - /// - /// 获取或设置资源文件文件名。如果不指定将由系统自动生成。 - /// - [Newtonsoft.Json.JsonIgnore] - [System.Text.Json.Serialization.JsonIgnore] - public string? MaterialFileName { get; set; } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/ThirdParty/POI/OpenApiThirdPartyPOIBaseQueryAMapV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/ThirdParty/POI/OpenApiThirdPartyPOIBaseQueryAMapV1Request.cs deleted file mode 100644 index 701444c9..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/ThirdParty/POI/OpenApiThirdPartyPOIBaseQueryAMapV1Request.cs +++ /dev/null @@ -1,15 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Models -{ - /// - /// 表示 [GET] /v1/tp/poi/base/query/amap 接口的请求。 - /// - public class OpenApiThirdPartyPOIBaseQueryAMapV1Request : ByteDanceMicroAppOpenApiRequest - { - /// - /// 获取或设置高德 POI ID。 - /// - [Newtonsoft.Json.JsonIgnore] - [System.Text.Json.Serialization.JsonIgnore] - public string AMapId { get; set; } = string.Empty; - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/ThirdParty/POI/OpenApiThirdPartyPOISupplierQueryV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/ThirdParty/POI/OpenApiThirdPartyPOISupplierQueryV1Request.cs deleted file mode 100644 index 3bb49ed5..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/ThirdParty/POI/OpenApiThirdPartyPOISupplierQueryV1Request.cs +++ /dev/null @@ -1,15 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Models -{ - /// - /// 表示 [GET] /v1/tp/poi/supplier/query 接口的请求。 - /// - public class OpenApiThirdPartyPOISupplierQueryV1Request : ByteDanceMicroAppOpenApiRequest - { - /// - /// 获取或设置外部商铺 ID。 - /// - [Newtonsoft.Json.JsonIgnore] - [System.Text.Json.Serialization.JsonIgnore] - public string SupplierExternalId { get; set; } = string.Empty; - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/ThirdParty/POI/OpenApiThirdPartyPOISupplierSyncV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/ThirdParty/POI/OpenApiThirdPartyPOISupplierSyncV1Response.cs deleted file mode 100644 index 2a51bf5b..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/ThirdParty/POI/OpenApiThirdPartyPOISupplierSyncV1Response.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Models -{ - /// - /// 表示 [POST] /v1/tp/poi/supplier/sync 接口的响应。 - /// - public class OpenApiThirdPartyPOISupplierSyncV1Response : ByteDanceMicroAppOpenApiResponse - { } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/ThirdParty/Template/OpenApiThirdPartyTemplateAddTemplateV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/ThirdParty/Template/OpenApiThirdPartyTemplateAddTemplateV1Request.cs deleted file mode 100644 index 41bbc3dc..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/ThirdParty/Template/OpenApiThirdPartyTemplateAddTemplateV1Request.cs +++ /dev/null @@ -1,15 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Models -{ - /// - /// 表示 [POST] /v1/tp/template/add_tpl 接口的请求。 - /// - public class OpenApiThirdPartyTemplateAddTemplateV1Request : ByteDanceMicroAppOpenApiRequest - { - /// - /// 获取或设置草稿 ID。 - /// - [Newtonsoft.Json.JsonProperty("draft_id")] - [System.Text.Json.Serialization.JsonPropertyName("draft_id")] - public long DraftId { get; set; } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/ThirdParty/Template/OpenApiThirdPartyTemplateAddTemplateV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/ThirdParty/Template/OpenApiThirdPartyTemplateAddTemplateV1Response.cs deleted file mode 100644 index 5de24a29..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/ThirdParty/Template/OpenApiThirdPartyTemplateAddTemplateV1Response.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Models -{ - /// - /// 表示 [POST] /v1/tp/template/add_tpl 接口的响应。 - /// - public class OpenApiThirdPartyTemplateAddTemplateV1Response : ByteDanceMicroAppOpenApiResponse - { } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/ThirdParty/Template/OpenApiThirdPartyTemplateDeleteTemplateV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/ThirdParty/Template/OpenApiThirdPartyTemplateDeleteTemplateV1Request.cs deleted file mode 100644 index 9929a424..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/ThirdParty/Template/OpenApiThirdPartyTemplateDeleteTemplateV1Request.cs +++ /dev/null @@ -1,15 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Models -{ - /// - /// 表示 [POST] /v1/tp/template/del_tpl 接口的请求。 - /// - public class OpenApiThirdPartyTemplateDeleteTemplateV1Request : ByteDanceMicroAppOpenApiRequest - { - /// - /// 获取或设置模板 ID。 - /// - [Newtonsoft.Json.JsonProperty("template_id")] - [System.Text.Json.Serialization.JsonPropertyName("template_id")] - public long TemplateId { get; set; } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/ThirdParty/Template/OpenApiThirdPartyTemplateDeleteTemplateV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/ThirdParty/Template/OpenApiThirdPartyTemplateDeleteTemplateV1Response.cs deleted file mode 100644 index 4318cea3..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/ThirdParty/Template/OpenApiThirdPartyTemplateDeleteTemplateV1Response.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Models -{ - /// - /// 表示 [POST] /v1/tp/template/del_tpl 接口的响应。 - /// - public class OpenApiThirdPartyTemplateDeleteTemplateV1Response : ByteDanceMicroAppOpenApiResponse - { } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/ThirdParty/Template/OpenApiThirdPartyTemplateGetDraftListV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/ThirdParty/Template/OpenApiThirdPartyTemplateGetDraftListV1Request.cs deleted file mode 100644 index 406815c7..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/ThirdParty/Template/OpenApiThirdPartyTemplateGetDraftListV1Request.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System; - -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Models -{ - /// - /// 表示 [GET] /v1/tp/template/get_draft_list 接口的请求。 - /// - [Obsolete("相关接口或字段于 2022-12-28 下线。")] - public class OpenApiThirdPartyTemplateGetDraftListV1Request : ByteDanceMicroAppOpenApiRequest - { - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/ThirdParty/Template/OpenApiThirdPartyTemplateGetDraftListV1Response.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/ThirdParty/Template/OpenApiThirdPartyTemplateGetDraftListV1Response.cs deleted file mode 100644 index 7ea2eb9c..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/ThirdParty/Template/OpenApiThirdPartyTemplateGetDraftListV1Response.cs +++ /dev/null @@ -1,52 +0,0 @@ -using System; - -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Models -{ - /// - /// 表示 [GET] /v1/tp/template/get_draft_list 接口的响应。 - /// - [Obsolete("相关接口或字段于 2022-12-28 下线。")] - public class OpenApiThirdPartyTemplateGetDraftListV1Response : ByteDanceMicroAppOpenApiResponse - { - public static class Types - { - public class Draft - { - /// - /// 获取或设置草稿 ID。 - /// - [Newtonsoft.Json.JsonProperty("draft_id")] - [System.Text.Json.Serialization.JsonPropertyName("draft_id")] - public long DraftId { get; set; } - - /// - /// 获取或设置版本号。 - /// - [Newtonsoft.Json.JsonProperty("user_version")] - [System.Text.Json.Serialization.JsonPropertyName("user_version")] - public string UserVersion { get; set; } = default!; - - /// - /// 获取或设置描述。 - /// - [Newtonsoft.Json.JsonProperty("user_desc")] - [System.Text.Json.Serialization.JsonPropertyName("user_desc")] - public string UserDescription { get; set; } = default!; - - /// - /// 获取或设置创建时间戳。 - /// - [Newtonsoft.Json.JsonProperty("create_time")] - [System.Text.Json.Serialization.JsonPropertyName("create_time")] - public long CreateTimestamp { get; set; } - } - } - - /// - /// 获取或设置草稿列表。 - /// - [Newtonsoft.Json.JsonProperty("draft_list")] - [System.Text.Json.Serialization.JsonPropertyName("draft_list")] - public Types.Draft[] DraftList { get; set; } = default!; - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/ThirdParty/Template/OpenApiThirdPartyTemplateGetTemplateAppListV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/ThirdParty/Template/OpenApiThirdPartyTemplateGetTemplateAppListV1Request.cs deleted file mode 100644 index 250d72aa..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/ThirdParty/Template/OpenApiThirdPartyTemplateGetTemplateAppListV1Request.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Models -{ - /// - /// 表示 [GET] /v1/tp/template/get_tpl_app_list 接口的请求。 - /// - public class OpenApiThirdPartyTemplateGetTemplateAppListV1Request : ByteDanceMicroAppOpenApiRequest - { - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/ThirdParty/Template/OpenApiThirdPartyTemplateGetTemplateListV1Request.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/ThirdParty/Template/OpenApiThirdPartyTemplateGetTemplateListV1Request.cs deleted file mode 100644 index 6b48c959..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Models/ThirdParty/Template/OpenApiThirdPartyTemplateGetTemplateListV1Request.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Models -{ - /// - /// 表示 [GET] /v1/tp/template/get_tpl_list 接口的请求。 - /// - public class OpenApiThirdPartyTemplateGetTemplateListV1Request : ByteDanceMicroAppOpenApiRequest - { - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Settings/Credentials.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Settings/Credentials.cs deleted file mode 100644 index b18691c3..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/OpenApi/Settings/Credentials.cs +++ /dev/null @@ -1,37 +0,0 @@ -using System; - -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi.Settings -{ - public class Credentials - { - /// - /// 初始化客户端时 的副本。 - /// - public string ComponentAppId { get; } - - /// - /// 初始化客户端时 的副本。 - /// - public string ComponentAppSecret { get; } - - /// - /// 初始化客户端时 的副本。 - /// - public string? PushToken { get; } - - /// - /// 初始化客户端时 的副本。 - /// - public string? PushEncodingAESKey { get; set; } - - internal Credentials(ByteDanceMicroAppOpenApiClientOptions options) - { - if (options == null) throw new ArgumentNullException(nameof(options)); - - ComponentAppId = options.ComponentAppId; - ComponentAppSecret = options.ComponentAppSecret; - PushToken = options.PushToken; - PushEncodingAESKey = options.PushEncodingAESKey; - } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/ByteDanceMicroAppProductApiClient.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/ByteDanceMicroAppProductApiClient.cs deleted file mode 100644 index 14bf661d..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/ByteDanceMicroAppProductApiClient.cs +++ /dev/null @@ -1,130 +0,0 @@ -using System; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Flurl.Http; - -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.ProductApi -{ - /// - /// 一个字节小程序泛知识课程库 API HTTP 客户端。 - /// - public class ByteDanceMicroAppProductApiClient : CommonClientBase, ICommonClient - { - /// - /// 获取当前客户端使用的字节小程序凭证。 - /// - public Settings.Credentials Credentials { get; } - - /// - /// 用指定的配置项初始化 类的新实例。 - /// - /// 配置项。 - public ByteDanceMicroAppProductApiClient(ByteDanceMicroAppProductApiClientOptions options) - : base() - { - if (options == null) throw new ArgumentNullException(nameof(options)); - - Credentials = new Settings.Credentials(options); - - FlurlClient.BaseUrl = options.Endpoints ?? ByteDanceMicroAppProductApiEndpoints.DEFAULT; - FlurlClient.WithTimeout(TimeSpan.FromMilliseconds(options.Timeout)); - } - - /// - /// 用指定的字节小程序 AppId、字节小程序 AppSecret 初始化 类的新实例。 - /// - /// 字节小程序 AppId。 - /// 字节小程序 AppSecret。 - public ByteDanceMicroAppProductApiClient(string appId, string appSecret) - : this(new ByteDanceMicroAppProductApiClientOptions() { AppId = appId, AppSecret = appSecret }) - { - } - - /// - /// 使用当前客户端生成一个新的 对象。 - /// - /// - /// - /// - /// - public IFlurlRequest CreateRequest(ByteDanceMicroAppProductApiRequest request, HttpMethod method, params object[] urlSegments) - { - IFlurlRequest flurlRequest = FlurlClient.Request(urlSegments).WithVerb(method); - - if (request.Timeout != null) - { - flurlRequest.WithTimeout(TimeSpan.FromMilliseconds(request.Timeout.Value)); - } - - if (request.AppId == null) - { - request.AppId = Credentials.AppId; - } - - return flurlRequest; - } - - /// - /// 异步发起请求。 - /// - /// - /// - /// - /// - /// - public async Task SendRequestAsync(IFlurlRequest flurlRequest, HttpContent? httpContent = null, CancellationToken cancellationToken = default) - where T : ByteDanceMicroAppProductApiResponse, new() - { - if (flurlRequest == null) throw new ArgumentNullException(nameof(flurlRequest)); - - try - { - using IFlurlResponse flurlResponse = await base.SendRequestAsync(flurlRequest, httpContent, cancellationToken); - return await WrapResponseWithJsonAsync(flurlResponse, cancellationToken); - } - catch (FlurlHttpTimeoutException ex) - { - throw new Exceptions.ByteDanceMicroAppRequestTimeoutException(ex.Message, ex); - } - catch (FlurlHttpException ex) - { - throw new ByteDanceMicroAppException(ex.Message, ex); - } - } - - /// - /// 异步发起请求。 - /// - /// - /// - /// - /// - /// - public async Task SendRequestWithJsonAsync(IFlurlRequest flurlRequest, object? data = null, CancellationToken cancellationToken = default) - where T : ByteDanceMicroAppProductApiResponse, new() - { - if (flurlRequest == null) throw new ArgumentNullException(nameof(flurlRequest)); - - try - { - bool isSimpleRequest = data == null || - flurlRequest.Verb == HttpMethod.Get || - flurlRequest.Verb == HttpMethod.Head || - flurlRequest.Verb == HttpMethod.Options; - using IFlurlResponse flurlResponse = isSimpleRequest ? - await base.SendRequestAsync(flurlRequest, null, cancellationToken) : - await base.SendRequestWithJsonAsync(flurlRequest, data, cancellationToken); - return await WrapResponseWithJsonAsync(flurlResponse, cancellationToken); - } - catch (FlurlHttpTimeoutException ex) - { - throw new Exceptions.ByteDanceMicroAppRequestTimeoutException(ex.Message, ex); - } - catch (FlurlHttpException ex) - { - throw new ByteDanceMicroAppException(ex.Message, ex); - } - } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/ByteDanceMicroAppProductApiClientOptions.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/ByteDanceMicroAppProductApiClientOptions.cs deleted file mode 100644 index 07717a39..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/ByteDanceMicroAppProductApiClientOptions.cs +++ /dev/null @@ -1,30 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.ProductApi -{ - /// - /// 一个用于构造 时使用的配置项。 - /// - public class ByteDanceMicroAppProductApiClientOptions - { - /// - /// 获取或设置请求超时时间(单位:毫秒)。 - /// 默认值:30000 - /// - public int Timeout { get; set; } = 30 * 1000; - - /// - /// 获取或设置字节小程序泛知识课程库 API 域名。 - /// 默认值: - /// - public string Endpoints { get; set; } = ByteDanceMicroAppProductApiEndpoints.DEFAULT; - - /// - /// 获取或设置字节小程序 AppId。 - /// - public string AppId { get; set; } = default!; - - /// - /// 获取或设置字节小程序 AppSecret。 - /// - public string AppSecret { get; set; } = default!; - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/ByteDanceMicroAppProductApiEndpoints.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/ByteDanceMicroAppProductApiEndpoints.cs deleted file mode 100644 index 043d1a19..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/ByteDanceMicroAppProductApiEndpoints.cs +++ /dev/null @@ -1,18 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.ProductApi -{ - /// - /// 字节小程序泛知识课程库 API 接口域名。 - /// - public static class ByteDanceMicroAppProductApiEndpoints - { - /// - /// 泛知识课程接口域名(默认)。 - /// - public const string DEFAULT = "https://developer-product.zijieapi.com/product/api"; - - /// - /// 泛知识课程接口沙盒环境域名。 - /// - public const string SANDBOX = "https://open-sandbox.douyin.com/product/api"; - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/ByteDanceMicroAppProductApiEvent.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/ByteDanceMicroAppProductApiEvent.cs deleted file mode 100644 index a352023f..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/ByteDanceMicroAppProductApiEvent.cs +++ /dev/null @@ -1,29 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.ProductApi -{ - /// - /// 表示字节小程序泛知识课程库 API 消息推送事件的基类。 - /// - public class ByteDanceMicroAppProductApiEvent - { - /// - /// 获取或设置通知类型。 - /// - [Newtonsoft.Json.JsonProperty("notice_type")] - [System.Text.Json.Serialization.JsonPropertyName("notice_type")] - public virtual int NoticeType { get; set; } - - /// - /// 获取或设置确认通知方身份唯一的标志。 - /// - [Newtonsoft.Json.JsonProperty("developer_flag")] - [System.Text.Json.Serialization.JsonPropertyName("developer_flag")] - public virtual string DeveloperFlag { get; set; } = default!; - - /// - /// 获取或设置自定义回调数据。 - /// - [Newtonsoft.Json.JsonProperty("callback_data")] - [System.Text.Json.Serialization.JsonPropertyName("callback_data")] - public virtual string? CallbackData { get; set; } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/ByteDanceMicroAppProductApiRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/ByteDanceMicroAppProductApiRequest.cs deleted file mode 100644 index 26c466d0..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/ByteDanceMicroAppProductApiRequest.cs +++ /dev/null @@ -1,36 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.ProductApi -{ - /// - /// 字节小程序泛知识课程库 API 请求的基类。 - /// - public abstract class ByteDanceMicroAppProductApiRequest : ICommonRequest - { - /// - /// 获取或设置请求超时时间(单位:毫秒)。如果不指定将使用构造 时的 参数,这在需要指定特定耗时请求(比如上传或下载文件)的超时时间时很有用。 - /// - [Newtonsoft.Json.JsonIgnore] - [System.Text.Json.Serialization.JsonIgnore] - public virtual int? Timeout { get; set; } - - /// - /// 获取或设置字节小程序的 AppId。如果不指定将使用构造 时的 参数。 - /// - [Newtonsoft.Json.JsonProperty("appid")] - [System.Text.Json.Serialization.JsonPropertyName("appid")] - public virtual string? AppId { get; set; } - - /// - /// 获取或设置字节小程序的 AccessToken。 - /// - [Newtonsoft.Json.JsonProperty("access_token")] - [System.Text.Json.Serialization.JsonPropertyName("access_token")] - public virtual string? AccessToken { get; set; } - - /// - /// 获取或设置沙盒环境自动审核参数。 - /// - [Newtonsoft.Json.JsonIgnore] - [System.Text.Json.Serialization.JsonIgnore] - public virtual string? SandboxCheckType { get; set; } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/ByteDanceMicroAppProductApiResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/ByteDanceMicroAppProductApiResponse.cs deleted file mode 100644 index 37fa53a0..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/ByteDanceMicroAppProductApiResponse.cs +++ /dev/null @@ -1,89 +0,0 @@ -using System.Collections.Generic; - -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.ProductApi -{ - /// - /// 字节小程序泛知识课程库 API 响应的基类。 - /// - public abstract class ByteDanceMicroAppProductApiResponse : ICommonResponse - { - /// - /// - /// - int ICommonResponse.RawStatus { get; set; } - - /// - /// - /// - IDictionary ICommonResponse.RawHeaders { get; set; } = default!; - - /// - /// - /// - byte[] ICommonResponse.RawBytes { get; set; } = default!; - - /// - /// 获取原始的 HTTP 响应状态码。 - /// - [Newtonsoft.Json.JsonIgnore] - [System.Text.Json.Serialization.JsonIgnore] - public int RawStatus - { - get { return ((ICommonResponse)this).RawStatus; } - internal set { ((ICommonResponse)this).RawStatus = value; } - } - - /// - /// 获取原始的 HTTP 响应表头集合。 - /// - [Newtonsoft.Json.JsonIgnore] - [System.Text.Json.Serialization.JsonIgnore] - public IDictionary RawHeaders - { - get { return ((ICommonResponse)this).RawHeaders; } - internal set { ((ICommonResponse)this).RawHeaders = value; } - } - - /// - /// 获取原始的 HTTP 响应正文。 - /// - [Newtonsoft.Json.JsonIgnore] - [System.Text.Json.Serialization.JsonIgnore] - public byte[] RawBytes - { - get { return ((ICommonResponse)this).RawBytes; } - internal set { ((ICommonResponse)this).RawBytes = value; } - } - - /// - /// 获取字节小程序 API 返回的错误码。 - /// - [Newtonsoft.Json.JsonProperty("err_no")] - [System.Text.Json.Serialization.JsonPropertyName("err_no")] - public virtual int ErrorNumber { get; set; } - - /// - /// 获取字节小程序 API 返回的错误描述。 - /// - [Newtonsoft.Json.JsonProperty("err_msg")] - [System.Text.Json.Serialization.JsonPropertyName("err_msg")] - public virtual string? ErrorMessage { get; set; } - - /// - /// 获取字节小程序 API 返回的日志 ID。 - /// - [Newtonsoft.Json.JsonProperty("log_id")] - [System.Text.Json.Serialization.JsonPropertyName("log_id")] - [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumericalStringReadOnlyConverter))] - public virtual string? LogId { get; set; } - - /// - /// 获取一个值,该值指示调用字节小程序 API 是否成功(即 HTTP 状态码为 200、且 `errcode` 值为 0)。 - /// - /// - public virtual bool IsSuccessful() - { - return RawStatus == 200 && ErrorNumber == 0; - } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/Extensions/ByteDanceMicroAppProductApiClientEventExtensions.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/Extensions/ByteDanceMicroAppProductApiClientEventExtensions.cs deleted file mode 100644 index b98aaa39..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/Extensions/ByteDanceMicroAppProductApiClientEventExtensions.cs +++ /dev/null @@ -1,50 +0,0 @@ -using System; - -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.ProductApi -{ - /// - /// 为 提供回调通知事件的扩展方法。 - /// - public static class ByteDanceMicroAppProductApiClientEventExtensions - { - private static TEvent InnerDeserializeEventFromJson(ByteDanceMicroAppProductApiClient client, string callbackJson) - where TEvent : ByteDanceMicroAppProductApiEvent - { - if (client == null) throw new ArgumentNullException(nameof(client)); - if (callbackJson == null) throw new ArgumentNullException(callbackJson); - - try - { - return client.JsonSerializer.Deserialize(callbackJson); - } - catch (Exception ex) - { - throw new Exceptions.ByteDanceMicroAppEventSerializationException("Failed to deserialize event data. Please see the inner exception for more details.", ex); - } - } - - /// - /// 从 JSON 反序列化得到 对象。 - /// - /// - /// - /// - /// - public static TEvent DeserializeEventFromJson(this ByteDanceMicroAppProductApiClient client, string callbackJson) - where TEvent : ByteDanceMicroAppProductApiEvent, new() - { - return InnerDeserializeEventFromJson(client, callbackJson); - } - - /// - /// 从 JSON 反序列化得到 对象。 - /// - /// - /// - /// - public static ByteDanceMicroAppProductApiEvent DeserializeEventFromJson(this ByteDanceMicroAppProductApiClient client, string callbackJson) - { - return InnerDeserializeEventFromJson(client, callbackJson); - } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/Extensions/ByteDanceMicroAppProductApiClientExecuteExtensions.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/Extensions/ByteDanceMicroAppProductApiClientExecuteExtensions.cs deleted file mode 100644 index 62eedfe2..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/Extensions/ByteDanceMicroAppProductApiClientExecuteExtensions.cs +++ /dev/null @@ -1,347 +0,0 @@ -using System; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Flurl.Http; - -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.ProductApi -{ - public static class ByteDanceMicroAppProductApiClientExecuteExtensions - { - /// - /// 异步调用 [POST] /add 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/pan-knowledge/product-add - /// - /// - /// - /// - /// - public static async Task ExecuteProductApiAddAsync(this ByteDanceMicroAppProductApiClient client, Models.ProductApiAddRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - if (request.Product.CommonProductInfo.AppId == null) - request.Product.CommonProductInfo.AppId = client.Credentials.AppId; - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "add") - .WithHeader("Aweme-Check-Type", request.SandboxCheckType); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /modify 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/pan-knowledge/product-modify - /// - /// - /// - /// - /// - public static async Task ExecuteProductApiModifyAsync(this ByteDanceMicroAppProductApiClient client, Models.ProductApiModifyRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - if (request.Product.CommonProductInfo.AppId == null) - request.Product.CommonProductInfo.AppId = client.Credentials.AppId; - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "modify") - .WithHeader("Aweme-Check-Type", request.SandboxCheckType); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /modify_status 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/pan-knowledge/status-modify - /// - /// - /// - /// - /// - public static async Task ExecuteProductApiModifyStatusAsync(this ByteDanceMicroAppProductApiClient client, Models.ProductApiModifyStatusRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - if (request.ProductStatusInfo.AppId == null) - request.ProductStatusInfo.AppId = client.Credentials.AppId; - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "modify_status") - .WithHeader("Aweme-Check-Type", request.SandboxCheckType); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /modify_no_audit 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/pan-knowledge/product-modify-no-audit - /// - /// - /// - /// - /// - public static async Task ExecuteProductApiModifyNoAuditAsync(this ByteDanceMicroAppProductApiClient client, Models.ProductApiModifyNoAuditRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - if (request.ProductInfo != null) - { - if (request.ProductInfo.AppId == null) - request.ProductInfo.AppId = client.Credentials.AppId; - } - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "modify_no_audit") - .WithHeader("Aweme-Check-Type", request.SandboxCheckType); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /query 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/pan-knowledge/product-query - /// - /// - /// - /// - /// - public static async Task ExecuteProductApiQueryAsync(this ByteDanceMicroAppProductApiClient client, Models.ProductApiQueryRequest 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(request, HttpMethod.Post, "query"); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /query_review 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/pan-knowledge/queryReview - /// - /// - /// - /// - /// - /// - public static async Task ExecuteProductApiQueryReviewAsync(this ByteDanceMicroAppProductApiClient client, Models.ProductApiQueryReviewRequest 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(request, HttpMethod.Post, "query_review"); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /query_template_info 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/pan-knowledge/query-test-course - /// - /// - /// - /// - /// - public static async Task ExecuteProductApiQueryTemplateInfoAsync(this ByteDanceMicroAppProductApiClient client, Models.ProductApiQueryTemplateInfoRequest 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(request, HttpMethod.Post, "query_template_info"); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /query_class_info 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/pan-knowledge/product/queryClassInfo - /// - /// - /// - /// - /// - public static async Task ExecuteProductApiQueryClassInfoAsync(this ByteDanceMicroAppProductApiClient client, Models.ProductApiQueryClassInfoRequest 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(request, HttpMethod.Post, "query_class_info"); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - #region Resource - /// - /// 异步调用 [POST] /upload_resource 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/pan-knowledge/resource-upload - /// - /// - /// - /// - /// - public static async Task ExecuteProductApiUploadResourceAsync(this ByteDanceMicroAppProductApiClient client, Models.ProductApiUploadResourceRequest 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(request, HttpMethod.Post, "upload_resource"); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /query_resource_status 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/pan-knowledge/resource-upload-query - /// - /// - /// - /// - /// - public static async Task ExecuteProductApiQueryResourceStatusAsync(this ByteDanceMicroAppProductApiClient client, Models.ProductApiQueryResourceStatusRequest 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(request, HttpMethod.Post, "query_resource_status"); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - #endregion - - #region Qualification - /// - /// 异步调用 [POST] /add_qualification 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/pan-knowledge/qualification-add - /// - /// - /// - /// - /// - public static async Task ExecuteProductApiAddQualificationAsync(this ByteDanceMicroAppProductApiClient client, Models.ProductApiAddQualificationRequest 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(request, HttpMethod.Post, "add_qualification") - .WithHeader("Aweme-Check-Type", request.SandboxCheckType); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /modify_qualification 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/pan-knowledge/qualification-modify - /// - /// - /// - /// - /// - public static async Task ExecuteProductApiModifyQualificationAsync(this ByteDanceMicroAppProductApiClient client, Models.ProductApiModifyQualificationRequest 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(request, HttpMethod.Post, "modify_qualification") - .WithHeader("Aweme-Check-Type", request.SandboxCheckType); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /query_qualification 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/pan-knowledge/qualification-query - /// - /// - /// - /// - /// - public static async Task ExecuteProductApiQueryQualificationAsync(this ByteDanceMicroAppProductApiClient client, Models.ProductApiQueryQualificationRequest 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(request, HttpMethod.Post, "query_qualification"); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - #endregion - - #region RefundRule - /// - /// 异步调用 [POST] /query_refund_rule_meta 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/pan-knowledge/refund-meta-query - /// - /// - /// - /// - /// - public static async Task ExecuteProductApiQueryRefundRuleMetaAsync(this ByteDanceMicroAppProductApiClient client, Models.ProductApiQueryRefundRuleMetaRequest 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(request, HttpMethod.Post, "query_refund_rule_meta") - .WithHeader("Aweme-Check-Type", request.SandboxCheckType); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /modify_refund_rule 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/pan-knowledge/product-refund-rule-modify - /// - /// - /// - /// - /// - public static async Task ExecuteProductApiModifyRefundRuleAsync(this ByteDanceMicroAppProductApiClient client, Models.ProductApiModifyRefundRuleRequest 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(request, HttpMethod.Post, "modify_refund_rule") - .WithHeader("Aweme-Check-Type", request.SandboxCheckType); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - #endregion - - #region Callback - /// - /// 异步调用 [POST] /sync_callback_url 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/pan-knowledge/sync-callback-url - /// - /// - /// - /// - /// - public static async Task ExecuteProductApiSyncCallbackUrlAsync(this ByteDanceMicroAppProductApiClient client, Models.ProductApiSyncCallbackUrlRequest 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(request, HttpMethod.Post, "sync_callback_url"); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - #endregion - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/Models/Callback/ProductApiSyncCallbackUrlRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/Models/Callback/ProductApiSyncCallbackUrlRequest.cs deleted file mode 100644 index e4116c9c..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/Models/Callback/ProductApiSyncCallbackUrlRequest.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.ProductApi.Models -{ - /// - /// 表示 [POST] /sync_callback_url 接口的请求。 - /// - public class ProductApiSyncCallbackUrlRequest : ByteDanceMicroAppProductApiRequest - { - /// - /// 获取或设置接受通知的 URL。 - /// - [Newtonsoft.Json.JsonProperty("callback_url")] - [System.Text.Json.Serialization.JsonPropertyName("callback_url")] - public string CallbackUrl { get; set; } = string.Empty; - - /// - /// 获取或设置确认通知方身份唯一标识。 - /// - [Newtonsoft.Json.JsonProperty("developer_flag")] - [System.Text.Json.Serialization.JsonPropertyName("developer_flag")] - public string DeveloperFlag { get; set; } = string.Empty; - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/Models/Callback/ProductApiSyncCallbackUrlResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/Models/Callback/ProductApiSyncCallbackUrlResponse.cs deleted file mode 100644 index 0c61aca6..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/Models/Callback/ProductApiSyncCallbackUrlResponse.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.ProductApi.Models -{ - /// - /// 表示 [POST] /sync_callback_url 接口的响应。 - /// - public class ProductApiSyncCallbackUrlResponse : ByteDanceMicroAppProductApiResponse - { - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/Models/ProductApiAddRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/Models/ProductApiAddRequest.cs deleted file mode 100644 index 257544fe..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/Models/ProductApiAddRequest.cs +++ /dev/null @@ -1,440 +0,0 @@ -using System.Collections.Generic; - -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.ProductApi.Models -{ - /// - /// 表示 [POST] /add 接口的请求。 - /// - public class ProductApiAddRequest : ByteDanceMicroAppProductApiRequest - { - public static class Types - { - public class Product - { - public static class Types - { - public class CommonProductInfo - { - public static class Types - { - public class PriceInfo - { - /// - /// 获取或设置价格粒度单位。 - /// - [Newtonsoft.Json.JsonProperty("unit")] - [System.Text.Json.Serialization.JsonPropertyName("unit")] - public string Unit { get; set; } = string.Empty; - - /// - /// 获取或设置价格(单位:分)。 - /// - [Newtonsoft.Json.JsonProperty("price")] - [System.Text.Json.Serialization.JsonPropertyName("price")] - public int Price { get; set; } - - /// - /// 获取或设置实际成交价格(单位:分)。 - /// - [Newtonsoft.Json.JsonProperty("real_price")] - [System.Text.Json.Serialization.JsonPropertyName("real_price")] - public int? RealPrice { get; set; } - - /// - /// 获取或设置当前服务的实际成交价格区间最低价格(单位:分)。 - /// - [Newtonsoft.Json.JsonProperty("range_min_price")] - [System.Text.Json.Serialization.JsonPropertyName("range_min_price")] - public int? RangeMinPrice { get; set; } - - /// - /// 获取或设置当前服务的实际成交价格区间最高价格(单位:分)。 - /// - [Newtonsoft.Json.JsonProperty("range_max_price")] - [System.Text.Json.Serialization.JsonPropertyName("range_max_price")] - public int? RangeMaxPrice { get; set; } - } - - public class PathInfo - { - /// - /// 获取或设置跳转的页面。 - /// - [Newtonsoft.Json.JsonProperty("path")] - [System.Text.Json.Serialization.JsonPropertyName("path")] - public string PagePath { get; set; } = string.Empty; - - /// - /// 获取或设置页面参数字典。 - /// - [Newtonsoft.Json.JsonProperty("query")] - [System.Text.Json.Serialization.JsonPropertyName("query")] - public IDictionary? QueryMap { get; set; } - } - - public class ProductFulfilment - { - public static class Types - { - public class FulfillmentContent - { - /// - /// 获取或设置履约内容名称。 - /// - [Newtonsoft.Json.JsonProperty("name")] - [System.Text.Json.Serialization.JsonPropertyName("name")] - public string Name { get; set; } = string.Empty; - - /// - /// 获取或设置文字内容。 - /// - [Newtonsoft.Json.JsonProperty("text")] - [System.Text.Json.Serialization.JsonPropertyName("text")] - public string? Text { get; set; } - - /// - /// 获取或设置履约文件资源路径。 - /// - [Newtonsoft.Json.JsonProperty("fulfillment_uri")] - [System.Text.Json.Serialization.JsonPropertyName("fulfillment_uri")] - public string? FulfillmentPath { get; set; } - } - } - - /// - /// 获取或设置履约详情。 - /// - [Newtonsoft.Json.JsonProperty("fulfillment_content")] - [System.Text.Json.Serialization.JsonPropertyName("fulfillment_content")] - public Types.FulfillmentContent FulfillmentContent { get; set; } = new Types.FulfillmentContent(); - - /// - /// 获取或设置履约类型。 - /// - [Newtonsoft.Json.JsonProperty("fulfillment_type")] - [System.Text.Json.Serialization.JsonPropertyName("fulfillment_type")] - public int FulfillmentType { get; set; } - } - - public class ProductDetail - { - public static class Types - { - public class RichText - { - /// - /// 获取或设置富文本字符串。 - /// - [Newtonsoft.Json.JsonProperty("text")] - [System.Text.Json.Serialization.JsonPropertyName("text")] - public string? String { get; set; } - - /// - /// 获取或设置富文本资源路径。 - /// - [Newtonsoft.Json.JsonProperty("uri")] - [System.Text.Json.Serialization.JsonPropertyName("uri")] - public string? FilePath { get; set; } - } - } - - /// - /// 获取或设置文字。 - /// - [Newtonsoft.Json.JsonProperty("text")] - [System.Text.Json.Serialization.JsonPropertyName("text")] - public string? Text { get; set; } - - /// - /// 获取或设置图片资源路径。 - /// - [Newtonsoft.Json.JsonProperty("img_uri")] - [System.Text.Json.Serialization.JsonPropertyName("img_uri")] - public string? ImagePath { get; set; } - - /// - /// 获取或设置富文本内容列表。 - /// - [Newtonsoft.Json.JsonProperty("rich_text")] - [System.Text.Json.Serialization.JsonPropertyName("rich_text")] - public IList? RichTextList { get; set; } - } - - public class AnchorInfo - { - public static class Types - { - public class VideoAnchorInfo - { - /// - /// 获取或设置锚点文案。 - /// - [Newtonsoft.Json.JsonProperty("anchor_title")] - [System.Text.Json.Serialization.JsonPropertyName("anchor_title")] - public string? AnchorTitle { get; set; } - } - } - - /// - /// 获取或设置视频锚点信息。 - /// - [Newtonsoft.Json.JsonProperty("video_anchor_info")] - [System.Text.Json.Serialization.JsonPropertyName("video_anchor_info")] - public Types.VideoAnchorInfo? VideoAnchorInfo { get; set; } - } - } - - /// - /// 获取或设置小程序的 AppId。如果不指定将使用构造 时的 参数。 - /// - [Newtonsoft.Json.JsonProperty("appid")] - [System.Text.Json.Serialization.JsonPropertyName("appid")] - public string? AppId { get; set; } - - /// - /// 获取或设置一级商品分类。 - /// - [Newtonsoft.Json.JsonProperty("first_class")] - [System.Text.Json.Serialization.JsonPropertyName("first_class")] - public int FirstClassId { get; set; } - - /// - /// 获取或设置二级商品分类。 - /// - [Newtonsoft.Json.JsonProperty("second_class")] - [System.Text.Json.Serialization.JsonPropertyName("second_class")] - public int SecondClassId { get; set; } - - /// - /// 获取或设置商品名称。 - /// - [Newtonsoft.Json.JsonProperty("title")] - [System.Text.Json.Serialization.JsonPropertyName("title")] - public string Title { get; set; } = string.Empty; - - /// - /// 获取或设置商品资质资源路径列表。 - /// - [Newtonsoft.Json.JsonProperty("qualification_uris")] - [System.Text.Json.Serialization.JsonPropertyName("qualification_uris")] - public IList QualificationPathList { get; set; } = new List(); - - /// - /// 获取或设置购物须知。 - /// - [Newtonsoft.Json.JsonProperty("purchase_precaution")] - [System.Text.Json.Serialization.JsonPropertyName("purchase_precaution")] - public string PurchasePrecaution { get; set; } = string.Empty; - - /// - /// 获取或设置行业类目。 - /// - [Newtonsoft.Json.JsonProperty("industry_type")] - [System.Text.Json.Serialization.JsonPropertyName("industry_type")] - public int IndustryType { get; set; } - - /// - /// 获取或设置价格信息。 - /// - [Newtonsoft.Json.JsonProperty("price_info")] - [System.Text.Json.Serialization.JsonPropertyName("price_info")] - public Types.PriceInfo PriceInfo { get; set; } = new Types.PriceInfo(); - - /// - /// 获取或设置路径信息列表。 - /// - [Newtonsoft.Json.JsonProperty("path_info_lst")] - [System.Text.Json.Serialization.JsonPropertyName("path_info_lst")] - public IList? PathInfoList { get; set; } - - /// - /// 获取或设置商品履约列表。 - /// - [Newtonsoft.Json.JsonProperty("product_fulfillment_lst")] - [System.Text.Json.Serialization.JsonPropertyName("product_fulfillment_lst")] - public IList? ProductFulfillmentList { get; set; } - - /// - /// 获取或设置商品详情列表。 - /// - [Newtonsoft.Json.JsonProperty("product_detail_lst")] - [System.Text.Json.Serialization.JsonPropertyName("product_detail_lst")] - public IList? ProductDetailLst { get; set; } = new List(); - - /// - /// 获取或设置锚点信息。 - /// - [Newtonsoft.Json.JsonProperty("anchor_info")] - [System.Text.Json.Serialization.JsonPropertyName("anchor_info")] - public Types.AnchorInfo? AnchorInfo { get; set; } - - /// - /// 获取或设置开发者回调数据。 - /// - [Newtonsoft.Json.JsonProperty("callback_data")] - [System.Text.Json.Serialization.JsonPropertyName("callback_data")] - public string? CallbackData { get; set; } - - /// - /// 获取或设置图片文件资源路径。 - /// - [Newtonsoft.Json.JsonProperty("product_img_uri")] - [System.Text.Json.Serialization.JsonPropertyName("product_img_uri")] - public string? ProductImagePath { get; set; } - } - - public class CourseInfo - { - public static class Types - { - public class RefundLabel - { - /// - /// 获取或设置退款标签类型。 - /// - [Newtonsoft.Json.JsonProperty("type")] - [System.Text.Json.Serialization.JsonPropertyName("type")] - public int Type { get; set; } = 3; - - /// - /// 获取或设置「xx天未学可退」标签信息。 - /// - [Newtonsoft.Json.JsonProperty("day_before_use_info")] - [System.Text.Json.Serialization.JsonPropertyName("day_before_use_info")] - public DayBeforeUseInfo? DayBeforeUseInfo { get; set; } - - /// - /// 获取或设置「学习进度不足xx%可退」标签信息。 - /// - [Newtonsoft.Json.JsonProperty("rest_not_learn_info")] - [System.Text.Json.Serialization.JsonPropertyName("rest_not_learn_info")] - public RestNotLearnInfo? RestNotLearnInfo { get; set; } - - /// - /// 获取或设置固定退款标签 ID。 - /// - [Newtonsoft.Json.JsonProperty("fixed")] - [System.Text.Json.Serialization.JsonPropertyName("fixed")] - public int FixedId { get; set; } - } - - public class UseLabel - { - /// - /// 获取或设置有效期字符串(格式:yyyy-MM-dd)。 - /// - [Newtonsoft.Json.JsonProperty("valid_date")] - [System.Text.Json.Serialization.JsonPropertyName("valid_date")] - public string? ValidDateString { get; set; } - } - - public class DayBeforeUseInfo - { - /// - /// 获取或设置天数。 - /// - [Newtonsoft.Json.JsonProperty("day")] - [System.Text.Json.Serialization.JsonPropertyName("day")] - public int Day { get; set; } - } - - public class RestNotLearnInfo - { - /// - /// 获取或设置比例(范围:0~100)。 - /// - [Newtonsoft.Json.JsonProperty("rest_percent")] - [System.Text.Json.Serialization.JsonPropertyName("rest_percent")] - public int RestPercent { get; set; } - } - } - - /// - /// 获取或设置老师 ID。 - /// - [Newtonsoft.Json.JsonProperty("teacher_id")] - [System.Text.Json.Serialization.JsonPropertyName("teacher_id")] - public string? TeacherId { get; set; } - - /// - /// 获取或设置机构 ID。 - /// - [Newtonsoft.Json.JsonProperty("institution_id")] - [System.Text.Json.Serialization.JsonPropertyName("institution_id")] - public string? InstitutionId { get; set; } - - /// - /// 获取或设置课程节数。 - /// - [Newtonsoft.Json.JsonProperty("course_num")] - [System.Text.Json.Serialization.JsonPropertyName("course_num")] - public int CourseCount { get; set; } - - /// - /// 获取或设置退款标签信息。 - /// - [Newtonsoft.Json.JsonProperty("refund_label")] - [System.Text.Json.Serialization.JsonPropertyName("refund_label")] - public Types.RefundLabel? RefundLabel { get; set; } - - /// - /// 获取或设置使用标签信息。 - /// - [Newtonsoft.Json.JsonProperty("use_label")] - [System.Text.Json.Serialization.JsonPropertyName("use_label")] - public Types.UseLabel? UseLabel { get; set; } - - /// - /// 获取或设置课程开始时间毫秒级时间戳。 - /// - [Newtonsoft.Json.JsonProperty("start_timestamp")] - [System.Text.Json.Serialization.JsonPropertyName("start_timestamp")] - public long? StartTimeMilliseconds { get; set; } - - /// - /// 获取或设置课程结束时间毫秒级时间戳。 - /// - [Newtonsoft.Json.JsonProperty("end_timestamp")] - [System.Text.Json.Serialization.JsonPropertyName("end_timestamp")] - public long? EndTimeMilliseconds { get; set; } - } - } - - /// - /// 获取或设置商品通用参数信息。 - /// - [Newtonsoft.Json.JsonProperty("common_product_params")] - [System.Text.Json.Serialization.JsonPropertyName("common_product_params")] - public Types.CommonProductInfo CommonProductInfo { get; set; } = new Types.CommonProductInfo(); - - /// - /// 获取或设置课程参数信息。 - /// - [Newtonsoft.Json.JsonProperty("course_params")] - [System.Text.Json.Serialization.JsonPropertyName("course_params")] - public Types.CourseInfo? CourseInfo { get; set; } - } - } - - /// - /// - /// - [Newtonsoft.Json.JsonIgnore] - [System.Text.Json.Serialization.JsonIgnore] - public override string? AppId { get; set; } - - /// - /// 获取或设置商品类型。 - /// - [Newtonsoft.Json.JsonProperty("product_type")] - [System.Text.Json.Serialization.JsonPropertyName("product_type")] - public int ProductType { get; set; } - - /// - /// 获取或设置商品信息。 - /// - [Newtonsoft.Json.JsonProperty("product")] - [System.Text.Json.Serialization.JsonPropertyName("product")] - public Types.Product Product { get; set; } = new Types.Product(); - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/Models/ProductApiAddResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/Models/ProductApiAddResponse.cs deleted file mode 100644 index 21974cdd..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/Models/ProductApiAddResponse.cs +++ /dev/null @@ -1,35 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.ProductApi.Models -{ - /// - /// 表示 [POST] /add 接口的响应。 - /// - public class ProductApiAddResponse : ByteDanceMicroAppProductApiResponse - { - public static class Types - { - public class Data - { - /// - /// 获取或设置商品 ID。 - /// - [Newtonsoft.Json.JsonProperty("product_id")] - [System.Text.Json.Serialization.JsonPropertyName("product_id")] - public long ProductId { get; set; } - - /// - /// 获取或设置审核 ID。 - /// - [Newtonsoft.Json.JsonProperty("audit_id")] - [System.Text.Json.Serialization.JsonPropertyName("audit_id")] - public string? AuditId { get; set; } - } - } - - /// - /// 获取或设置返回数据。 - /// - [Newtonsoft.Json.JsonProperty("data")] - [System.Text.Json.Serialization.JsonPropertyName("data")] - public Types.Data Data { get; set; } = default!; - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/Models/ProductApiModifyNoAuditRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/Models/ProductApiModifyNoAuditRequest.cs deleted file mode 100644 index 3eaa0f5c..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/Models/ProductApiModifyNoAuditRequest.cs +++ /dev/null @@ -1,78 +0,0 @@ -using System.Collections.Generic; - -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.ProductApi.Models -{ - /// - /// 表示 [POST] /modify_no_audit 接口的请求。 - /// - public class ProductApiModifyNoAuditRequest : ByteDanceMicroAppProductApiRequest - { - public static class Types - { - public class ProductInfo - { - public static class Types - { - public class MiniAppPageInfo - { - /// - /// 获取或设置小程序页面路径。 - /// - [Newtonsoft.Json.JsonProperty("path")] - [System.Text.Json.Serialization.JsonPropertyName("path")] - public string PagePath { get; set; } = string.Empty; - - /// - /// 获取或设置小程序页面查询参数字典。 - /// - [Newtonsoft.Json.JsonProperty("query")] - [System.Text.Json.Serialization.JsonPropertyName("query")] - public IDictionary QueryMap { get; set; } = new Dictionary(); - } - } - - /// - /// 获取或设置小程序 AppId。如果不指定将使用构造 时的 参数。 - /// - [Newtonsoft.Json.JsonProperty("appid")] - [System.Text.Json.Serialization.JsonPropertyName("appid")] - public string AppId { get; set; } = string.Empty; - - /// - /// 获取或设置小程序页面信息列表。 - /// - [Newtonsoft.Json.JsonProperty("path_info_lst")] - [System.Text.Json.Serialization.JsonPropertyName("path_info_lst")] - public IList MiniAppPageList { get; set; } = new List(); - } - } - - /// - /// - /// - [Newtonsoft.Json.JsonIgnore] - [System.Text.Json.Serialization.JsonIgnore] - public override string? AppId { get; set; } - - /// - /// 获取或设置商品 ID。 - /// - [Newtonsoft.Json.JsonProperty("product_id")] - [System.Text.Json.Serialization.JsonPropertyName("product_id")] - public long ProductId { get; set; } - - /// - /// 获取或设置商品类型。 - /// - [Newtonsoft.Json.JsonProperty("product_type")] - [System.Text.Json.Serialization.JsonPropertyName("product_type")] - public int ProductType { get; set; } - - /// - /// 获取或设置商品信息。 - /// - [Newtonsoft.Json.JsonProperty("product")] - [System.Text.Json.Serialization.JsonPropertyName("product")] - public Types.ProductInfo ProductInfo { get; set; } = new Types.ProductInfo(); - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/Models/ProductApiModifyNoAuditResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/Models/ProductApiModifyNoAuditResponse.cs deleted file mode 100644 index ed1d32b3..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/Models/ProductApiModifyNoAuditResponse.cs +++ /dev/null @@ -1,28 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.ProductApi.Models -{ - /// - /// 表示 [POST] /modify_no_audit 接口的响应。 - /// - public class ProductApiModifyNoAuditResponse : ByteDanceMicroAppProductApiResponse - { - public static class Types - { - public class Data - { - /// - /// 获取或设置审核 ID。 - /// - [Newtonsoft.Json.JsonProperty("audit_id")] - [System.Text.Json.Serialization.JsonPropertyName("audit_id")] - public string? AuditId { get; set; } - } - } - - /// - /// 获取或设置返回数据。 - /// - [Newtonsoft.Json.JsonProperty("data")] - [System.Text.Json.Serialization.JsonPropertyName("data")] - public Types.Data Data { get; set; } = default!; - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/Models/ProductApiModifyRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/Models/ProductApiModifyRequest.cs deleted file mode 100644 index 9d2948c7..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/Models/ProductApiModifyRequest.cs +++ /dev/null @@ -1,93 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.ProductApi.Models -{ - /// - /// 表示 [POST] /modify 接口的请求。 - /// - public class ProductApiModifyRequest : ByteDanceMicroAppProductApiRequest - { - public static class Types - { - public class Product : ProductApiAddRequest.Types.Product - { - public new static class Types - { - public class CommonProductInfo : ProductApiAddRequest.Types.Product.Types.CommonProductInfo - { - public new static class Types - { - public class PriceInfo : ProductApiAddRequest.Types.Product.Types.CommonProductInfo.Types.PriceInfo - { - } - - public class PathInfo : ProductApiAddRequest.Types.Product.Types.CommonProductInfo.Types.PathInfo - { - } - - public class ProductFulfilment : ProductApiAddRequest.Types.Product.Types.CommonProductInfo.Types.ProductFulfilment - { - public new static class Types - { - public class FulfillmentContent : ProductApiAddRequest.Types.Product.Types.CommonProductInfo.Types.ProductFulfilment.Types.FulfillmentContent - { - } - } - } - - public class ProductDetail : ProductApiAddRequest.Types.Product.Types.CommonProductInfo.Types.ProductDetail - { - public new static class Types - { - public class RichText : ProductApiAddRequest.Types.Product.Types.CommonProductInfo.Types.ProductDetail.Types.RichText - { - } - } - } - - public class AnchorInfo : ProductApiAddRequest.Types.Product.Types.CommonProductInfo.Types.AnchorInfo - { - public new static class Types - { - public class VideoAnchorInfo : ProductApiAddRequest.Types.Product.Types.CommonProductInfo.Types.AnchorInfo.Types.VideoAnchorInfo - { - } - } - } - } - } - - public class CourseInfo : ProductApiAddRequest.Types.Product.Types.CourseInfo - { - } - } - } - } - - /// - /// - /// - [Newtonsoft.Json.JsonIgnore] - [System.Text.Json.Serialization.JsonIgnore] - public override string? AppId { get; set; } - - /// - /// 获取或设置商品 ID。 - /// - [Newtonsoft.Json.JsonProperty("product_id")] - [System.Text.Json.Serialization.JsonPropertyName("product_id")] - public long ProductId { get; set; } - - /// - /// 获取或设置商品类型。 - /// - [Newtonsoft.Json.JsonProperty("product_type")] - [System.Text.Json.Serialization.JsonPropertyName("product_type")] - public int ProductType { get; set; } - - /// - /// 获取或设置商品信息。 - /// - [Newtonsoft.Json.JsonProperty("product")] - [System.Text.Json.Serialization.JsonPropertyName("product")] - public Types.Product Product { get; set; } = new Types.Product(); - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/Models/ProductApiModifyResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/Models/ProductApiModifyResponse.cs deleted file mode 100644 index 793a6afc..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/Models/ProductApiModifyResponse.cs +++ /dev/null @@ -1,28 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.ProductApi.Models -{ - /// - /// 表示 [POST] /modify 接口的响应。 - /// - public class ProductApiModifyResponse : ByteDanceMicroAppProductApiResponse - { - public static class Types - { - public class Data - { - /// - /// 获取或设置审核 ID。 - /// - [Newtonsoft.Json.JsonProperty("audit_id")] - [System.Text.Json.Serialization.JsonPropertyName("audit_id")] - public string? AuditId { get; set; } - } - } - - /// - /// 获取或设置返回数据。 - /// - [Newtonsoft.Json.JsonProperty("data")] - [System.Text.Json.Serialization.JsonPropertyName("data")] - public Types.Data Data { get; set; } = default!; - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/Models/ProductApiModifyStatusRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/Models/ProductApiModifyStatusRequest.cs deleted file mode 100644 index 064b4653..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/Models/ProductApiModifyStatusRequest.cs +++ /dev/null @@ -1,49 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.ProductApi.Models -{ - /// - /// 表示 [POST] /modify_status 接口的请求。 - /// - public class ProductApiModifyStatusRequest : ByteDanceMicroAppProductApiRequest - { - public static class Types - { - public class ProductStatusInfo - { - /// - /// 获取或设置小程序 AppId。如果不指定将使用构造 时的 参数。 - /// - [Newtonsoft.Json.JsonProperty("appid")] - [System.Text.Json.Serialization.JsonPropertyName("appid")] - public string? AppId { get; set; } - - /// - /// 获取或设置商品 ID。 - /// - [Newtonsoft.Json.JsonProperty("product_id")] - [System.Text.Json.Serialization.JsonPropertyName("product_id")] - public long? ProductId { get; set; } - - /// - /// 获取或设置商品状态。 - /// - [Newtonsoft.Json.JsonProperty("status")] - [System.Text.Json.Serialization.JsonPropertyName("status")] - public int Status { get; set; } - } - } - - /// - /// - /// - [Newtonsoft.Json.JsonIgnore] - [System.Text.Json.Serialization.JsonIgnore] - public override string? AppId { get; set; } - - /// - /// 获取或设置商品状态信息。 - /// - [Newtonsoft.Json.JsonProperty("product_status_info")] - [System.Text.Json.Serialization.JsonPropertyName("product_status_info")] - public Types.ProductStatusInfo ProductStatusInfo { get; set; } = new Types.ProductStatusInfo(); - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/Models/ProductApiModifyStatusResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/Models/ProductApiModifyStatusResponse.cs deleted file mode 100644 index bce2e26e..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/Models/ProductApiModifyStatusResponse.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.ProductApi.Models -{ - /// - /// 表示 [POST] /modify_status 接口的响应。 - /// - public class ProductApiModifyStatusResponse : ByteDanceMicroAppProductApiResponse - { - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/Models/ProductApiQueryClassInfoRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/Models/ProductApiQueryClassInfoRequest.cs deleted file mode 100644 index 2f8bb22b..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/Models/ProductApiQueryClassInfoRequest.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.ProductApi.Models -{ - /// - /// 表示 [POST] /query_class_info 接口的请求。 - /// - public class ProductApiQueryClassInfoRequest : ByteDanceMicroAppProductApiRequest - { - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/Models/ProductApiQueryClassInfoResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/Models/ProductApiQueryClassInfoResponse.cs deleted file mode 100644 index 3ad55e5d..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/Models/ProductApiQueryClassInfoResponse.cs +++ /dev/null @@ -1,124 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.ProductApi.Models -{ - /// - /// 表示 [POST] /query_class_info 接口的响应。 - /// - public class ProductApiQueryClassInfoResponse : ByteDanceMicroAppProductApiResponse - { - public static class Types - { - public class Data - { - public static class Types - { - public class ProductClassInfo - { - public static class Types - { - public class ClassInfoDetail - { - /// - /// 获取或设置二级类目 ID。 - /// - [Newtonsoft.Json.JsonProperty("second_class_id")] - [System.Text.Json.Serialization.JsonPropertyName("second_class_id")] - public int SecondClassId { get; set; } - - /// - /// 获取或设置二级类目名称。 - /// - [Newtonsoft.Json.JsonProperty("second_class_name")] - [System.Text.Json.Serialization.JsonPropertyName("second_class_name")] - public string SecondClassName { get; set; } = default!; - - /// - /// 获取或设置分类定义。 - /// - [Newtonsoft.Json.JsonProperty("class_definition")] - [System.Text.Json.Serialization.JsonPropertyName("class_definition")] - public string? ClassDefinition { get; set; } - - /// - /// 获取或设置教师资格证要求。 - /// - [Newtonsoft.Json.JsonProperty("teacher_qualification_certificate")] - [System.Text.Json.Serialization.JsonPropertyName("teacher_qualification_certificate")] - public string? TeacherQualificationCertificate { get; set; } - - /// - /// 获取或设置获取或设置专业认证要求。 - /// - [Newtonsoft.Json.JsonProperty("professional_certification")] - [System.Text.Json.Serialization.JsonPropertyName("professional_certification")] - public string? ProfessionalCertification { get; set; } - - /// - /// 获取或设置专业性学历要求。 - /// - [Newtonsoft.Json.JsonProperty("professional_education")] - [System.Text.Json.Serialization.JsonPropertyName("professional_education")] - public string? ProfessionalEducation { get; set; } - - /// - /// 获取或设置行业资质提醒。 - /// - [Newtonsoft.Json.JsonProperty("qualification_tip")] - [System.Text.Json.Serialization.JsonPropertyName("qualification_tip")] - public string? QualificationTips { get; set; } - - /// - /// 获取或设置特殊提醒。 - /// - [Newtonsoft.Json.JsonProperty("special_tip")] - [System.Text.Json.Serialization.JsonPropertyName("special_tip")] - public string? SpecialTips { get; set; } - - /// - /// 获取或设置文档链接。 - /// - [Newtonsoft.Json.JsonProperty("document_link")] - [System.Text.Json.Serialization.JsonPropertyName("document_link")] - public string? DocumentLink { get; set; } - } - } - - /// - /// 获取或设置已入库的课程信息列表。 - /// - [Newtonsoft.Json.JsonProperty("class_info_detail_list")] - [System.Text.Json.Serialization.JsonPropertyName("class_info_detail_list")] - public Types.ClassInfoDetail[] ClassInfoDetailList { get; set; } = default!; - - /// - /// 获取或设置一级类目 ID。 - /// - [Newtonsoft.Json.JsonProperty("first_class_id")] - [System.Text.Json.Serialization.JsonPropertyName("first_class_id")] - public int FirstClassId { get; set; } - - /// - /// 获取或设置一级类目名称。 - /// - [Newtonsoft.Json.JsonProperty("first_class_name")] - [System.Text.Json.Serialization.JsonPropertyName("first_class_name")] - public string FirstClassName { get; set; } = default!; - } - } - - /// - /// 获取或设置课程类目信息列表。 - /// - [Newtonsoft.Json.JsonProperty("product_class_info_list")] - [System.Text.Json.Serialization.JsonPropertyName("product_class_info_list")] - public Types.ProductClassInfo[] ProductClassInfoList { get; set; } = default!; - } - } - - /// - /// 获取或设置返回数据。 - /// - [Newtonsoft.Json.JsonProperty("data")] - [System.Text.Json.Serialization.JsonPropertyName("data")] - public Types.Data Data { get; set; } = default!; - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/Models/ProductApiQueryRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/Models/ProductApiQueryRequest.cs deleted file mode 100644 index 2d054343..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/Models/ProductApiQueryRequest.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System.Collections.Generic; - -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.ProductApi.Models -{ - /// - /// 表示 [POST] /query 接口的请求。 - /// - public class ProductApiQueryRequest : ByteDanceMicroAppProductApiRequest - { - /// - /// 获取或设置商品 ID 列表。 - /// - [Newtonsoft.Json.JsonProperty("product_ids")] - [System.Text.Json.Serialization.JsonPropertyName("product_ids")] - public IList ProductIdList { get; set; } = new List(); - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/Models/ProductApiQueryResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/Models/ProductApiQueryResponse.cs deleted file mode 100644 index 2a039ee0..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/Models/ProductApiQueryResponse.cs +++ /dev/null @@ -1,363 +0,0 @@ -using System.Collections.Generic; - -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.ProductApi.Models -{ - /// - /// 表示 [POST] /query 接口的响应。 - /// - public class ProductApiQueryResponse : ByteDanceMicroAppProductApiResponse - { - public static class Types - { - public class Data - { - public static class Types - { - public class Product - { - public static class Types - { - public class ProductInfo - { - public static class Types - { - public class CommonProductInfo - { - public static class Types - { - public class PriceInfo - { - /// - /// 获取或设置价格粒度单位。 - /// - [Newtonsoft.Json.JsonProperty("unit")] - [System.Text.Json.Serialization.JsonPropertyName("unit")] - public string Unit { get; set; } = default!; - - /// - /// 获取或设置价格(单位:分)。 - /// - [Newtonsoft.Json.JsonProperty("price")] - [System.Text.Json.Serialization.JsonPropertyName("price")] - public int Price { get; set; } - - /// - /// 获取或设置实际成交价格(单位:分)。 - /// - [Newtonsoft.Json.JsonProperty("real_price")] - [System.Text.Json.Serialization.JsonPropertyName("real_price")] - public int? RealPrice { get; set; } - } - - public class PathInfo - { - /// - /// 获取或设置跳转的页面。 - /// - [Newtonsoft.Json.JsonProperty("path")] - [System.Text.Json.Serialization.JsonPropertyName("text")] - public string PagePath { get; set; } = default!; - - /// - /// 获取或设置页面参数字典。 - /// - [Newtonsoft.Json.JsonProperty("query")] - [System.Text.Json.Serialization.JsonPropertyName("query")] - public IDictionary? QueryMap { get; set; } - } - - public class ProductFulfilment - { - public static class Types - { - public class FulfillmentContent - { - /// - /// 获取或设置履约内容名称。 - /// - [Newtonsoft.Json.JsonProperty("name")] - [System.Text.Json.Serialization.JsonPropertyName("name")] - public string Name { get; set; } = default!; - - /// - /// 获取或设置文字内容。 - /// - [Newtonsoft.Json.JsonProperty("text")] - [System.Text.Json.Serialization.JsonPropertyName("text")] - public string? Text { get; set; } - - /// - /// 获取或设置履约文件资源 URL。 - /// - [Newtonsoft.Json.JsonProperty("fulfillment_url")] - [System.Text.Json.Serialization.JsonPropertyName("fulfillment_url")] - public string? FulfillmentUrl { get; set; } - } - } - - /// - /// 获取或设置履约详情。 - /// - [Newtonsoft.Json.JsonProperty("fulfillment_content")] - [System.Text.Json.Serialization.JsonPropertyName("fulfillment_content")] - public Types.FulfillmentContent FulfillmentContent { get; set; } = new Types.FulfillmentContent(); - - /// - /// 获取或设置履约类型。 - /// - [Newtonsoft.Json.JsonProperty("fulfillment_type")] - [System.Text.Json.Serialization.JsonPropertyName("fulfillment_type")] - public int FulfillmentType { get; set; } - } - - public class ProductDetail - { - public static class Types - { - public class RichText - { - /// - /// 获取或设置富文本字符串。 - /// - [Newtonsoft.Json.JsonProperty("text")] - [System.Text.Json.Serialization.JsonPropertyName("text")] - public string? String { get; set; } - - /// - /// 获取或设置富文本资源 URL。 - /// - [Newtonsoft.Json.JsonProperty("url")] - [System.Text.Json.Serialization.JsonPropertyName("url")] - public string? Url { get; set; } - } - } - - /// - /// 获取或设置文字。 - /// - [Newtonsoft.Json.JsonProperty("text")] - [System.Text.Json.Serialization.JsonPropertyName("text")] - public string? Text { get; set; } - - /// - /// 获取或设置图片资源 URL。 - /// - [Newtonsoft.Json.JsonProperty("img_url")] - [System.Text.Json.Serialization.JsonPropertyName("img_url")] - public string? ImageUrl { get; set; } - - /// - /// 获取或设置富文本内容列表。 - /// - [Newtonsoft.Json.JsonProperty("rich_text")] - [System.Text.Json.Serialization.JsonPropertyName("rich_text")] - public Types.RichText[]? RichTextList { get; set; } - } - - public class AnchorInfo - { - public static class Types - { - public class VideoAnchorInfo - { - /// - /// 获取或设置锚点文案。 - /// - [Newtonsoft.Json.JsonProperty("anchor_title")] - [System.Text.Json.Serialization.JsonPropertyName("anchor_title")] - public string? AnchorTitle { get; set; } - } - } - - /// - /// 获取或设置视频锚点信息。 - /// - [Newtonsoft.Json.JsonProperty("video_anchor_info")] - [System.Text.Json.Serialization.JsonPropertyName("video_anchor_info")] - public Types.VideoAnchorInfo? VideoAnchorInfo { get; set; } - } - } - - /// - /// 获取或设置小程序 AppId。 - /// - [Newtonsoft.Json.JsonProperty("appid")] - [System.Text.Json.Serialization.JsonPropertyName("appid")] - public string AppId { get; set; } = default!; - - /// - /// 获取或设置一级商品分类。 - /// - [Newtonsoft.Json.JsonProperty("first_class")] - [System.Text.Json.Serialization.JsonPropertyName("first_class")] - public int FirstClassId { get; set; } - - /// - /// 获取或设置二级商品分类。 - /// - [Newtonsoft.Json.JsonProperty("second_class")] - [System.Text.Json.Serialization.JsonPropertyName("second_class")] - public int SecondClassId { get; set; } - - /// - /// 获取或设置商品名称。 - /// - [Newtonsoft.Json.JsonProperty("title")] - [System.Text.Json.Serialization.JsonPropertyName("title")] - public string Title { get; set; } = default!; - - /// - /// 获取或设置商品资质资源 URL 列表。 - /// - [Newtonsoft.Json.JsonProperty("qualification_urls")] - [System.Text.Json.Serialization.JsonPropertyName("qualification_urls")] - public string[] QualificationUrlList { get; set; } = default!; - - /// - /// 获取或设置购物须知。 - /// - [Newtonsoft.Json.JsonProperty("purchase_precaution")] - [System.Text.Json.Serialization.JsonPropertyName("purchase_precaution")] - public string PurchasePrecaution { get; set; } = default!; - - /// - /// 获取或设置行业类目。 - /// - [Newtonsoft.Json.JsonProperty("industry_type")] - [System.Text.Json.Serialization.JsonPropertyName("industry_type")] - public int IndustryType { get; set; } - - /// - /// 获取或设置价格信息。 - /// - [Newtonsoft.Json.JsonProperty("price_info")] - [System.Text.Json.Serialization.JsonPropertyName("price_info")] - public Types.PriceInfo PriceInfo { get; set; } = new Types.PriceInfo(); - - /// - /// 获取或设置路径信息列表。 - /// - [Newtonsoft.Json.JsonProperty("path_info_lst")] - [System.Text.Json.Serialization.JsonPropertyName("path_info_lst")] - public Types.PathInfo[]? PathInfoList { get; set; } - - /// - /// 获取或设置商品履约列表。 - /// - [Newtonsoft.Json.JsonProperty("product_fulfillment_lst")] - [System.Text.Json.Serialization.JsonPropertyName("product_fulfillment_lst")] - public Types.ProductFulfilment[]? ProductFulfillmentList { get; set; } - - /// - /// 获取或设置商品详情列表。 - /// - [Newtonsoft.Json.JsonProperty("product_detail_lst")] - [System.Text.Json.Serialization.JsonPropertyName("product_detail_lst")] - public Types.ProductDetail[]? ProductDetailLst { get; set; } = default!; - - /// - /// 获取或设置锚点信息。 - /// - [Newtonsoft.Json.JsonProperty("anchor_info")] - [System.Text.Json.Serialization.JsonPropertyName("anchor_info")] - public Types.AnchorInfo? AnchorInfo { get; set; } - } - - public class CourseInfo - { - /// - /// 获取或设置老师介绍。 - /// - [Newtonsoft.Json.JsonProperty("teacher_introduction")] - [System.Text.Json.Serialization.JsonPropertyName("teacher_introduction")] - public string? TeacherIntroduction { get; set; } - } - - public class ProductStatusInfo - { - /// - /// 获取或设置商品状态。 - /// - [Newtonsoft.Json.JsonProperty("status")] - [System.Text.Json.Serialization.JsonPropertyName("status")] - public int Status { get; set; } - - /// - /// 获取或设置下架或审核不通过原因。 - /// - [Newtonsoft.Json.JsonProperty("reject_reason")] - [System.Text.Json.Serialization.JsonPropertyName("reject_reason")] - public string? RejectReason { get; set; } - } - } - - /// - /// 获取或设置商品 ID。 - /// - [Newtonsoft.Json.JsonProperty("product_id")] - [System.Text.Json.Serialization.JsonPropertyName("product_id")] - public long ProductId { get; set; } - - /// - /// 获取或设置商品类型。 - /// - [Newtonsoft.Json.JsonProperty("product_type")] - [System.Text.Json.Serialization.JsonPropertyName("product_type")] - public int ProductType { get; set; } - - /// - /// 获取或设置商品通用参数信息。 - /// - [Newtonsoft.Json.JsonProperty("common_product_info")] - [System.Text.Json.Serialization.JsonPropertyName("common_product_info")] - public Types.CommonProductInfo CommonProductInfo { get; set; } = default!; - - /// - /// 获取或设置课程参数信息。 - /// - [Newtonsoft.Json.JsonProperty("course_info")] - [System.Text.Json.Serialization.JsonPropertyName("course_info")] - public Types.CourseInfo? CourseInfo { get; set; } - - /// - /// 获取或设置商品状态信息。 - /// - [Newtonsoft.Json.JsonProperty("product_status")] - [System.Text.Json.Serialization.JsonPropertyName("product_status")] - public Types.ProductStatusInfo? ProductStatusInfo { get; set; } = default!; - } - } - - /// - /// 获取或设置已上架的商品信息。 - /// - [Newtonsoft.Json.JsonProperty("product_on_shelf")] - [System.Text.Json.Serialization.JsonPropertyName("product_on_shelf")] - public Types.ProductInfo? ProductOnShelf { get; set; } - - /// - /// 获取或设置审核中的商品信息。 - /// - [Newtonsoft.Json.JsonProperty("product_reviewing")] - [System.Text.Json.Serialization.JsonPropertyName("product_reviewing")] - public Types.ProductInfo? ProductReviewing { get; set; } - } - } - - /// - /// 获取或设置商品列表。 - /// - [Newtonsoft.Json.JsonProperty("products")] - [System.Text.Json.Serialization.JsonPropertyName("products")] - public Types.Product[] ProductList { get; set; } = default!; - } - } - - /// - /// 获取或设置返回数据。 - /// - [Newtonsoft.Json.JsonProperty("data")] - [System.Text.Json.Serialization.JsonPropertyName("data")] - public Types.Data Data { get; set; } = default!; - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/Models/ProductApiQueryReviewRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/Models/ProductApiQueryReviewRequest.cs deleted file mode 100644 index eb1f6bca..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/Models/ProductApiQueryReviewRequest.cs +++ /dev/null @@ -1,25 +0,0 @@ -using System.Collections.Generic; - -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.ProductApi.Models -{ - /// - /// 表示 [POST] /query_review 接口的请求。 - /// - public class ProductApiQueryReviewRequest : ByteDanceMicroAppProductApiRequest - { - /// - /// 获取或设置商品 ID 列表。 - /// - [Newtonsoft.Json.JsonProperty("product_ids")] - [System.Text.Json.Serialization.JsonPropertyName("product_ids")] - public IList ProductIdList { get; set; } = new List(); - - /// - /// 获取或设置查询类型。 - /// 默认值:1 - /// - [Newtonsoft.Json.JsonProperty("query_type")] - [System.Text.Json.Serialization.JsonPropertyName("query_type")] - public int QueryType { get; set; } = 1; - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/Models/ProductApiQueryReviewResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/Models/ProductApiQueryReviewResponse.cs deleted file mode 100644 index 90d9f35a..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/Models/ProductApiQueryReviewResponse.cs +++ /dev/null @@ -1,108 +0,0 @@ -using System.Collections.Generic; - -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.ProductApi.Models -{ - /// - /// 表示 [POST] /query_review 接口的响应。 - /// - public class ProductApiQueryReviewResponse : ByteDanceMicroAppProductApiResponse - { - public static class Types - { - public class Data - { - public static class Types - { - public class ProductReview - { - public static class Types - { - public class CourseReview - { - /// - /// 获取或设置审核状态。 - /// - [Newtonsoft.Json.JsonProperty("status")] - [System.Text.Json.Serialization.JsonPropertyName("status")] - public int Status { get; set; } - - /// - /// 获取或设置下架或审核不通过原因。 - /// - [Newtonsoft.Json.JsonProperty("reject_reason")] - [System.Text.Json.Serialization.JsonPropertyName("reject_reason")] - public string? RejectReason { get; set; } - - /// - /// 获取或设置最近一次审核 ID。 - /// - [Newtonsoft.Json.JsonProperty("latest_audit_id")] - [System.Text.Json.Serialization.JsonPropertyName("latest_audit_id")] - public string? LatestAuditId { get; set; } - } - - public class FulfillmentReview - { - /// - /// 获取或设置审核状态。 - /// - [Newtonsoft.Json.JsonProperty("status")] - [System.Text.Json.Serialization.JsonPropertyName("status")] - public int Status { get; set; } - - /// - /// 获取或设置下架或审核不通过原因。 - /// - [Newtonsoft.Json.JsonProperty("reject_reason")] - [System.Text.Json.Serialization.JsonPropertyName("reject_reason")] - public string? RejectReason { get; set; } - - /// - /// 获取或设置最近一次审核 ID。 - /// - [Newtonsoft.Json.JsonProperty("latest_audit_id")] - [System.Text.Json.Serialization.JsonPropertyName("latest_audit_id")] - public string? LatestAuditId { get; set; } - - /// - /// 获取或设置履约文件资源路径。 - /// - [Newtonsoft.Json.JsonProperty("fulfillment_uri")] - [System.Text.Json.Serialization.JsonPropertyName("fulfillment_uri")] - public string? FulfillmentPath { get; set; } - } - } - - /// - /// 获取或设置课程审核信息。 - /// - [Newtonsoft.Json.JsonProperty("course")] - [System.Text.Json.Serialization.JsonPropertyName("course")] - public Types.CourseReview? CourseReview { get; set; } - - /// - /// 获取或设置履约审核信息列表。 - /// - [Newtonsoft.Json.JsonProperty("fulfillment")] - [System.Text.Json.Serialization.JsonPropertyName("fulfillment")] - public Types.FulfillmentReview[]? FulfillmentReviewList { get; set; } = default!; - } - } - - /// - /// 获取或设置商品审核信息字典。 - /// - [Newtonsoft.Json.JsonProperty("products_review")] - [System.Text.Json.Serialization.JsonPropertyName("products_review")] - public IDictionary? ProductReviewMap { get; set; } - } - } - - /// - /// 获取或设置返回数据。 - /// - [Newtonsoft.Json.JsonProperty("data")] - [System.Text.Json.Serialization.JsonPropertyName("data")] - public Types.Data Data { get; set; } = default!; - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/Models/ProductApiQueryTemplateInfoRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/Models/ProductApiQueryTemplateInfoRequest.cs deleted file mode 100644 index b877d6cc..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/Models/ProductApiQueryTemplateInfoRequest.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.ProductApi.Models -{ - /// - /// 表示 [POST] /query_template_info 接口的请求。 - /// - public class ProductApiQueryTemplateInfoRequest : ByteDanceMicroAppProductApiRequest - { - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/Models/ProductApiQueryTemplateInfoResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/Models/ProductApiQueryTemplateInfoResponse.cs deleted file mode 100644 index a56df61c..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/Models/ProductApiQueryTemplateInfoResponse.cs +++ /dev/null @@ -1,36 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.ProductApi.Models -{ - /// - /// 表示 [POST] /query_template_info 接口的响应。 - /// - public class ProductApiQueryTemplateInfoResponse : ByteDanceMicroAppProductApiResponse - { - public static class Types - { - public class Data - { - /// - /// 获取或设置商品 ID。 - /// - [Newtonsoft.Json.JsonProperty("product_id")] - [System.Text.Json.Serialization.JsonPropertyName("product_id")] - [System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)] - public long ProductId { get; set; } - - /// - /// 获取或设置审核主体 ID。 - /// - [Newtonsoft.Json.JsonProperty("object_id")] - [System.Text.Json.Serialization.JsonPropertyName("object_id")] - public string ObejctId { get; set; } = default!; - } - } - - /// - /// 获取或设置返回数据。 - /// - [Newtonsoft.Json.JsonProperty("data")] - [System.Text.Json.Serialization.JsonPropertyName("data")] - public Types.Data Data { get; set; } = default!; - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/Models/Qualification/ProductApiAddQualificationRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/Models/Qualification/ProductApiAddQualificationRequest.cs deleted file mode 100644 index 81e6c602..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/Models/Qualification/ProductApiAddQualificationRequest.cs +++ /dev/null @@ -1,279 +0,0 @@ -using System.Collections.Generic; - -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.ProductApi.Models -{ - /// - /// 表示 [POST] /add_qualification 接口的请求。 - /// - public class ProductApiAddQualificationRequest : ByteDanceMicroAppProductApiRequest - { - public static class Types - { - public class Qualification - { - public static class Types - { - public class TeacherQualification - { - public static class Types - { - public class DouyinAuthInfo - { - /// - /// 获取或设置抖音开放平台 ClientKey。 - /// - [Newtonsoft.Json.JsonProperty("client_key")] - [System.Text.Json.Serialization.JsonPropertyName("client_key")] - public string ClientKey { get; set; } = string.Empty; - - /// - /// 获取或设置抖音开放平台用户的 OpenId。 - /// - [Newtonsoft.Json.JsonProperty("open_id")] - [System.Text.Json.Serialization.JsonPropertyName("open_id")] - public string OpenId { get; set; } = string.Empty; - } - } - - /// - /// 获取或设置姓名。 - /// - [Newtonsoft.Json.JsonProperty("name")] - [System.Text.Json.Serialization.JsonPropertyName("name")] - public string Name { get; set; } = string.Empty; - - /// - /// 获取或设置一级类目 ID。 - /// - [Newtonsoft.Json.JsonProperty("first_class")] - [System.Text.Json.Serialization.JsonPropertyName("first_class")] - public int? FirstClassId { get; set; } - - /// - /// 获取或设置二级类目 ID。 - /// - [Newtonsoft.Json.JsonProperty("second_class")] - [System.Text.Json.Serialization.JsonPropertyName("second_class")] - public int? SecondClassId { get; set; } - - /// - /// 获取或设置三级类目 ID。 - /// - [Newtonsoft.Json.JsonProperty("third_class")] - [System.Text.Json.Serialization.JsonPropertyName("third_class")] - public int? ThirdClassId { get; set; } - - /// - /// 获取或设置身份证号码。 - /// - [Newtonsoft.Json.JsonProperty("ID_number")] - [System.Text.Json.Serialization.JsonPropertyName("ID_number")] - public string IdCardNumber { get; set; } = string.Empty; - - /// - /// 获取或设置身份证照片资源路径列表。 - /// - [Newtonsoft.Json.JsonProperty("ID_img_uris")] - [System.Text.Json.Serialization.JsonPropertyName("ID_img_uris")] - public IList IdCardImagePathList { get; set; } = new List(); - - /// - /// 获取或设置照片资源路径。 - /// - [Newtonsoft.Json.JsonProperty("img_uri")] - [System.Text.Json.Serialization.JsonPropertyName("img_uri")] - public string? ImagePath { get; set; } - - /// - /// 获取或设置昵称。 - /// - [Newtonsoft.Json.JsonProperty("nickname")] - [System.Text.Json.Serialization.JsonPropertyName("nickname")] - public string Nickname { get; set; } = string.Empty; - - /// - /// 获取或设置简介。 - /// - [Newtonsoft.Json.JsonProperty("introduction")] - [System.Text.Json.Serialization.JsonPropertyName("introduction")] - public string Introduction { get; set; } = string.Empty; - - /// - /// 获取或设置材料列表。 - /// - [Newtonsoft.Json.JsonProperty("qualification_info_lst")] - [System.Text.Json.Serialization.JsonPropertyName("qualification_info_lst")] - public IList MaterialList { get; set; } = new List(); - - /// - /// 获取或设置抖音授权信息列表。 - /// - [Newtonsoft.Json.JsonProperty("douyin_auth_info")] - [System.Text.Json.Serialization.JsonPropertyName("douyin_auth_info")] - public IList? DouyinAuthInfoList { get; set; } - } - - public class InstitutionQualification - { - /// - /// 获取或设置名称。 - /// - [Newtonsoft.Json.JsonProperty("name")] - [System.Text.Json.Serialization.JsonPropertyName("name")] - public string Name { get; set; } = string.Empty; - - /// - /// 获取或设置简介。 - /// - [Newtonsoft.Json.JsonProperty("institution_introduction")] - [System.Text.Json.Serialization.JsonPropertyName("institution_introduction")] - public string Introduction { get; set; } = string.Empty; - - /// - /// 获取或设置公司名称。 - /// - [Newtonsoft.Json.JsonProperty("company_name")] - [System.Text.Json.Serialization.JsonPropertyName("company_name")] - public string CompanyIntroduction { get; set; } = string.Empty; - - /// - /// 获取或设置机构名称。 - /// - [Newtonsoft.Json.JsonProperty("institution_record_name")] - [System.Text.Json.Serialization.JsonPropertyName("institution_record_name")] - public string InstitutionRecordName { get; set; } = string.Empty; - - /// - /// 获取或设置机构场景类型。 - /// - [Newtonsoft.Json.JsonProperty("institution_scene_type")] - [System.Text.Json.Serialization.JsonPropertyName("institution_scene_type")] - public string InstitutionSceneType { get; set; } = string.Empty; - - /// - /// 获取或设置机构主体类型。 - /// - [Newtonsoft.Json.JsonProperty("institution_subject_type")] - [System.Text.Json.Serialization.JsonPropertyName("institution_subject_type")] - public string InstitutionSubjectType { get; set; } = string.Empty; - - /// - /// 获取或设置法人姓名。 - /// - [Newtonsoft.Json.JsonProperty("legal_person_name")] - [System.Text.Json.Serialization.JsonPropertyName("legal_person_name")] - public string LegalPersonName { get; set; } = string.Empty; - - /// - /// 获取或设置法人身份证号。 - /// - [Newtonsoft.Json.JsonProperty("legal_person_ID_number")] - [System.Text.Json.Serialization.JsonPropertyName("legal_person_ID_number")] - public string LegalPersonIdCardNumber { get; set; } = string.Empty; - - /// - /// 获取或设置法人身份证照片资源路径列表。 - /// - [Newtonsoft.Json.JsonProperty("legal_person_ID_img_uris")] - [System.Text.Json.Serialization.JsonPropertyName("legal_person_ID_img_uris")] - public IList LegalPersonIdCardImagePathList { get; set; } = new List(); - - /// - /// 获取或设置照片资源路径。 - /// - [Newtonsoft.Json.JsonProperty("img_uri")] - [System.Text.Json.Serialization.JsonPropertyName("img_uri")] - public string? ImagePath { get; set; } - - /// - /// 获取或设置 Logo 资源路径。 - /// - [Newtonsoft.Json.JsonProperty("institution_logo_uri")] - [System.Text.Json.Serialization.JsonPropertyName("institution_logo_uri")] - public string? LogoPath { get; set; } - - /// - /// 获取或设置商标资源路径。 - /// - [Newtonsoft.Json.JsonProperty("institution_trade_mark_uri")] - [System.Text.Json.Serialization.JsonPropertyName("institution_trade_mark_uri")] - public string? TradeMarkPath { get; set; } - - /// - /// 获取或设置昵称。 - /// - [Newtonsoft.Json.JsonProperty("nickname")] - [System.Text.Json.Serialization.JsonPropertyName("nickname")] - public string Nickname { get; set; } = string.Empty; - - /// - /// 获取或设置材料列表。 - /// - [Newtonsoft.Json.JsonProperty("qualification_info_lst")] - [System.Text.Json.Serialization.JsonPropertyName("qualification_info_lst")] - public IList MaterialList { get; set; } = new List(); - } - - public class Material - { - /// - /// 获取或设置材料类型。 - /// - [Newtonsoft.Json.JsonProperty("type")] - [System.Text.Json.Serialization.JsonPropertyName("type")] - public int Type { get; set; } - - /// - /// 获取或设置材料照片资源路径列表。 - /// - [Newtonsoft.Json.JsonProperty("image_uris")] - [System.Text.Json.Serialization.JsonPropertyName("image_uris")] - public IList ImagePathList { get; set; } = new List(); - - /// - /// 获取或设置材料有效期字符串(格式:yyyy-MM-dd / "长期有效")。 - /// - [Newtonsoft.Json.JsonProperty("validity_date")] - [System.Text.Json.Serialization.JsonPropertyName("validity_date")] - public string ValidityDateString { get; set; } = string.Empty; - - /// - /// 获取或设置证书编号。 - /// - [Newtonsoft.Json.JsonProperty("license_id")] - [System.Text.Json.Serialization.JsonPropertyName("license_id")] - public string? LicenseId { get; set; } - } - } - - /// - /// 获取或设置审核主体类型。 - /// - [Newtonsoft.Json.JsonProperty("object_type")] - [System.Text.Json.Serialization.JsonPropertyName("object_type")] - public int ObjectType { get; set; } - - /// - /// 获取或设置教师资质信息。 - /// - [Newtonsoft.Json.JsonProperty("teacher_qualification_info")] - [System.Text.Json.Serialization.JsonPropertyName("teacher_qualification_info")] - public Types.TeacherQualification? TeacherQualification { get; set; } - - /// - /// 获取或设置机构资质信息。 - /// - [Newtonsoft.Json.JsonProperty("institution_qualification_info")] - [System.Text.Json.Serialization.JsonPropertyName("institution_qualification_info")] - public Types.InstitutionQualification? InstitutionQualification { get; set; } - } - } - - /// - /// 获取或设置资质信息。 - /// - [Newtonsoft.Json.JsonProperty("qualification")] - [System.Text.Json.Serialization.JsonPropertyName("qualification")] - public Types.Qualification Qualification { get; set; } = new Types.Qualification(); - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/Models/Qualification/ProductApiAddQualificationResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/Models/Qualification/ProductApiAddQualificationResponse.cs deleted file mode 100644 index 990a09a5..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/Models/Qualification/ProductApiAddQualificationResponse.cs +++ /dev/null @@ -1,35 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.ProductApi.Models -{ - /// - /// 表示 [POST] /add_qualification 接口的响应。 - /// - public class ProductApiAddQualificationResponse : ByteDanceMicroAppProductApiResponse - { - public static class Types - { - public class Data - { - /// - /// 获取或设置审核主体 ID。 - /// - [Newtonsoft.Json.JsonProperty("object_id")] - [System.Text.Json.Serialization.JsonPropertyName("object_id")] - public string ObejctId { get; set; } = default!; - - /// - /// 获取或设置审核 ID。 - /// - [Newtonsoft.Json.JsonProperty("audit_id")] - [System.Text.Json.Serialization.JsonPropertyName("audit_id")] - public string? AuditId { get; set; } - } - } - - /// - /// 获取或设置返回数据。 - /// - [Newtonsoft.Json.JsonProperty("data")] - [System.Text.Json.Serialization.JsonPropertyName("data")] - public Types.Data Data { get; set; } = default!; - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/Models/Qualification/ProductApiModifyQualificationRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/Models/Qualification/ProductApiModifyQualificationRequest.cs deleted file mode 100644 index 130b9654..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/Models/Qualification/ProductApiModifyQualificationRequest.cs +++ /dev/null @@ -1,92 +0,0 @@ -using System.Collections.Generic; - -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.ProductApi.Models -{ - /// - /// 表示 [POST] /modify_qualification 接口的请求。 - /// - public class ProductApiModifyQualificationRequest : ByteDanceMicroAppProductApiRequest - { - public static class Types - { - public class Qualification - { - public static class Types - { - public class TeacherQualification : ProductApiAddQualificationRequest.Types.Qualification.Types.TeacherQualification - { - public static new class Types - { - public class DouyinAuthInfo : ProductApiAddQualificationRequest.Types.Qualification.Types.TeacherQualification.Types.DouyinAuthInfo - { - } - } - - /// - /// 获取或设置材料列表。 - /// - [Newtonsoft.Json.JsonProperty("qualification_info_lst")] - [System.Text.Json.Serialization.JsonPropertyName("qualification_info_lst")] - public new IList MaterialList { get; set; } = new List(); - - /// - /// 获取或设置抖音授权信息列表。 - /// - [Newtonsoft.Json.JsonProperty("douyin_auth_info")] - [System.Text.Json.Serialization.JsonPropertyName("douyin_auth_info")] - public new IList? DouyinAuthInfoList { get; set; } - } - - public class InstitutionQualification : ProductApiAddQualificationRequest.Types.Qualification.Types.InstitutionQualification - { - /// - /// 获取或设置材料列表。 - /// - [Newtonsoft.Json.JsonProperty("qualification_info_lst")] - [System.Text.Json.Serialization.JsonPropertyName("qualification_info_lst")] - public new IList MaterialList { get; set; } = new List(); - } - - public class Material : ProductApiAddQualificationRequest.Types.Qualification.Types.Material - { - } - } - - /// - /// 获取或设置审核主体类型。 - /// - [Newtonsoft.Json.JsonProperty("object_type")] - [System.Text.Json.Serialization.JsonPropertyName("object_type")] - public int ObjectType { get; set; } - - /// - /// 获取或设置审核主体 ID。 - /// - [Newtonsoft.Json.JsonProperty("object_id")] - [System.Text.Json.Serialization.JsonPropertyName("object_id")] - public string ObejctId { get; set; } = string.Empty; - - /// - /// 获取或设置教师资质信息。 - /// - [Newtonsoft.Json.JsonProperty("teacher_qualification_info")] - [System.Text.Json.Serialization.JsonPropertyName("teacher_qualification_info")] - public Types.TeacherQualification? TeacherQualification { get; set; } - - /// - /// 获取或设置机构资质信息。 - /// - [Newtonsoft.Json.JsonProperty("institution_qualification_info")] - [System.Text.Json.Serialization.JsonPropertyName("institution_qualification_info")] - public Types.InstitutionQualification? InstitutionQualification { get; set; } - } - } - - /// - /// 获取或设置资质信息。 - /// - [Newtonsoft.Json.JsonProperty("qualification")] - [System.Text.Json.Serialization.JsonPropertyName("qualification")] - public Types.Qualification Qualification { get; set; } = new Types.Qualification(); - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/Models/Qualification/ProductApiModifyQualificationResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/Models/Qualification/ProductApiModifyQualificationResponse.cs deleted file mode 100644 index d38dead5..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/Models/Qualification/ProductApiModifyQualificationResponse.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.ProductApi.Models -{ - /// - /// 表示 [POST] /modify_qualification 接口的响应。 - /// - public class ProductApiModifyQualificationResponse : ByteDanceMicroAppProductApiResponse - { - public static class Types - { - public class Data : ProductApiAddQualificationResponse.Types.Data - { - } - } - - /// - /// 获取或设置返回数据。 - /// - [Newtonsoft.Json.JsonProperty("data")] - [System.Text.Json.Serialization.JsonPropertyName("data")] - public Types.Data Data { get; set; } = default!; - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/Models/Qualification/ProductApiQueryQualificationRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/Models/Qualification/ProductApiQueryQualificationRequest.cs deleted file mode 100644 index 1f6c56c0..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/Models/Qualification/ProductApiQueryQualificationRequest.cs +++ /dev/null @@ -1,58 +0,0 @@ -using System.Collections.Generic; - -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.ProductApi.Models -{ - /// - /// 表示 [POST] /query_qualification 接口的请求。 - /// - public class ProductApiQueryQualificationRequest : ByteDanceMicroAppProductApiRequest - { - public static class Types - { - public class ObjectClassification - { - /// - /// 获取或设置审核主体类型。 - /// - [Newtonsoft.Json.JsonProperty("object_type")] - [System.Text.Json.Serialization.JsonPropertyName("object_type")] - public int ObjectType { get; set; } - - /// - /// 获取或设置审核主体 ID。 - /// - [Newtonsoft.Json.JsonProperty("object_id")] - [System.Text.Json.Serialization.JsonPropertyName("object_id")] - public string ObjectId { get; set; } = string.Empty; - - /// - /// 获取或设置一级类目 ID。 - /// - [Newtonsoft.Json.JsonProperty("first_class")] - [System.Text.Json.Serialization.JsonPropertyName("first_class")] - public int? FirstClassId { get; set; } - - /// - /// 获取或设置二级类目 ID。 - /// - [Newtonsoft.Json.JsonProperty("second_class")] - [System.Text.Json.Serialization.JsonPropertyName("second_class")] - public int? SecondClassId { get; set; } - - /// - /// 获取或设置三级类目 ID。 - /// - [Newtonsoft.Json.JsonProperty("third_class")] - [System.Text.Json.Serialization.JsonPropertyName("third_class")] - public int? ThirdClassId { get; set; } - } - } - - /// - /// 获取或设置资质查询单元列表。 - /// - [Newtonsoft.Json.JsonProperty("object_id_with_classifications")] - [System.Text.Json.Serialization.JsonPropertyName("object_id_with_classifications")] - public IList ObjectClassificationList { get; set; } = new List(); - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/Models/Qualification/ProductApiQueryQualificationResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/Models/Qualification/ProductApiQueryQualificationResponse.cs deleted file mode 100644 index 1c6da484..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/Models/Qualification/ProductApiQueryQualificationResponse.cs +++ /dev/null @@ -1,124 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.ProductApi.Models -{ - /// - /// 表示 [POST] /query_qualification 接口的响应。 - /// - public class ProductApiQueryQualificationResponse : ByteDanceMicroAppProductApiResponse - { - public static class Types - { - public class Data - { - public static class Types - { - public class Qualification - { - public static class Types - { - public class QualificationInfo - { - /// - /// 获取或设置审核主体类型。 - /// - [Newtonsoft.Json.JsonProperty("object_type")] - [System.Text.Json.Serialization.JsonPropertyName("object_type")] - public int ObjectType { get; set; } - - /// - /// 获取或设置审核主体 ID。 - /// - [Newtonsoft.Json.JsonProperty("object_id")] - [System.Text.Json.Serialization.JsonPropertyName("object_id")] - public string ObjectId { get; set; } = default!; - - /// - /// 获取或设置一级类目 ID。 - /// - [Newtonsoft.Json.JsonProperty("first_class")] - [System.Text.Json.Serialization.JsonPropertyName("first_class")] - public int? FirstClassId { get; set; } - - /// - /// 获取或设置二级类目 ID。 - /// - [Newtonsoft.Json.JsonProperty("second_class")] - [System.Text.Json.Serialization.JsonPropertyName("second_class")] - public int? SecondClassId { get; set; } - - /// - /// 获取或设置三级类目 ID。 - /// - [Newtonsoft.Json.JsonProperty("third_class")] - [System.Text.Json.Serialization.JsonPropertyName("third_class")] - public int? ThirdClassId { get; set; } - - /// - /// 获取或设置审核状态。 - /// - [Newtonsoft.Json.JsonProperty("status")] - [System.Text.Json.Serialization.JsonPropertyName("status")] - public int Status { get; set; } - - /// - /// 获取或设置审核主体名称。 - /// - [Newtonsoft.Json.JsonProperty("object_name")] - [System.Text.Json.Serialization.JsonPropertyName("object_name")] - public string? ObjectName { get; set; } - - /// - /// 获取或设置审核主体昵称。 - /// - [Newtonsoft.Json.JsonProperty("nick_name")] - [System.Text.Json.Serialization.JsonPropertyName("nick_name")] - public string? Nickname { get; set; } - - /// - /// 获取或设置审核失败原因。 - /// - [Newtonsoft.Json.JsonProperty("fail_reason")] - [System.Text.Json.Serialization.JsonPropertyName("fail_reason")] - public string? FailReson { get; set; } - } - } - - /// - /// 获取或设置已上架的资质信息。 - /// - [Newtonsoft.Json.JsonProperty("qualification_on_shelf")] - [System.Text.Json.Serialization.JsonPropertyName("qualification_on_shelf")] - public Types.QualificationInfo? QualificationOnShelf { get; set; } - - /// - /// 获取或设置审核中的资质信息。 - /// - [Newtonsoft.Json.JsonProperty("qualification_reviewing")] - [System.Text.Json.Serialization.JsonPropertyName("qualification_reviewing")] - public Types.QualificationInfo? QualificationReviewing { get; set; } - } - } - - /// - /// 获取或设置审核主体 ID。 - /// - [Newtonsoft.Json.JsonProperty("object_id")] - [System.Text.Json.Serialization.JsonPropertyName("object_id")] - public string ObejctId { get; set; } = default!; - - /// - /// 获取或设置资质信息列表。 - /// - [Newtonsoft.Json.JsonProperty("qualifications")] - [System.Text.Json.Serialization.JsonPropertyName("qualifications")] - public Types.Qualification[] QualificationList { get; set; } = default!; - } - } - - /// - /// 获取或设置返回数据。 - /// - [Newtonsoft.Json.JsonProperty("data")] - [System.Text.Json.Serialization.JsonPropertyName("data")] - public Types.Data Data { get; set; } = default!; - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/Models/RefundRule/ProductApiModifyRefundRuleRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/Models/RefundRule/ProductApiModifyRefundRuleRequest.cs deleted file mode 100644 index 3e2891fd..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/Models/RefundRule/ProductApiModifyRefundRuleRequest.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System.Collections.Generic; - -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.ProductApi.Models -{ - /// - /// 表示 [POST] /modify_refund_rule 接口的请求。 - /// - public class ProductApiModifyRefundRuleRequest : ByteDanceMicroAppProductApiRequest - { - /// - /// 获取或设置商品 ID 以及对应的规则 ID 字典。 - /// - [Newtonsoft.Json.JsonProperty("refund_rule_map")] - [System.Text.Json.Serialization.JsonPropertyName("refund_rule_map")] - public IDictionary ProductRefundRuleMap { get; set; } = new Dictionary(); - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/Models/RefundRule/ProductApiModifyRefundRuleResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/Models/RefundRule/ProductApiModifyRefundRuleResponse.cs deleted file mode 100644 index 9c29fc0e..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/Models/RefundRule/ProductApiModifyRefundRuleResponse.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.ProductApi.Models -{ - /// - /// 表示 [POST] /modify_refund_rule 接口的响应。 - /// - public class ProductApiModifyRefundRuleResponse : ByteDanceMicroAppProductApiResponse - { - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/Models/RefundRule/ProductApiQueryRefundRuleMetaRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/Models/RefundRule/ProductApiQueryRefundRuleMetaRequest.cs deleted file mode 100644 index cb435e73..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/Models/RefundRule/ProductApiQueryRefundRuleMetaRequest.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.ProductApi.Models -{ - /// - /// 表示 [POST] /query_refund_rule_meta 接口的请求。 - /// - public class ProductApiQueryRefundRuleMetaRequest : ByteDanceMicroAppProductApiRequest - { - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/Models/RefundRule/ProductApiQueryRefundRuleMetaResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/Models/RefundRule/ProductApiQueryRefundRuleMetaResponse.cs deleted file mode 100644 index 83938794..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/Models/RefundRule/ProductApiQueryRefundRuleMetaResponse.cs +++ /dev/null @@ -1,42 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.ProductApi.Models -{ - /// - /// 表示 [POST] /query_refund_rule_meta 接口的响应。 - /// - public class ProductApiQueryRefundRuleMetaResponse : ByteDanceMicroAppProductApiResponse - { - public static class Types - { - public class RefundRule - { - /// - /// 获取或设置规则 ID。 - /// - [Newtonsoft.Json.JsonProperty("id")] - [System.Text.Json.Serialization.JsonPropertyName("id")] - public int Id { get; set; } - - /// - /// 获取或设置规则描述。 - /// - [Newtonsoft.Json.JsonProperty("desc")] - [System.Text.Json.Serialization.JsonPropertyName("desc")] - public string Description { get; set; } = default!; - - /// - /// 获取或设置规则详情。 - /// - [Newtonsoft.Json.JsonProperty("details")] - [System.Text.Json.Serialization.JsonPropertyName("details")] - public string Detail { get; set; } = default!; - } - } - - /// - /// 获取或设置商品退款规则列表。 - /// - [Newtonsoft.Json.JsonProperty("data")] - [System.Text.Json.Serialization.JsonPropertyName("data")] - public Types.RefundRule[] RefundRuleList { get; set; } = default!; - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/Models/Resource/ProductApiQueryResourceStatusRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/Models/Resource/ProductApiQueryResourceStatusRequest.cs deleted file mode 100644 index 9afc0f42..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/Models/Resource/ProductApiQueryResourceStatusRequest.cs +++ /dev/null @@ -1,15 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.ProductApi.Models -{ - /// - /// 表示 [POST] /query_resource_status 接口的请求。 - /// - public class ProductApiQueryResourceStatusRequest : ByteDanceMicroAppProductApiRequest - { - /// - /// 获取或设置资源文件路径。 - /// - [Newtonsoft.Json.JsonProperty("resource_uri")] - [System.Text.Json.Serialization.JsonPropertyName("resource_uri")] - public string ResourcePath { get; set; } = string.Empty; - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/Models/Resource/ProductApiQueryResourceStatusResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/Models/Resource/ProductApiQueryResourceStatusResponse.cs deleted file mode 100644 index a28b309e..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/Models/Resource/ProductApiQueryResourceStatusResponse.cs +++ /dev/null @@ -1,35 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.ProductApi.Models -{ - /// - /// 表示 [POST] /query_resource_status 接口的响应。 - /// - public class ProductApiQueryResourceStatusResponse : ByteDanceMicroAppProductApiResponse - { - public static class Types - { - public class Data - { - /// - /// 获取或设置资源路径 - /// - [Newtonsoft.Json.JsonProperty("resource_uri")] - [System.Text.Json.Serialization.JsonPropertyName("resource_uri")] - public string ResourcePath { get; set; } = default!; - - /// - /// 获取或设置上传状态。 - /// - [Newtonsoft.Json.JsonProperty("status")] - [System.Text.Json.Serialization.JsonPropertyName("status")] - public int Status { get; set; } - } - } - - /// - /// 获取或设置返回数据。 - /// - [Newtonsoft.Json.JsonProperty("data")] - [System.Text.Json.Serialization.JsonPropertyName("data")] - public Types.Data Data { get; set; } = default!; - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/Models/Resource/ProductApiUploadResourceRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/Models/Resource/ProductApiUploadResourceRequest.cs deleted file mode 100644 index dbeed8f0..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/Models/Resource/ProductApiUploadResourceRequest.cs +++ /dev/null @@ -1,29 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.ProductApi.Models -{ - /// - /// 表示 [POST] /upload_resource 接口的请求。 - /// - public class ProductApiUploadResourceRequest : ByteDanceMicroAppProductApiRequest - { - /// - /// 获取或设置资源类型。 - /// - [Newtonsoft.Json.JsonProperty("resource_type")] - [System.Text.Json.Serialization.JsonPropertyName("resource_type")] - public int ResourceType { get; set; } - - /// - /// 获取或设置资源文件 URL。 - /// - [Newtonsoft.Json.JsonProperty("resource_url")] - [System.Text.Json.Serialization.JsonPropertyName("resource_url")] - public string ResourceUrl { get; set; } = string.Empty; - - /// - /// 获取或设置自定义回调数据。 - /// - [Newtonsoft.Json.JsonProperty("callback_data")] - [System.Text.Json.Serialization.JsonPropertyName("callback_data")] - public string? CallbackData { get; set; } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/Models/Resource/ProductApiUploadResourceResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/Models/Resource/ProductApiUploadResourceResponse.cs deleted file mode 100644 index 84a992d6..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/Models/Resource/ProductApiUploadResourceResponse.cs +++ /dev/null @@ -1,28 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.ProductApi.Models -{ - /// - /// 表示 [POST] /upload_resource 接口的响应。 - /// - public class ProductApiUploadResourceResponse : ByteDanceMicroAppProductApiResponse - { - public static class Types - { - public class Data - { - /// - /// 获取或设置资源路径。 - /// - [Newtonsoft.Json.JsonProperty("resource_uri")] - [System.Text.Json.Serialization.JsonPropertyName("resource_uri")] - public string ResourcePath { get; set; } = default!; - } - } - - /// - /// 获取或设置返回数据。 - /// - [Newtonsoft.Json.JsonProperty("data")] - [System.Text.Json.Serialization.JsonPropertyName("data")] - public Types.Data Data { get; set; } = default!; - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/Settings/Credentials.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/Settings/Credentials.cs deleted file mode 100644 index 47ef84b7..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/ProductApi/Settings/Credentials.cs +++ /dev/null @@ -1,25 +0,0 @@ -using System; - -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.ProductApi.Settings -{ - public class Credentials - { - /// - /// 初始化客户端时 的副本。 - /// - public string AppId { get; } - - /// - /// 初始化客户端时 的副本。 - /// - public string AppSecret { get; } - - internal Credentials(ByteDanceMicroAppProductApiClientOptions options) - { - if (options == null) throw new ArgumentNullException(nameof(options)); - - AppId = options.AppId; - AppSecret = options.AppSecret; - } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/ByteDanceMicroAppRoleApiClient.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/ByteDanceMicroAppRoleApiClient.cs deleted file mode 100644 index 59a9cb16..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/ByteDanceMicroAppRoleApiClient.cs +++ /dev/null @@ -1,115 +0,0 @@ -using System; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Flurl.Http; - -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.RoleApi -{ - /// - /// 一个字节小程序泛知识角色系统 API HTTP 客户端。 - /// - public class ByteDanceMicroAppRoleApiClient : CommonClientBase, ICommonClient - { - /// - /// 获取当前客户端使用的字节小程序凭证。 - /// - public Settings.Credentials Credentials { get; } - - /// - /// 用指定的配置项初始化 类的新实例。 - /// - /// 配置项。 - public ByteDanceMicroAppRoleApiClient(ByteDanceMicroAppRoleApiClientOptions options) - : base() - { - if (options == null) throw new ArgumentNullException(nameof(options)); - - Credentials = new RoleApi.Settings.Credentials(options); - - FlurlClient.BaseUrl = options.Endpoints ?? ByteDanceMicroAppRoleApiEndpoints.DEFAULT; - FlurlClient.WithTimeout(TimeSpan.FromMilliseconds(options.Timeout)); - } - - /// - /// 使用当前客户端生成一个新的 对象。 - /// - /// - /// - /// - /// - public IFlurlRequest CreateRequest(ByteDanceMicroAppRoleApiRequest request, HttpMethod method, params object[] urlSegments) - { - IFlurlRequest flurlRequest = FlurlClient.Request(urlSegments).WithVerb(method); - - if (request.Timeout != null) - { - flurlRequest.WithTimeout(TimeSpan.FromMilliseconds(request.Timeout.Value)); - } - - return flurlRequest; - } - - /// - /// 异步发起请求。 - /// - /// - /// - /// - /// - /// - public async Task SendRequestAsync(IFlurlRequest flurlRequest, HttpContent? httpContent = null, CancellationToken cancellationToken = default) - where T : ByteDanceMicroAppRoleApiResponse, new() - { - if (flurlRequest == null) throw new ArgumentNullException(nameof(flurlRequest)); - - try - { - using IFlurlResponse flurlResponse = await base.SendRequestAsync(flurlRequest, httpContent, cancellationToken); - return await WrapResponseWithJsonAsync(flurlResponse, cancellationToken); - } - catch (FlurlHttpTimeoutException ex) - { - throw new Exceptions.ByteDanceMicroAppRequestTimeoutException(ex.Message, ex); - } - catch (FlurlHttpException ex) - { - throw new ByteDanceMicroAppException(ex.Message, ex); - } - } - - /// - /// 异步发起请求。 - /// - /// - /// - /// - /// - /// - public async Task SendRequestWithJsonAsync(IFlurlRequest flurlRequest, object? data = null, CancellationToken cancellationToken = default) - where T : ByteDanceMicroAppRoleApiResponse, new() - { - if (flurlRequest == null) throw new ArgumentNullException(nameof(flurlRequest)); - - try - { - bool isSimpleRequest = data == null || - flurlRequest.Verb == HttpMethod.Get || - flurlRequest.Verb == HttpMethod.Head || - flurlRequest.Verb == HttpMethod.Options; - using IFlurlResponse flurlResponse = isSimpleRequest ? - await base.SendRequestAsync(flurlRequest, null, cancellationToken) : - await base.SendRequestWithJsonAsync(flurlRequest, data, cancellationToken); - return await WrapResponseWithJsonAsync(flurlResponse, cancellationToken); - } - catch (FlurlHttpTimeoutException ex) - { - throw new Exceptions.ByteDanceMicroAppRequestTimeoutException(ex.Message, ex); - } - catch (FlurlHttpException ex) - { - throw new ByteDanceMicroAppException(ex.Message, ex); - } - } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/ByteDanceMicroAppRoleApiClientOptions.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/ByteDanceMicroAppRoleApiClientOptions.cs deleted file mode 100644 index 9c962a5d..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/ByteDanceMicroAppRoleApiClientOptions.cs +++ /dev/null @@ -1,30 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.RoleApi -{ - /// - /// 一个用于构造 时使用的配置项。 - /// - public class ByteDanceMicroAppRoleApiClientOptions - { - /// - /// 获取或设置请求超时时间(单位:毫秒)。 - /// 默认值:30000 - /// - public int Timeout { get; set; } = 30 * 1000; - - /// - /// 获取或设置字节小程序泛知识角色系统 API 域名。 - /// 默认值: - /// - public string Endpoints { get; set; } = ByteDanceMicroAppRoleApiEndpoints.DEFAULT; - - /// - /// 获取或设置字节小程序 AppId。 - /// - public string AppId { get; set; } = default!; - - /// - /// 获取或设置字节小程序 AppSecret。 - /// - public string AppSecret { get; set; } = default!; - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/ByteDanceMicroAppRoleApiEndpoints.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/ByteDanceMicroAppRoleApiEndpoints.cs deleted file mode 100644 index ee4e370f..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/ByteDanceMicroAppRoleApiEndpoints.cs +++ /dev/null @@ -1,13 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.RoleApi -{ - /// - /// 字节小程序角色系统 API 接口域名。 - /// - public class ByteDanceMicroAppRoleApiEndpoints - { - /// - /// 接口域名(默认)。 - /// - public const string DEFAULT = "https://developer.toutiao.com/auth/entity"; - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/ByteDanceMicroAppRoleApiRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/ByteDanceMicroAppRoleApiRequest.cs deleted file mode 100644 index 9e733d46..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/ByteDanceMicroAppRoleApiRequest.cs +++ /dev/null @@ -1,29 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.RoleApi -{ - /// - /// 字节小程序泛知识角色系统 API 请求的基类。 - /// - public class ByteDanceMicroAppRoleApiRequest : ICommonRequest - { - /// - /// 获取或设置请求超时时间(单位:毫秒)。如果不指定将使用构造 时的 参数,这在需要指定特定耗时请求(比如上传或下载文件)的超时时间时很有用。 - /// - [Newtonsoft.Json.JsonIgnore] - [System.Text.Json.Serialization.JsonIgnore] - public virtual int? Timeout { get; set; } - - /// - /// 获取或设置字节小程序的 AppId。如果不指定将使用构造 时的 参数。 - /// - [Newtonsoft.Json.JsonProperty("appid")] - [System.Text.Json.Serialization.JsonPropertyName("appid")] - public virtual string? AppId { get; set; } - - /// - /// 获取或设置字节小程序的 AccessToken。 - /// - [Newtonsoft.Json.JsonProperty("access_token")] - [System.Text.Json.Serialization.JsonPropertyName("access_token")] - public virtual string? AccessToken { get; set; } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/ByteDanceMicroAppRoleApiResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/ByteDanceMicroAppRoleApiResponse.cs deleted file mode 100644 index 14a5ab2f..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/ByteDanceMicroAppRoleApiResponse.cs +++ /dev/null @@ -1,105 +0,0 @@ -using System.Collections.Generic; - -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.RoleApi -{ - /// - /// 字节小程序泛知识角色系统 API 响应的基类。 - /// - public abstract class ByteDanceMicroAppRoleApiResponse: ICommonResponse - { - /// - /// - /// - int ICommonResponse.RawStatus { get; set; } - - /// - /// - /// - IDictionary ICommonResponse.RawHeaders { get; set; } = default!; - - /// - /// - /// - byte[] ICommonResponse.RawBytes { get; set; } = default!; - - /// - /// 获取原始的 HTTP 响应状态码。 - /// - [Newtonsoft.Json.JsonIgnore] - [System.Text.Json.Serialization.JsonIgnore] - public int RawStatus - { - get { return ((ICommonResponse)this).RawStatus; } - internal set { ((ICommonResponse)this).RawStatus = value; } - } - - /// - /// 获取原始的 HTTP 响应表头集合。 - /// - [Newtonsoft.Json.JsonIgnore] - [System.Text.Json.Serialization.JsonIgnore] - public IDictionary RawHeaders - { - get { return ((ICommonResponse)this).RawHeaders; } - internal set { ((ICommonResponse)this).RawHeaders = value; } - } - - /// - /// 获取原始的 HTTP 响应正文。 - /// - [Newtonsoft.Json.JsonIgnore] - [System.Text.Json.Serialization.JsonIgnore] - public byte[] RawBytes - { - get { return ((ICommonResponse)this).RawBytes; } - internal set { ((ICommonResponse)this).RawBytes = value; } - } - - /// - /// 获取字节小程序 API 返回的错误码。 - /// - [Newtonsoft.Json.JsonProperty("err_no")] - [System.Text.Json.Serialization.JsonPropertyName("err_no")] - public virtual int ErrorNumber { get; set; } - - /// - /// 获取字节小程序 API 返回的错误描述。 - /// - [Newtonsoft.Json.JsonProperty("err_tips")] - [System.Text.Json.Serialization.JsonPropertyName("err_tips")] - public virtual string? ErrorTips { get; set; } - - /// - /// 获取字节小程序 API 返回的错误信息。 - /// - [Newtonsoft.Json.JsonProperty("err")] - [System.Text.Json.Serialization.JsonPropertyName("err")] - public virtual ByteDanceMicroAppRoleApiResponseError? Error { get; set; } - - /// - /// 获取一个值,该值指示调用字节小程序 API 是否成功(即 HTTP 状态码为 200、且 `err_no` 值为 0)。 - /// - /// - public virtual bool IsSuccessful() - { - return RawStatus == 200 && ErrorNumber == 0 && (Error == null || Error.ErrorCode == 0); - } - } - - public class ByteDanceMicroAppRoleApiResponseError - { - /// - /// 获取字节小程序 API 返回的错误码。 - /// - [Newtonsoft.Json.JsonProperty("err_code")] - [System.Text.Json.Serialization.JsonPropertyName("err_code")] - public int ErrorCode { get; set; } - - /// - /// 获取字节小程序 API 返回的错误描述。 - /// - [Newtonsoft.Json.JsonProperty("err_msg")] - [System.Text.Json.Serialization.JsonPropertyName("err_msg")] - public string? ErrorMessage { get; set; } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Extensions/ByteDanceMicroAppRoleApiClientExecuteExtensions.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Extensions/ByteDanceMicroAppRoleApiClientExecuteExtensions.cs deleted file mode 100644 index 4ca40ec2..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Extensions/ByteDanceMicroAppRoleApiClientExecuteExtensions.cs +++ /dev/null @@ -1,490 +0,0 @@ -using System; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Flurl.Http; - -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.RoleApi.Extensions -{ - public static class ByteDanceMicroAppRoleApiClientExecuteExtensions - { - /// - /// 异步调用 [POST] /upload_material 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/pan-knowledge/role/upload-qualification-materials - /// - /// - /// - /// - /// - public static async Task ExecuteAuthEntityUploadMaterialAsync(this ByteDanceMicroAppRoleApiClient client, Models.AuthEntityUploadMaterialRequest request,CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - if (request.AppId == null) - request.AppId = client.Credentials.AppId; - - if (request.MaterialFileName == null) - request.MaterialFileName = Guid.NewGuid().ToString("N").ToLower() + (request.MaterialType == 1010 ? ".pdf" : ".jpg"); - - if (request.MaterialFileContentType == null) - request.MaterialFileContentType = Utilities.FileNameToContentTypeMapper.GetContentTypeForMaterial(request.MaterialFileName); - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "upload_material"); - - using MultipartFormDataContent httpContent = Utilities.FileHttpContentBuilder.Build(fileName: request.MaterialFileName, fileBytes: request.MaterialFileBytes, fileContentType: request.MaterialFileContentType!, formDataName: "material_file"); - httpContent.Add(new StringContent(request.AppId), "appid"); - httpContent.Add(new StringContent(request.AccessToken!), "access_token"); - httpContent.Add(new StringContent(request.MaterialType.ToString()), "material_type"); - return await client.SendRequestAsync(flurlReq, httpContent, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /query_entity_info 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/pan-knowledge/role/query-entity-id - /// - /// - /// - /// - /// - public static async Task ExecuteAuthEntityQueryEntityInfoAsync(this ByteDanceMicroAppRoleApiClient client, Models.AuthEntityQueryEntityInfoRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - if (request.AppId == null) - request.AppId = client.Credentials.AppId; - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "query_entity_info"); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /enable_mountscope 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/pan-knowledge/role/enable-mountscope - /// - /// - /// - /// - /// - public static async Task ExecuteAuthEntityEnableMountScopeAsync(this ByteDanceMicroAppRoleApiClient client, Models.AuthEntityEnableMountScopeRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - if (request.AppId == null) - request.AppId = client.Credentials.AppId; - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "enable_mountscope"); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - #region Auth - /// - /// 异步调用 [POST] /bypartner 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/pan-knowledge/role/partner-help-teacher-institution-join - /// - /// - /// - /// - /// - public static async Task ExecuteAuthEntityByPartnerAsync(this ByteDanceMicroAppRoleApiClient client, Models.AuthEntityByPartnerRequest request,CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - if (request.AppId == null) - request.AppId = client.Credentials.AppId; - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "bypartner"); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /byself 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/pan-knowledge/role/institution-partner-join - /// - /// - /// - /// - /// - public static async Task ExecuteAuthEntityBySelfAsync(this ByteDanceMicroAppRoleApiClient client, Models.AuthEntityBySelfRequest request,CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - if (request.AppId == null) - request.AppId = client.Credentials.AppId; - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "byself"); - - var resp = await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - return resp; - } - - /// - /// 异步调用 [POST] /get_basic_auth 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/pan-knowledge/role/query-basic-qualification - /// - /// - /// - /// - /// - public static async Task ExecuteAuthEntityGetBasicAuthAsync(this ByteDanceMicroAppRoleApiClient client, Models.AuthEntityGetBasicAuthRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - if (request.AppId == null) - request.AppId = client.Credentials.AppId; - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "get_basic_auth"); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /update_basic_auth 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/pan-knowledge/role/update-basic-qualification - /// - /// - /// - /// - /// - public static async Task ExecuteAuthEntityUpdateBasicAuthAsync(this ByteDanceMicroAppRoleApiClient client, Models.AuthEntityUpdateBasicAuthRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - if (request.AppId == null) - request.AppId = client.Credentials.AppId; - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "update_basic_auth"); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /get_class_auth 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/pan-knowledge/role/query-category-qualification - /// - /// - /// - /// - /// - public static async Task ExecuteAuthEntityGetClassAuthAsync(this ByteDanceMicroAppRoleApiClient client, Models.AuthEntityGetClassAuthRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - if (request.AppId == null) - request.AppId = client.Credentials.AppId; - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "get_class_auth"); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /update_class_auth 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/pan-knowledge/role/update-category-qualification - /// - /// - /// - /// - /// - public static async Task ExecuteAuthEntityUpdateClassAuthAsync(this ByteDanceMicroAppRoleApiClient client, Models.AuthEntityUpdateClassAuthRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - if (request.AppId == null) - request.AppId = client.Credentials.AppId; - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "update_class_auth"); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /add_class_auth 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/pan-knowledge/role/add-category-qualification - /// - /// - /// - /// - /// - public static async Task ExecuteAuthEntityAddClassAuthAsync(this ByteDanceMicroAppRoleApiClient client, Models.AuthEntityAddClassAuthRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - if (request.AppId == null) - request.AppId = client.Credentials.AppId; - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "add_class_auth"); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /get_audit_detail 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/pan-knowledge/role/get-audit-task-details - /// - /// - /// - /// - /// - public static async Task ExecuteAuthEntityGetAuditDetailAsync(this ByteDanceMicroAppRoleApiClient client, Models.AuthEntityGetAuditDetailRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - if (request.AppId == null) - request.AppId = client.Credentials.AppId; - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "get_audit_detail"); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - #endregion - - #region Role - /// - /// 异步调用 [POST] /add_role 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/pan-knowledge/role/add-role - /// - /// - /// - /// - /// - public static async Task ExecuteAuthEntityAddRoleAsync(this ByteDanceMicroAppRoleApiClient client, Models.AuthEntityAddRoleRequest request,CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - if (request.AppId == null) - request.AppId = client.Credentials.AppId; - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "add_role"); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /bind_role 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/pan-knowledge/role/miniapp-binding-role - /// - /// - /// - /// - /// - public static async Task ExecuteAuthEntityBindRoleAsync(this ByteDanceMicroAppRoleApiClient client, Models.AuthEntityUnbindRoleRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - if (request.AppId == null) - request.AppId = client.Credentials.AppId; - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "bind_role"); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /unbind_role 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/pan-knowledge/role/miniapp-unbinding-role - /// - /// - /// - /// - /// - public static async Task ExecuteAuthEntityUnbindRoleAsync(this ByteDanceMicroAppRoleApiClient client, Models.AuthEntityUnbindRoleRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - if (request.AppId == null) - request.AppId = client.Credentials.AppId; - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "unbind_role"); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /get_bind_list 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/pan-knowledge/role/query-miniapp-bound-role - /// - /// - /// - /// - /// - public static async Task ExecuteAuthEntityGetBindListAsync(this ByteDanceMicroAppRoleApiClient client, Models.AuthEntityGetBindListRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - if (request.AppId == null) - request.AppId = client.Credentials.AppId; - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "get_bind_list"); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /auth_role 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/pan-knowledge/role/role-authorization-miniapp - /// - /// - /// - /// - /// - public static async Task ExecuteAuthEntityAuthRoleAsync(this ByteDanceMicroAppRoleApiClient client, Models.AuthEntityAuthRoleRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - if (request.AppId == null) - request.AppId = client.Credentials.AppId; - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "auth_role"); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /un_auth_role 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/pan-knowledge/role/deauthorization-miniapp - /// - /// - /// - /// - /// - public static async Task ExecuteAuthEntityUnauthRoleAsync(this ByteDanceMicroAppRoleApiClient client, Models.AuthEntityUnauthRoleRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - if (request.AppId == null) - request.AppId = client.Credentials.AppId; - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "un_auth_role"); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /update_authletter 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/pan-knowledge/role/update-authorization-letter-of-miniapp - /// - /// - /// - /// - /// - public static async Task ExecuteAuthEntityUpdateAuthLetterAsync(this ByteDanceMicroAppRoleApiClient client, Models.AuthEntityUpdateAuthLetterRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - if (request.AppId == null) - request.AppId = client.Credentials.AppId; - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "update_authletter"); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /get_appid_auth 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/pan-knowledge/role/query-authorization-applet - /// - /// - /// - /// - /// - public static async Task ExecuteAuthEntityGetAppIdAuthAsync(this ByteDanceMicroAppRoleApiClient client, Models.AuthEntityGetAppIdAuthRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - if (request.AppId == null) - request.AppId = client.Credentials.AppId; - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "get_appid_auth"); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - #endregion - - #region MerchantCode - /// - /// 异步调用 [POST] /activate_merchantcode 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/pan-knowledge/role/merchant-account-activation - /// - /// - /// - /// - /// - public static async Task ExecuteAuthEntityActivateMerchantCodeAsync(this ByteDanceMicroAppRoleApiClient client, Models.AuthEntityActivateMerchantCodeRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - if (request.AppId == null) - request.AppId = client.Credentials.AppId; - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "activate_merchantcode"); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - - /// - /// 异步调用 [POST] /query_merchantcode_status 接口。 - /// REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/server/pan-knowledge/role/query-merchant-account-activation-state - /// - /// - /// - /// - /// - public static async Task ExecuteAuthEntityQueryMerchantCodeStatusAsync(this ByteDanceMicroAppRoleApiClient client, Models.AuthEntityQueryMerchantCodeStatusRequest request, CancellationToken cancellationToken = default) - { - if (client is null) throw new ArgumentNullException(nameof(client)); - if (request is null) throw new ArgumentNullException(nameof(request)); - - if (request.AppId == null) - request.AppId = client.Credentials.AppId; - - IFlurlRequest flurlReq = client - .CreateRequest(request, HttpMethod.Post, "query_merchantcode_status"); - - return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken); - } - #endregion - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/Auth/AuthEntityAddClassAuthResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/Auth/AuthEntityAddClassAuthResponse.cs deleted file mode 100644 index dd7a12fd..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/Auth/AuthEntityAddClassAuthResponse.cs +++ /dev/null @@ -1,15 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.RoleApi.Models -{ - /// - /// 表示 [POST] /add_class_auth 接口的响应。 - /// - public class AuthEntityAddClassAuthResponse: ByteDanceMicroAppRoleApiResponse - { - /// - /// 获取或设置类目审核任务 ID。 - /// - [Newtonsoft.Json.JsonProperty("class_auth_taskid")] - [System.Text.Json.Serialization.JsonPropertyName("class_auth_taskid")] - public string ClassAuthTaskId { get; set; } = default!; - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/Auth/AuthEntityGetBasicAuthRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/Auth/AuthEntityGetBasicAuthRequest.cs deleted file mode 100644 index f9ae8691..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/Auth/AuthEntityGetBasicAuthRequest.cs +++ /dev/null @@ -1,15 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.RoleApi.Models -{ - /// - /// 表示 [POST] /get_basic_auth 接口的请求。 - /// - public class AuthEntityGetBasicAuthRequest: ByteDanceMicroAppRoleApiRequest - { - /// - /// 获取或设置实体 ID。 - /// - [Newtonsoft.Json.JsonProperty("entity_id")] - [System.Text.Json.Serialization.JsonPropertyName("entity_id")] - public string EntityId { get; set; } = string.Empty; - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/Auth/AuthEntityUpdateBasicAuthResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/Auth/AuthEntityUpdateBasicAuthResponse.cs deleted file mode 100644 index 65887fca..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/Auth/AuthEntityUpdateBasicAuthResponse.cs +++ /dev/null @@ -1,15 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.RoleApi.Models -{ - /// - /// 表示 [POST] /update_basic_auth 接口的响应。 - /// - public class AuthEntityUpdateBasicAuthResponse: ByteDanceMicroAppRoleApiResponse - { - /// - /// 获取或设置基础认证任务 ID。 - /// - [Newtonsoft.Json.JsonProperty("basic_auth_taskid")] - [System.Text.Json.Serialization.JsonPropertyName("basic_auth_taskid")] - public string BasicAuthTaskId { get; set; } = default!; - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/Auth/AuthEntityUpdateClassAuthResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/Auth/AuthEntityUpdateClassAuthResponse.cs deleted file mode 100644 index fdcb87be..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/Auth/AuthEntityUpdateClassAuthResponse.cs +++ /dev/null @@ -1,15 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.RoleApi.Models -{ - /// - /// 表示 [POST] /update_class_auth 接口的响应。 - /// - public class AuthEntityUpdateClassAuthResponse: ByteDanceMicroAppRoleApiResponse - { - /// - /// 获取或设置类目审核任务 ID。 - /// - [Newtonsoft.Json.JsonProperty("class_auth_taskid")] - [System.Text.Json.Serialization.JsonPropertyName("class_auth_taskid")] - public string ClassAuthTaskId { get; set; } = default!; - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/AuthEntityEnableMountScopeRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/AuthEntityEnableMountScopeRequest.cs deleted file mode 100644 index bd0e3736..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/AuthEntityEnableMountScopeRequest.cs +++ /dev/null @@ -1,72 +0,0 @@ -using System.Collections.Generic; - -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.RoleApi.Models -{ - /// - /// 表示 [POST] /enable_mountscope 接口的请求。 - /// - public class AuthEntityEnableMountScopeRequest : ByteDanceMicroAppRoleApiRequest - { - public static class Types - { - public class User - { - /// - /// 获取或设置开放平台 ClientKey。 - /// - [Newtonsoft.Json.JsonProperty("client_key")] - [System.Text.Json.Serialization.JsonPropertyName("client_key")] - public string ClientKey { get; set; } = string.Empty; - - /// - /// 获取或设置用户 OpenId。 - /// - [Newtonsoft.Json.JsonProperty("openid")] - [System.Text.Json.Serialization.JsonPropertyName("openid")] - public string OpenId { get; set; } = string.Empty; - } - } - - /// - /// 获取或设置服务商实体 ID。 - /// - [Newtonsoft.Json.JsonProperty("partner_entity_id")] - [System.Text.Json.Serialization.JsonPropertyName("partner_entity_id")] - public string? PartnerEntityId { get; set; } - - /// - /// 获取或设置商户实体 ID。 - /// - [Newtonsoft.Json.JsonProperty("merchant_entity_id")] - [System.Text.Json.Serialization.JsonPropertyName("merchant_entity_id")] - public string? MerchantEntityId { get; set; } - - /// - /// 获取或设置挂载能力。 - /// - [Newtonsoft.Json.JsonProperty("mount_scope")] - [System.Text.Json.Serialization.JsonPropertyName("mount_scope")] - public int MountScope { get; set; } - - /// - /// 获取或设置抖音用户信息。 - /// - [Newtonsoft.Json.JsonProperty("c_user")] - [System.Text.Json.Serialization.JsonPropertyName("c_user")] - public Types.User User { get; set; } = new Types.User(); - - /// - /// 获取或设置行业编码。 - /// - [Newtonsoft.Json.JsonProperty("industry_code")] - [System.Text.Json.Serialization.JsonPropertyName("industry_code")] - public int IndustryCode { get; set; } - - /// - /// 获取或设置行业角色。 - /// - [Newtonsoft.Json.JsonProperty("industry_role")] - [System.Text.Json.Serialization.JsonPropertyName("industry_role")] - public int IndustryRole { get; set; } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/AuthEntityEnableMountScopeResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/AuthEntityEnableMountScopeResponse.cs deleted file mode 100644 index 068ecd64..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/AuthEntityEnableMountScopeResponse.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.RoleApi.Models -{ - /// - /// 表示 [POST] /enable_mountscope 接口的响应。 - /// - public class AuthEntityEnableMountScopeResponse : ByteDanceMicroAppRoleApiResponse - { - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/AuthEntityQueryEntityInfoResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/AuthEntityQueryEntityInfoResponse.cs deleted file mode 100644 index 7bb1d107..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/AuthEntityQueryEntityInfoResponse.cs +++ /dev/null @@ -1,15 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.RoleApi.Models -{ - /// - /// 表示 [POST] /query_entity_info 接口的响应。 - /// - public class AuthEntityQueryEntityInfoResponse : ByteDanceMicroAppRoleApiResponse - { - /// - /// 获取或设置实体 ID。 - /// - [Newtonsoft.Json.JsonProperty("entity_id")] - [System.Text.Json.Serialization.JsonPropertyName("entity_id")] - public string EntityId { get; set; } = default!; - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/AuthEntityUploadMaterialResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/AuthEntityUploadMaterialResponse.cs deleted file mode 100644 index f9b6cc65..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/AuthEntityUploadMaterialResponse.cs +++ /dev/null @@ -1,15 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.RoleApi.Models -{ - /// - /// 表示 [POST] /upload_material 接口的响应。 - /// - public class AuthEntityUploadMaterialResponse: ByteDanceMicroAppRoleApiResponse - { - /// - /// 获取或设置资源路径。 - /// - [Newtonsoft.Json.JsonProperty("path")] - [System.Text.Json.Serialization.JsonPropertyName("path")] - public string Path { get; set; } = default!; - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/MerchantCode/AuthEntityActivateMerchantCodeResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/MerchantCode/AuthEntityActivateMerchantCodeResponse.cs deleted file mode 100644 index 0698852d..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/MerchantCode/AuthEntityActivateMerchantCodeResponse.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.RoleApi.Models -{ - /// - /// 表示 [POST] /activate_merchantcode 接口的响应。 - /// - public class AuthEntityActivateMerchantCodeResponse : ByteDanceMicroAppRoleApiResponse - { - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/Role/AuthEntityAddRoleResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/Role/AuthEntityAddRoleResponse.cs deleted file mode 100644 index c6aca3be..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/Role/AuthEntityAddRoleResponse.cs +++ /dev/null @@ -1,15 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.RoleApi.Models -{ - /// - /// 表示 [POST] /add_role 接口的响应。 - /// - public class AuthEntityAddRoleResponse : ByteDanceMicroAppRoleApiResponse - { - /// - /// 获取或设置类目认证任务 ID。 - /// - [Newtonsoft.Json.JsonProperty("add_role_taskid")] - [System.Text.Json.Serialization.JsonPropertyName("add_role_taskid")] - public string AddRoleTaskId { get; set; } = default!; - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/Role/AuthEntityAuthRoleResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/Role/AuthEntityAuthRoleResponse.cs deleted file mode 100644 index 95081291..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/Role/AuthEntityAuthRoleResponse.cs +++ /dev/null @@ -1,15 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.RoleApi.Models -{ - /// - /// 表示 [POST] /auth_role 接口的响应。 - /// - public class AuthEntityAuthRoleResponse : ByteDanceMicroAppRoleApiResponse - { - /// - /// 获取或设置绑定审核任务 ID。 - /// - [Newtonsoft.Json.JsonProperty("bind_taskid")] - [System.Text.Json.Serialization.JsonPropertyName("bind_taskid")] - public string? BindTaskId { get; set; } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/Role/AuthEntityBindRoleResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/Role/AuthEntityBindRoleResponse.cs deleted file mode 100644 index 677da5d5..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/Role/AuthEntityBindRoleResponse.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.RoleApi.Models -{ - /// - /// 表示 [POST] /bind_role 接口的响应。 - /// - public class AuthEntityBindRoleResponse : ByteDanceMicroAppRoleApiResponse - { - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/Role/AuthEntityGetBindListRequest.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/Role/AuthEntityGetBindListRequest.cs deleted file mode 100644 index 36b9da5f..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/Role/AuthEntityGetBindListRequest.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.RoleApi.Models -{ - /// - /// 表示 [POST] /get_bind_list 接口的请求。 - /// - public class AuthEntityGetBindListRequest : ByteDanceMicroAppRoleApiRequest - { - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/Role/AuthEntityUnauthRoleResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/Role/AuthEntityUnauthRoleResponse.cs deleted file mode 100644 index e85d2dd8..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/Role/AuthEntityUnauthRoleResponse.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.RoleApi.Models -{ - /// - /// 表示 [POST] /un_auth_role 接口的响应。 - /// - public class AuthEntityUnauthRoleResponse : ByteDanceMicroAppRoleApiResponse - { - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/Role/AuthEntityUnbindRoleResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/Role/AuthEntityUnbindRoleResponse.cs deleted file mode 100644 index c6accf2b..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/Role/AuthEntityUnbindRoleResponse.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.RoleApi.Models -{ - /// - /// 表示 [POST] /unbind_role 接口的响应。 - /// - public class AuthEntityUnbindRoleResponse : ByteDanceMicroAppRoleApiResponse - { - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/Role/AuthEntityUpdateAuthLetterResponse.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/Role/AuthEntityUpdateAuthLetterResponse.cs deleted file mode 100644 index bf2e23df..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Models/Role/AuthEntityUpdateAuthLetterResponse.cs +++ /dev/null @@ -1,15 +0,0 @@ -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.RoleApi.Models -{ - /// - /// 表示 [POST] /update_authletter 接口的响应。 - /// - public class AuthEntityUpdateAuthLetterResponse : ByteDanceMicroAppRoleApiResponse - { - /// - /// 获取或设置审核任务 ID。 - /// - [Newtonsoft.Json.JsonProperty("audit_taskid")] - [System.Text.Json.Serialization.JsonPropertyName("audit_taskid")] - public string AuditTaskId { get; set; } = default!; - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Settings/Credentials.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Settings/Credentials.cs deleted file mode 100644 index f7334e60..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SDK/RoleApi/Settings/Credentials.cs +++ /dev/null @@ -1,25 +0,0 @@ -using System; - -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.RoleApi.Settings -{ - public class Credentials - { - /// - /// 初始化客户端时 的副本。 - /// - public string AppId { get; } - - /// - /// 初始化客户端时 的副本。 - /// - public string AppSecret { get; } - - internal Credentials(ByteDanceMicroAppRoleApiClientOptions options) - { - if (options == null) throw new ArgumentNullException(nameof(options)); - - AppId = options.AppId; - AppSecret = options.AppSecret; - } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SKIT.FlurlHttpClient.ByteDance.MicroApp.csproj b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SKIT.FlurlHttpClient.ByteDance.MicroApp.csproj index 2f2b5dd2..f38e8097 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SKIT.FlurlHttpClient.ByteDance.MicroApp.csproj +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/SKIT.FlurlHttpClient.ByteDance.MicroApp.csproj @@ -1,8 +1,8 @@ - net461; netstandard2.0; net6.0 - 8.0 + net462; netstandard2.0; net6.0 + 10.0 enable true @@ -13,9 +13,9 @@ README.md MIT https://github.com/fudiwei/DotNetCore.SKIT.FlurlHttpClient.ByteDance - Flurl.Http ByteDance MicroApp 字节 字节小程序 字节跳动 字节跳动小程序 头条 头条小程序 今日头条 今日头条小程序 - 2.5.0 - 基于 Flurl.Http 的字节小程序开放平台 API 客户端,支持小程序、小游戏、服务商平台、泛知识课程库&角色系统、直播小玩法等接口。 + Flurl.Http ByteDance MicroApp 字节 字节跳动 头条 今日头条 抖音 字节小程序 字节跳动小程序 头条小程序 今日头条小程序 抖音小程序 + 3.0.0 + 基于 Flurl.Http 的抖音小程序开放平台 API 客户端,支持小程序、小游戏、服务商平台、泛知识课程库、泛知识角色系统、直播小玩法等接口。 Fu Diwei git https://github.com/fudiwei/DotNetCore.SKIT.FlurlHttpClient.ByteDance.git @@ -36,11 +36,12 @@ - + - - + + + diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Settings/Credentials.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Settings/Credentials.cs index e50fb084..40a54744 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Settings/Credentials.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Settings/Credentials.cs @@ -5,33 +5,33 @@ namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Settings public class Credentials { /// - /// 初始化客户端时 的副本。 + /// 初始化客户端时 的副本。 /// public string AppId { get; } /// - /// 初始化客户端时 的副本。 + /// 初始化客户端时 的副本。 /// public string AppSecret { get; } /// - /// 初始化客户端时 的副本。 + /// 初始化客户端时 的副本。 /// public string? PushToken { get; } /// - /// 初始化客户端时 的副本。 + /// 初始化客户端时 的副本。 /// public string? PushEncodingAESKey { get; set; } /// - /// 初始化客户端时 的副本。 + /// 初始化客户端时 的副本。 /// public string? ECPaySalt { get; } - internal Credentials(ByteDanceMicroAppClientOptions options) + internal Credentials(DouyinMicroAppClientOptions options) { - if (options == null) throw new ArgumentNullException(nameof(options)); + if (options is null) throw new ArgumentNullException(nameof(options)); AppId = options.AppId; AppSecret = options.AppSecret; diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Utilities/AESUtility.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Utilities/AESUtility.cs index ffd9ba8c..80afb4b0 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Utilities/AESUtility.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Utilities/AESUtility.cs @@ -1,9 +1,10 @@ -using System; +using System; using System.Security.Cryptography; -using System.Text; namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Utilities { + using SKIT.FlurlHttpClient.Primitives; + /// /// AES 算法工具类。 /// @@ -18,9 +19,9 @@ public static class AESUtility /// 解密后的数据字节数组。 public static byte[] DecryptWithCBC(byte[] keyBytes, byte[] ivBytes, byte[] cipherBytes) { - if (keyBytes == null) throw new ArgumentNullException(nameof(keyBytes)); - if (ivBytes == null) throw new ArgumentNullException(nameof(ivBytes)); - if (cipherBytes == null) throw new ArgumentNullException(nameof(cipherBytes)); + if (keyBytes is null) throw new ArgumentNullException(nameof(keyBytes)); + if (ivBytes is null) throw new ArgumentNullException(nameof(ivBytes)); + if (cipherBytes is null) throw new ArgumentNullException(nameof(cipherBytes)); using (SymmetricAlgorithm aes = Aes.Create()) { @@ -34,6 +35,27 @@ public static byte[] DecryptWithCBC(byte[] keyBytes, byte[] ivBytes, byte[] ciph } } + /// + /// 基于 CBC 模式解密数据。 + /// + /// 经过编码后的(通常为 Base64)AES 密钥。 + /// 经过编码后的(通常为 Base64)初始化向量。 + /// 经过编码后的(通常为 Base64)待解密数据。 + /// 解密后的数据。 + public static EncodedString DecryptWithCBC(EncodedString encodingKey, EncodedString encodingIV, EncodedString encodingCipher) + { + if (encodingKey.Value is null) throw new ArgumentNullException(nameof(encodingKey)); + if (encodingIV.Value is null) throw new ArgumentNullException(nameof(encodingIV)); + if (encodingCipher.Value is null) throw new ArgumentNullException(nameof(encodingCipher)); + + byte[] plainBytes = DecryptWithCBC( + keyBytes: EncodedString.FromString(encodingKey, fallbackEncodingKind: EncodingKinds.Base64), + ivBytes: EncodedString.FromString(encodingIV, fallbackEncodingKind: EncodingKinds.Base64), + cipherBytes: EncodedString.FromString(encodingCipher, fallbackEncodingKind: EncodingKinds.Base64) + ); + return EncodedString.ToLiteralString(plainBytes); + } + /// /// 基于 CBC 模式加密数据。 /// @@ -43,9 +65,9 @@ public static byte[] DecryptWithCBC(byte[] keyBytes, byte[] ivBytes, byte[] ciph /// 加密后的数据字节数组。 public static byte[] EncryptWithCBC(byte[] keyBytes, byte[] ivBytes, byte[] plainBytes) { - if (keyBytes == null) throw new ArgumentNullException(nameof(keyBytes)); - if (ivBytes == null) throw new ArgumentNullException(nameof(ivBytes)); - if (plainBytes == null) throw new ArgumentNullException(nameof(plainBytes)); + if (keyBytes is null) throw new ArgumentNullException(nameof(keyBytes)); + if (ivBytes is null) throw new ArgumentNullException(nameof(ivBytes)); + if (plainBytes is null) throw new ArgumentNullException(nameof(plainBytes)); using (SymmetricAlgorithm aes = Aes.Create()) { @@ -59,44 +81,25 @@ public static byte[] EncryptWithCBC(byte[] keyBytes, byte[] ivBytes, byte[] plai } } - /// - /// 基于 CBC 模式解密数据。 - /// - /// 经 Base64 编码后的 AES 密钥。 - /// 经 Base64 编码后的 AES 初始化向量。 - /// 经 Base64 编码后的待解密数据。 - /// 解密后的文本数据。 - public static string DecryptWithCBC(string encodingKey, string encodingIV, string encodingCipherText) - { - if (encodingKey == null) throw new ArgumentNullException(nameof(encodingKey)); - if (encodingCipherText == null) throw new ArgumentNullException(nameof(encodingCipherText)); - - byte[] plainBytes = DecryptWithCBC( - keyBytes: Convert.FromBase64String(encodingKey), - ivBytes: Convert.FromBase64String(encodingIV), - cipherBytes: Convert.FromBase64String(encodingCipherText) - ); - return Encoding.UTF8.GetString(plainBytes); - } - /// /// 基于 CBC 模式加密数据。 /// - /// 经 Base64 编码后的 AES 密钥。 - /// 经 Base64 编码后的 AES 初始化向量。 - /// 待加密文本。 - /// 经 Base64 编码的加密后的数据。 - public static string EncryptWithCBC(string encodingKey, string encodingIV, string plainText) + /// 经过编码后的(通常为 Base64)AES 密钥。 + /// 经过编码后的(通常为 Base64)初始化向量。 + /// 待加密数据。 + /// 经过 Base64 编码的加密后的数据。 + public static EncodedString EncryptWithCBC(EncodedString encodingKey, EncodedString encodingIV, string plainData) { - if (encodingKey == null) throw new ArgumentNullException(nameof(encodingKey)); - if (plainText == null) throw new ArgumentNullException(nameof(plainText)); + if (encodingKey.Value is null) throw new ArgumentNullException(nameof(encodingKey)); + if (encodingIV.Value is null) throw new ArgumentNullException(nameof(encodingIV)); + if (plainData is null) throw new ArgumentNullException(nameof(plainData)); byte[] plainBytes = EncryptWithCBC( - keyBytes: Convert.FromBase64String(encodingKey), - ivBytes: Convert.FromBase64String(encodingIV), - plainBytes: Encoding.UTF8.GetBytes(plainText) + keyBytes: EncodedString.FromString(encodingKey, fallbackEncodingKind: EncodingKinds.Base64), + ivBytes: EncodedString.FromString(encodingIV, fallbackEncodingKind: EncodingKinds.Base64), + plainBytes: EncodedString.FromLiteralString(plainData) ); - return Convert.ToBase64String(plainBytes); + return EncodedString.ToBase64String(plainBytes); } } } diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Utilities/HMACUtility.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Utilities/HMACUtility.cs index 8b420354..7f34c749 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Utilities/HMACUtility.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Utilities/HMACUtility.cs @@ -1,44 +1,49 @@ -using System; +using System; using System.Security.Cryptography; -using System.Text; namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Utilities { + using SKIT.FlurlHttpClient.Primitives; + /// /// HMAC 算法工具类。 /// public static class HMACUtility { /// - /// 获取 HMAC-SHA-256 消息认证码。 + /// 计算 HMAC-SHA-256 哈希值。 /// - /// 密钥字节数组。 - /// 信息字节数组。 - /// 消息认证码字节数组。 - public static byte[] HashWithSHA256(byte[] secretBytes, byte[] msgBytes) + /// 密钥字节数组。 + /// 要计算哈希值的信息字节数组。 + /// 哈希值字节数组。 + public static byte[] HashWithSHA256(byte[] keyBytes, byte[] messageBytes) { - if (secretBytes == null) throw new ArgumentNullException(nameof(secretBytes)); - if (msgBytes == null) throw new ArgumentNullException(nameof(msgBytes)); + if (keyBytes is null) throw new ArgumentNullException(nameof(keyBytes)); + if (messageBytes is null) throw new ArgumentNullException(nameof(messageBytes)); - using HMAC hmac = new HMACSHA256(secretBytes); - return hmac.ComputeHash(msgBytes); +#if NET5_0_OR_GREATER + return HMACSHA256.HashData(keyBytes, messageBytes); +#else + using HMAC hmac = new HMACSHA256(keyBytes); + return hmac.ComputeHash(messageBytes); +#endif } /// - /// 获取 HMAC-SHA-256 消息认证码。 + /// 计算 HMAC-SHA-256 哈希值。 /// - /// 密钥。 - /// 文本信息。 - /// 消息认证码。 - public static string HashWithSHA256(string secret, string message) + /// 密钥。 + /// 要计算哈希值的信息。 + /// 经过十六进制编码的哈希值。 + public static EncodedString HashWithSHA256(string key, string messageData) { - if (secret == null) throw new ArgumentNullException(nameof(secret)); - if (message == null) throw new ArgumentNullException(nameof(message)); + if (key is null) throw new ArgumentNullException(nameof(key)); + if (messageData is null) throw new ArgumentNullException(nameof(messageData)); - byte[] secretBytes = Encoding.UTF8.GetBytes(secret); - byte[] msgBytes = Encoding.UTF8.GetBytes(message); - byte[] hashBytes = HashWithSHA256(secretBytes, msgBytes); - return BitConverter.ToString(hashBytes).Replace("-", ""); + byte[] keyBytes = EncodedString.FromLiteralString(key); + byte[] messageBytes = EncodedString.FromLiteralString(messageData); + byte[] hashBytes = HashWithSHA256(keyBytes, messageBytes); + return EncodedString.ToHexString(hashBytes); } } } diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Utilities/Internal/TtMsgCryptor.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Utilities/Internal/TtMsgCryptor.cs deleted file mode 100644 index d5e11fe3..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Utilities/Internal/TtMsgCryptor.cs +++ /dev/null @@ -1,135 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Net; -using System.Security; -using System.Security.Cryptography; -using System.Text; -using System.Xml; - -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Utilities -{ - internal static class TtMsgCryptor - { - private const int AES_KEY_SIZE = 256; - private const int AES_BLOCK_SIZE = 128; - - private static byte[] Decode2(byte[] decryptedBytes) - { - if (decryptedBytes == null) throw new ArgumentNullException(nameof(decryptedBytes)); - - int pad = (int)decryptedBytes[decryptedBytes.Length - 1]; - if (pad < 1 || pad > 32) - { - pad = 0; - } - - byte[] res = new byte[decryptedBytes.Length - pad]; - Array.Copy(decryptedBytes, 0, res, 0, decryptedBytes.Length - pad); - return res; - } - - private static byte[] AESDecrypt(byte[] keyBytes, byte[] ivBytes, byte[] cipherBytes) - { - if (keyBytes == null) throw new ArgumentNullException(nameof(keyBytes)); - if (ivBytes == null) throw new ArgumentNullException(nameof(ivBytes)); - if (cipherBytes == null) throw new ArgumentNullException(nameof(cipherBytes)); - - using var aes = Aes.Create(); - aes.KeySize = AES_KEY_SIZE; - aes.BlockSize = AES_BLOCK_SIZE; - aes.Mode = CipherMode.CBC; - aes.Padding = PaddingMode.None; - aes.Key = keyBytes; - aes.IV = ivBytes; - - using (var decryptor = aes.CreateDecryptor(aes.Key, aes.IV)) - using (var ms = new MemoryStream()) - using (var cs = new CryptoStream(ms, decryptor, CryptoStreamMode.Write)) - { - byte[] msgBytes = new byte[cipherBytes.Length + 32 - cipherBytes.Length % 32]; - Array.Copy(cipherBytes, msgBytes, cipherBytes.Length); - cs.Write(cipherBytes, 0, cipherBytes.Length); - - byte[] plainBytes = Decode2(ms.ToArray()); - return plainBytes; - } - } - - public static string AESDecrypt(string cipherText, string encodingAESKey, out string appId) - { - if (cipherText == null) throw new ArgumentNullException(nameof(cipherText)); - if (encodingAESKey == null) throw new ArgumentNullException(nameof(encodingAESKey)); - - byte[] cipherBytes = Convert.FromBase64String(cipherText); - byte[] keyBytes = Convert.FromBase64String(encodingAESKey + "="); - byte[] ivBytes = new byte[16]; - Array.Copy(keyBytes, ivBytes, 16); - byte[] btmpMsg = AESDecrypt(cipherBytes: cipherBytes, ivBytes: ivBytes, keyBytes: keyBytes); - - int len = BitConverter.ToInt32(btmpMsg, 32); - len = IPAddress.NetworkToHostOrder(len); - - byte[] bMsg = new byte[len]; - byte[] bAppId = new byte[btmpMsg.Length - 36 - len]; - Array.Copy(btmpMsg, 36, bMsg, 0, len); - Array.Copy(btmpMsg, 36 + len, bAppId, 0, bAppId.Length); - - appId = Encoding.UTF8.GetString(bAppId); - return Encoding.UTF8.GetString(bMsg); - } - - public static bool VerifySignature(string sToken, string sTimestamp, string sNonce, string sMsgEncrypt, string sMsgSign) - { - if (sToken == null) throw new ArgumentNullException(nameof(sToken)); - if (sTimestamp == null) throw new ArgumentNullException(nameof(sTimestamp)); - if (sNonce == null) throw new ArgumentNullException(nameof(sNonce)); - if (sMsgEncrypt == null) throw new ArgumentNullException(nameof(sMsgEncrypt)); - if (sMsgSign == null) throw new ArgumentNullException(nameof(sMsgSign)); - - string expectedSign = GenerateSignature(sToken, sTimestamp, sNonce, sMsgEncrypt); - return string.Equals(expectedSign, sMsgSign, StringComparison.OrdinalIgnoreCase); - } - - public static string GenerateSignature(string sToken, string sTimestamp, string sNonce, string sMsgEncrypt) - { - if (sToken == null) throw new ArgumentNullException(nameof(sToken)); - if (sTimestamp == null) throw new ArgumentNullException(nameof(sTimestamp)); - if (sNonce == null) throw new ArgumentNullException(nameof(sNonce)); - if (sMsgEncrypt == null) throw new ArgumentNullException(nameof(sMsgEncrypt)); - - List tmp = new List(capacity: 4) { sToken, sTimestamp, sNonce, sMsgEncrypt }; - tmp.Sort(StringComparer.Ordinal); - - string rawText = string.Concat(tmp); - string signText = SHA1Utility.Hash(rawText); - return signText.ToLower(); - } - - public static bool TryParseXml(string xml, out string encryptedMsg) - { - if (xml == null) throw new ArgumentNullException(nameof(xml)); - - encryptedMsg = string.Empty; - - try - { - XmlDocument xmlDoc = new XmlDocument(); - xmlDoc.XmlResolver = null!; - xmlDoc.LoadXml(xml); - - XmlNode? xmlRoot = xmlDoc.FirstChild; - if (xmlRoot == null) - return false; - - encryptedMsg = xmlRoot["Encrypt"]?.InnerText?.ToString() ?? string.Empty; - - return !string.IsNullOrEmpty(encryptedMsg); - } - catch (XmlException) - { - return false; - } - } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Utilities/Internal/XmlUtility.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Utilities/Internal/XmlUtility.cs deleted file mode 100644 index 36b2fb8c..00000000 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Utilities/Internal/XmlUtility.cs +++ /dev/null @@ -1,42 +0,0 @@ -using System; -using System.Collections; -using System.IO; -using System.Xml.Serialization; - -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Utilities -{ - internal static class XmlUtility - { - // REF: https://docs.microsoft.com/zh-cn/dotnet/api/system.xml.serialization.xmlserializer#dynamically-generated-assemblies - private static readonly Hashtable _xmlSerializers = new Hashtable(); - private static readonly XmlRootAttribute _xmlRoot = new XmlRootAttribute("xml"); - - private static XmlSerializer GetTypedSerializer(Type type) - { - if (type == null) throw new ArgumentNullException(nameof(type)); - - string skey = type.AssemblyQualifiedName ?? type.GetHashCode().ToString(); - XmlSerializer? xmlSerializer = (XmlSerializer?)_xmlSerializers[skey]; - if (xmlSerializer == null) - { - xmlSerializer = new XmlSerializer(type, _xmlRoot); - _xmlSerializers[skey] = xmlSerializer; - } - - return xmlSerializer; - } - - public static object Deserialize(Type type, string xml) - { - using var reader = new StringReader(xml); - XmlSerializer serializer = GetTypedSerializer(type); - return serializer.Deserialize(reader)!; - } - - public static T Deserialize(string xml) - where T : class - { - return (T)Deserialize(typeof(T), xml); - } - } -} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Utilities/MD5Utility.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Utilities/MD5Utility.cs index eab77b37..b5dc71be 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Utilities/MD5Utility.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Utilities/MD5Utility.cs @@ -1,39 +1,44 @@ -using System; +using System; using System.Security.Cryptography; -using System.Text; namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Utilities { + using SKIT.FlurlHttpClient.Primitives; + /// /// MD5 算法工具类。 /// public static class MD5Utility { /// - /// 获取 MD5 信息摘要。 + /// 计算 MD5 哈希值。 /// - /// 信息字节数组。 - /// 信息摘要字节数组。 - public static byte[] Hash(byte[] bytes) + /// 要计算哈希值的信息字节数组。 + /// 哈希值字节数组。 + public static byte[] Hash(byte[] messageBytes) { - if (bytes == null) throw new ArgumentNullException(nameof(bytes)); + if (messageBytes is null) throw new ArgumentNullException(nameof(messageBytes)); +#if NET5_0_OR_GREATER + return MD5.HashData(messageBytes); +#else using MD5 md5 = MD5.Create(); - return md5.ComputeHash(bytes); + return md5.ComputeHash(messageBytes); +#endif } /// - /// 获取 MD5 信息摘要。 + /// 计算 MD5 哈希值。 /// - /// 文本信息。 - /// 信息摘要。 - public static string Hash(string message) + /// 要计算哈希值的信息。 + /// 经过十六进制编码的哈希值。 + public static EncodedString Hash(string messageData) { - if (message == null) throw new ArgumentNullException(nameof(message)); + if (messageData is null) throw new ArgumentNullException(nameof(messageData)); - byte[] msgBytes = Encoding.UTF8.GetBytes(message); - byte[] hashBytes = Hash(msgBytes); - return BitConverter.ToString(hashBytes).Replace("-", ""); + byte[] messageBytes = EncodedString.FromLiteralString(messageData); + byte[] hashBytes = Hash(messageBytes); + return EncodedString.ToHexString(hashBytes); } } } diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Utilities/RSAUtility.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Utilities/RSAUtility.cs new file mode 100644 index 00000000..a4118e6a --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Utilities/RSAUtility.cs @@ -0,0 +1,197 @@ +using System; +using System.IO; +using System.Text.RegularExpressions; +using Org.BouncyCastle.Crypto; +using Org.BouncyCastle.Crypto.Parameters; +using Org.BouncyCastle.OpenSsl; +using Org.BouncyCastle.Security; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Utilities +{ + using SKIT.FlurlHttpClient.Primitives; + + /// + /// RSA 算法工具类。 + /// + public static class RSAUtility + { + /// + /// 签名算法:SHA-256withRSA。 + /// + public const string DIGEST_ALGORITHM_SHA256 = "SHA-256withRSA"; + + private static byte[] ConvertPrivateKeyPemToByteArray(string privateKeyPem) + { + if (!privateKeyPem.StartsWith("-----BEGIN PRIVATE KEY-----")) + { + using (TextReader textReader = new StringReader(privateKeyPem)) + using (PemReader pemReader = new PemReader(textReader)) + { + object pemObject = pemReader.ReadObject(); + + if (pemObject is AsymmetricCipherKeyPair) + { + // PKCS#1 格式 + AsymmetricCipherKeyPair cipherKeyPair = (AsymmetricCipherKeyPair)pemObject; + using (TextWriter textWriter = new StringWriter()) + using (PemWriter pemWriter = new PemWriter(textWriter)) + { + Pkcs8Generator pkcs8 = new Pkcs8Generator(cipherKeyPair.Private); + pemWriter.WriteObject(pkcs8); + pemWriter.Writer.Close(); + + privateKeyPem = textWriter.ToString()!; + } + } + else if (pemObject is RsaPrivateCrtKeyParameters) + { + // PKCS#8 格式 + } + else + { + throw new NotSupportedException("Private key format is not supported."); + } + } + } + + privateKeyPem = privateKeyPem + .Replace("-----BEGIN PRIVATE KEY-----", string.Empty) + .Replace("-----END PRIVATE KEY-----", string.Empty); + privateKeyPem = Regex.Replace(privateKeyPem, "\\s+", string.Empty); + return Convert.FromBase64String(privateKeyPem); + } + + private static byte[] ConvertPublicKeyPemToByteArray(string publicKeyPem) + { + if (!publicKeyPem.StartsWith("-----BEGIN PUBLIC KEY-----")) + { + using (TextReader textReader = new StringReader(publicKeyPem)) + using (PemReader pemReader = new PemReader(textReader)) + { + object pemObject = pemReader.ReadObject(); + if (pemObject is RsaKeyParameters) + { + // PKCS#1 或 PKCS#8 格式 + RsaKeyParameters rsaKeyParams = (RsaKeyParameters)pemObject; + using (TextWriter textWriter = new StringWriter()) + using (PemWriter pemWriter = new PemWriter(textWriter)) + { + pemWriter.WriteObject(rsaKeyParams); + pemWriter.Writer.Close(); + + publicKeyPem = textWriter.ToString()!; + } + } + else + { + throw new NotSupportedException("Public key format is not supported."); + } + } + } + + publicKeyPem = publicKeyPem + .Replace("-----BEGIN PUBLIC KEY-----", string.Empty) + .Replace("-----END PUBLIC KEY-----", string.Empty); + publicKeyPem = Regex.Replace(publicKeyPem, "\\s+", string.Empty); + return Convert.FromBase64String(publicKeyPem); + } + + private static RsaKeyParameters ParsePrivateKeyToParameters(byte[] privateKeyBytes) + { + return (RsaKeyParameters)PrivateKeyFactory.CreateKey(privateKeyBytes); + } + + private static RsaKeyParameters ParsePublicKeyToParameters(byte[] publicKeyBytes) + { + return (RsaKeyParameters)PublicKeyFactory.CreateKey(publicKeyBytes); + } + + private static byte[] Sign(RsaKeyParameters rsaPrivateKeyParams, byte[] messageBytes, string digestAlgorithm) + { + ISigner signer = SignerUtilities.GetSigner(digestAlgorithm); + signer.Init(true, rsaPrivateKeyParams); + signer.BlockUpdate(messageBytes, 0, messageBytes.Length); + return signer.GenerateSignature(); + } + + private static bool Verify(RsaKeyParameters rsaPublicKeyParams, byte[] messageBytes, byte[] signBytes, string digestAlgorithm) + { + ISigner signer = SignerUtilities.GetSigner(digestAlgorithm); + signer.Init(false, rsaPublicKeyParams); + signer.BlockUpdate(messageBytes, 0, messageBytes.Length); + return signer.VerifySignature(signBytes); + } + + /// + /// 使用私钥生成签名。 + /// + /// PKCS#1/PKCS#8 私钥字节数组。 + /// 待签名的数据字节数组。 + /// 签名算法。(默认值:) + /// 签名字节数组。 + public static byte[] Sign(byte[] privateKeyBytes, byte[] messageBytes, string digestAlgorithm = DIGEST_ALGORITHM_SHA256) + { + if (privateKeyBytes is null) throw new ArgumentNullException(nameof(privateKeyBytes)); + if (messageBytes is null) throw new ArgumentNullException(nameof(messageBytes)); + + RsaKeyParameters rsaPrivateKeyParams = ParsePrivateKeyToParameters(privateKeyBytes); + return Sign(rsaPrivateKeyParams, messageBytes, digestAlgorithm); + } + + /// + /// 使用私钥生成签名。 + /// + /// PKCS#1/PKCS#8 私钥(PEM 格式)。 + /// 待签名的数据。 + /// 签名算法。(默认值:) + /// 经过 Base64 编码的签名。 + public static EncodedString Sign(string privateKeyPem, string messageData, string digestAlgorithm = DIGEST_ALGORITHM_SHA256) + { + if (privateKeyPem is null) throw new ArgumentNullException(nameof(privateKeyPem)); + if (messageData is null) throw new ArgumentNullException(nameof(messageData)); + + byte[] privateKeyBytes = ConvertPrivateKeyPemToByteArray(privateKeyPem); + byte[] messageBytes = EncodedString.FromLiteralString(messageData); + byte[] signBytes = Sign(privateKeyBytes, messageBytes, digestAlgorithm); + return EncodedString.ToBase64String(signBytes); + } + + /// + /// 使用公钥验证签名。 + /// + /// PKCS#1/PKCS#8 公钥字节数组。 + /// 待验证的数据字节数组。 + /// 签名字节数组。 + /// 签名算法。(默认值:) + /// 验证结果。 + public static bool Verify(byte[] publicKeyBytes, byte[] messageBytes, byte[] signBytes, string digestAlgorithm = DIGEST_ALGORITHM_SHA256) + { + if (publicKeyBytes is null) throw new ArgumentNullException(nameof(publicKeyBytes)); + if (messageBytes is null) throw new ArgumentNullException(nameof(messageBytes)); + if (signBytes is null) throw new ArgumentNullException(nameof(signBytes)); + + RsaKeyParameters rsaPublicKeyParams = ParsePublicKeyToParameters(publicKeyBytes); + return Verify(rsaPublicKeyParams, messageBytes, signBytes, digestAlgorithm); + } + + /// + /// 使用公钥验证签名。 + /// + /// PKCS#1/PKCS#8 公钥(PEM 格式)。 + /// 待验证的数据。 + /// 经过编码后的(通常为 Base64)签名。 + /// 签名算法。(默认值:) + /// 验证结果。 + public static bool Verify(string publicKeyPem, string messageData, EncodedString encodingSignature, string digestAlgorithm = DIGEST_ALGORITHM_SHA256) + { + if (publicKeyPem is null) throw new ArgumentNullException(nameof(publicKeyPem)); + if (messageData is null) throw new ArgumentNullException(nameof(messageData)); + if (encodingSignature.Value is null) throw new ArgumentNullException(nameof(encodingSignature)); + + byte[] publicKeyBytes = ConvertPublicKeyPemToByteArray(publicKeyPem); + byte[] messageBytes = EncodedString.FromLiteralString(messageData); + byte[] signBytes = EncodedString.FromString(encodingSignature, fallbackEncodingKind: EncodingKinds.Base64); + return Verify(publicKeyBytes, messageBytes, signBytes, digestAlgorithm); + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Utilities/SHA1Utility.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Utilities/SHA1Utility.cs index e93a5c86..3a822a4c 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Utilities/SHA1Utility.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Utilities/SHA1Utility.cs @@ -1,39 +1,44 @@ -using System; +using System; using System.Security.Cryptography; -using System.Text; namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Utilities { + using SKIT.FlurlHttpClient.Primitives; + /// /// SHA-1 算法工具类。 /// public static class SHA1Utility { /// - /// 获取 SHA-1 信息摘要。 + /// 计算 SHA-1 哈希值。 /// - /// 信息字节数组。 - /// 信息摘要字节数组。 - public static byte[] Hash(byte[] bytes) + /// 要计算哈希值的信息字节数组。 + /// 哈希值字节数组。 + public static byte[] Hash(byte[] messageBytes) { - if (bytes == null) throw new ArgumentNullException(nameof(bytes)); + if (messageBytes is null) throw new ArgumentNullException(nameof(messageBytes)); - using SHA1 sha = SHA1.Create(); - return sha.ComputeHash(bytes); +#if NET5_0_OR_GREATER + return SHA1.HashData(messageBytes); +#else + using SHA1 sha1 = SHA1.Create(); + return sha1.ComputeHash(messageBytes); +#endif } /// - /// 获取 SHA-1 信息摘要。 + /// 计算 SHA-1 哈希值。 /// - /// 文本信息。 - /// 信息摘要。 - public static string Hash(string message) + /// 要计算哈希值的信息。 + /// 经过十六进制编码的哈希值。 + public static EncodedString Hash(string messageData) { - if (message == null) throw new ArgumentNullException(nameof(message)); + if (messageData is null) throw new ArgumentNullException(nameof(messageData)); - byte[] msgBytes = Encoding.UTF8.GetBytes(message); - byte[] hashBytes = Hash(msgBytes); - return BitConverter.ToString(hashBytes).Replace("-", ""); + byte[] messageBytes = EncodedString.FromLiteralString(messageData); + byte[] hashBytes = Hash(messageBytes); + return EncodedString.ToHexString(hashBytes); } } } diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Utilities/__Internal/DyMsgCryptor.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Utilities/__Internal/DyMsgCryptor.cs new file mode 100644 index 00000000..2b3963d6 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Utilities/__Internal/DyMsgCryptor.cs @@ -0,0 +1,134 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Net; +using System.Security.Cryptography; +using System.Text; +using System.Xml; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Utilities +{ + internal static class DyMsgCryptor + { + private const int AES_KEY_SIZE = 256; + private const int AES_BLOCK_SIZE = 128; + + private static byte[] Decode2(byte[] decryptedBytes) + { + if (decryptedBytes is null) throw new ArgumentNullException(nameof(decryptedBytes)); + + int pad = (int)decryptedBytes[decryptedBytes.Length - 1]; + if (pad < 1 || pad > 32) + { + pad = 0; + } + + byte[] res = new byte[decryptedBytes.Length - pad]; + Array.Copy(decryptedBytes, 0, res, 0, decryptedBytes.Length - pad); + return res; + } + + private static byte[] AESDecrypt(byte[] keyBytes, byte[] ivBytes, byte[] cipherBytes) + { + if (keyBytes is null) throw new ArgumentNullException(nameof(keyBytes)); + if (ivBytes is null) throw new ArgumentNullException(nameof(ivBytes)); + if (cipherBytes is null) throw new ArgumentNullException(nameof(cipherBytes)); + + using var aes = Aes.Create(); + aes.KeySize = AES_KEY_SIZE; + aes.BlockSize = AES_BLOCK_SIZE; + aes.Mode = CipherMode.CBC; + aes.Padding = PaddingMode.None; + aes.Key = keyBytes; + aes.IV = ivBytes; + + using (var decryptor = aes.CreateDecryptor(aes.Key, aes.IV)) + using (var ms = new MemoryStream()) + using (var cs = new CryptoStream(ms, decryptor, CryptoStreamMode.Write)) + { + byte[] msgBytes = new byte[cipherBytes.Length + 32 - cipherBytes.Length % 32]; + Array.Copy(cipherBytes, msgBytes, cipherBytes.Length); + cs.Write(cipherBytes, 0, cipherBytes.Length); + + byte[] plainBytes = Decode2(ms.ToArray()); + return plainBytes; + } + } + + public static string AESDecrypt(string cipherText, string encodingAESKey, out string appId) + { + if (cipherText is null) throw new ArgumentNullException(nameof(cipherText)); + if (encodingAESKey is null) throw new ArgumentNullException(nameof(encodingAESKey)); + + byte[] cipherBytes = Convert.FromBase64String(cipherText); + byte[] keyBytes = Convert.FromBase64String(encodingAESKey + "="); + byte[] ivBytes = new byte[16]; + Array.Copy(keyBytes, ivBytes, 16); + byte[] btmpMsg = AESDecrypt(cipherBytes: cipherBytes, ivBytes: ivBytes, keyBytes: keyBytes); + + int len = BitConverter.ToInt32(btmpMsg, 32); + len = IPAddress.NetworkToHostOrder(len); + + byte[] bMsg = new byte[len]; + byte[] bAppId = new byte[btmpMsg.Length - 36 - len]; + Array.Copy(btmpMsg, 36, bMsg, 0, len); + Array.Copy(btmpMsg, 36 + len, bAppId, 0, bAppId.Length); + + appId = Encoding.UTF8.GetString(bAppId); + return Encoding.UTF8.GetString(bMsg); + } + + public static bool VerifySignature(string sToken, string sTimestamp, string sNonce, string sMsgEncrypt, string sMsgSign) + { + if (sToken is null) throw new ArgumentNullException(nameof(sToken)); + if (sTimestamp is null) throw new ArgumentNullException(nameof(sTimestamp)); + if (sNonce is null) throw new ArgumentNullException(nameof(sNonce)); + if (sMsgEncrypt is null) throw new ArgumentNullException(nameof(sMsgEncrypt)); + if (sMsgSign is null) throw new ArgumentNullException(nameof(sMsgSign)); + + string expectedSign = GenerateSignature(sToken, sTimestamp, sNonce, sMsgEncrypt); + return string.Equals(expectedSign, sMsgSign, StringComparison.OrdinalIgnoreCase); + } + + public static string GenerateSignature(string sToken, string sTimestamp, string sNonce, string sMsgEncrypt) + { + if (sToken is null) throw new ArgumentNullException(nameof(sToken)); + if (sTimestamp is null) throw new ArgumentNullException(nameof(sTimestamp)); + if (sNonce is null) throw new ArgumentNullException(nameof(sNonce)); + if (sMsgEncrypt is null) throw new ArgumentNullException(nameof(sMsgEncrypt)); + + List tmp = new List(capacity: 4) { sToken, sTimestamp, sNonce, sMsgEncrypt }; + tmp.Sort(StringComparer.Ordinal); + + string rawText = string.Concat(tmp); + string signText = SHA1Utility.Hash(rawText).Value!; + return signText.ToLower(); + } + + public static bool TryParseXml(string xml, out string encryptedMsg) + { + if (xml is null) throw new ArgumentNullException(nameof(xml)); + + encryptedMsg = string.Empty; + + try + { + XmlDocument xmlDoc = new XmlDocument(); + xmlDoc.XmlResolver = null!; + xmlDoc.LoadXml(xml); + + XmlNode? xmlRoot = xmlDoc.FirstChild; + if (xmlRoot is null) + return false; + + encryptedMsg = xmlRoot["Encrypt"]?.InnerText?.ToString() ?? string.Empty; + + return !string.IsNullOrEmpty(encryptedMsg); + } + catch (XmlException) + { + return false; + } + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Utilities/Internal/FileHttpContentBuilder.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Utilities/__Internal/FileHttpContentBuilder.cs similarity index 90% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Utilities/Internal/FileHttpContentBuilder.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Utilities/__Internal/FileHttpContentBuilder.cs index 2a766e23..9cd0b4b0 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Utilities/Internal/FileHttpContentBuilder.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Utilities/__Internal/FileHttpContentBuilder.cs @@ -14,9 +14,9 @@ public static MultipartFormDataContent Build(string fileName, byte[] fileBytes, public static MultipartFormDataContent Build(string fileName, byte[] fileBytes, string fileContentType, string formDataName, Action configureFileHttpContent) { - if (fileName == null) throw new ArgumentNullException(nameof(fileName)); - if (formDataName == null) throw new ArgumentNullException(nameof(formDataName)); - if (configureFileHttpContent == null) throw new ArgumentNullException(nameof(configureFileHttpContent)); + if (fileName is null) throw new ArgumentNullException(nameof(fileName)); + if (formDataName is null) throw new ArgumentNullException(nameof(formDataName)); + if (configureFileHttpContent is null) throw new ArgumentNullException(nameof(configureFileHttpContent)); fileName = fileName.Replace("\"", ""); fileBytes = fileBytes ?? Array.Empty(); diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Utilities/Internal/FileNameToContentTypeMapper.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Utilities/__Internal/FileNameToContentTypeMapper.cs similarity index 100% rename from src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Utilities/Internal/FileNameToContentTypeMapper.cs rename to src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Utilities/__Internal/FileNameToContentTypeMapper.cs diff --git a/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Utilities/__Internal/XmlHelper.cs b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Utilities/__Internal/XmlHelper.cs new file mode 100644 index 00000000..95e12e51 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.ByteDance.MicroApp/Utilities/__Internal/XmlHelper.cs @@ -0,0 +1,20 @@ +using System; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.Utilities +{ + using SKIT.FlurlHttpClient.Internal; + + internal static class XmlHelper + { + public static object Deserialize(string xml, Type type) + { + return _XmlSimpleSerializer.Deserialize(xml, type); + } + + public static T Deserialize(string xml) + where T : class + { + return (T)Deserialize(xml, typeof(T)); + } + } +} diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Extensions/TikTokShopClientExecuteAuthExtensions.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Extensions/TikTokShopClientExecuteAuthExtensions.cs index 843d4284..a580b071 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Extensions/TikTokShopClientExecuteAuthExtensions.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/Extensions/TikTokShopClientExecuteAuthExtensions.cs @@ -27,7 +27,7 @@ public static class TikTokShopClientExecuteAuthExtensions IFlurlRequest flurlReq = client .CreateFlurlRequest(request, HttpMethod.Get, "token", "get") - .WithUrl($"{client.EndpointForAuth}/token/get") + .WithUrl($"{client._BASEURL_AUTHAPI}/token/get") .SetQueryParam("app_key", client.Credentials.AppKey) .SetQueryParam("app_secret", client.Credentials.AppSecret) .SetQueryParam("grant_type", request.GrantType) @@ -56,7 +56,7 @@ public static class TikTokShopClientExecuteAuthExtensions IFlurlRequest flurlReq = client .CreateFlurlRequest(request, HttpMethod.Get, "token", "refresh") - .WithUrl($"{client.EndpointForAuth}/token/refresh") + .WithUrl($"{client._BASEURL_AUTHAPI}/token/refresh") .SetQueryParam("app_key", client.Credentials.AppKey) .SetQueryParam("app_secret", client.Credentials.AppSecret) .SetQueryParam("grant_type", request.GrantType) diff --git a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/TikTokShopClient.cs b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/TikTokShopClient.cs index 2ae8a129..d2e8e64c 100644 --- a/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/TikTokShopClient.cs +++ b/src/SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop/TikTokShopClient.cs @@ -11,21 +11,13 @@ namespace SKIT.FlurlHttpClient.ByteDance.TikTokGlobalShop /// public class TikTokShopClient : CommonClientBase, ICommonClient { + public readonly string _BASEURL_AUTHAPI; + /// /// 获取当前客户端使用的 TikTok Shop API 凭证。 /// public Settings.Credentials Credentials { get; } - /// - /// 获取当前客户端使用的 TikTok Shop API 接入点。 - /// - protected internal string EndpointForDefault { get; } - - /// - /// 获取当前客户端使用的 TikTok Shop Auth API 接入点。 - /// - protected internal string EndpointForAuth { get; } - /// /// 用指定的配置项初始化 类的新实例。 /// @@ -47,13 +39,13 @@ internal protected TikTokShopClient(TikTokShopClientOptions options, HttpClient? if (options is null) throw new ArgumentNullException(nameof(options)); Credentials = new Settings.Credentials(options); - EndpointForDefault = options.Endpoint ?? TikTokShopEndpoints.DEFAULT; - EndpointForAuth = options.EndpointForAuthAPI ?? TikTokShopAuthApiEndpoints.DEFAULT; - FlurlClient.BaseUrl = EndpointForDefault; + FlurlClient.BaseUrl = options.Endpoint ?? TikTokShopEndpoints.DEFAULT; FlurlClient.WithTimeout(options.Timeout <= 0 ? Timeout.InfiniteTimeSpan : TimeSpan.FromMilliseconds(options.Timeout)); - Interceptors.Add(new Interceptors.TikTokShopRequestSigningInterceptor(baseUrl: EndpointForDefault, appSecret: options.AppSecret)); + Interceptors.Add(new Interceptors.TikTokShopRequestSigningInterceptor(baseUrl: FlurlClient.BaseUrl, appSecret: options.AppSecret)); + + _BASEURL_AUTHAPI = options.EndpointForAuthAPI ?? TikTokShopAuthApiEndpoints.DEFAULT; } /// diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/IMPORTANT_CodeAnalyzeTests.cs b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/IMPORTANT_CodeAnalyzeTests.cs new file mode 100644 index 00000000..91fb0888 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/IMPORTANT_CodeAnalyzeTests.cs @@ -0,0 +1,442 @@ +using System; +using System.IO; +using System.Linq; +using System.Net.Http; +using System.Reflection; +using Microsoft.CodeAnalysis; +using Microsoft.CodeAnalysis.CSharp; +using Microsoft.CodeAnalysis.CSharp.Syntax; +using SKIT.FlurlHttpClient.Tools.CodeAnalyzer; +using Xunit; + +namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests +{ + using SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi; + using SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.ProductApi; + using SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.RoleApi; + using SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.Webcast; + + public class CodeAnalyzeTests + { + // NOTICE: + // 如果 Visual Studio 遇到 “缺少 SKIT.FlurlHttpClient.Tools.CodeAnalyzer 包” 的错误, + // 请参考此 Issue:https://github.com/fudiwei/DotNetCore.SKIT.FlurlHttpClient/issues/8 + + [Fact(DisplayName = "代码质量分析")] + public void CodeAnalyze() + { + Assert.Multiple( + CodeAnalyze_BaseSDK, + CodeAnalyze_ExtendedSDK_OpenApi, + CodeAnalyze_ExtendedSDK_ProductApi, + CodeAnalyze_ExtendedSDK_RoleApi, + CodeAnalyze_ExtendedSDK_Webcast + ); + } + + private void CodeAnalyze_BaseSDK() + { + Assert.Null(Record.Exception(() => + { + var options = new TypeDeclarationAnalyzerOptions() + { + SdkAssembly = Assembly.GetAssembly(typeof(DouyinMicroAppClient))!, + SdkRequestModelDeclarationNamespace = "SKIT.FlurlHttpClient.ByteDance.MicroApp.Models", + SdkResponseModelDeclarationNamespace = "SKIT.FlurlHttpClient.ByteDance.MicroApp.Models", + SdkExecutingExtensionDeclarationNamespace = "SKIT.FlurlHttpClient.ByteDance.MicroApp", + SdkWebhookEventDeclarationNamespace = "SKIT.FlurlHttpClient.ByteDance.MicroApp.Events", + IgnoreExecutingExtensionTypes = static type => type.Namespace!.Contains(".ExtendedSDK."), + ThrowOnNotFoundRequestModelTypes = true, + ThrowOnNotFoundResponseModelTypes = true, + ThrowOnNotFoundExecutingExtensionTypes = true, + ThrowOnNotFoundWebhookEventTypes = true + }; + new TypeDeclarationAnalyzer(options).AssertNoIssues(); + })); + + Assert.Null(Record.Exception(() => + { + string workdir = Environment.CurrentDirectory; + string projdir = Path.Combine(workdir, "../../../../../"); + + var options = new SourceFileAnalyzerOptions() + { + SdkAssembly = Assembly.GetAssembly(typeof(DouyinMicroAppClient))!, + SdkRequestModelDeclarationNamespace = "SKIT.FlurlHttpClient.ByteDance.MicroApp.Models", + SdkResponseModelDeclarationNamespace = "SKIT.FlurlHttpClient.ByteDance.MicroApp.Models", + SdkWebhookEventDeclarationNamespace = "SKIT.FlurlHttpClient.ByteDance.MicroApp.Events", + ProjectSourceRootDirectory = Path.Combine(projdir, "./src/SKIT.FlurlHttpClient.ByteDance.MicroApp/"), + ProjectTestRootDirectory = Path.Combine(projdir, "./test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/"), + ProjectTestRequestModelSerializationSampleSubDirectory = "ModelSamples/_/", + ProjectTestResponseModelSerializationSampleSubDirectory = "ModelSamples/_/", + ProjectTestWebhookEventSerializationSampleSubDirectory = "EventSamples/_/", + ThrowOnNotFoundRequestModelClassCodeFiles = true, + ThrowOnNotFoundResponseModelClassCodeFiles = true, + ThrowOnNotFoundExecutingExtensionClassCodeFiles = true, + ThrowOnNotFoundWebhookEventClassCodeFiles = true, + ThrowOnNotFoundRequestModelSerializationSampleFiles = true, + ThrowOnNotFoundResponseModelSerializationSampleFiles = true, + ThrowOnNotFoundWebhookEventSerializationSampleFiles = true + }; + new SourceFileAnalyzer(options) + .AddRule((_, _, cur) => + { + if (cur.ContentKind != SourceFileContentKinds.ExecutingExtensionClassCode || + cur.FileKind != SourceFileKinds.CSharp) + return; + + using FileStream stream = cur.FileInfo.Open(FileMode.Open, FileAccess.Read); + using TextReader streamReader = new StreamReader(stream); + SyntaxTree syntaxTree = CSharpSyntaxTree.ParseText(streamReader.ReadToEnd()).WithFilePath(cur.FileInfo.FullName); + CompilationUnitSyntax syntaxRootNode = syntaxTree.GetCompilationUnitRoot(); + MethodDeclarationSyntax[] syntaxMethodDeclarationNodes = syntaxRootNode.Members + .Where(s => SourceFileCodeSyntaxKinds.BaseNamespaceDeclaration.Contains(s.Kind())) + .OfType() + .SelectMany(s => s.Members + .Where(s => s.IsKind(SyntaxKind.ClassDeclaration)) + .OfType() + .Where(s => s.Identifier.ToFullString().Contains("ExecuteLegacy")) // 仅扫描旧版 API + ) + .SelectMany(s => s.Members + .Where(s => s.IsKind(SyntaxKind.MethodDeclaration)) + .OfType() + ) + .Where(s => + { + string methodName = s.Identifier.ToFullString().Trim(); + return methodName.StartsWith("Execute") && + methodName.EndsWith("Async"); + }) + .ToArray(); + foreach (MethodDeclarationSyntax syntaxMethodDeclarationNode in syntaxMethodDeclarationNodes) + { + string methodName = syntaxMethodDeclarationNode.Identifier.ToFullString().Trim(); + + ExecutingMethodUrlPathSegmentsSyntaxWalker syntaxWalker = new ExecutingMethodUrlPathSegmentsSyntaxWalker(); + syntaxWalker.Reset().Visit(syntaxMethodDeclarationNode); + + string[] urlPathSegments1 = syntaxWalker.Result1 ?? Array.Empty(); + string[] urlPathSegments2 = syntaxWalker.Result2 ?? Array.Empty(); + for (int i = 0, len = Math.Max(urlPathSegments1.Length, urlPathSegments1.Length); i < len; i++) + { + string? s1 = urlPathSegments1.Length > i ? urlPathSegments1[i] : null; + string? s2 = urlPathSegments2.Length > i ? urlPathSegments2[i] : null; + if (!string.Equals(s1, s2)) + throw new AnalysisException($"文件 \"{cur.FileInfo.FullName}\"下的函数 \"{methodName}\" 应是一个 API 接口方法、且适配旧版入口点,但其 URL 路径的代码实现存在冲突。(Expected: \"{"/" + string.Join("/", urlPathSegments1)}\", Actual: \"{"/" + string.Join("/", urlPathSegments2)}\")"); + } + } + }) + .AssertNoIssues(); + })); + } + + private void CodeAnalyze_ExtendedSDK_OpenApi() + { + Assert.Null(Record.Exception(() => + { + var options = new TypeDeclarationAnalyzerOptions() + { + SdkAssembly = Assembly.GetAssembly(typeof(DouyinMicroAppClient))!, + SdkRequestModelDeclarationNamespace = "SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models", + SdkResponseModelDeclarationNamespace = "SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models", + SdkExecutingExtensionDeclarationNamespace = "SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi", + SdkWebhookEventDeclarationNamespace = "SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Events", + ThrowOnNotFoundRequestModelTypes = true, + ThrowOnNotFoundResponseModelTypes = true, + ThrowOnNotFoundExecutingExtensionTypes = true, + ThrowOnNotFoundWebhookEventTypes = true + }; + new TypeDeclarationAnalyzer(options).AssertNoIssues(); + })); + + Assert.Null(Record.Exception(() => + { + string workdir = Environment.CurrentDirectory; + string projdir = Path.Combine(workdir, "../../../../../"); + + var options = new SourceFileAnalyzerOptions() + { + SdkAssembly = Assembly.GetAssembly(typeof(DouyinMicroAppOpenApiClient))!, + SdkRequestModelDeclarationNamespace = "SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models", + SdkResponseModelDeclarationNamespace = "SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Models", + SdkWebhookEventDeclarationNamespace = "SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Events", + ProjectSourceRootDirectory = Path.Combine(projdir, "./src/SKIT.FlurlHttpClient.ByteDance.MicroApp/"), + ProjectSourceRequestModelClassCodeSubDirectory = "ExtendedSDK/OpenApi/Models/", + ProjectSourceResponseModelClassCodeSubDirectory = "ExtendedSDK/OpenApi/Models/", + ProjectSourceExecutingExtensionClassCodeSubDirectory = "ExtendedSDK/OpenApi/Extensions/", + ProjectSourceWebhookEventClassCodeSubDirectory = "ExtendedSDK/OpenApi/Events/", + ProjectTestRootDirectory = Path.Combine(projdir, "./test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/"), + ProjectTestRequestModelSerializationSampleSubDirectory = "ModelSamples/OpenApi/", + ProjectTestResponseModelSerializationSampleSubDirectory = "ModelSamples/OpenApi/", + ProjectTestWebhookEventSerializationSampleSubDirectory = "EventSamples/OpenApi/", + ThrowOnNotFoundRequestModelClassCodeFiles = true, + ThrowOnNotFoundResponseModelClassCodeFiles = true, + ThrowOnNotFoundExecutingExtensionClassCodeFiles = true, + ThrowOnNotFoundWebhookEventClassCodeFiles = true, + ThrowOnNotFoundRequestModelSerializationSampleFiles = true, + ThrowOnNotFoundResponseModelSerializationSampleFiles = true, + ThrowOnNotFoundWebhookEventSerializationSampleFiles = true + }; + new SourceFileAnalyzer(options) + .AddRule((_, _, cur) => + { + if (cur.ContentKind != SourceFileContentKinds.ExecutingExtensionClassCode || + cur.FileKind != SourceFileKinds.CSharp) + return; + + using FileStream stream = cur.FileInfo.Open(FileMode.Open, FileAccess.Read); + using TextReader streamReader = new StreamReader(stream); + SyntaxTree syntaxTree = CSharpSyntaxTree.ParseText(streamReader.ReadToEnd()).WithFilePath(cur.FileInfo.FullName); + CompilationUnitSyntax syntaxRootNode = syntaxTree.GetCompilationUnitRoot(); + MethodDeclarationSyntax[] syntaxMethodDeclarationNodes = syntaxRootNode.Members + .Where(s => SourceFileCodeSyntaxKinds.BaseNamespaceDeclaration.Contains(s.Kind())) + .OfType() + .SelectMany(s => s.Members + .Where(s => s.IsKind(SyntaxKind.ClassDeclaration)) + .OfType() + .Where(s => s.Identifier.ToFullString().Contains("ExecuteLegacy")) // 仅扫描旧版 API + ) + .SelectMany(s => s.Members + .Where(s => s.IsKind(SyntaxKind.MethodDeclaration)) + .OfType() + ) + .Where(s => + { + string methodName = s.Identifier.ToFullString().Trim(); + return methodName.StartsWith("Execute") && + methodName.EndsWith("Async"); + }) + .ToArray(); + foreach (MethodDeclarationSyntax syntaxMethodDeclarationNode in syntaxMethodDeclarationNodes) + { + string methodName = syntaxMethodDeclarationNode.Identifier.ToFullString().Trim(); + + ExecutingMethodUrlPathSegmentsSyntaxWalker syntaxWalker = new ExecutingMethodUrlPathSegmentsSyntaxWalker(); + syntaxWalker.Reset().Visit(syntaxMethodDeclarationNode); + + string[] urlPathSegments1 = syntaxWalker.Result1 ?? Array.Empty(); + string[] urlPathSegments2 = syntaxWalker.Result2 ?? Array.Empty(); + for (int i = 0, len = Math.Max(urlPathSegments1.Length, urlPathSegments1.Length); i < len; i++) + { + string? s1 = urlPathSegments1.Length > i ? urlPathSegments1[i] : null; + string? s2 = urlPathSegments2.Length > i ? urlPathSegments2[i] : null; + if (!string.Equals(s1, s2)) + throw new AnalysisException($"文件 \"{cur.FileInfo.FullName}\"下的函数 \"{methodName}\" 应是一个 API 接口方法、且适配旧版入口点,但其 URL 路径的代码实现存在冲突。(Expected: \"{"/" + string.Join("/", urlPathSegments1)}\", Actual: \"{"/" + string.Join("/", urlPathSegments2)}\")"); + } + } + }) + .AssertNoIssues(); + })); + } + + private void CodeAnalyze_ExtendedSDK_ProductApi() + { + Assert.Null(Record.Exception(() => + { + var options = new TypeDeclarationAnalyzerOptions() + { + SdkAssembly = Assembly.GetAssembly(typeof(DouyinMicroAppProductApiClient))!, + SdkRequestModelDeclarationNamespace = "SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.ProductApi.Models", + SdkResponseModelDeclarationNamespace = "SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.ProductApi.Models", + SdkExecutingExtensionDeclarationNamespace = "SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.ProductApi", + SdkWebhookEventDeclarationNamespace = "SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.ProductApi.Events", + ThrowOnNotFoundRequestModelTypes = true, + ThrowOnNotFoundResponseModelTypes = true, + ThrowOnNotFoundExecutingExtensionTypes = true, + ThrowOnNotFoundWebhookEventTypes = true + }; + new TypeDeclarationAnalyzer(options).AssertNoIssues(); + })); + + Assert.Null(Record.Exception(() => + { + string workdir = Environment.CurrentDirectory; + string projdir = Path.Combine(workdir, "../../../../../"); + + var options = new SourceFileAnalyzerOptions() + { + SdkAssembly = Assembly.GetAssembly(typeof(DouyinMicroAppProductApiClient))!, + SdkRequestModelDeclarationNamespace = "SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.ProductApi.Models", + SdkResponseModelDeclarationNamespace = "SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.ProductApi.Models", + SdkWebhookEventDeclarationNamespace = "SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.ProductApi.Events", + ProjectSourceRootDirectory = Path.Combine(projdir, "./src/SKIT.FlurlHttpClient.ByteDance.MicroApp/"), + ProjectSourceRequestModelClassCodeSubDirectory = "ExtendedSDK/ProductApi/Models/", + ProjectSourceResponseModelClassCodeSubDirectory = "ExtendedSDK/ProductApi/Models/", + ProjectSourceExecutingExtensionClassCodeSubDirectory = "ExtendedSDK/ProductApi/Extensions/", + ProjectSourceWebhookEventClassCodeSubDirectory = "ExtendedSDK/ProductApi/Events/", + ProjectTestRootDirectory = Path.Combine(projdir, "./test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/"), + ProjectTestRequestModelSerializationSampleSubDirectory = "ModelSamples/ProductApi/", + ProjectTestResponseModelSerializationSampleSubDirectory = "ModelSamples/ProductApi/", + ProjectTestWebhookEventSerializationSampleSubDirectory = "EventSamples/ProductApi/", + ThrowOnNotFoundRequestModelClassCodeFiles = true, + ThrowOnNotFoundResponseModelClassCodeFiles = true, + ThrowOnNotFoundExecutingExtensionClassCodeFiles = true, + ThrowOnNotFoundWebhookEventClassCodeFiles = true, + ThrowOnNotFoundRequestModelSerializationSampleFiles = true, + ThrowOnNotFoundResponseModelSerializationSampleFiles = true, + ThrowOnNotFoundWebhookEventSerializationSampleFiles = true + }; + new SourceFileAnalyzer(options).AssertNoIssues(); + })); + } + + private void CodeAnalyze_ExtendedSDK_RoleApi() + { + Assert.Null(Record.Exception(() => + { + var options = new TypeDeclarationAnalyzerOptions() + { + SdkAssembly = Assembly.GetAssembly(typeof(DouyinMicroAppRoleApiClient))!, + SdkRequestModelDeclarationNamespace = "SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.RoleApi.Models", + SdkResponseModelDeclarationNamespace = "SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.RoleApi.Models", + SdkExecutingExtensionDeclarationNamespace = "SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.RoleApi", + ThrowOnNotFoundRequestModelTypes = true, + ThrowOnNotFoundResponseModelTypes = true, + ThrowOnNotFoundExecutingExtensionTypes = true + }; + new TypeDeclarationAnalyzer(options).AssertNoIssues(); + })); + + Assert.Null(Record.Exception(() => + { + string workdir = Environment.CurrentDirectory; + string projdir = Path.Combine(workdir, "../../../../../"); + + var options = new SourceFileAnalyzerOptions() + { + SdkAssembly = Assembly.GetAssembly(typeof(DouyinMicroAppRoleApiClient))!, + SdkRequestModelDeclarationNamespace = "SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.RoleApi.Models", + SdkResponseModelDeclarationNamespace = "SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.RoleApi.Models", + ProjectSourceRootDirectory = Path.Combine(projdir, "./src/SKIT.FlurlHttpClient.ByteDance.MicroApp/"), + ProjectSourceRequestModelClassCodeSubDirectory = "ExtendedSDK/RoleApi/Models/", + ProjectSourceResponseModelClassCodeSubDirectory = "ExtendedSDK/RoleApi/Models/", + ProjectSourceExecutingExtensionClassCodeSubDirectory = "ExtendedSDK/RoleApi/Extensions/", + ProjectSourceWebhookEventClassCodeSubDirectory = "ExtendedSDK/RoleApi/Events/", + ProjectTestRootDirectory = Path.Combine(projdir, "./test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/"), + ProjectTestRequestModelSerializationSampleSubDirectory = "ModelSamples/RoleApi/", + ProjectTestResponseModelSerializationSampleSubDirectory = "ModelSamples/RoleApi/", + ProjectTestWebhookEventSerializationSampleSubDirectory = "EventSamples/RoleApi/", + ThrowOnNotFoundRequestModelClassCodeFiles = true, + ThrowOnNotFoundResponseModelClassCodeFiles = true, + ThrowOnNotFoundExecutingExtensionClassCodeFiles = true, + ThrowOnNotFoundRequestModelSerializationSampleFiles = true, + ThrowOnNotFoundResponseModelSerializationSampleFiles = true + }; + new SourceFileAnalyzer(options).AssertNoIssues(); + })); + } + + private void CodeAnalyze_ExtendedSDK_Webcast() + { + Assert.Null(Record.Exception(() => + { + var options = new TypeDeclarationAnalyzerOptions() + { + SdkAssembly = Assembly.GetAssembly(typeof(DouyinMicroAppWebcastClient))!, + SdkRequestModelDeclarationNamespace = "SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.Webcast.Models", + SdkResponseModelDeclarationNamespace = "SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.Webcast.Models", + SdkExecutingExtensionDeclarationNamespace = "SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.Webcast", + ThrowOnNotFoundRequestModelTypes = true, + ThrowOnNotFoundResponseModelTypes = true, + ThrowOnNotFoundExecutingExtensionTypes = true + }; + new TypeDeclarationAnalyzer(options).AssertNoIssues(); + })); + + Assert.Null(Record.Exception(() => + { + string workdir = Environment.CurrentDirectory; + string projdir = Path.Combine(workdir, "../../../../../"); + + var options = new SourceFileAnalyzerOptions() + { + SdkAssembly = Assembly.GetAssembly(typeof(DouyinMicroAppWebcastClient))!, + SdkRequestModelDeclarationNamespace = "SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.Webcast.Models", + SdkResponseModelDeclarationNamespace = "SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.Webcast.Models", + ProjectSourceRootDirectory = Path.Combine(projdir, "./src/SKIT.FlurlHttpClient.ByteDance.MicroApp/"), + ProjectSourceRequestModelClassCodeSubDirectory = "ExtendedSDK/Webcast/Models/", + ProjectSourceResponseModelClassCodeSubDirectory = "ExtendedSDK/Webcast/Models/", + ProjectSourceExecutingExtensionClassCodeSubDirectory = "ExtendedSDK/Webcast/Extensions/", + ProjectSourceWebhookEventClassCodeSubDirectory = "ExtendedSDK/Webcast/Events/", + ProjectTestRootDirectory = Path.Combine(projdir, "./test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/"), + ProjectTestRequestModelSerializationSampleSubDirectory = "ModelSamples/Webcast/", + ProjectTestResponseModelSerializationSampleSubDirectory = "ModelSamples/Webcast/", + ProjectTestWebhookEventSerializationSampleSubDirectory = "EventSamples/Webcast/", + ThrowOnNotFoundRequestModelClassCodeFiles = true, + ThrowOnNotFoundResponseModelClassCodeFiles = true, + ThrowOnNotFoundExecutingExtensionClassCodeFiles = true, + ThrowOnNotFoundRequestModelSerializationSampleFiles = true, + ThrowOnNotFoundResponseModelSerializationSampleFiles = true + }; + new SourceFileAnalyzer(options).AssertNoIssues(); + })); + } + + private class ExecutingMethodUrlPathSegmentsSyntaxWalker : CSharpSyntaxWalker + { + public string[]? Result1 { get; private set; } + + public string[]? Result2 { get; private set; } + + public ExecutingMethodUrlPathSegmentsSyntaxWalker Reset() + { + Result1 = null; + Result2 = null; + return this; + } + + public override void VisitInvocationExpression(InvocationExpressionSyntax node) + { + if (node.Expression is MemberAccessExpressionSyntax memberAccessExpressionSyntaxNode) + { + if (node.ToFullString().Contains("CreateFlurlRequest") && node.ArgumentList?.Arguments.Count >= 3) + { + string arg1 = node.ArgumentList.Arguments[0].ToFullString(); + string arg2 = node.ArgumentList.Arguments[1].ToFullString(); + if (arg1 is not null && arg2.Contains(nameof(HttpMethod))) + { + Result1 ??= node.ArgumentList.Arguments + .Skip(2) + .Select(s => FormatArgument(s.ToFullString())) + .ToArray(); + } + } + else if (node.ToFullString().Contains("WithUrl") && node.ArgumentList?.Arguments.Count >= 1) + { + string arg1 = node.ArgumentList.Arguments[0].ToFullString(); + if (arg1 is not null && arg1.Contains("AppendPathSegments")) + { + Result2 ??= node.ArgumentList.Arguments[0].Expression + .ChildNodes() + .Where(s => s.IsKind(SyntaxKind.InvocationExpression)) + .OfType() + .SelectMany(s => s.ChildNodes() + .Where(s => s.IsKind(SyntaxKind.ArgumentList)) + .OfType() + ) + .SelectMany(s => s.ChildNodes() + .Where(s => s.IsKind(SyntaxKind.Argument)) + .OfType() + ) + .Select(s => FormatArgument(s.ToFullString())) + .ToArray(); + } + } + } + + base.VisitInvocationExpression(node); + } + + private string FormatArgument(string arg) + { + if (arg.StartsWith("\"") && arg.EndsWith("\"")) + return arg.Trim('\"'); + + if (arg == "string.Empty") + return string.Empty; + + return "{" + arg + "}"; + } + } + } +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/AppsBasicInfo/OpenAppsBasicInfoGetInfoV2Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/AppsBasicInfo/OpenAppsBasicInfoGetInfoV2Response.json new file mode 100644 index 00000000..9704d461 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/AppsBasicInfo/OpenAppsBasicInfoGetInfoV2Response.json @@ -0,0 +1,45 @@ +{ + "err_msg": "", + "err_no": 0, + "log_id": "202401162021508C7E711C39144F1127C8", + "data": { + "new_name_audit_info": { + "advice": "", + "new_name": "xxxx", + "new_name_audit_state": 4, + "reason": "", + "remaining_times": 3 + }, + "app_id": "xxxx", + "app_intro": "xxxxx", + "new_icon_audit_info": { + "advice": "", + "new_icon": "xxxx", + "new_icon_audit_state": 2, + "reason": "", + "remaining_times": 3 + }, + "new_intro_audit_info": { + "advice": "", + "new_intro": "xxxxx", + "new_intro_audit_state": 2, + "reason": "", + "remaining_times": 3 + }, + "subject_audit_info": { + "subject_name": "xxx", + "subject_type": 1 + }, + "app_categories_audit_info": [ + { + "app_category_audit_state": 2, + "app_category_name": "xx-xxxx-xx", + "reason": "", + "app_category": "xxx,xxx,xxx" + } + ], + "app_icon": "xxxxx", + "app_name": "xxxx", + "app_state": 0 + } +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/AppsBasicInfo/OpenAppsBasicInfoGetQrcodeV2Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/AppsBasicInfo/OpenAppsBasicInfoGetQrcodeV2Request.json new file mode 100644 index 00000000..9feda9fd --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/AppsBasicInfo/OpenAppsBasicInfoGetQrcodeV2Request.json @@ -0,0 +1,4 @@ +{ + "version": "latest", + "path": "xxxx/xxxx" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/AppsBasicInfo/OpenAppsBasicInfoGetQrcodeV2Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/AppsBasicInfo/OpenAppsBasicInfoGetQrcodeV2Response.json new file mode 100644 index 00000000..e4d58da9 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/AppsBasicInfo/OpenAppsBasicInfoGetQrcodeV2Response.json @@ -0,0 +1,8 @@ +{ + "data": { + "qr_code_url": "xxxxxxx" + }, + "err_msg": "", + "err_no": 0, + "log_id": "20240116204738BF50CE363C57B719C353" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/AppsBasicInfo/OpenAppsBasicInfoModifyAppIntroductionV2Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/AppsBasicInfo/OpenAppsBasicInfoModifyAppIntroductionV2Request.json new file mode 100644 index 00000000..3511d5c6 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/AppsBasicInfo/OpenAppsBasicInfoModifyAppIntroductionV2Request.json @@ -0,0 +1,3 @@ +{ + "new_intro": "xxxxxxxx" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/AppsBasicInfo/OpenAppsBasicInfoModifyAppNameV2Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/AppsBasicInfo/OpenAppsBasicInfoModifyAppNameV2Request.json new file mode 100644 index 00000000..cde6aa80 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/AppsBasicInfo/OpenAppsBasicInfoModifyAppNameV2Request.json @@ -0,0 +1,3 @@ +{ + "new_name": "xxxx" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/AppsCategory/OpenAppsCategoryAddCategoriesV1Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/AppsCategory/OpenAppsCategoryAddCategoriesV1Request.json new file mode 100644 index 00000000..dc058b5c --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/AppsCategory/OpenAppsCategoryAddCategoriesV1Request.json @@ -0,0 +1,17 @@ +{ + "category_info": [ + { + "category": "xxx,xxx,xxx", + "category_cert": [ + { + "id": "x", + "name": "《信息网络传播视听节目许可证》", + "path_list": [ "xxxx/xxxx" ] + } + ] + }, + { + "category": "xx,xxxx,xx" + } + ] +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/AppsCategory/OpenAppsCategoryDeleteCategoriesV1Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/AppsCategory/OpenAppsCategoryDeleteCategoriesV1Request.json new file mode 100644 index 00000000..78f01896 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/AppsCategory/OpenAppsCategoryDeleteCategoriesV1Request.json @@ -0,0 +1,3 @@ +{ + "categories": [ "xxx,xxx,xxx" ] +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/AppsCategory/OpenAppsCategoryGetAllCategoriesV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/AppsCategory/OpenAppsCategoryGetAllCategoriesV1Response.json new file mode 100644 index 00000000..f7849abe --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/AppsCategory/OpenAppsCategoryGetAllCategoriesV1Response.json @@ -0,0 +1,21 @@ +{ + "log_id": "202401171430441545B42E14E727624A0D", + "data": { + "category_list": [ + { + "name": "餐饮", + "spid": 0, + "certification": { + "explanation": "", + "list": [], + "relation": [] + }, + "fpid": 0, + "id": 501, + "level": 1 + } + ] + }, + "err_msg": "", + "err_no": 0 +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/AppsCategory/OpenAppsCategoryGetAuditCategoriesV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/AppsCategory/OpenAppsCategoryGetAuditCategoriesV1Response.json new file mode 100644 index 00000000..29978450 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/AppsCategory/OpenAppsCategoryGetAuditCategoriesV1Response.json @@ -0,0 +1,20 @@ +{ + "data": { + "app_category_audit_info": [ + { + "category": "xxx,xxx,xxx", + "category_audit_state": 2, + "category_cert": null, + "category_cert_ids": "", + "category_name": "xx-xxxx-xx", + "reason": "" + } + ], + "category_change_limit": 5, + "category_limit": 5, + "remaining_times": 5 + }, + "err_msg": "", + "err_no": 0, + "log_id": "20240117144112523B289832A9008E1C74" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/AppsCategory/OpenAppsCategorySupplyCategoriesV1Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/AppsCategory/OpenAppsCategorySupplyCategoriesV1Request.json new file mode 100644 index 00000000..60d2562e --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/AppsCategory/OpenAppsCategorySupplyCategoriesV1Request.json @@ -0,0 +1,14 @@ +{ + "category_info": [ + { + "category": "xxx,xxx,xxx", + "category_cert": [ + { + "id": "xxx", + "name": "xxxx", + "path_list": [ "xxxx/xxxx" ] + } + ] + } + ] +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/AppsCreditScore/OpenAppsCreditScoreGetCreditScoreV2Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/AppsCreditScore/OpenAppsCreditScoreGetCreditScoreV2Response.json new file mode 100644 index 00000000..bfb093d2 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/AppsCreditScore/OpenAppsCreditScoreGetCreditScoreV2Response.json @@ -0,0 +1,8 @@ +{ + "err_no": 0, + "log_id": "202401171514133CBF034059DDAC621FB8", + "data": { + "credit_score": 100 + }, + "err_msg": "" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/AppsDomain/OpenAppsDomainModifyServerDomainV2Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/AppsDomain/OpenAppsDomainModifyServerDomainV2Request.json new file mode 100644 index 00000000..9aefaff8 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/AppsDomain/OpenAppsDomainModifyServerDomainV2Request.json @@ -0,0 +1,4 @@ +{ + "action": "add", + "request": [ "www.xxx.com" ] +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/AppsDomain/OpenAppsDomainModifyServerDomainV2Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/AppsDomain/OpenAppsDomainModifyServerDomainV2Response.json new file mode 100644 index 00000000..8af58c22 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/AppsDomain/OpenAppsDomainModifyServerDomainV2Response.json @@ -0,0 +1,11 @@ +{ + "err_msg": "", + "err_no": 0, + "log_id": "20240117114616666CB7AB1AAE5A69212E", + "data": { + "request": [ "www.xxx.com", "www.xxx.com" ], + "socket": [ "www.xxx.com", "www.xxx.com" ], + "upload": [ "www.xxx.com", "www.xxx.com" ], + "download": [ "www.xxx.com", "www.xxx.com" ] + } +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/AppsDomain/OpenAppsDomainModifyWebviewDomainV2Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/AppsDomain/OpenAppsDomainModifyWebviewDomainV2Request.json new file mode 100644 index 00000000..fd90b3cd --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/AppsDomain/OpenAppsDomainModifyWebviewDomainV2Request.json @@ -0,0 +1,4 @@ +{ + "action": "add", + "webview": [ "www.xxx.com" ] +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/AppsDomain/OpenAppsDomainModifyWebviewDomainV2Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/AppsDomain/OpenAppsDomainModifyWebviewDomainV2Response.json new file mode 100644 index 00000000..c0a499bf --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/AppsDomain/OpenAppsDomainModifyWebviewDomainV2Response.json @@ -0,0 +1,8 @@ +{ + "err_msg": "", + "err_no": 0, + "log_id": "202401171146249E93BBEB2833B467B53D", + "data": { + "webview": [ "www.xxx.com", "www.xxx.com" ] + } +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/AppsICPRecord/OpenAppsICPRecordGetFacialRecognitionUrlV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/AppsICPRecord/OpenAppsICPRecordGetFacialRecognitionUrlV1Response.json new file mode 100644 index 00000000..463014fc --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/AppsICPRecord/OpenAppsICPRecordGetFacialRecognitionUrlV1Response.json @@ -0,0 +1,9 @@ +{ + "err_no": 0, + "log_id": "2023120718400603FC7DFC64EFC63EE90F", + "data": { + "facial_recognition_token": "xxxx", + "facial_recognition_url": "https://xxxxxx" + }, + "err_msg": "" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/AppsICPRecord/OpenAppsICPRecordQueryCorpTypeListV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/AppsICPRecord/OpenAppsICPRecordQueryCorpTypeListV1Response.json new file mode 100644 index 00000000..8615d5d2 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/AppsICPRecord/OpenAppsICPRecordQueryCorpTypeListV1Response.json @@ -0,0 +1,27 @@ +{ + "data": { + "corp_type_list": [ + { + "corp_type_id": 4, + "corp_type_name": "企业", + "credentials_type_list": [ + { + "credentials_type_id": 1, + "credentials_type_name": "营业执照(个人或企业)" + }, + { + "credentials_type_id": 12, + "credentials_type_name": "组织机构代码证" + }, + { + "credentials_type_id": 27, + "credentials_type_name": "外国企业常驻代表机构登记证" + } + ] + } + ] + }, + "err_msg": "", + "err_no": 0, + "log_id": "202312121723335178F7582A6F5A0B21C2" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/AppsICPRecord/OpenAppsICPRecordQueryFacialRecognitionStatusV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/AppsICPRecord/OpenAppsICPRecordQueryFacialRecognitionStatusV1Response.json new file mode 100644 index 00000000..09f8d7c8 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/AppsICPRecord/OpenAppsICPRecordQueryFacialRecognitionStatusV1Response.json @@ -0,0 +1,8 @@ +{ + "data": { + "facial_recognition_status": 0 + }, + "err_msg": "", + "err_no": 0, + "log_id": "2023120718534175A5E8F8399C21436591" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/AppsICPRecord/OpenAppsICPRecordQueryInchargePeopleCredentialsTypeListV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/AppsICPRecord/OpenAppsICPRecordQueryInchargePeopleCredentialsTypeListV1Response.json new file mode 100644 index 00000000..05e69ad2 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/AppsICPRecord/OpenAppsICPRecordQueryInchargePeopleCredentialsTypeListV1Response.json @@ -0,0 +1,13 @@ +{ + "log_id": "202312061606373E2733BD492C282631F0", + "data": { + "credentials_type_list": [ + { + "credentials_type_id": 2, + "credentials_type_name": "居民身份证" + } + ] + }, + "err_msg": "", + "err_no": 0 +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/AppsICPRecord/OpenAppsICPRecordQueryPreApprovalItemTypeListV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/AppsICPRecord/OpenAppsICPRecordQueryPreApprovalItemTypeListV1Response.json new file mode 100644 index 00000000..a2da6c20 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/AppsICPRecord/OpenAppsICPRecordQueryPreApprovalItemTypeListV1Response.json @@ -0,0 +1,13 @@ +{ + "data": { + "pre_approval_item_type_list": [ + { + "pre_approval_item_id": 2, + "pre_approval_item_name": "出版" + } + ] + }, + "err_msg": "", + "err_no": 0, + "log_id": "202312061607073E2733BD492C28264063" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/AppsICPRecord/OpenAppsICPRecordQueryRecordStatusV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/AppsICPRecord/OpenAppsICPRecordQueryRecordStatusV1Response.json new file mode 100644 index 00000000..2a08a7e0 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/AppsICPRecord/OpenAppsICPRecordQueryRecordStatusV1Response.json @@ -0,0 +1,8 @@ +{ + "log_id": "20231211091551EA10E6F43911AAE7AA17", + "data": { + "status": 1 + }, + "err_msg": "", + "err_no": 0 +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/AppsICPRecord/OpenAppsICPRecordQueryRegionListV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/AppsICPRecord/OpenAppsICPRecordQueryRegionListV1Response.json new file mode 100644 index 00000000..59972925 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/AppsICPRecord/OpenAppsICPRecordQueryRegionListV1Response.json @@ -0,0 +1,28 @@ +{ + "data": { + "region_list": [ + { + "name": "北京市", + "type": 1, + "code": "110000", + "sub_region": [ + { + "code": "110100", + "name": "市辖区", + "type": 2, + "sub_region": [ + { + "name": "东城区", + "type": 3, + "code": "110101" + } + ] + } + ] + } + ] + }, + "err_msg": "", + "err_no": 0, + "log_id": "20231206161404445521002D87E92CAAAC" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/AppsICPRecord/OpenAppsICPRecordQueryServiceContentTypeListV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/AppsICPRecord/OpenAppsICPRecordQueryServiceContentTypeListV1Response.json new file mode 100644 index 00000000..8f3a036b --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/AppsICPRecord/OpenAppsICPRecordQueryServiceContentTypeListV1Response.json @@ -0,0 +1,19 @@ +{ + "err_msg": "", + "err_no": 0, + "log_id": "202312061606423E2733BD492C2826347D", + "data": { + "service_content_type_list": [ + { + "service_content_type_id": 500, + "service_content_type_name": "生活服务", + "sub_service_content_type_list": [ + { + "service_content_type_id": 1, + "service_content_type_name": "生活缴费" + } + ] + } + ] + } +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/AppsICPRecord/OpenAppsICPRecordSendFacialRecognitionNotifyV1Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/AppsICPRecord/OpenAppsICPRecordSendFacialRecognitionNotifyV1Request.json new file mode 100644 index 00000000..77d904be --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/AppsICPRecord/OpenAppsICPRecordSendFacialRecognitionNotifyV1Request.json @@ -0,0 +1,4 @@ +{ + "app_incharge_people_phone": "1xxxxxxxxxx", + "province_code": "310000" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/AppsICPRecord/OpenAppsICPRecordSendFacialRecognitionNotifyV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/AppsICPRecord/OpenAppsICPRecordSendFacialRecognitionNotifyV1Response.json new file mode 100644 index 00000000..f8b187e5 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/AppsICPRecord/OpenAppsICPRecordSendFacialRecognitionNotifyV1Response.json @@ -0,0 +1,8 @@ +{ + "err_msg": "", + "err_no": 0, + "log_id": "2023120718533575A5E8F8399C2143627D", + "data": { + "facial_recognition_token": "xxxxx" + } +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/AppsICPRecord/OpenAppsICPRecordSubmitRecordInfoV1Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/AppsICPRecord/OpenAppsICPRecordSubmitRecordInfoV1Request.json new file mode 100644 index 00000000..a74b0256 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/AppsICPRecord/OpenAppsICPRecordSubmitRecordInfoV1Request.json @@ -0,0 +1,71 @@ +{ + "corp_info": { + "corp_type": 4, + "credentials_type": 1, + "credentials_name": "1", + "credentials_number": "xxxxx", + "credentials_pic": { + "path": "xxxx" + }, + "credentials_address": "xxxxx", + "province_code": "320000", + "province_name": "江苏省", + "city_code": "120100", + "city_name": "市辖区", + "region_code": "120104", + "region_name": "南开区", + "communication_address": "xxxx", + "incharge_people_name": "xxx", + "incharge_people_credentials_type": 2, + "incharge_people_credentials_number": "xxxxxxx", + "incharge_people_credentials_front": { + "path": "xxxxxx" + }, + "incharge_people_credentials_back": { + "path": "xxxxx" + }, + "incharge_people_credentials_has_end_time": true, + "incharge_people_credentials_valid_start_time": 1704038400, + "incharge_people_credentials_valid_end_time": 1733328000, + "incharge_people_email": "xxxxxx", + "incharge_people_phone": "xxxxxx", + "incharge_people_emergency_phone": "xxxxxx", + "remark": "备注", + "corp_other_materials": [ + { + "path": "xxxxxxx" + } + ], + "corp_authority_letter": [ + { + "path": "xxxxxx" + } + ] + }, + "app_info": { + "app_language": [ 1 ], + "service_content_type_list": [ 1 ], + "involve_pre_approval": true, + "pre_approval_list": [ + { + "pre_approval_item_id": 3, + "pre_approval_number": "5678", + "pre_approval_files": [ + { + "path": "xxxxx" + } + ] + } + ], + "incharge_people_email": "xxxxx", + "incharge_people_phone": "xxxx", + "incharge_people_emergency_phone": "xxxx", + "remark": "备注", + "facial_recognition_token": "xxxxx", + "app_other_materials": [ + { + "path": "xxxxxx" + } + ] + } +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/AppsICPRecord/OpenAppsICPRecordUploadImageV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/AppsICPRecord/OpenAppsICPRecordUploadImageV1Response.json new file mode 100644 index 00000000..8453b59e --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/AppsICPRecord/OpenAppsICPRecordUploadImageV1Response.json @@ -0,0 +1,8 @@ +{ + "log_id": "20231212184332A802F6FF1672E3072333", + "data": { + "path": "xxxxxxx" + }, + "err_msg": "", + "err_no": 0 +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/AppsPackageVersion/OpenAppsPackageVersionAuditV1Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/AppsPackageVersion/OpenAppsPackageVersionAuditV1Request.json new file mode 100644 index 00000000..9adf3c71 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/AppsPackageVersion/OpenAppsPackageVersionAuditV1Request.json @@ -0,0 +1,6 @@ +{ + "host_names": [ "YkaYm7173K" ], + "audit_note": "AvTotSPfit", + "audit_way": 1, + "tag": "" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/AppsPackageVersion/OpenAppsPackageVersionGetAuditHostsV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/AppsPackageVersion/OpenAppsPackageVersionGetAuditHostsV1Response.json new file mode 100644 index 00000000..5069a199 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/AppsPackageVersion/OpenAppsPackageVersionGetAuditHostsV1Response.json @@ -0,0 +1,15 @@ +{ + "err_no": 0, + "err_msg": "success", + "log_id": "3TmkBXaKXL", + "data": { + "host_names": [ + "toutiao", + "douyin" + ], + "released_host_names": [ + "toutiao", + "douyin" + ] + } +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/AppsPackageVersion/OpenAppsPackageVersionGetVersionsV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/AppsPackageVersion/OpenAppsPackageVersionGetVersionsV1Response.json new file mode 100644 index 00000000..4b66df1c --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/AppsPackageVersion/OpenAppsPackageVersionGetVersionsV1Response.json @@ -0,0 +1,68 @@ +{ + "err_no": 0, + "err_msg": "success", + "log_id": "2034EAC", + "data": { + "audit": { + "approved_apps": [ "抖音" ], + "attach_info": { + "今日头条": "http://xxxx", + "今日头条lite": "http://xxxx" + }, + "categories": [ "服务类-快递、物流-查件" ], + "ctime": 1591019952, + "developer_avatar": "xxx", + "developer_id": "xxx", + "developer_name": "xxx", + "has_publish": 0, + "is_illegal_version": false, + "reason": "今日头条: 无法进入小程序;小程序页面存在闪退、卡顿、黑屏等功能异常问题;今日头条lite: 无法进入小程序", + "reason_detail": { + "今日头条": [ "无法进入小程序", "小程序页面存在闪退、卡顿、黑屏等功能异常问题" ], + "今日头条lite": [ "无法进入小程序" ] + }, + "status": 2, + "summary": "今天是5月30日", + "version": "1.0.1" + }, + "current": { + "approved_apps": [], + "attach_info": {}, + "categories": [ "服务类-快递、物流-查件" ], + "ctime": 1585727678, + "developer_avatar": null, + "developer_id": null, + "developer_name": null, + "has_down": 0, + "not_approved_apps": [], + "rollback": { + "can_rollback": false, + "last_version": "" + }, + "summary": "测试版本1.0.0", + "uid": 123123, + "version": "1.0.0" + }, + "latest": { + "categories": [ "服务类-快递、物流-查件" ], + "ctime": 1590755478, + "developer_avatar": "xxx", + "developer_id": "xxx", + "developer_name": "xxx", + "has_audit": 1, + "screenshot": "", + "summary": "今天是5月30日", + "version": "1.0.1" + }, + "gray": { + "categories": [ "服务类-快递、物流-查件" ], + "ctime": 1590755478, + "developer_avatar": "xxx", + "developer_id": "xxx", + "developer_name": "xxx", + "summary": "今天是5月30日", + "version": "1.0.1", + "host_gray_scale": {} + } + } +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/AppsPackageVersion/OpenAppsPackageVersionUploadV1Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/AppsPackageVersion/OpenAppsPackageVersionUploadV1Request.json new file mode 100644 index 00000000..396d33ed --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/AppsPackageVersion/OpenAppsPackageVersionUploadV1Request.json @@ -0,0 +1,7 @@ +{ + "ext_json": "{\"extEnable\":true,\"extAppid\":\"xxx\",\"pages\":[]}", + "template_id": 9133504853504535288, + "user_desc": "AvbQ8S0fXp", + "user_version": "1.1.1", + "tag": "" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/AppsTrial/OpenAppsTrialGetTrialInfoV2Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/AppsTrial/OpenAppsTrialGetTrialInfoV2Response.json new file mode 100644 index 00000000..7e980590 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/AppsTrial/OpenAppsTrialGetTrialInfoV2Response.json @@ -0,0 +1,16 @@ +{ + "data": { + "trial_task_info": null, + "app_credit_score": -999, + "is_trial": 1, + "trial_limit_info": { + "is_capability_limited": 1, + "is_payment_restricted": 0, + "is_traffic_limited": 0 + }, + "trial_pass_score": 80 + }, + "err_msg": "", + "err_no": 0, + "log_id": "20240117151219739E5689A61B947BFFE5" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/Platform/Webhook/OpenPlatformWebhookEventStatusListV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/Platform/Webhook/OpenPlatformWebhookEventStatusListV1Response.json new file mode 100644 index 00000000..f620bd69 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/Platform/Webhook/OpenPlatformWebhookEventStatusListV1Response.json @@ -0,0 +1,19 @@ +{ + "log_id": "ZcabTr0mNP", + "data": { + "webhook_info": { + "secret": "82bU3YS4zK", + "callback_url": "zD6T62rz6p" + }, + "event_list": [ + { + "event": "Hnvd6JbjVi", + "name_cn": "aRmr2mb3JN", + "desc": "d80J5RlxFs", + "status": 1 + } + ] + }, + "err_no": 0, + "err_msg": "" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/Platform/Webhook/OpenPlatformWebhookResetSecretV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/Platform/Webhook/OpenPlatformWebhookResetSecretV1Response.json new file mode 100644 index 00000000..40afdfff --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/Platform/Webhook/OpenPlatformWebhookResetSecretV1Response.json @@ -0,0 +1,8 @@ +{ + "data": { + "secret": "E4WE142xUY" + }, + "err_no": 0, + "err_msg": "", + "log_id": "8HWyNxQlCa" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/Platform/Webhook/OpenPlatformWebhookSaveCallbackUrlV1Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/Platform/Webhook/OpenPlatformWebhookSaveCallbackUrlV1Request.json new file mode 100644 index 00000000..e57c21a7 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/Platform/Webhook/OpenPlatformWebhookSaveCallbackUrlV1Request.json @@ -0,0 +1,3 @@ +{ + "callback_url": "s57XNzNBna" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/Platform/Webhook/OpenPlatformWebhookUpdateEventStatusV1Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/Platform/Webhook/OpenPlatformWebhookUpdateEventStatusV1Request.json new file mode 100644 index 00000000..e3e1271f --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/Platform/Webhook/OpenPlatformWebhookUpdateEventStatusV1Request.json @@ -0,0 +1,8 @@ +{ + "event_list": [ + { + "status": 1, + "event": "L98AxizwKs" + } + ] +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/ThirdParty/Template/OpenApiThirdPartyTemplateGetDraftListV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/ThirdParty/Template/OpenApiThirdPartyTemplateGetDraftListV1Response.json deleted file mode 100644 index db683577..00000000 --- a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/ThirdParty/Template/OpenApiThirdPartyTemplateGetDraftListV1Response.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "errno": 0, - "message": "success", - "draft_list": [ - { - "draft_id": 1, - "user_version": "2.2.2", - "user_desc": "xxx", - "create_time": 1488965932 - }, - { - "draft_id": 2, - "user_version": "3.3.3", - "user_desc": "xxx", - "create_time": 1504790916 - } - ] -} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/TpAppAuth/OpenAuthThirdPartyTokenV2Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/TpAppAuth/OpenAuthThirdPartyTokenV2Response.json new file mode 100644 index 00000000..ad04e954 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/TpAppAuth/OpenAuthThirdPartyTokenV2Response.json @@ -0,0 +1,4 @@ +{ + "expires_in": 3600, + "component_access_token": "xxxxx" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/TpAppAuth/OpenTpAppAuthGenerateLinkV3Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/TpAppAuth/OpenTpAppAuthGenerateLinkV3Request.json new file mode 100644 index 00000000..73f43e6a --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/TpAppAuth/OpenTpAppAuthGenerateLinkV3Request.json @@ -0,0 +1,3 @@ +{ + "link_type": 1 +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/TpAppAuth/OpenTpAppAuthGenerateLinkV3Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/TpAppAuth/OpenTpAppAuthGenerateLinkV3Response.json new file mode 100644 index 00000000..1e8bdac0 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/TpAppAuth/OpenTpAppAuthGenerateLinkV3Response.json @@ -0,0 +1,8 @@ +{ + "err_msg": "", + "err_no": 0, + "log_id": "202401121734538F484F2C844C5C32253C", + "data": { + "link": "xxxxxxxxxxx" + } +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/TpAppAuth/OpenTpAppAuthGetAuthAppListV2Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/TpAppAuth/OpenTpAppAuthGetAuthAppListV2Response.json new file mode 100644 index 00000000..609c39fa --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/TpAppAuth/OpenTpAppAuthGetAuthAppListV2Response.json @@ -0,0 +1,14 @@ +{ + "data": { + "auth_app_list": [ + { + "auth_appid": "xxxx", + "auth_time": 1703062377 + } + ], + "total": 1 + }, + "err_msg": "", + "err_no": 0, + "log_id": "2024011516552804343697F9D7931FAB00" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/TpAppAuth/OpenTpAppAuthGetAuthTokenV2Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/TpAppAuth/OpenTpAppAuthGetAuthTokenV2Response.json new file mode 100644 index 00000000..04aff6f5 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/TpAppAuth/OpenTpAppAuthGetAuthTokenV2Response.json @@ -0,0 +1,24 @@ +{ + "err_no": 0, + "log_id": "2023101312022744C2A2666DB7BC00832B", + "data": { + "authorizer_access_token": "isvact.5dafax837bb9937cdxxxxxx200fO2Eh5YgvG4pFmj6nSf8NGr6j8Yfg", + "authorizer_appid": "xxxxxx", + "authorizer_refresh_token": "isvrft.d016bb817070xxxxxtUS9BNtfJ174uhFNFUnW", + "expires_in": 7200, + "refresh_expires_in": 2592000, + "authorize_permission": [ + { + "category": "开发管理权限", + "description": "帮助小程序进行基础功能开发及配置开发所需信息", + "id": 1 + }, + { + "category": "基本信息设置权限", + "description": "帮助小程序管理名称、头像、简介、服务类目等信息", + "id": 2 + } + ] + }, + "err_msg": "" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/TpAppAuth/OpenTpAppAuthRetrieveAuthCodeV2Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/TpAppAuth/OpenTpAppAuthRetrieveAuthCodeV2Request.json new file mode 100644 index 00000000..54639a84 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/TpAppAuth/OpenTpAppAuthRetrieveAuthCodeV2Request.json @@ -0,0 +1,3 @@ +{ + "authorization_appid": "xxxxxxxx" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/TpAppAuth/OpenTpAppAuthRetrieveAuthCodeV2Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/TpAppAuth/OpenTpAppAuthRetrieveAuthCodeV2Response.json new file mode 100644 index 00000000..0a445ca1 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/TpAppAuth/OpenTpAppAuthRetrieveAuthCodeV2Response.json @@ -0,0 +1,9 @@ +{ + "data": { + "authorization_code": "xxxxxxxxxxx", + "expires_in": 3600 + }, + "err_msg": "", + "err_no": 0, + "log_id": "20240112171812CA5FDE08E24D242EFEAD" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/TpAppFile/OpenTpAppFileUploadMaterialV2Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/TpAppFile/OpenTpAppFileUploadMaterialV2Response.json new file mode 100644 index 00000000..8b0f0b58 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/TpAppFile/OpenTpAppFileUploadMaterialV2Response.json @@ -0,0 +1,8 @@ +{ + "data": { + "path": "xxxxx" + }, + "err_msg": "", + "err_no": 0, + "log_id": "202401151619351CF77AE5F7A43B8393C0" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/TpAppTemplate/OpenTpAppTemplateAddTemplateV2Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/TpAppTemplate/OpenTpAppTemplateAddTemplateV2Request.json new file mode 100644 index 00000000..ddc5120c --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/TpAppTemplate/OpenTpAppTemplateAddTemplateV2Request.json @@ -0,0 +1,3 @@ +{ + "draft_id": 1010 +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/TpAppTemplate/OpenTpAppTemplateDeleteTemplateV2Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/TpAppTemplate/OpenTpAppTemplateDeleteTemplateV2Request.json new file mode 100644 index 00000000..379aacbf --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/TpAppTemplate/OpenTpAppTemplateDeleteTemplateV2Request.json @@ -0,0 +1,3 @@ +{ + "template_id": 1010 +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/TpAppTemplate/OpenTpAppTemplateGetTemplateAppListV2Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/TpAppTemplate/OpenTpAppTemplateGetTemplateAppListV2Response.json new file mode 100644 index 00000000..663a253f --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/TpAppTemplate/OpenTpAppTemplateGetTemplateAppListV2Response.json @@ -0,0 +1,22 @@ +{ + "data": { + "tpl_app_list": [ + { + "tpl_app_id": "xxxxx", + "user_desc": "xxxxx", + "user_version": "x.x.x", + "app_name": "xxxx", + "create_time": 1702553299, + "draft_id": 1, + "nick_name": "xxxxx" + }, + { + "app_name": "xxxxx", + "tpl_app_id": "xxxxx" + } + ] + }, + "err_msg": "", + "err_no": 0, + "log_id": "20240115162821497BC0191A90E58ABD8D" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/TpAppTemplate/OpenTpAppTemplateGetTemplateListV2Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/TpAppTemplate/OpenTpAppTemplateGetTemplateListV2Response.json new file mode 100644 index 00000000..8ad56eb9 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/TpAppTemplate/OpenTpAppTemplateGetTemplateListV2Response.json @@ -0,0 +1,15 @@ +{ + "err_msg": "", + "err_no": 0, + "log_id": "20240115152221728055690DCBE01D5E8E", + "data": { + "template_list": [ + { + "user_desc": "xxxxx", + "user_version": "x.x.x", + "create_time": 1667389622, + "template_id": 1010 + } + ] + } +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/Auth/OpenApiAuthGenerateLinkV2Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/_Legacy/Auth/OpenApiAuthGenerateLinkV2Response.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/Auth/OpenApiAuthGenerateLinkV2Response.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/_Legacy/Auth/OpenApiAuthGenerateLinkV2Response.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/Auth/OpenApiAuthPreAuthCodeV2Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/_Legacy/Auth/OpenApiAuthPreAuthCodeV2Request.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/Auth/OpenApiAuthPreAuthCodeV2Request.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/_Legacy/Auth/OpenApiAuthPreAuthCodeV2Request.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/Auth/OpenApiAuthPreAuthCodeV2Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/_Legacy/Auth/OpenApiAuthPreAuthCodeV2Response.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/Auth/OpenApiAuthPreAuthCodeV2Response.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/_Legacy/Auth/OpenApiAuthPreAuthCodeV2Response.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/Auth/OpenApiAuthRetrieveV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/_Legacy/Auth/OpenApiAuthRetrieveV1Response.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/Auth/OpenApiAuthRetrieveV1Response.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/_Legacy/Auth/OpenApiAuthRetrieveV1Response.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/Auth/OpenApiAuthThirdPartyTokenV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/_Legacy/Auth/OpenApiAuthThirdPartyTokenV1Response.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/Auth/OpenApiAuthThirdPartyTokenV1Response.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/_Legacy/Auth/OpenApiAuthThirdPartyTokenV1Response.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/OAuth/OpenApiOAuthTokenV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/_Legacy/Auth/OpenApiOAuthTokenV1Response.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/OAuth/OpenApiOAuthTokenV1Response.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/_Legacy/Auth/OpenApiOAuthTokenV1Response.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/MicroApp/App/Category/OpenApiMicroAppAppAddCategoriesV1Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/_Legacy/MicroApp/App/Category/OpenApiMicroAppAppAddCategoriesV1Request.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/MicroApp/App/Category/OpenApiMicroAppAppAddCategoriesV1Request.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/_Legacy/MicroApp/App/Category/OpenApiMicroAppAppAddCategoriesV1Request.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/MicroApp/App/Category/OpenApiMicroAppAppAllCategoriesV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/_Legacy/MicroApp/App/Category/OpenApiMicroAppAppAllCategoriesV1Response.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/MicroApp/App/Category/OpenApiMicroAppAppAllCategoriesV1Response.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/_Legacy/MicroApp/App/Category/OpenApiMicroAppAppAllCategoriesV1Response.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/MicroApp/App/Category/OpenApiMicroAppAppCategoriesV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/_Legacy/MicroApp/App/Category/OpenApiMicroAppAppCategoriesV1Response.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/MicroApp/App/Category/OpenApiMicroAppAppCategoriesV1Response.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/_Legacy/MicroApp/App/Category/OpenApiMicroAppAppCategoriesV1Response.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/MicroApp/App/Category/OpenApiMicroAppAppDeleteCategoriesV1Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/_Legacy/MicroApp/App/Category/OpenApiMicroAppAppDeleteCategoriesV1Request.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/MicroApp/App/Category/OpenApiMicroAppAppDeleteCategoriesV1Request.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/_Legacy/MicroApp/App/Category/OpenApiMicroAppAppDeleteCategoriesV1Request.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/MicroApp/App/Category/OpenApiMicroAppAppSupplyCategoriesV1Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/_Legacy/MicroApp/App/Category/OpenApiMicroAppAppSupplyCategoriesV1Request.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/MicroApp/App/Category/OpenApiMicroAppAppSupplyCategoriesV1Request.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/_Legacy/MicroApp/App/Category/OpenApiMicroAppAppSupplyCategoriesV1Request.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/MicroApp/App/OpenApiMicroAppAppCreditScoreV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/_Legacy/MicroApp/App/OpenApiMicroAppAppCreditScoreV1Response.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/MicroApp/App/OpenApiMicroAppAppCreditScoreV1Response.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/_Legacy/MicroApp/App/OpenApiMicroAppAppCreditScoreV1Response.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/MicroApp/App/OpenApiMicroAppAppInfoV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/_Legacy/MicroApp/App/OpenApiMicroAppAppInfoV1Response.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/MicroApp/App/OpenApiMicroAppAppInfoV1Response.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/_Legacy/MicroApp/App/OpenApiMicroAppAppInfoV1Response.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/MicroApp/App/OpenApiMicroAppAppModifyAppIconV1Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/_Legacy/MicroApp/App/OpenApiMicroAppAppModifyAppIconV1Request.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/MicroApp/App/OpenApiMicroAppAppModifyAppIconV1Request.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/_Legacy/MicroApp/App/OpenApiMicroAppAppModifyAppIconV1Request.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/MicroApp/App/OpenApiMicroAppAppModifyAppIntroductionV1Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/_Legacy/MicroApp/App/OpenApiMicroAppAppModifyAppIntroductionV1Request.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/MicroApp/App/OpenApiMicroAppAppModifyAppIntroductionV1Request.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/_Legacy/MicroApp/App/OpenApiMicroAppAppModifyAppIntroductionV1Request.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/MicroApp/App/OpenApiMicroAppAppModifyAppNameV1Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/_Legacy/MicroApp/App/OpenApiMicroAppAppModifyAppNameV1Request.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/MicroApp/App/OpenApiMicroAppAppModifyAppNameV1Request.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/_Legacy/MicroApp/App/OpenApiMicroAppAppModifyAppNameV1Request.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/MicroApp/App/OpenApiMicroAppAppModifyServerDomainV1Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/_Legacy/MicroApp/App/OpenApiMicroAppAppModifyServerDomainV1Request.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/MicroApp/App/OpenApiMicroAppAppModifyServerDomainV1Request.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/_Legacy/MicroApp/App/OpenApiMicroAppAppModifyServerDomainV1Request.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/MicroApp/App/OpenApiMicroAppAppModifyServerDomainV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/_Legacy/MicroApp/App/OpenApiMicroAppAppModifyServerDomainV1Response.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/MicroApp/App/OpenApiMicroAppAppModifyServerDomainV1Response.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/_Legacy/MicroApp/App/OpenApiMicroAppAppModifyServerDomainV1Response.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/MicroApp/App/OpenApiMicroAppAppModifyWebviewDomainV1Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/_Legacy/MicroApp/App/OpenApiMicroAppAppModifyWebviewDomainV1Request.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/MicroApp/App/OpenApiMicroAppAppModifyWebviewDomainV1Request.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/_Legacy/MicroApp/App/OpenApiMicroAppAppModifyWebviewDomainV1Request.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/MicroApp/App/OpenApiMicroAppAppModifyWebviewDomainV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/_Legacy/MicroApp/App/OpenApiMicroAppAppModifyWebviewDomainV1Response.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/MicroApp/App/OpenApiMicroAppAppModifyWebviewDomainV1Response.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/_Legacy/MicroApp/App/OpenApiMicroAppAppModifyWebviewDomainV1Response.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/MicroApp/App/OpenApiMicroAppAppQrcodeV1Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/_Legacy/MicroApp/App/OpenApiMicroAppAppQrcodeV1Request.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/MicroApp/App/OpenApiMicroAppAppQrcodeV1Request.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/_Legacy/MicroApp/App/OpenApiMicroAppAppQrcodeV1Request.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/MicroApp/App/OpenApiMicroAppAppQualityRatingV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/_Legacy/MicroApp/App/OpenApiMicroAppAppQualityRatingV1Response.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/MicroApp/App/OpenApiMicroAppAppQualityRatingV1Response.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/_Legacy/MicroApp/App/OpenApiMicroAppAppQualityRatingV1Response.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/MicroApp/OpenApiMicroAppCode2SessionV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/_Legacy/MicroApp/OpenApiMicroAppCode2SessionV1Response.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/MicroApp/OpenApiMicroAppCode2SessionV1Response.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/_Legacy/MicroApp/OpenApiMicroAppCode2SessionV1Response.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/MicroApp/OpenApiMicroAppUploadMaterialV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/_Legacy/MicroApp/OpenApiMicroAppUploadMaterialV1Response.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/MicroApp/OpenApiMicroAppUploadMaterialV1Response.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/_Legacy/MicroApp/OpenApiMicroAppUploadMaterialV1Response.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/MicroApp/Operation/Application/OpenApiMicroAppOperationLiveApplicationStatusV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/_Legacy/MicroApp/Operation/Application/OpenApiMicroAppOperationLiveApplicationStatusV1Response.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/MicroApp/Operation/Application/OpenApiMicroAppOperationLiveApplicationStatusV1Response.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/_Legacy/MicroApp/Operation/Application/OpenApiMicroAppOperationLiveApplicationStatusV1Response.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/MicroApp/Operation/Application/OpenApiMicroAppOperationLiveApplicationV1Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/_Legacy/MicroApp/Operation/Application/OpenApiMicroAppOperationLiveApplicationV1Request.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/MicroApp/Operation/Application/OpenApiMicroAppOperationLiveApplicationV1Request.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/_Legacy/MicroApp/Operation/Application/OpenApiMicroAppOperationLiveApplicationV1Request.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/MicroApp/Operation/Application/OpenApiMicroAppOperationPhoneNumberApplicationStatusV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/_Legacy/MicroApp/Operation/Application/OpenApiMicroAppOperationPhoneNumberApplicationStatusV1Response.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/MicroApp/Operation/Application/OpenApiMicroAppOperationPhoneNumberApplicationStatusV1Response.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/_Legacy/MicroApp/Operation/Application/OpenApiMicroAppOperationPhoneNumberApplicationStatusV1Response.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/MicroApp/Operation/Application/OpenApiMicroAppOperationPhoneNumberApplicationV1Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/_Legacy/MicroApp/Operation/Application/OpenApiMicroAppOperationPhoneNumberApplicationV1Request.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/MicroApp/Operation/Application/OpenApiMicroAppOperationPhoneNumberApplicationV1Request.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/_Legacy/MicroApp/Operation/Application/OpenApiMicroAppOperationPhoneNumberApplicationV1Request.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/MicroApp/Operation/Application/OpenApiMicroAppOperationVideoApplicationStatusV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/_Legacy/MicroApp/Operation/Application/OpenApiMicroAppOperationVideoApplicationStatusV1Response.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/MicroApp/Operation/Application/OpenApiMicroAppOperationVideoApplicationStatusV1Response.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/_Legacy/MicroApp/Operation/Application/OpenApiMicroAppOperationVideoApplicationStatusV1Response.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/MicroApp/Operation/Application/OpenApiMicroAppOperationVideoApplicationV1Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/_Legacy/MicroApp/Operation/Application/OpenApiMicroAppOperationVideoApplicationV1Request.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/MicroApp/Operation/Application/OpenApiMicroAppOperationVideoApplicationV1Request.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/_Legacy/MicroApp/Operation/Application/OpenApiMicroAppOperationVideoApplicationV1Request.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/MicroApp/Operation/ShareTemplate/OpenApiMicroAppOperationAddShareTemplateV1Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/_Legacy/MicroApp/Operation/ShareTemplate/OpenApiMicroAppOperationAddShareTemplateV1Request.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/MicroApp/Operation/ShareTemplate/OpenApiMicroAppOperationAddShareTemplateV1Request.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/_Legacy/MicroApp/Operation/ShareTemplate/OpenApiMicroAppOperationAddShareTemplateV1Request.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/MicroApp/Operation/ShareTemplate/OpenApiMicroAppOperationDeleteShareTemplateV1Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/_Legacy/MicroApp/Operation/ShareTemplate/OpenApiMicroAppOperationDeleteShareTemplateV1Request.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/MicroApp/Operation/ShareTemplate/OpenApiMicroAppOperationDeleteShareTemplateV1Request.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/_Legacy/MicroApp/Operation/ShareTemplate/OpenApiMicroAppOperationDeleteShareTemplateV1Request.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/MicroApp/Operation/ShareTemplate/OpenApiMicroAppOperationModifyShareTemplateV1Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/_Legacy/MicroApp/Operation/ShareTemplate/OpenApiMicroAppOperationModifyShareTemplateV1Request.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/MicroApp/Operation/ShareTemplate/OpenApiMicroAppOperationModifyShareTemplateV1Request.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/_Legacy/MicroApp/Operation/ShareTemplate/OpenApiMicroAppOperationModifyShareTemplateV1Request.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/MicroApp/Operation/ShareTemplate/OpenApiMicroAppOperationSetDefaultShareTemplateV1Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/_Legacy/MicroApp/Operation/ShareTemplate/OpenApiMicroAppOperationSetDefaultShareTemplateV1Request.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/MicroApp/Operation/ShareTemplate/OpenApiMicroAppOperationSetDefaultShareTemplateV1Request.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/_Legacy/MicroApp/Operation/ShareTemplate/OpenApiMicroAppOperationSetDefaultShareTemplateV1Request.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/MicroApp/Operation/ShareTemplate/OpenApiMicroAppOperationShareTemplateListV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/_Legacy/MicroApp/Operation/ShareTemplate/OpenApiMicroAppOperationShareTemplateListV1Response.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/MicroApp/Operation/ShareTemplate/OpenApiMicroAppOperationShareTemplateListV1Response.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/_Legacy/MicroApp/Operation/ShareTemplate/OpenApiMicroAppOperationShareTemplateListV1Response.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/MicroApp/Operation/ShopMaterial/OpenApiMicroAppOperationAddShopMaterialV1Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/_Legacy/MicroApp/Operation/ShopMaterial/OpenApiMicroAppOperationAddShopMaterialV1Request.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/MicroApp/Operation/ShopMaterial/OpenApiMicroAppOperationAddShopMaterialV1Request.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/_Legacy/MicroApp/Operation/ShopMaterial/OpenApiMicroAppOperationAddShopMaterialV1Request.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/MicroApp/Operation/ShopMaterial/OpenApiMicroAppOperationQueryShopMaterialV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/_Legacy/MicroApp/Operation/ShopMaterial/OpenApiMicroAppOperationQueryShopMaterialV1Response.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/MicroApp/Operation/ShopMaterial/OpenApiMicroAppOperationQueryShopMaterialV1Response.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/_Legacy/MicroApp/Operation/ShopMaterial/OpenApiMicroAppOperationQueryShopMaterialV1Response.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/MicroApp/Package/OpenApiMicroAppPackageAuditHostsV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/_Legacy/MicroApp/Package/OpenApiMicroAppPackageAuditHostsV1Response.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/MicroApp/Package/OpenApiMicroAppPackageAuditHostsV1Response.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/_Legacy/MicroApp/Package/OpenApiMicroAppPackageAuditHostsV1Response.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/MicroApp/Package/OpenApiMicroAppPackageAuditV2Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/_Legacy/MicroApp/Package/OpenApiMicroAppPackageAuditV2Request.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/MicroApp/Package/OpenApiMicroAppPackageAuditV2Request.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/_Legacy/MicroApp/Package/OpenApiMicroAppPackageAuditV2Request.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/MicroApp/Package/OpenApiMicroAppPackageUploadV1Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/_Legacy/MicroApp/Package/OpenApiMicroAppPackageUploadV1Request.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/MicroApp/Package/OpenApiMicroAppPackageUploadV1Request.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/_Legacy/MicroApp/Package/OpenApiMicroAppPackageUploadV1Request.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/MicroApp/Package/OpenApiMicroAppPackageVersionsV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/_Legacy/MicroApp/Package/OpenApiMicroAppPackageVersionsV1Response.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/MicroApp/Package/OpenApiMicroAppPackageVersionsV1Response.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/_Legacy/MicroApp/Package/OpenApiMicroAppPackageVersionsV1Response.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/Settle/OpenApiSettleApplyV1Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/_Legacy/Settle/OpenApiSettleApplyV1Request.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/Settle/OpenApiSettleApplyV1Request.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/_Legacy/Settle/OpenApiSettleApplyV1Request.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/Settle/OpenApiSettleApplyV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/_Legacy/Settle/OpenApiSettleApplyV1Response.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/Settle/OpenApiSettleApplyV1Response.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/_Legacy/Settle/OpenApiSettleApplyV1Response.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/Settle/OpenApiSettleGetApplyStatusV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/_Legacy/Settle/OpenApiSettleGetApplyStatusV1Response.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/Settle/OpenApiSettleGetApplyStatusV1Response.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/_Legacy/Settle/OpenApiSettleGetApplyStatusV1Response.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/Settle/OpenApiSettlePreCheckV1Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/_Legacy/Settle/OpenApiSettlePreCheckV1Request.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/Settle/OpenApiSettlePreCheckV1Request.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/_Legacy/Settle/OpenApiSettlePreCheckV1Request.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/ThirdParty/OpenApiThirdPartyAuthAppListV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/_Legacy/ThirdParty/OpenApiThirdPartyAuthAppListV1Response.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/ThirdParty/OpenApiThirdPartyAuthAppListV1Response.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/_Legacy/ThirdParty/OpenApiThirdPartyAuthAppListV1Response.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/ThirdParty/OpenApiThirdPartyUploadPictureMaterialV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/_Legacy/ThirdParty/OpenApiThirdPartyUploadPictureMaterialV1Response.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/ThirdParty/OpenApiThirdPartyUploadPictureMaterialV1Response.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/_Legacy/ThirdParty/OpenApiThirdPartyUploadPictureMaterialV1Response.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/ThirdParty/POI/OpenApiThirdPartyPOIBaseQueryAMapV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/_Legacy/ThirdParty/POI/OpenApiThirdPartyPOIBaseQueryAMapV1Response.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/ThirdParty/POI/OpenApiThirdPartyPOIBaseQueryAMapV1Response.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/_Legacy/ThirdParty/POI/OpenApiThirdPartyPOIBaseQueryAMapV1Response.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/ThirdParty/POI/OpenApiThirdPartyPOISupplierMatchV1Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/_Legacy/ThirdParty/POI/OpenApiThirdPartyPOISupplierMatchV1Request.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/ThirdParty/POI/OpenApiThirdPartyPOISupplierMatchV1Request.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/_Legacy/ThirdParty/POI/OpenApiThirdPartyPOISupplierMatchV1Request.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/ThirdParty/POI/OpenApiThirdPartyPOISupplierMatchV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/_Legacy/ThirdParty/POI/OpenApiThirdPartyPOISupplierMatchV1Response.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/ThirdParty/POI/OpenApiThirdPartyPOISupplierMatchV1Response.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/_Legacy/ThirdParty/POI/OpenApiThirdPartyPOISupplierMatchV1Response.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/ThirdParty/POI/OpenApiThirdPartyPOISupplierQueryMatchTaskV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/_Legacy/ThirdParty/POI/OpenApiThirdPartyPOISupplierQueryMatchTaskV1Response.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/ThirdParty/POI/OpenApiThirdPartyPOISupplierQueryMatchTaskV1Response.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/_Legacy/ThirdParty/POI/OpenApiThirdPartyPOISupplierQueryMatchTaskV1Response.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/ThirdParty/POI/OpenApiThirdPartyPOISupplierQueryMatchV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/_Legacy/ThirdParty/POI/OpenApiThirdPartyPOISupplierQueryMatchV1Response.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/ThirdParty/POI/OpenApiThirdPartyPOISupplierQueryMatchV1Response.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/_Legacy/ThirdParty/POI/OpenApiThirdPartyPOISupplierQueryMatchV1Response.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/ThirdParty/POI/OpenApiThirdPartyPOISupplierQueryV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/_Legacy/ThirdParty/POI/OpenApiThirdPartyPOISupplierQueryV1Response.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/ThirdParty/POI/OpenApiThirdPartyPOISupplierQueryV1Response.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/_Legacy/ThirdParty/POI/OpenApiThirdPartyPOISupplierQueryV1Response.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/ThirdParty/POI/OpenApiThirdPartyPOISupplierSyncV1Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/_Legacy/ThirdParty/POI/OpenApiThirdPartyPOISupplierSyncV1Request.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/ThirdParty/POI/OpenApiThirdPartyPOISupplierSyncV1Request.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/_Legacy/ThirdParty/POI/OpenApiThirdPartyPOISupplierSyncV1Request.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/ThirdParty/Template/OpenApiThirdPartyTemplateAddTemplateV1Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/_Legacy/ThirdParty/Template/OpenApiThirdPartyTemplateAddTemplateV1Request.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/ThirdParty/Template/OpenApiThirdPartyTemplateAddTemplateV1Request.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/_Legacy/ThirdParty/Template/OpenApiThirdPartyTemplateAddTemplateV1Request.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/ThirdParty/Template/OpenApiThirdPartyTemplateDeleteTemplateV1Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/_Legacy/ThirdParty/Template/OpenApiThirdPartyTemplateDeleteTemplateV1Request.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/ThirdParty/Template/OpenApiThirdPartyTemplateDeleteTemplateV1Request.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/_Legacy/ThirdParty/Template/OpenApiThirdPartyTemplateDeleteTemplateV1Request.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/ThirdParty/Template/OpenApiThirdPartyTemplateGetTemplateAppListV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/_Legacy/ThirdParty/Template/OpenApiThirdPartyTemplateGetTemplateAppListV1Response.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/ThirdParty/Template/OpenApiThirdPartyTemplateGetTemplateAppListV1Response.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/_Legacy/ThirdParty/Template/OpenApiThirdPartyTemplateGetTemplateAppListV1Response.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/ThirdParty/Template/OpenApiThirdPartyTemplateGetTemplateListV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/_Legacy/ThirdParty/Template/OpenApiThirdPartyTemplateGetTemplateListV1Response.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/ThirdParty/Template/OpenApiThirdPartyTemplateGetTemplateListV1Response.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/OpenApi/_Legacy/ThirdParty/Template/OpenApiThirdPartyTemplateGetTemplateListV1Response.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/Callback/ProductApiSyncCallbackUrlRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/Callback/ProductSyncCallbackUrlRequest.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/Callback/ProductApiSyncCallbackUrlRequest.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/Callback/ProductSyncCallbackUrlRequest.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/Callback/ProductApiSyncCallbackUrlResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/Callback/ProductSyncCallbackUrlResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/Callback/ProductApiSyncCallbackUrlResponse.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/Callback/ProductSyncCallbackUrlResponse.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/Product/ProductAddRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/Product/ProductAddRequest.json new file mode 100644 index 00000000..1d5a0de7 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/Product/ProductAddRequest.json @@ -0,0 +1,65 @@ +{ + "access_token": "0801121846756b44471029384758795958537a647053646f773d3d", + "product_type": 1, + "product": { + "common_product_params": { + "appid": "tt11fd1220e13bba1234", + "first_class": 10000, + "second_class": 10100, + "title": "python入门教程", + "purchase_precaution": "小程序内购买课程为课程兑换权益,购买成功后将自动兑换到您的账户内,可在****中重复学习观看", + "product_fulfillment_lst": [ + { + "fulfillment_content": { + "fulfillment_uri": "product/resource/1001d044d41140d53ce9e57d793a4321", + "name": "第一节: python介绍" + }, + "fulfillment_type": 3 + } + ], + "industry_type": 1, + "price_info": { + "unit": "节", + "price": 5000, + "real_price": 4900 + }, + "path_info_lst": [ + { + "path": "page/index/index", + "query": { + "course_id": "29384759" + } + } + ], + "product_detail_lst": [ + { + "rich_text": { + "text": "1. python安装步骤" + } + } + ], + "anchor_info": { + "video_anchor_info": { + "anchor_title": "python入门教程" + } + }, + "product_img_uri": "tos-cn-i-b2i6zad4el/b0e72a2e9c5ee919c65a9b0276315cf9" + }, + "course_params": { + "teacher_id": "T7283947392973", + "institution_id": "I1039473947393", + "course_num": 637, + "refund_label": { + "type": 1, + "day_before_use_info": { + "day": 7 + } + }, + "use_label": { + "valid_date": "2022-12-01" + }, + "start_timestamp": 1649662751000, + "end_timestamp": 1681198751000 + } + } +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/ProductApiAddResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/Product/ProductAddResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/ProductApiAddResponse.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/Product/ProductAddResponse.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/ProductApiModifyNoAuditRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/Product/ProductModifyNoAuditRequest.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/ProductApiModifyNoAuditRequest.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/Product/ProductModifyNoAuditRequest.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/ProductApiModifyNoAuditResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/Product/ProductModifyNoAuditResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/ProductApiModifyNoAuditResponse.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/Product/ProductModifyNoAuditResponse.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/Product/ProductModifyRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/Product/ProductModifyRequest.json new file mode 100644 index 00000000..c2f2ec08 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/Product/ProductModifyRequest.json @@ -0,0 +1,66 @@ +{ + "access_token": "0801121846756b44471029384758795958537a647053646f773d3d", + "product_type": 1, + "product_id": 6543216888019123456, + "product": { + "common_product_params": { + "appid": "tt11fd1220e13bba1234", + "first_class": 10000, + "second_class": 10100, + "title": "python入门教程", + "purchase_precaution": "小程序内购买课程为课程兑换权益,购买成功后将自动兑换到您的账户内,可在****中重复学习观看", + "product_fulfillment_lst": [ + { + "fulfillment_content": { + "fulfillment_uri": "product/resource/1001d044d41140d53ce9e57d793a4321", + "name": "第一节: python介绍" + }, + "fulfillment_type": 3 + } + ], + "industry_type": 1, + "price_info": { + "unit": "节", + "price": 5000, + "real_price": 4900 + }, + "path_info_lst": [ + { + "path": "page/index/index", + "query": { + "course_id": "29384759" + } + } + ], + "product_detail_lst": [ + { + "rich_text": { + "text": "1. python安装步骤" + } + } + ], + "anchor_info": { + "video_anchor_info": { + "anchor_title": "python入门教程" + } + }, + "product_img_uri": "tos-cn-i-b2i6zad4el/b0e72a2e9c5ee919c65a9b0276315cf9" + }, + "course_params": { + "teacher_id": "T7283947392973", + "institution_id": "I1039473947393", + "course_num": 637, + "refund_label": { + "type": 1, + "day_before_use_info": { + "day": 7 + } + }, + "use_label": { + "valid_date": "2022-12-01" + }, + "start_timestamp": 1649662751000, + "end_timestamp": 1681198751000 + } + } +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/ProductApiModifyResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/Product/ProductModifyResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/ProductApiModifyResponse.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/Product/ProductModifyResponse.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/ProductApiModifyStatusRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/Product/ProductModifyStatusRequest.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/ProductApiModifyStatusRequest.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/Product/ProductModifyStatusRequest.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/ProductApiModifyStatusResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/Product/ProductModifyStatusResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/ProductApiModifyStatusResponse.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/Product/ProductModifyStatusResponse.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/ProductApiQueryClassInfoRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/Product/ProductQueryClassInfoRequest.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/ProductApiQueryClassInfoRequest.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/Product/ProductQueryClassInfoRequest.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/ProductApiQueryClassInfoResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/Product/ProductQueryClassInfoResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/ProductApiQueryClassInfoResponse.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/Product/ProductQueryClassInfoResponse.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/ProductApiQueryRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/Product/ProductQueryRequest.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/ProductApiQueryRequest.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/Product/ProductQueryRequest.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/ProductApiQueryResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/Product/ProductQueryResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/ProductApiQueryResponse.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/Product/ProductQueryResponse.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/ProductApiQueryReviewRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/Product/ProductQueryReviewRequest.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/ProductApiQueryReviewRequest.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/Product/ProductQueryReviewRequest.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/ProductApiQueryReviewResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/Product/ProductQueryReviewResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/ProductApiQueryReviewResponse.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/Product/ProductQueryReviewResponse.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/ProductApiQueryTemplateInfoRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/Product/ProductQueryTemplateInfoRequest.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/ProductApiQueryTemplateInfoRequest.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/Product/ProductQueryTemplateInfoRequest.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/ProductApiQueryTemplateInfoResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/Product/ProductQueryTemplateInfoResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/ProductApiQueryTemplateInfoResponse.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/Product/ProductQueryTemplateInfoResponse.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/ProductApiAddRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/ProductApiAddRequest.json deleted file mode 100644 index 58cfe17a..00000000 --- a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/ProductApiAddRequest.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "access_token": "123456184673546750597970442b6b73674775447154502f69413d3d", - "product_type": 1, - "product": { - "common_product_params": { - "appid": "tt11fd1220e13bba1234", - "first_class": 10000, - "second_class": 10100, - "title": "python入门教程", - "qualification_uris": ["product/resource/abc.png"], - "purchase_precaution": "购课成功后如何...", - "product_fulfillment_lst": [ - { - "fulfillment_content": { - "fulfillment_uri": "product/resource/abc.png", - "text": "", - "name": "课程1" - }, - "fulfillment_type": 3 - } - ], - "industry_type": 1, - "price_info": { - "unit": "天", - "price": 5000, - "real_price": 4900 - }, - "path_info_lst": [ - { - "path": "page/index/index", - "query": { - "a": "1", - "b": "2" - } - } - ], - "product_detail_lst": [ - { - "text": "该节课程主要...", - "img_uri": "product/resource/abc.png" - } - ], - "anchor_info": { - "video_anchor_info": { - "anchor_title": "视频锚点标题" - } - } - }, - "course_params": { - "teacher_id": "T7283947392973", - "institution_id": "I1039473947393", - "course_num": 637, - "refund_label": { - "type": 1, - "day_before_use_info": { - "day": 7 - } - }, - "use_label": { - "valid_date": "2022-12-01" - }, - "start_timestamp": 1649662751000, - "end_timestamp": 1681198751000 - } - } -} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/ProductApiModifyRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/ProductApiModifyRequest.json deleted file mode 100644 index 122c98bc..00000000 --- a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/ProductApiModifyRequest.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "access_token": "123456184673546a33314e764a6c3844557a432b6c2b4d6a6e543210", - "product_type": 1, - "product_id": 7654321888019123456, - "product": { - "common_product_params": { - "appid": "tt77fd0140e89bba1234", - "first_class": 10000, - "second_class": 10100, - "title": "python入门教程", - "qualification_uris": ["product/resource/abc.png"], - "purchase_precaution": "购课成功后如何...", - "product_fulfillment_lst": [ - { - "fulfillment_content": { - "fulfillment_uri": "product/resource/abc.png", - "text": "", - "name": "课程1" - }, - "fulfillment_type": 3 - } - ], - "industry_type": 1, - "price_info": { - "unit": "天", - "price": 5000, - "real_price": 4900 - }, - "path_info_lst": [ - { - "path": "page/index/index", - "query": { - "a": "1", - "b": "2" - } - } - ], - "product_detail_lst": [ - { - "text": "该节课程主要...", - "img_uri": "product/resource/abc.png" - } - ], - "anchor_info": { - "video_anchor_info": { - "anchor_title": "视频锚点标题" - } - } - }, - "course_params": { - "teacher_id": "T7283947392973", - "institution_id": "I1039473947393", - "course_num": 637, - "refund_label": { - "type": 1, - "day_before_use_info": { - "day": 7 - } - }, - "use_label": { - "valid_date": "2022-12-01" - }, - "start_timestamp": 1649662751000, - "end_timestamp": 1681198751000 - } - } -} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/Qualification/ProductApiAddQualificationRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/Qualification/ProductAddQualificationRequest.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/Qualification/ProductApiAddQualificationRequest.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/Qualification/ProductAddQualificationRequest.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/Qualification/ProductApiAddQualificationResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/Qualification/ProductAddQualificationResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/Qualification/ProductApiAddQualificationResponse.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/Qualification/ProductAddQualificationResponse.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/Qualification/ProductApiModifyQualificationRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/Qualification/ProductModifyQualificationRequest.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/Qualification/ProductApiModifyQualificationRequest.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/Qualification/ProductModifyQualificationRequest.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/Qualification/ProductApiModifyQualificationResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/Qualification/ProductModifyQualificationResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/Qualification/ProductApiModifyQualificationResponse.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/Qualification/ProductModifyQualificationResponse.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/Qualification/ProductApiQueryQualificationRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/Qualification/ProductQueryQualificationRequest.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/Qualification/ProductApiQueryQualificationRequest.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/Qualification/ProductQueryQualificationRequest.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/Qualification/ProductApiQueryQualificationResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/Qualification/ProductQueryQualificationResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/Qualification/ProductApiQueryQualificationResponse.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/Qualification/ProductQueryQualificationResponse.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/RefundRule/ProductApiModifyRefundRuleRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/RefundRule/ProductModifyRefundRuleRequest.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/RefundRule/ProductApiModifyRefundRuleRequest.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/RefundRule/ProductModifyRefundRuleRequest.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/RefundRule/ProductApiQueryRefundRuleMetaRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/RefundRule/ProductQueryRefundRuleMetaRequest.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/RefundRule/ProductApiQueryRefundRuleMetaRequest.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/RefundRule/ProductQueryRefundRuleMetaRequest.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/RefundRule/ProductApiQueryRefundRuleMetaResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/RefundRule/ProductQueryRefundRuleMetaResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/RefundRule/ProductApiQueryRefundRuleMetaResponse.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/RefundRule/ProductQueryRefundRuleMetaResponse.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/Resource/ProductApiQueryResourceStatusRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/Resource/ProductQueryResourceStatusRequest.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/Resource/ProductApiQueryResourceStatusRequest.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/Resource/ProductQueryResourceStatusRequest.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/Resource/ProductApiQueryResourceStatusResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/Resource/ProductQueryResourceStatusResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/Resource/ProductApiQueryResourceStatusResponse.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/Resource/ProductQueryResourceStatusResponse.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/Resource/ProductApiUploadResourceRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/Resource/ProductUploadResourceRequest.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/Resource/ProductApiUploadResourceRequest.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/Resource/ProductUploadResourceRequest.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/Resource/ProductApiUploadResourceResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/Resource/ProductUploadResourceResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/Resource/ProductApiUploadResourceResponse.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/ProductApi/Resource/ProductUploadResourceResponse.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/RoleApi/AuthEntityEnableMountScopeRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/RoleApi/Bind/AuthEntityEnableMountScopeRequest.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/RoleApi/AuthEntityEnableMountScopeRequest.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/RoleApi/Bind/AuthEntityEnableMountScopeRequest.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/RoleApi/Bind/AuthEntityQueryBindToCListRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/RoleApi/Bind/AuthEntityQueryBindToCListRequest.json new file mode 100644 index 00000000..b9a52084 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/RoleApi/Bind/AuthEntityQueryBindToCListRequest.json @@ -0,0 +1,7 @@ +{ + "appid": "tta12xxxxxcbe01", + "access_token": "080yyyyyyy35494e6241xxxx", + "merchant_entity_id": "E_717870xxxxxxxxxxxxx", + "industry_code": 10000, + "industry_role": 1 +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/RoleApi/Bind/AuthEntityQueryBindToCListResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/RoleApi/Bind/AuthEntityQueryBindToCListResponse.json new file mode 100644 index 00000000..a7620530 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/RoleApi/Bind/AuthEntityQueryBindToCListResponse.json @@ -0,0 +1,10 @@ +{ + "err": { + "err_code": 0, + "err_msg": "" + }, + "aweme_id_list": [ + "xxxxxxxx", + "xxxxxxxx" + ] +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/RoleApi/Bind/AuthEntityQueryMountScopeRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/RoleApi/Bind/AuthEntityQueryMountScopeRequest.json new file mode 100644 index 00000000..24c6a1b0 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/RoleApi/Bind/AuthEntityQueryMountScopeRequest.json @@ -0,0 +1,8 @@ +{ + "appid": "tta12xxxxxcbe01", + "access_token": "080yyyyyyy35494e62413d3d", + "openid": "xxxxxx", + "merchant_entity_id": "E_7178703725698269228", + "industry_code": 10000, + "industry_role": 1 +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/RoleApi/Bind/AuthEntityQueryMountScopeResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/RoleApi/Bind/AuthEntityQueryMountScopeResponse.json new file mode 100644 index 00000000..76937a98 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/RoleApi/Bind/AuthEntityQueryMountScopeResponse.json @@ -0,0 +1,11 @@ +{ + "err": { + "err_code": 0, + "err_msg": "" + }, + "scope_list": [ + 1, + 2 + ], + "status": 1 +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/RoleApi/Bind/AuthEntityUnbindAccountRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/RoleApi/Bind/AuthEntityUnbindAccountRequest.json new file mode 100644 index 00000000..e0cbbbe8 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/RoleApi/Bind/AuthEntityUnbindAccountRequest.json @@ -0,0 +1,12 @@ +{ + "appid": "tta12xxxxxcbe01", + "access_token": "080yyyyyyy35494e62413d3d", + "c_user": { + "openid": "xxxxxx", + "client_key": "ttxxxx" + }, + "merchant_entity_id": "E_7178703725698269228", + "partner_entity_id": "", + "industry_code": 10000, + "industry_role": 1 +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/Webcast/Business/WebcastBusinessDiamondOrderAckRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/Webcast/Business/WebcastBusinessDiamondOrderAckRequest.json new file mode 100644 index 00000000..d7561e3e --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/Webcast/Business/WebcastBusinessDiamondOrderAckRequest.json @@ -0,0 +1,6 @@ +{ + "order_id": "xxx", + "open_id": "123", + "diamonds": 5, + "app_id": "ttc41ab2a75b25dbf110" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/Webcast/Business/WebcastBusinessDiamondOrderAckResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/Webcast/Business/WebcastBusinessDiamondOrderAckResponse.json new file mode 100644 index 00000000..5000d448 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/Webcast/Business/WebcastBusinessDiamondOrderAckResponse.json @@ -0,0 +1,3 @@ +{ + "ack_status": 1 +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/Webcast/Business/WebcastBusinessDiamondQueryRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/Webcast/Business/WebcastBusinessDiamondQueryRequest.json new file mode 100644 index 00000000..11586b56 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/Webcast/Business/WebcastBusinessDiamondQueryRequest.json @@ -0,0 +1,4 @@ +{ + "appid": "ttxxx", + "order_id": "xxx" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/Webcast/Business/WebcastBusinessDiamondQueryResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/Webcast/Business/WebcastBusinessDiamondQueryResponse.json new file mode 100644 index 00000000..c7cd6104 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/Webcast/Business/WebcastBusinessDiamondQueryResponse.json @@ -0,0 +1,7 @@ +{ + "order_id": "xxx", + "order_status": 2, + "open_id": "xxx", + "pay_tag": "参与游戏", + "diamonds": 10 +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/Webcast/Business/WebcastBusinessDiamondReconciliationRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/Webcast/Business/WebcastBusinessDiamondReconciliationRequest.json new file mode 100644 index 00000000..22c383cb --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/Webcast/Business/WebcastBusinessDiamondReconciliationRequest.json @@ -0,0 +1,7 @@ +{ + "appid": "ttxxx", + "start_time": "2021-12-24 00:00:00", + "end_time": "2021-12-24 00:00:00", + "limit": 100, + "offset": 1 +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/Webcast/Business/WebcastBusinessDiamondReconciliationResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/Webcast/Business/WebcastBusinessDiamondReconciliationResponse.json new file mode 100644 index 00000000..660d0f27 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/Webcast/Business/WebcastBusinessDiamondReconciliationResponse.json @@ -0,0 +1,14 @@ +{ + "order_list": [ + { + "order_id": "xxx", + "order_status": 2, + "open_id": "xxx", + "pay_tag": "test", + "create_time": "2006-01-02 15:04:05", + "diamonds": 10, + "room_id": "111" + } + ], + "size": 1 +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/Webcast/Business/WebcastBusinessOrderPrecreateRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/Webcast/Business/WebcastBusinessOrderPrecreateRequest.json new file mode 100644 index 00000000..01c3d9f5 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/Webcast/Business/WebcastBusinessOrderPrecreateRequest.json @@ -0,0 +1,9 @@ +{ + "diamonds": 32, + "out_trade_no": "1679021609887617444", + "pay_tag": "1", + "open_id": "123", + "valid_time": 300, + "notify_url": "https://turn.365skins.com/front/pay/dy/notify", + "app_id": "ttc41ab2a75b25dbf110" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/Webcast/Business/WebcastBusinessOrderPrecreateResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/Webcast/Business/WebcastBusinessOrderPrecreateResponse.json new file mode 100644 index 00000000..8affbcde --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/Webcast/Business/WebcastBusinessOrderPrecreateResponse.json @@ -0,0 +1,3 @@ +{ + "order_id": "xxx" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/Webcast/Card/WebcastCardDefaultGetResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/Webcast/Card/WebcastCardDefaultGetResponse.json new file mode 100644 index 00000000..d273f96e --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/Webcast/Card/WebcastCardDefaultGetResponse.json @@ -0,0 +1,14 @@ +{ + "audit_opinion": "", + "card_type": 1, + "status": 2, + "value": { + "btn": { + "btn_type": 100 + }, + "image_id": "123456", + "title": { + "main_title": "商品A" + } + } +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/Webcast/Card/WebcastCardDefaultSetRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/Webcast/Card/WebcastCardDefaultSetRequest.json new file mode 100644 index 00000000..16487306 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/Webcast/Card/WebcastCardDefaultSetRequest.json @@ -0,0 +1,4 @@ +{ + "card_type": 1, + "value": "{\"image_id\":\"123456\",\"title\":{\"main_title\":\"商品A\"}}" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/Webcast/Card/WebcastCardDefaultSetResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/Webcast/Card/WebcastCardDefaultSetResponse.json new file mode 100644 index 00000000..4cd44471 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/Webcast/Card/WebcastCardDefaultSetResponse.json @@ -0,0 +1,4 @@ +{ + "status": 2, + "feedback": "" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/Webcast/Card/WebcastCardDeleteRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/Webcast/Card/WebcastCardDeleteRequest.json new file mode 100644 index 00000000..fddb7fd9 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/Webcast/Card/WebcastCardDeleteRequest.json @@ -0,0 +1,3 @@ +{ + "url": "pages/good/detail?good_id=aaabbb" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/Webcast/Card/WebcastCardDeleteResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/Webcast/Card/WebcastCardDeleteResponse.json new file mode 100644 index 00000000..0160870d --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/Webcast/Card/WebcastCardDeleteResponse.json @@ -0,0 +1,3 @@ +{ + "status": 1 +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/Webcast/Card/WebcastCardGetAllCardsForUserResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/Webcast/Card/WebcastCardGetAllCardsForUserResponse.json new file mode 100644 index 00000000..81e9094a --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/Webcast/Card/WebcastCardGetAllCardsForUserResponse.json @@ -0,0 +1,34 @@ +{ + "card_list": [ + { + "card_type": 1, + "status": 2, + "value": { + "btn": { + "btn_type": 100 + }, + "image_id": "123456", + "title": { + "main_title": "商品A" + } + }, + "user_id": 1234567890, + "url": "page/index/index" + }, + { + "card_type": 1, + "status": 2, + "value": { + "btn": { + "btn_type": 100 + }, + "image_id": "123456", + "title": { + "main_title": "商品A" + } + }, + "user_id": 1234567890, + "url": "page/index/index" + } + ] +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/Webcast/Card/WebcastCardGetRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/Webcast/Card/WebcastCardGetRequest.json new file mode 100644 index 00000000..fddb7fd9 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/Webcast/Card/WebcastCardGetRequest.json @@ -0,0 +1,3 @@ +{ + "url": "pages/good/detail?good_id=aaabbb" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/Webcast/Card/WebcastCardGetResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/Webcast/Card/WebcastCardGetResponse.json new file mode 100644 index 00000000..d273f96e --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/Webcast/Card/WebcastCardGetResponse.json @@ -0,0 +1,14 @@ +{ + "audit_opinion": "", + "card_type": 1, + "status": 2, + "value": { + "btn": { + "btn_type": 100 + }, + "image_id": "123456", + "title": { + "main_title": "商品A" + } + } +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/Webcast/Card/WebcastCardSetRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/Webcast/Card/WebcastCardSetRequest.json new file mode 100644 index 00000000..e35fd42d --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/Webcast/Card/WebcastCardSetRequest.json @@ -0,0 +1,5 @@ +{ + "url": "pages/good/detail?good_id=aaabbb", + "card_type": 1, + "value": "{\"image_id\":\"123456\",\"title\":{\"main_title\":\"商品A\"}}" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/Webcast/Card/WebcastCardSetResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/Webcast/Card/WebcastCardSetResponse.json new file mode 100644 index 00000000..84a5f65d --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/Webcast/Card/WebcastCardSetResponse.json @@ -0,0 +1,6 @@ +{ + "errcode": -1, + "errmsg": "system error", + "status": 2, + "feedback": "" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/Webcast/Card/WebcastCardUpdateRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/Webcast/Card/WebcastCardUpdateRequest.json new file mode 100644 index 00000000..495270a4 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/Webcast/Card/WebcastCardUpdateRequest.json @@ -0,0 +1,5 @@ +{ + "room_id": "123321", + "card_type": 1, + "value": "{\"btn\":{\"price\":\"100\"}}" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/Webcast/Card/WebcastCardUpdateResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/Webcast/Card/WebcastCardUpdateResponse.json new file mode 100644 index 00000000..b26ec85f --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/Webcast/Card/WebcastCardUpdateResponse.json @@ -0,0 +1,4 @@ +{ + "status": 1, + "feedback": "" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/Webcast/File/WebcastFileCardImageGetRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/Webcast/File/WebcastFileCardImageGetRequest.json new file mode 100644 index 00000000..ff5d5611 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/Webcast/File/WebcastFileCardImageGetRequest.json @@ -0,0 +1,3 @@ +{ + "image_ids": "[\"123456\",\"654321\"]" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/Webcast/File/WebcastFileCardImageGetResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/Webcast/File/WebcastFileCardImageGetResponse.json new file mode 100644 index 00000000..2c6c63cb --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/Webcast/File/WebcastFileCardImageGetResponse.json @@ -0,0 +1,14 @@ +{ + "images_status": [ + { + "image_id": "123456", + "image_status": 3, + "audit_opinion": "" + }, + { + "image_id": "654321", + "image_status": 4, + "audit_opinion": "fail: high risk social event." + } + ] +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/Webcast/File/WebcastFileCardImageUploadResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/Webcast/File/WebcastFileCardImageUploadResponse.json new file mode 100644 index 00000000..04fbcb53 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/Webcast/File/WebcastFileCardImageUploadResponse.json @@ -0,0 +1,5 @@ +{ + "errcode": -1, + "errmsg": "system error", + "status": 1 +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Webcast/Gift/WebcastGiftTopGiftRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/Webcast/Gift/WebcastGiftTopGiftRequest.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Webcast/Gift/WebcastGiftTopGiftRequest.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/Webcast/Gift/WebcastGiftTopGiftRequest.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Webcast/Gift/WebcastGiftTopGiftResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/Webcast/Gift/WebcastGiftTopGiftResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Webcast/Gift/WebcastGiftTopGiftResponse.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/Webcast/Gift/WebcastGiftTopGiftResponse.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Webcast/LinkMic/WebcastLinkMicQueryRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/Webcast/LinkMic/WebcastLinkMicQueryRequest.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Webcast/LinkMic/WebcastLinkMicQueryRequest.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/Webcast/LinkMic/WebcastLinkMicQueryRequest.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Webcast/LinkMic/WebcastLinkMicQueryResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/Webcast/LinkMic/WebcastLinkMicQueryResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Webcast/LinkMic/WebcastLinkMicQueryResponse.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/Webcast/LinkMic/WebcastLinkMicQueryResponse.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Webcast/LiveData/WebcastLiveDataTaskFailDataGetResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/Webcast/LiveData/WebcastLiveDataTaskFailDataGetResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Webcast/LiveData/WebcastLiveDataTaskFailDataGetResponse.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/Webcast/LiveData/WebcastLiveDataTaskFailDataGetResponse.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Webcast/LiveData/WebcastLiveDataTaskGetResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/Webcast/LiveData/WebcastLiveDataTaskGetResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Webcast/LiveData/WebcastLiveDataTaskGetResponse.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/Webcast/LiveData/WebcastLiveDataTaskGetResponse.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Webcast/LiveData/WebcastLiveDataTaskStartRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/Webcast/LiveData/WebcastLiveDataTaskStartRequest.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Webcast/LiveData/WebcastLiveDataTaskStartRequest.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/Webcast/LiveData/WebcastLiveDataTaskStartRequest.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Webcast/LiveData/WebcastLiveDataTaskStartResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/Webcast/LiveData/WebcastLiveDataTaskStartResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Webcast/LiveData/WebcastLiveDataTaskStartResponse.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/Webcast/LiveData/WebcastLiveDataTaskStartResponse.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Webcast/LiveData/WebcastLiveDataTaskStopRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/Webcast/LiveData/WebcastLiveDataTaskStopRequest.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Webcast/LiveData/WebcastLiveDataTaskStopRequest.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/Webcast/LiveData/WebcastLiveDataTaskStopRequest.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/Webcast/Quiz/WebcastQuizGetResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/Webcast/Quiz/WebcastQuizGetResponse.json new file mode 100644 index 00000000..a3639df0 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/Webcast/Quiz/WebcastQuizGetResponse.json @@ -0,0 +1,28 @@ +{ + "data": { + "list": [ + { + "title": "题目1", + "options": [ + "选项1", + "选项2", + "选项3", + "选项4" + ], + "answer": 1, + "id": "EYDnokrgyVeOeFa" + }, + { + "title": "题目2", + "options": [ + "选项1", + "选项2", + "选项3", + "选项4" + ], + "answer": 4, + "id": "TlL6LwvWapkoBMv" + } + ] + } +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/UrlLink/AppsUrlLinkGenerateRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/UrlLink/AppsUrlLinkGenerateRequest.json deleted file mode 100644 index 6da5a1fc..00000000 --- a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/UrlLink/AppsUrlLinkGenerateRequest.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "access_token": "0801121***********", - "app_name": "douyin", - "path": "xxxx", - "query": "{xxx:xxxx}", - "expire_time": 1644464021 -} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/UrlLink/AppsUrlLinkGenerateResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/UrlLink/AppsUrlLinkGenerateResponse.json deleted file mode 100644 index a1ae946e..00000000 --- a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/UrlLink/AppsUrlLinkGenerateResponse.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "err_no": 0, - "err_tips": "", - "url_link": "https://z.douyin.com/Lu86lrX" -} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/UrlLink/AppsUrlLinkQueryInfoRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/UrlLink/AppsUrlLinkQueryInfoRequest.json deleted file mode 100644 index 85febaff..00000000 --- a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/UrlLink/AppsUrlLinkQueryInfoRequest.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "access_token": "0801121***********", - "url_link": "https://z.douyin.com/Lu86lrX" -} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/UrlLink/AppsUrlLinkQueryInfoResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/UrlLink/AppsUrlLinkQueryInfoResponse.json deleted file mode 100644 index 2c230ed5..00000000 --- a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/UrlLink/AppsUrlLinkQueryInfoResponse.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "err_no": 0, - "err_tips": "", - "url_link_info": { - "app_name": "douyin", - "ma_app_id": "tt6f31198cf00b5xxx", - "path": "xxxx", - "query": "xxxx", - "create_time": 1644463984, - "expire_time": 1644464021 - } -} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/UrlLink/AppsUrlLinkQueryQuotaRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/UrlLink/AppsUrlLinkQueryQuotaRequest.json deleted file mode 100644 index e02b0c1d..00000000 --- a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/UrlLink/AppsUrlLinkQueryQuotaRequest.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "access_token": "0801121***********", - "ma_app_id": "tt******" -} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/UrlLink/AppsUrlLinkQueryQuotaResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/UrlLink/AppsUrlLinkQueryQuotaResponse.json deleted file mode 100644 index abee0954..00000000 --- a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/UrlLink/AppsUrlLinkQueryQuotaResponse.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "err_no": 0, - "err_tips": "", - "url_link_quota": { - "url_link_used": 1128, - "url_link_limit": 1000000 - } -} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsAdPlacement/AppsAdPlacementAddV1Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsAdPlacement/AppsAdPlacementAddV1Request.json new file mode 100644 index 00000000..4129553e --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsAdPlacement/AppsAdPlacementAddV1Request.json @@ -0,0 +1,4 @@ +{ + "ad_placement_name": "1231111", + "ad_placement_type": 1 +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsAdPlacement/AppsAdPlacementQueryV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsAdPlacement/AppsAdPlacementQueryV1Response.json new file mode 100644 index 00000000..b1d368f5 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsAdPlacement/AppsAdPlacementQueryV1Response.json @@ -0,0 +1,15 @@ +{ + "data": { + "ad_placement_list": [ + { + "ad_placement_name": "测试广告位", + "ad_placement_type": 1, + "status": 1, + "ad_placement_id": "bqsc0s8pdcnsru9n6x" + } + ] + }, + "err_msg": "", + "err_no": 0, + "log_id": "202402291430081C2C03B70D11918211B2" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsAdPlacement/AppsAdPlacementUpdateV1Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsAdPlacement/AppsAdPlacementUpdateV1Request.json new file mode 100644 index 00000000..573ed81d --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsAdPlacement/AppsAdPlacementUpdateV1Request.json @@ -0,0 +1,4 @@ +{ + "ad_placement_id": "19da35eg77hf14fk53", + "status": 1 +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsCapacity/AwemeBind/AppsCapacityBindAwemeRelationV1Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsCapacity/AwemeBind/AppsCapacityBindAwemeRelationV1Request.json new file mode 100644 index 00000000..232b4621 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsCapacity/AwemeBind/AppsCapacityBindAwemeRelationV1Request.json @@ -0,0 +1,38 @@ +{ + "employee_info": { + "relation_expire_date": 6182115480795152177, + "qualification_type": "person", + "qualification_image_list": [ "dpNbt49OYK" ], + "real_name": "小平", + "identity_number": "L0UIPirJC6", + "contract_image": "5JnTdW3CbR" + }, + "audit_template_info": { + "QL7rwwSNXh": { + "id": 1039495565162895323, + "title": "kgPbI4sbLW", + "template_content": [ + { + "name": "tuTda7yMta", + "val_type": 1, + "val_list": [ "jgrKT12ETJ" ], + "materiel_id": "1bybqEM0z8" + } + ] + } + }, + "type": "brand", + "aweme_id": "6ZycG4oL6Y", + "capacity_list": [ "video_self_mount" ], + "co_subject": false, + "cooperation_info": { + "company_name": "XX", + "business_license_code": "123456789", + "real_name": "小平公司", + "identity_number": "olDBxsnBCj", + "contract_image": "NdZ7QFpcxH", + "contract_image_list": [ "5xSm9WVDVK" ], + "relation_expire_date": 4404854813175490268, + "cooperation_type": "enterprise" + } +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsCapacity/AwemeBind/AppsCapacityGetAwemeBindTemplateInfoV1Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsCapacity/AwemeBind/AppsCapacityGetAwemeBindTemplateInfoV1Request.json new file mode 100644 index 00000000..f6604ffb --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsCapacity/AwemeBind/AppsCapacityGetAwemeBindTemplateInfoV1Request.json @@ -0,0 +1,5 @@ +{ + "template_id": [ 5667519697104896555 ], + "aweme_id": "JgrAdx3Cyz", + "type": "brand" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsCapacity/AwemeBind/AppsCapacityGetAwemeBindTemplateInfoV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsCapacity/AwemeBind/AppsCapacityGetAwemeBindTemplateInfoV1Response.json new file mode 100644 index 00000000..1b02c056 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsCapacity/AwemeBind/AppsCapacityGetAwemeBindTemplateInfoV1Response.json @@ -0,0 +1,29 @@ +{ + "data": { + "template_info": { + "6041162202928716253": { + "desc": "DIDqJjFvGx", + "template_content": [ + { + "val_type": 1, + "val_example": [ + "RaTwasYa1b" + ], + "val_list": [ + "uT4WWuuaFd" + ], + "reject_reason": "izsMDIOhX3", + "materiel_id": "Q7e3SCjtI9", + "name": "LYkZEA04ky", + "desc": "yquRd56nKk" + } + ], + "id": 6766976192048133000, + "title": "OW5u7J20Xi" + } + } + }, + "err_no": 1245, + "err_msg": "k8Pnho1YrC", + "log_id": "y6ibtRcRzi" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsCapacity/AwemeBind/AppsCapacityGetAwemeBindTemplateListV1Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsCapacity/AwemeBind/AppsCapacityGetAwemeBindTemplateListV1Request.json new file mode 100644 index 00000000..3112f826 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsCapacity/AwemeBind/AppsCapacityGetAwemeBindTemplateListV1Request.json @@ -0,0 +1,5 @@ +{ + "type": "brand", + "capacity_list": [ "video_self_mount" ], + "aweme_id": "4TOiSvx89p" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsCapacity/AwemeBind/AppsCapacityGetAwemeBindTemplateListV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsCapacity/AwemeBind/AppsCapacityGetAwemeBindTemplateListV1Response.json new file mode 100644 index 00000000..f4e60a09 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsCapacity/AwemeBind/AppsCapacityGetAwemeBindTemplateListV1Response.json @@ -0,0 +1,19 @@ +{ + "err_no": 1245, + "err_msg": "pkWDkzNGHb", + "log_id": "cezjxtoPu0", + "data": { + "template_map": { + "xXfB8KA6J4": [ + { + "title": "GcvrIuXWI9", + "reason": "9jI13sSvkZ", + "category_name": "sksNoxU9To", + "category_id": "qNJc1eLCEW", + "can_apply": false, + "template_id": 4837835435925716000 + } + ] + } + } +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsCapacity/AwemeBind/AppsCapacityGetAwemeRelationBindQrcodeV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsCapacity/AwemeBind/AppsCapacityGetAwemeRelationBindQrcodeV1Response.json new file mode 100644 index 00000000..7181c57f --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsCapacity/AwemeBind/AppsCapacityGetAwemeRelationBindQrcodeV1Response.json @@ -0,0 +1,9 @@ +{ + "err_no": 12345, + "err_msg": "dYhGdwI02D", + "log_id": "Bxkki1U8qz", + "data": { + "qrcode_url": "MHmxvlFl0N", + "qrcode_parse_content": "qrP0b4C6uX" + } +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsCapacity/AwemeBind/AppsCapacityQueryAwemeRelationListV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsCapacity/AwemeBind/AppsCapacityQueryAwemeRelationListV1Response.json new file mode 100644 index 00000000..0059f2b6 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsCapacity/AwemeBind/AppsCapacityQueryAwemeRelationListV1Response.json @@ -0,0 +1,24 @@ +{ + "data": { + "total_count": 12123, + "list": [ + { + "bind_status": 1, + "reason": "XX", + "account_type": 1, + "aweme_id": 5791922398551857000, + "capacity_list": [ + { + "status": 1, + "fail_reason": "2eYo4eva9Q", + "capacity_key": "2xaMvjuA6E" + } + ], + "user_name": "XX" + } + ] + }, + "err_no": 12345, + "err_msg": "28qeUcfsgo", + "log_id": "dI5gONG4WU" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsCapacity/AwemeBind/AppsCapacityUnbindAwemeRelationV1Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsCapacity/AwemeBind/AppsCapacityUnbindAwemeRelationV1Request.json new file mode 100644 index 00000000..3765f25a --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsCapacity/AwemeBind/AppsCapacityUnbindAwemeRelationV1Request.json @@ -0,0 +1,4 @@ +{ + "type": "brand", + "aweme_id": "1467922731088997102" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/Capacity/AwemeCapacity/AppsCapacityAddAwemeVideoKeywordV1Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsCapacity/AwemeKeyword/AppsCapacityAddAwemeVideoKeywordV1Request.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/Capacity/AwemeCapacity/AppsCapacityAddAwemeVideoKeywordV1Request.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsCapacity/AwemeKeyword/AppsCapacityAddAwemeVideoKeywordV1Request.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/Capacity/AwemeCapacity/AppsCapacityDeleteAwemeVideoKeywordV1Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsCapacity/AwemeKeyword/AppsCapacityDeleteAwemeVideoKeywordV1Request.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/Capacity/AwemeCapacity/AppsCapacityDeleteAwemeVideoKeywordV1Request.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsCapacity/AwemeKeyword/AppsCapacityDeleteAwemeVideoKeywordV1Request.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/Capacity/AwemeCapacity/AppsCapacityQueryAwemeVideoKeywordListV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsCapacity/AwemeKeyword/AppsCapacityQueryAwemeVideoKeywordListV1Response.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/Capacity/AwemeCapacity/AppsCapacityQueryAwemeVideoKeywordListV1Response.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsCapacity/AwemeKeyword/AppsCapacityQueryAwemeVideoKeywordListV1Response.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/Capacity/Delivery/AppsCapacityAddAliasV1Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsCapacity/Delivery/AppsCapacityAddAliasV1Request.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/Capacity/Delivery/AppsCapacityAddAliasV1Request.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsCapacity/Delivery/AppsCapacityAddAliasV1Request.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/Capacity/Delivery/AppsCapacityDeleteAliasV1Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsCapacity/Delivery/AppsCapacityDeleteAliasV1Request.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/Capacity/Delivery/AppsCapacityDeleteAliasV1Request.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsCapacity/Delivery/AppsCapacityDeleteAliasV1Request.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/Capacity/Delivery/AppsCapacityModifyAliasV1Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsCapacity/Delivery/AppsCapacityModifyAliasV1Request.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/Capacity/Delivery/AppsCapacityModifyAliasV1Request.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsCapacity/Delivery/AppsCapacityModifyAliasV1Request.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/Capacity/Delivery/AppsCapacityQueryAliasListV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsCapacity/Delivery/AppsCapacityQueryAliasListV1Response.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/Capacity/Delivery/AppsCapacityQueryAliasListV1Response.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsCapacity/Delivery/AppsCapacityQueryAliasListV1Response.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/Capacity/Delivery/AppsCapacityQuerySearchTagListV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsCapacity/Delivery/AppsCapacityQuerySearchTagListV1Response.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/Capacity/Delivery/AppsCapacityQuerySearchTagListV1Response.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsCapacity/Delivery/AppsCapacityQuerySearchTagListV1Response.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/Capacity/Delivery/AppsCapacitySetSearchTagV1Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsCapacity/Delivery/AppsCapacitySetSearchTagV1Request.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/Capacity/Delivery/AppsCapacitySetSearchTagV1Request.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsCapacity/Delivery/AppsCapacitySetSearchTagV1Request.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsCapacity/SimpleQrcode/AppsCapacityAddSimpleQrcodeBindV2Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsCapacity/SimpleQrcode/AppsCapacityAddSimpleQrcodeBindV2Request.json new file mode 100644 index 00000000..3fe816fa --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsCapacity/SimpleQrcode/AppsCapacityAddSimpleQrcodeBindV2Request.json @@ -0,0 +1,6 @@ +{ + "qr_url": "https://xxx", + "load_path": "xxx", + "stage": "online", + "exclusive_qr_url_prefix": 1 +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsCapacity/SimpleQrcode/AppsCapacityDeleteSimpleQrcodeBindV1Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsCapacity/SimpleQrcode/AppsCapacityDeleteSimpleQrcodeBindV1Request.json new file mode 100644 index 00000000..6cc51dc3 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsCapacity/SimpleQrcode/AppsCapacityDeleteSimpleQrcodeBindV1Request.json @@ -0,0 +1,3 @@ +{ + "qr_url": "https://xxx" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsCapacity/SimpleQrcode/AppsCapacityQuerySimpleQrcodeBindListV2Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsCapacity/SimpleQrcode/AppsCapacityQuerySimpleQrcodeBindListV2Response.json new file mode 100644 index 00000000..31401fdd --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsCapacity/SimpleQrcode/AppsCapacityQuerySimpleQrcodeBindListV2Response.json @@ -0,0 +1,21 @@ +{ + "err_msg": "", + "log_id": "6HhwWpLQiY", + "data": { + "qr_list": [ + { + "qr_url": "pD3W471lb7", + "load_path": "nSyCaf9Fmy", + "stage": "GYZbBfqR5V", + "status": 1, + "exclusive_qr_url_prefix": 1 + } + ], + "total_count": 1, + "bind_upper_limit": 1, + "bind_rest_count": 1, + "release_upper_limit": 1, + "release_rest_count": 1 + }, + "err_no": 0 +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsCapacity/SimpleQrcode/AppsCapacityUpdateSimpleQrcodeBindStatusV2Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsCapacity/SimpleQrcode/AppsCapacityUpdateSimpleQrcodeBindStatusV2Request.json new file mode 100644 index 00000000..a1fdbe02 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsCapacity/SimpleQrcode/AppsCapacityUpdateSimpleQrcodeBindStatusV2Request.json @@ -0,0 +1,4 @@ +{ + "qr_url": "https://xxx", + "status": 1 +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsCapacity/SimpleQrcode/AppsCapacityUpdateSimpleQrcodeBindV2Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsCapacity/SimpleQrcode/AppsCapacityUpdateSimpleQrcodeBindV2Request.json new file mode 100644 index 00000000..55892476 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsCapacity/SimpleQrcode/AppsCapacityUpdateSimpleQrcodeBindV2Request.json @@ -0,0 +1,7 @@ +{ + "load_path": "xxx", + "stage": "online", + "exclusive_qr_url_prefix": 1, + "before_qr_url": "https://xxx", + "qr_url": "https://xxx" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsCapacity/SubService/AppsCapacityCreateMicroAppSubServiceV1Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsCapacity/SubService/AppsCapacityCreateMicroAppSubServiceV1Request.json new file mode 100644 index 00000000..591cb223 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsCapacity/SubService/AppsCapacityCreateMicroAppSubServiceV1Request.json @@ -0,0 +1,5 @@ +{ + "sub_service_name": "我的子服务", + "search_key_word": [ "key1" ], + "start_page_url": "http://xxx.com" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsCapacity/SubService/AppsCapacityQueryMicroAppSubServiceV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsCapacity/SubService/AppsCapacityQueryMicroAppSubServiceV1Response.json new file mode 100644 index 00000000..e8533383 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsCapacity/SubService/AppsCapacityQueryMicroAppSubServiceV1Response.json @@ -0,0 +1,29 @@ +{ + "data": { + "has_more": false, + "ma_sub_service_info_list": [ + { + "micro_app_icon": "******", + "micro_app_id": "******", + "search_key_word": [ "******" ], + "start_page_url": "******", + "sub_service_id": "******", + "sub_service_name": "******", + "approval_state": 0 + }, + { + "sub_service_id": "*****", + "sub_service_name": "*****", + "approval_state": 0, + "micro_app_icon": "", + "micro_app_id": "******", + "search_key_word": [ "******" ], + "start_page_url": "*****" + } + ], + "total": 2 + }, + "err_msg": "", + "err_no": 0, + "log_id": "202311231517488305C037A785Dxxxxx" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/Category/AppsCategoryQueryAppCategoriesV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsCategory/AppsCategoryQueryAppCategoriesV1Response.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/Category/AppsCategoryQueryAppCategoriesV1Response.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsCategory/AppsCategoryQueryAppCategoriesV1Response.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsCensor/AppsCensorImageV1Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsCensor/AppsCensorImageV1Request.json new file mode 100644 index 00000000..6431dcab --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsCensor/AppsCensorImageV1Request.json @@ -0,0 +1,5 @@ +{ + "app_id": "tt********", + "image": "http://XXXXXX", + "image_data": "XXXXXX" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsCensor/AppsCensorImageV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsCensor/AppsCensorImageV1Response.json new file mode 100644 index 00000000..97ad7770 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsCensor/AppsCensorImageV1Response.json @@ -0,0 +1,74 @@ +{ + "err_no": 0, + "err_msg": "image censor success", + "predicts": [ + { + "model_name": "anniversary_flag", + "hit": false + }, + { + "model_name": "bloody", + "hit": false + }, + { + "model_name": "high_risk_boom", + "hit": false + }, + { + "model_name": "cartoon_leader", + "hit": false + }, + { + "model_name": "fandongtaibiao", + "hit": false + }, + { + "model_name": "leader_recognition", + "hit": false + }, + { + "model_name": "high_risk_money", + "hit": false + }, + { + "model_name": "plant_ppx", + "hit": false + }, + { + "model_name": "porn", + "hit": false + }, + { + "model_name": "sensitive_flag", + "hit": false + }, + { + "model_name": "high_risk_sensitive_map", + "hit": false + }, + { + "model_name": "sensitive_text", + "hit": false + }, + { + "model_name": "high_risk_social_event", + "hit": false + }, + { + "model_name": "high_risk_terrorist_uniform", + "hit": false + }, + { + "model_name": "party_founding_memorial", + "hit": false + }, + { + "model_name": "cartoon_porn", + "hit": false + }, + { + "model_name": "great_hall", + "hit": false + } + ] +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsDouyin/InteractTask/AppsDouyinCreateInteractTaskV1Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsDouyin/InteractTask/AppsDouyinCreateInteractTaskV1Request.json new file mode 100644 index 00000000..994e26c4 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsDouyin/InteractTask/AppsDouyinCreateInteractTaskV1Request.json @@ -0,0 +1,14 @@ +{ + "task_type": 3, + "app_id": "ttabc*******", + "start_time": 1690938443, + "end_time": 1702365299, + "max_count": 10, + "mount_link": "path", + "interact_rules": { + "like": { + "stage_count": 6, + "target_count": 1 + } + } +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsDouyin/InteractTask/AppsDouyinCreateInteractTaskV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsDouyin/InteractTask/AppsDouyinCreateInteractTaskV1Response.json new file mode 100644 index 00000000..e3c7b15b --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsDouyin/InteractTask/AppsDouyinCreateInteractTaskV1Response.json @@ -0,0 +1,8 @@ +{ + "data": { + "task_id": "task_7263******7724" + }, + "err_no": 0, + "err_msg": "", + "log_id": "2023080317282901022512708409145B" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsDouyin/InteractTask/AppsDouyinQueryUserInteractTaskV1Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsDouyin/InteractTask/AppsDouyinQueryUserInteractTaskV1Request.json new file mode 100644 index 00000000..2fda4ae7 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsDouyin/InteractTask/AppsDouyinQueryUserInteractTaskV1Request.json @@ -0,0 +1,5 @@ +{ + "task_id": [ "task_7302***07" ], + "open_id": "yH******7w", + "app_id": "ttabc*****" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsDouyin/InteractTask/AppsDouyinQueryUserInteractTaskV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsDouyin/InteractTask/AppsDouyinQueryUserInteractTaskV1Response.json new file mode 100644 index 00000000..f571238f --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsDouyin/InteractTask/AppsDouyinQueryUserInteractTaskV1Response.json @@ -0,0 +1,47 @@ +{ + "err_no": 0, + "err_msg": "", + "log_id": "20231116111433010225127084047533", + "data": { + "task_info_list": { + "task_7301597285245279020": { + "task_id": "task_7301597285245279020", + "video_info": [ + { + "video_status": 3, + "completed": false, + "video_id": "131****087e", + "interact_info": { + "like": { + "completed": false + }, + "play": { + "stage": 0, + "completed": false + } + } + }, + { + "interact_info": { + "like": { + "completed": false + }, + "play": { + "stage": 0, + "completed": false + } + }, + "video_status": 1, + "completed": false, + "video_id": "1310******20e79" + } + ], + "is_valid": true, + "success_count": 0, + "max_count": 10, + "err_msg": "", + "err_no": 0 + } + } + } +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsDouyin/Task/AppsDouyinCreateTaskV1Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsDouyin/Task/AppsDouyinCreateTaskV1Request.json new file mode 100644 index 00000000..426b1a48 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsDouyin/Task/AppsDouyinCreateTaskV1Request.json @@ -0,0 +1,15 @@ +{ + "app_id": "tt**********", + "task_type": 2, + "rule_type": 1, + "target_count": 1, + "start_time": 1694423074, + "end_time": 1694623074, + "mount_link": "/pages/index", + "publish_type": [ + 1 + ], + "tags": [ + "**" + ] +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsDouyin/Task/AppsDouyinCreateTaskV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsDouyin/Task/AppsDouyinCreateTaskV1Response.json new file mode 100644 index 00000000..e3c7b15b --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsDouyin/Task/AppsDouyinCreateTaskV1Response.json @@ -0,0 +1,8 @@ +{ + "data": { + "task_id": "task_7263******7724" + }, + "err_no": 0, + "err_msg": "", + "log_id": "2023080317282901022512708409145B" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsDouyin/Task/AppsDouyinQueryUserTaskV1Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsDouyin/Task/AppsDouyinQueryUserTaskV1Request.json new file mode 100644 index 00000000..a1b2970b --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsDouyin/Task/AppsDouyinQueryUserTaskV1Request.json @@ -0,0 +1,5 @@ +{ + "open_id": "tV2v******", + "app_id": "tt*******", + "task_id": [ "task_*****", "task_******" ] +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsDouyin/Task/AppsDouyinQueryUserTaskV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsDouyin/Task/AppsDouyinQueryUserTaskV1Response.json new file mode 100644 index 00000000..dee4eb5c --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsDouyin/Task/AppsDouyinQueryUserTaskV1Response.json @@ -0,0 +1,38 @@ +{ + "err_no": 0, + "log_id": "202309********************", + "data": { + "task_info_list": { + "task_***********": { + "target_count": 0, + "task_id": "", + "video_info": [], + "completed": false, + "err_msg": "任务id无效", + "err_no": 28005074, + "is_valid": false, + "success_count": 0 + }, + "task_******************": { + "is_valid": true, + "success_count": 1, + "target_count": 2, + "task_id": "task_******************", + "video_info": [ + { + "video_id": "131041************", + "video_status": 1 + }, + { + "video_id": "131041**************", + "video_status": 2 + } + ], + "completed": false, + "err_msg": "", + "err_no": 0 + } + } + }, + "err_msg": "" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsItem/AppsItemBCGetBaseV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsItem/AppsItemBCGetBaseV1Response.json new file mode 100644 index 00000000..c8ff609d --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsItem/AppsItemBCGetBaseV1Response.json @@ -0,0 +1,11 @@ +{ + "data": { + "result": { + "total_like": 200, + "total_comment": 200, + "total_share": 200, + "avg_play_duration": 200, + "total_play": 200 + } + } +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsItem/AppsItemBCGetCommentV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsItem/AppsItemBCGetCommentV1Response.json new file mode 100644 index 00000000..ab34757f --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsItem/AppsItemBCGetCommentV1Response.json @@ -0,0 +1,10 @@ +{ + "data": { + "result_list": [ + { + "date": "yyyy-MM-dd", + "comment": 200 + } + ] + } +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsItem/AppsItemBCGetLikeV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsItem/AppsItemBCGetLikeV1Response.json new file mode 100644 index 00000000..e5bdba2b --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsItem/AppsItemBCGetLikeV1Response.json @@ -0,0 +1,10 @@ +{ + "data": { + "result_list": [ + { + "date": "yyyy-MM-dd", + "like": 200 + } + ] + } +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsItem/AppsItemBCGetPlayV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsItem/AppsItemBCGetPlayV1Response.json new file mode 100644 index 00000000..d6768c92 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsItem/AppsItemBCGetPlayV1Response.json @@ -0,0 +1,10 @@ +{ + "data": { + "result_list": [ + { + "date": "yyyy-MM-dd", + "play": 200 + } + ] + } +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsItem/AppsItemBCGetShareV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsItem/AppsItemBCGetShareV1Response.json new file mode 100644 index 00000000..199b8f3a --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsItem/AppsItemBCGetShareV1Response.json @@ -0,0 +1,10 @@ +{ + "data": { + "result_list": [ + { + "date": "yyyy-MM-dd", + "share": 200 + } + ] + } +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsItem/AppsItemGetBaseV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsItem/AppsItemGetBaseV1Response.json new file mode 100644 index 00000000..c8ff609d --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsItem/AppsItemGetBaseV1Response.json @@ -0,0 +1,11 @@ +{ + "data": { + "result": { + "total_like": 200, + "total_comment": 200, + "total_share": 200, + "avg_play_duration": 200, + "total_play": 200 + } + } +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsItem/AppsItemGetCommentV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsItem/AppsItemGetCommentV1Response.json new file mode 100644 index 00000000..ab34757f --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsItem/AppsItemGetCommentV1Response.json @@ -0,0 +1,10 @@ +{ + "data": { + "result_list": [ + { + "date": "yyyy-MM-dd", + "comment": 200 + } + ] + } +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsItem/AppsItemGetLikeV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsItem/AppsItemGetLikeV1Response.json new file mode 100644 index 00000000..e5bdba2b --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsItem/AppsItemGetLikeV1Response.json @@ -0,0 +1,10 @@ +{ + "data": { + "result_list": [ + { + "date": "yyyy-MM-dd", + "like": 200 + } + ] + } +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsItem/AppsItemGetPlayV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsItem/AppsItemGetPlayV1Response.json new file mode 100644 index 00000000..d6768c92 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsItem/AppsItemGetPlayV1Response.json @@ -0,0 +1,10 @@ +{ + "data": { + "result_list": [ + { + "date": "yyyy-MM-dd", + "play": 200 + } + ] + } +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsItem/AppsItemGetShareV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsItem/AppsItemGetShareV1Response.json new file mode 100644 index 00000000..199b8f3a --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsItem/AppsItemGetShareV1Response.json @@ -0,0 +1,10 @@ +{ + "data": { + "result_list": [ + { + "date": "yyyy-MM-dd", + "share": 200 + } + ] + } +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsItem/Comment/AppsItemBCListCommentReplyV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsItem/Comment/AppsItemBCListCommentReplyV1Response.json new file mode 100644 index 00000000..6b93faa8 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsItem/Comment/AppsItemBCListCommentReplyV1Response.json @@ -0,0 +1,19 @@ +{ + "data": { + "cursor": 1, + "has_more": true, + "list": [ + { + "create_time": 1607399832, + "digg_count": 647, + "reply_comment_total": 12, + "top": true, + "comment_id": "", + "comment_user_id": "", + "content": "回复内容", + "avatar": "https://uuue/ehdne", + "nick_name": "xiaoming" + } + ] + } +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsItem/Comment/AppsItemBCListCommentV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsItem/Comment/AppsItemBCListCommentV1Response.json new file mode 100644 index 00000000..6d45ac9d --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsItem/Comment/AppsItemBCListCommentV1Response.json @@ -0,0 +1,19 @@ +{ + "data": { + "cursor": 1, + "has_more": true, + "list": [ + { + "top": false, + "comment_id": "@9VwW0qOBUN9mJyD3bNxvGc791G3uO/mLOZ10oQOjJ1EUafn460zdRmYqig357zEBidswyrkjAGx3+uVUd0cE4Q==", + "comment_user_id": "43eae150-12eb-4035-8d40-3f9a2bfcdf4e", + "content": "评论", + "create_time": 1673507751, + "digg_count": 0, + "reply_comment_total": 0, + "avatar": "https://uuue/ehdne", + "nick_name": "xiaoming" + } + ] + } +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsItem/Comment/AppsItemBCReplyCommentV1Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsItem/Comment/AppsItemBCReplyCommentV1Request.json new file mode 100644 index 00000000..96605f49 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsItem/Comment/AppsItemBCReplyCommentV1Request.json @@ -0,0 +1,5 @@ +{ + "content": "回复内容", + "item_id": "@8hxdhauTCMppanGnM4ltGM780mDqPP+KPpR0qQOmLVAXb/T060zdRmYqig357zEBq6CZRp4NVe6qLIJW/V/x1w==", + "comment_id": "@kj5k4hai123d22nGnM4ltGM780mDqPP+KPpR0qQOmLVAXb/T060zdRmYqig357zEBq6CZRp4NVe6qLIJW/V/x1w==" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsItem/Comment/AppsItemBCReplyCommentV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsItem/Comment/AppsItemBCReplyCommentV1Response.json new file mode 100644 index 00000000..f0eafe96 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsItem/Comment/AppsItemBCReplyCommentV1Response.json @@ -0,0 +1,5 @@ +{ + "data": { + "comment_id": "@kj5k4hai123d22nGnM4ltGM780mDqPP+KPpR0qQOmLVAXb/T060zdRmYqig357zEBq6CZRp4NVe6qLIJW/V/x1w==" + } +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsItem/Comment/AppsItemBCTopCommentV1Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsItem/Comment/AppsItemBCTopCommentV1Request.json new file mode 100644 index 00000000..df3d83dc --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsItem/Comment/AppsItemBCTopCommentV1Request.json @@ -0,0 +1,5 @@ +{ + "item_id": "@9VwW0qOBUN9mJyD3bNxvGc791GzhPfGHO5F2qQuuL1EUZvX560zdRmYqig357zEBZyxgSWZE1UdFqva5Pf296w==", + "comment_id": "@9VwW0qOBUN9mJyD3bNxvGc7912bvP/mEMpJwqwykKlEaZvn860zdRmYqig357zEB6/24MEvXsIUhf+t3F/Gw6w==", + "top": true +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsItem/Comment/AppsItemListCommentReplyV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsItem/Comment/AppsItemListCommentReplyV1Response.json new file mode 100644 index 00000000..6b93faa8 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsItem/Comment/AppsItemListCommentReplyV1Response.json @@ -0,0 +1,19 @@ +{ + "data": { + "cursor": 1, + "has_more": true, + "list": [ + { + "create_time": 1607399832, + "digg_count": 647, + "reply_comment_total": 12, + "top": true, + "comment_id": "", + "comment_user_id": "", + "content": "回复内容", + "avatar": "https://uuue/ehdne", + "nick_name": "xiaoming" + } + ] + } +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsItem/Comment/AppsItemListCommentV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsItem/Comment/AppsItemListCommentV1Response.json new file mode 100644 index 00000000..6d45ac9d --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsItem/Comment/AppsItemListCommentV1Response.json @@ -0,0 +1,19 @@ +{ + "data": { + "cursor": 1, + "has_more": true, + "list": [ + { + "top": false, + "comment_id": "@9VwW0qOBUN9mJyD3bNxvGc791G3uO/mLOZ10oQOjJ1EUafn460zdRmYqig357zEBidswyrkjAGx3+uVUd0cE4Q==", + "comment_user_id": "43eae150-12eb-4035-8d40-3f9a2bfcdf4e", + "content": "评论", + "create_time": 1673507751, + "digg_count": 0, + "reply_comment_total": 0, + "avatar": "https://uuue/ehdne", + "nick_name": "xiaoming" + } + ] + } +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsItem/Comment/AppsItemReplyCommentV1Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsItem/Comment/AppsItemReplyCommentV1Request.json new file mode 100644 index 00000000..96605f49 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsItem/Comment/AppsItemReplyCommentV1Request.json @@ -0,0 +1,5 @@ +{ + "content": "回复内容", + "item_id": "@8hxdhauTCMppanGnM4ltGM780mDqPP+KPpR0qQOmLVAXb/T060zdRmYqig357zEBq6CZRp4NVe6qLIJW/V/x1w==", + "comment_id": "@kj5k4hai123d22nGnM4ltGM780mDqPP+KPpR0qQOmLVAXb/T060zdRmYqig357zEBq6CZRp4NVe6qLIJW/V/x1w==" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsItem/Comment/AppsItemReplyCommentV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsItem/Comment/AppsItemReplyCommentV1Response.json new file mode 100644 index 00000000..f0eafe96 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsItem/Comment/AppsItemReplyCommentV1Response.json @@ -0,0 +1,5 @@ +{ + "data": { + "comment_id": "@kj5k4hai123d22nGnM4ltGM780mDqPP+KPpR0qQOmLVAXb/T060zdRmYqig357zEBq6CZRp4NVe6qLIJW/V/x1w==" + } +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsItem/Comment/AppsItemTopCommentV1Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsItem/Comment/AppsItemTopCommentV1Request.json new file mode 100644 index 00000000..df3d83dc --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsItem/Comment/AppsItemTopCommentV1Request.json @@ -0,0 +1,5 @@ +{ + "item_id": "@9VwW0qOBUN9mJyD3bNxvGc791GzhPfGHO5F2qQuuL1EUZvX560zdRmYqig357zEBZyxgSWZE1UdFqva5Pf296w==", + "comment_id": "@9VwW0qOBUN9mJyD3bNxvGc7912bvP/mEMpJwqwykKlEaZvn860zdRmYqig357zEB6/24MEvXsIUhf+t3F/Gw6w==", + "top": true +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsQrcode/AppsQrcodeCreateV1Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsQrcode/AppsQrcodeCreateV1Request.json new file mode 100644 index 00000000..48003082 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsQrcode/AppsQrcodeCreateV1Request.json @@ -0,0 +1,17 @@ +{ + "app_name": "douyin", + "appid": "tt**********", + "path": "{}", + "width": 1000, + "line_color": { + "r": 0, + "g": 0, + "b": 0 + }, + "background": { + "r": 0, + "g": 0, + "b": 0 + }, + "set_icon": false +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsQrcode/AppsQrcodeCreateV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsQrcode/AppsQrcodeCreateV1Response.json new file mode 100644 index 00000000..72e94b56 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsQrcode/AppsQrcodeCreateV1Response.json @@ -0,0 +1,7 @@ +{ + "err_no": 0, + "err_msg": "", + "data": { + "img": "#######" + } +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsShare/Task/AppsShareCreateTaskV1Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsShare/Task/AppsShareCreateTaskV1Request.json new file mode 100644 index 00000000..fff0107c --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsShare/Task/AppsShareCreateTaskV1Request.json @@ -0,0 +1,6 @@ +{ + "task_type": 1, + "target_count": 10, + "start_time": 1691377225, + "end_time": 1693357643 +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsShare/Task/AppsShareCreateTaskV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsShare/Task/AppsShareCreateTaskV1Response.json new file mode 100644 index 00000000..e3c7b15b --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsShare/Task/AppsShareCreateTaskV1Response.json @@ -0,0 +1,8 @@ +{ + "data": { + "task_id": "task_7263******7724" + }, + "err_no": 0, + "err_msg": "", + "log_id": "2023080317282901022512708409145B" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsShare/Task/AppsShareQueryUserTaskV1Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsShare/Task/AppsShareQueryUserTaskV1Request.json new file mode 100644 index 00000000..f34cff84 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsShare/Task/AppsShareQueryUserTaskV1Request.json @@ -0,0 +1,4 @@ +{ + "task_id": "task_*****", + "open_id": "ERl******R" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsShare/Task/AppsShareQueryUserTaskV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsShare/Task/AppsShareQueryUserTaskV1Response.json new file mode 100644 index 00000000..a5f1c078 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsShare/Task/AppsShareQueryUserTaskV1Response.json @@ -0,0 +1,12 @@ +{ + "log_id": "20230807171057010225127083950712", + "data": { + "success_count": 0, + "target_count": 0, + "task_id": "task_7263****2700", + "completed": false, + "is_valid": true + }, + "err_no": 0, + "err_msg": "" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsTask/AppsTaskCreateLiveV2Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsTask/AppsTaskCreateLiveV2Request.json new file mode 100644 index 00000000..97840fd9 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsTask/AppsTaskCreateLiveV2Request.json @@ -0,0 +1,12 @@ +{ + "task_name": "xxx", + "conditions": [ + "live_digg" + ], + "condition_value": [ + 1 + ], + "start_time": 1704981661, + "end_time": 1705327261, + "aweme_id": "xxx" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsTask/AppsTaskCreateLiveV2Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsTask/AppsTaskCreateLiveV2Response.json new file mode 100644 index 00000000..ade0063f --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsTask/AppsTaskCreateLiveV2Response.json @@ -0,0 +1,9 @@ +{ + "err_no": 0, + "err_msg": "", + "log_id": "20240112144846711CC4D3A7098802AA67", + "data": { + "task_id": "@4F9R0vKUDsthbXTzOI1qGaD6umHtss6APKJGnj2RGGb8dKaEfZq7N/GDiSn/7SCD", + "task_status": 1 + } +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsTask/AppsTaskCreateVideoV2Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsTask/AppsTaskCreateVideoV2Request.json new file mode 100644 index 00000000..1dc9e104 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsTask/AppsTaskCreateVideoV2Request.json @@ -0,0 +1,9 @@ +{ + "task_name": "xxx", + "conditions": [ + "collection" + ], + "start_time": 1704981661, + "end_time": 1705327261, + "video_url": "https://v.douyin.com/iLjUaXxxU/" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsTask/AppsTaskCreateVideoV2Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsTask/AppsTaskCreateVideoV2Response.json new file mode 100644 index 00000000..36f08240 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsTask/AppsTaskCreateVideoV2Response.json @@ -0,0 +1,9 @@ +{ + "err_no": 0, + "err_msg": "", + "log_id": "20240112175946DECCEB9239F1D308ABEC", + "data": { + "task_id": "@4F9R0vKUDsthbXTzOI1qGaD6umHxxxvyEPKJGnj2RGGYPw4jaKgpY/EwtBRgbLdFB", + "task_status": 1 + } +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsTask/AppsTaskWriteoffLiveV2Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsTask/AppsTaskWriteoffLiveV2Request.json new file mode 100644 index 00000000..d79f8ac5 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsTask/AppsTaskWriteoffLiveV2Request.json @@ -0,0 +1,4 @@ +{ + "task_id": "@4F9R0vKUDsthbXTzOI1qGaD6umbhPfCHOqJGnj2RGGZOW2bNPosZist7V6lnmMUd", + "open_id": "grgwsR2Xp-wsvK72" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsTask/AppsTaskWriteoffVideoV2Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsTask/AppsTaskWriteoffVideoV2Request.json new file mode 100644 index 00000000..d79f8ac5 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsTask/AppsTaskWriteoffVideoV2Request.json @@ -0,0 +1,4 @@ +{ + "task_id": "@4F9R0vKUDsthbXTzOI1qGaD6umbhPfCHOqJGnj2RGGZOW2bNPosZist7V6lnmMUd", + "open_id": "grgwsR2Xp-wsvK72" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsTrafficPermission/AppsTrafficPermissionOpenV1Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsTrafficPermission/AppsTrafficPermissionOpenV1Request.json new file mode 100644 index 00000000..e5d81dd0 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsTrafficPermission/AppsTrafficPermissionOpenV1Request.json @@ -0,0 +1,9 @@ +{ + "tax_nature": 1, + "bank_account_number": "xxxxxxxxx", + "bank_name": "xxx", + "bank_branch": "xxx", + "phone_number": "xxx", + "province": "广东", + "city": "深圳" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsTrafficPermission/AppsTrafficPermissionQueryV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsTrafficPermission/AppsTrafficPermissionQueryV1Response.json new file mode 100644 index 00000000..b1f3a004 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsTrafficPermission/AppsTrafficPermissionQueryV1Response.json @@ -0,0 +1,9 @@ +{ + "err_no": 0, + "log_id": "20240229143002DCA7B2D1C6853E7ADD1A", + "data": { + "can_open": 1, + "status": 1 + }, + "err_msg": "" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsUrlLink/AppsUrlLinkGenerateV1Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsUrlLink/AppsUrlLinkGenerateV1Request.json new file mode 100644 index 00000000..2ad79f42 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsUrlLink/AppsUrlLinkGenerateV1Request.json @@ -0,0 +1,7 @@ +{ + "app_id": "tt********", + "app_name": "douyin", + "path": "xxxx", + "query": "{xxx:xxxx}", + "expire_time": 1644464021 +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsUrlLink/AppsUrlLinkGenerateV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsUrlLink/AppsUrlLinkGenerateV1Response.json new file mode 100644 index 00000000..23bfea86 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsUrlLink/AppsUrlLinkGenerateV1Response.json @@ -0,0 +1,7 @@ +{ + "err_no": 0, + "err_msg": "", + "data": { + "url_link": "https://z.douyin.com/Lu86lrX" + } +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsUrlLink/AppsUrlLinkQueryInfoV1Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsUrlLink/AppsUrlLinkQueryInfoV1Request.json new file mode 100644 index 00000000..deb778b0 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsUrlLink/AppsUrlLinkQueryInfoV1Request.json @@ -0,0 +1,4 @@ +{ + "app_id": "tt***********", + "url_link": "https://z.douyin.com/Lu86lrX" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsUrlLink/AppsUrlLinkQueryInfoV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsUrlLink/AppsUrlLinkQueryInfoV1Response.json new file mode 100644 index 00000000..62bf9699 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsUrlLink/AppsUrlLinkQueryInfoV1Response.json @@ -0,0 +1,12 @@ +{ + "err_no": 0, + "err_msg": "", + "data": { + "app_name": "douyin", + "app_id": "tt6f31198cf00b5xxx", + "path": "xxxx", + "query": "xxxx", + "create_time": 1644463984, + "expire_time": 1644464021 + } +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsUrlLink/AppsUrlLinkQueryQuotaV1Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsUrlLink/AppsUrlLinkQueryQuotaV1Request.json new file mode 100644 index 00000000..4e60e710 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsUrlLink/AppsUrlLinkQueryQuotaV1Request.json @@ -0,0 +1,3 @@ +{ + "app_id": "tt******" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsUrlLink/AppsUrlLinkQueryQuotaV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsUrlLink/AppsUrlLinkQueryQuotaV1Response.json new file mode 100644 index 00000000..c5e09773 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsUrlLink/AppsUrlLinkQueryQuotaV1Response.json @@ -0,0 +1,8 @@ +{ + "err_no": 0, + "err_msg": "success", + "data": { + "url_link_used": 1128, + "url_link_limit": 1000000 + } +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsUrlSchema/AppsUrlGenerateSchemaV1Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsUrlSchema/AppsUrlGenerateSchemaV1Request.json new file mode 100644 index 00000000..a1c33c0e --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsUrlSchema/AppsUrlGenerateSchemaV1Request.json @@ -0,0 +1,7 @@ +{ + "app_id": "tt5da*****", + "query": "{\"key1\":\"val1\",\"key2\":\"val2\"}", + "path": "test_miniapp", + "no_expire": false, + "expire_time": 1685090014 +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsUrlSchema/AppsUrlGenerateSchemaV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsUrlSchema/AppsUrlGenerateSchemaV1Response.json new file mode 100644 index 00000000..6a25dc8e --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsUrlSchema/AppsUrlGenerateSchemaV1Response.json @@ -0,0 +1,8 @@ +{ + "data": { + "schema": "sslocal://miniapp?ticket=v1_*****" + }, + "err_msg": "", + "err_no": 0, + "log_id": "20230828105040791DAA4F7CABB43F2E0D" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsUrlSchema/AppsUrlQuerySchemaQuotaV1Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsUrlSchema/AppsUrlQuerySchemaQuotaV1Request.json new file mode 100644 index 00000000..ddd54aec --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsUrlSchema/AppsUrlQuerySchemaQuotaV1Request.json @@ -0,0 +1,3 @@ +{ + "app_id": "tt********" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsUrlSchema/AppsUrlQuerySchemaQuotaV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsUrlSchema/AppsUrlQuerySchemaQuotaV1Response.json new file mode 100644 index 00000000..c9001465 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsUrlSchema/AppsUrlQuerySchemaQuotaV1Response.json @@ -0,0 +1,15 @@ +{ + "err_no": 0, + "log_id": "20230828114955870A641D59241500963C", + "data": { + "long_term_schema_quota": { + "schema_used": 6, + "schema_limit": 0 + }, + "short_term_schema_quota": { + "schema_limit": 0, + "schema_used": 0 + } + }, + "err_msg": "" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsUrlSchema/AppsUrlQuerySchemaV1Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsUrlSchema/AppsUrlQuerySchemaV1Request.json new file mode 100644 index 00000000..cd8d6eb0 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsUrlSchema/AppsUrlQuerySchemaV1Request.json @@ -0,0 +1,4 @@ +{ + "schema": "sslocal://miniapp?ticket=v1_*****", + "app_id": "tt*****" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsUrlSchema/AppsUrlQuerySchemaV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsUrlSchema/AppsUrlQuerySchemaV1Response.json new file mode 100644 index 00000000..11585894 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsUrlSchema/AppsUrlQuerySchemaV1Response.json @@ -0,0 +1,12 @@ +{ + "data": { + "app_id": "tt******", + "path": "page/index", + "query": "{}", + "create_time": 1682075227, + "expire_time": 0 + }, + "err_msg": "", + "err_no": 0, + "log_id": "2023********7AB1" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsUser/AppsUserBCGetCommentV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsUser/AppsUserBCGetCommentV1Response.json new file mode 100644 index 00000000..193d083e --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsUser/AppsUserBCGetCommentV1Response.json @@ -0,0 +1,10 @@ +{ + "data": { + "result_list": [ + { + "date": "yyyy-MM-dd", + "new_comment": "200" + } + ] + } +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsUser/AppsUserBCGetFansV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsUser/AppsUserBCGetFansV1Response.json new file mode 100644 index 00000000..5f43e551 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsUser/AppsUserBCGetFansV1Response.json @@ -0,0 +1,11 @@ +{ + "data": { + "result_list": [ + { + "date": "yyyy-MM-dd", + "new_fans": "200", + "total_fans": "200" + } + ] + } +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsUser/AppsUserBCGetItemV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsUser/AppsUserBCGetItemV1Response.json new file mode 100644 index 00000000..f63ddfa6 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsUser/AppsUserBCGetItemV1Response.json @@ -0,0 +1,12 @@ +{ + "data": { + "result_list": [ + { + "date": "yyyy-MM-dd", + "new_issue": "200", + "new_play": "200", + "total_issue": "200" + } + ] + } +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsUser/AppsUserBCGetLikeV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsUser/AppsUserBCGetLikeV1Response.json new file mode 100644 index 00000000..a7934feb --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsUser/AppsUserBCGetLikeV1Response.json @@ -0,0 +1,10 @@ +{ + "data": { + "result_list": [ + { + "date": "yyyy-MM-dd", + "new_like": "200" + } + ] + } +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsUser/AppsUserBCGetProfileV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsUser/AppsUserBCGetProfileV1Response.json new file mode 100644 index 00000000..a3472111 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsUser/AppsUserBCGetProfileV1Response.json @@ -0,0 +1,10 @@ +{ + "data": { + "result_list": [ + { + "date": "yyyy-MM-dd", + "profile_uv": "200" + } + ] + } +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsUser/AppsUserBCGetShareV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsUser/AppsUserBCGetShareV1Response.json new file mode 100644 index 00000000..359b4895 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsUser/AppsUserBCGetShareV1Response.json @@ -0,0 +1,10 @@ +{ + "data": { + "result_list": [ + { + "date": "yyyy-MM-dd", + "new_share": "200" + } + ] + } +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsUser/AppsUserGetCommentV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsUser/AppsUserGetCommentV1Response.json new file mode 100644 index 00000000..193d083e --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsUser/AppsUserGetCommentV1Response.json @@ -0,0 +1,10 @@ +{ + "data": { + "result_list": [ + { + "date": "yyyy-MM-dd", + "new_comment": "200" + } + ] + } +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsUser/AppsUserGetFansV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsUser/AppsUserGetFansV1Response.json new file mode 100644 index 00000000..5f43e551 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsUser/AppsUserGetFansV1Response.json @@ -0,0 +1,11 @@ +{ + "data": { + "result_list": [ + { + "date": "yyyy-MM-dd", + "new_fans": "200", + "total_fans": "200" + } + ] + } +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsUser/AppsUserGetItemV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsUser/AppsUserGetItemV1Response.json new file mode 100644 index 00000000..f63ddfa6 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsUser/AppsUserGetItemV1Response.json @@ -0,0 +1,12 @@ +{ + "data": { + "result_list": [ + { + "date": "yyyy-MM-dd", + "new_issue": "200", + "new_play": "200", + "total_issue": "200" + } + ] + } +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsUser/AppsUserGetLikeV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsUser/AppsUserGetLikeV1Response.json new file mode 100644 index 00000000..a7934feb --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsUser/AppsUserGetLikeV1Response.json @@ -0,0 +1,10 @@ +{ + "data": { + "result_list": [ + { + "date": "yyyy-MM-dd", + "new_like": "200" + } + ] + } +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsUser/AppsUserGetProfileV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsUser/AppsUserGetProfileV1Response.json new file mode 100644 index 00000000..a3472111 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsUser/AppsUserGetProfileV1Response.json @@ -0,0 +1,10 @@ +{ + "data": { + "result_list": [ + { + "date": "yyyy-MM-dd", + "profile_uv": "200" + } + ] + } +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsUser/AppsUserGetShareV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsUser/AppsUserGetShareV1Response.json new file mode 100644 index 00000000..359b4895 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsUser/AppsUserGetShareV1Response.json @@ -0,0 +1,10 @@ +{ + "data": { + "result_list": [ + { + "date": "yyyy-MM-dd", + "new_share": "200" + } + ] + } +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsVideo/AppsConvertOpenItemIdToEncryptIdV1Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsVideo/AppsConvertOpenItemIdToEncryptIdV1Request.json new file mode 100644 index 00000000..b35af052 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsVideo/AppsConvertOpenItemIdToEncryptIdV1Request.json @@ -0,0 +1,6 @@ +{ + "video_ids": [ + "xxxxxxx" + ], + "access_key": "ttxxxx" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsVideo/AppsConvertOpenItemIdToEncryptIdV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsVideo/AppsConvertOpenItemIdToEncryptIdV1Response.json new file mode 100644 index 00000000..94ab95da --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsVideo/AppsConvertOpenItemIdToEncryptIdV1Response.json @@ -0,0 +1,10 @@ +{ + "err_no": 0, + "err_msg": "", + "data": { + "convert_result": { + "video1": "result1", + "video2": "result2" + } + } +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsVideo/AppsConvertVideoIdToOpenItemIdV1Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsVideo/AppsConvertVideoIdToOpenItemIdV1Request.json new file mode 100644 index 00000000..fca595d8 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsVideo/AppsConvertVideoIdToOpenItemIdV1Request.json @@ -0,0 +1,7 @@ +{ + "video_ids": [ + "xxxxxxx" + ], + "app_id": "ttxxxxx", + "access_key": "ttxxxx" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsVideo/AppsConvertVideoIdToOpenItemIdV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsVideo/AppsConvertVideoIdToOpenItemIdV1Response.json new file mode 100644 index 00000000..94ab95da --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsVideo/AppsConvertVideoIdToOpenItemIdV1Response.json @@ -0,0 +1,10 @@ +{ + "err_no": 0, + "err_msg": "", + "data": { + "convert_result": { + "video1": "result1", + "video2": "result2" + } + } +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsVideo/AppsVideoBCQueryV1Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsVideo/AppsVideoBCQueryV1Request.json new file mode 100644 index 00000000..6ca508c8 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsVideo/AppsVideoBCQueryV1Request.json @@ -0,0 +1,5 @@ +{ + "item_ids": [ + "@4F9W0/CQCZFnaXXwZow5E6Ku1WSGOvuDPJxyqAKiL1MVavn513fjeWIujgn96zUF4+bMA*****" + ] +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsVideo/AppsVideoBCQueryV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsVideo/AppsVideoBCQueryV1Response.json new file mode 100644 index 00000000..59471f11 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsVideo/AppsVideoBCQueryV1Response.json @@ -0,0 +1,25 @@ +{ + "data": { + "list": [ + { + "title": "测试视频 #测试话题 @抖音小助手", + "create_time": 1571075129, + "video_status": 5, + "share_url": "https://www.iesdouyin.com/share/video/QDlWd0EzdWVMU2Q0aU5tKzVaOElvVU03ODBtRHFQUCtLUHBSMHFRT21MVkFYYi9UMDYwemRSbVlxaWczNTd6RUJRc3MrM2hvRGlqK2EwNnhBc1lGUkpRPT0=/?region=CN&mid=6753173704399670023&u_code=12h9je425&titleType=title", + "cover": "https://p3-dy.byteimg.com/img/tos-cn-p-0015/cfa0d6421bdc4580876cb16974539ff6~c5_300x400.jpeg", + "is_top": false, + "statistics": { + "digg_count": 200, + "download_count": 10, + "play_count": 300, + "share_count": 10, + "forward_count": 10, + "comment_count": 100 + }, + "item_id": "@8hxdhauTCMppanGnM4ltGM780mDqPP+KPpR0qQOmLVAXb/T060zdRmYqig357zEBq6CZRp4NVe6qLIJW/V/x1w==", + "is_reviewed": true, + "media_type": 2 + } + ] + } +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsVideo/AppsVideoQueryV1Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsVideo/AppsVideoQueryV1Request.json new file mode 100644 index 00000000..6ca508c8 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsVideo/AppsVideoQueryV1Request.json @@ -0,0 +1,5 @@ +{ + "item_ids": [ + "@4F9W0/CQCZFnaXXwZow5E6Ku1WSGOvuDPJxyqAKiL1MVavn513fjeWIujgn96zUF4+bMA*****" + ] +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsVideo/AppsVideoQueryV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsVideo/AppsVideoQueryV1Response.json new file mode 100644 index 00000000..59471f11 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsVideo/AppsVideoQueryV1Response.json @@ -0,0 +1,25 @@ +{ + "data": { + "list": [ + { + "title": "测试视频 #测试话题 @抖音小助手", + "create_time": 1571075129, + "video_status": 5, + "share_url": "https://www.iesdouyin.com/share/video/QDlWd0EzdWVMU2Q0aU5tKzVaOElvVU03ODBtRHFQUCtLUHBSMHFRT21MVkFYYi9UMDYwemRSbVlxaWczNTd6RUJRc3MrM2hvRGlqK2EwNnhBc1lGUkpRPT0=/?region=CN&mid=6753173704399670023&u_code=12h9je425&titleType=title", + "cover": "https://p3-dy.byteimg.com/img/tos-cn-p-0015/cfa0d6421bdc4580876cb16974539ff6~c5_300x400.jpeg", + "is_top": false, + "statistics": { + "digg_count": 200, + "download_count": 10, + "play_count": 300, + "share_count": 10, + "forward_count": 10, + "comment_count": 100 + }, + "item_id": "@8hxdhauTCMppanGnM4ltGM780mDqPP+KPpR0qQOmLVAXb/T060zdRmYqig357zEBq6CZRp4NVe6qLIJW/V/x1w==", + "is_reviewed": true, + "media_type": 2 + } + ] + } +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/MatchTaskBox/MatchTaskBoxAddRoomTaskV2Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/MatchTaskBox/MatchTaskBoxAddRoomTaskV2Request.json new file mode 100644 index 00000000..a738ae14 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/MatchTaskBox/MatchTaskBoxAddRoomTaskV2Request.json @@ -0,0 +1,19 @@ +{ + "task_name": "测试的任务名称", + "task_settle_type": 9, + "start_page": "page/detail/detail?id=123", + "task_icon": "https://p3-developer-sign.bytemaimg.com/tos-cn-i-ke512zj2cu/01cefe0ce3c3479d845dcb861ca018b1~tplv-ke512zj2cu-jpg.jpeg?x-expires=1718424829&x-signature=7vw6D8rEUIDZXHAd4veMedSjlLo%3D", + "room_title": "测试的直播间标题", + "task_end_time": 1709782399, + "task_desc": "任务描述: 東門之池,可以漚麻。彼美淑姬,可與晤歌。東門之池,可以漚紵。彼美淑姬,可與晤語。", + "form_tag": "娱乐测试", + "content_tag": "漫画", + "refer_videos": [ + "https://v.douyin.com/SHAfHPu/", + "https://v.douyin.com/SHASjbd/" + ], + "refer_ma_captures": [ + "https://p3-developer-sign.bytemaimg.com/tos-cn-i-ke512zj2cu/1bcfc89de30f4b0fb2000d69f6d36d08~tplv-ke512zj2cu-jpg.jpeg?x-expires=1718424958&x-signature=KA4V5kcK%2FnLtjz5HtfhNz06uce4%3D", + "https://p6-developer-sign.bytemaimg.com/tos-cn-i-ke512zj2cu/e840d9158f784733a9f0f27bd60ad433~tplv-ke512zj2cu-jpg.jpeg?x-expires=1718425011&x-signature=zltShSxIkbLay7dlA1oR4KwoyPM%3D" + ] +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/MatchTaskBox/MatchTaskBoxAddRoomTaskV2Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/MatchTaskBox/MatchTaskBoxAddRoomTaskV2Response.json new file mode 100644 index 00000000..980d63a7 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/MatchTaskBox/MatchTaskBoxAddRoomTaskV2Response.json @@ -0,0 +1,9 @@ +{ + "err_no": 0, + "err_msg": "SUCCESS", + "log_id": "202008121419360101980821035705926A", + "data": { + "task_id": 720992698146361, + "task_url": "https://m.zjbyte.net/share/douyin/?token=e32199427d4ebe5b*****3b9a86784ab&share_channel=scan" + } +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/MatchTaskBox/MatchTaskBoxAddTaskV2Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/MatchTaskBox/MatchTaskBoxAddTaskV2Request.json new file mode 100644 index 00000000..008739fe --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/MatchTaskBox/MatchTaskBoxAddTaskV2Request.json @@ -0,0 +1,16 @@ +{ + "task_name": "测试12333", + "access_token": "xxxx", + "task_settle_type": 1, + "appid": "tt933ee5830c062fa6", + "start_page": "page/index=1", + "anchor_title": "测试锚点标题", + "task_icon": "https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fpic.soutu123.cn%2Felement_origin_min_pic%2F01%2F35%2F26%2F55573bdad4cb2f4.jpg%21%2Ffw%2F700%2Fquality%2F90%2Funsharp%2Ftrue%2Fcompress%2Ftrue&refer=http%3A%2F%2Fpic.soutu123.cn&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1621156196&t=848be9cae3f5bfb86a12d5021cbf9c1f", + "task_start_time": 1618285226, + "task_end_time": 1620963626, + "task_desc": "1. sss
2.sss2", + "refer_videos": [ "http://douyin.com/Z0JRdbe/", "http://douyin.com/beeagag/" ], + "task_tags": [ "测试类", "心理" ], + "refer_ma_captures": [ "https://static.runoob.com/images/demo/demo1.jpg", "https://static.runoob.com/images/demo/demo2.jpg" ], + "douyin_ids": [ "lw123456", "lv789" ] +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/MatchTaskBox/MatchTaskBoxAddTaskV2Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/MatchTaskBox/MatchTaskBoxAddTaskV2Response.json new file mode 100644 index 00000000..e4cf4265 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/MatchTaskBox/MatchTaskBoxAddTaskV2Response.json @@ -0,0 +1,8 @@ +{ + "err_no": 0, + "err_msg": "success", + "log_id": "202008121419360101980821035705926A", + "data": { + "task_id": 720992698146361 + } +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/MatchTaskBox/MatchTaskBoxQueryAppTaskIdV2Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/MatchTaskBox/MatchTaskBoxQueryAppTaskIdV2Request.json new file mode 100644 index 00000000..fa1c10e7 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/MatchTaskBox/MatchTaskBoxQueryAppTaskIdV2Request.json @@ -0,0 +1,4 @@ +{ + "create_start_time": 1657728000, + "create_end_time": 1658073600 +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/MatchTaskBox/MatchTaskBoxQueryAppTaskIdV2Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/MatchTaskBox/MatchTaskBoxQueryAppTaskIdV2Response.json new file mode 100644 index 00000000..86540e26 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/MatchTaskBox/MatchTaskBoxQueryAppTaskIdV2Response.json @@ -0,0 +1,12 @@ +{ + "err_no": 0, + "err_msg": "success", + "log_id": "202008121419360101980821035705926A", + "data": { + "task_ids": [ + 1130941336206704600, + 1130954062622638100, + 1130965975075143700 + ] + } +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/MatchTaskBox/MatchTaskBoxQueryBillLinkV2Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/MatchTaskBox/MatchTaskBoxQueryBillLinkV2Request.json new file mode 100644 index 00000000..d06e7de4 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/MatchTaskBox/MatchTaskBoxQueryBillLinkV2Request.json @@ -0,0 +1,3 @@ +{ + "bill_date": "2023-11-11" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/MatchTaskBox/MatchTaskBoxQueryBillLinkV2Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/MatchTaskBox/MatchTaskBoxQueryBillLinkV2Response.json new file mode 100644 index 00000000..bed3705a --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/MatchTaskBox/MatchTaskBoxQueryBillLinkV2Response.json @@ -0,0 +1,8 @@ +{ + "data": { + "bill_link": "https://p9-taskbox-sign.byteimg.com/tos-cn-i-ma097vhtnq/fd3fdb160c7a4593a4aee47267c78.csv?x-expires=1701064092&x-signature=c1BKmfVnvByJFTHGqWGWPXz00XE%3D" + }, + "err_no": 12345, + "err_msg": "aZv2LzZdM8", + "log_id": "yZj5AgQF2E" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/MatchTaskBox/MatchTaskBoxQueryTaskInfoV2Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/MatchTaskBox/MatchTaskBoxQueryTaskInfoV2Request.json new file mode 100644 index 00000000..f526f082 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/MatchTaskBox/MatchTaskBoxQueryTaskInfoV2Request.json @@ -0,0 +1,6 @@ +{ + "query_params_type": 1, + "query_params_content": "3421314523543241", + "page_num": 1, + "page_size": 10 +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/MatchTaskBox/MatchTaskBoxQueryTaskInfoV2Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/MatchTaskBox/MatchTaskBoxQueryTaskInfoV2Response.json new file mode 100644 index 00000000..053e273e --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/MatchTaskBox/MatchTaskBoxQueryTaskInfoV2Response.json @@ -0,0 +1,53 @@ +{ + "err_no": 0, + "err_msg": "success", + "log_id": "202008121419360101980821035705926A", + "data": { + "page_count": 1, + "total": 1, + "app_id": "ttf31985a46c214faf", + "tasks": [ + { + "anchor_title": "一个测试任务", + "appid": "ttcfdbb96650e33350", + "payment_allocate_ratio": 7000, + "platform_address_app": "subPackage/pages/taskDetail/index?taskId=7159000769277214764&enter_from=7", + "platform_address_web": "http://boe.m.zjbyte.net/share/douyin/?token=bd9ce2083d6aed332dcd9f9721b91ec4&share_channel=scan", + "refer_ma_captures": [ + "http://p-boe-sign.bytedance.net/tos-boe-i-giyy2m8f28/368d6285a0514fd3a230c2bd0873f2d3~tplv-giyy2m8f28-jpg.image?x-orig-authkey=boeorigin&x-orig-expires=1763898974&x-orig-sign=F8XZRENkmZOanX5JZt9LoiaQiws%3D", + "http://p-boe-sign.bytedance.net/tos-boe-i-giyy2m8f28/f83566dd4b924791bd0364af588cad76~tplv-giyy2m8f28-jpg.image?x-orig-authkey=boeorigin&x-orig-expires=1763898974&x-orig-sign=2NBX9lYCvAyq681nR%2FGUlZudvZU%3D" + ], + "refer_video_captures": [ + "" + ], + "reject_reason": "落地页发生变更", + "start_page": "page/detail/detail?id=1", + "status": 5, + "task_desc": "一个测试任务aaa一个测试任务aaa一个测试任务aaa一个测试任务aaa一个测试任务aaa", + "task_end_time": 1669695653, + "task_icon": "http://p-boe-sign.bytedance.net/tos-boe-i-giyy2m8f28/93e9ed06180c4c15b397e81653b20313~tplv-giyy2m8f28-144x144.image?x-orig-authkey=boeorigin&x-orig-expires=1763898974&x-orig-sign=BydBniNTuG%2FoYlVhHNVIRdZNcaU%3D", + "task_id": 7159000769277214764, + "task_name": "一个测试任务aaa", + "task_refund_period": 0, + "task_settle_type": 1, + "task_start_time": 1666846303, + "task_tags": [ + "娱乐测试", + "小说" + ], + "task_type": 1, + "oriented_talent_rel_list": [ + { + "cooperation_state": 2, + "douyin_id": "lw123456" + }, + { + "cancel_operator": 1, + "cooperation_state": 3, + "douyin_id": "lv789" + } + ] + } + ] + } +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/MatchTaskBox/MatchTaskBoxQueryVideoSummaryDataV2Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/MatchTaskBox/MatchTaskBoxQueryVideoSummaryDataV2Request.json new file mode 100644 index 00000000..6217d066 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/MatchTaskBox/MatchTaskBoxQueryVideoSummaryDataV2Request.json @@ -0,0 +1,3 @@ +{ + "video_ids": [ "939316235146214973" ] +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/MatchTaskBox/MatchTaskBoxQueryVideoSummaryDataV2Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/MatchTaskBox/MatchTaskBoxQueryVideoSummaryDataV2Response.json new file mode 100644 index 00000000..44ac4e9a --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/MatchTaskBox/MatchTaskBoxQueryVideoSummaryDataV2Response.json @@ -0,0 +1,12 @@ +{ + "data": [ + { + "billing_gmv_td": 42131038, + "biling_refund_gmv_td": 657030, + "video_id": 7918906790713390000, + "task_id": 3058041294486364000, + "agent_id": "a2GotnoTIz", + "publish_time": 1685664000 + } + ] +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/MatchTaskBox/MatchTaskBoxUpdateStatusV2Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/MatchTaskBox/MatchTaskBoxUpdateStatusV2Request.json new file mode 100644 index 00000000..2d5080e3 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/MatchTaskBox/MatchTaskBoxUpdateStatusV2Request.json @@ -0,0 +1,4 @@ +{ + "task_id": 12333, + "task_status": 2 +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/MatchTaskBox/MatchTaskBoxUpdateStatusV2Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/MatchTaskBox/MatchTaskBoxUpdateStatusV2Response.json new file mode 100644 index 00000000..e4cf4265 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/MatchTaskBox/MatchTaskBoxUpdateStatusV2Response.json @@ -0,0 +1,8 @@ +{ + "err_no": 0, + "err_msg": "success", + "log_id": "202008121419360101980821035705926A", + "data": { + "task_id": 720992698146361 + } +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/MatchTaskBox/MatchTaskBoxUpdateTaskV2Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/MatchTaskBox/MatchTaskBoxUpdateTaskV2Request.json new file mode 100644 index 00000000..b39b5c81 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/MatchTaskBox/MatchTaskBoxUpdateTaskV2Request.json @@ -0,0 +1,21 @@ +{ + "task_id": 12333, + "task_name": "测试12333", + "task_settle_type": 1, + "appid": "tt933ee5830c062fa6", + "start_page": "xxx", + "anchor_title": "测试锚点标", + "task_icon": "xxx", + "task_start_time": 1618285226, + "task_end_time": 1620963626, + "task_desc": "1. sss
2.sss2", + "refer_videos": [ + "http://boe.v.douyin.com/Z0JRdbe/", + "http://boe.v.douyin.com/Z0JFXvp/" + ], + "task_tags": [ "测试类", "心理" ], + "refer_ma_captures": [ + "https://static.runoob.com/images/demo/demo1.jpg", + "https://static.runoob.com/images/demo/demo2.jpg" + ] +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/MatchTaskBox/MatchTaskBoxUpdateTaskV2Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/MatchTaskBox/MatchTaskBoxUpdateTaskV2Response.json new file mode 100644 index 00000000..e4cf4265 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/MatchTaskBox/MatchTaskBoxUpdateTaskV2Response.json @@ -0,0 +1,8 @@ +{ + "err_no": 0, + "err_msg": "success", + "log_id": "202008121419360101980821035705926A", + "data": { + "task_id": 720992698146361 + } +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/Capacity/SubscribeNotification/AppsCapacityAddAppSubscribeNotificationTemplateV1Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/NotificationSubscription/NotificationSubscriptionAddAppTemplateV2Request.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/Capacity/SubscribeNotification/AppsCapacityAddAppSubscribeNotificationTemplateV1Request.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/NotificationSubscription/NotificationSubscriptionAddAppTemplateV2Request.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/NotificationSubscription/NotificationSubscriptionAddAppTemplateV2Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/NotificationSubscription/NotificationSubscriptionAddAppTemplateV2Response.json new file mode 100644 index 00000000..e173e1c6 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/NotificationSubscription/NotificationSubscriptionAddAppTemplateV2Response.json @@ -0,0 +1,8 @@ +{ + "err_no": 0, + "err_msg": "success", + "log_id": "202008121419360101980821035705926A", + "data": { + "msg_id": "MSG123456" + } +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/Capacity/SubscribeNotification/AppsCapacityCreateAppSubscribeNotificationTemplateV1Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/NotificationSubscription/NotificationSubscriptionCreateTemplateV2Request.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/Capacity/SubscribeNotification/AppsCapacityCreateAppSubscribeNotificationTemplateV1Request.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/NotificationSubscription/NotificationSubscriptionCreateTemplateV2Request.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/NotificationSubscription/NotificationSubscriptionNotifyUserV2Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/NotificationSubscription/NotificationSubscriptionNotifyUserV2Request.json new file mode 100644 index 00000000..a7cf00b8 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/NotificationSubscription/NotificationSubscriptionNotifyUserV2Request.json @@ -0,0 +1,9 @@ +{ + "msg_id": "MSG38489d04608c5f0fdeb565fc5114afff6410*******", + "open_id": "36d4bd3c8****", + "data": { + "物品名称": "测试值0", + "购买金额": "测试值1" + }, + "page": "pages/index?a=b" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/NotificationSubscription/NotificationSubscriptionQueryAppTemplateV2Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/NotificationSubscription/NotificationSubscriptionQueryAppTemplateV2Response.json new file mode 100644 index 00000000..60609958 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/NotificationSubscription/NotificationSubscriptionQueryAppTemplateV2Response.json @@ -0,0 +1,24 @@ +{ + "err_msg": "", + "err_no": 0, + "log_id": "202008121419360101980821035705926A", + "data": { + "total_count": 1, + "template_list": [ + { + "msg_id": "MSG122591232", + "template_id": 12259, + "classification": 1, + "title": "拍摄通知", + "keyword_list": [ + "时间", + "地点" + ], + "category_name": "摄影/扩印", + "host_list": [ + "toutiao" + ] + } + ] + } +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/NotificationSubscription/NotificationSubscriptionQueryCreatedTemplateListV2Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/NotificationSubscription/NotificationSubscriptionQueryCreatedTemplateListV2Response.json new file mode 100644 index 00000000..8595a574 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/NotificationSubscription/NotificationSubscriptionQueryCreatedTemplateListV2Response.json @@ -0,0 +1,25 @@ +{ + "err_msg": "", + "err_no": 0, + "log_id": "202008121419360101980821035705926A", + "data": { + "total_count": 1, + "template_list": [ + { + "title": "xxxx", + "keyword_list": [ + "xx", + "xxx" + ], + "classification": 1, + "host_list": [ + "toutiao", + "douyin" + ], + "operating_time": 1672835937, + "status": 1, + "fail_reason": "" + } + ] + } +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/NotificationSubscription/NotificationSubscriptionQueryTemplateListV2Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/NotificationSubscription/NotificationSubscriptionQueryTemplateListV2Response.json new file mode 100644 index 00000000..cfdfc1e7 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/NotificationSubscription/NotificationSubscriptionQueryTemplateListV2Response.json @@ -0,0 +1,23 @@ +{ + "err_msg": "success", + "err_no": 0, + "log_id": "202008121419360101980821035705926A", + "data": { + "total_count": 1, + "template_list": [ + { + "template_id": 12259, + "classification": 1, + "title": "拍摄通知", + "keyword_list": [ + "时间", + "地点" + ], + "category_name": "摄影/扩印", + "host_list": [ + "toutiao" + ] + } + ] + } +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/AppsJsCode2SessionV2Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/AppsJsCode2SessionV2Request.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/AppsJsCode2SessionV2Request.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/AppsJsCode2SessionV2Request.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/AppsJsCode2SessionV2Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/AppsJsCode2SessionV2Response.json similarity index 97% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/AppsJsCode2SessionV2Response.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/AppsJsCode2SessionV2Response.json index 4cf9bea5..a92c3e4f 100644 --- a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/AppsJsCode2SessionV2Response.json +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/AppsJsCode2SessionV2Response.json @@ -1,4 +1,4 @@ -{ +{ "err_no": 0, "err_tips": "success", "data": { diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/AppsTokenV2Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/AppsTokenV2Request.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/AppsTokenV2Request.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/AppsTokenV2Request.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/AppsTokenV2Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/AppsTokenV2Response.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/AppsTokenV2Response.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/AppsTokenV2Response.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/Capacity/AppsCapacityUploadMaterialV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/Capacity/AppsCapacityUploadMaterialV1Response.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/Capacity/AppsCapacityUploadMaterialV1Response.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/Capacity/AppsCapacityUploadMaterialV1Response.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/Capacity/AwemeCapacity/AppsCapacityApplyAwemePermissionV1Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/Capacity/Aweme/AppsCapacityApplyAwemePermissionV1Request.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/Capacity/AwemeCapacity/AppsCapacityApplyAwemePermissionV1Request.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/Capacity/Aweme/AppsCapacityApplyAwemePermissionV1Request.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/Capacity/AwemeCapacity/AppsCapacityApplyScopeQuotaV1Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/Capacity/Aweme/AppsCapacityApplyScopeQuotaV1Request.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/Capacity/AwemeCapacity/AppsCapacityApplyScopeQuotaV1Request.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/Capacity/Aweme/AppsCapacityApplyScopeQuotaV1Request.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/Capacity/AwemeCapacity/AppsCapacityQueryAwemePermissionListV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/Capacity/Aweme/AppsCapacityQueryAwemePermissionListV1Response.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/Capacity/AwemeCapacity/AppsCapacityQueryAwemePermissionListV1Response.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/Capacity/Aweme/AppsCapacityQueryAwemePermissionListV1Response.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/Capacity/AwemeCapacity/AppsCapacityQueryScopeQuotaDetailV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/Capacity/Aweme/AppsCapacityQueryScopeQuotaDetailV1Response.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/Capacity/AwemeCapacity/AppsCapacityQueryScopeQuotaDetailV1Response.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/Capacity/Aweme/AppsCapacityQueryScopeQuotaDetailV1Response.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/Capacity/ClueComponent/AppsCapacityCreateClueComponentInfoV1Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/Capacity/ClueComponent/AppsCapacityCreateClueComponentInfoV1Request.json new file mode 100644 index 00000000..4e19f859 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/Capacity/ClueComponent/AppsCapacityCreateClueComponentInfoV1Request.json @@ -0,0 +1,5 @@ +{ + "config_name": "线索组件测试1", + "region": "110101", + "category_id": "8,9,12" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/Capacity/ClueComponent/AppsCapacityCreateClueComponentInfoV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/Capacity/ClueComponent/AppsCapacityCreateClueComponentInfoV1Response.json new file mode 100644 index 00000000..fefabd1b --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/Capacity/ClueComponent/AppsCapacityCreateClueComponentInfoV1Response.json @@ -0,0 +1,8 @@ +{ + "err_no": 0, + "err_msg": "success", + "log_id": "xxxx", + "data": { + "config_id": "xxxx" + } +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/Capacity/ClueComponent/AppsCapacityDeleteClueComponentInfoV1Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/Capacity/ClueComponent/AppsCapacityDeleteClueComponentInfoV1Request.json new file mode 100644 index 00000000..7c905247 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/Capacity/ClueComponent/AppsCapacityDeleteClueComponentInfoV1Request.json @@ -0,0 +1,3 @@ +{ + "config_id": "xxx" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/Capacity/ClueComponent/AppsCapacityQueryClueComponentInfoV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/Capacity/ClueComponent/AppsCapacityQueryClueComponentInfoV1Response.json new file mode 100644 index 00000000..ea0efaac --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/Capacity/ClueComponent/AppsCapacityQueryClueComponentInfoV1Response.json @@ -0,0 +1,20 @@ +{ + "err_no": 0, + "err_msg": "success", + "log_id": "xxx", + "data": { + "clue_component_list": [ + { + "config_id": "xxx", + "config_name": "xxx", + "region": "xxx", + "category_id": "xxx", + "state": "xxx", + "region_name": "xxx", + "category_name": "xxx" + } + ], + "cert_status": false, + "total": 32 + } +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/Capacity/ClueComponent/AppsCapacityUpdateClueComponentInfoV1Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/Capacity/ClueComponent/AppsCapacityUpdateClueComponentInfoV1Request.json new file mode 100644 index 00000000..ecbcb6d7 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/Capacity/ClueComponent/AppsCapacityUpdateClueComponentInfoV1Request.json @@ -0,0 +1,6 @@ +{ + "config_id": "xxx", + "config_name": "线索组件测试1", + "region": "110101", + "category_id": "8,9,12" +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/Capacity/FollowAweme/AppsCapacityBindAwemeUserV1Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/Capacity/FollowAweme/AppsCapacityBindAwemeUserV1Request.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/Capacity/FollowAweme/AppsCapacityBindAwemeUserV1Request.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/Capacity/FollowAweme/AppsCapacityBindAwemeUserV1Request.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/Capacity/FollowAweme/AppsCapacityGetAwemeUserBindQrcodeV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/Capacity/FollowAweme/AppsCapacityGetAwemeUserBindQrcodeV1Response.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/Capacity/FollowAweme/AppsCapacityGetAwemeUserBindQrcodeV1Response.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/Capacity/FollowAweme/AppsCapacityGetAwemeUserBindQrcodeV1Response.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/Capacity/FollowAweme/AppsCapacityQueryAwemeUserBindListV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/Capacity/FollowAweme/AppsCapacityQueryAwemeUserBindListV1Response.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/Capacity/FollowAweme/AppsCapacityQueryAwemeUserBindListV1Response.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/Capacity/FollowAweme/AppsCapacityQueryAwemeUserBindListV1Response.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/Capacity/FollowAweme/AppsCapacityUnbindAwemeUserV1Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/Capacity/FollowAweme/AppsCapacityUnbindAwemeUserV1Request.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/Capacity/FollowAweme/AppsCapacityUnbindAwemeUserV1Request.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/Capacity/FollowAweme/AppsCapacityUnbindAwemeUserV1Request.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/Capacity/Mount/AppsCapacityApplyCapacityV1Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/Capacity/Mount/AppsCapacityApplyCapacityV1Request.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/Capacity/Mount/AppsCapacityApplyCapacityV1Request.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/Capacity/Mount/AppsCapacityApplyCapacityV1Request.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/Capacity/Mount/AppsCapacityBindSelfMountUserV1Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/Capacity/Mount/AppsCapacityBindSelfMountUserV1Request.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/Capacity/Mount/AppsCapacityBindSelfMountUserV1Request.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/Capacity/Mount/AppsCapacityBindSelfMountUserV1Request.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/Capacity/Mount/AppsCapacityGetSelfMountBindQrcodeV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/Capacity/Mount/AppsCapacityGetSelfMountBindQrcodeV1Response.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/Capacity/Mount/AppsCapacityGetSelfMountBindQrcodeV1Response.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/Capacity/Mount/AppsCapacityGetSelfMountBindQrcodeV1Response.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/Capacity/Mount/AppsCapacityQueryApplyStatusV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/Capacity/Mount/AppsCapacityQueryApplyStatusV1Response.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/Capacity/Mount/AppsCapacityQueryApplyStatusV1Response.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/Capacity/Mount/AppsCapacityQueryApplyStatusV1Response.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/Capacity/Mount/AppsCapacityQuerySelfMountUserListV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/Capacity/Mount/AppsCapacityQuerySelfMountUserListV1Response.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/Capacity/Mount/AppsCapacityQuerySelfMountUserListV1Response.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/Capacity/Mount/AppsCapacityQuerySelfMountUserListV1Response.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/Capacity/Mount/AppsCapacityUnbindSelfMountUserV1Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/Capacity/Mount/AppsCapacityUnbindSelfMountUserV1Request.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/Capacity/Mount/AppsCapacityUnbindSelfMountUserV1Request.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/Capacity/Mount/AppsCapacityUnbindSelfMountUserV1Request.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/Capacity/Mount/Capcut/AppsCapacityQueryCapcutInfoV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/Capacity/Mount/Capcut/AppsCapacityQueryCapcutInfoV1Response.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/Capacity/Mount/Capcut/AppsCapacityQueryCapcutInfoV1Response.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/Capacity/Mount/Capcut/AppsCapacityQueryCapcutInfoV1Response.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/Capacity/Mount/Capcut/AppsCapacityQueryCapcutTemplateListV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/Capacity/Mount/Capcut/AppsCapacityQueryCapcutTemplateListV1Response.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/Capacity/Mount/Capcut/AppsCapacityQueryCapcutTemplateListV1Response.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/Capacity/Mount/Capcut/AppsCapacityQueryCapcutTemplateListV1Response.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/Capacity/Mount/Capcut/AppsCapacityUpdateCapcutTemplateStatusV1Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/Capacity/Mount/Capcut/AppsCapacityUpdateCapcutTemplateStatusV1Request.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/Capacity/Mount/Capcut/AppsCapacityUpdateCapcutTemplateStatusV1Request.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/Capacity/Mount/Capcut/AppsCapacityUpdateCapcutTemplateStatusV1Request.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/Capacity/SimpleQrcode/AppsCapacityAddSimpleQrcodeBindV1Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/Capacity/SimpleQrcode/AppsCapacityAddSimpleQrcodeBindV1Request.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/Capacity/SimpleQrcode/AppsCapacityAddSimpleQrcodeBindV1Request.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/Capacity/SimpleQrcode/AppsCapacityAddSimpleQrcodeBindV1Request.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/Capacity/SimpleQrcode/AppsCapacityDeleteSimpleQrcodeBindV1Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/Capacity/SimpleQrcode/AppsCapacityDeleteSimpleQrcodeBindV1Request.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/Capacity/SimpleQrcode/AppsCapacityDeleteSimpleQrcodeBindV1Request.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/Capacity/SimpleQrcode/AppsCapacityDeleteSimpleQrcodeBindV1Request.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/Capacity/SimpleQrcode/AppsCapacityQuerySimpleQrcodeBindListV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/Capacity/SimpleQrcode/AppsCapacityQuerySimpleQrcodeBindListV1Response.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/Capacity/SimpleQrcode/AppsCapacityQuerySimpleQrcodeBindListV1Response.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/Capacity/SimpleQrcode/AppsCapacityQuerySimpleQrcodeBindListV1Response.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/Capacity/SimpleQrcode/AppsCapacityUpdateSimpleQrcodeBindStatusV1Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/Capacity/SimpleQrcode/AppsCapacityUpdateSimpleQrcodeBindStatusV1Request.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/Capacity/SimpleQrcode/AppsCapacityUpdateSimpleQrcodeBindStatusV1Request.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/Capacity/SimpleQrcode/AppsCapacityUpdateSimpleQrcodeBindStatusV1Request.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/Capacity/SimpleQrcode/AppsCapacityUpdateSimpleQrcodeBindV1Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/Capacity/SimpleQrcode/AppsCapacityUpdateSimpleQrcodeBindV1Request.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/Capacity/SimpleQrcode/AppsCapacityUpdateSimpleQrcodeBindV1Request.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/Capacity/SimpleQrcode/AppsCapacityUpdateSimpleQrcodeBindV1Request.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/Capacity/SubscribeNotification/AppsCapacityAddAppSubscribeNotificationTemplateV1Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/Capacity/SubscribeNotification/AppsCapacityAddAppSubscribeNotificationTemplateV1Request.json new file mode 100644 index 00000000..a89194a8 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/Capacity/SubscribeNotification/AppsCapacityAddAppSubscribeNotificationTemplateV1Request.json @@ -0,0 +1,4 @@ +{ + "template_id": 12259, + "keyword_list": [ "时间", "风格" ] +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/Capacity/SubscribeNotification/AppsCapacityAddAppSubscribeNotificationTemplateV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/Capacity/SubscribeNotification/AppsCapacityAddAppSubscribeNotificationTemplateV1Response.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/Capacity/SubscribeNotification/AppsCapacityAddAppSubscribeNotificationTemplateV1Response.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/Capacity/SubscribeNotification/AppsCapacityAddAppSubscribeNotificationTemplateV1Response.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/Capacity/SubscribeNotification/AppsCapacityCreateAppSubscribeNotificationTemplateV1Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/Capacity/SubscribeNotification/AppsCapacityCreateAppSubscribeNotificationTemplateV1Request.json new file mode 100644 index 00000000..25e1b3ff --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/Capacity/SubscribeNotification/AppsCapacityCreateAppSubscribeNotificationTemplateV1Request.json @@ -0,0 +1,7 @@ +{ + "title": "xxx", + "keyword_list": [ "xxx", "xx" ], + "category_ids": "8,9,16", + "classification": 1, + "host_list": [ "douyin", "toutiao" ] +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/Capacity/SubscribeNotification/AppsCapacityDeleteAppSubscribeNotificationTemplateV1Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/Capacity/SubscribeNotification/AppsCapacityDeleteAppSubscribeNotificationTemplateV1Request.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/Capacity/SubscribeNotification/AppsCapacityDeleteAppSubscribeNotificationTemplateV1Request.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/Capacity/SubscribeNotification/AppsCapacityDeleteAppSubscribeNotificationTemplateV1Request.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/Capacity/SubscribeNotification/AppsCapacityModifyAppSubscribeNotificationTemplateV1Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/Capacity/SubscribeNotification/AppsCapacityModifyAppSubscribeNotificationTemplateV1Request.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/Capacity/SubscribeNotification/AppsCapacityModifyAppSubscribeNotificationTemplateV1Request.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/Capacity/SubscribeNotification/AppsCapacityModifyAppSubscribeNotificationTemplateV1Request.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/Capacity/SubscribeNotification/AppsCapacityQueryAppSubscribeNotificationTemplateV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/Capacity/SubscribeNotification/AppsCapacityQueryAppSubscribeNotificationTemplateV1Response.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/Capacity/SubscribeNotification/AppsCapacityQueryAppSubscribeNotificationTemplateV1Response.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/Capacity/SubscribeNotification/AppsCapacityQueryAppSubscribeNotificationTemplateV1Response.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/Capacity/SubscribeNotification/AppsCapacityQueryCreatedSubscribeNotificationTemplateListV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/Capacity/SubscribeNotification/AppsCapacityQueryCreatedSubscribeNotificationTemplateListV1Response.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/Capacity/SubscribeNotification/AppsCapacityQueryCreatedSubscribeNotificationTemplateListV1Response.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/Capacity/SubscribeNotification/AppsCapacityQueryCreatedSubscribeNotificationTemplateListV1Response.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/Capacity/SubscribeNotification/AppsCapacityQuerySubscribeNotificationTemplateListV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/Capacity/SubscribeNotification/AppsCapacityQuerySubscribeNotificationTemplateListV1Response.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/Capacity/SubscribeNotification/AppsCapacityQuerySubscribeNotificationTemplateListV1Response.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/Capacity/SubscribeNotification/AppsCapacityQuerySubscribeNotificationTemplateListV1Response.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/Capacity/TrafficPermission/AppsCapacityAddAdPlacementV1Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/Capacity/TrafficPermission/AppsCapacityAddAdPlacementV1Request.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/Capacity/TrafficPermission/AppsCapacityAddAdPlacementV1Request.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/Capacity/TrafficPermission/AppsCapacityAddAdPlacementV1Request.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/Capacity/TrafficPermission/AppsCapacityOpenTrafficPermissionV1Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/Capacity/TrafficPermission/AppsCapacityOpenTrafficPermissionV1Request.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/Capacity/TrafficPermission/AppsCapacityOpenTrafficPermissionV1Request.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/Capacity/TrafficPermission/AppsCapacityOpenTrafficPermissionV1Request.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/Capacity/TrafficPermission/AppsCapacityQueryAdIncomeV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/Capacity/TrafficPermission/AppsCapacityQueryAdIncomeV1Response.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/Capacity/TrafficPermission/AppsCapacityQueryAdIncomeV1Response.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/Capacity/TrafficPermission/AppsCapacityQueryAdIncomeV1Response.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/Capacity/TrafficPermission/AppsCapacityQueryAdPlacementListV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/Capacity/TrafficPermission/AppsCapacityQueryAdPlacementListV1Response.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/Capacity/TrafficPermission/AppsCapacityQueryAdPlacementListV1Response.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/Capacity/TrafficPermission/AppsCapacityQueryAdPlacementListV1Response.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/Capacity/TrafficPermission/AppsCapacityQueryAdSettlementListV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/Capacity/TrafficPermission/AppsCapacityQueryAdSettlementListV1Response.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/Capacity/TrafficPermission/AppsCapacityQueryAdSettlementListV1Response.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/Capacity/TrafficPermission/AppsCapacityQueryAdSettlementListV1Response.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/Capacity/TrafficPermission/AppsCapacityQueryTrafficPermissionStatusV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/Capacity/TrafficPermission/AppsCapacityQueryTrafficPermissionStatusV1Response.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/Capacity/TrafficPermission/AppsCapacityQueryTrafficPermissionStatusV1Response.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/Capacity/TrafficPermission/AppsCapacityQueryTrafficPermissionStatusV1Response.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/Capacity/TrafficPermission/AppsCapacityUpdateAdPlacementStatusV1Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/Capacity/TrafficPermission/AppsCapacityUpdateAdPlacementStatusV1Request.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/Capacity/TrafficPermission/AppsCapacityUpdateAdPlacementStatusV1Request.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/Capacity/TrafficPermission/AppsCapacityUpdateAdPlacementStatusV1Request.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/Censor/AppsCensorImageRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/Censor/AppsCensorImageRequest.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/Censor/AppsCensorImageRequest.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/Censor/AppsCensorImageRequest.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/Censor/AppsCensorImageResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/Censor/AppsCensorImageResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/Censor/AppsCensorImageResponse.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/Censor/AppsCensorImageResponse.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/Chat/AppsChatCustomerServiceUrlResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/Chat/AppsChatCustomerServiceUrlResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/Chat/AppsChatCustomerServiceUrlResponse.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/Chat/AppsChatCustomerServiceUrlResponse.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/CustomerService/AppsCustomerServiceUrlResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/CustomerService/AppsCustomerServiceUrlResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/CustomerService/AppsCustomerServiceUrlResponse.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/CustomerService/AppsCustomerServiceUrlResponse.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/DataAnalysis/TransactionAnalysis/AppsDataAnalysisQueryDealOverviewDataV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/DataAnalysis/TransactionAnalysis/AppsDataAnalysisQueryDealOverviewDataV1Response.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/DataAnalysis/TransactionAnalysis/AppsDataAnalysisQueryDealOverviewDataV1Response.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/DataAnalysis/TransactionAnalysis/AppsDataAnalysisQueryDealOverviewDataV1Response.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/DataAnalysis/TransactionAnalysis/AppsDataAnalysisQueryLiveDealDataV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/DataAnalysis/TransactionAnalysis/AppsDataAnalysisQueryLiveDealDataV1Response.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/DataAnalysis/TransactionAnalysis/AppsDataAnalysisQueryLiveDealDataV1Response.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/DataAnalysis/TransactionAnalysis/AppsDataAnalysisQueryLiveDealDataV1Response.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/DataAnalysis/TransactionAnalysis/AppsDataAnalysisQueryLiveRoomDataV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/DataAnalysis/TransactionAnalysis/AppsDataAnalysisQueryLiveRoomDataV1Response.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/DataAnalysis/TransactionAnalysis/AppsDataAnalysisQueryLiveRoomDataV1Response.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/DataAnalysis/TransactionAnalysis/AppsDataAnalysisQueryLiveRoomDataV1Response.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/DataAnalysis/TransactionAnalysis/AppsDataAnalysisQueryLiveRoomV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/DataAnalysis/TransactionAnalysis/AppsDataAnalysisQueryLiveRoomV1Response.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/DataAnalysis/TransactionAnalysis/AppsDataAnalysisQueryLiveRoomV1Response.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/DataAnalysis/TransactionAnalysis/AppsDataAnalysisQueryLiveRoomV1Response.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/DataAnalysis/TransactionAnalysis/AppsDataAnalysisQueryProductDealDataV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/DataAnalysis/TransactionAnalysis/AppsDataAnalysisQueryProductDealDataV1Response.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/DataAnalysis/TransactionAnalysis/AppsDataAnalysisQueryProductDealDataV1Response.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/DataAnalysis/TransactionAnalysis/AppsDataAnalysisQueryProductDealDataV1Response.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/DataAnalysis/TransactionAnalysis/AppsDataAnalysisQueryVideoDealDataV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/DataAnalysis/TransactionAnalysis/AppsDataAnalysisQueryVideoDealDataV1Response.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/DataAnalysis/TransactionAnalysis/AppsDataAnalysisQueryVideoDealDataV1Response.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/DataAnalysis/TransactionAnalysis/AppsDataAnalysisQueryVideoDealDataV1Response.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/DataAnalysis/UserAnalysis/AppsDataAnalysisQueryBehaviorDataV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/DataAnalysis/UserAnalysis/AppsDataAnalysisQueryBehaviorDataV1Response.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/DataAnalysis/UserAnalysis/AppsDataAnalysisQueryBehaviorDataV1Response.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/DataAnalysis/UserAnalysis/AppsDataAnalysisQueryBehaviorDataV1Response.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/DataAnalysis/UserAnalysis/AppsDataAnalysisQueryClientDataV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/DataAnalysis/UserAnalysis/AppsDataAnalysisQueryClientDataV1Response.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/DataAnalysis/UserAnalysis/AppsDataAnalysisQueryClientDataV1Response.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/DataAnalysis/UserAnalysis/AppsDataAnalysisQueryClientDataV1Response.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/DataAnalysis/UserAnalysis/AppsDataAnalysisQueryPageDataV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/DataAnalysis/UserAnalysis/AppsDataAnalysisQueryPageDataV1Response.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/DataAnalysis/UserAnalysis/AppsDataAnalysisQueryPageDataV1Response.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/DataAnalysis/UserAnalysis/AppsDataAnalysisQueryPageDataV1Response.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/DataAnalysis/UserAnalysis/AppsDataAnalysisQueryRealTimeUserDataV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/DataAnalysis/UserAnalysis/AppsDataAnalysisQueryRealTimeUserDataV1Response.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/DataAnalysis/UserAnalysis/AppsDataAnalysisQueryRealTimeUserDataV1Response.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/DataAnalysis/UserAnalysis/AppsDataAnalysisQueryRealTimeUserDataV1Response.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/DataAnalysis/UserAnalysis/AppsDataAnalysisQueryRetentionDataV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/DataAnalysis/UserAnalysis/AppsDataAnalysisQueryRetentionDataV1Response.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/DataAnalysis/UserAnalysis/AppsDataAnalysisQueryRetentionDataV1Response.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/DataAnalysis/UserAnalysis/AppsDataAnalysisQueryRetentionDataV1Response.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/DataAnalysis/UserAnalysis/AppsDataAnalysisQuerySceneDataV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/DataAnalysis/UserAnalysis/AppsDataAnalysisQuerySceneDataV1Response.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/DataAnalysis/UserAnalysis/AppsDataAnalysisQuerySceneDataV1Response.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/DataAnalysis/UserAnalysis/AppsDataAnalysisQuerySceneDataV1Response.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/DataAnalysis/UserAnalysis/AppsDataAnalysisQueryUserPortraitDataV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/DataAnalysis/UserAnalysis/AppsDataAnalysisQueryUserPortraitDataV1Response.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/DataAnalysis/UserAnalysis/AppsDataAnalysisQueryUserPortraitDataV1Response.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/DataAnalysis/UserAnalysis/AppsDataAnalysisQueryUserPortraitDataV1Response.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/Live/AppsLiveSetBlackWhiteListV1Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/Live/AppsLiveSetBlackWhiteListV1Request.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/Live/AppsLiveSetBlackWhiteListV1Request.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/Live/AppsLiveSetBlackWhiteListV1Request.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/Message/AppsMessageCustomSendRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/Message/AppsMessageCustomSendRequest.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/Message/AppsMessageCustomSendRequest.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/Message/AppsMessageCustomSendRequest.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/Order/AppsOrderDeleteRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/Order/AppsOrderDeleteRequest.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/Order/AppsOrderDeleteRequest.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/Order/AppsOrderDeleteRequest.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/Order/AppsOrderPushV2Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/Order/AppsOrderPushV2Request.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/Order/AppsOrderPushV2Request.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/Order/AppsOrderPushV2Request.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/Order/AppsOrderPushV2Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/Order/AppsOrderPushV2Response.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/Order/AppsOrderPushV2Response.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/Order/AppsOrderPushV2Response.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/Qrcode/AppsQrcodeRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/Qrcode/AppsQrcodeRequest.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/Qrcode/AppsQrcodeRequest.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/Qrcode/AppsQrcodeRequest.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/ShareConfig/AppsShareConfigRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/ShareConfig/AppsShareConfigRequest.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/ShareConfig/AppsShareConfigRequest.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/ShareConfig/AppsShareConfigRequest.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/ShareConfig/AppsShareConfigResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/ShareConfig/AppsShareConfigResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/ShareConfig/AppsShareConfigResponse.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/ShareConfig/AppsShareConfigResponse.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/SubscribeNotification/AppsSubscribeNotificationDeveloperNotifyV1Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/SubscribeNotification/AppsSubscribeNotificationDeveloperNotifyV1Request.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/SubscribeNotification/AppsSubscribeNotificationDeveloperNotifyV1Request.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/SubscribeNotification/AppsSubscribeNotificationDeveloperNotifyV1Request.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/TaskBox/AppsTaskBoxAddTaskRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/TaskBox/AppsTaskBoxAddTaskRequest.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/TaskBox/AppsTaskBoxAddTaskRequest.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/TaskBox/AppsTaskBoxAddTaskRequest.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/TaskBox/AppsTaskBoxAddTaskResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/TaskBox/AppsTaskBoxAddTaskResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/TaskBox/AppsTaskBoxAddTaskResponse.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/TaskBox/AppsTaskBoxAddTaskResponse.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/TaskBox/AppsTaskBoxQueryAppTaskIdRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/TaskBox/AppsTaskBoxQueryAppTaskIdRequest.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/TaskBox/AppsTaskBoxQueryAppTaskIdRequest.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/TaskBox/AppsTaskBoxQueryAppTaskIdRequest.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/TaskBox/AppsTaskBoxQueryAppTaskIdResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/TaskBox/AppsTaskBoxQueryAppTaskIdResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/TaskBox/AppsTaskBoxQueryAppTaskIdResponse.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/TaskBox/AppsTaskBoxQueryAppTaskIdResponse.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/TaskBox/AppsTaskBoxQueryTaskVideoDataRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/TaskBox/AppsTaskBoxQueryTaskVideoDataRequest.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/TaskBox/AppsTaskBoxQueryTaskVideoDataRequest.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/TaskBox/AppsTaskBoxQueryTaskVideoDataRequest.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/TaskBox/AppsTaskBoxQueryTaskVideoDataResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/TaskBox/AppsTaskBoxQueryTaskVideoDataResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/TaskBox/AppsTaskBoxQueryTaskVideoDataResponse.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/TaskBox/AppsTaskBoxQueryTaskVideoDataResponse.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/TaskBox/AppsTaskBoxUpdateOrientTalentsRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/TaskBox/AppsTaskBoxUpdateOrientTalentsRequest.json new file mode 100644 index 00000000..e62a4e33 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/TaskBox/AppsTaskBoxUpdateOrientTalentsRequest.json @@ -0,0 +1,10 @@ +{ + "access_token": "0801121846315443627a326645433874682b7347326", + "appid": "ttf31985a46c214faf", + "douyin_ids": [ + "lw1352552", + "9423515316" + ], + "op_type": 1, + "task_id": 7218760632718443557 +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/TaskBox/AppsTaskBoxUpdateOrientTalentsResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/TaskBox/AppsTaskBoxUpdateOrientTalentsResponse.json new file mode 100644 index 00000000..a0d4bf2e --- /dev/null +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/TaskBox/AppsTaskBoxUpdateOrientTalentsResponse.json @@ -0,0 +1,12 @@ +{ + "data": { + "update_info_list": [ + { + "douyin_id": "lw1352552", + "update_result": "请求成功,已添加" + } + ] + }, + "message": "success", + "error": 0 +} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/TaskBox/AppsTaskBoxUpdateStatusRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/TaskBox/AppsTaskBoxUpdateStatusRequest.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/TaskBox/AppsTaskBoxUpdateStatusRequest.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/TaskBox/AppsTaskBoxUpdateStatusRequest.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/TaskBox/AppsTaskBoxUpdateStatusResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/TaskBox/AppsTaskBoxUpdateStatusResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/TaskBox/AppsTaskBoxUpdateStatusResponse.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/TaskBox/AppsTaskBoxUpdateStatusResponse.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/TaskBox/AppsTaskBoxUpdateTaskRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/TaskBox/AppsTaskBoxUpdateTaskRequest.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/TaskBox/AppsTaskBoxUpdateTaskRequest.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/TaskBox/AppsTaskBoxUpdateTaskRequest.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/TaskBox/AppsTaskBoxUpdateTaskResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/TaskBox/AppsTaskBoxUpdateTaskResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/TaskBox/AppsTaskBoxUpdateTaskResponse.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/TaskBox/AppsTaskBoxUpdateTaskResponse.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/Video/AppsConvertOpenItemIdToEncryptIdRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/Video/AppsConvertOpenItemIdToEncryptIdRequest.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/Video/AppsConvertOpenItemIdToEncryptIdRequest.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/Video/AppsConvertOpenItemIdToEncryptIdRequest.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/Video/AppsConvertOpenItemIdToEncryptIdResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/Video/AppsConvertOpenItemIdToEncryptIdResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/Video/AppsConvertOpenItemIdToEncryptIdResponse.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/Video/AppsConvertOpenItemIdToEncryptIdResponse.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/Video/AppsConvertVideoIdToOpenItemIdRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/Video/AppsConvertVideoIdToOpenItemIdRequest.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/Video/AppsConvertVideoIdToOpenItemIdRequest.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/Video/AppsConvertVideoIdToOpenItemIdRequest.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/Video/AppsConvertVideoIdToOpenItemIdResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/Video/AppsConvertVideoIdToOpenItemIdResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Apps/Video/AppsConvertVideoIdToOpenItemIdResponse.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Apps/Video/AppsConvertVideoIdToOpenItemIdResponse.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsECPay/Order/AppsECPayCreateOrderV1Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/AppsECPay/Order/AppsECPayCreateOrderV1Request.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsECPay/Order/AppsECPayCreateOrderV1Request.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/AppsECPay/Order/AppsECPayCreateOrderV1Request.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsECPay/Order/AppsECPayCreateOrderV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/AppsECPay/Order/AppsECPayCreateOrderV1Response.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsECPay/Order/AppsECPayCreateOrderV1Response.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/AppsECPay/Order/AppsECPayCreateOrderV1Response.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsECPay/Order/AppsECPayCreateRefundV1Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/AppsECPay/Order/AppsECPayCreateRefundV1Request.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsECPay/Order/AppsECPayCreateRefundV1Request.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/AppsECPay/Order/AppsECPayCreateRefundV1Request.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsECPay/Order/AppsECPayCreateRefundV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/AppsECPay/Order/AppsECPayCreateRefundV1Response.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsECPay/Order/AppsECPayCreateRefundV1Response.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/AppsECPay/Order/AppsECPayCreateRefundV1Response.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsECPay/Order/AppsECPayCreateReturnV1Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/AppsECPay/Order/AppsECPayCreateReturnV1Request.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsECPay/Order/AppsECPayCreateReturnV1Request.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/AppsECPay/Order/AppsECPayCreateReturnV1Request.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsECPay/Order/AppsECPayCreateReturnV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/AppsECPay/Order/AppsECPayCreateReturnV1Response.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsECPay/Order/AppsECPayCreateReturnV1Response.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/AppsECPay/Order/AppsECPayCreateReturnV1Response.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsECPay/Order/AppsECPayQueryOrderV1Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/AppsECPay/Order/AppsECPayQueryOrderV1Request.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsECPay/Order/AppsECPayQueryOrderV1Request.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/AppsECPay/Order/AppsECPayQueryOrderV1Request.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsECPay/Order/AppsECPayQueryOrderV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/AppsECPay/Order/AppsECPayQueryOrderV1Response.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsECPay/Order/AppsECPayQueryOrderV1Response.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/AppsECPay/Order/AppsECPayQueryOrderV1Response.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsECPay/Order/AppsECPayQueryRefundV1Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/AppsECPay/Order/AppsECPayQueryRefundV1Request.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsECPay/Order/AppsECPayQueryRefundV1Request.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/AppsECPay/Order/AppsECPayQueryRefundV1Request.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsECPay/Order/AppsECPayQueryRefundV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/AppsECPay/Order/AppsECPayQueryRefundV1Response.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsECPay/Order/AppsECPayQueryRefundV1Response.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/AppsECPay/Order/AppsECPayQueryRefundV1Response.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsECPay/Order/AppsECPayQueryReturnV1Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/AppsECPay/Order/AppsECPayQueryReturnV1Request.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsECPay/Order/AppsECPayQueryReturnV1Request.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/AppsECPay/Order/AppsECPayQueryReturnV1Request.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsECPay/Order/AppsECPayQueryReturnV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/AppsECPay/Order/AppsECPayQueryReturnV1Response.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsECPay/Order/AppsECPayQueryReturnV1Response.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/AppsECPay/Order/AppsECPayQueryReturnV1Response.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsECPay/Order/AppsECPayQuerySettleV1Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/AppsECPay/Order/AppsECPayQuerySettleV1Request.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsECPay/Order/AppsECPayQuerySettleV1Request.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/AppsECPay/Order/AppsECPayQuerySettleV1Request.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsECPay/Order/AppsECPayQuerySettleV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/AppsECPay/Order/AppsECPayQuerySettleV1Response.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsECPay/Order/AppsECPayQuerySettleV1Response.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/AppsECPay/Order/AppsECPayQuerySettleV1Response.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsECPay/Order/AppsECPaySettleV1Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/AppsECPay/Order/AppsECPaySettleV1Request.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsECPay/Order/AppsECPaySettleV1Request.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/AppsECPay/Order/AppsECPaySettleV1Request.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsECPay/Order/AppsECPaySettleV1Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/AppsECPay/Order/AppsECPaySettleV1Response.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsECPay/Order/AppsECPaySettleV1Response.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/AppsECPay/Order/AppsECPaySettleV1Response.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsECPay/SaaS/Apply/AppsECPaySaaSCreateMerchantRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/AppsECPay/SaaS/Apply/AppsECPaySaaSCreateMerchantRequest.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsECPay/SaaS/Apply/AppsECPaySaaSCreateMerchantRequest.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/AppsECPay/SaaS/Apply/AppsECPaySaaSCreateMerchantRequest.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsECPay/SaaS/Apply/AppsECPaySaaSCreateMerchantResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/AppsECPay/SaaS/Apply/AppsECPaySaaSCreateMerchantResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsECPay/SaaS/Apply/AppsECPaySaaSCreateMerchantResponse.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/AppsECPay/SaaS/Apply/AppsECPaySaaSCreateMerchantResponse.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsECPay/SaaS/Apply/AppsECPaySaaSQueryMerchantStatusRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/AppsECPay/SaaS/Apply/AppsECPaySaaSQueryMerchantStatusRequest.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsECPay/SaaS/Apply/AppsECPaySaaSQueryMerchantStatusRequest.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/AppsECPay/SaaS/Apply/AppsECPaySaaSQueryMerchantStatusRequest.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsECPay/SaaS/Apply/AppsECPaySaaSQueryMerchantStatusResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/AppsECPay/SaaS/Apply/AppsECPaySaaSQueryMerchantStatusResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsECPay/SaaS/Apply/AppsECPaySaaSQueryMerchantStatusResponse.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/AppsECPay/SaaS/Apply/AppsECPaySaaSQueryMerchantStatusResponse.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsECPay/SaaS/PageLinks/AppsECPaySaaSAddMerchantRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/AppsECPay/SaaS/PageLinks/AppsECPaySaaSAddMerchantRequest.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsECPay/SaaS/PageLinks/AppsECPaySaaSAddMerchantRequest.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/AppsECPay/SaaS/PageLinks/AppsECPaySaaSAddMerchantRequest.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsECPay/SaaS/PageLinks/AppsECPaySaaSAddMerchantResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/AppsECPay/SaaS/PageLinks/AppsECPaySaaSAddMerchantResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsECPay/SaaS/PageLinks/AppsECPaySaaSAddMerchantResponse.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/AppsECPay/SaaS/PageLinks/AppsECPaySaaSAddMerchantResponse.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsECPay/SaaS/PageLinks/AppsECPaySaaSAddSubMerchantRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/AppsECPay/SaaS/PageLinks/AppsECPaySaaSAddSubMerchantRequest.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsECPay/SaaS/PageLinks/AppsECPaySaaSAddSubMerchantRequest.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/AppsECPay/SaaS/PageLinks/AppsECPaySaaSAddSubMerchantRequest.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsECPay/SaaS/PageLinks/AppsECPaySaaSAddSubMerchantResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/AppsECPay/SaaS/PageLinks/AppsECPaySaaSAddSubMerchantResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsECPay/SaaS/PageLinks/AppsECPaySaaSAddSubMerchantResponse.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/AppsECPay/SaaS/PageLinks/AppsECPaySaaSAddSubMerchantResponse.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsECPay/SaaS/PageLinks/AppsECPaySaaSAppAddSubMerchantRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/AppsECPay/SaaS/PageLinks/AppsECPaySaaSAppAddSubMerchantRequest.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsECPay/SaaS/PageLinks/AppsECPaySaaSAppAddSubMerchantRequest.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/AppsECPay/SaaS/PageLinks/AppsECPaySaaSAppAddSubMerchantRequest.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsECPay/SaaS/PageLinks/AppsECPaySaaSAppAddSubMerchantResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/AppsECPay/SaaS/PageLinks/AppsECPaySaaSAppAddSubMerchantResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsECPay/SaaS/PageLinks/AppsECPaySaaSAppAddSubMerchantResponse.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/AppsECPay/SaaS/PageLinks/AppsECPaySaaSAppAddSubMerchantResponse.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsECPay/SaaS/PageLinks/AppsECPaySaaSGetAppMerchantRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/AppsECPay/SaaS/PageLinks/AppsECPaySaaSGetAppMerchantRequest.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsECPay/SaaS/PageLinks/AppsECPaySaaSGetAppMerchantRequest.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/AppsECPay/SaaS/PageLinks/AppsECPaySaaSGetAppMerchantRequest.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsECPay/SaaS/PageLinks/AppsECPaySaaSGetAppMerchantResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/AppsECPay/SaaS/PageLinks/AppsECPaySaaSGetAppMerchantResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsECPay/SaaS/PageLinks/AppsECPaySaaSGetAppMerchantResponse.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/AppsECPay/SaaS/PageLinks/AppsECPaySaaSGetAppMerchantResponse.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsECPay/SaaS/Withdraw/AppsECPaySaaSMerchantWithdrawRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/AppsECPay/SaaS/Withdraw/AppsECPaySaaSMerchantWithdrawRequest.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsECPay/SaaS/Withdraw/AppsECPaySaaSMerchantWithdrawRequest.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/AppsECPay/SaaS/Withdraw/AppsECPaySaaSMerchantWithdrawRequest.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsECPay/SaaS/Withdraw/AppsECPaySaaSMerchantWithdrawResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/AppsECPay/SaaS/Withdraw/AppsECPaySaaSMerchantWithdrawResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsECPay/SaaS/Withdraw/AppsECPaySaaSMerchantWithdrawResponse.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/AppsECPay/SaaS/Withdraw/AppsECPaySaaSMerchantWithdrawResponse.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsECPay/SaaS/Withdraw/AppsECPaySaaSQueryMerchantBalanceRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/AppsECPay/SaaS/Withdraw/AppsECPaySaaSQueryMerchantBalanceRequest.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsECPay/SaaS/Withdraw/AppsECPaySaaSQueryMerchantBalanceRequest.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/AppsECPay/SaaS/Withdraw/AppsECPaySaaSQueryMerchantBalanceRequest.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsECPay/SaaS/Withdraw/AppsECPaySaaSQueryMerchantBalanceResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/AppsECPay/SaaS/Withdraw/AppsECPaySaaSQueryMerchantBalanceResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsECPay/SaaS/Withdraw/AppsECPaySaaSQueryMerchantBalanceResponse.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/AppsECPay/SaaS/Withdraw/AppsECPaySaaSQueryMerchantBalanceResponse.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsECPay/SaaS/Withdraw/AppsECPaySaaSQueryWithdrawOrderRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/AppsECPay/SaaS/Withdraw/AppsECPaySaaSQueryWithdrawOrderRequest.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsECPay/SaaS/Withdraw/AppsECPaySaaSQueryWithdrawOrderRequest.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/AppsECPay/SaaS/Withdraw/AppsECPaySaaSQueryWithdrawOrderRequest.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsECPay/SaaS/Withdraw/AppsECPaySaaSQueryWithdrawOrderResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/AppsECPay/SaaS/Withdraw/AppsECPaySaaSQueryWithdrawOrderResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsECPay/SaaS/Withdraw/AppsECPaySaaSQueryWithdrawOrderResponse.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/AppsECPay/SaaS/Withdraw/AppsECPaySaaSQueryWithdrawOrderResponse.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsGame/AppsGameWalletAddCoinRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/AppsGame/AppsGameWalletAddCoinRequest.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsGame/AppsGameWalletAddCoinRequest.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/AppsGame/AppsGameWalletAddCoinRequest.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsGame/AppsGameWalletAddCoinResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/AppsGame/AppsGameWalletAddCoinResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsGame/AppsGameWalletAddCoinResponse.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/AppsGame/AppsGameWalletAddCoinResponse.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsGame/AppsGameWalletGamePayRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/AppsGame/AppsGameWalletGamePayRequest.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsGame/AppsGameWalletGamePayRequest.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/AppsGame/AppsGameWalletGamePayRequest.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsGame/AppsGameWalletGamePayResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/AppsGame/AppsGameWalletGamePayResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsGame/AppsGameWalletGamePayResponse.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/AppsGame/AppsGameWalletGamePayResponse.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsGame/AppsGameWalletGetBalanceRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/AppsGame/AppsGameWalletGetBalanceRequest.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsGame/AppsGameWalletGetBalanceRequest.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/AppsGame/AppsGameWalletGetBalanceRequest.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsGame/AppsGameWalletGetBalanceResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/AppsGame/AppsGameWalletGetBalanceResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsGame/AppsGameWalletGetBalanceResponse.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/AppsGame/AppsGameWalletGetBalanceResponse.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsStorage/AppsRemoveUserStorageRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/AppsStorage/AppsRemoveUserStorageRequest.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsStorage/AppsRemoveUserStorageRequest.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/AppsStorage/AppsRemoveUserStorageRequest.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsStorage/AppsSetUserStorageRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/AppsStorage/AppsSetUserStorageRequest.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/AppsStorage/AppsSetUserStorageRequest.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/AppsStorage/AppsSetUserStorageRequest.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Comment/CommentOpenGetRequest.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Comment/CommentOpenGetRequest.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Comment/CommentOpenGetRequest.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Comment/CommentOpenGetRequest.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Comment/CommentOpenGetResponse.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Comment/CommentOpenGetResponse.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Comment/CommentOpenGetResponse.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Comment/CommentOpenGetResponse.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Tags/TagsImageV2Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Tags/TagsImageV2Request.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Tags/TagsImageV2Request.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Tags/TagsImageV2Request.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Tags/TagsImageV2Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Tags/TagsImageV2Response.json similarity index 95% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Tags/TagsImageV2Response.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Tags/TagsImageV2Response.json index 7edacd3a..0ce64ea7 100644 --- a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Tags/TagsImageV2Response.json +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Tags/TagsImageV2Response.json @@ -1,4 +1,4 @@ -{ +{ "log_id": "2019010320551501001001621510071", "data": [ { @@ -40,5 +40,5 @@ ], "error_id": "7bf3b7e299e9448796aa99b44750df68", "code": 401, - "exception": "[app token sign fail] bad token" + "message": "[app token sign fail] bad token" } diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Tags/TagsTextAntiDirtV2Request.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Tags/TagsTextAntiDirtV2Request.json similarity index 100% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Tags/TagsTextAntiDirtV2Request.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Tags/TagsTextAntiDirtV2Request.json diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Tags/TagsTextAntiDirtV2Response.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Tags/TagsTextAntiDirtV2Response.json similarity index 87% rename from test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Tags/TagsTextAntiDirtV2Response.json rename to test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Tags/TagsTextAntiDirtV2Response.json index 9844d0fd..3139c319 100644 --- a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/Tags/TagsTextAntiDirtV2Response.json +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/ModelSamples/_/_Legacy/Tags/TagsTextAntiDirtV2Response.json @@ -1,4 +1,4 @@ -{ +{ "log_id": "202008181611370100150421452708466F", "data": [ { @@ -17,6 +17,5 @@ } ], "error_id": "7bf3b7e299e9448796aa99b44750df68", - "code": 401, - "exception": "[app token sign fail] bad token" + "code": 401 } diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests.csproj b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests.csproj index afb1a6a7..2a8ece10 100644 --- a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests.csproj +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests.csproj @@ -10,24 +10,24 @@ - - Never - Never - - - PreserveNewest - PreserveNewest - + + PreserveNewest + PreserveNewest + + + Always + Always + - - - - + + + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/TestCase_ApiExecuteAppsECPayTests.cs b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/TestCase_ApiExecuteAppsECPayTests.cs index c813018e..fcd2da03 100644 --- a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/TestCase_ApiExecuteAppsECPayTests.cs +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/TestCase_ApiExecuteAppsECPayTests.cs @@ -8,7 +8,7 @@ public class TestCase_ApiExecuteAppsECPayTests [Fact(DisplayName = "测试用例:担保支付请求签名")] public async Task TestECPayRequestSignature() { - using var client = new ByteDanceMicroAppClient(new ByteDanceMicroAppClientOptions() { ECPaySalt = "your_payment_salt" }); + using var client = new DouyinMicroAppClient(new DouyinMicroAppClientOptions() { ECPaySalt = "your_payment_salt" }); var request = new Models.AppsECPayCreateOrderV1Request() { AppId = "ttcfdbb9xxxxxxxxxxx", diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/TestCase_CodeReview.cs b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/TestCase_CodeReview.cs deleted file mode 100644 index 45a51697..00000000 --- a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/TestCase_CodeReview.cs +++ /dev/null @@ -1,96 +0,0 @@ -using SKIT.FlurlHttpClient.Tools.CodeAnalyzer; -using Xunit; - -namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests -{ - public class TestCase_CodeReview - { - [Fact(DisplayName = "测试用例:代码质量分析")] - public void TestCodeAnalyzer() - { - Assert.Null(Record.Exception(() => - { - CodeAnalyzerOptions options = new CodeAnalyzerOptions() - { - AssemblyName = "SKIT.FlurlHttpClient.ByteDance.MicroApp", - WorkDirectoryForSourceCode = TestConfigs.WorkDirectoryForSdk, - WorkDirectoryForTestSample = TestConfigs.WorkDirectoryForTest, - WorkSubDirectoryForApiModelSamples = "ModelSamples/_", - WorkSubDirectoryForApiEventSamples = "EventSamples/_", - }; - CodeAnalyzer analyzer = new CodeAnalyzer(options); - analyzer.Start(); - analyzer.Assert(); - analyzer.Flush(); - })); - - Assert.Null(Record.Exception(() => - { - CodeAnalyzerOptions options = new CodeAnalyzerOptions() - { - AssemblyName = "SKIT.FlurlHttpClient.ByteDance.MicroApp", - TargetSdkApiModelNamespaceUnderAssemblyIdentifier = "SDK.ProductApi.Models", - TargetSdkApiEventNamespaceUnderAssemblyIdentifier = "SDK.ProductApi.Events", - //TargetSdkApiMethodNamespaceUnderAssemblyIdentifier = "SDK.ProductApi", - WorkDirectoryForSourceCode = TestConfigs.WorkDirectoryForSdk, - WorkDirectoryForTestSample = TestConfigs.WorkDirectoryForTest, - WorkSubDirectoryForApiMethods = "SDK/ProductApi/Extensions", - WorkSubDirectoryForApiModels = "SDK/ProductApi/Models", - WorkSubDirectoryForApiEvents = "SDK/ProductApi/Events", - WorkSubDirectoryForApiModelSamples = "ModelSamples/ProductApi", - WorkSubDirectoryForApiEventSamples = "EventSamples/ProductApi" - }; - CodeAnalyzer analyzer = new CodeAnalyzer(options); - analyzer.Start(); - analyzer.Assert(); - analyzer.Flush(); - })); - - Assert.Null(Record.Exception(() => - { - CodeAnalyzerOptions options = new CodeAnalyzerOptions() - { - AssemblyName = "SKIT.FlurlHttpClient.ByteDance.MicroApp", - TargetSdkApiModelNamespaceUnderAssemblyIdentifier = "SDK.RoleApi.Models", - TargetSdkApiEventNamespaceUnderAssemblyIdentifier = "SDK.RoleApi.Events", - //TargetSdkApiMethodNamespaceUnderAssemblyIdentifier = "SDK.RoleApi", - WorkDirectoryForSourceCode = TestConfigs.WorkDirectoryForSdk, - WorkDirectoryForTestSample = TestConfigs.WorkDirectoryForTest, - WorkSubDirectoryForApiMethods = "SDK/RoleApi/Extensions", - WorkSubDirectoryForApiModels = "SDK/RoleApi/Models", - WorkSubDirectoryForApiEvents = "SDK/RoleApi/Events", - WorkSubDirectoryForApiModelSamples = "ModelSamples/RoleApi", - WorkSubDirectoryForApiEventSamples = "EventSamples/RoleApi", - AllowNotFoundEventTypes = true, - AllowNotFoundEventSamples = true - }; - CodeAnalyzer analyzer = new CodeAnalyzer(options); - analyzer.Start(); - analyzer.Assert(); - analyzer.Flush(); - })); - - Assert.Null(Record.Exception(() => - { - CodeAnalyzerOptions options = new CodeAnalyzerOptions() - { - AssemblyName = "SKIT.FlurlHttpClient.ByteDance.MicroApp", - TargetSdkApiModelNamespaceUnderAssemblyIdentifier = "SDK.OpenApi.Models", - TargetSdkApiEventNamespaceUnderAssemblyIdentifier = "SDK.OpenApi.Events", - //TargetSdkApiMethodNamespaceUnderAssemblyIdentifier = "SDK.OpenApi", - WorkDirectoryForSourceCode = TestConfigs.WorkDirectoryForSdk, - WorkDirectoryForTestSample = TestConfigs.WorkDirectoryForTest, - WorkSubDirectoryForApiMethods = "SDK/OpenApi/Extensions", - WorkSubDirectoryForApiModels = "SDK/OpenApi/Models", - WorkSubDirectoryForApiEvents = "SDK/OpenApi/Events", - WorkSubDirectoryForApiModelSamples = "ModelSamples/OpenApi", - WorkSubDirectoryForApiEventSamples = "EventSamples/OpenApi" - }; - CodeAnalyzer analyzer = new CodeAnalyzer(options); - analyzer.Start(); - analyzer.Assert(); - analyzer.Flush(); - })); - } - } -} diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/TestCase_EventVerificationTests.cs b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/TestCase_EventVerificationTests.cs index c3801c36..27c59bd7 100644 --- a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/TestCase_EventVerificationTests.cs +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/TestCase_EventVerificationTests.cs @@ -2,7 +2,8 @@ namespace SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests { - using SKIT.FlurlHttpClient.ByteDance.MicroApp.SDK.OpenApi; + using SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi; + using SKIT.FlurlHttpClient.ByteDance.MicroApp.ExtendedSDK.OpenApi.Events; public class TestCase_EventVerificationTests { @@ -14,13 +15,13 @@ public void TestVerifyJsonEvent() string callbackRawJson = "{\"ToUserName\":\"appid\",\"FromUserName\":\"openid\",\"CreateTime\":1577364225,\"MsgType\":\"text\",\"Content\":\"text content\"}"; string callbackSecretJson = "{\"Nonce\":\"1372623149\",\"TimeStamp\":\"1409659813\",\"Encrypt\":\"qc4kT4X+UzU6/qfguyGDpAd6mt2SmOYc1FE9DkulrGWTeHgMu3cPa1WQiNQ61+GMZI2DOzHbu4QVxduzuwh83Q3umURGKyRdNgaEY1GNGt+hhVOjLSkU8wHPNbZ8YfBGsZdZfdWxTy+e36Utetrw17T8MYcoHOhOcIml4dD8DU90SAL6oCA7AZrB8nh+J1kahSQ3c30D6LKlPk044cEWKkVBSzF2XWaPuaUIlUVXigknfFVAhfFFKAuQ7e6ftzJ2\",\"MsgSignature\":\"599c9a6a625fec4c7f13cbafbf4083491a515e6b\"}"; - var options = new ByteDanceMicroAppClientOptions() + var options = new DouyinMicroAppClientOptions() { AppId = "tt5823bf96d3bd56c7", PushEncodingAESKey = "jWmYm7qr5nMoAUwZRjGtBxmz3KA1tkAj3ykkR6q2B2C", PushToken = "QDG6eK" }; - var client = new ByteDanceMicroAppClient(options); + var client = new DouyinMicroAppClient(options); var eventModel1 = client.DeserializeEventFromJson(callbackRawJson); var eventModel2 = client.DeserializeEventFromJson(callbackSecretJson); @@ -42,15 +43,15 @@ public void TestVerifyJsonEvent() string callbackRawJson = "{\"FromUserName\":\"ByteDanceMicroApp\",\"CreateTime\":\"2019-01-14 12:45:10\",\"Event\":\"PUSH\",\"MsgType\":\"Ticket\",\"Ticket\":\"8c0da4968b0d1e28acbc1d738a56607d\"}"; string callbackSecretJson = "{\"Nonce\":\"1372623149\",\"TimeStamp\":\"1409659813\",\"Encrypt\":\"OheJ/nrK5Liim/H6TjL6ufUBwoxRP4sy2e0mS7IO47WESBIHgIXdGLwhs8iDCgMsPe0I78q2jUNtdO7w6+Vg+gtmEm5mbcljWv18Fs5hw91+hwID9uOGNC5ICeLGMMXW0uaGtqn8XgwXxtROAK220M5oRYK9MvmIoU/Q7Tvx1xnP4Jfunww+2mYqgD3YIYvTFVReX+3BeRuBh7zOK7tRbdqXaPbK/Cko0Vnt82rikDmItgXLUtJC4wxJohhXKZGb/12oFq6L/Uy+CtLqVLZMIH4uxlb5cO9exYfArVocZTc=\",\"MsgSignature\":\"e51e71c9087fc57ae1cf8eb25c0d1ba837db5b7c\"}"; - var options = new ByteDanceMicroAppOpenApiClientOptions() + var options = new DouyinMicroAppOpenApiClientOptions() { ComponentAppId = "tt5823bf96d3bd56c7", PushEncodingAESKey = "jWmYm7qr5nMoAUwZRjGtBxmz3KA1tkAj3ykkR6q2B2C", PushToken = "QDG6eK" }; - var client = new ByteDanceMicroAppOpenApiClient(options); - var eventModel1 = client.DeserializeEventFromJson(callbackRawJson); - var eventModel2 = client.DeserializeEventFromJson(callbackSecretJson); + var client = new DouyinMicroAppOpenApiClient(options); + var eventModel1 = client.DeserializeEventFromJson(callbackRawJson); + var eventModel2 = client.DeserializeEventFromJson(callbackSecretJson); Assert.True(client.VerifyEventSignatureFromJson(callbackSecretJson)); Assert.Equal("ByteDanceMicroApp", eventModel1.FromUserName); @@ -74,13 +75,13 @@ public void TestVerifyXmlEvent() string callbackRawXml = "1577364225"; string callbackSecretXml = "13726231491409659813"; - var options = new ByteDanceMicroAppClientOptions() + var options = new DouyinMicroAppClientOptions() { AppId = "tt5823bf96d3bd56c7", PushEncodingAESKey = "jWmYm7qr5nMoAUwZRjGtBxmz3KA1tkAj3ykkR6q2B2C", PushToken = "QDG6eK" }; - var client = new ByteDanceMicroAppClient(options); + var client = new DouyinMicroAppClient(options); var eventModel1 = client.DeserializeEventFromXml(callbackRawXml); var eventModel2 = client.DeserializeEventFromXml(callbackSecretXml); @@ -102,15 +103,15 @@ public void TestVerifyXmlEvent() string callbackRawXml = ""; string callbackSecretXml = "13726231491409659813"; - var options = new ByteDanceMicroAppOpenApiClientOptions() + var options = new DouyinMicroAppOpenApiClientOptions() { ComponentAppId = "tt5823bf96d3bd56c7", PushEncodingAESKey = "jWmYm7qr5nMoAUwZRjGtBxmz3KA1tkAj3ykkR6q2B2C", PushToken = "QDG6eK" }; - var client = new ByteDanceMicroAppOpenApiClient(options); - var eventModel1 = client.DeserializeEventFromXml(callbackRawXml); - var eventModel2 = client.DeserializeEventFromXml(callbackSecretXml); + var client = new DouyinMicroAppOpenApiClient(options); + var eventModel1 = client.DeserializeEventFromXml(callbackRawXml); + var eventModel2 = client.DeserializeEventFromXml(callbackSecretXml); Assert.True(client.VerifyEventSignatureFromXml(callbackSecretXml)); Assert.Equal("ByteDanceMicroApp", eventModel1.FromUserName); diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/TestClients.cs b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/TestClients.cs index 8f2b2017..399f8db7 100644 --- a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/TestClients.cs +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/TestClients.cs @@ -4,13 +4,13 @@ internal class TestClients { static TestClients() { - Instance = new ByteDanceMicroAppClient(new ByteDanceMicroAppClientOptions() + Instance = new DouyinMicroAppClient(new DouyinMicroAppClientOptions() { AppId = TestConfigs.ByteDanceMicroAppId, AppSecret = TestConfigs.ByteDanceMicroAppSecret }); } - public static readonly ByteDanceMicroAppClient Instance; + public static readonly DouyinMicroAppClient Instance; } } diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/TestConfigs.cs b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/TestConfigs.cs index 2a0491ed..a29ac350 100644 --- a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/TestConfigs.cs +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/TestConfigs.cs @@ -17,13 +17,10 @@ static TestConfigs() using var stream = File.OpenRead("appsettings.local.json"); using var json = JsonDocument.Parse(stream); - var config = json.RootElement.GetProperty("TestConfig"); + var config = json.RootElement.GetProperty("TestConfigs"); ByteDanceMicroAppId = config.GetProperty("AppId").GetString()!; ByteDanceMicroAppSecret = config.GetProperty("AppSecret").GetString()!; ByteDanceMicroAppAccessToken = config.GetProperty("AccessToken").GetString()!; - - WorkDirectoryForSdk = json.RootElement.GetProperty("WorkDirectoryForSdk").GetString()!; - WorkDirectoryForTest = json.RootElement.GetProperty("WorkDirectoryForTest").GetString()!; } catch (Exception ex) { @@ -34,8 +31,5 @@ static TestConfigs() public static readonly string ByteDanceMicroAppId; public static readonly string ByteDanceMicroAppSecret; public static readonly string ByteDanceMicroAppAccessToken; - - public static readonly string WorkDirectoryForSdk; - public static readonly string WorkDirectoryForTest; } } diff --git a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/appsettings.json b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/appsettings.json index 15b25043..fbb947e9 100644 --- a/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/appsettings.json +++ b/test/SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests/appsettings.json @@ -1,9 +1,7 @@ -{ - "TestConfig": { +{ + "TestConfigs": { "AppId": "请在此填写用于测试的字节小程序 AppKey", "AppSecret": "请在此填写用于测试的字节小程序 AppSecret", "AccessToken": "请在此填写用于测试的字节小程序 AccessToken" - }, - "WorkDirectoryForSdk": "请输入当前 SDK 项目所在的目录完整路径,如 C:\\Project\\src\\SKIT.FlurlHttpClient.ByteDance.MicroApp\\", - "WorkDirectoryForTest": "请输入当前测试项目所在的目录完整路径,如 C:\\Project\\test\\SKIT.FlurlHttpClient.ByteDance.MicroApp.UnitTests\\" + } }