diff --git a/src/SKIT.FlurlHttpClient.Wechat.Work/Models/CgibinOA/Calendar/CgibinOACalendarAddRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Work/Models/CgibinOA/Calendar/CgibinOACalendarAddRequest.cs index b9eb64ff..a82ced52 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.Work/Models/CgibinOA/Calendar/CgibinOACalendarAddRequest.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.Work/Models/CgibinOA/Calendar/CgibinOACalendarAddRequest.cs @@ -31,6 +31,23 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.Models [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumericalNullableBooleanConverter))] public bool? IsReadonly { get; set; } } + + public class PublicRange + { + /// + /// 获取或设置成员账号列表。 + /// + [Newtonsoft.Json.JsonProperty("userids")] + [System.Text.Json.Serialization.JsonPropertyName("userids")] + public IList? UserIdList { get; set; } + + /// + /// 获取或设置部门 ID 列表。 + /// + [Newtonsoft.Json.JsonProperty("partyids")] + [System.Text.Json.Serialization.JsonPropertyName("partyids")] + public IList? DepartmentIdList { get; set; } + } } /// @@ -79,6 +96,31 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.Models [System.Text.Json.Serialization.JsonPropertyName("description")] public string? Description { get; set; } + /// + /// 获取或设置是否是公共日历。 + /// + [Newtonsoft.Json.JsonProperty("is_public")] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.NumericalNullableBooleanConverter))] + [System.Text.Json.Serialization.JsonPropertyName("is_public")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumericalNullableBooleanConverter))] + public bool? IsPublicCalendar { get; set; } + + /// + /// 获取或设置公开范围。 + /// + [Newtonsoft.Json.JsonProperty("public_range")] + [System.Text.Json.Serialization.JsonPropertyName("public_range")] + public Types.PublicRange? PublicRange { get; set; } + + /// + /// 获取或设置是否是全员日历。 + /// + [Newtonsoft.Json.JsonProperty("is_corp_calendar")] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.NumericalNullableBooleanConverter))] + [System.Text.Json.Serialization.JsonPropertyName("is_corp_calendar")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumericalNullableBooleanConverter))] + public bool? IsCorpCalendar { get; set; } + /// /// 获取或设置日历共享者列表。 /// diff --git a/src/SKIT.FlurlHttpClient.Wechat.Work/Models/CgibinOA/Calendar/CgibinOACalendarGetResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.Work/Models/CgibinOA/Calendar/CgibinOACalendarGetResponse.cs index 99fa66e9..bf1e0576 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.Work/Models/CgibinOA/Calendar/CgibinOACalendarGetResponse.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.Work/Models/CgibinOA/Calendar/CgibinOACalendarGetResponse.cs @@ -29,6 +29,23 @@ [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumericalBooleanConverter))] public bool IsReadonly { get; set; } } + + public class PublicRange + { + /// + /// 获取或设置成员账号列表。 + /// + [Newtonsoft.Json.JsonProperty("userids")] + [System.Text.Json.Serialization.JsonPropertyName("userids")] + public string[]? UserIdList { get; set; } + + /// + /// 获取或设置部门 ID 列表。 + /// + [Newtonsoft.Json.JsonProperty("partyids")] + [System.Text.Json.Serialization.JsonPropertyName("partyids")] + public long[]? DepartmentIdList { get; set; } + } } /// @@ -75,6 +92,31 @@ [System.Text.Json.Serialization.JsonPropertyName("description")] public string Description { get; set; } = default!; + /// + /// 获取或设置是否是公共日历。 + /// + [Newtonsoft.Json.JsonProperty("is_public")] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.NumericalBooleanConverter))] + [System.Text.Json.Serialization.JsonPropertyName("is_public")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumericalBooleanConverter))] + public bool IsPublicCalendar { get; set; } + + /// + /// 获取或设置公开范围。 + /// + [Newtonsoft.Json.JsonProperty("public_range")] + [System.Text.Json.Serialization.JsonPropertyName("public_range")] + public Types.PublicRange? PublicRange { get; set; } + + /// + /// 获取或设置是否是全员日历。 + /// + [Newtonsoft.Json.JsonProperty("is_corp_calendar")] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.NumericalBooleanConverter))] + [System.Text.Json.Serialization.JsonPropertyName("is_corp_calendar")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumericalBooleanConverter))] + public bool IsCorpCalendar { get; set; } + /// /// 获取或设置日历共享者列表。 /// diff --git a/src/SKIT.FlurlHttpClient.Wechat.Work/Models/CgibinOA/Calendar/CgibinOACalendarUpdateRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.Work/Models/CgibinOA/Calendar/CgibinOACalendarUpdateRequest.cs index 4e3b5cc2..3a5cf822 100644 --- a/src/SKIT.FlurlHttpClient.Wechat.Work/Models/CgibinOA/Calendar/CgibinOACalendarUpdateRequest.cs +++ b/src/SKIT.FlurlHttpClient.Wechat.Work/Models/CgibinOA/Calendar/CgibinOACalendarUpdateRequest.cs @@ -16,6 +16,10 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.Models public class Sharer : CgibinOACalendarAddRequest.Types.Calendar.Types.Sharer { } + + public class PublicRange : CgibinOACalendarAddRequest.Types.Calendar.Types.PublicRange + { + } } /// @@ -55,6 +59,31 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.Models [System.Text.Json.Serialization.JsonPropertyName("description")] public string? Description { get; set; } + /// + /// 获取或设置是否是公共日历。 + /// + [Newtonsoft.Json.JsonProperty("is_public")] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.NumericalNullableBooleanConverter))] + [System.Text.Json.Serialization.JsonPropertyName("is_public")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumericalNullableBooleanConverter))] + public bool? IsPublicCalendar { get; set; } + + /// + /// 获取或设置公开范围。 + /// + [Newtonsoft.Json.JsonProperty("public_range")] + [System.Text.Json.Serialization.JsonPropertyName("public_range")] + public Types.PublicRange? PublicRange { get; set; } + + /// + /// 获取或设置是否是全员日历。 + /// + [Newtonsoft.Json.JsonProperty("is_corp_calendar")] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.NumericalNullableBooleanConverter))] + [System.Text.Json.Serialization.JsonPropertyName("is_corp_calendar")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumericalNullableBooleanConverter))] + public bool? IsCorpCalendar { get; set; } + /// /// 获取或设置日历共享者列表。 /// @@ -64,6 +93,15 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.Models } } + /// + /// 获取或设置是否不更新可订阅范围。 + /// + [Newtonsoft.Json.JsonProperty("skip_public_range")] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.NumericalNullableBooleanConverter))] + [System.Text.Json.Serialization.JsonPropertyName("skip_public_range")] + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumericalNullableBooleanConverter))] + public bool? IsSkipPublicRange { get; set; } + /// /// 获取或设置日历信息。 /// diff --git a/test/SKIT.FlurlHttpClient.Wechat.Work.UnitTests/ModelSamples/CgibinOA/Calendar/CgibinOACalendarAddRequest.json b/test/SKIT.FlurlHttpClient.Wechat.Work.UnitTests/ModelSamples/CgibinOA/Calendar/CgibinOACalendarAddRequest.json index dbeb67a2..11b0486e 100644 --- a/test/SKIT.FlurlHttpClient.Wechat.Work.UnitTests/ModelSamples/CgibinOA/Calendar/CgibinOACalendarAddRequest.json +++ b/test/SKIT.FlurlHttpClient.Wechat.Work.UnitTests/ModelSamples/CgibinOA/Calendar/CgibinOACalendarAddRequest.json @@ -14,7 +14,13 @@ "userid": "userid3", "readonly": 1 } - ] + ], + "is_public": 1, + "public_range": { + "userids": ["abel", "jack"], + "partyids": [1232, 34353] + }, + "is_corp_calendar": 1 }, "agentid": 1000014 } diff --git a/test/SKIT.FlurlHttpClient.Wechat.Work.UnitTests/ModelSamples/CgibinOA/Calendar/CgibinOACalendarGetResponse.json b/test/SKIT.FlurlHttpClient.Wechat.Work.UnitTests/ModelSamples/CgibinOA/Calendar/CgibinOACalendarGetResponse.json index e5588394..cbfb6fb2 100644 --- a/test/SKIT.FlurlHttpClient.Wechat.Work.UnitTests/ModelSamples/CgibinOA/Calendar/CgibinOACalendarGetResponse.json +++ b/test/SKIT.FlurlHttpClient.Wechat.Work.UnitTests/ModelSamples/CgibinOA/Calendar/CgibinOACalendarGetResponse.json @@ -17,7 +17,13 @@ "userid": "userid1", "readonly": 1 } - ] + ], + "is_public": 1, + "public_range": { + "userids": ["abel", "jack"], + "partyids": [1232, 34353] + }, + "is_corp_calendar": 1 } ] } diff --git a/test/SKIT.FlurlHttpClient.Wechat.Work.UnitTests/ModelSamples/CgibinOA/Calendar/CgibinOACalendarUpdateRequest.json b/test/SKIT.FlurlHttpClient.Wechat.Work.UnitTests/ModelSamples/CgibinOA/Calendar/CgibinOACalendarUpdateRequest.json index 0c716371..7e7b1b20 100644 --- a/test/SKIT.FlurlHttpClient.Wechat.Work.UnitTests/ModelSamples/CgibinOA/Calendar/CgibinOACalendarUpdateRequest.json +++ b/test/SKIT.FlurlHttpClient.Wechat.Work.UnitTests/ModelSamples/CgibinOA/Calendar/CgibinOACalendarUpdateRequest.json @@ -1,4 +1,5 @@ { + "skip_public_range": 0, "calendar": { "cal_id": "wcjgewCwAAqeJcPI1d8Pwbjt7nttzAAA", "readonly": 1, @@ -13,6 +14,10 @@ "userid": "userid2", "readonly": 1 } - ] + ], + "public_range": { + "userids": ["abel", "jack"], + "partyids": [1232, 34353] + } } }