diff --git a/src/SKIT.FlurlHttpClient.Wechat.Work/Models/CgibinOA/Approval/CgibinOAGetApprovalDetailResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Work/Models/CgibinOA/Approval/CgibinOAGetApprovalDetailResponse.cs
index cc37f6c3..8b876562 100644
--- a/src/SKIT.FlurlHttpClient.Wechat.Work/Models/CgibinOA/Approval/CgibinOAGetApprovalDetailResponse.cs
+++ b/src/SKIT.FlurlHttpClient.Wechat.Work/Models/CgibinOA/Approval/CgibinOAGetApprovalDetailResponse.cs
@@ -191,6 +191,13 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.Models
[System.Text.Json.Serialization.JsonPropertyName("departments")]
public ContactControlValueAsDepartment[]? ContactDepartments { get; set; }
+ ///
+ /// 获取或设置 Tips 控件值。
+ ///
+ [Newtonsoft.Json.JsonProperty("tips")]
+ [System.Text.Json.Serialization.JsonPropertyName("tips")]
+ public TipsControlValue[]? Tips { get; set; }
+
///
/// 获取或设置 File 控件值。
///
@@ -205,6 +212,13 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.Models
[System.Text.Json.Serialization.JsonPropertyName("children")]
public TableControlValue[]? TableChildren { get; set; }
+ ///
+ /// 获取或设置 Vacation 控件值。
+ ///
+ [Newtonsoft.Json.JsonProperty("vacation")]
+ [System.Text.Json.Serialization.JsonPropertyName("vacation")]
+ public VacationControlValue? Vacation { get; set; }
+
///
/// 获取或设置 Attendance 控件值。
///
@@ -213,11 +227,18 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.Models
public AttendanceControlValue? Attendance { get; set; }
///
- /// 获取或设置 Vacation 控件值。
+ /// 获取或设置 PunchCorrection 控件值。
///
- [Newtonsoft.Json.JsonProperty("vacation")]
- [System.Text.Json.Serialization.JsonPropertyName("vacation")]
- public VacationControlValue? Vacation { get; set; }
+ [Newtonsoft.Json.JsonProperty("punch_correction")]
+ [System.Text.Json.Serialization.JsonPropertyName("punch_correction")]
+ public CheckinControlValue? Checkin { get; set; }
+
+ ///
+ /// 获取或设置 DateRange 控件值。
+ ///
+ [Newtonsoft.Json.JsonProperty("date_range")]
+ [System.Text.Json.Serialization.JsonPropertyName("date_range")]
+ public DateRangeControlValue? DateRange { get; set; }
///
/// 获取或设置 Location 控件值。
@@ -240,20 +261,6 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.Models
[System.Text.Json.Serialization.JsonPropertyName("formula")]
public FormulaControlValue? Formula { get; set; }
- ///
- /// 获取或设置 DateRange 控件值。
- ///
- [Newtonsoft.Json.JsonProperty("date_range")]
- [System.Text.Json.Serialization.JsonPropertyName("date_range")]
- public DateRangeControlValue? DateRange { get; set; }
-
- ///
- /// 获取或设置 PunchCorrection 控件值。
- ///
- [Newtonsoft.Json.JsonProperty("punch_correction")]
- [System.Text.Json.Serialization.JsonPropertyName("punch_correction")]
- public CheckinControlValue? Checkin { get; set; }
-
///
/// 获取或设置 BankAccount 控件值。
///
@@ -379,6 +386,119 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.Models
public string? Name { get; set; }
}
+ public class TipsControlValue
+ {
+ public static class Types
+ {
+ public class TipsContent
+ {
+ public static class Types
+ {
+ public class Text
+ {
+ public static class Types
+ {
+ public class SubText
+ {
+ public static class Types
+ {
+ public class Content
+ {
+ public static class Types
+ {
+ public class PlainText
+ {
+ ///
+ /// 获取或设置纯文本文字。
+ ///
+ [Newtonsoft.Json.JsonProperty("content")]
+ [System.Text.Json.Serialization.JsonPropertyName("content")]
+ public string Content { get; set; } = default!;
+ }
+
+ public class Link
+ {
+ ///
+ /// 获取或设置链接标题。
+ ///
+ [Newtonsoft.Json.JsonProperty("title")]
+ [System.Text.Json.Serialization.JsonPropertyName("title")]
+ public string Title { get; set; } = default!;
+
+ ///
+ /// 获取或设置链接 URL。
+ ///
+ [Newtonsoft.Json.JsonProperty("url")]
+ [System.Text.Json.Serialization.JsonPropertyName("url")]
+ public string URL { get; set; } = default!;
+ }
+ }
+
+ ///
+ /// 获取或设置纯文本类型的内容信息。
+ ///
+ [Newtonsoft.Json.JsonProperty("plain_text")]
+ [System.Text.Json.Serialization.JsonPropertyName("plain_text")]
+ public Types.PlainText? PlainText { get; set; }
+
+ ///
+ /// 获取或设置链接类型的内容信息。
+ ///
+ [Newtonsoft.Json.JsonProperty("link")]
+ [System.Text.Json.Serialization.JsonPropertyName("link")]
+ public Types.Link? Link { get; set; }
+ }
+ }
+
+ ///
+ /// 获取或设置文本类型。
+ ///
+ [Newtonsoft.Json.JsonProperty("type")]
+ [System.Text.Json.Serialization.JsonPropertyName("type")]
+ public int Type { get; set; }
+
+ ///
+ /// 获取或设置文本内容。
+ ///
+ [Newtonsoft.Json.JsonProperty("content")]
+ [System.Text.Json.Serialization.JsonPropertyName("content")]
+ public Types.Content Content { get; set; } = default!;
+ }
+ }
+
+ ///
+ /// 获取或设置说明文字分段列表。
+ ///
+ [Newtonsoft.Json.JsonProperty("sub_text")]
+ [System.Text.Json.Serialization.JsonPropertyName("sub_text")]
+ public Types.SubText[] SubTextList { get; set; } = default!;
+ }
+ }
+
+ ///
+ /// 获取或设置语言类型。
+ ///
+ [Newtonsoft.Json.JsonProperty("lang")]
+ [System.Text.Json.Serialization.JsonPropertyName("lang")]
+ public string Language { get; set; } = default!;
+
+ ///
+ /// 获取或设置说明文字信息。
+ ///
+ [Newtonsoft.Json.JsonProperty("text")]
+ [System.Text.Json.Serialization.JsonPropertyName("text")]
+ public Types.Text Text { get; set; } = default!;
+ }
+ }
+
+ ///
+ /// 获取或设置说明文字列表。
+ ///
+ [Newtonsoft.Json.JsonProperty("tips_content")]
+ [System.Text.Json.Serialization.JsonPropertyName("tips_content")]
+ public Types.TipsContent[] TipsList { get; set; } = default!;
+ }
+
public class FileControlValue
{
///
@@ -406,6 +526,34 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.Models
public Types.TableDetail[] TableDetailList { get; set; } = default!;
}
+ public class VacationControlValue
+ {
+ public static class Types
+ {
+ public class Selector : SelectorControlValue
+ {
+ }
+
+ public class Attendance : AttendanceControlValue
+ {
+ }
+ }
+
+ ///
+ /// 获取或设置请假类型选择信息。
+ ///
+ [Newtonsoft.Json.JsonProperty("selector")]
+ [System.Text.Json.Serialization.JsonPropertyName("selector")]
+ public Types.Selector Selector { get; set; } = default!;
+
+ ///
+ /// 获取或设置假勤内容填写信息。
+ ///
+ [Newtonsoft.Json.JsonProperty("attendance")]
+ [System.Text.Json.Serialization.JsonPropertyName("attendance")]
+ public Types.Attendance Attendance { get; set; } = default!;
+ }
+
public class AttendanceControlValue
{
public static class Types
@@ -481,32 +629,82 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.Models
public Types.Slice? Slice { get; set; }
}
- public class VacationControlValue
+ public class CheckinControlValue
+ {
+ ///
+ /// 获取或设置异常状态说明。
+ ///
+ [Newtonsoft.Json.JsonProperty("state")]
+ [System.Text.Json.Serialization.JsonPropertyName("state")]
+ public string State { get; set; } = default!;
+
+ ///
+ /// 获取或设置版本标识。
+ ///
+ [Newtonsoft.Json.JsonProperty("version")]
+ [System.Text.Json.Serialization.JsonPropertyName("version")]
+ public int? Version { get; set; }
+
+ ///
+ /// 获取或设置补卡时间戳。
+ ///
+ [Newtonsoft.Json.JsonProperty("time")]
+ [System.Text.Json.Serialization.JsonPropertyName("time")]
+ [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberConverter))]
+ public long? Timestamp { get; set; }
+
+ ///
+ /// 获取或设置补卡日期时间戳。
+ ///
+ [Newtonsoft.Json.JsonProperty("daymonthyear")]
+ [System.Text.Json.Serialization.JsonPropertyName("daymonthyear")]
+ [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberConverter))]
+ public long? DateTimestamp { get; set; }
+ }
+
+ public class DateRangeControlValue
{
public static class Types
{
- public class Selector : SelectorControlValue
- {
- }
-
- public class Attendance : AttendanceControlValue
+ public class Timezone : DateControlValue.Types.Timezone
{
}
}
///
- /// 获取或设置请假类型选择信息。
+ /// 获取或设置时间展示类型。
///
- [Newtonsoft.Json.JsonProperty("selector")]
- [System.Text.Json.Serialization.JsonPropertyName("selector")]
- public Types.Selector Selector { get; set; } = default!;
+ [Newtonsoft.Json.JsonProperty("type")]
+ [System.Text.Json.Serialization.JsonPropertyName("type")]
+ public string Type { get; set; } = default!;
///
- /// 获取或设置假勤内容填写信息。
+ /// 获取或设置开始时间戳。
///
- [Newtonsoft.Json.JsonProperty("attendance")]
- [System.Text.Json.Serialization.JsonPropertyName("attendance")]
- public Types.Attendance Attendance { get; set; } = default!;
+ [Newtonsoft.Json.JsonProperty("new_begin")]
+ [System.Text.Json.Serialization.JsonPropertyName("new_begin")]
+ public long BeginTimestamp { get; set; }
+
+ ///
+ /// 获取或设置结束时间戳。
+ ///
+ [Newtonsoft.Json.JsonProperty("new_end")]
+ [System.Text.Json.Serialization.JsonPropertyName("new_end")]
+ public long EndTimestamp { get; set; }
+
+ ///
+ /// 获取或设置时长范围(单位:秒)。
+ ///
+ [Newtonsoft.Json.JsonProperty("new_duration")]
+ [System.Text.Json.Serialization.JsonPropertyName("new_duration")]
+ public int Duration { get; set; }
+
+ ///
+ /// 获取或设置时区信息。
+ ///
+ [Newtonsoft.Json.JsonProperty("timezone_info")]
+ [System.Text.Json.Serialization.JsonPropertyName("timezone_info")]
+ public Types.Timezone? Timezone { get; set; }
}
public class LocationControlValue
@@ -596,84 +794,6 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.Models
public string Value { get; set; } = default!;
}
- public class DateRangeControlValue
- {
- public static class Types
- {
- public class Timezone : DateControlValue.Types.Timezone
- {
- }
- }
-
- ///
- /// 获取或设置时间展示类型。
- ///
- [Newtonsoft.Json.JsonProperty("type")]
- [System.Text.Json.Serialization.JsonPropertyName("type")]
- public string Type { get; set; } = default!;
-
- ///
- /// 获取或设置开始时间戳。
- ///
- [Newtonsoft.Json.JsonProperty("new_begin")]
- [System.Text.Json.Serialization.JsonPropertyName("new_begin")]
- public long BeginTimestamp { get; set; }
-
- ///
- /// 获取或设置结束时间戳。
- ///
- [Newtonsoft.Json.JsonProperty("new_end")]
- [System.Text.Json.Serialization.JsonPropertyName("new_end")]
- public long EndTimestamp { get; set; }
-
- ///
- /// 获取或设置时长范围(单位:秒)。
- ///
- [Newtonsoft.Json.JsonProperty("new_duration")]
- [System.Text.Json.Serialization.JsonPropertyName("new_duration")]
- public int Duration { get; set; }
-
- ///
- /// 获取或设置时区信息。
- ///
- [Newtonsoft.Json.JsonProperty("timezone_info")]
- [System.Text.Json.Serialization.JsonPropertyName("timezone_info")]
- public Types.Timezone? Timezone { get; set; }
- }
-
- public class CheckinControlValue
- {
- ///
- /// 获取或设置异常状态说明。
- ///
- [Newtonsoft.Json.JsonProperty("state")]
- [System.Text.Json.Serialization.JsonPropertyName("state")]
- public string State { get; set; } = default!;
-
- ///
- /// 获取或设置版本标识。
- ///
- [Newtonsoft.Json.JsonProperty("version")]
- [System.Text.Json.Serialization.JsonPropertyName("version")]
- public int? Version { get; set; }
-
- ///
- /// 获取或设置补卡时间戳。
- ///
- [Newtonsoft.Json.JsonProperty("time")]
- [System.Text.Json.Serialization.JsonPropertyName("time")]
- [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberConverter))]
- public long? Timestamp { get; set; }
-
- ///
- /// 获取或设置补卡日期时间戳。
- ///
- [Newtonsoft.Json.JsonProperty("daymonthyear")]
- [System.Text.Json.Serialization.JsonPropertyName("daymonthyear")]
- [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.TextualNumberConverter))]
- public long? DateTimestamp { get; set; }
- }
-
public class BankAccountControlValue
{
public static class Types
@@ -802,6 +922,15 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.Models
[Newtonsoft.Json.JsonProperty("value")]
[System.Text.Json.Serialization.JsonPropertyName("value")]
public Types.Value Value { get; set; } = default!;
+
+ ///
+ /// 获取或设置是否为必填项。
+ ///
+ [Newtonsoft.Json.JsonProperty("require")]
+ [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.NumericalBooleanConverter))]
+ [System.Text.Json.Serialization.JsonPropertyName("require")]
+ [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalBooleanConverter))]
+ public bool? IsRequired { get; set; }
}
}
diff --git a/src/SKIT.FlurlHttpClient.Wechat.Work/Models/CgibinOA/Approval/Template/CgibinOAApprovalCreateTemplateRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Work/Models/CgibinOA/Approval/Template/CgibinOAApprovalCreateTemplateRequest.cs
index 3440cd61..3a17cf7c 100644
--- a/src/SKIT.FlurlHttpClient.Wechat.Work/Models/CgibinOA/Approval/Template/CgibinOAApprovalCreateTemplateRequest.cs
+++ b/src/SKIT.FlurlHttpClient.Wechat.Work/Models/CgibinOA/Approval/Template/CgibinOAApprovalCreateTemplateRequest.cs
@@ -1,4 +1,4 @@
-using System.Collections.Generic;
+using System.Collections.Generic;
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
{
@@ -93,6 +93,20 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.Models
[System.Text.Json.Serialization.JsonPropertyName("contact")]
public ContactControlConfig? Contact { get; set; }
+ ///
+ /// 获取或设置 Tips 控件配置信息。
+ ///
+ [Newtonsoft.Json.JsonProperty("tips")]
+ [System.Text.Json.Serialization.JsonPropertyName("tips")]
+ public TipsControlConfig? Tips { get; set; }
+
+ ///
+ /// 获取或设置 File 控件配置信息。
+ ///
+ [Newtonsoft.Json.JsonProperty("file")]
+ [System.Text.Json.Serialization.JsonPropertyName("file")]
+ public FileControlConfig? File { get; set; }
+
///
/// 获取或设置 Table 控件配置信息。
///
@@ -113,6 +127,27 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.Models
[Newtonsoft.Json.JsonProperty("vacation_list")]
[System.Text.Json.Serialization.JsonPropertyName("vacation_list")]
public VacationControlConfig? Vacation { get; set; }
+
+ ///
+ /// 获取或设置 DateRange 控件配置信息。
+ ///
+ [Newtonsoft.Json.JsonProperty("date_range")]
+ [System.Text.Json.Serialization.JsonPropertyName("date_range")]
+ public DateRangeControlConfig? DateRange { get; set; }
+
+ ///
+ /// 获取或设置 Location 控件配置信息。
+ ///
+ [Newtonsoft.Json.JsonProperty("location")]
+ [System.Text.Json.Serialization.JsonPropertyName("location")]
+ public LocationControlConfig? Location { get; set; }
+
+ ///
+ /// 获取或设置 RelatedApproval 控件配置信息。
+ ///
+ [Newtonsoft.Json.JsonProperty("related_approval")]
+ [System.Text.Json.Serialization.JsonPropertyName("related_approval")]
+ public RelatedApprovalControlConfig? RelatedApproval { get; set; }
}
public class DateControlConfig
@@ -179,8 +214,140 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.Models
public string Mode { get; set; } = string.Empty;
}
+ public class TipsControlConfig
+ {
+ public static class Types
+ {
+ public class TipsContent
+ {
+ public static class Types
+ {
+ public class Text
+ {
+ public static class Types
+ {
+ public class SubText
+ {
+ public static class Types
+ {
+ public class Content
+ {
+ public static class Types
+ {
+ public class PlainText
+ {
+ ///
+ /// 获取或设置纯文本文字。
+ ///
+ [Newtonsoft.Json.JsonProperty("content")]
+ [System.Text.Json.Serialization.JsonPropertyName("content")]
+ public string Content { get; set; } = string.Empty;
+ }
+
+ public class Link
+ {
+ ///
+ /// 获取或设置链接标题。
+ ///
+ [Newtonsoft.Json.JsonProperty("title")]
+ [System.Text.Json.Serialization.JsonPropertyName("title")]
+ public string Title { get; set; } = string.Empty;
+
+ ///
+ /// 获取或设置链接 URL。
+ ///
+ [Newtonsoft.Json.JsonProperty("url")]
+ [System.Text.Json.Serialization.JsonPropertyName("url")]
+ public string URL { get; set; } = string.Empty;
+ }
+ }
+
+ ///
+ /// 获取或设置纯文本类型的内容信息。
+ ///
+ [Newtonsoft.Json.JsonProperty("plain_text")]
+ [System.Text.Json.Serialization.JsonPropertyName("plain_text")]
+ public Types.PlainText? PlainText { get; set; }
+
+ ///
+ /// 获取或设置链接类型的内容信息。
+ ///
+ [Newtonsoft.Json.JsonProperty("link")]
+ [System.Text.Json.Serialization.JsonPropertyName("link")]
+ public Types.Link? Link { get; set; }
+ }
+ }
+
+ ///
+ /// 获取或设置文本类型。
+ ///
+ [Newtonsoft.Json.JsonProperty("type")]
+ [System.Text.Json.Serialization.JsonPropertyName("type")]
+ public int Type { get; set; }
+
+ ///
+ /// 获取或设置文本内容。
+ ///
+ [Newtonsoft.Json.JsonProperty("content")]
+ [System.Text.Json.Serialization.JsonPropertyName("content")]
+ public Types.Content Content { get; set; } = new Types.Content();
+ }
+ }
+
+ ///
+ /// 获取或设置说明文字分段列表。
+ ///
+ [Newtonsoft.Json.JsonProperty("sub_text")]
+ [System.Text.Json.Serialization.JsonPropertyName("sub_text")]
+ public IList SubTextList { get; set; } = new List();
+ }
+ }
+
+ ///
+ /// 获取或设置语言类型。
+ ///
+ [Newtonsoft.Json.JsonProperty("lang")]
+ [System.Text.Json.Serialization.JsonPropertyName("lang")]
+ public string Language { get; set; } = string.Empty;
+
+ ///
+ /// 获取或设置说明文字信息。
+ ///
+ [Newtonsoft.Json.JsonProperty("text")]
+ [System.Text.Json.Serialization.JsonPropertyName("text")]
+ public Types.Text Text { get; set; } = new Types.Text();
+ }
+ }
+
+ ///
+ /// 获取或设置说明文字列表。
+ ///
+ [Newtonsoft.Json.JsonProperty("tips_content")]
+ [System.Text.Json.Serialization.JsonPropertyName("tips_content")]
+ public IList TipsList { get; set; } = new List();
+ }
+
+ public class FileControlConfig
+ {
+ ///
+ /// 获取或设置是否只允许拍照。
+ ///
+ [Newtonsoft.Json.JsonProperty("is_only_photo")]
+ [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.NumericalBooleanConverter))]
+ [System.Text.Json.Serialization.JsonPropertyName("is_only_photo")]
+ [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalBooleanConverter))]
+ public bool IsOnlyPhoto { get; set; }
+ }
+
public class TableControlConfig
{
+ ///
+ /// 获取或设置打印格式。
+ ///
+ [Newtonsoft.Json.JsonProperty("print_format")]
+ [System.Text.Json.Serialization.JsonPropertyName("print_format")]
+ public int PrintFormat { get; set; }
+
///
/// 获取或设置子控件。
///
@@ -193,14 +360,8 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.Models
{
public static class Types
{
- public class DateRange
+ public class DateRange : DateRangeControlConfig
{
- ///
- /// 获取或设置时间刻度。
- ///
- [Newtonsoft.Json.JsonProperty("type")]
- [System.Text.Json.Serialization.JsonPropertyName("type")]
- public string Type { get; set; } = string.Empty;
}
}
@@ -248,6 +409,50 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.Models
[System.Text.Json.Serialization.JsonPropertyName("item")]
public IList VacationList { get; set; } = new List();
}
+
+ public class DateRangeControlConfig
+ {
+ ///
+ /// 获取或设置时间刻度。
+ ///
+ [Newtonsoft.Json.JsonProperty("type")]
+ [System.Text.Json.Serialization.JsonPropertyName("type")]
+ public string Type { get; set; } = string.Empty;
+
+ ///
+ /// 获取或设置自然日或工作日。
+ ///
+ [Newtonsoft.Json.JsonProperty("official_holiday")]
+ [System.Text.Json.Serialization.JsonPropertyName("official_holiday")]
+ public int? OfficialHoliday { get; set; }
+
+ ///
+ /// 获取或设置一天的时长(单位:秒)。
+ ///
+ [Newtonsoft.Json.JsonProperty("perday_duration")]
+ [System.Text.Json.Serialization.JsonPropertyName("perday_duration")]
+ public int? PerdayDuration { get; set; }
+ }
+
+ public class LocationControlConfig
+ {
+ ///
+ /// 获取或设置距离(单位:米)。
+ ///
+ [Newtonsoft.Json.JsonProperty("distance")]
+ [System.Text.Json.Serialization.JsonPropertyName("distance")]
+ public int Distance { get; set; }
+ }
+
+ public class RelatedApprovalControlConfig
+ {
+ ///
+ /// 获取或设置审批单模板 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.Wechat.Work/Models/CgibinOA/Approval/Template/CgibinOAGetTemplateDetailResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Work/Models/CgibinOA/Approval/Template/CgibinOAGetTemplateDetailResponse.cs
index 7ffda961..5712626e 100644
--- a/src/SKIT.FlurlHttpClient.Wechat.Work/Models/CgibinOA/Approval/Template/CgibinOAGetTemplateDetailResponse.cs
+++ b/src/SKIT.FlurlHttpClient.Wechat.Work/Models/CgibinOA/Approval/Template/CgibinOAGetTemplateDetailResponse.cs
@@ -104,6 +104,20 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.Models
[System.Text.Json.Serialization.JsonPropertyName("contact")]
public ContactControlConfig? Contact { get; set; }
+ ///
+ /// 获取或设置 File 控件配置信息。
+ ///
+ [Newtonsoft.Json.JsonProperty("file")]
+ [System.Text.Json.Serialization.JsonPropertyName("file")]
+ public FileControlConfig? File { get; set; }
+
+ ///
+ /// 获取或设置 Tips 控件配置信息。
+ ///
+ [Newtonsoft.Json.JsonProperty("tips")]
+ [System.Text.Json.Serialization.JsonPropertyName("tips")]
+ public TipsControlConfig? Tips { get; set; }
+
///
/// 获取或设置 Table 控件配置信息。
///
@@ -124,6 +138,27 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.Models
[Newtonsoft.Json.JsonProperty("vacation_list")]
[System.Text.Json.Serialization.JsonPropertyName("vacation_list")]
public VacationControlConfig? Vacation { get; set; }
+
+ ///
+ /// 获取或设置 DateRange 控件配置信息。
+ ///
+ [Newtonsoft.Json.JsonProperty("date_range")]
+ [System.Text.Json.Serialization.JsonPropertyName("date_range")]
+ public DateRangeControlConfig? DateRange { get; set; }
+
+ ///
+ /// 获取或设置 Location 控件配置信息。
+ ///
+ [Newtonsoft.Json.JsonProperty("location")]
+ [System.Text.Json.Serialization.JsonPropertyName("location")]
+ public LocationControlConfig? Location { get; set; }
+
+ ///
+ /// 获取或设置 RelatedApproval 控件配置信息。
+ ///
+ [Newtonsoft.Json.JsonProperty("related_approval")]
+ [System.Text.Json.Serialization.JsonPropertyName("related_approval")]
+ public RelatedApprovalControlConfig? RelatedApproval { get; set; }
}
public class DateControlConfig
@@ -190,8 +225,140 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.Models
public string Mode { get; set; } = default!;
}
+ public class TipsControlConfig
+ {
+ public static class Types
+ {
+ public class TipsContent
+ {
+ public static class Types
+ {
+ public class Text
+ {
+ public static class Types
+ {
+ public class SubText
+ {
+ public static class Types
+ {
+ public class Content
+ {
+ public static class Types
+ {
+ public class PlainText
+ {
+ ///
+ /// 获取或设置纯文本文字。
+ ///
+ [Newtonsoft.Json.JsonProperty("content")]
+ [System.Text.Json.Serialization.JsonPropertyName("content")]
+ public string Content { get; set; } = default!;
+ }
+
+ public class Link
+ {
+ ///
+ /// 获取或设置链接标题。
+ ///
+ [Newtonsoft.Json.JsonProperty("title")]
+ [System.Text.Json.Serialization.JsonPropertyName("title")]
+ public string Title { get; set; } = default!;
+
+ ///
+ /// 获取或设置链接 URL。
+ ///
+ [Newtonsoft.Json.JsonProperty("url")]
+ [System.Text.Json.Serialization.JsonPropertyName("url")]
+ public string URL { get; set; } = default!;
+ }
+ }
+
+ ///
+ /// 获取或设置纯文本类型的内容信息。
+ ///
+ [Newtonsoft.Json.JsonProperty("plain_text")]
+ [System.Text.Json.Serialization.JsonPropertyName("plain_text")]
+ public Types.PlainText? PlainText { get; set; }
+
+ ///
+ /// 获取或设置链接类型的内容信息。
+ ///
+ [Newtonsoft.Json.JsonProperty("link")]
+ [System.Text.Json.Serialization.JsonPropertyName("link")]
+ public Types.Link? Link { get; set; }
+ }
+ }
+
+ ///
+ /// 获取或设置文本类型。
+ ///
+ [Newtonsoft.Json.JsonProperty("type")]
+ [System.Text.Json.Serialization.JsonPropertyName("type")]
+ public int Type { get; set; }
+
+ ///
+ /// 获取或设置文本内容。
+ ///
+ [Newtonsoft.Json.JsonProperty("content")]
+ [System.Text.Json.Serialization.JsonPropertyName("content")]
+ public Types.Content Content { get; set; } = default!;
+ }
+ }
+
+ ///
+ /// 获取或设置说明文字分段列表。
+ ///
+ [Newtonsoft.Json.JsonProperty("sub_text")]
+ [System.Text.Json.Serialization.JsonPropertyName("sub_text")]
+ public Types.SubText[] SubTextList { get; set; } = default!;
+ }
+ }
+
+ ///
+ /// 获取或设置语言类型。
+ ///
+ [Newtonsoft.Json.JsonProperty("lang")]
+ [System.Text.Json.Serialization.JsonPropertyName("lang")]
+ public string Language { get; set; } = default!;
+
+ ///
+ /// 获取或设置说明文字信息。
+ ///
+ [Newtonsoft.Json.JsonProperty("text")]
+ [System.Text.Json.Serialization.JsonPropertyName("text")]
+ public Types.Text Text { get; set; } = default!;
+ }
+ }
+
+ ///
+ /// 获取或设置说明文字列表。
+ ///
+ [Newtonsoft.Json.JsonProperty("tips_content")]
+ [System.Text.Json.Serialization.JsonPropertyName("tips_content")]
+ public Types.TipsContent[] TipsList { get; set; } = default!;
+ }
+
+ public class FileControlConfig
+ {
+ ///
+ /// 获取或设置是否只允许拍照。
+ ///
+ [Newtonsoft.Json.JsonProperty("is_only_photo")]
+ [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.NumericalBooleanConverter))]
+ [System.Text.Json.Serialization.JsonPropertyName("is_only_photo")]
+ [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalBooleanConverter))]
+ public bool IsOnlyPhoto { get; set; }
+ }
+
public class TableControlConfig
{
+ ///
+ /// 获取或设置打印格式。
+ ///
+ [Newtonsoft.Json.JsonProperty("print_format")]
+ [System.Text.Json.Serialization.JsonPropertyName("print_format")]
+ public int PrintFormat { get; set; }
+
///
/// 获取或设置子控件。
///
@@ -204,14 +371,8 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.Models
{
public static class Types
{
- public class DateRange
+ public class DateRange : DateRangeControlConfig
{
- ///
- /// 获取或设置时间刻度。
- ///
- [Newtonsoft.Json.JsonProperty("type")]
- [System.Text.Json.Serialization.JsonPropertyName("type")]
- public string Type { get; set; } = default!;
}
}
@@ -259,6 +420,50 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.Models
[System.Text.Json.Serialization.JsonPropertyName("item")]
public Types.Vacation[] VacationList { get; set; } = default!;
}
+
+ public class DateRangeControlConfig
+ {
+ ///
+ /// 获取或设置时间刻度。
+ ///
+ [Newtonsoft.Json.JsonProperty("type")]
+ [System.Text.Json.Serialization.JsonPropertyName("type")]
+ public string Type { get; set; } = default!;
+
+ ///
+ /// 获取或设置自然日或工作日。
+ ///
+ [Newtonsoft.Json.JsonProperty("official_holiday")]
+ [System.Text.Json.Serialization.JsonPropertyName("official_holiday")]
+ public int? OfficialHoliday { get; set; }
+
+ ///
+ /// 获取或设置一天的时长(单位:秒)。
+ ///
+ [Newtonsoft.Json.JsonProperty("perday_duration")]
+ [System.Text.Json.Serialization.JsonPropertyName("perday_duration")]
+ public int? PerdayDuration { get; set; }
+ }
+
+ public class LocationControlConfig
+ {
+ ///
+ /// 获取或设置距离(单位:米)。
+ ///
+ [Newtonsoft.Json.JsonProperty("distance")]
+ [System.Text.Json.Serialization.JsonPropertyName("distance")]
+ public int Distance { get; set; }
+ }
+
+ public class RelatedApprovalControlConfig
+ {
+ ///
+ /// 获取或设置审批单模板 ID 列表。
+ ///
+ [Newtonsoft.Json.JsonProperty("template_id")]
+ [System.Text.Json.Serialization.JsonPropertyName("template_id")]
+ public string[] TemplateIdList { get; set; } = default!;
+ }
}
///
diff --git a/test/SKIT.FlurlHttpClient.Wechat.Work.UnitTests/ModelSamples/CgibinOA/Approval/Template/CgibinOAApprovalCreateTemplateRequest.json b/test/SKIT.FlurlHttpClient.Wechat.Work.UnitTests/ModelSamples/CgibinOA/Approval/Template/CgibinOAApprovalCreateTemplateRequest.json
index 5a9ba9ec..137c5640 100644
--- a/test/SKIT.FlurlHttpClient.Wechat.Work.UnitTests/ModelSamples/CgibinOA/Approval/Template/CgibinOAApprovalCreateTemplateRequest.json
+++ b/test/SKIT.FlurlHttpClient.Wechat.Work.UnitTests/ModelSamples/CgibinOA/Approval/Template/CgibinOAApprovalCreateTemplateRequest.json
@@ -1,4 +1,4 @@
-{
+{
"template_name": [
{
"text": "我的api测试模版",
@@ -13,13 +13,13 @@
"id": "Text-01",
"title": [
{
- "text": "控件名称",
+ "text": "文本控件名称",
"lang": "zh_CN"
}
],
"placeholder": [
{
- "text": "控件说明",
+ "text": "文本控件说明",
"lang": "zh_CN"
}
],
@@ -27,6 +27,452 @@
"un_print": 1
},
"config": {}
+ },
+ {
+ "property": {
+ "control": "Number",
+ "id": "Number-01",
+ "title": [
+ {
+ "text": "数字控件名称",
+ "lang": "zh_CN"
+ }
+ ],
+ "placeholder": [
+ {
+ "text": "数字控件说明",
+ "lang": "zh_CN"
+ }
+ ],
+ "require": 0,
+ "un_print": 1
+ },
+ "config": {}
+ },
+ {
+ "property": {
+ "control": "Money",
+ "id": "Money-01",
+ "title": [
+ {
+ "text": "金额控件名称",
+ "lang": "zh_CN"
+ }
+ ],
+ "placeholder": [
+ {
+ "text": "金额控件说明",
+ "lang": "zh_CN"
+ }
+ ],
+ "require": 0,
+ "un_print": 1
+ },
+ "config": {}
+ },
+ {
+ "property": {
+ "control": "Date",
+ "id": "Date-01",
+ "title": [
+ {
+ "text": "日期控件名称",
+ "lang": "zh_CN"
+ }
+ ],
+ "placeholder": [
+ {
+ "text": "日期控件说明",
+ "lang": "zh_CN"
+ }
+ ],
+ "require": 0,
+ "un_print": 1
+ },
+ "config": {
+ "date": {
+ "type": "day"
+ }
+ }
+ },
+ {
+ "property": {
+ "control": "Selector",
+ "id": "Selector-01",
+ "title": [
+ {
+ "text": "多选控件名称",
+ "lang": "zh_CN"
+ }
+ ],
+ "placeholder": [
+ {
+ "text": "多选控件说明",
+ "lang": "zh_CN"
+ }
+ ],
+ "require": 0,
+ "un_print": 1
+ },
+ "config": {
+ "selector": {
+ "type": "multi",
+ "options": [
+ {
+ "key": "option-1",
+ "value": [
+ {
+ "text": "选项1",
+ "lang": "zh_CN"
+ }
+ ]
+ },
+ {
+ "key": "option-2",
+ "value": [
+ {
+ "text": "选项2",
+ "lang": "zh_CN"
+ }
+ ]
+ }
+ ]
+ }
+ }
+ },
+ {
+ "property": {
+ "control": "Contact",
+ "id": "Contact-01",
+ "title": [
+ {
+ "text": "成员控件名称",
+ "lang": "zh_CN"
+ }
+ ],
+ "placeholder": [
+ {
+ "text": "成员控件说明",
+ "lang": "zh_CN"
+ }
+ ],
+ "require": 0,
+ "un_print": 1
+ },
+ "config": {
+ "contact": {
+ "type": "single",
+ "mode": "user"
+ }
+ }
+ },
+ {
+ "property": {
+ "control": "Tips",
+ "id": "Tips-01",
+ "title": [
+ {
+ "text": "说明文字控件名称",
+ "lang": "zh_CN"
+ }
+ ],
+ "placeholder": [
+ {
+ "text": "说明文字控件说明",
+ "lang": "zh_CN"
+ }
+ ],
+ "require": 0,
+ "un_print": 1
+ },
+ "config": {
+ "tips": {
+ "tips_content": [
+ {
+ "text": {
+ "sub_text": [
+ {
+ "type": 1,
+ "content": {
+ "plain_text": {
+ "content": "说明文字"
+ }
+ }
+ },
+ {
+ "type": 2,
+ "content": {
+ "link": {
+ "title": "这是一个链接",
+ "url": "https://work.weixin.qq.com"
+ }
+ }
+ }
+ ]
+ },
+ "lang": "zh_CN"
+ },
+ {
+ "text": {
+ "sub_text": [
+ {
+ "type": 1,
+ "content": {
+ "plain_text": {
+ "content": "tips"
+ }
+ }
+ },
+ {
+ "type": 2,
+ "content": {
+ "link": {
+ "title": "this is a link",
+ "url": "https://work.weixin.qq.com"
+ }
+ }
+ }
+ ]
+ },
+ "lang": "en"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "property": {
+ "control": "File",
+ "id": "File-01",
+ "title": [
+ {
+ "text": "附件控件名称",
+ "lang": "zh_CN"
+ }
+ ],
+ "placeholder": [
+ {
+ "text": "附件控件说明",
+ "lang": "zh_CN"
+ }
+ ],
+ "require": 0,
+ "un_print": 1
+ },
+ "config": {
+ "file": {
+ "is_only_photo": 1
+ }
+ }
+ },
+ {
+ "property": {
+ "control": "File",
+ "id": "File-01",
+ "title": [
+ {
+ "text": "附件控件名称",
+ "lang": "zh_CN"
+ }
+ ],
+ "placeholder": [
+ {
+ "text": "附件控件说明",
+ "lang": "zh_CN"
+ }
+ ],
+ "require": 0,
+ "un_print": 1
+ },
+ "config": {
+ "file": {
+ "is_only_photo": 1
+ }
+ }
+ },
+ {
+ "property": {
+ "control": "Table",
+ "id": "Table-01",
+ "title": [
+ {
+ "text": "明细控件名称",
+ "lang": "zh_CN"
+ }
+ ],
+ "placeholder": [
+ {
+ "text": "明细控件说明",
+ "lang": "zh_CN"
+ }
+ ],
+ "require": 0,
+ "un_print": 1
+ },
+ "config": {
+ "table": {
+ "print_format": 0,
+ "children": [
+ {
+ "property": {
+ "control": "File",
+ "id": "File-01",
+ "title": [
+ {
+ "text": "File控件名称",
+ "lang": "zh_CN"
+ }
+ ],
+ "placeholder": [
+ {
+ "text": "控件说明",
+ "lang": "zh_CN"
+ }
+ ],
+ "require": 0,
+ "un_print": 1
+ },
+ "config": {
+ "file": {
+ "is_only_photo": 1
+ }
+ }
+ },
+ {
+ "property": {
+ "control": "Date",
+ "id": "Date-01",
+ "title": [
+ {
+ "text": "Date控件名称",
+ "lang": "zh_CN"
+ }
+ ],
+ "placeholder": [
+ {
+ "text": "控件说明",
+ "lang": "zh_CN"
+ }
+ ],
+ "require": 0,
+ "un_print": 1
+ },
+ "config": {
+ "date": {
+ "type": "day"
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "property": {
+ "control": "Attendance",
+ "id": "Attendance-01",
+ "title": [
+ {
+ "text": "假勤控件名称",
+ "lang": "zh_CN"
+ }
+ ],
+ "placeholder": [
+ {
+ "text": "假勤控件说明",
+ "lang": "zh_CN"
+ }
+ ],
+ "require": 0,
+ "un_print": 1
+ },
+ "config": {
+ "attendance": {
+ "type": 3,
+ "date_range": {
+ "type": "halfday",
+ "official_holiday": 0,
+ "perday_duration": 86400
+ }
+ }
+ }
+ },
+ {
+ "property": {
+ "control": "DateRange",
+ "id": "DateRange-01",
+ "title": [
+ {
+ "text": "时长控件名称",
+ "lang": "zh_CN"
+ }
+ ],
+ "placeholder": [
+ {
+ "text": "时长控件说明",
+ "lang": "zh_CN"
+ }
+ ],
+ "require": 0,
+ "un_print": 1
+ },
+ "config": {
+ "date_range": {
+ "type": "halfday",
+ "official_holiday": 0,
+ "perday_duration": 86400
+ }
+ }
+ },
+ {
+ "property": {
+ "control": "Location",
+ "id": "Location-01",
+ "title": [
+ {
+ "text": "位置控件名称",
+ "lang": "zh_CN"
+ }
+ ],
+ "placeholder": [
+ {
+ "text": "位置控件说明",
+ "lang": "zh_CN"
+ }
+ ],
+ "require": 0,
+ "un_print": 1
+ },
+ "config": {
+ "location": {
+ "distance": 100
+ }
+ }
+ },
+ {
+ "property": {
+ "control": "RelatedApproval",
+ "id": "RelatedApproval-01",
+ "title": [
+ {
+ "text": "关联审批单控件名称",
+ "lang": "zh_CN"
+ }
+ ],
+ "placeholder": [
+ {
+ "text": "关联审批单控件说明",
+ "lang": "zh_CN"
+ }
+ ],
+ "require": 0,
+ "un_print": 1
+ },
+ "config": {
+ "related_approval": {
+ "template_id": [ "C4RbNKm731MCFVgk6XLq1Rs9W4aNXPJV2mmXT4qGy" ]
+ }
+ }
}
]
}
diff --git a/test/SKIT.FlurlHttpClient.Wechat.Work.UnitTests/ModelSamples/CgibinOA/Approval/Template/CgibinOAGetTemplateDetailResponse.json b/test/SKIT.FlurlHttpClient.Wechat.Work.UnitTests/ModelSamples/CgibinOA/Approval/Template/CgibinOAGetTemplateDetailResponse.json
index b9896228..2fd2368f 100644
--- a/test/SKIT.FlurlHttpClient.Wechat.Work.UnitTests/ModelSamples/CgibinOA/Approval/Template/CgibinOAGetTemplateDetailResponse.json
+++ b/test/SKIT.FlurlHttpClient.Wechat.Work.UnitTests/ModelSamples/CgibinOA/Approval/Template/CgibinOAGetTemplateDetailResponse.json
@@ -1,4 +1,4 @@
-{
+{
"errcode": 0,
"errmsg": "ok",
"template_names": [
@@ -59,6 +59,58 @@
"type": "multi",
"mode": "department"
},
+ "tips": {
+ "tips_content": [
+ {
+ "text": {
+ "sub_text": [
+ {
+ "type": 1,
+ "content": {
+ "plain_text": {
+ "content": "说明文字"
+ }
+ }
+ },
+ {
+ "type": 2,
+ "content": {
+ "link": {
+ "title": "这是一个链接",
+ "url": "https://work.weixin.qq.com"
+ }
+ }
+ }
+ ]
+ },
+ "lang": "zh_CN"
+ },
+ {
+ "text": {
+ "sub_text": [
+ {
+ "type": 1,
+ "content": {
+ "plain_text": {
+ "content": "tips"
+ }
+ }
+ },
+ {
+ "type": 2,
+ "content": {
+ "link": {
+ "title": "this is a link",
+ "url": "https://work.weixin.qq.com"
+ }
+ }
+ }
+ ]
+ },
+ "lang": "en"
+ }
+ ]
+ },
"table": {
"children": [
{