forked from LeanKit/LeanKit.API.Client
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBoard.cs
More file actions
355 lines (309 loc) · 10.9 KB
/
Board.cs
File metadata and controls
355 lines (309 loc) · 10.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
using System;
using System.Collections.Generic;
using System.Runtime.Serialization;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
namespace LeanKit.Models
{
public class BoardListRequest
{
public int? Offset { get; set; }
public int? Limit { get; set; }
public bool? InvertSort { get; set; }
public string Search { get; set; }
public string MinimumAccess { get; set; }
public bool? Archived { get; set; }
}
public class BoardListResponse
{
public BoardListResponse()
{
Boards = new List<Board>();
}
public PageMeta PageMeta { get; set; }
public List<Board> Boards { get; set; }
public class Board
{
public long Id { get; set; }
public string Title { get; set; }
public string Description { get; set; }
public int BoardRoleId { get; set; }
public bool IsWelcome { get; set; }
public string BoardRole { get; set; }
}
}
public class BoardResponse
{
public BoardResponse()
{
CardTypes = new List<CardType>();
LaneTypes = new List<LaneType>();
LaneClassTypes = new List<LaneClassType>();
Tags = new List<string>();
Priorities = new List<Priority>();
Lanes = new List<Lane>();
Users = new List<User>();
CustomFields = new List<CustomField>();
ClassesOfService = new List<ClassOfService>();
}
public long Id { get; set; }
public long OrganizationId { get; set; }
public string Title { get; set; }
public string Description { get; set; }
public bool ClassOfServiceEnabled { get; set; }
public string CustomIconFieldLabel { get; set; }
public long Version { get; set; }
public int CardColorField { get; set; }
public bool IsCardIdEnabled { get; set; }
public bool IsHeaderEnabled { get; set; }
public bool IsHyperlinkEnabled { get; set; }
public bool IsPrefixEnabled { get; set; }
public string Prefix { get; set; }
public string Format { get; set; }
public bool IsPrefixIncludedInHyperlink { get; set; }
public bool BaseWipOnCardSize { get; set; }
public bool ExcludeCompletedAndArchiveViolations { get; set; }
public bool IsDuplicateCardIdAllowed { get; set; }
public bool IsAutoIncrementCardIdEnabled { get; set; }
public long? CurrentExternalCardId { get; set; }
public bool IsWelcome { get; set; }
public bool IsShared { get; set; }
public long SharedBoardRole { get; set; }
public string CustomBoardMoniker { get; set; }
public bool IsPermalinkEnabled { get; set; }
public bool IsExternalUrlEnabled { get; set; }
public bool AllowUsersToDeleteCards { get; set; }
public long? DefaultCardTypeId { get; set; }
public long? DefaultTaskTypeId { get; set; }
public List<CardType> CardTypes { get; set; }
public List<LaneType> LaneTypes { get; set; }
public List<LaneClassType> LaneClassTypes { get; set; }
public List<string> Tags { get; set; }
public List<Priority> Priorities { get; set; }
public List<Lane> Lanes { get; set; }
public List<User> Users { get; set; }
public UserSettingsResponse UserSettings { get; set; }
public List<CustomField> CustomFields { get; set; }
public List<ClassOfService> ClassesOfService { get; set; }
public string BoardRole { get; set; }
public string EffectiveBoardRole { get; set; }
public class CardType
{
public long Id { get; set; }
public string Name { get; set; }
public string ColorHex { get; set; }
public bool IsCardType { get; set; }
public bool IsTaskType { get; set; }
}
public class LaneType
{
public int Id { get; set; }
public string Name { get; set; }
}
public class LaneClassType
{
public int Id { get; set; }
public string Name { get; set; }
}
public class Priority
{
public int Id { get; set; }
public string Name { get; set; }
}
public class Lane
{
public long Id { get; set; }
public string Name { get; set; }
public string Description { get; set; }
public bool Active { get; set; }
public int CardLimit { get; set; }
public string CreationDate { get; set; }
public int Index { get; set; }
public long? ParentLaneId { get; set; }
public long? ActivityId { get; set; }
public string Orientation { get; set; }
public bool IsConnectionDoneLane { get; set; }
public bool IsDefaultDropLane { get; set; }
public string LaneClassType { get; set; }
public string LaneType { get; set; }
public int Columns { get; set; }
public int WipLimit { get; set; }
public int CardCount { get; set; }
public int CardSize { get; set; }
public int ArchiveCardCount { get; set; }
}
public class ClassOfService
{
public long Id { get; set; }
public string Name { get; set; }
public string IconPath { get; set; }
}
public class CustomField
{
public long Id { get; set; }
public int Index { get; set; }
public string Type { get; set; }
public string Label { get; set; }
public string HelpText { get; set; }
public object ChoiceConfiguration { get; set; }
}
public class User
{
public User()
{
BoardRoles = new List<BoardRoleResponse>();
}
public long Id { get; set; }
public long OrganizationId { get; set; }
public long BoardId { get; set; }
public string Username { get; set; }
public string FirstName { get; set; }
public string LastName { get; set; }
public string FullName { get; set; }
public string EmailAddress { get; set; }
public string GravatarLink { get; set; }
public string Avatar { get; set; }
public string LastAccess { get; set; }
public string DateFormat { get; set; }
public object Settings { get; set; }
public List<BoardRoleResponse> BoardRoles { get; set; }
}
public class UserSettingsResponse
{
public object SavedFilters { get; set; }
public bool AutomaticSubscriptionOn { get; set; }
public bool AvatarOn { get; set; }
public bool DraggableBoardOn { get; set; }
public bool EnableGrowlerUpdates { get; set; }
public bool FilterCollapsedLanes { get; set; }
public bool KanbanConfigOptionsEnableHotKeys { get; set; }
public bool KanbanConfigOptionsDisableAutoRefresh { get; set; }
public bool KanbanConfigOptionsDisableHoverMenus { get; set; }
}
public class BoardRoleResponse
{
public long BoardId { get; set; }
public int Wip { get; set; }
public Role Role { get; set; }
}
public class Role
{
public string Key { get; set; }
public int Value { get; set; }
public string Label { get; set; }
}
}
public class CustomFieldListResponse
{
public CustomFieldListResponse()
{
CustomFields = new List<CustomCardField>();
}
public int Limit { get; set; }
public List<CustomCardField> CustomFields { get; set; }
public class CustomCardField
{
public long Id { get; set; }
public string Label { get; set; }
public string HelpText { get; set; }
public string Type { get; set; }
public int Index { get; set; }
public ChoiceConfigurationObject ChoiceConfiguration { get; set; }
public long CreatedBy { get; set; }
public string CreatedOn { get; set; }
public class ChoiceConfigurationObject
{
public ChoiceConfigurationObject()
{
Choices = new List<string>();
}
public List<string> Choices { get; set; }
}
}
}
public class BoardCreateRequest
{
[JsonProperty("templateId")]
[JsonConverter(typeof(Utils.BigIntConverter))]
public long? TemplateId { get; set; }
[JsonProperty("fromBoardId")]
[JsonConverter(typeof(Utils.BigIntConverter))]
public long? FromBoardId { get; set; }
[JsonProperty("includeExistingUsers")]
public bool? IncludeExistingUsers { get; set; }
[JsonProperty("title")]
public string Title { get; set; }
[JsonProperty("description")]
public string Description { get; set; }
[JsonProperty("baseWipOnCardSize")]
public bool? BaseWipOnCardSize { get; set; }
[JsonProperty("excludeCompletedAndArchiveViolations")]
public bool? ExcludeCompletedAndArchiveViolations { get; set; }
[JsonProperty("includeCards")]
public bool? IncludeCards { get; set; }
[JsonProperty("isShared")]
public bool? IsShared { get; set; }
[JsonProperty("sharedBoardRole")]
public string SharedBoardRole { get; set; }
}
public class BoardCreateResponse
{
public long Id { get; set; }
}
public class BoardCustomFieldUpdateOperation
{
[JsonConverter(typeof(StringEnumConverter))]
public enum OperationEnum
{
[EnumMember(Value = "add")]
Add,
[EnumMember(Value = "replace")]
Replace,
[EnumMember(Value = "remove")]
Remove
}
[JsonConverter(typeof(StringEnumConverter))]
public enum CustomFieldTypeEnum
{
[EnumMember(Value = "text")]
Text,
[EnumMember(Value = "number")]
Number,
[EnumMember(Value = "date")]
Date,
[EnumMember(Value = "choice")]
Choice
}
[JsonProperty("op")]
public OperationEnum Operation { get; set; }
[JsonProperty("path")]
public string Path { get; set; }
[JsonProperty("value")]
public UpdateOperationValue Value { get; set; }
public class UpdateOperationValue
{
[JsonProperty("id")]
[JsonConverter(typeof(Utils.BigIntConverter))]
public long? Id { get; set; }
[JsonProperty("label")]
public string Label { get; set; }
[JsonProperty("helpText")]
public string HelpText { get; set; }
[JsonProperty("type")]
public CustomFieldTypeEnum? Type { get; set; }
[JsonProperty("index")]
public int? Index { get; set; }
[JsonProperty("choiceConfiguration")]
public ChoiceConfigurationObject ChoiceConfiguration { get; set; }
}
public class ChoiceConfigurationObject
{
public ChoiceConfigurationObject()
{
Choices = new List<string>();
}
[JsonProperty("choices")]
public List<string> Choices { get; set; }
}
}
}