mirror of
https://gitee.com/fudiwei/DotNetCore.SKIT.FlurlHttpClient.Wechat.git
synced 2026-02-18 22:26:20 +08:00
feat(work): 新增微信客服知识库相关接口
This commit is contained in:
@@ -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
|
||||
{
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user