Skip to content

Commit ff25144

Browse files
committed
feat(work): 随官方更新文档智能表格相关接口模型
1 parent 480e7fa commit ff25144

File tree

8 files changed

+278
-122
lines changed

8 files changed

+278
-122
lines changed
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
namespace SKIT.FlurlHttpClient.Wechat.Work.Events
2+
{
3+
/// <summary>
4+
/// <para>表示 EVENT.doc_change 事件的数据。</para>
5+
/// <para>
6+
/// REF: <br/>
7+
/// <![CDATA[ https://developer.work.weixin.qq.com/document/path/100986 ]]> <br/>
8+
/// <![CDATA[ https://developer.work.weixin.qq.com/document/path/100987 ]]> <br/>
9+
/// <![CDATA[ https://developer.work.weixin.qq.com/document/path/101016 ]]> <br/>
10+
/// <![CDATA[ https://developer.work.weixin.qq.com/document/path/101017 ]]> <br/>
11+
/// <![CDATA[ https://developer.work.weixin.qq.com/document/path/101018 ]]> <br/>
12+
/// <![CDATA[ https://developer.work.weixin.qq.com/document/path/101019 ]]>
13+
/// </para>
14+
/// </summary>
15+
public class SmartSheetChangeEvent : WechatWorkEvent
16+
{
17+
/// <summary>
18+
/// 获取或设置变更类型。
19+
/// </summary>
20+
[Newtonsoft.Json.JsonProperty("ChangeType")]
21+
[System.Text.Json.Serialization.JsonPropertyName("ChangeType")]
22+
[System.Xml.Serialization.XmlElement("ChangeType")]
23+
public string ChangeType { get; set; } = default!;
24+
25+
/// <summary>
26+
/// 获取或设置文档 ID。
27+
/// </summary>
28+
[Newtonsoft.Json.JsonProperty("DocId")]
29+
[System.Text.Json.Serialization.JsonPropertyName("DocId")]
30+
[System.Xml.Serialization.XmlElement("DocId", IsNullable = true)]
31+
public string? DocumentId { get; set; }
32+
33+
/// <summary>
34+
/// 获取或设置子表 ID。
35+
/// </summary>
36+
[Newtonsoft.Json.JsonProperty("SheetId")]
37+
[System.Text.Json.Serialization.JsonPropertyName("SheetId")]
38+
[System.Xml.Serialization.XmlElement("SheetId", IsNullable = true)]
39+
public string? SheetId { get; set; }
40+
41+
/// <summary>
42+
/// 获取或设置字段 ID 列表。
43+
/// </summary>
44+
[Newtonsoft.Json.JsonProperty("FieldId")]
45+
[System.Text.Json.Serialization.JsonPropertyName("FieldId")]
46+
[System.Xml.Serialization.XmlElement("FieldId", Type = typeof(string), IsNullable = true)]
47+
public string[]? FieldIdList { get; set; }
48+
49+
/// <summary>
50+
/// 获取或设置记录 ID 列表。
51+
/// </summary>
52+
[Newtonsoft.Json.JsonProperty("RecordId")]
53+
[System.Text.Json.Serialization.JsonPropertyName("RecordId")]
54+
[System.Xml.Serialization.XmlElement("RecordId", Type = typeof(string), IsNullable = true)]
55+
public string[]? RecordIdList { get; set; }
56+
}
57+
}

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

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,16 @@ public class PercentageFieldProperty
331331
[System.Text.Json.Serialization.JsonPropertyName("use_separate")]
332332
public bool IsUseSeparate { get; set; }
333333
}
334+
335+
public class BarcodeFieldProperty
336+
{
337+
/// <summary>
338+
/// 获取或设置是否仅限手机扫描录入。
339+
/// </summary>
340+
[Newtonsoft.Json.JsonProperty("mobile_scan_only")]
341+
[System.Text.Json.Serialization.JsonPropertyName("mobile_scan_only")]
342+
public bool IsMobileScanOnly { get; set; }
343+
}
334344
}
335345

336346
/// <summary>
@@ -472,6 +482,13 @@ public class PercentageFieldProperty
472482
[Newtonsoft.Json.JsonProperty("property_percentage")]
473483
[System.Text.Json.Serialization.JsonPropertyName("property_percentage")]
474484
public Types.PercentageFieldProperty? PropertyAsPercentage { get; set; }
485+
486+
/// <summary>
487+
/// 获取或设置条码的字段属性。
488+
/// </summary>
489+
[Newtonsoft.Json.JsonProperty("property_barcode")]
490+
[System.Text.Json.Serialization.JsonPropertyName("property_barcode")]
491+
public Types.BarcodeFieldProperty? PropertyAsBarcode { get; set; }
475492
}
476493
}
477494

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

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,16 @@ public class PercentageFieldProperty
329329
[System.Text.Json.Serialization.JsonPropertyName("use_separate")]
330330
public bool IsUseSeparate { get; set; }
331331
}
332+
333+
public class BarcodeFieldProperty
334+
{
335+
/// <summary>
336+
/// 获取或设置是否仅限手机扫描录入。
337+
/// </summary>
338+
[Newtonsoft.Json.JsonProperty("mobile_scan_only")]
339+
[System.Text.Json.Serialization.JsonPropertyName("mobile_scan_only")]
340+
public bool IsMobileScanOnly { get; set; }
341+
}
332342
}
333343

