Skip to content

Commit e2b90ac

Browse files
committed
feat(work): 随官方更新管理智能表格内容视图相关接口模型
1 parent 0c6066b commit e2b90ac

4 files changed

Lines changed: 156 additions & 2 deletions

File tree

src/SKIT.FlurlHttpClient.Wechat.Work/Models/CgibinWedoc/SmartSheet/CgibinWedocSmartSheetGetViewsResponse.cs

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,57 @@ public class Value
228228
[System.Text.Json.Serialization.JsonPropertyName("conditions")]
229229
public Types.Condition[] ConditionList { get; set; } = default!;
230230
}
231+
232+
public class ColorConfig
233+
{
234+
public static class Types
235+
{
236+
public class ColorCondition
237+
{
238+
public static class Types
239+
{
240+
public class Condition : FilterSpec.Types.Condition
241+
{
242+
}
243+
}
244+
245+
/// <summary>
246+
/// 获取或设置填色 ID。
247+
/// </summary>
248+
[Newtonsoft.Json.JsonProperty("id")]
249+
[System.Text.Json.Serialization.JsonPropertyName("id")]
250+
public string Id { get; set; } = default!;
251+
252+
/// <summary>
253+
/// 获取或设置填色类型。
254+
/// </summary>
255+
[Newtonsoft.Json.JsonProperty("type")]
256+
[System.Text.Json.Serialization.JsonPropertyName("type")]
257+
public string Type { get; set; } = default!;
258+
259+
/// <summary>
260+
/// 获取或设置颜色。
261+
/// </summary>
262+
[Newtonsoft.Json.JsonProperty("color")]
263+
[System.Text.Json.Serialization.JsonPropertyName("color")]
264+
public string Color { get; set; } = default!;
265+
266+
/// <summary>
267+
/// 获取或设置条件信息。
268+
/// </summary>
269+
[Newtonsoft.Json.JsonProperty("condition")]
270+
[System.Text.Json.Serialization.JsonPropertyName("condition")]
271+
public Types.Condition Condition { get; set; } = default!;
272+
}
273+
}
274+
275+
/// <summary>
276+
/// 获取或设置填色条件列表。
277+
/// </summary>
278+
[Newtonsoft.Json.JsonProperty("conditions")]
279+
[System.Text.Json.Serialization.JsonPropertyName("conditions")]
280+
public Types.ColorCondition[] ColorConditionList { get; set; } = default!;
281+
}
231282
}
232283

233284
/// <summary>
@@ -278,6 +329,13 @@ public class Value
278329
[Newtonsoft.Json.JsonProperty("frozen_field_count")]
279330
[System.Text.Json.Serialization.JsonPropertyName("frozen_field_count")]
280331
public int FrozenFieldCount { get; set; }
332+
333+
/// <summary>
334+
/// 获取或设置填色设置。
335+
/// </summary>
336+
[Newtonsoft.Json.JsonProperty("color_config")]
337+
[System.Text.Json.Serialization.JsonPropertyName("color_config")]
338+
public Types.ColorConfig? ColorConfig { get; set; }
281339
}
282340
}
283341

