mirror of
https://gitee.com/fudiwei/DotNetCore.SKIT.FlurlHttpClient.Wechat.git
synced 2025-04-05 17:37:54 +08:00
feat(work): 新增微信客服知识库相关接口
This commit is contained in:
parent
226a01424c
commit
141888e2c3
@ -312,6 +312,170 @@ namespace SKIT.FlurlHttpClient.Wechat.Work
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region KnowledgeGroup
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /cgi-bin/kf/knowledge/add_group 接口。</para>
|
||||
/// <para>REF: https://developer.work.weixin.qq.com/document/path/95971 </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.CgibinKfKnowledgeAddGroupResponse> ExecuteCgibinKfKnowledgeAddGroupAsync(this WechatWorkClient client, Models.CgibinKfKnowledgeAddGroupRequest request, 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, "cgi-bin", "kf", "knowledge", "add_group")
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.CgibinKfKnowledgeAddGroupResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /cgi-bin/kf/knowledge/mod_group 接口。</para>
|
||||
/// <para>REF: https://developer.work.weixin.qq.com/document/path/95971 </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.CgibinKfKnowledgeModifyGroupResponse> ExecuteCgibinKfKnowledgeModifyGroupAsync(this WechatWorkClient client, Models.CgibinKfKnowledgeModifyGroupRequest request, 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, "cgi-bin", "kf", "knowledge", "mod_group")
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.CgibinKfKnowledgeModifyGroupResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /cgi-bin/kf/knowledge/del_group 接口。</para>
|
||||
/// <para>REF: https://developer.work.weixin.qq.com/document/path/95971 </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.CgibinKfKnowledgeDeleteGroupResponse> ExecuteCgibinKfKnowledgeDeleteGroupAsync(this WechatWorkClient client, Models.CgibinKfKnowledgeDeleteGroupRequest request, 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, "cgi-bin", "kf", "knowledge", "del_group")
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.CgibinKfKnowledgeDeleteGroupResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /cgi-bin/kf/knowledge/list_group 接口。</para>
|
||||
/// <para>REF: https://developer.work.weixin.qq.com/document/path/95971 </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.CgibinKfKnowledgeListGroupResponse> ExecuteCgibinKfKnowledgeListGroupAsync(this WechatWorkClient client, Models.CgibinKfKnowledgeListGroupRequest request, 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, "cgi-bin", "kf", "knowledge", "list_group")
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.CgibinKfKnowledgeListGroupResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region KnowledgeIntent
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /cgi-bin/kf/knowledge/add_intent 接口。</para>
|
||||
/// <para>REF: https://developer.work.weixin.qq.com/document/path/95972 </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.CgibinKfKnowledgeAddIntentResponse> ExecuteCgibinKfKnowledgeAddIntentAsync(this WechatWorkClient client, Models.CgibinKfKnowledgeAddIntentRequest request, 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, "cgi-bin", "kf", "knowledge", "add_intent")
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.CgibinKfKnowledgeAddIntentResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /cgi-bin/kf/knowledge/mod_intent 接口。</para>
|
||||
/// <para>REF: https://developer.work.weixin.qq.com/document/path/95972 </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.CgibinKfKnowledgeModifyIntentResponse> ExecuteCgibinKfKnowledgeModifyIntentAsync(this WechatWorkClient client, Models.CgibinKfKnowledgeModifyIntentRequest request, 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, "cgi-bin", "kf", "knowledge", "mod_intent")
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.CgibinKfKnowledgeModifyIntentResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /cgi-bin/kf/knowledge/del_intent 接口。</para>
|
||||
/// <para>REF: https://developer.work.weixin.qq.com/document/path/95972 </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.CgibinKfKnowledgeDeleteIntentResponse> ExecuteCgibinKfKnowledgeDeleteIntentAsync(this WechatWorkClient client, Models.CgibinKfKnowledgeDeleteIntentRequest request, 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, "cgi-bin", "kf", "knowledge", "del_intent")
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.CgibinKfKnowledgeDeleteIntentResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /cgi-bin/kf/knowledge/list_intent 接口。</para>
|
||||
/// <para>REF: https://developer.work.weixin.qq.com/document/path/95972 </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.CgibinKfKnowledgeListIntentResponse> ExecuteCgibinKfKnowledgeListIntentAsync(this WechatWorkClient client, Models.CgibinKfKnowledgeListIntentRequest request, 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, "cgi-bin", "kf", "knowledge", "list_intent")
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.CgibinKfKnowledgeListIntentResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /cgi-bin/kf/send_msg 接口。</para>
|
||||
/// <para>REF: https://developer.work.weixin.qq.com/document/path/94677 </para>
|
||||
|
@ -0,0 +1,15 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/kf/knowledge/add_group 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class CgibinKfKnowledgeAddGroupRequest : WechatWorkRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置分组名。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("name")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("name")]
|
||||
public string Name { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/kf/knowledge/add_group 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class CgibinKfKnowledgeAddGroupResponse : WechatWorkResponse
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置分组 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("group_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("group_id")]
|
||||
public string GroupId { get; set; } = default!;
|
||||
}
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/kf/knowledge/del_group 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class CgibinKfKnowledgeDeleteGroupRequest : WechatWorkRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置分组 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("group_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("group_id")]
|
||||
public string GroupId { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/kf/knowledge/del_group 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class CgibinKfKnowledgeDeleteGroupResponse : WechatWorkResponse
|
||||
{
|
||||
}
|
||||
}
|
@ -0,0 +1,29 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/kf/knowledge/list_group 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class CgibinKfKnowledgeListGroupRequest : WechatWorkRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置分组 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("group_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("group_id")]
|
||||
public string? GroupId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置翻页标记。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("cursor")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("cursor")]
|
||||
public string? Cursor { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置分页每页数量。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("limit")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("limit")]
|
||||
public int? Limit { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,60 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/kf/knowledge/list_group 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class CgibinKfKnowledgeListGroupResponse : WechatWorkResponse
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Group
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置分组 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("group_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("group_id")]
|
||||
public string GroupId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置分组名。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("name")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("name")]
|
||||
public string Name { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置是否为默认分组。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("is_default")]
|
||||
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.NumericalBooleanConverter))]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("is_default")]
|
||||
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumericalBooleanConverter))]
|
||||
public bool IsDefault { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置分组列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("group_list")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("group_list")]
|
||||
public Types.Group[] GroupList { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置是否还有更多数据。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("has_more")]
|
||||
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.NumericalBooleanConverter))]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("has_more")]
|
||||
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumericalBooleanConverter))]
|
||||
public bool HasMore { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置翻页标记。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("next_cursor")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("next_cursor")]
|
||||
public string? NextCursor { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/kf/knowledge/mod_group 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class CgibinKfKnowledgeModifyGroupRequest : WechatWorkRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置分组 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("group_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("group_id")]
|
||||
public string GroupId { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置分组名。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("name")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("name")]
|
||||
public string Name { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/kf/knowledge/mod_group 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class CgibinKfKnowledgeModifyGroupResponse : WechatWorkResponse
|
||||
{
|
||||
}
|
||||
}
|
@ -0,0 +1,221 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/kf/knowledge/add_intent 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class CgibinKfKnowledgeAddIntentRequest : WechatWorkRequest
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Text
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置文本内容。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("content")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("content")]
|
||||
public string Content { get; set; } = string.Empty;
|
||||
}
|
||||
|
||||
public class Attachment
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Image
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置图片 MediaId。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("media_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("media_id")]
|
||||
public string MediaId { get; set; } = string.Empty;
|
||||
}
|
||||
|
||||
public class Link
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置图文消息标题。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("title")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("title")]
|
||||
public string Title { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置图文消息描述。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("desc")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("desc")]
|
||||
public string? Description { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置图文消息 URL。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("url")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("url")]
|
||||
public string Url { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置图文消息封面 URL。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("pic_url")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("pic_url")]
|
||||
public string? PictureUrl { get; set; }
|
||||
}
|
||||
|
||||
public class Video
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置视频 MediaId。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("media_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("media_id")]
|
||||
public string MediaId { get; set; } = string.Empty;
|
||||
}
|
||||
|
||||
public class MiniProgram
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置小程序 AppId。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("appid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("appid")]
|
||||
public string AppId { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置小程序页面路径。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("pagepath")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("pagepath")]
|
||||
public string PagePath { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置小程序标题。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("title")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("title")]
|
||||
public string? Title { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置小程序封面 MediaId。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("thumb_media_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("thumb_media_id")]
|
||||
public string? ThumbnailMediaId { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置附件类型。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("msgtype")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("msgtype")]
|
||||
public string Type { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置图片附件信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("image")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("image")]
|
||||
public Types.Image? Image { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置图文消息附件信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("link")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("link")]
|
||||
public Types.Link? Link { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置视频附件信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("video")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("video")]
|
||||
public Types.Video? Video { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置小程序附件信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("miniprogram")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("miniprogram")]
|
||||
public Types.MiniProgram? MiniProgram { get; set; }
|
||||
}
|
||||
|
||||
public class Question
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置主问题文本信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("text")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("text")]
|
||||
public Text Text { get; set; } = new Text();
|
||||
}
|
||||
|
||||
public class SimilarQuestionList
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置相似问题列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("items")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("items")]
|
||||
public IList<SimilarQuestionItem> Items { get; set; } = new List<SimilarQuestionItem>();
|
||||
}
|
||||
|
||||
public class SimilarQuestionItem
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置相似问题文本信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("text")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("text")]
|
||||
public Text Text { get; set; } = new Text();
|
||||
}
|
||||
|
||||
public class Answer
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置回答文本信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("text")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("text")]
|
||||
public Text Text { get; set; } = new Text();
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置附件列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("attachments")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("attachments")]
|
||||
public IList<Attachment> AttachmentList { get; set; } = new List<Attachment>();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置分组 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("group_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("group_id")]
|
||||
public string GroupId { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置主问题信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("question")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("question")]
|
||||
public Types.Question Question { get; set; } = new Types.Question();
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置相似问题列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("similar_questions")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("similar_questions")]
|
||||
public Types.SimilarQuestionList? SimilarQuestionList { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置回答列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("answers")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("answers")]
|
||||
public IList<Types.Answer> AnswerList { get; set; } = new List<Types.Answer>();
|
||||
}
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/kf/knowledge/add_intent 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class CgibinKfKnowledgeAddIntentResponse : WechatWorkResponse
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置问答 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("intent_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("intent_id")]
|
||||
public string IntentId { get; set; } = default!;
|
||||
}
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/kf/knowledge/del_intent 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class CgibinKfKnowledgeDeleteIntentRequest : WechatWorkRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置问答 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("intent_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("intent_id")]
|
||||
public string IntentId { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/kf/knowledge/del_intent 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class CgibinKfKnowledgeDeleteIntentResponse : WechatWorkResponse
|
||||
{
|
||||
}
|
||||
}
|
@ -0,0 +1,36 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/kf/knowledge/list_intent 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class CgibinKfKnowledgeListIntentRequest : WechatWorkRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置分组 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("group_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("group_id")]
|
||||
public string? GroupId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置问答 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("intent_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("intent_id")]
|
||||
public string? IntentId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置翻页标记。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("cursor")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("cursor")]
|
||||
public string? Cursor { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置分页每页数量。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("limit")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("limit")]
|
||||
public int? Limit { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,248 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/kf/knowledge/list_intent 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class CgibinKfKnowledgeListIntentResponse : WechatWorkResponse
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Intent
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Text
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置文本内容。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("content")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("content")]
|
||||
public string Content { get; set; } = default!;
|
||||
}
|
||||
|
||||
public class Attachment
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Image
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置图片文件名。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("name")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("name")]
|
||||
public string Name { get; set; } = default!;
|
||||
}
|
||||
|
||||
public class Link
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置图文消息标题。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("title")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("title")]
|
||||
public string Title { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置图文消息描述。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("desc")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("desc")]
|
||||
public string? Description { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置图文消息 URL。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("url")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("url")]
|
||||
public string Url { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置图文消息封面 URL。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("pic_url")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("pic_url")]
|
||||
public string? PictureUrl { get; set; }
|
||||
}
|
||||
|
||||
public class Video
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置视频文件名。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("name")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("name")]
|
||||
public string Name { get; set; } = default!;
|
||||
}
|
||||
|
||||
public class MiniProgram
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置小程序 AppId。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("appid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("appid")]
|
||||
public string AppId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置小程序页面路径。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("pagepath")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("pagepath")]
|
||||
public string PagePath { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置小程序标题。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("title")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("title")]
|
||||
public string? Title { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置附件类型。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("msgtype")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("msgtype")]
|
||||
public string Type { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置图片附件信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("image")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("image")]
|
||||
public Types.Image? Image { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置图文消息附件信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("link")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("link")]
|
||||
public Types.Link? Link { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置视频附件信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("video")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("video")]
|
||||
public Types.Video? Video { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置小程序附件信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("miniprogram")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("miniprogram")]
|
||||
public Types.MiniProgram? MiniProgram { get; set; }
|
||||
}
|
||||
|
||||
public class Question
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置主问题文本信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("text")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("text")]
|
||||
public Text Text { get; set; } = default!;
|
||||
}
|
||||
|
||||
public class SimilarQuestionList
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置相似问题列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("items")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("items")]
|
||||
public SimilarQuestionItem[] Items { get; set; } = default!;
|
||||
}
|
||||
|
||||
public class SimilarQuestionItem
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置相似问题文本信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("text")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("text")]
|
||||
public Text Text { get; set; } = default!;
|
||||
}
|
||||
|
||||
public class Answer
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置回答文本信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("text")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("text")]
|
||||
public Text Text { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置附件列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("attachments")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("attachments")]
|
||||
public Attachment[] AttachmentList { get; set; } = default!;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置分组 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("group_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("group_id")]
|
||||
public string GroupId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置问答 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("intent_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("intent_id")]
|
||||
public string IntentId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置主问题信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("question")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("question")]
|
||||
public Types.Question Question { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置相似问题列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("similar_questions")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("similar_questions")]
|
||||
public Types.SimilarQuestionList? SimilarQuestionList { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置回答列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("answers")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("answers")]
|
||||
public Types.Answer[] AnswerList { get; set; } = default!;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置问答列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("intent_list")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("intent_list")]
|
||||
public Types.Intent[] IntentList { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置是否还有更多数据。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("has_more")]
|
||||
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.NumericalBooleanConverter))]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("has_more")]
|
||||
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumericalBooleanConverter))]
|
||||
public bool HasMore { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置翻页标记。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("next_cursor")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("next_cursor")]
|
||||
public string? NextCursor { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,142 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/kf/knowledge/mod_intent 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class CgibinKfKnowledgeModifyIntentRequest : WechatWorkRequest
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Text : CgibinKfKnowledgeAddIntentRequest.Types.Text
|
||||
{
|
||||
}
|
||||
|
||||
public class Attachment : CgibinKfKnowledgeAddIntentRequest.Types.Attachment
|
||||
{
|
||||
public new static class Types
|
||||
{
|
||||
public class Image : CgibinKfKnowledgeAddIntentRequest.Types.Attachment.Types.Image
|
||||
{
|
||||
}
|
||||
|
||||
public class Link : CgibinKfKnowledgeAddIntentRequest.Types.Attachment.Types.Link
|
||||
{
|
||||
}
|
||||
|
||||
public class Video : CgibinKfKnowledgeAddIntentRequest.Types.Attachment.Types.Video
|
||||
{
|
||||
}
|
||||
|
||||
public class MiniProgram : CgibinKfKnowledgeAddIntentRequest.Types.Attachment.Types.MiniProgram
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置图片附件信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("image")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("image")]
|
||||
public new Types.Image? Image { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置图文消息附件信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("link")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("link")]
|
||||
public new Types.Link? Link { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置视频附件信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("video")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("video")]
|
||||
public new Types.Video? Video { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置小程序附件信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("miniprogram")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("miniprogram")]
|
||||
public new Types.MiniProgram? MiniProgram { get; set; }
|
||||
}
|
||||
|
||||
public class Question : CgibinKfKnowledgeAddIntentRequest.Types.Question
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置主问题文本信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("text")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("text")]
|
||||
public new Text? Text { get; set; }
|
||||
}
|
||||
|
||||
public class SimilarQuestionList : CgibinKfKnowledgeAddIntentRequest.Types.SimilarQuestionList
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置相似问题列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("items")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("items")]
|
||||
public new IList<SimilarQuestionItem> Items { get; set; } = new List<SimilarQuestionItem>();
|
||||
}
|
||||
|
||||
public class SimilarQuestionItem : CgibinKfKnowledgeAddIntentRequest.Types.SimilarQuestionItem
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置相似问题文本信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("text")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("text")]
|
||||
public new Text? Text { get; set; }
|
||||
}
|
||||
|
||||
public class Answer : CgibinKfKnowledgeAddIntentRequest.Types.Answer
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置回答文本信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("text")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("text")]
|
||||
public new Text? Text { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置附件列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("attachments")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("attachments")]
|
||||
public new IList<Attachment>? AttachmentList { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置问答 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("intent_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("intent_id")]
|
||||
public string IntentId { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置主问题信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("question")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("question")]
|
||||
public Types.Question? Question { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置相似问题列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("similar_questions")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("similar_questions")]
|
||||
public Types.SimilarQuestionList? SimilarQuestionList { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置回答列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("answers")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("answers")]
|
||||
public IList<Types.Answer>? AnswerList { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/kf/knowledge/mod_intent 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class CgibinKfKnowledgeModifyIntentResponse : WechatWorkResponse
|
||||
{
|
||||
}
|
||||
}
|
@ -0,0 +1,3 @@
|
||||
{
|
||||
"name": "分组名"
|
||||
}
|
@ -0,0 +1,5 @@
|
||||
{
|
||||
"errcode": 0,
|
||||
"errmsg": "ok",
|
||||
"group_id": "GROUP_ID"
|
||||
}
|
@ -0,0 +1,3 @@
|
||||
{
|
||||
"group_id": "GROUP_ID"
|
||||
}
|
@ -0,0 +1,5 @@
|
||||
{
|
||||
"cursor": "CURSOR",
|
||||
"limit": 100,
|
||||
"group_id": "GROUP_ID"
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
{
|
||||
"errcode": 0,
|
||||
"errmsg": "ok",
|
||||
"next_cursor": "NEXT_CURSOR",
|
||||
"has_more": 1,
|
||||
"group_list": [
|
||||
{
|
||||
"group_id": "GROUP_ID",
|
||||
"name": "NAME",
|
||||
"is_default": 1
|
||||
},
|
||||
{
|
||||
"group_id": "GROUP_ID",
|
||||
"name": "NAME",
|
||||
"is_default": 0
|
||||
}
|
||||
]
|
||||
}
|
@ -0,0 +1,4 @@
|
||||
{
|
||||
"group_id": "GROUP_ID",
|
||||
"name": "分组名"
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
{
|
||||
"group_id": "GROUP_ID",
|
||||
"question": {
|
||||
"text": {
|
||||
"content": "主问题"
|
||||
}
|
||||
},
|
||||
"similar_questions": {
|
||||
"items": [
|
||||
{
|
||||
"text": {
|
||||
"content": "相似问题1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"text": {
|
||||
"content": "相似问题2"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"answers": [
|
||||
{
|
||||
"text": {
|
||||
"content": "问题的回复"
|
||||
},
|
||||
"attachments": [
|
||||
{
|
||||
"msgtype": "image",
|
||||
"image": {
|
||||
"media_id": "MEDIA_ID"
|
||||
}
|
||||
},
|
||||
{
|
||||
"msgtype": "video",
|
||||
"video": {
|
||||
"media_id": "MEDIA_ID"
|
||||
}
|
||||
},
|
||||
{
|
||||
"msgtype": "link",
|
||||
"link": {
|
||||
"title": "消息标题",
|
||||
"pic_url": "https://example.pic.com/path",
|
||||
"desc": "消息描述",
|
||||
"url": "https://example.link.com/path"
|
||||
}
|
||||
},
|
||||
{
|
||||
"msgtype": "miniprogram",
|
||||
"miniprogram": {
|
||||
"title": "欢迎报名夏令营",
|
||||
"thumb_media_id": "THUMB_MEDIA_ID",
|
||||
"appid": "wx8bd80126147dfAAA",
|
||||
"pagepath": "/path/index.html"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
@ -0,0 +1,5 @@
|
||||
{
|
||||
"errcode": 0,
|
||||
"errmsg": "ok",
|
||||
"intent_id": "INTENT_ID"
|
||||
}
|
@ -0,0 +1,3 @@
|
||||
{
|
||||
"intent_id": "INTENT_ID"
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"cursor": "CURSOR",
|
||||
"limit": 100,
|
||||
"group_id": "GROUP_ID",
|
||||
"intent_id": "INTENT_ID"
|
||||
}
|
@ -0,0 +1,69 @@
|
||||
{
|
||||
"errcode": 0,
|
||||
"errmsg": "ok",
|
||||
"next_cursor": "NEXT_CURSOR",
|
||||
"has_more": 1,
|
||||
"intent_list": [
|
||||
{
|
||||
"group_id": "GROUP_ID",
|
||||
"intent_id": "INTENT_ID",
|
||||
"question": {
|
||||
"text": {
|
||||
"content": "主问题"
|
||||
}
|
||||
},
|
||||
"similar_questions": {
|
||||
"items": [
|
||||
{
|
||||
"text": {
|
||||
"content": "相似问题1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"text": {
|
||||
"content": "相似问题2"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"answers": [
|
||||
{
|
||||
"text": {
|
||||
"content": "问题的回复"
|
||||
},
|
||||
"attachments": [
|
||||
{
|
||||
"msgtype": "image",
|
||||
"image": {
|
||||
"name": "图片(仅返回名字).jpg"
|
||||
}
|
||||
},
|
||||
{
|
||||
"msgtype": "video",
|
||||
"video": {
|
||||
"name": "视频的文件名"
|
||||
}
|
||||
},
|
||||
{
|
||||
"msgtype": "link",
|
||||
"link": {
|
||||
"title": "消息标题",
|
||||
"pic_url": "https://example.pic.com/path",
|
||||
"desc": "消息描述",
|
||||
"url": "https://example.link.com/path"
|
||||
}
|
||||
},
|
||||
{
|
||||
"msgtype": "miniprogram",
|
||||
"miniprogram": {
|
||||
"title": "欢迎报名夏令营",
|
||||
"appid": "wx8bd80126147dfAAA",
|
||||
"pagepath": "/path/index.html"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
{
|
||||
"intent_id": "INTENT_ID",
|
||||
"question": {
|
||||
"text": {
|
||||
"content": "主问题"
|
||||
}
|
||||
},
|
||||
"similar_questions": {
|
||||
"items": [
|
||||
{
|
||||
"text": {
|
||||
"content": "相似问题1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"text": {
|
||||
"content": "相似问题2"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"answers": [
|
||||
{
|
||||
"text": {
|
||||
"content": "问题的回复"
|
||||
},
|
||||
"attachments": [
|
||||
{
|
||||
"msgtype": "image",
|
||||
"image": {
|
||||
"media_id": "MEDIA_ID"
|
||||
}
|
||||
},
|
||||
{
|
||||
"msgtype": "video",
|
||||
"video": {
|
||||
"media_id": "MEDIA_ID"
|
||||
}
|
||||
},
|
||||
{
|
||||
"msgtype": "link",
|
||||
"link": {
|
||||
"title": "消息标题",
|
||||
"pic_url": "https://example.pic.com/path",
|
||||
"desc": "消息描述",
|
||||
"url": "https://example.link.com/path"
|
||||
}
|
||||
},
|
||||
{
|
||||
"msgtype": "miniprogram",
|
||||
"miniprogram": {
|
||||
"title": "欢迎报名夏令营",
|
||||
"thumb_media_id": "THUMB_MEDIA_ID",
|
||||
"appid": "wx8bd80126147dfAAA",
|
||||
"pagepath": "/path/index.html"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
Loading…
Reference in New Issue
Block a user