334344
/// <summary>
@@ -477,6 +487,13 @@ public class PercentageFieldProperty
477487
[Newtonsoft.Json.JsonProperty("property_percentage")]
478488
[System.Text.Json.Serialization.JsonPropertyName("property_percentage")]
479489
public Types.PercentageFieldProperty? PropertyAsPercentage { get; set; }
490+
491+
/// <summary>
492+
/// 获取或设置条码的字段属性。
493+
/// </summary>
494+
[Newtonsoft.Json.JsonProperty("property_barcode")]
495+
[System.Text.Json.Serialization.JsonPropertyName("property_barcode")]
496+
public Types.BarcodeFieldProperty? PropertyAsBarcode { get; set; }
480497
}
481498
}
482499

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

Lines changed: 159 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,158 @@ public class SortField
2525
[System.Text.Json.Serialization.JsonPropertyName("desc")]
2626
public bool IsDescend { get; set; }
2727
}
28+
29+
public class FilterSpec
30+
{
31+
public static class Types
32+
{
33+
public class Condition
34+
{
35+
public static class Types
36+
{
37+
public class StringValue
38+
{
39+
/// <summary>
40+
/// 获取或设置值。
41+
/// </summary>
42+
[Newtonsoft.Json.JsonProperty("value")]
43+
[System.Text.Json.Serialization.JsonPropertyName("value")]
44+
public IList<string> Value { get; set; } = new List<string>();
45+
}
46+
47+
public class NumberValue
48+
{
49+
/// <summary>
50+
/// 获取或设置值。
51+
/// </summary>
52+
[Newtonsoft.Json.JsonProperty("value")]
53+
[System.Text.Json.Serialization.JsonPropertyName("value")]
54+
public decimal Value { get; set; }
55+
}
56+
57+
public class BoolValue
58+
{
59+
/// <summary>
60+
/// 获取或设置值。
61+
/// </summary>
62+
[Newtonsoft.Json.JsonProperty("value")]
63+
[System.Text.Json.Serialization.JsonPropertyName("value")]
64+
public bool Value { get; set; }
65+
}
66+
67+
public class UserValue
68+
{
69+
/// <summary>
70+
/// 获取或设置值。
71+
/// </summary>
72+
[Newtonsoft.Json.JsonProperty("value")]
73+
[System.Text.Json.Serialization.JsonPropertyName("value")]
74+
public IList<string> Value { get; set; } = new List<string>();
75+
}
76+
77+
public class DateTimeValue
78+
{
79+
public static class Types
80+
{
81+
public class Value
82+
{
83+
/// <summary>
84+
/// 获取或设置日期类型。
85+
/// </summary>
86+
[Newtonsoft.Json.JsonProperty("type")]
87+
[System.Text.Json.Serialization.JsonPropertyName("type")]
88+
public string Type { get; set; } = string.Empty;
89+
90+
/// <summary>
91+
/// 获取或设置日期时间值。
92+
/// </summary>
93+
[Newtonsoft.Json.JsonProperty("value")]
94+
[System.Text.Json.Serialization.JsonPropertyName("value")]
95+
public IList<string>? DateTimes { get; set; }
96+
}
97+
}
98+
99+
/// <summary>
100+
/// 获取或设置值。
101+
/// </summary>
102+
[Newtonsoft.Json.JsonProperty("value")]
103+
[System.Text.Json.Serialization.JsonPropertyName("value")]
104+
public Types.Value Value { get; set; } = new Types.Value();
105+
}
106+
}
107+
108+
/// <summary>
109+
/// 获取或设置字段 ID。
110+
/// </summary>
111+
[Newtonsoft.Json.JsonProperty("field_id")]
112+
[System.Text.Json.Serialization.JsonPropertyName("field_id")]
113+
public string FieldId { get; set; } = string.Empty;
114+
115+
/// <summary>
116+
/// 获取或设置字段类型。
117+
/// </summary>
118+
[Newtonsoft.Json.JsonProperty("field_type")]
119+
[System.Text.Json.Serialization.JsonPropertyName("field_type")]
120+
public string? FieldType { get; set; }
121+
122+
/// <summary>
123+
/// 获取或设置判断类型。
124+
/// </summary>
125+
[Newtonsoft.Json.JsonProperty("operator")]
126+
[System.Text.Json.Serialization.JsonPropertyName("operator")]
127+
public string Operator { get; set; } = string.Empty;
128+
129+
/// <summary>
130+
/// 获取或设置文本值。
131+
/// </summary>
132+
[Newtonsoft.Json.JsonProperty("string_value")]
133+
[System.Text.Json.Serialization.JsonPropertyName("string_value")]
134+
public Types.StringValue? StringValue { get; set; }
135+
136+
/// <summary>
137+
/// 获取或设置数字值。
138+
/// </summary>
139+
[Newtonsoft.Json.JsonProperty("number_value")]
140+
[System.Text.Json.Serialization.JsonPropertyName("number_value")]
141+
public Types.NumberValue? NumberValue { get; set; }
142+
143+
/// <summary>
144+
/// 获取或设置布尔值。
145+
/// </summary>
146+
[Newtonsoft.Json.JsonProperty("bool_value")]
147+
[System.Text.Json.Serialization.JsonPropertyName("bool_value")]
148+
public Types.BoolValue? BoolValue { get; set; }
149+
150+
/// <summary>
151+
/// 获取或设置人员值。
152+
/// </summary>
153+
[Newtonsoft.Json.JsonProperty("user_value")]
154+
[System.Text.Json.Serialization.JsonPropertyName("user_value")]
155+
public Types.UserValue? UserValue { get; set; }
156+
157+
/// <summary>
158+
/// 获取或设置日期时间值。
159+
/// </summary>
160+
[Newtonsoft.Json.JsonProperty("date_time_value")]
161+
[System.Text.Json.Serialization.JsonPropertyName("date_time_value")]
162+
public Types.DateTimeValue? DateTimeValue { get; set; }
163+
}
164+
}
165+
166+
/// <summary>
167+
/// 获取或设置条件连词。
168+
/// </summary>
169+
[Newtonsoft.Json.JsonProperty("conjunction")]
170+
[System.Text.Json.Serialization.JsonPropertyName("conjunction")]
171+
public string Conjunction { get; set; } = string.Empty;
172+
173+
/// <summary>
174+
/// 获取或设置条件列表。
175+
/// </summary>
176+
[Newtonsoft.Json.JsonProperty("conditions")]
177+
[System.Text.Json.Serialization.JsonPropertyName("conditions")]
178+
public IList<Types.Condition> ConditionList { get; set; } = new List<Types.Condition>();
179+
}
28180
}
29181