src/SKIT.FlurlHttpClient.Wechat.Work/Models/CgibinWedoc/SmartSheet/CgibinWedocSmartSheetUpdateViewRequest.cs

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,57 @@ public class Condition : CgibinWedocSmartSheetGetRecordsRequest.Types.FilterSpec
9696
[System.Text.Json.Serialization.JsonPropertyName("conditions")]
9797
public IList<Types.Condition> ConditionList { get; set; } = new List<Types.Condition>();
9898
}
99+
100+
public class ColorConfig
101+
{
102+
public static class Types
103+
{
104+
public class ColorCondition
105+
{
106+
public static class Types
107+
{
108+
public class Condition : FilterSpec.Types.Condition
109+
{
110+
}
111+
}
112+
113+
/// <summary>
114+
/// 获取或设置填色 ID。
115+
/// </summary>
116+
[Newtonsoft.Json.JsonProperty("id")]
117+
[System.Text.Json.Serialization.JsonPropertyName("id")]
118+
public string? Id { get; set; }
119+
120+
/// <summary>
121+
/// 获取或设置填色类型。
122+
/// </summary>
123+
[Newtonsoft.Json.JsonProperty("type")]
124+
[System.Text.Json.Serialization.JsonPropertyName("type")]
125+
public string Type { get; set; } = string.Empty;
126+
127+
/// <summary>
128+
/// 获取或设置颜色。
129+
/// </summary>
130+
[Newtonsoft.Json.JsonProperty("color")]
131+
[System.Text.Json.Serialization.JsonPropertyName("color")]
132+
public string Color { get; set; } = string.Empty;
133+
134+
/// <summary>
135+
/// 获取或设置条件信息。
136+
/// </summary>
137+
[Newtonsoft.Json.JsonProperty("condition")]
138+
[System.Text.Json.Serialization.JsonPropertyName("condition")]
139+
public Types.Condition Condition { get; set; } = new Types.Condition();
140+
}
141+
}
142+
143+
/// <summary>
144+
/// 获取或设置填色条件列表。
145+
/// </summary>
146+
[Newtonsoft.Json.JsonProperty("conditions")]
147+
[System.Text.Json.Serialization.JsonPropertyName("conditions")]
148+
public IList<Types.ColorCondition> ColorConditionList { get; set; } = new List<Types.ColorCondition>();
149+
}
99150
}
100151

101152
/// <summary>
@@ -146,6 +197,13 @@ public class Condition : CgibinWedocSmartSheetGetRecordsRequest.Types.FilterSpec
146197
[Newtonsoft.Json.JsonProperty("frozen_field_count")]
147198
[System.Text.Json.Serialization.JsonPropertyName("frozen_field_count")]
148199
public int? FrozenFieldCount { get; set; }
200+
201+
/// <summary>
202+
/// 获取或设置填色设置。
203+
/// </summary>
204+
[Newtonsoft.Json.JsonProperty("color_config")]
205+
[System.Text.Json.Serialization.JsonPropertyName("color_config")]
206+
public Types.ColorConfig? ColorConfig { get; set; }
149207
}
150208
}
151209

test/SKIT.FlurlHttpClient.Wechat.Work.UnitTests/ModelSamples/_/CgibinWedoc/SmartSheet/CgibinWedocSmartSheetGetViewsResponse.json

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,26 @@
6363
"f1gHSR": false,
6464
"fabcde": false
6565
},
66-
"frozen_field_count": 0
66+
"frozen_field_count": 0,
67+
"color_config": {
68+
"conditions": [
69+
{
70+
"id": "4840474257",
71+
"type": "VIEW_COLOR_CONDITION_TYPE_CELL",
72+
"color": "chromeAmberLighten_5",
73+
"condition": {
74+
"field_id": "fRCjJz",
75+
"field_type": "FIELD_TYPE_TEXT",
76+
"operator": "OPERATOR_CONTAINS",
77+
"string_value": {
78+
"value": [
79+
"5555"
80+
]
81+
}
82+
}
83+
}
84+
]
85+
}
6786
}
6887
}
6988
]

test/SKIT.FlurlHttpClient.Wechat.Work.UnitTests/ModelSamples/_/CgibinWedoc/SmartSheet/CgibinWedocSmartSheetUpdateViewRequest.json

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,25 @@
5353
"f1gHSR": false,
5454
"fabcde": false
5555
},
56-
"frozen_field_count": 0
56+
"frozen_field_count": 0,
57+
"color_config": {
58+
"conditions": [
59+
{
60+
"id": "4840474257",
61+
"type": "VIEW_COLOR_CONDITION_TYPE_CELL",
62+
"color": "chromeAmberLighten_5",
63+
"condition": {
64+
"field_id": "fRCjJz",
65+
"field_type": "FIELD_TYPE_TEXT",
66+
"operator": "OPERATOR_CONTAINS",
67+
"string_value": {
68+
"value": [
69+
"5555"
70+
]
71+
}
72+
}
73+
}
74+
]
75+
}
5776
}
5877
}

0 commit comments

Comments
 (0)