mirror of
https://gitee.com/fudiwei/DotNetCore.SKIT.FlurlHttpClient.Wechat.git
synced 2025-07-15 23:13:32 +08:00
feat(work): 随官方更新发送应用消息相关接口模型
This commit is contained in:
parent
0d0e040d3f
commit
7d2f818392
@ -1,5 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
@ -401,6 +400,13 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
[Newtonsoft.Json.JsonProperty("desc")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("desc")]
|
||||
public string? Description { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置来源图片的描述颜色类型。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("desc_color")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("desc_color")]
|
||||
public int? DescriptionColorType { get; set; }
|
||||
}
|
||||
|
||||
public class MainTitle
|
||||
@ -437,6 +443,51 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
public double? AspectRatio { get; set; }
|
||||
}
|
||||
|
||||
public class QuoteArea
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置类型。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("type")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("type")]
|
||||
public int? Type { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置跳转链接。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("url")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("url")]
|
||||
public string? Url { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置跳转小程序的 AppId。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("appid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("appid")]
|
||||
public string? MiniProgramAppId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置跳转小程序的路径。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("pagepath")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("pagepath")]
|
||||
public string? MiniProgramPagePath { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置引用文献样式的标题。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("title")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("title")]
|
||||
public string? Title { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置引用文献样式的引用文案。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("quote_text")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("quote_text")]
|
||||
public string? QuoteText { get; set; }
|
||||
}
|
||||
|
||||
public class EmphasisContent : MainTitle
|
||||
{
|
||||
}
|
||||
@ -481,6 +532,13 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
[Newtonsoft.Json.JsonProperty("media_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("media_id")]
|
||||
public string? MediaId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置成员账号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("userid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("userid")]
|
||||
public string? UserId { get; set; }
|
||||
}
|
||||
|
||||
public class Action
|
||||
@ -521,6 +579,43 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
public string? MiniProgramPagePath { get; set; }
|
||||
}
|
||||
|
||||
public class ActionMenu
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Action
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置操作按钮 Key。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("key")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("key")]
|
||||
public string Key { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置操作按钮文案。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("text")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("text")]
|
||||
public string Text { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置菜单描述。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("desc")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("desc")]
|
||||
public string? Description { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置操作按钮列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("action_list")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("action_list")]
|
||||
public IList<Types.Action> ActionList { get; set; } = new List<Types.Action>();
|
||||
}
|
||||
|
||||
public class Button
|
||||
{
|
||||
/// <summary>
|
||||
@ -704,6 +799,13 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
[System.Text.Json.Serialization.JsonPropertyName("main_title")]
|
||||
public Types.MainTitle? MainTitle { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置引用文献信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("quote_area")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("quote_area")]
|
||||
public Types.QuoteArea? QuoteArea { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置关键数据样式信息。
|
||||
/// </summary>
|
||||
@ -744,7 +846,14 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("card_action")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("card_action")]
|
||||
public Types.Action? CardAction { get; set; }
|
||||
public Types.Action? Action { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置卡片的右上角菜单信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("action_menu")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("action_menu")]
|
||||
public Types.ActionMenu? ActionMenu { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置任务 ID。
|
||||
@ -781,6 +890,74 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
[System.Text.Json.Serialization.JsonPropertyName("submit_button")]
|
||||
public Types.Button? SubmitButton { get; set; }
|
||||
}
|
||||
|
||||
public class TemplateMessage
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
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;
|
||||
}
|
||||
|
||||
public class DataItem
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置消息内容 Key。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("key")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("key")]
|
||||
public string Key { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置消息内容文本。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("value")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("value")]
|
||||
public string Value { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置模板 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("template_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("template_id")]
|
||||
public string TemplateId { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置点击消息跳转的 URL。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("url")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("url")]
|
||||
public string? Url { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置点击消息跳转的小程序信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("miniprogram")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("miniprogram")]
|
||||
public Types.MiniProgram? MiniProgram { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置模板消息内容列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("content_item")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("content_item")]
|
||||
public IList<Types.DataItem>? DataList { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -895,12 +1072,19 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
public Types.TaskCardMessage? MessageContentForTaskCard { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置模板卡片信息。
|
||||
/// 获取或设置模板卡片消息信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("template_card")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("template_card")]
|
||||
public Types.TemplateCardMessage? MessageContentForTemplateCard { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置模板信息信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("template_msg")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("template_msg")]
|
||||
public Types.TemplateMessage? MessageContentForTemplate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置应用 ID。如果不指定将使用构造 <see cref="WechatWorkClient"/> 时的 <see cref="WechatWorkClientOptions.AgentId"/> 参数。
|
||||
/// </summary>
|
||||
|
@ -97,32 +97,46 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"selected_ticket_list": [ "xxx", "yyy" ],
|
||||
"selected_ticket_list": [
|
||||
"xxx",
|
||||
"yyy"
|
||||
],
|
||||
"template_card": {
|
||||
"card_type": "text_notice",
|
||||
"source": {
|
||||
"icon_url": "图片的url",
|
||||
"desc": "企业微信"
|
||||
"desc": "企业微信",
|
||||
"desc_color": 1
|
||||
},
|
||||
"card_image": {
|
||||
"url": "图片的url",
|
||||
"aspect_ratio": 1.3
|
||||
"action_menu": {
|
||||
"desc": "卡片副交互辅助文本说明",
|
||||
"action_list": [
|
||||
{
|
||||
"text": "接受推送",
|
||||
"key": "A"
|
||||
},
|
||||
{
|
||||
"text": "不再推送",
|
||||
"key": "B"
|
||||
}
|
||||
]
|
||||
},
|
||||
"task_id": "task_id",
|
||||
"main_title": {
|
||||
"title": "欢迎使用企业微信",
|
||||
"desc": "您的好友正在邀请您加入企业微信"
|
||||
},
|
||||
"quote_area": {
|
||||
"type": 1,
|
||||
"url": "https://work.weixin.qq.com",
|
||||
"title": "企业微信的引用样式",
|
||||
"quote_text": "企业微信真好用呀真好用"
|
||||
},
|
||||
"emphasis_content": {
|
||||
"title": "100",
|
||||
"desc": "核心数据"
|
||||
},
|
||||
"sub_title_text": "下载企业微信还能抢红包!",
|
||||
"vertical_content_list": [
|
||||
{
|
||||
"title": "惊喜红包等你来拿",
|
||||
"desc": "下载企业微信还能抢红包!"
|
||||
}
|
||||
],
|
||||
"horizontal_content_list": [
|
||||
{
|
||||
"keyname": "邀请人",
|
||||
@ -139,6 +153,12 @@
|
||||
"keyname": "企业微信下载",
|
||||
"value": "企业微信.apk",
|
||||
"media_id": "文件的media_id"
|
||||
},
|
||||
{
|
||||
"type": 3,
|
||||
"keyname": "员工信息",
|
||||
"value": "点击查看",
|
||||
"userid": "zhangsan"
|
||||
}
|
||||
],
|
||||
"jump_list": [
|
||||
@ -159,73 +179,30 @@
|
||||
"url": "https://work.weixin.qq.com",
|
||||
"appid": "小程序的appid",
|
||||
"pagepath": "/index.html"
|
||||
},
|
||||
"task_id": "task_id",
|
||||
"button_list": [
|
||||
{
|
||||
"text": "按钮1",
|
||||
"style": 1,
|
||||
"key": "button_key_1"
|
||||
},
|
||||
{
|
||||
"text": "按钮2",
|
||||
"style": 2,
|
||||
"key": "button_key_2"
|
||||
}
|
||||
],
|
||||
"checkbox": {
|
||||
"question_key": "question_key1",
|
||||
"option_list": [
|
||||
{
|
||||
"id": "option_id1",
|
||||
"text": "选择题选项1",
|
||||
"is_checked": true
|
||||
},
|
||||
{
|
||||
"id": "option_id2",
|
||||
"text": "选择题选项2",
|
||||
"is_checked": false
|
||||
}
|
||||
],
|
||||
"mode": 1
|
||||
},
|
||||
"select_list": [
|
||||
{
|
||||
"question_key": "question_key1",
|
||||
"title": "选择器标签1",
|
||||
"selected_id": "selection_id1",
|
||||
"option_list": [
|
||||
{
|
||||
"id": "selection_id1",
|
||||
"text": "选择器选项1"
|
||||
},
|
||||
{
|
||||
"id": "selection_id2",
|
||||
"text": "选择器选项2"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"question_key": "question_key2",
|
||||
"title": "选择器标签2",
|
||||
"selected_id": "selection_id3",
|
||||
"option_list": [
|
||||
{
|
||||
"id": "selection_id3",
|
||||
"text": "选择器选项3"
|
||||
},
|
||||
{
|
||||
"id": "selection_id4",
|
||||
"text": "选择器选项4"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"submit_button": {
|
||||
"text": "提交",
|
||||
"key": "key"
|
||||
}
|
||||
},
|
||||
"template_msg": {
|
||||
"template_id": "ttxxlGlgIAwJrCTFjtndfgHPoIySyk6w",
|
||||
"url": "http://www.qq.com",
|
||||
"miniprogram": {
|
||||
"appid": "APPID",
|
||||
"pagepath": "/index.html"
|
||||
},
|
||||
"content_item": [
|
||||
{
|
||||
"key": "会议室",
|
||||
"value": "402"
|
||||
},
|
||||
{
|
||||
"key": "会议地点",
|
||||
"value": "广州TIT-402会议室"
|
||||
},
|
||||
{
|
||||
"key": "会议时间",
|
||||
"value": "2018年8月1日 09:00-09:30"
|
||||
}
|
||||
]
|
||||
},
|
||||
"safe": 0,
|
||||
"enable_id_trans": 0,
|
||||
"enable_duplicate_check": 0,
|
||||
|
Loading…
Reference in New Issue
Block a user