30182
/// <summary>
@@ -83,6 +235,13 @@ public class SortField
83235
[System.Text.Json.Serialization.JsonPropertyName("sort")]
84236
public IList<Types.SortField>? SortFieldList { get; set; }
85237

238+
/// <summary>
239+
/// 获取或设置过滤设置。
240+
/// </summary>
241+
[Newtonsoft.Json.JsonProperty("filter_spec")]
242+
[System.Text.Json.Serialization.JsonPropertyName("filter_spec")]
243+
public Types.FilterSpec? FilterSpec { get; set; }
244+
86245
/// <summary>
87246
/// 获取或设置分页起始位置。
88247
/// </summary>

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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,10 @@ public class GroupChatFieldProperty : CgibinWedocSmartSheetAddFieldsRequest.Type
102102
public class PercentageFieldProperty : CgibinWedocSmartSheetAddFieldsRequest.Types.Field.Types.PercentageFieldProperty
103103
{
104104
}
105+
106+
public class BarcodeFieldProperty : CgibinWedocSmartSheetAddFieldsRequest.Types.Field.Types.BarcodeFieldProperty
107+
{
108+
}
105109
}
106110

107111
/// <summary>
@@ -250,6 +254,13 @@ public class PercentageFieldProperty : CgibinWedocSmartSheetAddFieldsRequest.Typ
250254
[Newtonsoft.Json.JsonProperty("property_percentage")]
251255
[System.Text.Json.Serialization.JsonPropertyName("property_percentage")]
252256
public Types.PercentageFieldProperty? PropertyAsPercentage { get; set; }
257+
258+
/// <summary>
259+
/// 获取或设置条码的字段属性。
260+
/// </summary>
261+
[Newtonsoft.Json.JsonProperty("property_barcode")]
262+
[System.Text.Json.Serialization.JsonPropertyName("property_barcode")]
263+
public Types.BarcodeFieldProperty? PropertyAsBarcode { get; set; }
253264
}
254265
}
255266

0 commit comments

Comments
 (0)